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.
@@ -1,9 +1,9 @@
1
- import { defineComponent as x, ref as V, computed as F, openBlock as i, createBlock as s, withCtx as r, createElementVNode as a, createVNode as n, unref as v, toDisplayString as w, withModifiers as k } from "vue";
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 b from "../Form/Form.vue.js";
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: "p-4" }, S = { class: "p-4 w-[300px] sm:w-[320px] max-h-[85vh] overflow-y-auto bg-card rounded-md border border-border shadow-lg text-left" }, P = /* @__PURE__ */ x({
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(o, { emit: y }) {
27
- const m = o, c = y, t = V(!1), d = F(() => m.modelValue ? Object.keys(m.modelValue).filter(
28
- (l) => m.modelValue[l] !== "" && m.modelValue[l] !== null && m.modelValue[l] !== void 0
29
- ).length : 0), h = (l) => {
30
- c("update:modelValue", l.values), c("change", l.values), t.value = !1;
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 (l, e) => o.type === "modal" ? (i(), s(C, {
34
+ return (o, e) => i.type === "modal" ? (r(), a(C, {
35
35
  key: 0,
36
36
  title: "Filters",
37
- show: t.value,
38
- "onUpdate:show": e[2] || (e[2] = (u) => t.value = 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: r(() => [
42
- d.value > 0 ? (i(), s(p, {
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) => t.value = !0)
46
+ onClick: e[0] || (e[0] = (u) => l.value = !0)
47
47
  }, {
48
- default: r(() => [
48
+ default: s(() => [
49
49
  n(f, {
50
50
  icon: "ci:filter",
51
51
  class: "w-4 h-4"
52
52
  }),
53
- a("span", null, "Filters (" + w(d.value) + ")", 1),
54
- a("div", {
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
- })) : (i(), s(p, {
65
+ })) : (r(), a(p, {
66
66
  key: 1,
67
67
  variant: "outline",
68
- icon: "hugeicons:filter-add",
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: r(() => [
76
- a("div", $, [
77
- n(v(b), {
78
- schema: o.schema,
79
- values: o.modelValue,
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"])) : (i(), s(v(O), {
107
+ }, 8, ["show"])) : (r(), a(v(O), {
87
108
  key: 1,
88
- isOpen: t.value,
89
- "onUpdate:isOpen": e[3] || (e[3] = (u) => t.value = 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: r(() => [
95
- d.value > 0 ? (i(), s(p, {
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: r(() => [
122
+ default: s(() => [
102
123
  n(f, {
103
124
  icon: "ci:filter",
104
125
  class: "w-4 h-4"
105
126
  }),
106
- a("span", null, "Filters (" + w(d.value) + ")", 1),
107
- a("div", {
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
- })) : (i(), s(p, {
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: r(() => [
128
- a("div", S, [
129
- n(v(b), {
130
- schema: o.schema,
131
- values: o.modelValue,
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"])
@@ -17,6 +17,7 @@ export interface AddBtnConfig {
17
17
  buttonProps?: Record<string, any>;
18
18
  }
19
19
  export interface ScreenProps {
20
+ name?: string;
20
21
  title?: string;
21
22
  description?: string;
22
23
  pageInfo?: PageInfo;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "description": "A Vue 3 UI component library built with Tailwind CSS.",
5
5
  "license": "MIT",
6
- "version": "0.3.6",
6
+ "version": "0.3.7",
7
7
  "type": "module",
8
8
  "main": "index.js",
9
9
  "module": "index.js",
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
@@ -12,4 +12,8 @@ export interface ButtonProps {
12
12
  type?: 'button' | 'submit' | 'reset';
13
13
  text?: string;
14
14
  rounded?: ButtonRounded;
15
+ textClass?: string;
16
+ iconLeftClass?: string;
17
+ iconRightClass?: string;
18
+ asIcon?: boolean;
15
19
  }
@@ -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>;
@@ -0,0 +1,7 @@
1
+ import { useLocalStorage as r } from "@vueuse/core";
2
+ function i(t, e, o) {
3
+ return r(`builto-${t}`, e, o);
4
+ }
5
+ export {
6
+ i as usePersistentState
7
+ };