@smurfox/proxy-ui 0.1.34 → 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.
Files changed (33) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +3 -2
  3. package/dist/runtime/components/Avatar.d.vue.ts +1 -1
  4. package/dist/runtime/components/Avatar.vue +18 -13
  5. package/dist/runtime/components/Avatar.vue.d.ts +1 -1
  6. package/dist/runtime/components/Button.d.vue.ts +1 -1
  7. package/dist/runtime/components/Button.vue +30 -12
  8. package/dist/runtime/components/Button.vue.d.ts +1 -1
  9. package/dist/runtime/components/Card.d.vue.ts +1 -1
  10. package/dist/runtime/components/Card.vue.d.ts +1 -1
  11. package/dist/runtime/components/Chip.d.vue.ts +1 -1
  12. package/dist/runtime/components/Chip.vue +22 -10
  13. package/dist/runtime/components/Chip.vue.d.ts +1 -1
  14. package/dist/runtime/components/Dropdown.d.vue.ts +12 -0
  15. package/dist/runtime/components/Dropdown.vue +51 -0
  16. package/dist/runtime/components/Dropdown.vue.d.ts +12 -0
  17. package/dist/runtime/components/Input.d.vue.ts +2 -2
  18. package/dist/runtime/components/Input.vue +25 -13
  19. package/dist/runtime/components/Input.vue.d.ts +2 -2
  20. package/dist/runtime/components/Select.d.vue.ts +37 -0
  21. package/dist/runtime/components/Select.vue +224 -0
  22. package/dist/runtime/components/Select.vue.d.ts +37 -0
  23. package/dist/runtime/components/Table.d.vue.ts +79 -0
  24. package/dist/runtime/components/Table.vue +178 -0
  25. package/dist/runtime/components/Table.vue.d.ts +79 -0
  26. package/dist/runtime/components/Tabs.d.vue.ts +2 -2
  27. package/dist/runtime/components/Tabs.vue +8 -8
  28. package/dist/runtime/components/Tabs.vue.d.ts +2 -2
  29. package/dist/runtime/components/TextArea.d.vue.ts +43 -0
  30. package/dist/runtime/components/TextArea.vue +106 -0
  31. package/dist/runtime/components/TextArea.vue.d.ts +43 -0
  32. package/dist/runtime/types/index.d.ts +15 -14
  33. package/package.json +1 -1
@@ -0,0 +1,43 @@
1
+ import type { InputRounded, InputVariant } from '../types/index.js';
2
+ type TextAreaResize = 'none' | 'both' | 'horizontal' | 'vertical';
3
+ type __VLS_Props = {
4
+ modelValue?: string | number;
5
+ label?: string;
6
+ labelClass?: string;
7
+ placeholder?: string;
8
+ description?: string;
9
+ rounded?: InputRounded;
10
+ variant?: InputVariant;
11
+ required?: boolean;
12
+ error?: string;
13
+ disabled?: boolean;
14
+ rows?: number | string;
15
+ resize?: TextAreaResize;
16
+ };
17
+ declare var __VLS_1: {}, __VLS_3: {};
18
+ type __VLS_Slots = {} & {
19
+ startContent?: (props: typeof __VLS_1) => any;
20
+ } & {
21
+ endContent?: (props: typeof __VLS_3) => any;
22
+ };
23
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ "update:modelValue": (value: string | number) => any;
25
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
26
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
27
+ }>, {
28
+ rounded: InputRounded;
29
+ resize: TextAreaResize;
30
+ variant: InputVariant;
31
+ disabled: boolean;
32
+ required: boolean;
33
+ rows: number | string;
34
+ labelClass: string;
35
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
39
+ type __VLS_WithSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,106 @@
1
+ <template>
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
+ <div class="relative w-full">
17
+ <div
18
+ v-if="$slots.startContent"
19
+ class="absolute left-3 top-3 flex items-center pointer-events-none"
20
+ :class="props.error ? 'text-danger' : ''"
21
+ >
22
+ <slot name="startContent" />
23
+ </div>
24
+ <textarea
25
+ :placeholder="placeholder"
26
+ :rows="rows"
27
+ class="w-full p-3 text-sm transition-colors"
28
+ :class="[
29
+ $slots.startContent ? 'pl-9' : '',
30
+ $slots.endContent ? 'pr-9' : '',
31
+ resizeVariants[props.resize],
32
+ roundedVariants[props.rounded],
33
+ props.error ? errorVariants[props.variant] : variants[props.variant],
34
+ props.disabled ? 'opacity-70' : ''
35
+ ]"
36
+ :value="modelValue"
37
+ :disabled="props.disabled"
38
+ @input="
39
+ emit(
40
+ 'update:modelValue',
41
+ $event.target.value
42
+ )
43
+ "
44
+ />
45
+ <div
46
+ v-if="$slots.endContent"
47
+ class="absolute right-3 top-3 flex items-center"
48
+ >
49
+ <slot name="endContent" />
50
+ </div>
51
+ </div>
52
+ <p
53
+ v-if="description && !props.error"
54
+ class="text-gray-600 dark:text-white/60 text-xs"
55
+ >
56
+ {{ description }}
57
+ </p>
58
+ <p
59
+ v-if="props.error"
60
+ class="text-danger text-xs mt-1"
61
+ >
62
+ {{ props.error }}
63
+ </p>
64
+ </div>
65
+ </template>
66
+
67
+ <script setup>
68
+ const roundedVariants = {
69
+ "none": "rounded-none",
70
+ "sm": "rounded-sm",
71
+ "md": "rounded-md",
72
+ "lg": "rounded-lg",
73
+ "xl": "rounded-xl",
74
+ "2xl": "rounded-2xl",
75
+ "full": "rounded-full"
76
+ };
77
+ const variants = {
78
+ 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",
79
+ secondary: "border border-gray-200 dark:border-white/10 bg-[#EBEBEC] dark:bg-white/20 dark:text-white enabled:hover:bg-[#E0E0E1] dark:enabled:hover:bg-white/30 focus:bg-[#EBEBEC] dark:focus:bg-white/20 focus:ring-2 focus:ring-primary focus:outline-none"
80
+ };
81
+ const errorVariants = {
82
+ default: "border border-danger bg-danger/10 dark:bg-danger/20 text-black dark:text-white enabled:hover:bg-white/20 dark:enabled:hover:bg-white/20 focus:bg-white dark:focus:bg-white/10 focus:ring-2 focus:ring-danger focus:outline-none",
83
+ secondary: "border border-danger bg-danger/22 dark:bg-danger/10 text-black dark:text-white enabled:hover:bg-[#E0E0E1] dark:enabled:hover:bg-white/30 focus:bg-[#EBEBEC] dark:focus:bg-white/20 focus:ring-2 focus:ring-danger focus:outline-none"
84
+ };
85
+ const resizeVariants = {
86
+ none: "resize-none",
87
+ both: "resize",
88
+ horizontal: "resize-x",
89
+ vertical: "resize-y"
90
+ };
91
+ const props = defineProps({
92
+ modelValue: { type: [String, Number], required: false },
93
+ label: { type: String, required: false },
94
+ labelClass: { type: String, required: false, default: "text-sm font-semibold" },
95
+ placeholder: { type: String, required: false },
96
+ description: { type: String, required: false },
97
+ rounded: { type: String, required: false, default: "xl" },
98
+ variant: { type: String, required: false, default: "default" },
99
+ required: { type: Boolean, required: false, default: false },
100
+ error: { type: String, required: false },
101
+ disabled: { type: Boolean, required: false, default: false },
102
+ rows: { type: [Number, String], required: false, default: 4 },
103
+ resize: { type: String, required: false, default: "vertical" }
104
+ });
105
+ const emit = defineEmits(["update:modelValue"]);
106
+ </script>
@@ -0,0 +1,43 @@
1
+ import type { InputRounded, InputVariant } from '../types/index.js';
2
+ type TextAreaResize = 'none' | 'both' | 'horizontal' | 'vertical';
3
+ type __VLS_Props = {
4
+ modelValue?: string | number;
5
+ label?: string;
6
+ labelClass?: string;
7
+ placeholder?: string;
8
+ description?: string;
9
+ rounded?: InputRounded;
10
+ variant?: InputVariant;
11
+ required?: boolean;
12
+ error?: string;
13
+ disabled?: boolean;
14
+ rows?: number | string;
15
+ resize?: TextAreaResize;
16
+ };
17
+ declare var __VLS_1: {}, __VLS_3: {};
18
+ type __VLS_Slots = {} & {
19
+ startContent?: (props: typeof __VLS_1) => any;
20
+ } & {
21
+ endContent?: (props: typeof __VLS_3) => any;
22
+ };
23
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ "update:modelValue": (value: string | number) => any;
25
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
26
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
27
+ }>, {
28
+ rounded: InputRounded;
29
+ resize: TextAreaResize;
30
+ variant: InputVariant;
31
+ disabled: boolean;
32
+ required: boolean;
33
+ rows: number | string;
34
+ labelClass: string;
35
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
39
+ type __VLS_WithSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -1,7 +1,8 @@
1
- export type ButtonSize = "sm" | "md" | "lg";
2
- export type ButtonVariant = "default" | "secondary" | "outline" | "ghost" | "flat";
3
- export type ButtonColor = "default" | "ios" | "primary" | "danger" | "success" | "warning" | "custom";
4
- export type ButtonRounded = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
1
+ export type GlobalRounded = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
2
+ export type ButtonSize = 'sm' | 'md' | 'lg';
3
+ export type ButtonVariant = 'default' | 'secondary' | 'outline' | 'ghost' | 'flat';
4
+ export type ButtonColor = 'default' | 'ios' | 'primary' | 'danger' | 'success' | 'warning' | 'custom';
5
+ export type ButtonRounded = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
5
6
  export interface ButtonProps {
6
7
  label?: string;
7
8
  size?: ButtonSize;
@@ -16,10 +17,10 @@ export interface ButtonProps {
16
17
  endIcon?: string;
17
18
  customClass?: string;
18
19
  }
19
- export type ChipSize = "sm" | "md" | "lg";
20
- export type ChipVariant = "default" | "secondary" | "outline" | "flat";
21
- export type ChipColor = "default" | "ios" | "primary" | "danger" | "success" | "warning" | "custom";
22
- export type ChipRounded = "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
20
+ export type ChipSize = 'sm' | 'md' | 'lg';
21
+ export type ChipVariant = 'default' | 'secondary' | 'outline' | 'flat';
22
+ export type ChipColor = 'default' | 'ios' | 'primary' | 'danger' | 'success' | 'warning' | 'custom';
23
+ export type ChipRounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
23
24
  export interface ChipProps {
24
25
  label?: string;
25
26
  size?: ChipSize;
@@ -30,16 +31,16 @@ export interface ChipProps {
30
31
  endIcon?: string;
31
32
  customClass?: string;
32
33
  }
33
- export type CardVariant = "default" | "liquidGlass";
34
+ export type CardVariant = 'default' | 'liquidGlass';
34
35
  export interface CardProps {
35
36
  variant?: CardVariant;
36
37
  customClass?: string;
37
38
  isBordered?: boolean;
38
39
  }
39
- export type AvatarSize = "sm" | "md" | "lg" | "full";
40
- export type AvatarRounded = "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
41
- export type InputVariant = "default" | "secondary";
42
- export type InputRounded = "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
40
+ export type AvatarSize = 'sm' | 'md' | 'lg' | 'full';
41
+ export type AvatarRounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
42
+ export type InputVariant = 'default' | 'secondary';
43
+ export type InputRounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
43
44
  export interface InputProps {
44
45
  type?: string;
45
46
  label?: string;
@@ -52,7 +53,7 @@ export interface InputProps {
52
53
  error?: string;
53
54
  disabled?: boolean;
54
55
  }
55
- export type TabsRounded = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
56
+ export type TabsRounded = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
56
57
  export interface TabItem {
57
58
  label: string;
58
59
  value: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smurfox/proxy-ui",
3
- "version": "0.1.34",
3
+ "version": "0.2.0",
4
4
  "description": "A UI component library built for Nuxt 4",
5
5
  "repository": {
6
6
  "type": "git",