windly-ui 1.0.2 → 1.0.4

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 (103) hide show
  1. package/{ui-library/dist → dist}/module.json +2 -2
  2. package/dist/module.mjs +33 -0
  3. package/dist/runtime/components/Accordion.d.vue.ts +39 -0
  4. package/dist/runtime/components/Accordion.vue +96 -0
  5. package/dist/runtime/components/Accordion.vue.d.ts +39 -0
  6. package/dist/runtime/components/Alert.d.vue.ts +83 -0
  7. package/dist/runtime/components/Alert.vue +78 -0
  8. package/dist/runtime/components/Alert.vue.d.ts +83 -0
  9. package/dist/runtime/components/Avatar.d.vue.ts +141 -0
  10. package/dist/runtime/components/Avatar.vue +72 -0
  11. package/dist/runtime/components/Avatar.vue.d.ts +141 -0
  12. package/dist/runtime/components/Badge.d.vue.ts +133 -0
  13. package/dist/runtime/components/Badge.vue +99 -0
  14. package/dist/runtime/components/Badge.vue.d.ts +133 -0
  15. package/dist/runtime/components/Breadcrumbs.d.vue.ts +83 -0
  16. package/dist/runtime/components/Breadcrumbs.vue +116 -0
  17. package/dist/runtime/components/Breadcrumbs.vue.d.ts +83 -0
  18. package/dist/runtime/components/Button.d.vue.ts +208 -0
  19. package/dist/runtime/components/Button.vue +126 -0
  20. package/dist/runtime/components/Button.vue.d.ts +208 -0
  21. package/dist/runtime/components/Card.d.vue.ts +83 -0
  22. package/dist/runtime/components/Card.vue +71 -0
  23. package/dist/runtime/components/Card.vue.d.ts +83 -0
  24. package/dist/runtime/components/Checkbox.d.vue.ts +190 -0
  25. package/dist/runtime/components/Checkbox.vue +125 -0
  26. package/dist/runtime/components/Checkbox.vue.d.ts +190 -0
  27. package/dist/runtime/components/CodeBlock.d.vue.ts +16 -0
  28. package/dist/runtime/components/CodeBlock.vue +75 -0
  29. package/dist/runtime/components/CodeBlock.vue.d.ts +16 -0
  30. package/dist/runtime/components/ColorPicker.d.vue.ts +91 -0
  31. package/dist/runtime/components/ColorPicker.vue +244 -0
  32. package/dist/runtime/components/ColorPicker.vue.d.ts +91 -0
  33. package/dist/runtime/components/Date.d.vue.ts +137 -0
  34. package/dist/runtime/components/Date.vue +201 -0
  35. package/dist/runtime/components/Date.vue.d.ts +137 -0
  36. package/dist/runtime/components/Dialog.d.vue.ts +63 -0
  37. package/dist/runtime/components/Dialog.vue +85 -0
  38. package/dist/runtime/components/Dialog.vue.d.ts +63 -0
  39. package/dist/runtime/components/Divider.d.vue.ts +51 -0
  40. package/dist/runtime/components/Divider.vue +52 -0
  41. package/dist/runtime/components/Divider.vue.d.ts +51 -0
  42. package/dist/runtime/components/Drawer.d.vue.ts +30 -0
  43. package/dist/runtime/components/Drawer.vue +43 -0
  44. package/dist/runtime/components/Drawer.vue.d.ts +30 -0
  45. package/dist/runtime/components/Dropdown.d.vue.ts +34 -0
  46. package/dist/runtime/components/Dropdown.vue +127 -0
  47. package/dist/runtime/components/Dropdown.vue.d.ts +34 -0
  48. package/dist/runtime/components/FileUploader.d.vue.ts +65 -0
  49. package/dist/runtime/components/FileUploader.vue +358 -0
  50. package/dist/runtime/components/FileUploader.vue.d.ts +65 -0
  51. package/dist/runtime/components/Icon.d.vue.ts +41 -0
  52. package/dist/runtime/components/Icon.vue +66 -0
  53. package/dist/runtime/components/Icon.vue.d.ts +41 -0
  54. package/dist/runtime/components/Image.d.vue.ts +77 -0
  55. package/dist/runtime/components/Image.vue +61 -0
  56. package/dist/runtime/components/Image.vue.d.ts +77 -0
  57. package/dist/runtime/components/Input.d.vue.ts +68 -0
  58. package/dist/runtime/components/Input.vue +241 -0
  59. package/dist/runtime/components/Input.vue.d.ts +68 -0
  60. package/dist/runtime/components/Radio.d.vue.ts +41 -0
  61. package/dist/runtime/components/Radio.vue +222 -0
  62. package/dist/runtime/components/Radio.vue.d.ts +41 -0
  63. package/dist/runtime/components/ScrollArea.d.vue.ts +79 -0
  64. package/dist/runtime/components/ScrollArea.vue +36 -0
  65. package/dist/runtime/components/ScrollArea.vue.d.ts +79 -0
  66. package/dist/runtime/components/Select.d.vue.ts +51 -0
  67. package/dist/runtime/components/Select.vue +271 -0
  68. package/dist/runtime/components/Select.vue.d.ts +51 -0
  69. package/dist/runtime/components/Stepper.d.vue.ts +46 -0
  70. package/dist/runtime/components/Stepper.vue +218 -0
  71. package/dist/runtime/components/Stepper.vue.d.ts +46 -0
  72. package/dist/runtime/components/TabPanel.d.vue.ts +17 -0
  73. package/dist/runtime/components/TabPanel.vue +21 -0
  74. package/dist/runtime/components/TabPanel.vue.d.ts +17 -0
  75. package/dist/runtime/components/Table.d.vue.ts +40 -0
  76. package/dist/runtime/components/Table.vue +92 -0
  77. package/dist/runtime/components/Table.vue.d.ts +40 -0
  78. package/dist/runtime/components/Tabs.d.vue.ts +20 -0
  79. package/dist/runtime/components/Tabs.vue +62 -0
  80. package/dist/runtime/components/Tabs.vue.d.ts +20 -0
  81. package/dist/runtime/components/Textarea.d.vue.ts +208 -0
  82. package/dist/runtime/components/Textarea.vue +185 -0
  83. package/dist/runtime/components/Textarea.vue.d.ts +208 -0
  84. package/dist/runtime/components/Toggle.d.vue.ts +36 -0
  85. package/dist/runtime/components/Toggle.vue +173 -0
  86. package/dist/runtime/components/Toggle.vue.d.ts +36 -0
  87. package/dist/runtime/components/Tooltip.d.vue.ts +63 -0
  88. package/dist/runtime/components/Tooltip.vue +144 -0
  89. package/dist/runtime/components/Tooltip.vue.d.ts +63 -0
  90. package/dist/runtime/components/uiProps.d.ts +38 -0
  91. package/dist/runtime/components/uiProps.js +11 -0
  92. package/dist/runtime/components/useUiClasses.d.ts +43 -0
  93. package/dist/runtime/components/useUiClasses.js +124 -0
  94. package/dist/runtime/composables/plugin.d.ts +2 -0
  95. package/dist/runtime/composables/plugin.js +3 -0
  96. package/dist/runtime/tailwind-color.d.ts +2 -0
  97. package/dist/runtime/tailwind-color.js +5859 -0
  98. package/package.json +12 -46
  99. package/LICENSE +0 -21
  100. package/README.md +0 -232
  101. package/ui-library/dist/module.mjs +0 -22
  102. /package/{ui-library/dist → dist}/module.d.mts +0 -0
  103. /package/{ui-library/dist → dist}/types.d.mts +0 -0
@@ -0,0 +1,30 @@
1
+ type DrawerDirection = 'left' | 'right';
2
+ interface Props {
3
+ isOpen: boolean;
4
+ direction?: DrawerDirection;
5
+ background?: string;
6
+ width?: string;
7
+ padding?: string;
8
+ }
9
+ declare var __VLS_1: {};
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_1) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ close: () => any;
15
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
16
+ onClose?: (() => any) | undefined;
17
+ }>, {
18
+ width: string;
19
+ background: string;
20
+ direction: DrawerDirection;
21
+ padding: string;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,43 @@
1
+ <script setup>
2
+ defineOptions({
3
+ name: "UIDrawer"
4
+ });
5
+ defineProps({
6
+ isOpen: { type: Boolean, required: true },
7
+ direction: { type: String, required: false, default: "right" },
8
+ background: { type: String, required: false, default: "bg-white dark:bg-gray-900" },
9
+ width: { type: String, required: false, default: "w-80" },
10
+ padding: { type: String, required: false, default: "p-6" }
11
+ });
12
+ const emit = defineEmits(["close"]);
13
+ </script>
14
+
15
+ <template>
16
+ <div
17
+ class="fixed inset-0 z-40 bg-black/40 transition-opacity duration-300"
18
+ :class="[
19
+ isOpen ? 'opacity-100 visible' : 'opacity-0 invisible'
20
+ ]"
21
+ @click="emit('close')"
22
+ />
23
+
24
+ <div
25
+ class="fixed top-0 bottom-0 z-50 shadow-2xl transition-transform duration-500 ease-in-out"
26
+ :class="[
27
+ width,
28
+ padding,
29
+ background,
30
+ direction === 'left' ? 'left-0' : 'right-0',
31
+ direction === 'left' ? isOpen ? 'translate-x-0' : '-translate-x-full' : isOpen ? 'translate-x-0' : 'translate-x-full'
32
+ ]"
33
+ >
34
+ <button
35
+ class="absolute top-4 right-4 text-xl font-bold"
36
+ @click="emit('close')"
37
+ >
38
+
39
+ </button>
40
+
41
+ <slot />
42
+ </div>
43
+ </template>
@@ -0,0 +1,30 @@
1
+ type DrawerDirection = 'left' | 'right';
2
+ interface Props {
3
+ isOpen: boolean;
4
+ direction?: DrawerDirection;
5
+ background?: string;
6
+ width?: string;
7
+ padding?: string;
8
+ }
9
+ declare var __VLS_1: {};
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_1) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ close: () => any;
15
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
16
+ onClose?: (() => any) | undefined;
17
+ }>, {
18
+ width: string;
19
+ background: string;
20
+ direction: DrawerDirection;
21
+ padding: string;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,34 @@
1
+ type DropdownAlign = 'left' | 'right';
2
+ type Rounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
3
+ type __VLS_Props = {
4
+ align?: DropdownAlign;
5
+ width?: string;
6
+ menuBgClass?: string;
7
+ rounded?: Rounded;
8
+ bordered?: boolean;
9
+ borderColor?: string;
10
+ flat?: boolean;
11
+ };
12
+ declare var __VLS_1: {}, __VLS_9: {};
13
+ type __VLS_Slots = {} & {
14
+ trigger?: (props: typeof __VLS_1) => any;
15
+ } & {
16
+ menu?: (props: typeof __VLS_9) => any;
17
+ };
18
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
19
+ rounded: Rounded;
20
+ borderColor: string;
21
+ align: DropdownAlign;
22
+ flat: boolean;
23
+ bordered: boolean;
24
+ width: string;
25
+ menuBgClass: string;
26
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,127 @@
1
+ <script setup>
2
+ defineOptions({
3
+ name: "UIDropdown"
4
+ });
5
+ import {
6
+ computed,
7
+ onBeforeUnmount,
8
+ onMounted,
9
+ ref
10
+ } from "vue";
11
+ const props = defineProps({
12
+ align: { type: String, required: false, default: "left" },
13
+ width: { type: String, required: false, default: "w-48" },
14
+ menuBgClass: { type: String, required: false, default: "bg-white dark:bg-gray-800" },
15
+ rounded: { type: String, required: false, default: "xl" },
16
+ bordered: { type: Boolean, required: false, default: false },
17
+ borderColor: { type: String, required: false, default: "gray-200" },
18
+ flat: { type: Boolean, required: false, default: false }
19
+ });
20
+ const isOpen = ref(false);
21
+ const dropdownRef = ref(null);
22
+ const isHex = (val) => {
23
+ return val.startsWith("#") || val.startsWith("rgb") || val.startsWith("hsl");
24
+ };
25
+ const toggle = () => {
26
+ isOpen.value = !isOpen.value;
27
+ };
28
+ const close = () => {
29
+ isOpen.value = false;
30
+ };
31
+ const handleClickOutside = (event) => {
32
+ const target = event.target;
33
+ if (dropdownRef.value && !dropdownRef.value.contains(
34
+ target
35
+ )) {
36
+ close();
37
+ }
38
+ };
39
+ onMounted(() => {
40
+ document.addEventListener(
41
+ "click",
42
+ handleClickOutside
43
+ );
44
+ });
45
+ onBeforeUnmount(() => {
46
+ document.removeEventListener(
47
+ "click",
48
+ handleClickOutside
49
+ );
50
+ });
51
+ const roundedClass = computed(
52
+ () => {
53
+ const map = {
54
+ none: "rounded-none",
55
+ sm: "rounded-sm",
56
+ md: "rounded-md",
57
+ lg: "rounded-lg",
58
+ xl: "rounded-xl",
59
+ full: "rounded-full"
60
+ };
61
+ return map[props.rounded];
62
+ }
63
+ );
64
+ const dropdownClasses = computed(() => [
65
+ "absolute mt-2 z-50 transition-all overflow-hidden",
66
+ props.align === "right" ? "right-0" : "left-0",
67
+ props.width,
68
+ roundedClass.value,
69
+ props.bordered && !isHex(props.borderColor) ? `border border-${props.borderColor}` : "",
70
+ props.flat ? "shadow-none" : "shadow-lg"
71
+ ]);
72
+ const dropdownStyle = computed(
73
+ () => {
74
+ const style = {};
75
+ if (props.bordered && isHex(props.borderColor)) {
76
+ style.border = `1px solid ${props.borderColor}`;
77
+ }
78
+ return style;
79
+ }
80
+ );
81
+ const menuClasses = computed(
82
+ () => [
83
+ "p-2",
84
+ roundedClass.value,
85
+ props.menuBgClass
86
+ ]
87
+ );
88
+ </script>
89
+
90
+ <template>
91
+ <div
92
+ ref="dropdownRef"
93
+ class="relative inline-block"
94
+ >
95
+ <!-- Trigger -->
96
+ <div @click="toggle">
97
+ <slot name="trigger" />
98
+ </div>
99
+
100
+ <!-- Dropdown -->
101
+ <transition
102
+ name="fade-slide"
103
+ >
104
+ <div
105
+ v-if="isOpen"
106
+ :class="
107
+ dropdownClasses
108
+ "
109
+ :style="
110
+ dropdownStyle
111
+ "
112
+ >
113
+ <div
114
+ :class="
115
+ menuClasses
116
+ "
117
+ >
118
+ <slot name="menu" />
119
+ </div>
120
+ </div>
121
+ </transition>
122
+ </div>
123
+ </template>
124
+
125
+ <style scoped>
126
+ .fade-slide-enter-active,.fade-slide-leave-active{transition:all .2s ease}.fade-slide-enter-from{opacity:0;transform:translateY(-8px)}.fade-slide-enter-to,.fade-slide-leave-from{opacity:1;transform:translateY(0)}.fade-slide-leave-to{opacity:0;transform:translateY(-8px)}
127
+ </style>
@@ -0,0 +1,34 @@
1
+ type DropdownAlign = 'left' | 'right';
2
+ type Rounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
3
+ type __VLS_Props = {
4
+ align?: DropdownAlign;
5
+ width?: string;
6
+ menuBgClass?: string;
7
+ rounded?: Rounded;
8
+ bordered?: boolean;
9
+ borderColor?: string;
10
+ flat?: boolean;
11
+ };
12
+ declare var __VLS_1: {}, __VLS_9: {};
13
+ type __VLS_Slots = {} & {
14
+ trigger?: (props: typeof __VLS_1) => any;
15
+ } & {
16
+ menu?: (props: typeof __VLS_9) => any;
17
+ };
18
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
19
+ rounded: Rounded;
20
+ borderColor: string;
21
+ align: DropdownAlign;
22
+ flat: boolean;
23
+ bordered: boolean;
24
+ width: string;
25
+ menuBgClass: string;
26
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,65 @@
1
+ interface UploadedFile {
2
+ file: File;
3
+ name: string;
4
+ size: number;
5
+ type: string;
6
+ }
7
+ type Rounded = "none" | "sm" | "md" | "lg" | "xl" | "full";
8
+ type Separator = "solid" | "dashed" | "dotted";
9
+ type Size = "sm" | "md" | "lg";
10
+ type __VLS_Props = {
11
+ modelValue?: UploadedFile[];
12
+ label?: string;
13
+ hint?: string;
14
+ fileType?: string;
15
+ multiple?: boolean;
16
+ size?: Size;
17
+ color?: string;
18
+ rounded?: Rounded;
19
+ dense?: boolean;
20
+ width?: string;
21
+ outlined?: boolean;
22
+ borderless?: boolean;
23
+ flat?: boolean;
24
+ separator?: Separator;
25
+ disabled?: boolean;
26
+ readonly?: boolean;
27
+ fileRemoverIcon?: string;
28
+ fileSizeLimitKb?: number;
29
+ };
30
+ declare var __VLS_1: {};
31
+ type __VLS_Slots = {} & {
32
+ content?: (props: typeof __VLS_1) => any;
33
+ };
34
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
35
+ "update:modelValue": (value: UploadedFile[]) => any;
36
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
37
+ "onUpdate:modelValue"?: ((value: UploadedFile[]) => any) | undefined;
38
+ }>, {
39
+ modelValue: UploadedFile[];
40
+ disabled: boolean;
41
+ dense: boolean;
42
+ label: string;
43
+ color: string;
44
+ rounded: Rounded;
45
+ size: Size;
46
+ separator: Separator;
47
+ flat: boolean;
48
+ width: string;
49
+ readonly: boolean;
50
+ hint: string;
51
+ fileType: string;
52
+ multiple: boolean;
53
+ outlined: boolean;
54
+ borderless: boolean;
55
+ fileRemoverIcon: string;
56
+ fileSizeLimitKb: number;
57
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
58
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
59
+ declare const _default: typeof __VLS_export;
60
+ export default _default;
61
+ type __VLS_WithSlots<T, S> = T & {
62
+ new (): {
63
+ $slots: S;
64
+ };
65
+ };