@stachelock/ui 0.6.15 → 0.6.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/dist/NavigationItem.vue_vue_type_script_setup_true_lang-a6F3LQ_P.js +56 -0
- package/dist/ScreenSizeSelector.vue_vue_type_script_setup_true_lang-FINxrVod.js +183 -0
- package/dist/UiMapAll.vue_vue_type_script_setup_true_lang-DKcK0HmT.js +501 -0
- package/dist/charts/BaseChart.js +76 -56
- package/dist/charts/chartTheme.js +199 -60
- package/dist/charts/index.js +30 -27
- package/dist/components/Button.js +109 -89
- package/dist/composables/index.js +41 -32
- package/dist/composables/useMap.js +1 -1
- package/dist/index.js +2304 -1560
- package/dist/layouts/DashboardLayout.js +218 -2
- package/dist/layouts/NavigationItem.js +1 -1
- package/dist/maps/UiMap.js +167 -150
- package/dist/maps/UiMapAll.js +1 -1
- package/dist/maps/UiMapMarker.js +227 -118
- package/dist/maps/index.js +1 -1
- package/dist/src/components/UiProgressBar.d.ts +1 -1
- package/dist/src/components/UiRadialProgressBar.d.ts +1 -1
- package/dist/src/components/charts/chartTheme.d.ts +53 -0
- package/dist/src/components/formatters/DateFormatter.d.ts +1 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/inputs/DatepickerInput.d.ts +3 -3
- package/dist/src/components/layouts/DashboardLayout.d.ts +80 -18
- package/dist/src/components/layouts/ShowcaseCard.d.ts +1 -0
- package/dist/src/components/layouts/UiDetailPanel.d.ts +65 -0
- package/dist/src/components/layouts/UiSplitPanelLayout.d.ts +96 -0
- package/dist/src/components/layouts/index.d.ts +2 -0
- package/dist/src/components/maps/UiMap.d.ts +13 -2
- package/dist/src/components/maps/UiMapAll.d.ts +13 -0
- package/dist/src/components/maps/UiMapMarker.d.ts +47 -10
- package/dist/src/components/modals/UiSlideOver.d.ts +104 -0
- package/dist/src/components/modals/index.d.ts +1 -0
- package/dist/src/components/palettes/UiCommandPalette.d.ts +166 -0
- package/dist/src/components/palettes/index.d.ts +1 -0
- package/dist/src/components/wrappers/BreakpointWrapper.d.ts +36 -0
- package/dist/src/components/wrappers/ResponsivePreviewWrapper.d.ts +85 -0
- package/dist/src/components/wrappers/ScreenSizeSelector.d.ts +74 -0
- package/dist/src/components/wrappers/index.d.ts +3 -0
- package/dist/src/composables/index.d.ts +1 -0
- package/dist/src/composables/useScreenSize.d.ts +131 -0
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/types/layouts.d.ts +42 -0
- package/dist/src/types/palettes.d.ts +134 -0
- package/dist/src/views/components/index.d.ts +2 -0
- package/dist/src/views/index.d.ts +5 -1
- package/dist/src/views/layouts/index.d.ts +3 -1
- package/dist/style.css +1 -1
- package/dist/useMap-CM59TKX6.js +318 -0
- package/dist/useScreenSize-Kr6cn5Zr.js +104 -0
- package/dist/wrappers/index.js +10 -6
- package/package.json +1 -1
- package/dist/DashboardLayout.vue_vue_type_script_setup_true_lang-BAx4gKqh.js +0 -239
- package/dist/NavigationItem.vue_vue_type_script_setup_true_lang-C8aX-84Q.js +0 -56
- package/dist/UiMapAll.vue_vue_type_script_setup_true_lang-11yT7mTH.js +0 -471
- package/dist/useMap-BGg0H582.js +0 -297
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineComponent as d, computed as f, createElementBlock as s, openBlock as t, createElementVNode as g, normalizeStyle as a, normalizeClass as i, createBlock as h, createCommentVNode as o, resolveDynamicComponent as y, toDisplayString as c } from "vue";
|
|
2
|
+
const u = ["href"], v = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "sl-truncate"
|
|
5
|
+
}, b = /* @__PURE__ */ d({
|
|
6
|
+
__name: "NavigationItem",
|
|
7
|
+
props: {
|
|
8
|
+
name: {},
|
|
9
|
+
href: {},
|
|
10
|
+
icon: {},
|
|
11
|
+
isActive: { type: Boolean },
|
|
12
|
+
iconOnly: { type: Boolean },
|
|
13
|
+
badge: {},
|
|
14
|
+
badgeTheme: {}
|
|
15
|
+
},
|
|
16
|
+
setup(e) {
|
|
17
|
+
const r = e, m = f(() => {
|
|
18
|
+
const n = r.badgeTheme || "primary", l = {
|
|
19
|
+
primary: "sl-bg-white/20 sl-text-white",
|
|
20
|
+
secondary: "sl-bg-slate-500/50 sl-text-white",
|
|
21
|
+
success: "sl-bg-green-500/80 sl-text-white",
|
|
22
|
+
warning: "sl-bg-yellow-500/80 sl-text-white",
|
|
23
|
+
danger: "sl-bg-red-500/80 sl-text-white"
|
|
24
|
+
};
|
|
25
|
+
return l[n] || l.primary;
|
|
26
|
+
});
|
|
27
|
+
return (n, l) => (t(), s("li", null, [
|
|
28
|
+
g("a", {
|
|
29
|
+
href: e.href,
|
|
30
|
+
class: i(["sl-group sl-flex sl-gap-x-3 sl-rounded-md sl-p-2 sl-text-sm sl-leading-6 sl-font-semibold sl-transition-colors", [
|
|
31
|
+
e.isActive ? "sl-bg-white/20" : "hover:sl-bg-white/10",
|
|
32
|
+
e.iconOnly ? "sl-justify-center" : ""
|
|
33
|
+
]]),
|
|
34
|
+
style: a({
|
|
35
|
+
color: e.isActive ? "var(--sl-nav-active-text, #ffffff)" : "var(--sl-nav-text, rgba(255, 255, 255, 0.7))"
|
|
36
|
+
})
|
|
37
|
+
}, [
|
|
38
|
+
(t(), h(y(e.icon), {
|
|
39
|
+
class: "sl-h-6 sl-w-6 sl-shrink-0",
|
|
40
|
+
style: a({
|
|
41
|
+
color: e.isActive ? "var(--sl-nav-active-text, #ffffff)" : "var(--sl-nav-icon, rgba(255, 255, 255, 0.5))"
|
|
42
|
+
}),
|
|
43
|
+
"aria-hidden": "true"
|
|
44
|
+
}, null, 8, ["style"])),
|
|
45
|
+
e.iconOnly ? o("", !0) : (t(), s("span", v, c(e.name), 1)),
|
|
46
|
+
e.badge && !e.iconOnly ? (t(), s("span", {
|
|
47
|
+
key: 1,
|
|
48
|
+
class: i(["sl-ml-auto sl-inline-flex sl-items-center sl-rounded-md sl-px-2 sl-py-0.5 sl-text-xs sl-font-medium", m.value])
|
|
49
|
+
}, c(e.badge), 3)) : o("", !0)
|
|
50
|
+
], 14, u)
|
|
51
|
+
]));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
b as _
|
|
56
|
+
};
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { defineComponent as h, ref as k, watch as v, provide as b, renderSlot as w, computed as p, createElementBlock as n, openBlock as a, createElementVNode as c, normalizeStyle as S, createVNode as z, withCtx as B, createCommentVNode as m, normalizeClass as f, Fragment as V, renderList as C, toDisplayString as $ } from "vue";
|
|
2
|
+
import { S as A, b as H, u as W, s as j } from "./useScreenSize-Kr6cn5Zr.js";
|
|
3
|
+
import { _ as x } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const M = h({
|
|
5
|
+
name: "BreakpointWrapper",
|
|
6
|
+
props: {
|
|
7
|
+
/**
|
|
8
|
+
* The screen size to provide to child components
|
|
9
|
+
*/
|
|
10
|
+
size: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: !0,
|
|
13
|
+
validator: (r) => ["sm", "md", "lg", "xl"].includes(r)
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
setup(r) {
|
|
17
|
+
const s = k(r.size);
|
|
18
|
+
return v(
|
|
19
|
+
() => r.size,
|
|
20
|
+
(t) => {
|
|
21
|
+
s.value = t;
|
|
22
|
+
}
|
|
23
|
+
), b(A, s), {};
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
function R(r, s, t, d, i, u) {
|
|
27
|
+
return w(r.$slots, "default");
|
|
28
|
+
}
|
|
29
|
+
const L = /* @__PURE__ */ x(M, [["render", R]]), F = { class: "sl-responsive-preview-wrapper" }, N = /* @__PURE__ */ h({
|
|
30
|
+
__name: "ResponsivePreviewWrapper",
|
|
31
|
+
props: {
|
|
32
|
+
size: {},
|
|
33
|
+
showBorder: { type: Boolean, default: !1 },
|
|
34
|
+
centered: { type: Boolean, default: !0 },
|
|
35
|
+
backgroundColor: { default: "transparent" },
|
|
36
|
+
animate: { type: Boolean, default: !0 },
|
|
37
|
+
minHeight: { default: "auto" }
|
|
38
|
+
},
|
|
39
|
+
setup(r) {
|
|
40
|
+
const s = r, t = k(s.size);
|
|
41
|
+
v(
|
|
42
|
+
() => s.size,
|
|
43
|
+
(i) => {
|
|
44
|
+
t.value = i;
|
|
45
|
+
}
|
|
46
|
+
), H({
|
|
47
|
+
previewMode: !0,
|
|
48
|
+
initialSize: s.size
|
|
49
|
+
});
|
|
50
|
+
const d = p(() => ({
|
|
51
|
+
maxWidth: {
|
|
52
|
+
sm: "375px",
|
|
53
|
+
md: "768px",
|
|
54
|
+
lg: "1024px",
|
|
55
|
+
xl: "100%"
|
|
56
|
+
}[t.value],
|
|
57
|
+
width: "100%",
|
|
58
|
+
margin: s.centered ? "0 auto" : "0",
|
|
59
|
+
backgroundColor: s.backgroundColor,
|
|
60
|
+
minHeight: s.minHeight,
|
|
61
|
+
transition: s.animate ? "max-width 0.3s ease" : "none",
|
|
62
|
+
...s.showBorder && {
|
|
63
|
+
border: "1px solid #e5e7eb",
|
|
64
|
+
borderRadius: "0.5rem",
|
|
65
|
+
padding: "1rem"
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
68
|
+
return (i, u) => (a(), n("div", F, [
|
|
69
|
+
c("div", {
|
|
70
|
+
class: "sl-preview-container sl-mx-auto",
|
|
71
|
+
style: S(d.value)
|
|
72
|
+
}, [
|
|
73
|
+
z(L, { size: t.value }, {
|
|
74
|
+
default: B(() => [
|
|
75
|
+
w(i.$slots, "default", {}, void 0, !0)
|
|
76
|
+
]),
|
|
77
|
+
_: 3
|
|
78
|
+
}, 8, ["size"])
|
|
79
|
+
], 4)
|
|
80
|
+
]));
|
|
81
|
+
}
|
|
82
|
+
}), Q = /* @__PURE__ */ x(N, [["__scopeId", "data-v-7eff9c43"]]), P = ["title", "onClick"], E = {
|
|
83
|
+
key: 0,
|
|
84
|
+
class: "sl-h-5 sl-w-5",
|
|
85
|
+
fill: "none",
|
|
86
|
+
viewBox: "0 0 24 24",
|
|
87
|
+
"stroke-width": "1.5",
|
|
88
|
+
stroke: "currentColor"
|
|
89
|
+
}, q = {
|
|
90
|
+
key: 1,
|
|
91
|
+
class: "sl-h-5 sl-w-5",
|
|
92
|
+
fill: "none",
|
|
93
|
+
viewBox: "0 0 24 24",
|
|
94
|
+
"stroke-width": "1.5",
|
|
95
|
+
stroke: "currentColor"
|
|
96
|
+
}, D = {
|
|
97
|
+
key: 2,
|
|
98
|
+
class: "sl-h-5 sl-w-5",
|
|
99
|
+
fill: "none",
|
|
100
|
+
viewBox: "0 0 24 24",
|
|
101
|
+
"stroke-width": "1.5",
|
|
102
|
+
stroke: "currentColor"
|
|
103
|
+
}, I = {
|
|
104
|
+
key: 3,
|
|
105
|
+
class: "sl-h-5 sl-w-5",
|
|
106
|
+
fill: "none",
|
|
107
|
+
viewBox: "0 0 24 24",
|
|
108
|
+
"stroke-width": "1.5",
|
|
109
|
+
stroke: "currentColor"
|
|
110
|
+
}, K = {
|
|
111
|
+
key: 4,
|
|
112
|
+
class: "sl-ml-2 sl-text-sm sl-font-medium"
|
|
113
|
+
}, U = /* @__PURE__ */ h({
|
|
114
|
+
__name: "ScreenSizeSelector",
|
|
115
|
+
props: {
|
|
116
|
+
modelValue: {},
|
|
117
|
+
sizes: { default: () => ["sm", "md", "lg", "xl"] },
|
|
118
|
+
theme: { default: "light" },
|
|
119
|
+
showLabels: { type: Boolean, default: !1 },
|
|
120
|
+
activeColor: { default: "primary-600" },
|
|
121
|
+
autoFilter: { type: Boolean, default: !0 }
|
|
122
|
+
},
|
|
123
|
+
emits: ["update:modelValue"],
|
|
124
|
+
setup(r, { emit: s }) {
|
|
125
|
+
const t = r, d = s, { availablePreviewSizes: i } = W(), u = p(() => {
|
|
126
|
+
let l = t.sizes;
|
|
127
|
+
return t.autoFilter && (l = l.filter((e) => i.value.includes(e))), j.filter((e) => l.includes(e.id));
|
|
128
|
+
});
|
|
129
|
+
v(u, (l) => {
|
|
130
|
+
if (l.length > 0 && !l.some((e) => e.id === t.modelValue)) {
|
|
131
|
+
const e = l[l.length - 1];
|
|
132
|
+
d("update:modelValue", e.id);
|
|
133
|
+
}
|
|
134
|
+
}, { immediate: !0 });
|
|
135
|
+
const g = p(() => t.theme === "dark" ? "sl-bg-slate-700" : "sl-bg-gray-100"), _ = (l) => t.modelValue === l ? t.theme === "dark" ? "sl-bg-slate-600 sl-shadow sl-text-white" : `sl-bg-white sl-shadow sl-text-${t.activeColor}` : t.theme === "dark" ? "sl-text-slate-300 hover:sl-text-white" : "sl-text-gray-500 hover:sl-text-gray-700", y = (l) => {
|
|
136
|
+
d("update:modelValue", l);
|
|
137
|
+
};
|
|
138
|
+
return (l, e) => u.value.length > 0 ? (a(), n("div", {
|
|
139
|
+
key: 0,
|
|
140
|
+
class: f(["sl-inline-flex sl-items-center sl-gap-1 sl-rounded-lg sl-p-1", g.value])
|
|
141
|
+
}, [
|
|
142
|
+
(a(!0), n(V, null, C(u.value, (o) => (a(), n("button", {
|
|
143
|
+
key: o.id,
|
|
144
|
+
type: "button",
|
|
145
|
+
class: f(["sl-p-2 sl-rounded-md sl-transition-colors sl-flex sl-items-center sl-justify-center", _(o.id)]),
|
|
146
|
+
title: o.label,
|
|
147
|
+
onClick: (T) => y(o.id)
|
|
148
|
+
}, [
|
|
149
|
+
o.id === "sm" ? (a(), n("svg", E, [...e[0] || (e[0] = [
|
|
150
|
+
c("path", {
|
|
151
|
+
"stroke-linecap": "round",
|
|
152
|
+
"stroke-linejoin": "round",
|
|
153
|
+
d: "M10.5 1.5H8.25A2.25 2.25 0 006 3.75v16.5a2.25 2.25 0 002.25 2.25h7.5A2.25 2.25 0 0018 20.25V3.75a2.25 2.25 0 00-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"
|
|
154
|
+
}, null, -1)
|
|
155
|
+
])])) : o.id === "md" ? (a(), n("svg", q, [...e[1] || (e[1] = [
|
|
156
|
+
c("path", {
|
|
157
|
+
"stroke-linecap": "round",
|
|
158
|
+
"stroke-linejoin": "round",
|
|
159
|
+
d: "M10.5 19.5h3m-6.75 2.25h10.5a2.25 2.25 0 002.25-2.25v-15a2.25 2.25 0 00-2.25-2.25H6.75A2.25 2.25 0 004.5 4.5v15a2.25 2.25 0 002.25 2.25z"
|
|
160
|
+
}, null, -1)
|
|
161
|
+
])])) : o.id === "lg" ? (a(), n("svg", D, [...e[2] || (e[2] = [
|
|
162
|
+
c("path", {
|
|
163
|
+
"stroke-linecap": "round",
|
|
164
|
+
"stroke-linejoin": "round",
|
|
165
|
+
d: "M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25A2.25 2.25 0 015.25 3h13.5A2.25 2.25 0 0121 5.25z"
|
|
166
|
+
}, null, -1)
|
|
167
|
+
])])) : o.id === "xl" ? (a(), n("svg", I, [...e[3] || (e[3] = [
|
|
168
|
+
c("path", {
|
|
169
|
+
"stroke-linecap": "round",
|
|
170
|
+
"stroke-linejoin": "round",
|
|
171
|
+
d: "M6 20.25h12m-7.5-3v3m3-3v3m-10.125-3h17.25c.621 0 1.125-.504 1.125-1.125V4.875c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125z"
|
|
172
|
+
}, null, -1)
|
|
173
|
+
])])) : m("", !0),
|
|
174
|
+
r.showLabels ? (a(), n("span", K, $(o.label), 1)) : m("", !0)
|
|
175
|
+
], 10, P))), 128))
|
|
176
|
+
], 2)) : m("", !0);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
export {
|
|
180
|
+
L as B,
|
|
181
|
+
Q as R,
|
|
182
|
+
U as _
|
|
183
|
+
};
|