vlite3 0.2.15 → 0.2.16
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/Button.vue.js +24 -21
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Input.vue.d.ts +2 -2
- package/components/NumberInput.vue.d.ts +2 -2
- package/components/Textarea.vue.d.ts +2 -2
- package/directives/vRipple.d.ts +8 -0
- package/directives/vRipple.js +16 -0
- package/package.json +1 -1
- package/style.css +18 -0
package/components/Button.vue.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as v, useSlots as x, computed as c, openBlock as
|
|
1
|
+
import { defineComponent as v, useSlots as x, computed as c, withDirectives as w, openBlock as i, createElementBlock as p, normalizeClass as o, createBlock as l, createCommentVNode as g, renderSlot as y, createTextVNode as z, toDisplayString as k, unref as B } from "vue";
|
|
2
2
|
import d from "./Icon.vue.js";
|
|
3
|
-
|
|
3
|
+
import { vRipple as C } from "../directives/vRipple.js";
|
|
4
|
+
const S = ["type", "disabled"], D = /* @__PURE__ */ v({
|
|
4
5
|
__name: "Button",
|
|
5
6
|
props: {
|
|
6
7
|
variant: { default: "primary" },
|
|
@@ -16,7 +17,7 @@ const k = ["type", "disabled"], S = /* @__PURE__ */ v({
|
|
|
16
17
|
},
|
|
17
18
|
setup(e) {
|
|
18
19
|
const n = e, u = x(), s = c(() => n.icon && !n.text && !u.default), h = c(() => {
|
|
19
|
-
const t = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background
|
|
20
|
+
const t = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] cursor-pointer gap-2", r = {
|
|
20
21
|
primary: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
21
22
|
"primary-light": "bg-primary-light text-primary-fg-light hover:bg-primary/20",
|
|
22
23
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
@@ -42,13 +43,13 @@ const k = ["type", "disabled"], S = /* @__PURE__ */ v({
|
|
|
42
43
|
md: "h-9 px-4 py-2",
|
|
43
44
|
lg: "h-10 px-6",
|
|
44
45
|
xl: "h-12 px-10"
|
|
45
|
-
},
|
|
46
|
+
}, m = {
|
|
46
47
|
xs: "h-6.5 w-6.5 min-h-6.5 min-w-6.5",
|
|
47
48
|
sm: "h-7 w-7 min-h-7 min-w-7",
|
|
48
49
|
md: "h-7.5 w-7.5 min-h-7.5 min-w-7.5",
|
|
49
50
|
lg: "h-8 w-8 min-h-8 min-w-8",
|
|
50
51
|
xl: "h-8.5 w-8.5 min-h-8.5 min-w-8.5"
|
|
51
|
-
},
|
|
52
|
+
}, b = {
|
|
52
53
|
none: "rounded-none",
|
|
53
54
|
sm: "rounded-sm",
|
|
54
55
|
md: "rounded",
|
|
@@ -59,9 +60,9 @@ const k = ["type", "disabled"], S = /* @__PURE__ */ v({
|
|
|
59
60
|
};
|
|
60
61
|
return [
|
|
61
62
|
t,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
s.value ?
|
|
63
|
+
r[n.variant],
|
|
64
|
+
b[n.rounded],
|
|
65
|
+
s.value ? m[n.size] : f[n.size],
|
|
65
66
|
n.class
|
|
66
67
|
].join(" ");
|
|
67
68
|
}), a = c(() => {
|
|
@@ -71,40 +72,42 @@ const k = ["type", "disabled"], S = /* @__PURE__ */ v({
|
|
|
71
72
|
md: "w-4 h-4",
|
|
72
73
|
lg: "w-4 h-4",
|
|
73
74
|
xl: "w-4 h-4"
|
|
74
|
-
},
|
|
75
|
+
}, r = {
|
|
75
76
|
xs: "w-3 h-3",
|
|
76
77
|
sm: "w-3.5 h-3.5",
|
|
77
78
|
md: "w-3.5 h-3.5",
|
|
78
79
|
lg: "w-4 h-4",
|
|
79
80
|
xl: "w-4 h-4"
|
|
80
81
|
};
|
|
81
|
-
return s.value ?
|
|
82
|
+
return s.value ? r[n.size] : t[n.size];
|
|
82
83
|
});
|
|
83
|
-
return (t,
|
|
84
|
+
return (t, r) => w((i(), p("button", {
|
|
84
85
|
type: e.type,
|
|
85
|
-
class:
|
|
86
|
+
class: o(h.value),
|
|
86
87
|
disabled: e.disabled || e.loading
|
|
87
88
|
}, [
|
|
88
|
-
e.loading ? (
|
|
89
|
+
e.loading ? (i(), l(d, {
|
|
89
90
|
key: 0,
|
|
90
91
|
icon: "lucide:loader-2",
|
|
91
|
-
class:
|
|
92
|
-
}, null, 8, ["class"])) : e.icon ? (
|
|
92
|
+
class: o(["animate-spin pointer-events-none", a.value])
|
|
93
|
+
}, null, 8, ["class"])) : e.icon ? (i(), l(d, {
|
|
93
94
|
key: 1,
|
|
94
95
|
icon: e.icon,
|
|
95
|
-
class:
|
|
96
|
+
class: o(["pointer-events-none", [a.value, s.value ? "mx-auto" : ""]])
|
|
96
97
|
}, null, 8, ["icon", "class"])) : g("", !0),
|
|
97
98
|
y(t.$slots, "default", {}, () => [
|
|
98
|
-
|
|
99
|
+
z(k(e.text), 1)
|
|
99
100
|
]),
|
|
100
|
-
e.iconRight && !e.loading ? (
|
|
101
|
+
e.iconRight && !e.loading ? (i(), l(d, {
|
|
101
102
|
key: 2,
|
|
102
103
|
icon: e.iconRight,
|
|
103
|
-
class:
|
|
104
|
+
class: o([a.value, "h-4 w-4 pointer-events-none"])
|
|
104
105
|
}, null, 8, ["icon", "class"])) : g("", !0)
|
|
105
|
-
], 10,
|
|
106
|
+
], 10, S)), [
|
|
107
|
+
[B(C)]
|
|
108
|
+
]);
|
|
106
109
|
}
|
|
107
110
|
});
|
|
108
111
|
export {
|
|
109
|
-
|
|
112
|
+
D as default
|
|
110
113
|
};
|
|
@@ -352,7 +352,7 @@ declare function __VLS_template(): {
|
|
|
352
352
|
};
|
|
353
353
|
}>> & Readonly<{
|
|
354
354
|
"onSlide-change"?: ((index: number) => any) | undefined;
|
|
355
|
-
}>, "direction" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "draggable" | "autoPlayInterval" | "itemsToShow" | "gap" | "speed" | "easing" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "goToSlide" | "goNext" | "goPrev" | "autoFocus" | "wheelOptions" | "state" | "canGoNext" | "canGoPrev"
|
|
355
|
+
}>, "focus" | "direction" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "draggable" | "autoPlayInterval" | "itemsToShow" | "gap" | "speed" | "easing" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "goToSlide" | "goNext" | "goPrev" | "autoFocus" | "wheelOptions" | "state" | "canGoNext" | "canGoPrev"> & import('vue').ShallowUnwrapRef<{
|
|
356
356
|
goToSlide: (index: number, smooth?: boolean) => void;
|
|
357
357
|
goNext: (smooth?: boolean) => void;
|
|
358
358
|
goPrev: (smooth?: boolean) => void;
|
|
@@ -778,7 +778,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
778
778
|
};
|
|
779
779
|
}>> & Readonly<{
|
|
780
780
|
"onSlide-change"?: ((index: number) => any) | undefined;
|
|
781
|
-
}>, "direction" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "draggable" | "autoPlayInterval" | "itemsToShow" | "gap" | "speed" | "easing" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "goToSlide" | "goNext" | "goPrev" | "autoFocus" | "wheelOptions" | "state" | "canGoNext" | "canGoPrev"
|
|
781
|
+
}>, "focus" | "direction" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "draggable" | "autoPlayInterval" | "itemsToShow" | "gap" | "speed" | "easing" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "goToSlide" | "goNext" | "goPrev" | "autoFocus" | "wheelOptions" | "state" | "canGoNext" | "canGoPrev"> & import('vue').ShallowUnwrapRef<{
|
|
782
782
|
goToSlide: (index: number, smooth?: boolean) => void;
|
|
783
783
|
goNext: (smooth?: boolean) => void;
|
|
784
784
|
goPrev: (smooth?: boolean) => void;
|
|
@@ -24,8 +24,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
24
24
|
disabled: boolean;
|
|
25
25
|
size: InputSize;
|
|
26
26
|
variant: InputVariant;
|
|
27
|
-
rounded: InputRounded;
|
|
28
27
|
error: string;
|
|
28
|
+
rounded: InputRounded;
|
|
29
29
|
readonly: boolean;
|
|
30
30
|
isUpdate: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -14,15 +14,15 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
14
14
|
declare const __VLS_component: import('vue').DefineComponent<InputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
15
15
|
"update:modelValue": (value: string | number) => any;
|
|
16
16
|
change: (value: string | number) => any;
|
|
17
|
-
focus: (event: FocusEvent) => any;
|
|
18
17
|
blur: (event: FocusEvent) => any;
|
|
18
|
+
focus: (event: FocusEvent) => any;
|
|
19
19
|
"click:icon": (event: MouseEvent) => any;
|
|
20
20
|
"click:icon-right": (event: MouseEvent) => any;
|
|
21
21
|
}, string, import('vue').PublicProps, Readonly<InputProps> & Readonly<{
|
|
22
22
|
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
23
23
|
onChange?: (value: string | number) => any;
|
|
24
|
-
onFocus?: (event: FocusEvent) => any;
|
|
25
24
|
onBlur?: (event: FocusEvent) => any;
|
|
25
|
+
onFocus?: (event: FocusEvent) => any;
|
|
26
26
|
"onClick:icon"?: (event: MouseEvent) => any;
|
|
27
27
|
"onClick:icon-right"?: (event: MouseEvent) => any;
|
|
28
28
|
}>, {
|
|
@@ -16,13 +16,13 @@ export interface NumberInputProps {
|
|
|
16
16
|
declare const _default: import('vue').DefineComponent<NumberInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
17
17
|
"update:modelValue": (value: number) => any;
|
|
18
18
|
change: (value: number) => any;
|
|
19
|
-
focus: (event: FocusEvent) => any;
|
|
20
19
|
blur: (event: FocusEvent) => any;
|
|
20
|
+
focus: (event: FocusEvent) => any;
|
|
21
21
|
}, string, import('vue').PublicProps, Readonly<NumberInputProps> & Readonly<{
|
|
22
22
|
"onUpdate:modelValue"?: (value: number) => any;
|
|
23
23
|
onChange?: (value: number) => any;
|
|
24
|
-
onFocus?: (event: FocusEvent) => any;
|
|
25
24
|
onBlur?: (event: FocusEvent) => any;
|
|
25
|
+
onFocus?: (event: FocusEvent) => any;
|
|
26
26
|
}>, {
|
|
27
27
|
disabled: boolean;
|
|
28
28
|
mode: "solid" | "outline" | "ghost";
|
|
@@ -7,12 +7,12 @@ interface Props {
|
|
|
7
7
|
}
|
|
8
8
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
9
9
|
"update:modelValue": (value: string) => any;
|
|
10
|
-
focus: (event: FocusEvent) => any;
|
|
11
10
|
blur: (event: FocusEvent) => any;
|
|
11
|
+
focus: (event: FocusEvent) => any;
|
|
12
12
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
13
13
|
"onUpdate:modelValue"?: (value: string) => any;
|
|
14
|
-
onFocus?: (event: FocusEvent) => any;
|
|
15
14
|
onBlur?: (event: FocusEvent) => any;
|
|
15
|
+
onFocus?: (event: FocusEvent) => any;
|
|
16
16
|
}>, {
|
|
17
17
|
disabled: boolean;
|
|
18
18
|
class: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const c = (e, i) => {
|
|
2
|
+
const n = i.getBoundingClientRect(), s = e.clientX - n.left, l = e.clientY - n.top, t = document.createElement("span"), p = Math.max(n.width, n.height), o = p / 2;
|
|
3
|
+
t.style.width = t.style.height = `${p}px`, t.style.left = `${s - o}px`, t.style.top = `${l - o}px`, t.style.position = "absolute", t.style.pointerEvents = "none", t.classList.add("ripple"), i.querySelectorAll(".ripple").forEach((r) => r.remove()), i.appendChild(t), setTimeout(() => {
|
|
4
|
+
t && t.parentNode && t.remove();
|
|
5
|
+
}, 600);
|
|
6
|
+
}, a = {
|
|
7
|
+
mounted(e) {
|
|
8
|
+
window.getComputedStyle(e).position === "static" && (e.style.position = "relative"), e.style.overflow = "hidden", e._rippleHandler = (i) => c(i, e), e.addEventListener("click", e._rippleHandler);
|
|
9
|
+
},
|
|
10
|
+
unmounted(e) {
|
|
11
|
+
e._rippleHandler && e.removeEventListener("click", e._rippleHandler), e.querySelectorAll(".ripple").forEach((n) => n.remove());
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
a as vRipple
|
|
16
|
+
};
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -470,6 +470,17 @@ html {
|
|
|
470
470
|
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
471
471
|
}
|
|
472
472
|
|
|
473
|
+
|
|
474
|
+
/* Ripple */
|
|
475
|
+
span.ripple {
|
|
476
|
+
position: absolute;
|
|
477
|
+
border-radius: 50%;
|
|
478
|
+
transform: scale(0);
|
|
479
|
+
animation: ripple 600ms linear forwards;
|
|
480
|
+
background-color: rgba(255, 255, 255, 0.094);
|
|
481
|
+
pointer-events: none !important;
|
|
482
|
+
}
|
|
483
|
+
|
|
473
484
|
*,
|
|
474
485
|
::before,
|
|
475
486
|
::after {
|
|
@@ -569,6 +580,13 @@ html {
|
|
|
569
580
|
}
|
|
570
581
|
}
|
|
571
582
|
|
|
583
|
+
@keyframes ripple {
|
|
584
|
+
to {
|
|
585
|
+
transform: scale(4);
|
|
586
|
+
opacity: 0;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
572
590
|
#icon-picker {
|
|
573
591
|
--iconPicker-text: var(--color-foreground);
|
|
574
592
|
--iconPicker-border: var(--color-border);
|