@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
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -11,8 +11,9 @@ const module$1 = defineNuxtModule({
|
|
|
11
11
|
const resolver = createResolver(import.meta.url);
|
|
12
12
|
if (nuxt.options.fonts !== false) {
|
|
13
13
|
nuxt.options.fonts = nuxt.options.fonts ?? {};
|
|
14
|
-
nuxt.options.fonts
|
|
15
|
-
|
|
14
|
+
const fonts = nuxt.options.fonts;
|
|
15
|
+
fonts.families = [
|
|
16
|
+
...fonts.families ?? [],
|
|
16
17
|
{
|
|
17
18
|
name: "Inter",
|
|
18
19
|
provider: "google",
|
|
@@ -4,18 +4,23 @@
|
|
|
4
4
|
:class="[
|
|
5
5
|
!hasText ? 'text-black dark:text-white' : '',
|
|
6
6
|
sizes[props.size],
|
|
7
|
-
|
|
7
|
+
roundedClasses[props.rounded]
|
|
8
8
|
]"
|
|
9
9
|
>
|
|
10
|
-
<h1 v-if="props.label">
|
|
11
|
-
|
|
10
|
+
<h1 v-if="props.label">
|
|
11
|
+
{{ props.label }}
|
|
12
|
+
</h1>
|
|
13
|
+
<Icon
|
|
14
|
+
v-else-if="props.icon"
|
|
15
|
+
:name="props.icon"
|
|
16
|
+
/>
|
|
12
17
|
<img
|
|
13
18
|
v-else-if="props.image"
|
|
14
19
|
:src="props.image"
|
|
15
20
|
alt="Avatar"
|
|
16
21
|
class="object-cover w-full h-full"
|
|
17
|
-
:class="
|
|
18
|
-
|
|
22
|
+
:class="roundedClasses[props.rounded]"
|
|
23
|
+
>
|
|
19
24
|
</div>
|
|
20
25
|
</template>
|
|
21
26
|
|
|
@@ -28,14 +33,14 @@ const sizes = {
|
|
|
28
33
|
lg: "w-15 h-15",
|
|
29
34
|
full: "w-full h-full"
|
|
30
35
|
};
|
|
31
|
-
const
|
|
32
|
-
none: "rounded-none",
|
|
33
|
-
sm: "rounded-sm",
|
|
34
|
-
md: "rounded-md",
|
|
35
|
-
lg: "rounded-lg",
|
|
36
|
-
xl: "rounded-xl",
|
|
36
|
+
const roundedClasses = {
|
|
37
|
+
"none": "rounded-none",
|
|
38
|
+
"sm": "rounded-sm",
|
|
39
|
+
"md": "rounded-md",
|
|
40
|
+
"lg": "rounded-lg",
|
|
41
|
+
"xl": "rounded-xl",
|
|
37
42
|
"2xl": "rounded-2xl",
|
|
38
|
-
full: "rounded-full"
|
|
43
|
+
"full": "rounded-full"
|
|
39
44
|
};
|
|
40
45
|
const props = defineProps({
|
|
41
46
|
label: { type: String, required: false },
|
|
@@ -44,7 +49,7 @@ const props = defineProps({
|
|
|
44
49
|
size: { type: String, required: false, default: "md" },
|
|
45
50
|
rounded: { type: String, required: false, default: "full" }
|
|
46
51
|
});
|
|
47
|
-
const textSizes = /(?:^|:)text-(xs|sm|base|lg
|
|
52
|
+
const textSizes = /(?:^|:)text-(?:xs|sm|base|lg|\d*xl|wrap|nowrap|pretty|balance)$/;
|
|
48
53
|
const hasText = computed(() => {
|
|
49
54
|
const cls = typeof attrs.class === "string" ? attrs.class : "";
|
|
50
55
|
return cls.split(" ").some((c) => /(?:^|:)text-/.test(c) && !textSizes.test(c));
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
@click="emit('click', $event)"
|
|
17
17
|
>
|
|
18
18
|
<template v-if="isIconOnly">
|
|
19
|
-
<Icon
|
|
19
|
+
<Icon
|
|
20
|
+
v-if="loading"
|
|
21
|
+
name="svg-spinners:ring-resize"
|
|
22
|
+
/>
|
|
20
23
|
<Icon
|
|
21
24
|
v-else-if="icon"
|
|
22
25
|
:name="icon"
|
|
@@ -25,11 +28,26 @@
|
|
|
25
28
|
/>
|
|
26
29
|
</template>
|
|
27
30
|
<template v-else>
|
|
28
|
-
<Icon
|
|
29
|
-
|
|
31
|
+
<Icon
|
|
32
|
+
v-if="loading"
|
|
33
|
+
name="svg-spinners:ring-resize"
|
|
34
|
+
class="mr-2"
|
|
35
|
+
/>
|
|
36
|
+
<Icon
|
|
37
|
+
v-if="startIcon"
|
|
38
|
+
:name="startIcon"
|
|
39
|
+
class="mr-2"
|
|
40
|
+
/>
|
|
30
41
|
<slot v-if="!label" />
|
|
31
|
-
<span
|
|
32
|
-
|
|
42
|
+
<span
|
|
43
|
+
v-else
|
|
44
|
+
class="font-medium"
|
|
45
|
+
>{{ label }}</span>
|
|
46
|
+
<Icon
|
|
47
|
+
v-if="endIcon"
|
|
48
|
+
:name="endIcon"
|
|
49
|
+
class="ml-2"
|
|
50
|
+
/>
|
|
33
51
|
</template>
|
|
34
52
|
</motion.button>
|
|
35
53
|
</template>
|
|
@@ -54,14 +72,14 @@ const variantClasses = {
|
|
|
54
72
|
flat: ""
|
|
55
73
|
};
|
|
56
74
|
const roundedClasses = {
|
|
57
|
-
none: "rounded-none",
|
|
58
|
-
xs: "rounded-xs",
|
|
59
|
-
sm: "rounded-sm",
|
|
60
|
-
md: "rounded-md",
|
|
61
|
-
lg: "rounded-lg",
|
|
62
|
-
xl: "rounded-xl",
|
|
75
|
+
"none": "rounded-none",
|
|
76
|
+
"xs": "rounded-xs",
|
|
77
|
+
"sm": "rounded-sm",
|
|
78
|
+
"md": "rounded-md",
|
|
79
|
+
"lg": "rounded-lg",
|
|
80
|
+
"xl": "rounded-xl",
|
|
63
81
|
"2xl": "rounded-2xl",
|
|
64
|
-
full: "rounded-full"
|
|
82
|
+
"full": "rounded-full"
|
|
65
83
|
};
|
|
66
84
|
const emit = defineEmits(["click"]);
|
|
67
85
|
const props = defineProps({
|
|
@@ -8,15 +8,27 @@
|
|
|
8
8
|
]"
|
|
9
9
|
class="flex items-center justify-center"
|
|
10
10
|
>
|
|
11
|
-
<Icon
|
|
11
|
+
<Icon
|
|
12
|
+
v-if="startIcon"
|
|
13
|
+
:name="startIcon"
|
|
14
|
+
:size="iconSize"
|
|
15
|
+
class="mr-1"
|
|
16
|
+
/>
|
|
12
17
|
<slot v-if="!label" />
|
|
13
|
-
<span
|
|
14
|
-
|
|
18
|
+
<span
|
|
19
|
+
v-else
|
|
20
|
+
class="font-medium"
|
|
21
|
+
>{{ label }}</span>
|
|
22
|
+
<Icon
|
|
23
|
+
v-if="endIcon"
|
|
24
|
+
:name="endIcon"
|
|
25
|
+
:size="iconSize"
|
|
26
|
+
class="ml-1"
|
|
27
|
+
/>
|
|
15
28
|
</div>
|
|
16
29
|
</template>
|
|
17
30
|
|
|
18
31
|
<script setup>
|
|
19
|
-
import { motion } from "motion-v";
|
|
20
32
|
const sizes = {
|
|
21
33
|
sm: "text-xs min-w-18 py-1 px-2",
|
|
22
34
|
md: "text-xs min-w-20 py-1.5 px-2",
|
|
@@ -30,13 +42,13 @@ const variantClasses = {
|
|
|
30
42
|
flat: ""
|
|
31
43
|
};
|
|
32
44
|
const roundedClasses = {
|
|
33
|
-
none: "rounded-none",
|
|
34
|
-
sm: "rounded-sm",
|
|
35
|
-
md: "rounded-md",
|
|
36
|
-
lg: "rounded-lg",
|
|
37
|
-
xl: "rounded-xl",
|
|
45
|
+
"none": "rounded-none",
|
|
46
|
+
"sm": "rounded-sm",
|
|
47
|
+
"md": "rounded-md",
|
|
48
|
+
"lg": "rounded-lg",
|
|
49
|
+
"xl": "rounded-xl",
|
|
38
50
|
"2xl": "rounded-2xl",
|
|
39
|
-
full: "rounded-full"
|
|
51
|
+
"full": "rounded-full"
|
|
40
52
|
};
|
|
41
53
|
const props = defineProps({
|
|
42
54
|
label: { type: String, required: false },
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
type __VLS_Slots = {
|
|
9
|
+
activator?: ((props: {}) => any) | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
content?: ((props: {}) => any) | undefined;
|
|
12
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="dropdownRef"
|
|
4
|
+
class="relative inline-block text-left"
|
|
5
|
+
>
|
|
6
|
+
<div @click="toggle">
|
|
7
|
+
<slot name="activator" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<AnimatePresence>
|
|
11
|
+
<motion.div
|
|
12
|
+
v-if="isOpen"
|
|
13
|
+
:initial="{ scale: 0.9, opacity: 0, y: -10 }"
|
|
14
|
+
:exit="{ opacity: 0 }"
|
|
15
|
+
:animate="{ scale: 1, opacity: 1, y: 0 }"
|
|
16
|
+
class="absolute right-0 z-50 mt-2 min-w-52 origin-top-right bg-white border border-gray-100 rounded-xl shadow-xl dark:bg-[#18181B] dark:border-black/40"
|
|
17
|
+
@click="handleContentClick"
|
|
18
|
+
>
|
|
19
|
+
<slot name="content" />
|
|
20
|
+
</motion.div>
|
|
21
|
+
</AnimatePresence>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup>
|
|
26
|
+
import { AnimatePresence, motion } from "motion-v";
|
|
27
|
+
import { ref, onMounted, onUnmounted, provide } from "vue";
|
|
28
|
+
const isOpen = ref(false);
|
|
29
|
+
const dropdownRef = ref(null);
|
|
30
|
+
const toggle = () => {
|
|
31
|
+
isOpen.value = !isOpen.value;
|
|
32
|
+
};
|
|
33
|
+
const close = () => {
|
|
34
|
+
isOpen.value = false;
|
|
35
|
+
};
|
|
36
|
+
provide("closeDropdown", close);
|
|
37
|
+
const onClickOutside = (event) => {
|
|
38
|
+
if (dropdownRef.value && !dropdownRef.value.contains(event.target)) {
|
|
39
|
+
setTimeout(() => close(), 10);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const handleContentClick = (event) => {
|
|
43
|
+
event.stopPropagation();
|
|
44
|
+
};
|
|
45
|
+
onMounted(() => {
|
|
46
|
+
document.addEventListener("click", onClickOutside);
|
|
47
|
+
});
|
|
48
|
+
onUnmounted(() => {
|
|
49
|
+
document.removeEventListener("click", onClickOutside);
|
|
50
|
+
});
|
|
51
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
type __VLS_Slots = {
|
|
9
|
+
activator?: ((props: {}) => any) | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
content?: ((props: {}) => any) | undefined;
|
|
12
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InputVariant, InputRounded } from
|
|
1
|
+
import type { InputVariant, InputRounded } from '../types/index.js';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
modelValue?: string | number;
|
|
4
4
|
type?: string;
|
|
@@ -27,8 +27,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
27
27
|
type: string;
|
|
28
28
|
variant: InputVariant;
|
|
29
29
|
disabled: boolean;
|
|
30
|
-
labelClass: string;
|
|
31
30
|
required: boolean;
|
|
31
|
+
labelClass: string;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
34
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flex flex-col gap-1">
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
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>
|
|
6
15
|
</div>
|
|
7
16
|
<div class="relative w-full">
|
|
8
17
|
<!-- startContent -->
|
|
@@ -20,7 +29,7 @@
|
|
|
20
29
|
:class="[
|
|
21
30
|
$slots.startContent ? 'pl-9' : '',
|
|
22
31
|
$slots.endContent ? 'pr-9' : '',
|
|
23
|
-
|
|
32
|
+
roundedClasses[props.rounded],
|
|
24
33
|
props.error ? errorVariants[props.variant] : variants[props.variant],
|
|
25
34
|
props.disabled ? 'opacity-70' : ''
|
|
26
35
|
]"
|
|
@@ -29,7 +38,7 @@
|
|
|
29
38
|
@input="
|
|
30
39
|
emit('update:modelValue', $event.target.value)
|
|
31
40
|
"
|
|
32
|
-
|
|
41
|
+
>
|
|
33
42
|
<!-- endContent -->
|
|
34
43
|
<div
|
|
35
44
|
v-if="$slots.endContent"
|
|
@@ -45,21 +54,24 @@
|
|
|
45
54
|
{{ description }}
|
|
46
55
|
</p>
|
|
47
56
|
<!-- error message fuera de contenedor relativo -->
|
|
48
|
-
<p
|
|
57
|
+
<p
|
|
58
|
+
v-if="props.error"
|
|
59
|
+
class="text-danger text-xs mt-1"
|
|
60
|
+
>
|
|
49
61
|
{{ props.error }}
|
|
50
62
|
</p>
|
|
51
63
|
</div>
|
|
52
64
|
</template>
|
|
53
65
|
|
|
54
66
|
<script setup>
|
|
55
|
-
const
|
|
56
|
-
none: "rounded-none",
|
|
57
|
-
sm: "rounded-sm",
|
|
58
|
-
md: "rounded-md",
|
|
59
|
-
lg: "rounded-lg",
|
|
60
|
-
xl: "rounded-xl",
|
|
67
|
+
const roundedClasses = {
|
|
68
|
+
"none": "rounded-none",
|
|
69
|
+
"sm": "rounded-sm",
|
|
70
|
+
"md": "rounded-md",
|
|
71
|
+
"lg": "rounded-lg",
|
|
72
|
+
"xl": "rounded-xl",
|
|
61
73
|
"2xl": "rounded-2xl",
|
|
62
|
-
full: "rounded-full"
|
|
74
|
+
"full": "rounded-full"
|
|
63
75
|
};
|
|
64
76
|
const variants = {
|
|
65
77
|
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 { InputVariant, InputRounded } from
|
|
1
|
+
import type { InputVariant, InputRounded } from '../types/index.js';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
modelValue?: string | number;
|
|
4
4
|
type?: string;
|
|
@@ -27,8 +27,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
27
27
|
type: string;
|
|
28
28
|
variant: InputVariant;
|
|
29
29
|
disabled: boolean;
|
|
30
|
-
labelClass: string;
|
|
31
30
|
required: boolean;
|
|
31
|
+
labelClass: string;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
34
|
declare const _default: typeof __VLS_export;
|
|
@@ -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;
|