@smurfox/proxy-ui 0.1.35 → 0.2.0
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/dist/module.json +1 -1
- package/dist/module.mjs +3 -2
- package/dist/runtime/components/Avatar.d.vue.ts +1 -1
- package/dist/runtime/components/Avatar.vue +18 -13
- package/dist/runtime/components/Avatar.vue.d.ts +1 -1
- package/dist/runtime/components/Button.d.vue.ts +1 -1
- package/dist/runtime/components/Button.vue +30 -12
- package/dist/runtime/components/Button.vue.d.ts +1 -1
- package/dist/runtime/components/Card.d.vue.ts +1 -1
- package/dist/runtime/components/Card.vue.d.ts +1 -1
- package/dist/runtime/components/Chip.d.vue.ts +1 -1
- package/dist/runtime/components/Chip.vue +22 -10
- package/dist/runtime/components/Chip.vue.d.ts +1 -1
- package/dist/runtime/components/Dropdown.d.vue.ts +12 -0
- package/dist/runtime/components/Dropdown.vue +51 -0
- package/dist/runtime/components/Dropdown.vue.d.ts +12 -0
- package/dist/runtime/components/Input.d.vue.ts +2 -2
- package/dist/runtime/components/Input.vue +25 -13
- package/dist/runtime/components/Input.vue.d.ts +2 -2
- package/dist/runtime/components/Select.d.vue.ts +2 -2
- package/dist/runtime/components/Select.vue +104 -86
- package/dist/runtime/components/Select.vue.d.ts +2 -2
- package/dist/runtime/components/Table.d.vue.ts +79 -0
- package/dist/runtime/components/Table.vue +178 -0
- package/dist/runtime/components/Table.vue.d.ts +79 -0
- package/dist/runtime/components/Tabs.d.vue.ts +2 -2
- package/dist/runtime/components/Tabs.vue +8 -8
- package/dist/runtime/components/Tabs.vue.d.ts +2 -2
- package/dist/runtime/components/TextArea.d.vue.ts +1 -1
- package/dist/runtime/components/TextArea.vue +51 -51
- package/dist/runtime/components/TextArea.vue.d.ts +1 -1
- package/dist/runtime/types/index.d.ts +15 -14
- package/package.json +1 -1
|
@@ -1,109 +1,127 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex flex-col gap-1">
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
<div class="flex flex-col gap-1">
|
|
3
|
+
<div
|
|
4
|
+
v-if="label"
|
|
5
|
+
class="flex items-start gap-1"
|
|
6
|
+
>
|
|
7
|
+
<label
|
|
8
|
+
class="dark:text-white"
|
|
9
|
+
:class="[labelClass]"
|
|
10
|
+
>{{ label }} </label>
|
|
11
|
+
<span
|
|
12
|
+
v-if="props.required"
|
|
13
|
+
class="text-danger"
|
|
14
|
+
>*</span>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div
|
|
18
|
+
ref="selectRef"
|
|
19
|
+
class="relative w-full text-left"
|
|
20
|
+
>
|
|
21
|
+
<button
|
|
22
|
+
type="button"
|
|
23
|
+
class="w-full p-3 text-sm text-left transition-colors flex items-center justify-between gap-3"
|
|
12
24
|
:class="[
|
|
13
25
|
roundedVariants[props.rounded],
|
|
14
26
|
props.error ? errorVariants[props.variant] : variants[props.variant],
|
|
15
27
|
props.disabled ? 'opacity-70 cursor-not-allowed' : 'cursor-pointer',
|
|
16
28
|
!selectedOption ? 'text-gray-500 dark:text-white/50' : ''
|
|
17
|
-
]"
|
|
18
|
-
:disabled="props.disabled"
|
|
19
|
-
@click.stop="toggle"
|
|
20
|
-
>
|
|
21
|
-
<span class="truncate">
|
|
22
|
-
{{ displayText }}
|
|
23
|
-
</span>
|
|
24
|
-
<Icon
|
|
25
|
-
name="mdi:chevron-down"
|
|
26
|
-
class="text-gray-400 transition-transform duration-200 shrink-0"
|
|
27
|
-
:class="{ 'rotate-180': isOpen && !props.disabled }"
|
|
28
|
-
/>
|
|
29
|
-
</button>
|
|
30
|
-
|
|
31
|
-
<Teleport
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
]"
|
|
30
|
+
:disabled="props.disabled"
|
|
31
|
+
@click.stop="toggle"
|
|
32
|
+
>
|
|
33
|
+
<span class="truncate">
|
|
34
|
+
{{ displayText }}
|
|
35
|
+
</span>
|
|
36
|
+
<Icon
|
|
37
|
+
name="mdi:chevron-down"
|
|
38
|
+
class="text-gray-400 transition-transform duration-200 shrink-0"
|
|
39
|
+
:class="{ 'rotate-180': isOpen && !props.disabled }"
|
|
40
|
+
/>
|
|
41
|
+
</button>
|
|
42
|
+
|
|
43
|
+
<Teleport
|
|
44
|
+
v-if="isOpen && !props.disabled"
|
|
45
|
+
to="body"
|
|
46
|
+
>
|
|
47
|
+
<AnimatePresence>
|
|
48
|
+
<motion.div
|
|
49
|
+
v-if="isOpen && !props.disabled"
|
|
50
|
+
:initial="{ scale: 0.96, opacity: 0, y: -6 }"
|
|
51
|
+
:animate="{ scale: 1, opacity: 1, y: 0 }"
|
|
52
|
+
:exit="{ scale: 0.96, opacity: 0, y: -6 }"
|
|
53
|
+
class="fixed p-2 max-h-56 overflow-y-auto origin-top border rounded-xl shadow-xl"
|
|
39
54
|
:class="
|
|
40
55
|
isDarkMode ? 'bg-[#212123] border-white/10 text-white' : 'bg-white border-gray-100'
|
|
41
|
-
"
|
|
42
|
-
:style="dropdownStyle"
|
|
43
|
-
@click.stop
|
|
44
|
-
>
|
|
45
|
-
<div
|
|
46
|
-
v-if="props.options.length === 0"
|
|
47
|
-
class="px-4 py-2 text-sm text-center"
|
|
48
|
-
:class="isDarkMode ? 'text-white/60' : 'text-black/50'"
|
|
49
|
-
>
|
|
50
|
-
No available options
|
|
51
|
-
</div>
|
|
52
|
-
<template v-else>
|
|
53
|
-
<button
|
|
54
|
-
v-for="option in props.options"
|
|
55
|
-
:key="String(option.value)"
|
|
56
|
-
type="button"
|
|
57
|
-
class="w-full flex items-center justify-between gap-3 px-3 py-2 mb-1 text-left cursor-pointer rounded-lg transition-colors"
|
|
56
|
+
"
|
|
57
|
+
:style="dropdownStyle"
|
|
58
|
+
@click.stop
|
|
59
|
+
>
|
|
60
|
+
<div
|
|
61
|
+
v-if="props.options.length === 0"
|
|
62
|
+
class="px-4 py-2 text-sm text-center"
|
|
63
|
+
:class="isDarkMode ? 'text-white/60' : 'text-black/50'"
|
|
64
|
+
>
|
|
65
|
+
No available options
|
|
66
|
+
</div>
|
|
67
|
+
<template v-else>
|
|
68
|
+
<button
|
|
69
|
+
v-for="option in props.options"
|
|
70
|
+
:key="String(option.value)"
|
|
71
|
+
type="button"
|
|
72
|
+
class="w-full flex items-center justify-between gap-3 px-3 py-2 mb-1 text-left cursor-pointer rounded-lg transition-colors"
|
|
58
73
|
:class="[
|
|
59
74
|
isDarkMode ? 'hover:bg-white/10' : 'hover:bg-gray-100',
|
|
60
75
|
option.value === props.modelValue ? selectedOptionClass : ''
|
|
61
|
-
]"
|
|
62
|
-
@click.stop="selectOption(option)"
|
|
63
|
-
>
|
|
64
|
-
<span
|
|
65
|
-
class="text-sm truncate"
|
|
76
|
+
]"
|
|
77
|
+
@click.stop="selectOption(option)"
|
|
78
|
+
>
|
|
79
|
+
<span
|
|
80
|
+
class="text-sm truncate"
|
|
66
81
|
:class="
|
|
67
82
|
option.value === props.modelValue ? 'text-primary' : unselectedOptionClass
|
|
68
|
-
"
|
|
69
|
-
>
|
|
70
|
-
{{ option.label }}
|
|
71
|
-
</span>
|
|
72
|
-
<Icon
|
|
73
|
-
v-if="option.value === props.modelValue"
|
|
74
|
-
name="mdi:check"
|
|
75
|
-
class="text-primary text-sm shrink-0"
|
|
76
|
-
/>
|
|
77
|
-
</button>
|
|
78
|
-
</template>
|
|
79
|
-
</motion.div>
|
|
80
|
-
</AnimatePresence>
|
|
81
|
-
</Teleport>
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
<p
|
|
85
|
-
v-if="description && !props.error"
|
|
86
|
-
class="text-gray-600 dark:text-white/60 text-xs"
|
|
87
|
-
>
|
|
88
|
-
{{ description }}
|
|
89
|
-
</p>
|
|
90
|
-
<p
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
83
|
+
"
|
|
84
|
+
>
|
|
85
|
+
{{ option.label }}
|
|
86
|
+
</span>
|
|
87
|
+
<Icon
|
|
88
|
+
v-if="option.value === props.modelValue"
|
|
89
|
+
name="mdi:check"
|
|
90
|
+
class="text-primary text-sm shrink-0"
|
|
91
|
+
/>
|
|
92
|
+
</button>
|
|
93
|
+
</template>
|
|
94
|
+
</motion.div>
|
|
95
|
+
</AnimatePresence>
|
|
96
|
+
</Teleport>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<p
|
|
100
|
+
v-if="description && !props.error"
|
|
101
|
+
class="text-gray-600 dark:text-white/60 text-xs"
|
|
102
|
+
>
|
|
103
|
+
{{ description }}
|
|
104
|
+
</p>
|
|
105
|
+
<p
|
|
106
|
+
v-if="props.error"
|
|
107
|
+
class="text-danger text-xs mt-1"
|
|
108
|
+
>
|
|
109
|
+
{{ props.error }}
|
|
110
|
+
</p>
|
|
111
|
+
</div>
|
|
94
112
|
</template>
|
|
95
113
|
|
|
96
114
|
<script setup>
|
|
97
115
|
import { AnimatePresence, motion } from "motion-v";
|
|
98
116
|
import { computed, nextTick, onMounted, onUnmounted, ref } from "vue";
|
|
99
117
|
const roundedVariants = {
|
|
100
|
-
none: "rounded-none",
|
|
101
|
-
sm: "rounded-sm",
|
|
102
|
-
md: "rounded-md",
|
|
103
|
-
lg: "rounded-lg",
|
|
104
|
-
xl: "rounded-xl",
|
|
118
|
+
"none": "rounded-none",
|
|
119
|
+
"sm": "rounded-sm",
|
|
120
|
+
"md": "rounded-md",
|
|
121
|
+
"lg": "rounded-lg",
|
|
122
|
+
"xl": "rounded-xl",
|
|
105
123
|
"2xl": "rounded-2xl",
|
|
106
|
-
full: "rounded-full"
|
|
124
|
+
"full": "rounded-full"
|
|
107
125
|
};
|
|
108
126
|
const variants = {
|
|
109
127
|
default: "border border-gray-200 dark:border-white/10 bg-white dark:bg-white/10 enabled:hover:bg-gray-100 dark:enabled:hover:bg-white/20 dark:text-white focus:bg-white dark:focus:bg-white/10 focus:ring-2 focus:ring-primary focus:outline-none",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InputRounded, InputVariant } from
|
|
1
|
+
import type { InputRounded, InputVariant } from '../types/index.js';
|
|
2
2
|
interface SelectOption {
|
|
3
3
|
label: string;
|
|
4
4
|
value: string | number;
|
|
@@ -28,9 +28,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
28
28
|
variant: InputVariant;
|
|
29
29
|
disabled: boolean;
|
|
30
30
|
placeholder: string;
|
|
31
|
+
required: boolean;
|
|
31
32
|
modelValue: string | number | null;
|
|
32
33
|
labelClass: string;
|
|
33
|
-
required: boolean;
|
|
34
34
|
options: SelectOption[];
|
|
35
35
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
declare const roundedClasses: {
|
|
2
|
+
readonly none: "rounded-none";
|
|
3
|
+
readonly xs: "rounded-xs";
|
|
4
|
+
readonly sm: "rounded-sm";
|
|
5
|
+
readonly md: "rounded-md";
|
|
6
|
+
readonly lg: "rounded-lg";
|
|
7
|
+
readonly xl: "rounded-xl";
|
|
8
|
+
readonly '2xl': "rounded-2xl";
|
|
9
|
+
readonly '3xl': "rounded-3xl";
|
|
10
|
+
readonly full: "rounded-full";
|
|
11
|
+
};
|
|
12
|
+
type __VLS_Props = {
|
|
13
|
+
items?: Array<{
|
|
14
|
+
id: string | number;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}>;
|
|
17
|
+
columns?: {
|
|
18
|
+
name: string;
|
|
19
|
+
id: string;
|
|
20
|
+
width?: string;
|
|
21
|
+
}[];
|
|
22
|
+
rounded?: keyof typeof roundedClasses;
|
|
23
|
+
isBordered?: boolean;
|
|
24
|
+
headerColor?: string;
|
|
25
|
+
bodyColor?: string;
|
|
26
|
+
};
|
|
27
|
+
declare var __VLS_2: `cell-${string}`, __VLS_3: {
|
|
28
|
+
item: {
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
id: string | number;
|
|
31
|
+
};
|
|
32
|
+
value: unknown;
|
|
33
|
+
}, __VLS_5: {
|
|
34
|
+
item: {
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
id: string | number;
|
|
37
|
+
};
|
|
38
|
+
columns: {
|
|
39
|
+
name: string;
|
|
40
|
+
id: string;
|
|
41
|
+
width?: string;
|
|
42
|
+
}[];
|
|
43
|
+
}, __VLS_8: `cell-${string}`, __VLS_9: {
|
|
44
|
+
item: {
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
id: string | number;
|
|
47
|
+
};
|
|
48
|
+
value: unknown;
|
|
49
|
+
};
|
|
50
|
+
type __VLS_Slots = {} & {
|
|
51
|
+
[K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
|
|
52
|
+
} & {
|
|
53
|
+
[K in NonNullable<typeof __VLS_8>]?: (props: typeof __VLS_9) => any;
|
|
54
|
+
} & {
|
|
55
|
+
'mobile-card'?: (props: typeof __VLS_5) => any;
|
|
56
|
+
};
|
|
57
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
58
|
+
rounded: keyof typeof roundedClasses;
|
|
59
|
+
columns: {
|
|
60
|
+
name: string;
|
|
61
|
+
id: string;
|
|
62
|
+
width?: string;
|
|
63
|
+
}[];
|
|
64
|
+
isBordered: boolean;
|
|
65
|
+
items: Array<{
|
|
66
|
+
id: string | number;
|
|
67
|
+
[key: string]: unknown;
|
|
68
|
+
}>;
|
|
69
|
+
headerColor: string;
|
|
70
|
+
bodyColor: string;
|
|
71
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
73
|
+
declare const _default: typeof __VLS_export;
|
|
74
|
+
export default _default;
|
|
75
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
76
|
+
new (): {
|
|
77
|
+
$slots: S;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative w-full">
|
|
3
|
+
<!-- Vista de tabla para pantallas medianas y grandes -->
|
|
4
|
+
<div
|
|
5
|
+
class="hidden md:block overflow-x-auto"
|
|
6
|
+
:class="[
|
|
7
|
+
roundedClasses[props.rounded],
|
|
8
|
+
isBordered ? 'border border-gray-200 dark:border-white/10 ' : ''
|
|
9
|
+
]"
|
|
10
|
+
>
|
|
11
|
+
<table class="w-full text-sm text-left rtl:text-right table-fixed">
|
|
12
|
+
<thead :class="props.headerColor">
|
|
13
|
+
<tr>
|
|
14
|
+
<th
|
|
15
|
+
v-for="(column, index) in props.columns"
|
|
16
|
+
:key="column.id"
|
|
17
|
+
scope="col"
|
|
18
|
+
:style="{ width: column.width || 'auto' }"
|
|
19
|
+
:class="[
|
|
20
|
+
'px-4 py-3 font-bold text-xs uppercase',
|
|
21
|
+
index === 0 ? isBordered ? roundedTopStartClasses[props.rounded] : roundedStartClasses[props.rounded] : '',
|
|
22
|
+
index === props.columns.length - 1 ? isBordered ? roundedTopEndClasses[props.rounded] : roundedEndClasses[props.rounded] : ''
|
|
23
|
+
]"
|
|
24
|
+
>
|
|
25
|
+
{{ column.name }}
|
|
26
|
+
</th>
|
|
27
|
+
</tr>
|
|
28
|
+
</thead>
|
|
29
|
+
|
|
30
|
+
<tbody :class="props.bodyColor">
|
|
31
|
+
<template v-if="items.length > 0">
|
|
32
|
+
<tr
|
|
33
|
+
v-for="item in items"
|
|
34
|
+
:key="item.id"
|
|
35
|
+
>
|
|
36
|
+
<td
|
|
37
|
+
v-for="column in columns"
|
|
38
|
+
:key="column.id"
|
|
39
|
+
:style="{ width: column.width || 'auto' }"
|
|
40
|
+
class="px-4 py-2 text-gray-900 dark:text-white break-words"
|
|
41
|
+
>
|
|
42
|
+
<slot
|
|
43
|
+
:name="`cell-${column.id}`"
|
|
44
|
+
:item="item"
|
|
45
|
+
:value="item[column.id]"
|
|
46
|
+
>
|
|
47
|
+
{{ item[column.id] }}
|
|
48
|
+
</slot>
|
|
49
|
+
</td>
|
|
50
|
+
</tr>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<tr v-else>
|
|
54
|
+
<td
|
|
55
|
+
:colspan="columns.length"
|
|
56
|
+
class="text-lg text-center py-20 text-black/50 dark:text-white/50"
|
|
57
|
+
>
|
|
58
|
+
No se encontraron resultados
|
|
59
|
+
</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</tbody>
|
|
62
|
+
</table>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<!-- Vista de tarjetas para dispositivos móviles -->
|
|
66
|
+
<div class="block md:hidden space-y-4 p-1">
|
|
67
|
+
<div
|
|
68
|
+
v-for="item in items"
|
|
69
|
+
:key="item.id"
|
|
70
|
+
class="bg-white dark:bg-[#18181B] border border-gray-200 dark:border-white/10 rounded-lg p-4 shadow-sm"
|
|
71
|
+
>
|
|
72
|
+
<slot
|
|
73
|
+
name="mobile-card"
|
|
74
|
+
:item="item"
|
|
75
|
+
:columns="columns"
|
|
76
|
+
>
|
|
77
|
+
<!-- Contenido por defecto si no se proporciona slot personalizado -->
|
|
78
|
+
<div class="space-y-2">
|
|
79
|
+
<div
|
|
80
|
+
v-for="column in columns"
|
|
81
|
+
:key="column.id"
|
|
82
|
+
class="flex justify-between items-center"
|
|
83
|
+
>
|
|
84
|
+
<span
|
|
85
|
+
class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase"
|
|
86
|
+
>
|
|
87
|
+
{{ column.name }}
|
|
88
|
+
</span>
|
|
89
|
+
<div class="text-sm">
|
|
90
|
+
<slot
|
|
91
|
+
:name="`cell-${column.id}`"
|
|
92
|
+
:item="item"
|
|
93
|
+
:value="item[column.id]"
|
|
94
|
+
>
|
|
95
|
+
{{ item[column.id] }}
|
|
96
|
+
</slot>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</slot>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<!-- Mensaje cuando no hay items -->
|
|
104
|
+
<div
|
|
105
|
+
v-if="items.length === 0"
|
|
106
|
+
class="text-lg text-center py-20 text-black/50 dark:text-white/50"
|
|
107
|
+
>
|
|
108
|
+
No se encontraron resultados
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</template>
|
|
113
|
+
|
|
114
|
+
<script setup>
|
|
115
|
+
const roundedClasses = {
|
|
116
|
+
"none": "rounded-none",
|
|
117
|
+
"xs": "rounded-xs",
|
|
118
|
+
"sm": "rounded-sm",
|
|
119
|
+
"md": "rounded-md",
|
|
120
|
+
"lg": "rounded-lg",
|
|
121
|
+
"xl": "rounded-xl",
|
|
122
|
+
"2xl": "rounded-2xl",
|
|
123
|
+
"3xl": "rounded-3xl",
|
|
124
|
+
"full": "rounded-full"
|
|
125
|
+
};
|
|
126
|
+
const roundedStartClasses = {
|
|
127
|
+
"none": "rounded-s-none",
|
|
128
|
+
"xs": "rounded-s-xs",
|
|
129
|
+
"sm": "rounded-s-sm",
|
|
130
|
+
"md": "rounded-s-md",
|
|
131
|
+
"lg": "rounded-s-lg",
|
|
132
|
+
"xl": "rounded-s-xl",
|
|
133
|
+
"2xl": "rounded-s-2xl",
|
|
134
|
+
"3xl": "rounded-s-3xl",
|
|
135
|
+
"full": "rounded-s-full"
|
|
136
|
+
};
|
|
137
|
+
const roundedEndClasses = {
|
|
138
|
+
"none": "rounded-e-none",
|
|
139
|
+
"xs": "rounded-e-xs",
|
|
140
|
+
"sm": "rounded-e-sm",
|
|
141
|
+
"md": "rounded-e-md",
|
|
142
|
+
"lg": "rounded-e-lg",
|
|
143
|
+
"xl": "rounded-e-xl",
|
|
144
|
+
"2xl": "rounded-e-2xl",
|
|
145
|
+
"3xl": "rounded-e-3xl",
|
|
146
|
+
"full": "rounded-e-full"
|
|
147
|
+
};
|
|
148
|
+
const roundedTopStartClasses = {
|
|
149
|
+
"none": "rounded-ss-none",
|
|
150
|
+
"xs": "rounded-ss-xs",
|
|
151
|
+
"sm": "rounded-ss-sm",
|
|
152
|
+
"md": "rounded-ss-md",
|
|
153
|
+
"lg": "rounded-ss-lg",
|
|
154
|
+
"xl": "rounded-ss-xl",
|
|
155
|
+
"2xl": "rounded-ss-2xl",
|
|
156
|
+
"3xl": "rounded-ss-3xl",
|
|
157
|
+
"full": "rounded-ss-full"
|
|
158
|
+
};
|
|
159
|
+
const roundedTopEndClasses = {
|
|
160
|
+
"none": "rounded-se-none",
|
|
161
|
+
"xs": "rounded-se-xs",
|
|
162
|
+
"sm": "rounded-se-sm",
|
|
163
|
+
"md": "rounded-se-md",
|
|
164
|
+
"lg": "rounded-se-lg",
|
|
165
|
+
"xl": "rounded-se-xl",
|
|
166
|
+
"2xl": "rounded-se-2xl",
|
|
167
|
+
"3xl": "rounded-se-3xl",
|
|
168
|
+
"full": "rounded-se-full"
|
|
169
|
+
};
|
|
170
|
+
const props = defineProps({
|
|
171
|
+
items: { type: Array, required: false, default: () => [] },
|
|
172
|
+
columns: { type: Array, required: false, default: () => [] },
|
|
173
|
+
rounded: { type: null, required: false, default: "lg" },
|
|
174
|
+
isBordered: { type: Boolean, required: false, default: false },
|
|
175
|
+
headerColor: { type: String, required: false, default: "bg-[#F4F4F5] text-[#71717A] dark:bg-[#27272A] dark:text-[#A1A1AA]" },
|
|
176
|
+
bodyColor: { type: String, required: false, default: "" }
|
|
177
|
+
});
|
|
178
|
+
</script>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
declare const roundedClasses: {
|
|
2
|
+
readonly none: "rounded-none";
|
|
3
|
+
readonly xs: "rounded-xs";
|
|
4
|
+
readonly sm: "rounded-sm";
|
|
5
|
+
readonly md: "rounded-md";
|
|
6
|
+
readonly lg: "rounded-lg";
|
|
7
|
+
readonly xl: "rounded-xl";
|
|
8
|
+
readonly '2xl': "rounded-2xl";
|
|
9
|
+
readonly '3xl': "rounded-3xl";
|
|
10
|
+
readonly full: "rounded-full";
|
|
11
|
+
};
|
|
12
|
+
type __VLS_Props = {
|
|
13
|
+
items?: Array<{
|
|
14
|
+
id: string | number;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}>;
|
|
17
|
+
columns?: {
|
|
18
|
+
name: string;
|
|
19
|
+
id: string;
|
|
20
|
+
width?: string;
|
|
21
|
+
}[];
|
|
22
|
+
rounded?: keyof typeof roundedClasses;
|
|
23
|
+
isBordered?: boolean;
|
|
24
|
+
headerColor?: string;
|
|
25
|
+
bodyColor?: string;
|
|
26
|
+
};
|
|
27
|
+
declare var __VLS_2: `cell-${string}`, __VLS_3: {
|
|
28
|
+
item: {
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
id: string | number;
|
|
31
|
+
};
|
|
32
|
+
value: unknown;
|
|
33
|
+
}, __VLS_5: {
|
|
34
|
+
item: {
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
id: string | number;
|
|
37
|
+
};
|
|
38
|
+
columns: {
|
|
39
|
+
name: string;
|
|
40
|
+
id: string;
|
|
41
|
+
width?: string;
|
|
42
|
+
}[];
|
|
43
|
+
}, __VLS_8: `cell-${string}`, __VLS_9: {
|
|
44
|
+
item: {
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
id: string | number;
|
|
47
|
+
};
|
|
48
|
+
value: unknown;
|
|
49
|
+
};
|
|
50
|
+
type __VLS_Slots = {} & {
|
|
51
|
+
[K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
|
|
52
|
+
} & {
|
|
53
|
+
[K in NonNullable<typeof __VLS_8>]?: (props: typeof __VLS_9) => any;
|
|
54
|
+
} & {
|
|
55
|
+
'mobile-card'?: (props: typeof __VLS_5) => any;
|
|
56
|
+
};
|
|
57
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
58
|
+
rounded: keyof typeof roundedClasses;
|
|
59
|
+
columns: {
|
|
60
|
+
name: string;
|
|
61
|
+
id: string;
|
|
62
|
+
width?: string;
|
|
63
|
+
}[];
|
|
64
|
+
isBordered: boolean;
|
|
65
|
+
items: Array<{
|
|
66
|
+
id: string | number;
|
|
67
|
+
[key: string]: unknown;
|
|
68
|
+
}>;
|
|
69
|
+
headerColor: string;
|
|
70
|
+
bodyColor: string;
|
|
71
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
73
|
+
declare const _default: typeof __VLS_export;
|
|
74
|
+
export default _default;
|
|
75
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
76
|
+
new (): {
|
|
77
|
+
$slots: S;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TabsProps } from '../types/index.js';
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<TabsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
3
|
"update:modelValue": (value: string) => any;
|
|
4
4
|
}, string, import("vue").PublicProps, Readonly<TabsProps> & Readonly<{
|
|
5
5
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
6
6
|
}>, {
|
|
7
|
-
rounded: TabsRounded;
|
|
7
|
+
rounded: import("../types/index.js").TabsRounded;
|
|
8
8
|
iconSize: number;
|
|
9
9
|
modelValue: string;
|
|
10
10
|
bgColor: string;
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
<script setup>
|
|
43
43
|
import { motion } from "motion-v";
|
|
44
44
|
const roundedClasses = {
|
|
45
|
-
none: "rounded-none",
|
|
46
|
-
xs: "rounded-xs",
|
|
47
|
-
sm: "rounded-sm",
|
|
48
|
-
md: "rounded-md",
|
|
49
|
-
lg: "rounded-lg",
|
|
50
|
-
xl: "rounded-xl",
|
|
45
|
+
"none": "rounded-none",
|
|
46
|
+
"xs": "rounded-xs",
|
|
47
|
+
"sm": "rounded-sm",
|
|
48
|
+
"md": "rounded-md",
|
|
49
|
+
"lg": "rounded-lg",
|
|
50
|
+
"xl": "rounded-xl",
|
|
51
51
|
"2xl": "rounded-2xl",
|
|
52
|
-
full: "rounded-full"
|
|
52
|
+
"full": "rounded-full"
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
defineProps({
|
|
55
55
|
modelValue: { type: String, required: true, default: "" },
|
|
56
56
|
tabs: { type: Array, required: true },
|
|
57
57
|
iconSize: { type: Number, required: false, default: 15 },
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TabsProps } from '../types/index.js';
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<TabsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
3
|
"update:modelValue": (value: string) => any;
|
|
4
4
|
}, string, import("vue").PublicProps, Readonly<TabsProps> & Readonly<{
|
|
5
5
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
6
6
|
}>, {
|
|
7
|
-
rounded: TabsRounded;
|
|
7
|
+
rounded: import("../types/index.js").TabsRounded;
|
|
8
8
|
iconSize: number;
|
|
9
9
|
modelValue: string;
|
|
10
10
|
bgColor: string;
|
|
@@ -29,9 +29,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
29
29
|
resize: TextAreaResize;
|
|
30
30
|
variant: InputVariant;
|
|
31
31
|
disabled: boolean;
|
|
32
|
-
labelClass: string;
|
|
33
32
|
required: boolean;
|
|
34
33
|
rows: number | string;
|
|
34
|
+
labelClass: string;
|
|
35
35
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
37
|
declare const _default: typeof __VLS_export;
|