vlite3 0.3.6 → 0.3.7
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/Badge.vue.js +4 -4
- package/components/Button.vue.d.ts +1 -0
- package/components/Button.vue.js +46 -35
- package/components/DataList/DataList.vue.js +10 -9
- package/components/DataList/types.d.ts +1 -0
- package/components/DataTable/DataTable.vue.js +35 -35
- package/components/DataTable/DataTableRow.vue.js +1 -1
- package/components/Input.vue.js +24 -25
- package/components/Screen/Screen.vue.d.ts +3 -24
- package/components/Screen/Screen.vue.js +204 -163
- package/components/Screen/ScreenFilter.vue.js +63 -41
- package/components/Screen/types.d.ts +1 -0
- package/package.json +1 -1
- package/style.css +4 -1
- package/types/button.d.ts +4 -0
- package/utils/usePersistentState.d.ts +8 -0
- package/utils/usePersistentState.js +7 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, ref as V, computed as F, openBlock as r, createBlock as a, withCtx as s, createElementVNode as t, createVNode as n, unref as v, toDisplayString as w, withModifiers as k } from "vue";
|
|
2
2
|
import p from "../Button.vue.js";
|
|
3
3
|
import C from "../Modal.vue.js";
|
|
4
4
|
import O from "../Dropdown/Dropdown.vue.js";
|
|
5
5
|
import f from "../Icon.vue.js";
|
|
6
|
-
import
|
|
6
|
+
import x from "../Form/Form.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import "v-datepicker-lite";
|
|
9
9
|
import "v-datepicker-lite/style.css";
|
|
@@ -15,7 +15,7 @@ import "iconify-icon-picker/style.css";
|
|
|
15
15
|
/* empty css */
|
|
16
16
|
/* empty css */
|
|
17
17
|
import "../../core/config.js";
|
|
18
|
-
const $ = { class: "
|
|
18
|
+
const $ = { class: "" }, S = { class: "py-3 px-3.5 w-[300px] sm:w-[320px] max-h-[85vh] overflow-y-auto bg-card rounded-md border border-border shadow-lg text-left" }, P = /* @__PURE__ */ b({
|
|
19
19
|
__name: "ScreenFilter",
|
|
20
20
|
props: {
|
|
21
21
|
schema: {},
|
|
@@ -23,35 +23,35 @@ const $ = { class: "p-4" }, S = { class: "p-4 w-[300px] sm:w-[320px] max-h-[85vh
|
|
|
23
23
|
type: { default: "modal" }
|
|
24
24
|
},
|
|
25
25
|
emits: ["update:modelValue", "change"],
|
|
26
|
-
setup(
|
|
27
|
-
const m =
|
|
28
|
-
(
|
|
29
|
-
).length : 0), h = (
|
|
30
|
-
c("update:modelValue",
|
|
26
|
+
setup(i, { emit: y }) {
|
|
27
|
+
const m = i, c = y, l = V(!1), d = F(() => m.modelValue ? Object.keys(m.modelValue).filter(
|
|
28
|
+
(o) => m.modelValue[o] !== "" && m.modelValue[o] !== null && m.modelValue[o] !== void 0
|
|
29
|
+
).length : 0), h = (o) => {
|
|
30
|
+
c("update:modelValue", o.values), c("change", o.values), l.value = !1;
|
|
31
31
|
}, g = () => {
|
|
32
32
|
c("update:modelValue", {}), c("change", {});
|
|
33
33
|
};
|
|
34
|
-
return (
|
|
34
|
+
return (o, e) => i.type === "modal" ? (r(), a(C, {
|
|
35
35
|
key: 0,
|
|
36
36
|
title: "Filters",
|
|
37
|
-
show:
|
|
38
|
-
"onUpdate:show": e[2] || (e[2] = (u) =>
|
|
37
|
+
show: l.value,
|
|
38
|
+
"onUpdate:show": e[2] || (e[2] = (u) => l.value = u),
|
|
39
39
|
"max-width": "sm:max-w-md"
|
|
40
40
|
}, {
|
|
41
|
-
trigger:
|
|
42
|
-
d.value > 0 ? (
|
|
41
|
+
trigger: s(() => [
|
|
42
|
+
d.value > 0 ? (r(), a(p, {
|
|
43
43
|
key: 0,
|
|
44
44
|
variant: "secondary",
|
|
45
45
|
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0",
|
|
46
|
-
onClick: e[0] || (e[0] = (u) =>
|
|
46
|
+
onClick: e[0] || (e[0] = (u) => l.value = !0)
|
|
47
47
|
}, {
|
|
48
|
-
default:
|
|
48
|
+
default: s(() => [
|
|
49
49
|
n(f, {
|
|
50
50
|
icon: "ci:filter",
|
|
51
51
|
class: "w-4 h-4"
|
|
52
52
|
}),
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
t("span", null, "Filters (" + w(d.value) + ")", 1),
|
|
54
|
+
t("div", {
|
|
55
55
|
onClick: k(g, ["stop"]),
|
|
56
56
|
class: "ml-1 p-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full transition-colors cursor-pointer"
|
|
57
57
|
}, [
|
|
@@ -62,49 +62,70 @@ const $ = { class: "p-4" }, S = { class: "p-4 w-[300px] sm:w-[320px] max-h-[85vh
|
|
|
62
62
|
])
|
|
63
63
|
]),
|
|
64
64
|
_: 1
|
|
65
|
-
})) : (
|
|
65
|
+
})) : (r(), a(p, {
|
|
66
66
|
key: 1,
|
|
67
67
|
variant: "outline",
|
|
68
|
-
|
|
69
|
-
onClick: e[1] || (e[1] = (u) => t.value = !0),
|
|
68
|
+
onClick: e[1] || (e[1] = (u) => l.value = !0),
|
|
70
69
|
title: "Filter",
|
|
71
70
|
size: "lg",
|
|
71
|
+
asIcon: "",
|
|
72
72
|
class: "shrink-0 h-9! w-9!"
|
|
73
|
+
}, {
|
|
74
|
+
default: s(() => [...e[4] || (e[4] = [
|
|
75
|
+
t("div", { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }, [
|
|
76
|
+
t("svg", {
|
|
77
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
78
|
+
width: "1.132em",
|
|
79
|
+
height: "1.132em",
|
|
80
|
+
viewBox: "0 0 24 24"
|
|
81
|
+
}, [
|
|
82
|
+
t("path", {
|
|
83
|
+
fill: "none",
|
|
84
|
+
stroke: "currentColor",
|
|
85
|
+
"stroke-linecap": "round",
|
|
86
|
+
"stroke-linejoin": "round",
|
|
87
|
+
"stroke-width": "2",
|
|
88
|
+
d: "M20.67 7c.083-.182.127-.374.16-.627c.202-1.572.303-2.358-.158-2.866C20.212 3 19.396 3 17.766 3H6.234c-1.63 0-2.445 0-2.906.507c-.461.508-.36 1.294-.158 2.866c.06.459.158.72.457 1.076c.969 1.15 2.742 3.197 5.23 5.057c.228.17.377.448.402.755c.28 3.425.537 5.765.674 6.917c.071.604.741 1.069 1.293.678c.927-.655 2.66-1.39 2.888-2.612c.108-.577.267-1.585.445-3.244M17.5 8v7m3.5-3.5h-7"
|
|
89
|
+
})
|
|
90
|
+
])
|
|
91
|
+
], -1)
|
|
92
|
+
])]),
|
|
93
|
+
_: 1
|
|
73
94
|
}))
|
|
74
95
|
]),
|
|
75
|
-
default:
|
|
76
|
-
|
|
77
|
-
n(v(
|
|
78
|
-
schema:
|
|
79
|
-
values:
|
|
96
|
+
default: s(() => [
|
|
97
|
+
t("div", $, [
|
|
98
|
+
n(v(x), {
|
|
99
|
+
schema: i.schema,
|
|
100
|
+
values: i.modelValue,
|
|
80
101
|
"submit-text": "Apply Filters",
|
|
81
102
|
onOnSubmit: h
|
|
82
103
|
}, null, 8, ["schema", "values"])
|
|
83
104
|
])
|
|
84
105
|
]),
|
|
85
106
|
_: 1
|
|
86
|
-
}, 8, ["show"])) : (
|
|
107
|
+
}, 8, ["show"])) : (r(), a(v(O), {
|
|
87
108
|
key: 1,
|
|
88
|
-
isOpen:
|
|
89
|
-
"onUpdate:isOpen": e[3] || (e[3] = (u) =>
|
|
109
|
+
isOpen: l.value,
|
|
110
|
+
"onUpdate:isOpen": e[3] || (e[3] = (u) => l.value = u),
|
|
90
111
|
"close-on-select": !1,
|
|
91
112
|
position: "bottom-end",
|
|
92
113
|
class: "w-auto"
|
|
93
114
|
}, {
|
|
94
|
-
trigger:
|
|
95
|
-
d.value > 0 ? (
|
|
115
|
+
trigger: s(() => [
|
|
116
|
+
d.value > 0 ? (r(), a(p, {
|
|
96
117
|
key: 0,
|
|
97
118
|
variant: "secondary",
|
|
98
|
-
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0",
|
|
119
|
+
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0 bg-gray-150! hover:bg-gray-100!",
|
|
99
120
|
style: { "pointer-events": "auto" }
|
|
100
121
|
}, {
|
|
101
|
-
default:
|
|
122
|
+
default: s(() => [
|
|
102
123
|
n(f, {
|
|
103
124
|
icon: "ci:filter",
|
|
104
125
|
class: "w-4 h-4"
|
|
105
126
|
}),
|
|
106
|
-
|
|
107
|
-
|
|
127
|
+
t("span", null, "Filters (" + w(d.value) + ")", 1),
|
|
128
|
+
t("div", {
|
|
108
129
|
onClick: k(g, ["stop"]),
|
|
109
130
|
class: "ml-1 p-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full transition-colors cursor-pointer"
|
|
110
131
|
}, [
|
|
@@ -115,7 +136,7 @@ const $ = { class: "p-4" }, S = { class: "p-4 w-[300px] sm:w-[320px] max-h-[85vh
|
|
|
115
136
|
])
|
|
116
137
|
]),
|
|
117
138
|
_: 1
|
|
118
|
-
})) : (
|
|
139
|
+
})) : (r(), a(p, {
|
|
119
140
|
key: 1,
|
|
120
141
|
variant: "outline",
|
|
121
142
|
icon: "hugeicons:filter-add",
|
|
@@ -124,15 +145,16 @@ const $ = { class: "p-4" }, S = { class: "p-4 w-[300px] sm:w-[320px] max-h-[85vh
|
|
|
124
145
|
class: "shrink-0 h-9! w-9!"
|
|
125
146
|
}))
|
|
126
147
|
]),
|
|
127
|
-
default:
|
|
128
|
-
|
|
129
|
-
n(v(
|
|
130
|
-
schema:
|
|
131
|
-
values:
|
|
148
|
+
default: s(() => [
|
|
149
|
+
t("div", S, [
|
|
150
|
+
n(v(x), {
|
|
151
|
+
schema: i.schema,
|
|
152
|
+
values: i.modelValue,
|
|
132
153
|
"submit-text": "Apply Filters",
|
|
133
154
|
"submit-props": {
|
|
134
155
|
size: "sm",
|
|
135
|
-
class: "w-full"
|
|
156
|
+
class: "w-full",
|
|
157
|
+
textClass: "-text-fs-1!"
|
|
136
158
|
},
|
|
137
159
|
onOnSubmit: h
|
|
138
160
|
}, null, 8, ["schema", "values"])
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -253,7 +253,10 @@
|
|
|
253
253
|
background-color: var(--color-white);
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
.dark
|
|
256
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
@utility dark {
|
|
257
260
|
--color-white: #0b0b0b !important;
|
|
258
261
|
--color-mixture-1: #0c0c0c !important;
|
|
259
262
|
--color-mixture-2: #ffffff !important;
|
package/types/button.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UseStorageOptions } from '@vueuse/core';
|
|
2
|
+
/**
|
|
3
|
+
* Reusable function to manage persistent state in local storage.
|
|
4
|
+
* @param key Local storage key. Will be automatically prefixed with 'builto-'.
|
|
5
|
+
* @param initialValue The default value if no value exists in storage.
|
|
6
|
+
* @param options Additional options for useLocalStorage.
|
|
7
|
+
*/
|
|
8
|
+
export declare function usePersistentState<T>(key: string, initialValue: T, options?: UseStorageOptions<T>): import('@vueuse/shared').RemovableRef<T>;
|