vuesp-components 5.4.0 → 6.0.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.
- package/CHANGELOG.md +20 -0
- package/README.md +14 -1
- package/dist/{VDialog.vue_vue_type_script_setup_true_lang-Bh-tnwGM.js → VDialog.vue_vue_type_script_setup_true_lang-Eo7yIqxr.js} +168 -165
- package/dist/components/dashboard/cards/CardDate.vue.d.ts +2 -0
- package/dist/components/dashboard/cards/CardDate.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.es.js +5256 -3345
- package/dist/components/modbus/ModbusConnectionCard.vue.d.ts +37 -0
- package/dist/components/modbus/ModbusConnectionCard.vue.d.ts.map +1 -0
- package/dist/components/modbus/ModbusDeleteDialog.vue.d.ts +10 -0
- package/dist/components/modbus/ModbusDeleteDialog.vue.d.ts.map +1 -0
- package/dist/components/modbus/ModbusDeviceDialog.vue.d.ts +16 -0
- package/dist/components/modbus/ModbusDeviceDialog.vue.d.ts.map +1 -0
- package/dist/components/modbus/ModbusDeviceList.vue.d.ts +12 -0
- package/dist/components/modbus/ModbusDeviceList.vue.d.ts.map +1 -0
- package/dist/components/modbus/ModbusMapDetails.vue.d.ts +12 -0
- package/dist/components/modbus/ModbusMapDetails.vue.d.ts.map +1 -0
- package/dist/components/modbus/ModbusMapTable.vue.d.ts +10 -0
- package/dist/components/modbus/ModbusMapTable.vue.d.ts.map +1 -0
- package/dist/components/modbus/ModbusPointDialog.vue.d.ts +28 -0
- package/dist/components/modbus/ModbusPointDialog.vue.d.ts.map +1 -0
- package/dist/components/modbus/ModbusPointList.vue.d.ts +16 -0
- package/dist/components/modbus/ModbusPointList.vue.d.ts.map +1 -0
- package/dist/components/modbus/ModbusProfileToolbar.vue.d.ts +16 -0
- package/dist/components/modbus/ModbusProfileToolbar.vue.d.ts.map +1 -0
- package/dist/components/modbus/ModbusSlaveDialog.vue.d.ts +22 -0
- package/dist/components/modbus/ModbusSlaveDialog.vue.d.ts.map +1 -0
- package/dist/components/modbus/ModbusSlaveValueList.vue.d.ts +12 -0
- package/dist/components/modbus/ModbusSlaveValueList.vue.d.ts.map +1 -0
- package/dist/components/modbus/ModbusVarDialog.vue.d.ts +18 -0
- package/dist/components/modbus/ModbusVarDialog.vue.d.ts.map +1 -0
- package/dist/components/modbus/ModbusVarList.vue.d.ts +12 -0
- package/dist/components/modbus/ModbusVarList.vue.d.ts.map +1 -0
- package/dist/components/modbus/index.d.ts +16 -0
- package/dist/components/modbus/index.d.ts.map +1 -0
- package/dist/components/modbus/modbusMapTypes.d.ts +31 -0
- package/dist/components/modbus/modbusMapTypes.d.ts.map +1 -0
- package/dist/components/modbus/types.d.ts +310 -0
- package/dist/components/modbus/types.d.ts.map +1 -0
- package/dist/components/script/ScriptDeleteDialog.vue.d.ts +10 -0
- package/dist/components/script/ScriptDeleteDialog.vue.d.ts.map +1 -0
- package/dist/components/script/ScriptDetailsDialog.vue.d.ts +8 -0
- package/dist/components/script/ScriptDetailsDialog.vue.d.ts.map +1 -0
- package/dist/components/script/ScriptDiscardDialog.vue.d.ts +11 -0
- package/dist/components/script/ScriptDiscardDialog.vue.d.ts.map +1 -0
- package/dist/components/script/ScriptRenameDialog.vue.d.ts +10 -0
- package/dist/components/script/ScriptRenameDialog.vue.d.ts.map +1 -0
- package/dist/components/script/ScriptStudioActionBar.vue.d.ts +10 -0
- package/dist/components/script/ScriptStudioActionBar.vue.d.ts.map +1 -0
- package/dist/components/script/ScriptStudioLogs.vue.d.ts +15 -0
- package/dist/components/script/ScriptStudioLogs.vue.d.ts.map +1 -0
- package/dist/components/script/ScriptStudioMetrics.vue.d.ts +19 -0
- package/dist/components/script/ScriptStudioMetrics.vue.d.ts.map +1 -0
- package/dist/components/script/ScriptStudioTabs.vue.d.ts +18 -0
- package/dist/components/script/ScriptStudioTabs.vue.d.ts.map +1 -0
- package/dist/components/script/ScriptStudioToolbar.vue.d.ts +35 -0
- package/dist/components/script/ScriptStudioToolbar.vue.d.ts.map +1 -0
- package/dist/components/script/editor/suggestions.d.ts +1 -1
- package/dist/components/script/editor/suggestions.d.ts.map +1 -1
- package/dist/components/script/helpers.d.ts +28 -0
- package/dist/components/script/helpers.d.ts.map +1 -0
- package/dist/components/script/index.d.ts +11 -5
- package/dist/components/script/index.d.ts.map +1 -1
- package/dist/components/script/types.d.ts +112 -3
- package/dist/components/script/types.d.ts.map +1 -1
- package/dist/components/serial/SerialConsole.vue.d.ts.map +1 -1
- package/dist/components/ui/select/VSelect.vue.d.ts.map +1 -1
- package/dist/components/ui/select/types.d.ts +1 -0
- package/dist/components/ui/select/types.d.ts.map +1 -1
- package/dist/components/ui/tabs/VTabs.vue.d.ts.map +1 -1
- package/dist/components/ui/text-field/types.d.ts +2 -0
- package/dist/components/ui/text-field/types.d.ts.map +1 -1
- package/dist/components/ui/text-field/useTextField.d.ts +2 -2
- package/dist/components/ui/text-field/useTextField.d.ts.map +1 -1
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/composables/index.es.js +101 -512
- package/dist/composables/useI18n.d.ts +3 -0
- package/dist/composables/useI18n.d.ts.map +1 -0
- package/dist/composables/useScriptStudioLogs.d.ts +30 -0
- package/dist/composables/useScriptStudioLogs.d.ts.map +1 -0
- package/dist/composables/useSerialConsole.d.ts +1 -1
- package/dist/helpers/index.d.ts +0 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.es.js +60 -77
- package/dist/index.es.js +1 -1
- package/dist/pages/kit/KitShowcase.vue.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/{useDialog-Buvn63AR.js → useDialog-XDF9alzt.js} +2 -2
- package/dist/useSerialConsole-DaedwQe_.js +564 -0
- package/package.json +1 -1
- package/dist/app-3Zj29UoC.js +0 -64
- package/dist/components/script/dialog/ScriptDialog.vue.d.ts +0 -10
- package/dist/components/script/dialog/ScriptDialog.vue.d.ts.map +0 -1
- package/dist/components/script/dialog/types.d.ts +0 -8
- package/dist/components/script/dialog/types.d.ts.map +0 -1
- package/dist/components/script/editor/ScriptEditor.vue.d.ts +0 -10
- package/dist/components/script/editor/ScriptEditor.vue.d.ts.map +0 -1
- package/dist/components/script/editor/format.d.ts +0 -3
- package/dist/components/script/editor/format.d.ts.map +0 -1
- package/dist/components/script/editor/highlighters/index.d.ts +0 -3
- package/dist/components/script/editor/highlighters/index.d.ts.map +0 -1
- package/dist/components/script/editor/plugins/autoSemicolon.d.ts +0 -3
- package/dist/components/script/editor/plugins/autoSemicolon.d.ts.map +0 -1
- package/dist/components/script/editor/plugins/autocomplete.d.ts +0 -4
- package/dist/components/script/editor/plugins/autocomplete.d.ts.map +0 -1
- package/dist/components/script/editor/plugins/index.d.ts +0 -3
- package/dist/components/script/editor/plugins/index.d.ts.map +0 -1
- package/dist/components/script/editor/plugins/render/index.d.ts +0 -7
- package/dist/components/script/editor/plugins/render/index.d.ts.map +0 -1
- package/dist/components/script/editor/plugins/types.d.ts +0 -24
- package/dist/components/script/editor/plugins/types.d.ts.map +0 -1
- package/dist/components/script/editor/types.d.ts +0 -10
- package/dist/components/script/editor/types.d.ts.map +0 -1
- package/dist/components/script/viewDocs/ScriptViewDocs.vue.d.ts +0 -13
- package/dist/components/script/viewDocs/ScriptViewDocs.vue.d.ts.map +0 -1
- package/dist/components/script/viewDocs/types.d.ts +0 -4
- package/dist/components/script/viewDocs/types.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { openBlock as s, createElementBlock as g, createStaticVNode as ie, createElementVNode as
|
|
2
|
-
import { u as J,
|
|
1
|
+
import { openBlock as s, createElementBlock as g, createStaticVNode as ie, createElementVNode as c, defineComponent as z, computed as d, normalizeClass as f, resolveComponent as ae, createBlock as B, resolveDynamicComponent as R, mergeProps as F, withCtx as L, renderSlot as x, createCommentVNode as q, shallowRef as P, Teleport as K, createVNode as H, Transition as I, unref as a, withModifiers as W, normalizeStyle as S, ref as $, withDirectives as se, Fragment as Z, renderList as G, createTextVNode as D, toDisplayString as V, useSlots as ne, onMounted as le, withKeys as de, createPropsRestProxy as ke, normalizeProps as me, guardReactiveProps as he } from "vue";
|
|
2
|
+
import { u as J, b as ce, a as Q, c as U, d as X } from "./useDialog-XDF9alzt.js";
|
|
3
3
|
const Y = (e, r) => {
|
|
4
4
|
const t = e.__vccOpts || e;
|
|
5
5
|
for (const [n, l] of r)
|
|
@@ -22,12 +22,12 @@ const Ze = /* @__PURE__ */ Y(ue, [["render", pe]]), ge = {}, be = {
|
|
|
22
22
|
};
|
|
23
23
|
function fe(e, r) {
|
|
24
24
|
return s(), g("svg", be, [...r[0] || (r[0] = [
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
c("g", { transform: "matrix(0.13287749,0,0,0.13643171,26.823508,13.407673)" }, [
|
|
26
|
+
c("path", { d: "m -19.25933,-16.057909 c 0,39.1906 -14.287,86.055995 -38.669,116.999999 -7.898,10.024 -30.4718,32.819 -43.7731,17.695 -9.4823,-10.781 -3.53183,-36.917714 -0.86893,-48.907714 9.1618,-41.251693 19.72123,-78.8733849 30.31103,-119.787285 -27.50968,14.537655 -68.26323,-24.154322 -70.36602,-2.214449 -12.32038,69.23655 -28.82323,204.245118 16.36602,215.925448 81.802,10.63 120.333,-82.698004 129.4249996,-148.710999 2.182,-15.84009991 4.123,-31.9832 2.401,-48 -2.342,-21.78506 -24.7959996,-32.68227 -43.7859996,-21.58643 -11.424,6.67523 -12.148,29.93713 -1.935,38.01393 5.462,4.3199 14.927,3.091 20.895,0.5725 z" })
|
|
27
27
|
], -1)
|
|
28
28
|
])]);
|
|
29
29
|
}
|
|
30
|
-
const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-ceiling", "light", "therm", "fan", "air-vent", "snow", "windy", "blaze", "sun", "moon", "shield", "alarm-smoke", "fingerprint", "camera", "video", "eye", "eye-off", "lock", "lock-open", "door", "gauge", "chart", "wifi", "solar-panel", "ev-charger", "bolt", "inverter", "plug", "socket", "shut", "battery", "faucet", "droplets", "washing-machine", "microwave", "tv", "speaker", "home", "plant", "map", "box", "store", "storage", "gpio", "ram", "card", "wallet", "shopping", "bot", "script", "code", "dashboard", "layout-grid", "list-check", "settings", "palette", "filter", "calendar", "clock", "timer", "refresh", "restart", "star", "rocket", "book-open", "play-circle", "stop-circle", "grip", "trend-up", "file", "file-list", "folder", "document", "save", "download", "upload", "edit", "copy", "trash", "eraser", "menu", "search", "add", "close", "check", "more", "info", "help", "noti", "external", "github", "logout", "user", "arrow-right", "arrow-up-right", "chevron-down"],
|
|
30
|
+
const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-ceiling", "light", "therm", "fan", "air-vent", "snow", "windy", "blaze", "sun", "moon", "shield", "alarm-smoke", "fingerprint", "camera", "video", "eye", "eye-off", "lock", "lock-open", "door", "gauge", "chart", "wifi", "solar-panel", "ev-charger", "bolt", "inverter", "plug", "socket", "shut", "battery", "faucet", "droplets", "washing-machine", "microwave", "tv", "speaker", "home", "plant", "map", "box", "store", "storage", "gpio", "ram", "card", "wallet", "shopping", "bot", "script", "code", "dashboard", "layout-grid", "list-check", "settings", "palette", "filter", "calendar", "clock", "timer", "refresh", "restart", "star", "rocket", "book-open", "play-circle", "stop-circle", "grip", "trend-up", "file", "file-list", "folder", "document", "save", "download", "upload", "edit", "copy", "trash", "eraser", "menu", "search", "add", "close", "check", "more", "info", "help", "noti", "external", "github", "logout", "user", "arrow-right", "arrow-up-right", "chevron-down"], N = {
|
|
31
31
|
bulb: { viewBox: "0.75 0.75 22.5 22.5", mode: "stroke", strokeWidth: 1.4, strokeLinecap: "square", strokeLinejoin: "miter", strokeMiterlimit: 2, body: '<path fill="none" stroke="currentColor" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1.4" d="M3 12h1m8-9v1m8 8h1M5.6 5.6l.7.7m12.1-.7l-.7.7M9 16a5 5 0 1 1 6 0a3.5 3.5 0 0 0-1 3a2 2 0 0 1-4 0a3.5 3.5 0 0 0-1-3m.7 1h4.6"/>' },
|
|
32
32
|
lamp: { viewBox: "0.75 0.75 22.5 22.5", mode: "stroke", strokeWidth: 1.4, strokeLinecap: "square", strokeLinejoin: "miter", strokeMiterlimit: 2, body: '<path fill="none" stroke="currentColor" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1.4" d="M9 20h6m-3 0v-8m-7 0h14l-4-8H9z"/>' },
|
|
33
33
|
"lamp-ceiling": { viewBox: "8 8 240 240", mode: "fill", body: '<path fill="currentColor" d="M176 74.78V72a16 16 0 0 0-16-16h-24V16a8 8 0 0 0-16 0v40H96a16 16 0 0 0-16 16v2.78A111.73 111.73 0 0 0 16 176a8 8 0 0 0 8 8h64a40 40 0 0 0 80 0h64a8 8 0 0 0 8-8a111.73 111.73 0 0 0-64-101.22M128 208a24 24 0 0 1-24-24h48a24 24 0 0 1-24 24m-95.67-40a95.79 95.79 0 0 1 58.75-80.65A8 8 0 0 0 96 80v-8h64v8a8 8 0 0 0 4.92 7.38A95.79 95.79 0 0 1 223.67 168Z"/>' },
|
|
@@ -126,7 +126,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
126
126
|
"arrow-right": { viewBox: "0.75 0.75 22.5 22.5", mode: "stroke", strokeWidth: 1.4, strokeLinecap: "square", strokeLinejoin: "miter", strokeMiterlimit: 2, body: '<path fill="none" stroke="currentColor" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1.4" d="M5 12h14m-6 6l6-6m-6-6l6 6"/>' },
|
|
127
127
|
"arrow-up-right": { viewBox: "0.75 0.75 22.5 22.5", mode: "stroke", strokeWidth: 1.4, strokeLinecap: "square", strokeLinejoin: "miter", strokeMiterlimit: 2, body: '<path fill="none" stroke="currentColor" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1.4" d="M17 7L7 17M8 7h9v9"/>' },
|
|
128
128
|
"chevron-down": { viewBox: "0.75 0.75 22.5 22.5", mode: "stroke", strokeWidth: 1.4, strokeLinecap: "square", strokeLinejoin: "miter", strokeMiterlimit: 2, body: '<path fill="none" stroke="currentColor" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1.4" d="m6 9l6 6l6-6"/>' }
|
|
129
|
-
}, ye = ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "innerHTML"],
|
|
129
|
+
}, ye = ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "innerHTML"], T = /* @__PURE__ */ z({
|
|
130
130
|
__name: "VIcon",
|
|
131
131
|
props: {
|
|
132
132
|
name: {},
|
|
@@ -134,7 +134,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
134
134
|
icons: { default: () => ({}) }
|
|
135
135
|
},
|
|
136
136
|
setup(e) {
|
|
137
|
-
const r =
|
|
137
|
+
const r = d(() => e.icons[e.name] ?? N[e.name] ?? e.icons.help ?? N.help), t = d(() => (r.value.mode ?? "fill") === "stroke");
|
|
138
138
|
return (n, l) => (s(), g("svg", {
|
|
139
139
|
width: e.size,
|
|
140
140
|
height: e.size,
|
|
@@ -150,7 +150,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
150
150
|
innerHTML: r.value.body
|
|
151
151
|
}, null, 8, ye));
|
|
152
152
|
}
|
|
153
|
-
}), we = /* @__PURE__ */
|
|
153
|
+
}), we = /* @__PURE__ */ z({
|
|
154
154
|
__name: "VLoader",
|
|
155
155
|
props: {
|
|
156
156
|
size: { default: "md" }
|
|
@@ -160,13 +160,13 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
160
160
|
sm: "h-4 w-4",
|
|
161
161
|
md: "h-6 w-6",
|
|
162
162
|
lg: "h-9 w-9"
|
|
163
|
-
}, t =
|
|
163
|
+
}, t = d(() => r[e.size]);
|
|
164
164
|
return (n, l) => (s(), g("svg", {
|
|
165
165
|
class: f(["animate-spin", t.value]),
|
|
166
166
|
fill: "none",
|
|
167
167
|
viewBox: "0 0 24 24"
|
|
168
168
|
}, [...l[0] || (l[0] = [
|
|
169
|
-
|
|
169
|
+
c("circle", {
|
|
170
170
|
class: "opacity-25",
|
|
171
171
|
cx: "12",
|
|
172
172
|
cy: "12",
|
|
@@ -174,14 +174,14 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
174
174
|
stroke: "currentColor",
|
|
175
175
|
"stroke-width": "2"
|
|
176
176
|
}, null, -1),
|
|
177
|
-
|
|
177
|
+
c("path", {
|
|
178
178
|
class: "opacity-75",
|
|
179
179
|
fill: "currentColor",
|
|
180
180
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
181
181
|
}, null, -1)
|
|
182
182
|
])], 2));
|
|
183
183
|
}
|
|
184
|
-
}), xe = "relative inline-flex justify-center items-center gap-2 transition not-disabled:cursor-pointer not-disabled:hover:opacity-90 disabled:pointer-events-none disabled:opacity-40 rounded-md font-medium", _ = /* @__PURE__ */
|
|
184
|
+
}), xe = "relative inline-flex justify-center items-center gap-2 transition not-disabled:cursor-pointer not-disabled:hover:opacity-90 disabled:pointer-events-none disabled:opacity-40 rounded-md font-medium", _ = /* @__PURE__ */ z({
|
|
185
185
|
__name: "VButton",
|
|
186
186
|
props: {
|
|
187
187
|
color: { default: "violet" },
|
|
@@ -198,9 +198,9 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
198
198
|
},
|
|
199
199
|
emits: ["click"],
|
|
200
200
|
setup(e, { emit: r }) {
|
|
201
|
-
const t = r, n = (
|
|
202
|
-
e.disabled || t("click",
|
|
203
|
-
}, l =
|
|
201
|
+
const t = r, n = (u) => {
|
|
202
|
+
e.disabled || t("click", u);
|
|
203
|
+
}, l = d(() => e.to ? ae("RouterLink") : null), o = d(() => e.to ? l.value : e.href ? "a" : "button"), i = d(() => e.type === "submit" || e.type === "reset" ? e.type : "button"), v = d(() => e.type === "icon"), k = {
|
|
204
204
|
cyan: {
|
|
205
205
|
solid: "bg-cyan-main text-night-dark-5 shadow-cyan-glow hover:brightness-110",
|
|
206
206
|
soft: "bg-cyan-main/10 text-cyan-main hover:bg-cyan-main/20",
|
|
@@ -278,25 +278,25 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
278
278
|
ghost: "bg-transparent text-gray-main hover:bg-white/10 hover:text-white",
|
|
279
279
|
muted: "border border-gray-main text-gray-main hover:border-white hover:bg-white/10 hover:text-white"
|
|
280
280
|
}
|
|
281
|
-
},
|
|
281
|
+
}, m = d(() => e.variant === "none" ? "" : (k[e.color] ?? k.violet)[e.variant]), b = {
|
|
282
282
|
none: "",
|
|
283
283
|
xs: "h-6 px-2 text-xs",
|
|
284
284
|
sm: "h-8 px-3 text-xs",
|
|
285
285
|
md: "h-10 px-3 text-sm",
|
|
286
286
|
lg: "h-12 px-4 text-sm",
|
|
287
287
|
xl: "h-14 px-5 text-sm"
|
|
288
|
-
},
|
|
288
|
+
}, j = {
|
|
289
289
|
none: "",
|
|
290
290
|
xs: "size-6",
|
|
291
291
|
sm: "size-8",
|
|
292
292
|
md: "size-10",
|
|
293
293
|
lg: "size-12",
|
|
294
294
|
xl: "size-14"
|
|
295
|
-
},
|
|
296
|
-
const
|
|
297
|
-
return
|
|
295
|
+
}, C = d(() => {
|
|
296
|
+
const u = [xe];
|
|
297
|
+
return v.value ? u.push("border border-gray-light-10/70 dark:border-white/10", j[e.size]) : u.push(m.value, b[e.size]), e.block && u.push("w-full"), e.disabled && u.push("pointer-events-none opacity-40"), u;
|
|
298
298
|
});
|
|
299
|
-
return (
|
|
299
|
+
return (u, h) => (s(), B(R(o.value), F(u.$attrs, {
|
|
300
300
|
href: e.href || void 0,
|
|
301
301
|
to: e.to || void 0,
|
|
302
302
|
target: e.target || void 0,
|
|
@@ -304,16 +304,16 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
304
304
|
disabled: o.value === "button" ? e.disabled : void 0,
|
|
305
305
|
"aria-disabled": e.disabled || void 0,
|
|
306
306
|
title: e.title || void 0,
|
|
307
|
-
class:
|
|
307
|
+
class: C.value,
|
|
308
308
|
onClick: n
|
|
309
309
|
}), {
|
|
310
310
|
default: L(() => [
|
|
311
|
-
|
|
311
|
+
c("span", {
|
|
312
312
|
class: f(e.loading ? "contents text-transparent [&>*]:opacity-0" : "contents")
|
|
313
313
|
}, [
|
|
314
|
-
x(
|
|
314
|
+
x(u.$slots, "default")
|
|
315
315
|
], 2),
|
|
316
|
-
e.loading ? (s(),
|
|
316
|
+
e.loading ? (s(), B(we, {
|
|
317
317
|
key: 0,
|
|
318
318
|
class: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
319
319
|
})) : q("", !0)
|
|
@@ -321,7 +321,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
321
321
|
_: 3
|
|
322
322
|
}, 16, ["href", "to", "target", "type", "disabled", "aria-disabled", "title", "class"]));
|
|
323
323
|
}
|
|
324
|
-
}), Me = ["role", "aria-modal", "aria-label"], Le = { class: "flex items-center absolute right-3 top-2 z-10" }, ee = /* @__PURE__ */
|
|
324
|
+
}), Me = ["role", "aria-modal", "aria-label"], Le = { class: "flex items-center absolute right-3 top-2 z-10" }, ee = /* @__PURE__ */ z({
|
|
325
325
|
__name: "VPopup",
|
|
326
326
|
props: {
|
|
327
327
|
hiddenCloser: { type: Boolean },
|
|
@@ -331,23 +331,23 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
331
331
|
},
|
|
332
332
|
emits: ["close", "click", "open"],
|
|
333
333
|
setup(e, { emit: r }) {
|
|
334
|
-
const t = r, { show: n, overlay: l, onClose: o, onOpen: i } = J(t),
|
|
335
|
-
Q(
|
|
336
|
-
const
|
|
334
|
+
const t = r, { show: n, overlay: l, onClose: o, onOpen: i } = J(t), v = P(null), k = P(null), { opacity: m, transform: b } = ce(v, k, o);
|
|
335
|
+
Q(k, () => n.value && e.trapFocus);
|
|
336
|
+
const u = { click: (y) => {
|
|
337
337
|
t("click", y);
|
|
338
338
|
}, open: i, set: (y) => {
|
|
339
339
|
y ? i() : o(new Event("hide"));
|
|
340
|
-
} },
|
|
340
|
+
} }, h = d(() => ({
|
|
341
341
|
auto: "max-h-[calc(100dvh-3rem)]",
|
|
342
342
|
full: "h-[calc(100dvh-1.5rem)] md:h-[calc(100dvh-6rem)]",
|
|
343
343
|
screen: "h-dvh"
|
|
344
|
-
})), p =
|
|
344
|
+
})), p = d(() => ({
|
|
345
345
|
auto: "max-h-[calc(100dvh-4rem)]",
|
|
346
346
|
full: "h-[calc(100dvh-2.5rem)] md:h-[calc(100dvh-7rem)]",
|
|
347
347
|
screen: "h-[calc(100dvh-1rem)]"
|
|
348
348
|
}));
|
|
349
|
-
return (y, M) => (s(),
|
|
350
|
-
|
|
349
|
+
return (y, M) => (s(), B(K, { to: "body" }, [
|
|
350
|
+
H(I, {
|
|
351
351
|
"enter-active-class": "duration-300 ease-out",
|
|
352
352
|
"enter-from-class": "transform opacity-0 translate-y-full xl:-translate-y-2",
|
|
353
353
|
"enter-to-class": "opacity-100 translate-y-0",
|
|
@@ -359,7 +359,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
359
359
|
a(n) ? (s(), g("div", {
|
|
360
360
|
key: 0,
|
|
361
361
|
ref_key: "container",
|
|
362
|
-
ref:
|
|
362
|
+
ref: k,
|
|
363
363
|
class: "fixed bottom-0 left-0 w-full z-15",
|
|
364
364
|
tabindex: "-1",
|
|
365
365
|
role: e.trapFocus ? "dialog" : void 0,
|
|
@@ -369,32 +369,32 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
369
369
|
a(l) ? (s(), g("div", {
|
|
370
370
|
key: 0,
|
|
371
371
|
class: "fixed h-full w-full top-0 left-0 bg-black/40 bg-blur xl:hidden animate-opacity overscroll-contain",
|
|
372
|
-
style:
|
|
372
|
+
style: S({ opacity: a(m) }),
|
|
373
373
|
onClick: M[0] || (M[0] = //@ts-ignore
|
|
374
374
|
(...O) => a(o) && a(o)(...O)),
|
|
375
|
-
onWheel: M[1] || (M[1] =
|
|
375
|
+
onWheel: M[1] || (M[1] = W(() => {
|
|
376
376
|
}, ["prevent"])),
|
|
377
|
-
onTouchmove: M[2] || (M[2] =
|
|
377
|
+
onTouchmove: M[2] || (M[2] = W(() => {
|
|
378
378
|
}, ["prevent"]))
|
|
379
379
|
}, null, 36)) : q("", !0),
|
|
380
|
-
|
|
381
|
-
class: f(["glass-popover relative w-full rounded-t-lg border-t shadow-nav",
|
|
382
|
-
style:
|
|
380
|
+
c("div", {
|
|
381
|
+
class: f(["glass-popover relative w-full rounded-t-lg border-t shadow-nav", h.value[e.size]]),
|
|
382
|
+
style: S({ transform: a(b) })
|
|
383
383
|
}, [
|
|
384
|
-
|
|
384
|
+
c("div", {
|
|
385
385
|
ref_key: "target",
|
|
386
|
-
ref:
|
|
386
|
+
ref: v,
|
|
387
387
|
class: "flex justify-center py-4 pb-6",
|
|
388
|
-
onWheel: M[3] || (M[3] =
|
|
388
|
+
onWheel: M[3] || (M[3] = W(() => {
|
|
389
389
|
}, ["prevent"])),
|
|
390
|
-
onTouchmove: M[4] || (M[4] =
|
|
390
|
+
onTouchmove: M[4] || (M[4] = W(() => {
|
|
391
391
|
}, ["prevent"]))
|
|
392
392
|
}, [...M[5] || (M[5] = [
|
|
393
|
-
|
|
393
|
+
c("div", { class: "self-end h-1 w-12 bg-gray-main" }, null, -1)
|
|
394
394
|
])], 544),
|
|
395
|
-
|
|
395
|
+
c("div", Le, [
|
|
396
396
|
x(y.$slots, "button", { close: a(o) }),
|
|
397
|
-
|
|
397
|
+
H(_, {
|
|
398
398
|
type: "icon",
|
|
399
399
|
size: "sm",
|
|
400
400
|
"aria-label": "Close",
|
|
@@ -402,7 +402,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
402
402
|
onClick: a(o)
|
|
403
403
|
}, {
|
|
404
404
|
default: L(() => [
|
|
405
|
-
|
|
405
|
+
H(T, {
|
|
406
406
|
name: "close",
|
|
407
407
|
size: 16
|
|
408
408
|
})
|
|
@@ -410,12 +410,12 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
410
410
|
_: 1
|
|
411
411
|
}, 8, ["onClick"])
|
|
412
412
|
]),
|
|
413
|
-
|
|
413
|
+
c("div", {
|
|
414
414
|
class: f(["overflow-y-auto max-h-[calc(100dvh-2.5rem)] overscroll-contain no-scrollbar", p.value[e.size]])
|
|
415
415
|
}, [
|
|
416
416
|
x(y.$slots, "default", {
|
|
417
417
|
close: a(o),
|
|
418
|
-
on:
|
|
418
|
+
on: u
|
|
419
419
|
})
|
|
420
420
|
], 2)
|
|
421
421
|
], 6)
|
|
@@ -434,7 +434,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
434
434
|
unmounted(e) {
|
|
435
435
|
document.removeEventListener("click", e.clickOutsideEvent), delete e.clickOutsideEvent;
|
|
436
436
|
}
|
|
437
|
-
}, je = { class: "relative" }, Ce = { class: "flex items-center cursor-pointer" }, Be = /* @__PURE__ */
|
|
437
|
+
}, je = { class: "relative" }, Ce = { class: "flex items-center cursor-pointer" }, Be = /* @__PURE__ */ z({
|
|
438
438
|
__name: "VDropdown",
|
|
439
439
|
props: {
|
|
440
440
|
title: { default: "" },
|
|
@@ -449,27 +449,27 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
449
449
|
},
|
|
450
450
|
emits: ["click", "show", "close"],
|
|
451
451
|
setup(e, { emit: r }) {
|
|
452
|
-
const t = r, l = U(X).greaterOrEqual("lg"), o = $(!1), i =
|
|
453
|
-
l.value && o.value && b(
|
|
454
|
-
},
|
|
455
|
-
t("click", o.value), !e.disabled && (o.value ? e.hideOnClick && b(
|
|
456
|
-
},
|
|
457
|
-
o.value = !0, t("show",
|
|
458
|
-
}, b = (
|
|
459
|
-
o.value = !1, t("close",
|
|
460
|
-
},
|
|
461
|
-
|
|
462
|
-
},
|
|
452
|
+
const t = r, l = U(X).greaterOrEqual("lg"), o = $(!1), i = d(() => ({ top: e.top, left: e.left, right: e.right, bottom: e.bottom, "max-height": e.height })), v = (h) => {
|
|
453
|
+
l.value && o.value && b(h);
|
|
454
|
+
}, k = (h) => {
|
|
455
|
+
t("click", o.value), !e.disabled && (o.value ? e.hideOnClick && b(h) : m(h));
|
|
456
|
+
}, m = (h) => {
|
|
457
|
+
o.value = !0, t("show", h);
|
|
458
|
+
}, b = (h) => {
|
|
459
|
+
o.value = !1, t("close", h);
|
|
460
|
+
}, j = (h) => {
|
|
461
|
+
h ? m(new Event("show")) : b(new Event("hide"));
|
|
462
|
+
}, C = () => {
|
|
463
463
|
b(new Event("hide"));
|
|
464
|
-
},
|
|
465
|
-
return (
|
|
466
|
-
|
|
467
|
-
x(
|
|
468
|
-
on:
|
|
464
|
+
}, u = { click: k, open: m, set: j };
|
|
465
|
+
return (h, p) => se((s(), g("div", je, [
|
|
466
|
+
c("div", Ce, [
|
|
467
|
+
x(h.$slots, "activator", {
|
|
468
|
+
on: u,
|
|
469
469
|
isShow: o.value
|
|
470
470
|
})
|
|
471
471
|
]),
|
|
472
|
-
a(l) ? (s(),
|
|
472
|
+
a(l) ? (s(), B(I, {
|
|
473
473
|
key: 0,
|
|
474
474
|
"enter-active-class": "duration-300 ease-out",
|
|
475
475
|
"enter-from-class": "transform opacity-0 -translate-y-2",
|
|
@@ -482,11 +482,11 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
482
482
|
o.value ? (s(), g("div", {
|
|
483
483
|
key: 0,
|
|
484
484
|
class: "z-30 min-w-full absolute",
|
|
485
|
-
style:
|
|
485
|
+
style: S(i.value)
|
|
486
486
|
}, [
|
|
487
|
-
x(
|
|
488
|
-
on:
|
|
489
|
-
show:
|
|
487
|
+
x(h.$slots, "default", {
|
|
488
|
+
on: u,
|
|
489
|
+
show: m,
|
|
490
490
|
hide: b,
|
|
491
491
|
isShow: o.value,
|
|
492
492
|
isLgOrLarger: a(l)
|
|
@@ -495,15 +495,15 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
495
495
|
]),
|
|
496
496
|
_: 3
|
|
497
497
|
})) : q("", !0),
|
|
498
|
-
!a(l) && o.value ? (s(),
|
|
498
|
+
!a(l) && o.value ? (s(), B(ee, {
|
|
499
499
|
key: 1,
|
|
500
500
|
title: e.title,
|
|
501
|
-
onClose:
|
|
501
|
+
onClose: C
|
|
502
502
|
}, {
|
|
503
503
|
default: L(({ on: y }) => [
|
|
504
|
-
x(
|
|
504
|
+
x(h.$slots, "default", {
|
|
505
505
|
on: y,
|
|
506
|
-
show:
|
|
506
|
+
show: m,
|
|
507
507
|
hide: b,
|
|
508
508
|
isShow: o.value,
|
|
509
509
|
isLgOrLarger: a(l)
|
|
@@ -512,10 +512,10 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
512
512
|
_: 3
|
|
513
513
|
}, 8, ["title"])) : q("", !0)
|
|
514
514
|
])), [
|
|
515
|
-
[a(qe),
|
|
515
|
+
[a(qe), v]
|
|
516
516
|
]);
|
|
517
517
|
}
|
|
518
|
-
}), ze = ["onClick"], We = /* @__PURE__ */
|
|
518
|
+
}), ze = ["onClick"], We = /* @__PURE__ */ z({
|
|
519
519
|
__name: "VList",
|
|
520
520
|
props: {
|
|
521
521
|
items: {},
|
|
@@ -530,7 +530,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
530
530
|
(s(!0), g(Z, null, G(e.items, (i) => (s(), g("li", {
|
|
531
531
|
key: i.name,
|
|
532
532
|
class: "flex min-h-10 w-full cursor-pointer items-center whitespace-nowrap border-b border-gray-light-30 px-4 last:border-b-0 hover:bg-cyan-main/10 dark:border-white/5 dark:hover:bg-white/[0.06]",
|
|
533
|
-
onClick: (
|
|
533
|
+
onClick: (v) => n(i, v)
|
|
534
534
|
}, [
|
|
535
535
|
x(l.$slots, "default", { item: i }, () => [
|
|
536
536
|
D(V(i.name), 1)
|
|
@@ -538,7 +538,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
538
538
|
], 8, ze))), 128))
|
|
539
539
|
], 2));
|
|
540
540
|
}
|
|
541
|
-
}), He = { class: "relative flex items-end gap-0.5 w-10" }, Ve = ["title"], $e = { class: "absolute -top-1 -left-1 text-xs text-gray-dark-25 dark:text-gray-light-10" }, Qe = /* @__PURE__ */
|
|
541
|
+
}), He = { class: "relative flex items-end gap-0.5 w-10" }, Ve = ["title"], $e = { class: "absolute -top-1 -left-1 text-xs text-gray-dark-25 dark:text-gray-light-10" }, Qe = /* @__PURE__ */ z({
|
|
542
542
|
__name: "VWifiIcon",
|
|
543
543
|
props: {
|
|
544
544
|
rssi: { default: 0 },
|
|
@@ -547,29 +547,30 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
547
547
|
setup(e) {
|
|
548
548
|
const r = 2 * (e.rssi + 100), t = (n) => n < r;
|
|
549
549
|
return (n, l) => (s(), g("div", He, [
|
|
550
|
-
(s(), g(Z, null, G([10, 15, 25, 40, 70], (o, i) =>
|
|
550
|
+
(s(), g(Z, null, G([10, 15, 25, 40, 70], (o, i) => c("div", {
|
|
551
551
|
key: o,
|
|
552
552
|
class: f(["w-1 h-5 rounded-lg", [t(o) ? "bg-gray-dark-40 dark:bg-gray-light-30" : "bg-gray-light-10 dark:bg-gray-dark-30"]]),
|
|
553
|
-
style:
|
|
553
|
+
style: S(`height: ${(i + 1) * 5}px`),
|
|
554
554
|
title: `rssi: ${e.rssi} channel: ${e.channel}`
|
|
555
555
|
}, null, 14, Ve)), 64)),
|
|
556
|
-
|
|
556
|
+
c("div", $e, V(e.channel), 1)
|
|
557
557
|
]));
|
|
558
558
|
}
|
|
559
559
|
}), Ae = (e, r = "field", t) => {
|
|
560
|
-
const n = $(!1), l =
|
|
560
|
+
const n = $(!1), l = d(() => e.modelValue !== null && e.modelValue !== void 0 && e.modelValue !== ""), o = d(
|
|
561
561
|
() => r === "wrapper" ? !!e.active : n.value || l.value || !!e.active || !!(t != null && t.value)
|
|
562
|
-
), i =
|
|
563
|
-
const
|
|
564
|
-
return o.value ? `${
|
|
565
|
-
}),
|
|
566
|
-
return { isFocus: n, isFloating: o, labelClass:
|
|
567
|
-
},
|
|
562
|
+
), i = d(() => e.size === "sm"), v = d(() => {
|
|
563
|
+
const j = i.value ? "left-10" : "left-11", C = i.value ? "left-3" : "left-3.5", u = e.icon && r === "field" ? j : C;
|
|
564
|
+
return o.value ? `${u} top-0 bg-white/80 px-1 text-xs text-gray-dark-25 dark:bg-night-light-10/80 dark:text-gray-main` : `${u} top-1/2 bg-transparent px-0 text-gray-main`;
|
|
565
|
+
}), k = d(() => e.disabled ? "border-gray-light-10 opacity-40 dark:border-gray-dark-30" : e.error ? "!border-red-400/70 ring-1 ring-red-400/25 hover:!border-red-400" : "border-gray-light-10/80 hover:border-gray-main/80 dark:border-white/10 dark:hover:border-white/20"), m = d(() => r === "wrapper" ? "flex flex-auto flex-wrap gap-2 px-2 py-1" : e.component === "textarea" ? "h-full w-full flex-auto px-4 py-2 outline-none bg-transparent" : `w-full h-full flex-auto overflow-ellipsis overflow-hidden ${i.value ? "px-3" : "px-4"} outline-none bg-transparent placeholder:text-gray-main`), b = d(() => r === "wrapper" || e.component === "textarea" ? "min-h-10" : i.value ? "h-8" : "h-10");
|
|
566
|
+
return { isFocus: n, isFloating: o, labelClass: v, borderClass: k, contentClass: m, slotClass: b };
|
|
567
|
+
}, Se = {
|
|
568
568
|
class: "w-full relative",
|
|
569
569
|
"data-v-text-field": ""
|
|
570
|
-
},
|
|
570
|
+
}, Te = ["disabled"], Oe = /* @__PURE__ */ z({
|
|
571
571
|
__name: "VTextField",
|
|
572
572
|
props: {
|
|
573
|
+
size: {},
|
|
573
574
|
id: {},
|
|
574
575
|
name: {},
|
|
575
576
|
modelValue: {},
|
|
@@ -587,63 +588,63 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
587
588
|
},
|
|
588
589
|
emits: ["update:modelValue", "click", "on-icon", "enter", "blur", "focus"],
|
|
589
590
|
setup(e, { emit: r }) {
|
|
590
|
-
const t = e, n = r, l = ne(), o =
|
|
591
|
-
const w =
|
|
591
|
+
const t = e, n = r, l = ne(), o = d(() => (t.component ?? "input") === "input"), i = d(() => t.error || t.message || ""), v = $(null), k = $(!1), m = () => {
|
|
592
|
+
const w = v.value;
|
|
592
593
|
if (w) {
|
|
593
594
|
try {
|
|
594
|
-
w.matches(":-webkit-autofill") && (
|
|
595
|
+
w.matches(":-webkit-autofill") && (k.value = !0);
|
|
595
596
|
} catch {
|
|
596
597
|
}
|
|
597
598
|
try {
|
|
598
|
-
w.matches(":autofill") && (
|
|
599
|
+
w.matches(":autofill") && (k.value = !0);
|
|
599
600
|
} catch {
|
|
600
601
|
}
|
|
601
602
|
}
|
|
602
603
|
};
|
|
603
604
|
le(() => {
|
|
604
|
-
|
|
605
|
+
m(), setTimeout(m, 50), setTimeout(m, 300), setTimeout(m, 1e3);
|
|
605
606
|
});
|
|
606
|
-
const { isFocus: b, isFloating:
|
|
607
|
+
const { isFocus: b, isFloating: j, labelClass: C, borderClass: u, contentClass: h, slotClass: p } = Ae(t, "field", k), y = d(() => !!l.icon), M = d(() => !t.hideMessage), O = (w) => {
|
|
607
608
|
b.value = !1, n("blur", w);
|
|
608
609
|
}, te = (w) => {
|
|
609
610
|
b.value = !0, n("focus", w);
|
|
610
611
|
}, oe = ({ target: w }) => {
|
|
611
|
-
|
|
612
|
+
k.value = !1, n("update:modelValue", w.value);
|
|
612
613
|
}, re = (w) => {
|
|
613
614
|
t.disabled || n("on-icon", w);
|
|
614
615
|
};
|
|
615
|
-
return (w, A) => (s(), g("div",
|
|
616
|
-
|
|
617
|
-
class: f(["glass-inset relative flex w-full items-center rounded-md transition focus-within:border-cyan-main/60 focus-within:ring-1 focus-within:ring-cyan-main/20", [a(p), a(
|
|
616
|
+
return (w, A) => (s(), g("div", Se, [
|
|
617
|
+
c("label", {
|
|
618
|
+
class: f(["glass-inset relative flex w-full items-center rounded-md transition focus-within:border-cyan-main/60 focus-within:ring-1 focus-within:ring-cyan-main/20", [a(p), a(u)]])
|
|
618
619
|
}, [
|
|
619
|
-
t.icon ? (s(),
|
|
620
|
+
t.icon ? (s(), B(T, {
|
|
620
621
|
key: 0,
|
|
621
622
|
name: t.icon,
|
|
622
623
|
size: 18,
|
|
623
624
|
class: "ml-3.5 shrink-0 text-gray-main"
|
|
624
625
|
}, null, 8, ["name"])) : q("", !0),
|
|
625
|
-
|
|
626
|
-
class: f(["absolute -translate-y-1/2 rounded transition-all", a(
|
|
626
|
+
c("span", {
|
|
627
|
+
class: f(["absolute -translate-y-1/2 rounded transition-all", a(C)])
|
|
627
628
|
}, V(t.label), 3),
|
|
628
|
-
(s(),
|
|
629
|
+
(s(), B(R(t.component ?? "input"), F({
|
|
629
630
|
ref_key: "inputRef",
|
|
630
|
-
ref:
|
|
631
|
+
ref: v
|
|
631
632
|
}, w.$attrs, {
|
|
632
633
|
id: t.id,
|
|
633
634
|
name: t.name,
|
|
634
635
|
value: t.modelValue,
|
|
635
|
-
placeholder: a(
|
|
636
|
+
placeholder: a(j) ? t.placeholder : "",
|
|
636
637
|
disabled: !!t.disabled,
|
|
637
638
|
type: t.type ?? "text",
|
|
638
639
|
readonly: t.readonly,
|
|
639
640
|
rows: o.value ? null : "2",
|
|
640
641
|
wrap: o.value ? null : "soft",
|
|
641
|
-
class: a(
|
|
642
|
+
class: a(h),
|
|
642
643
|
"aria-invalid": i.value ? !0 : void 0,
|
|
643
644
|
onFocus: te,
|
|
644
645
|
onBlur: O,
|
|
645
646
|
onInput: oe,
|
|
646
|
-
onAnimationstart:
|
|
647
|
+
onAnimationstart: m,
|
|
647
648
|
onClick: A[0] || (A[0] = (E) => n("click", E)),
|
|
648
649
|
onKeypress: A[1] || (A[1] = de((E) => n("enter", E), ["enter"]))
|
|
649
650
|
}), null, 16, ["id", "name", "value", "placeholder", "disabled", "type", "readonly", "rows", "wrap", "class", "aria-invalid"])),
|
|
@@ -651,11 +652,11 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
651
652
|
key: 1,
|
|
652
653
|
type: "button",
|
|
653
654
|
disabled: !!t.disabled,
|
|
654
|
-
class: f(["flex h-full
|
|
655
|
+
class: f(["flex h-full items-center justify-center rounded-r-md border-l border-gray-light-10/70 text-gray-main transition hover:text-cyan-main disabled:pointer-events-none disabled:opacity-40 dark:border-white/10", [t.size === "sm" ? "flex-[0_0_40px]" : "flex-[0_0_50px]", { "cursor-pointer": !t.disabled }]]),
|
|
655
656
|
onClick: re
|
|
656
657
|
}, [
|
|
657
658
|
x(w.$slots, "icon")
|
|
658
|
-
], 10,
|
|
659
|
+
], 10, Te)) : q("", !0)
|
|
659
660
|
], 2),
|
|
660
661
|
M.value ? (s(), g("div", {
|
|
661
662
|
key: 0,
|
|
@@ -670,10 +671,11 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
670
671
|
}), Ee = { class: "min-w-50 w-full rounded-md pb-6 transition-all duration-300 lg:pb-0" }, Fe = {
|
|
671
672
|
key: 0,
|
|
672
673
|
class: "lg:hidden text-title-md font-bold mb-4 uppercase px-4 sticky top-0"
|
|
673
|
-
}, Ue = /* @__PURE__ */
|
|
674
|
+
}, Ue = /* @__PURE__ */ z({
|
|
674
675
|
inheritAttrs: !1,
|
|
675
676
|
__name: "VSelect",
|
|
676
677
|
props: {
|
|
678
|
+
size: {},
|
|
677
679
|
modelValue: {},
|
|
678
680
|
label: {},
|
|
679
681
|
disabled: { type: Boolean },
|
|
@@ -690,49 +692,50 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
690
692
|
},
|
|
691
693
|
emits: ["change"],
|
|
692
694
|
setup(e, { emit: r }) {
|
|
693
|
-
const t = ke(e, ["modelValue", "label", "items", "hideMessage", "disabled"]), n = r;
|
|
695
|
+
const t = ke(e, ["modelValue", "label", "items", "hideMessage", "disabled", "size"]), n = r;
|
|
694
696
|
function l(o, i) {
|
|
695
697
|
n("change", o), i == null || i.set(!1);
|
|
696
698
|
}
|
|
697
|
-
return (o, i) => (s(),
|
|
698
|
-
top: t.top || e.hideMessage ? "calc(100% + 8px)" : "calc(100% - 16px)",
|
|
699
|
+
return (o, i) => (s(), B(Be, F(t, {
|
|
700
|
+
top: t.top || (e.hideMessage ? "calc(100% + 8px)" : e.size === "sm" ? "calc(100% - 8px)" : "calc(100% - 16px)"),
|
|
699
701
|
"hide-on-click": !1,
|
|
700
702
|
class: "relative"
|
|
701
703
|
}), {
|
|
702
|
-
activator: L(({ on:
|
|
703
|
-
x(o.$slots, "activator", me(he({ on:
|
|
704
|
-
|
|
704
|
+
activator: L(({ on: v, isShow: k }) => [
|
|
705
|
+
x(o.$slots, "activator", me(he({ on: v, isShow: k })), () => [
|
|
706
|
+
H(Oe, {
|
|
705
707
|
"model-value": e.modelValue,
|
|
708
|
+
size: e.size,
|
|
706
709
|
disabled: e.disabled,
|
|
707
710
|
label: e.label,
|
|
708
711
|
readonly: "",
|
|
709
712
|
hideMessage: e.hideMessage,
|
|
710
713
|
active: "",
|
|
711
|
-
onClick:
|
|
712
|
-
onOnIcon:
|
|
714
|
+
onClick: v.click,
|
|
715
|
+
onOnIcon: v.click
|
|
713
716
|
}, {
|
|
714
717
|
icon: L(() => [
|
|
715
|
-
|
|
718
|
+
H(T, {
|
|
716
719
|
name: "chevron-down",
|
|
717
|
-
class: f(["size-5 transition duration-300",
|
|
720
|
+
class: f(["size-5 transition duration-300", k ? "rotate-180" : ""])
|
|
718
721
|
}, null, 8, ["class"])
|
|
719
722
|
]),
|
|
720
723
|
_: 2
|
|
721
|
-
}, 1032, ["model-value", "disabled", "label", "hideMessage", "onClick", "onOnIcon"])
|
|
724
|
+
}, 1032, ["model-value", "size", "disabled", "label", "hideMessage", "onClick", "onOnIcon"])
|
|
722
725
|
])
|
|
723
726
|
]),
|
|
724
|
-
default: L(({ on:
|
|
725
|
-
|
|
727
|
+
default: L(({ on: v, isLgOrLarger: k }) => [
|
|
728
|
+
c("div", Ee, [
|
|
726
729
|
e.label ? (s(), g("h4", Fe, V(e.label), 1)) : q("", !0),
|
|
727
|
-
|
|
730
|
+
H(We, {
|
|
728
731
|
items: e.items,
|
|
729
|
-
plain: !
|
|
730
|
-
class: f(["lg:max-h-50 lg:overflow-y-auto lg:overscroll-contain", { scrollbar:
|
|
731
|
-
onClick: (
|
|
732
|
+
plain: !k,
|
|
733
|
+
class: f(["lg:max-h-50 lg:overflow-y-auto lg:overscroll-contain", { scrollbar: k }]),
|
|
734
|
+
onClick: (m) => l(m, v)
|
|
732
735
|
}, {
|
|
733
|
-
default: L(({ item:
|
|
734
|
-
x(o.$slots, "item", { item:
|
|
735
|
-
D(V(
|
|
736
|
+
default: L(({ item: m }) => [
|
|
737
|
+
x(o.$slots, "item", { item: m }, () => [
|
|
738
|
+
D(V(m.name), 1)
|
|
736
739
|
])
|
|
737
740
|
]),
|
|
738
741
|
_: 3
|
|
@@ -742,10 +745,10 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
742
745
|
_: 3
|
|
743
746
|
}, 16, ["top"]));
|
|
744
747
|
}
|
|
745
|
-
}), Ie = ["aria-label"], De = { class: "text-title-md uppercase font-bold flex-auto" },
|
|
748
|
+
}), Ie = ["aria-label"], De = { class: "text-title-md uppercase font-bold flex-auto" }, Pe = { class: "px-4 pb-4 md:px-6" }, Ne = {
|
|
746
749
|
key: 0,
|
|
747
750
|
class: "text-title-md uppercase font-bold"
|
|
748
|
-
}, Xe = /* @__PURE__ */
|
|
751
|
+
}, Xe = /* @__PURE__ */ z({
|
|
749
752
|
__name: "VDialog",
|
|
750
753
|
props: {
|
|
751
754
|
title: {},
|
|
@@ -759,7 +762,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
759
762
|
},
|
|
760
763
|
emits: ["close", "click", "open"],
|
|
761
764
|
setup(e, { expose: r, emit: t }) {
|
|
762
|
-
const n = t, l = U(X), { show: o, onClose: i, onOpen:
|
|
765
|
+
const n = t, l = U(X), { show: o, onClose: i, onOpen: v } = J(n, e.timeout), k = $(null), m = {
|
|
763
766
|
sm: "max-w-full md:max-w-80 max-md:h-full",
|
|
764
767
|
md: "max-w-full md:max-w-2xl max-md:h-full",
|
|
765
768
|
lg: "max-w-full md:max-w-5xl max-md:h-full",
|
|
@@ -768,57 +771,57 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
768
771
|
none: "",
|
|
769
772
|
white: "glass-inset rounded-xl",
|
|
770
773
|
gray: ""
|
|
771
|
-
},
|
|
772
|
-
return Q(
|
|
774
|
+
}, j = d(() => [m[e.size], b[e.color]]), C = l.greaterOrEqual("lg"), u = d(() => o.value && (!!e.isOnlyDialog || C.value));
|
|
775
|
+
return Q(k, u), r({
|
|
773
776
|
show: o,
|
|
774
777
|
onClose: i
|
|
775
|
-
}), (
|
|
778
|
+
}), (h, p) => e.isOnlyDialog || a(C) ? (s(), B(K, {
|
|
776
779
|
key: 0,
|
|
777
780
|
to: "body"
|
|
778
781
|
}, [
|
|
779
|
-
|
|
782
|
+
H(I, {
|
|
780
783
|
"enter-active-class": "duration-300 ease-out",
|
|
781
784
|
"enter-from-class": "transform opacity-0 -translate-y-2",
|
|
782
785
|
"enter-to-class": "opacity-100 translate-y-0",
|
|
783
786
|
"leave-active-class": "duration-200 ease-in",
|
|
784
787
|
"leave-from-class": "opacity-100 translate-y-0",
|
|
785
788
|
"leave-to-class": "transform opacity-0 -translate-y-2",
|
|
786
|
-
onAfterEnter: a(
|
|
789
|
+
onAfterEnter: a(v)
|
|
787
790
|
}, {
|
|
788
791
|
default: L(() => [
|
|
789
792
|
a(o) ? (s(), g("div", {
|
|
790
793
|
key: 0,
|
|
791
794
|
ref_key: "dialogRef",
|
|
792
|
-
ref:
|
|
795
|
+
ref: k,
|
|
793
796
|
class: "z-20 fixed top-0 h-dvh w-full left-0 flex flex-col",
|
|
794
797
|
tabindex: "-1",
|
|
795
798
|
role: "dialog",
|
|
796
799
|
"aria-modal": "true",
|
|
797
800
|
"aria-label": e.title || void 0,
|
|
798
|
-
onWheel: p[4] || (p[4] =
|
|
801
|
+
onWheel: p[4] || (p[4] = W(() => {
|
|
799
802
|
}, ["stop"]))
|
|
800
803
|
}, [
|
|
801
|
-
|
|
804
|
+
c("div", {
|
|
802
805
|
class: "absolute h-full w-full top-0 left-0 bg-black/40 bg-blur",
|
|
803
806
|
onClick: p[0] || (p[0] = //@ts-ignore
|
|
804
807
|
(...y) => a(i) && a(i)(...y))
|
|
805
808
|
}),
|
|
806
|
-
|
|
809
|
+
c("div", {
|
|
807
810
|
class: f(["flex-auto flex align-center overflow-y-auto overscroll-contain", (e.size === "full", "")])
|
|
808
811
|
}, [
|
|
809
|
-
|
|
810
|
-
class: f(["m-auto z-20 flex w-full flex-col overflow-auto overscroll-contain scrollbar bg-transparent shadow-lg",
|
|
812
|
+
c("div", {
|
|
813
|
+
class: f(["m-auto z-20 flex w-full flex-col overflow-auto overscroll-contain scrollbar bg-transparent shadow-lg", j.value])
|
|
811
814
|
}, [
|
|
812
|
-
|
|
815
|
+
c("div", {
|
|
813
816
|
class: f(["flex gap-2 items-center min-h-14 border-b border-gray-light-10/70 bg-white/35 px-6 dark:border-white/10 dark:bg-white/[0.03]", e.size === "full" ? "absolute top-0 right-4 border-0 bg-transparent px-0" : ""]),
|
|
814
|
-
onWheel: p[1] || (p[1] =
|
|
817
|
+
onWheel: p[1] || (p[1] = W(() => {
|
|
815
818
|
}, ["prevent"])),
|
|
816
|
-
onTouchmove: p[2] || (p[2] =
|
|
819
|
+
onTouchmove: p[2] || (p[2] = W(() => {
|
|
817
820
|
}, ["prevent"]))
|
|
818
821
|
}, [
|
|
819
|
-
|
|
820
|
-
x(
|
|
821
|
-
|
|
822
|
+
c("h4", De, V(e.title), 1),
|
|
823
|
+
x(h.$slots, "header-btn", { close: a(i) }),
|
|
824
|
+
H(_, {
|
|
822
825
|
type: "icon",
|
|
823
826
|
size: "sm",
|
|
824
827
|
"aria-label": "Close",
|
|
@@ -826,7 +829,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
826
829
|
onClick: a(i)
|
|
827
830
|
}, {
|
|
828
831
|
default: L(() => [
|
|
829
|
-
|
|
832
|
+
H(T, {
|
|
830
833
|
name: "close",
|
|
831
834
|
size: 18
|
|
832
835
|
})
|
|
@@ -834,12 +837,12 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
834
837
|
_: 1
|
|
835
838
|
}, 8, ["onClick"])
|
|
836
839
|
], 34),
|
|
837
|
-
|
|
840
|
+
c("div", {
|
|
838
841
|
class: f(["relative overflow-auto max-h-dvh scrollbar overflow-y-auto overscroll-contain min-h-0 max-md:flex-auto", e.size === "full" ? "flex-auto" : "md:max-h-147.5 px-6 pb-6 pt-5"]),
|
|
839
842
|
onClose: p[3] || (p[3] = //@ts-ignore
|
|
840
843
|
(...y) => a(i) && a(i)(...y))
|
|
841
844
|
}, [
|
|
842
|
-
x(
|
|
845
|
+
x(h.$slots, "default", { close: a(i) })
|
|
843
846
|
], 34)
|
|
844
847
|
], 2)
|
|
845
848
|
], 2)
|
|
@@ -847,7 +850,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
847
850
|
]),
|
|
848
851
|
_: 3
|
|
849
852
|
}, 8, ["onAfterEnter"])
|
|
850
|
-
])) : (s(),
|
|
853
|
+
])) : (s(), B(ee, {
|
|
851
854
|
key: 1,
|
|
852
855
|
size: e.popupSize,
|
|
853
856
|
"trap-focus": "",
|
|
@@ -855,20 +858,20 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
855
858
|
onClose: a(i)
|
|
856
859
|
}, {
|
|
857
860
|
button: L(() => [
|
|
858
|
-
x(
|
|
861
|
+
x(h.$slots, "header-btn", { close: a(i) })
|
|
859
862
|
]),
|
|
860
863
|
default: L(({ close: y }) => [
|
|
861
|
-
|
|
862
|
-
|
|
864
|
+
c("div", Pe, [
|
|
865
|
+
c("div", {
|
|
863
866
|
class: f(["flex items-center mb-4", e.size === "full" ? "absolute top-0 right-4" : ""]),
|
|
864
|
-
onWheel: p[5] || (p[5] =
|
|
867
|
+
onWheel: p[5] || (p[5] = W(() => {
|
|
865
868
|
}, ["prevent"])),
|
|
866
|
-
onTouchmove: p[6] || (p[6] =
|
|
869
|
+
onTouchmove: p[6] || (p[6] = W(() => {
|
|
867
870
|
}, ["prevent"]))
|
|
868
871
|
}, [
|
|
869
|
-
e.title ? (s(), g("h4",
|
|
872
|
+
e.title ? (s(), g("h4", Ne, V(e.title), 1)) : q("", !0)
|
|
870
873
|
], 34),
|
|
871
|
-
x(
|
|
874
|
+
x(h.$slots, "default", { close: y })
|
|
872
875
|
])
|
|
873
876
|
]),
|
|
874
877
|
_: 3
|
|
@@ -876,7 +879,7 @@ const Ge = /* @__PURE__ */ Y(ge, [["render", fe]]), Je = ["bulb", "lamp", "lamp-
|
|
|
876
879
|
}
|
|
877
880
|
});
|
|
878
881
|
export {
|
|
879
|
-
|
|
882
|
+
N as I,
|
|
880
883
|
Ze as V,
|
|
881
884
|
Xe as _,
|
|
882
885
|
Ge as a,
|
|
@@ -888,7 +891,7 @@ export {
|
|
|
888
891
|
Be as g,
|
|
889
892
|
we as h,
|
|
890
893
|
_ as i,
|
|
891
|
-
|
|
894
|
+
T as j,
|
|
892
895
|
Y as k,
|
|
893
896
|
Je as l,
|
|
894
897
|
ee as m,
|