@stachelock/ui 0.7.0 → 0.8.2
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/ResultState.vue_vue_type_script_setup_true_lang-BsYMDWl6.js +517 -0
- package/dist/{UiMenu.vue_vue_type_script_setup_true_lang-gnoIJm6x.js → UiMenu.vue_vue_type_script_setup_true_lang-Bw1tJYOR.js} +40 -38
- package/dist/components/Menu.js +1 -1
- package/dist/empty-state/index.js +9 -4
- package/dist/index.js +2198 -1840
- package/dist/src/components/UiMenu.d.ts +9 -2
- package/dist/src/components/UnauthenticatedWelcome.d.ts +83 -0
- package/dist/src/components/empty-state/ErrorState.d.ts +87 -0
- package/dist/src/components/empty-state/MissingResourceState.d.ts +76 -0
- package/dist/src/components/empty-state/ProcessingState.d.ts +57 -0
- package/dist/src/components/empty-state/ResultState.d.ts +71 -0
- package/dist/src/components/empty-state/index.d.ts +4 -0
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/layouts/ProjectInfoHeader.d.ts +80 -0
- package/dist/src/components/layouts/StatusPageLayout.d.ts +75 -0
- package/dist/src/components/layouts/index.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
import { defineComponent as p, computed as n, createElementBlock as t, openBlock as e, normalizeClass as k, createElementVNode as o, createCommentVNode as u, toDisplayString as g, renderSlot as i, createBlock as w, resolveDynamicComponent as $, createTextVNode as x, h as r, createVNode as L, normalizeStyle as z } from "vue";
|
|
2
|
+
import { _ as C } from "./LottieAnimation.vue_vue_type_script_setup_true_lang-C0R4ADBb.js";
|
|
3
|
+
const M = {
|
|
4
|
+
key: 1,
|
|
5
|
+
class: "sl-flex sl-justify-center sl-mb-6"
|
|
6
|
+
}, D = {
|
|
7
|
+
key: 2,
|
|
8
|
+
class: "sl-flex sl-justify-center sl-mb-6"
|
|
9
|
+
}, S = { class: "sl-mt-4 sl-text-3xl sl-font-bold sl-tracking-tight sl-text-gray-800 dark:sl-text-white sm:sl-text-5xl" }, A = { class: "sl-mt-6 sl-text-base sl-leading-7 sl-text-gray-600 dark:sl-text-slate-300" }, H = { class: "sl-mt-10 sl-flex sl-items-center sl-justify-center sl-gap-x-6" }, E = {
|
|
10
|
+
key: 3,
|
|
11
|
+
class: "sl-mt-6"
|
|
12
|
+
}, V = ["href"], I = {
|
|
13
|
+
key: 4,
|
|
14
|
+
class: "sl-mt-8 sl-mx-auto sl-max-w-sm"
|
|
15
|
+
}, W = { class: "sl-bg-white dark:sl-bg-slate-800 sl-border sl-border-gray-200 dark:sl-border-slate-700 sl-rounded-lg sl-shadow-sm sl-p-6" }, ds = /* @__PURE__ */ p({
|
|
16
|
+
__name: "ErrorState",
|
|
17
|
+
props: {
|
|
18
|
+
statusCode: {},
|
|
19
|
+
title: {},
|
|
20
|
+
description: {},
|
|
21
|
+
showDefaultSupport: { type: Boolean, default: !0 },
|
|
22
|
+
supportEmail: { default: "support@shir.ly" },
|
|
23
|
+
primaryActionLabel: {},
|
|
24
|
+
secondaryActionLabel: {},
|
|
25
|
+
variant: { default: "error" },
|
|
26
|
+
showDefaultIcon: { type: Boolean, default: !1 },
|
|
27
|
+
fullHeight: { type: Boolean, default: !0 },
|
|
28
|
+
background: { default: "white" },
|
|
29
|
+
maxWidth: { default: "lg" }
|
|
30
|
+
},
|
|
31
|
+
emits: ["primary-action", "secondary-action"],
|
|
32
|
+
setup(s) {
|
|
33
|
+
const a = s, b = n(() => ({
|
|
34
|
+
white: "sl-bg-white dark:sl-bg-slate-900",
|
|
35
|
+
gray: "sl-bg-gray-50 dark:sl-bg-slate-900",
|
|
36
|
+
transparent: "sl-bg-transparent"
|
|
37
|
+
})[a.background]), m = n(() => a.fullHeight ? "sl-min-h-full" : ""), h = n(() => ({
|
|
38
|
+
sm: "sl-max-w-sm",
|
|
39
|
+
md: "sl-max-w-md",
|
|
40
|
+
lg: "sl-max-w-lg",
|
|
41
|
+
xl: "sl-max-w-xl"
|
|
42
|
+
})[a.maxWidth]), l = n(() => ({
|
|
43
|
+
error: "sl-text-red-600 dark:sl-text-red-400",
|
|
44
|
+
warning: "sl-text-amber-600 dark:sl-text-amber-400",
|
|
45
|
+
info: "sl-text-blue-600 dark:sl-text-blue-400",
|
|
46
|
+
neutral: "sl-text-stachelock-600 dark:sl-text-stachelock-400"
|
|
47
|
+
})[a.variant]), d = n(() => ({
|
|
48
|
+
error: "sl-bg-red-100 dark:sl-bg-red-900/30",
|
|
49
|
+
warning: "sl-bg-amber-100 dark:sl-bg-amber-900/30",
|
|
50
|
+
info: "sl-bg-blue-100 dark:sl-bg-blue-900/30",
|
|
51
|
+
neutral: "sl-bg-gray-100 dark:sl-bg-slate-700"
|
|
52
|
+
})[a.variant]), f = n(() => ({
|
|
53
|
+
error: "sl-text-red-600 dark:sl-text-red-400",
|
|
54
|
+
warning: "sl-text-amber-600 dark:sl-text-amber-400",
|
|
55
|
+
info: "sl-text-blue-600 dark:sl-text-blue-400",
|
|
56
|
+
neutral: "sl-text-gray-600 dark:sl-text-slate-400"
|
|
57
|
+
})[a.variant]), y = n(() => ({
|
|
58
|
+
error: "sl-bg-red-600 hover:sl-bg-red-700",
|
|
59
|
+
warning: "sl-bg-amber-600 hover:sl-bg-amber-700",
|
|
60
|
+
info: "sl-bg-blue-600 hover:sl-bg-blue-700",
|
|
61
|
+
neutral: "sl-bg-stachelock-600 hover:sl-bg-stachelock-700"
|
|
62
|
+
})[a.variant]), B = n(() => ({
|
|
63
|
+
error: {
|
|
64
|
+
props: {},
|
|
65
|
+
render() {
|
|
66
|
+
return r("svg", {
|
|
67
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
68
|
+
fill: "none",
|
|
69
|
+
viewBox: "0 0 24 24",
|
|
70
|
+
"stroke-width": "1.5",
|
|
71
|
+
stroke: "currentColor"
|
|
72
|
+
}, [
|
|
73
|
+
r("path", {
|
|
74
|
+
"stroke-linecap": "round",
|
|
75
|
+
"stroke-linejoin": "round",
|
|
76
|
+
d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"
|
|
77
|
+
})
|
|
78
|
+
]);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
warning: {
|
|
82
|
+
props: {},
|
|
83
|
+
render() {
|
|
84
|
+
return r("svg", {
|
|
85
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
86
|
+
fill: "none",
|
|
87
|
+
viewBox: "0 0 24 24",
|
|
88
|
+
"stroke-width": "1.5",
|
|
89
|
+
stroke: "currentColor"
|
|
90
|
+
}, [
|
|
91
|
+
r("path", {
|
|
92
|
+
"stroke-linecap": "round",
|
|
93
|
+
"stroke-linejoin": "round",
|
|
94
|
+
d: "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"
|
|
95
|
+
})
|
|
96
|
+
]);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
info: {
|
|
100
|
+
props: {},
|
|
101
|
+
render() {
|
|
102
|
+
return r("svg", {
|
|
103
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
104
|
+
fill: "none",
|
|
105
|
+
viewBox: "0 0 24 24",
|
|
106
|
+
"stroke-width": "1.5",
|
|
107
|
+
stroke: "currentColor"
|
|
108
|
+
}, [
|
|
109
|
+
r("path", {
|
|
110
|
+
"stroke-linecap": "round",
|
|
111
|
+
"stroke-linejoin": "round",
|
|
112
|
+
d: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"
|
|
113
|
+
})
|
|
114
|
+
]);
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
neutral: {
|
|
118
|
+
props: {},
|
|
119
|
+
render() {
|
|
120
|
+
return r("svg", {
|
|
121
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
122
|
+
fill: "none",
|
|
123
|
+
viewBox: "0 0 24 24",
|
|
124
|
+
"stroke-width": "1.5",
|
|
125
|
+
stroke: "currentColor"
|
|
126
|
+
}, [
|
|
127
|
+
r("path", {
|
|
128
|
+
"stroke-linecap": "round",
|
|
129
|
+
"stroke-linejoin": "round",
|
|
130
|
+
d: "M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"
|
|
131
|
+
})
|
|
132
|
+
]);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
})[a.variant]);
|
|
136
|
+
return (c, v) => (e(), t("main", {
|
|
137
|
+
class: k(["sl-grid sl-place-items-center sl-px-6 sl-py-24 sm:sl-py-32 lg:sl-px-8", [b.value, m.value]])
|
|
138
|
+
}, [
|
|
139
|
+
o("div", {
|
|
140
|
+
class: k(["sl-text-center", h.value])
|
|
141
|
+
}, [
|
|
142
|
+
s.statusCode ? (e(), t("p", {
|
|
143
|
+
key: 0,
|
|
144
|
+
class: k(["sl-text-base sl-font-semibold", l.value])
|
|
145
|
+
}, g(s.statusCode), 3)) : u("", !0),
|
|
146
|
+
c.$slots.icon ? (e(), t("div", M, [
|
|
147
|
+
i(c.$slots, "icon")
|
|
148
|
+
])) : s.showDefaultIcon ? (e(), t("div", D, [
|
|
149
|
+
o("div", {
|
|
150
|
+
class: k(["sl-flex sl-h-16 sl-w-16 sl-items-center sl-justify-center sl-rounded-full", d.value])
|
|
151
|
+
}, [
|
|
152
|
+
(e(), w($(B.value), {
|
|
153
|
+
class: k(["sl-h-8 sl-w-8", f.value])
|
|
154
|
+
}, null, 8, ["class"]))
|
|
155
|
+
], 2)
|
|
156
|
+
])) : u("", !0),
|
|
157
|
+
o("h1", S, g(s.title), 1),
|
|
158
|
+
o("p", A, [
|
|
159
|
+
i(c.$slots, "description", {}, () => [
|
|
160
|
+
x(g(s.description), 1)
|
|
161
|
+
])
|
|
162
|
+
]),
|
|
163
|
+
o("div", H, [
|
|
164
|
+
i(c.$slots, "primary-actions", {}, () => [
|
|
165
|
+
s.primaryActionLabel ? (e(), t("button", {
|
|
166
|
+
key: 0,
|
|
167
|
+
type: "button",
|
|
168
|
+
onClick: v[0] || (v[0] = (j) => c.$emit("primary-action")),
|
|
169
|
+
class: k(["sl-inline-flex sl-items-center sl-rounded-md sl-px-4 sl-py-2.5 sl-text-sm sl-font-semibold sl-text-white sl-shadow-sm sl-transition-colors", y.value])
|
|
170
|
+
}, g(s.primaryActionLabel), 3)) : u("", !0),
|
|
171
|
+
s.secondaryActionLabel ? (e(), t("button", {
|
|
172
|
+
key: 1,
|
|
173
|
+
type: "button",
|
|
174
|
+
onClick: v[1] || (v[1] = (j) => c.$emit("secondary-action")),
|
|
175
|
+
class: "sl-inline-flex sl-items-center sl-rounded-md sl-bg-gray-100 dark:sl-bg-slate-700 sl-px-4 sl-py-2.5 sl-text-sm sl-font-semibold sl-text-gray-700 dark:sl-text-slate-200 sl-shadow-sm hover:sl-bg-gray-200 dark:hover:sl-bg-slate-600 sl-transition-colors"
|
|
176
|
+
}, g(s.secondaryActionLabel), 1)) : u("", !0)
|
|
177
|
+
])
|
|
178
|
+
]),
|
|
179
|
+
c.$slots["secondary-actions"] || s.showDefaultSupport ? (e(), t("div", E, [
|
|
180
|
+
i(c.$slots, "secondary-actions", {}, () => [
|
|
181
|
+
s.showDefaultSupport && s.supportEmail ? (e(), t("a", {
|
|
182
|
+
key: 0,
|
|
183
|
+
href: `mailto:${s.supportEmail}`,
|
|
184
|
+
class: "sl-text-sm sl-font-semibold sl-text-gray-700 dark:sl-text-slate-300 hover:sl-text-gray-900 dark:hover:sl-text-white sl-transition-colors"
|
|
185
|
+
}, [...v[2] || (v[2] = [
|
|
186
|
+
x(" Contact support ", -1),
|
|
187
|
+
o("span", { "aria-hidden": "true" }, "→", -1)
|
|
188
|
+
])], 8, V)) : u("", !0)
|
|
189
|
+
])
|
|
190
|
+
])) : u("", !0),
|
|
191
|
+
c.$slots.context ? (e(), t("div", I, [
|
|
192
|
+
o("div", W, [
|
|
193
|
+
i(c.$slots, "context")
|
|
194
|
+
])
|
|
195
|
+
])) : u("", !0)
|
|
196
|
+
], 2)
|
|
197
|
+
], 2));
|
|
198
|
+
}
|
|
199
|
+
}), N = { class: "sl-py-12" }, P = { class: "sl-flex sl-flex-col sl-items-center sl-gap-6 sl-text-center" }, T = { class: "sl-w-full sl-max-w-xs" }, F = {
|
|
200
|
+
key: 0,
|
|
201
|
+
class: "sl-flex sl-items-center sl-justify-center"
|
|
202
|
+
}, R = {
|
|
203
|
+
key: 1,
|
|
204
|
+
class: "sl-flex sl-items-center sl-justify-center sl-h-56 sl-w-full sl-rounded-lg sl-bg-stachelock-50 dark:sl-bg-slate-800 sl-text-sm sl-text-stachelock-500 dark:sl-text-stachelock-400"
|
|
205
|
+
}, q = { class: "sl-space-y-2 sl-max-w-xl" }, G = { class: "sl-text-2xl sl-font-semibold sl-text-gray-900 dark:sl-text-white" }, J = { class: "sl-text-base sl-text-gray-600 dark:sl-text-slate-300" }, K = {
|
|
206
|
+
key: 1,
|
|
207
|
+
class: "sl-text-sm sl-text-gray-500 dark:sl-text-slate-400"
|
|
208
|
+
}, O = {
|
|
209
|
+
key: 0,
|
|
210
|
+
class: "sl-mt-4"
|
|
211
|
+
}, cs = /* @__PURE__ */ p({
|
|
212
|
+
__name: "MissingResourceState",
|
|
213
|
+
props: {
|
|
214
|
+
badge: {},
|
|
215
|
+
title: {},
|
|
216
|
+
description: {},
|
|
217
|
+
supportingText: {},
|
|
218
|
+
animationData: {},
|
|
219
|
+
animationHeight: { default: 220 },
|
|
220
|
+
animationWidth: { default: 220 },
|
|
221
|
+
animationLoop: { type: Boolean, default: !0 },
|
|
222
|
+
isAnimationLoading: { type: Boolean, default: !1 },
|
|
223
|
+
showFallbackIcon: { type: Boolean, default: !0 },
|
|
224
|
+
variant: { default: "warning" }
|
|
225
|
+
},
|
|
226
|
+
setup(s) {
|
|
227
|
+
const a = s, b = n(() => ({
|
|
228
|
+
warning: "sl-text-amber-600 dark:sl-text-amber-400",
|
|
229
|
+
error: "sl-text-red-600 dark:sl-text-red-400",
|
|
230
|
+
info: "sl-text-blue-600 dark:sl-text-blue-400",
|
|
231
|
+
neutral: "sl-text-stachelock-600 dark:sl-text-stachelock-400"
|
|
232
|
+
})[a.variant]), m = n(() => ({
|
|
233
|
+
warning: "sl-bg-amber-100 dark:sl-bg-amber-900/30",
|
|
234
|
+
error: "sl-bg-red-100 dark:sl-bg-red-900/30",
|
|
235
|
+
info: "sl-bg-blue-100 dark:sl-bg-blue-900/30",
|
|
236
|
+
neutral: "sl-bg-stachelock-100 dark:sl-bg-stachelock-900/30"
|
|
237
|
+
})[a.variant]), h = n(() => ({
|
|
238
|
+
warning: "sl-text-amber-600 dark:sl-text-amber-400",
|
|
239
|
+
error: "sl-text-red-600 dark:sl-text-red-400",
|
|
240
|
+
info: "sl-text-blue-600 dark:sl-text-blue-400",
|
|
241
|
+
neutral: "sl-text-stachelock-600 dark:sl-text-stachelock-400"
|
|
242
|
+
})[a.variant]);
|
|
243
|
+
return (l, d) => (e(), t("div", N, [
|
|
244
|
+
o("div", P, [
|
|
245
|
+
o("div", T, [
|
|
246
|
+
i(l.$slots, "animation", {}, () => [
|
|
247
|
+
s.animationData ? (e(), t("div", F, [
|
|
248
|
+
L(C, {
|
|
249
|
+
"animation-data": s.animationData,
|
|
250
|
+
height: s.animationHeight,
|
|
251
|
+
width: s.animationWidth,
|
|
252
|
+
loop: s.animationLoop,
|
|
253
|
+
autoplay: !0
|
|
254
|
+
}, null, 8, ["animation-data", "height", "width", "loop"])
|
|
255
|
+
])) : s.isAnimationLoading ? (e(), t("div", R, " Preparing animation... ")) : s.showFallbackIcon ? (e(), t("div", {
|
|
256
|
+
key: 2,
|
|
257
|
+
class: k(["sl-flex sl-items-center sl-justify-center sl-mx-auto sl-h-24 sl-w-24 sl-rounded-full", m.value])
|
|
258
|
+
}, [
|
|
259
|
+
i(l.$slots, "icon", {}, () => [
|
|
260
|
+
(e(), t("svg", {
|
|
261
|
+
class: k(["sl-h-12 sl-w-12", h.value]),
|
|
262
|
+
fill: "none",
|
|
263
|
+
viewBox: "0 0 24 24",
|
|
264
|
+
"stroke-width": "1.5",
|
|
265
|
+
stroke: "currentColor"
|
|
266
|
+
}, [...d[0] || (d[0] = [
|
|
267
|
+
o("path", {
|
|
268
|
+
"stroke-linecap": "round",
|
|
269
|
+
"stroke-linejoin": "round",
|
|
270
|
+
d: "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"
|
|
271
|
+
}, null, -1)
|
|
272
|
+
])], 2))
|
|
273
|
+
])
|
|
274
|
+
], 2)) : u("", !0)
|
|
275
|
+
])
|
|
276
|
+
]),
|
|
277
|
+
o("div", q, [
|
|
278
|
+
s.badge ? (e(), t("p", {
|
|
279
|
+
key: 0,
|
|
280
|
+
class: k(["sl-text-xs sl-font-semibold sl-uppercase sl-tracking-[0.3em]", b.value])
|
|
281
|
+
}, g(s.badge), 3)) : u("", !0),
|
|
282
|
+
o("h2", G, g(s.title), 1),
|
|
283
|
+
o("p", J, [
|
|
284
|
+
i(l.$slots, "description", {}, () => [
|
|
285
|
+
x(g(s.description), 1)
|
|
286
|
+
])
|
|
287
|
+
]),
|
|
288
|
+
s.supportingText || l.$slots["supporting-text"] ? (e(), t("p", K, [
|
|
289
|
+
i(l.$slots, "supporting-text", {}, () => [
|
|
290
|
+
x(g(s.supportingText), 1)
|
|
291
|
+
])
|
|
292
|
+
])) : u("", !0)
|
|
293
|
+
]),
|
|
294
|
+
l.$slots.actions ? (e(), t("div", O, [
|
|
295
|
+
i(l.$slots, "actions")
|
|
296
|
+
])) : u("", !0)
|
|
297
|
+
])
|
|
298
|
+
]));
|
|
299
|
+
}
|
|
300
|
+
}), Q = { class: "sl-py-16 sl-text-center sl-flex sl-flex-col sl-items-center sl-gap-4" }, U = { class: "sl-flex sl-justify-center" }, X = { class: "sl-text-2xl sl-font-semibold sl-text-gray-900 dark:sl-text-white" }, Y = {
|
|
301
|
+
key: 1,
|
|
302
|
+
class: "sl-max-w-2xl sl-text-sm sl-text-gray-600 dark:sl-text-slate-300"
|
|
303
|
+
}, Z = {
|
|
304
|
+
key: 2,
|
|
305
|
+
class: "sl-w-full sl-max-w-xs sl-mt-4"
|
|
306
|
+
}, _ = { class: "sl-h-1.5 sl-w-full sl-bg-gray-200 dark:sl-bg-slate-700 sl-rounded-full sl-overflow-hidden" }, ss = {
|
|
307
|
+
key: 0,
|
|
308
|
+
class: "sl-mt-2 sl-text-xs sl-text-gray-500 dark:sl-text-slate-400"
|
|
309
|
+
}, us = /* @__PURE__ */ p({
|
|
310
|
+
__name: "ProcessingState",
|
|
311
|
+
props: {
|
|
312
|
+
badge: {},
|
|
313
|
+
title: {},
|
|
314
|
+
description: {},
|
|
315
|
+
variant: { default: "primary" },
|
|
316
|
+
showProgress: { type: Boolean, default: !1 },
|
|
317
|
+
progress: { default: 0 },
|
|
318
|
+
progressLabel: {}
|
|
319
|
+
},
|
|
320
|
+
setup(s) {
|
|
321
|
+
const a = s, b = n(() => ({
|
|
322
|
+
primary: "sl-border-stachelock-600 dark:sl-border-stachelock-400",
|
|
323
|
+
success: "sl-border-green-600 dark:sl-border-green-400",
|
|
324
|
+
warning: "sl-border-amber-600 dark:sl-border-amber-400",
|
|
325
|
+
neutral: "sl-border-gray-600 dark:sl-border-slate-400"
|
|
326
|
+
})[a.variant]), m = n(() => ({
|
|
327
|
+
primary: "sl-text-stachelock-600 dark:sl-text-stachelock-400",
|
|
328
|
+
success: "sl-text-green-600 dark:sl-text-green-400",
|
|
329
|
+
warning: "sl-text-amber-600 dark:sl-text-amber-400",
|
|
330
|
+
neutral: "sl-text-gray-600 dark:sl-text-slate-400"
|
|
331
|
+
})[a.variant]), h = n(() => ({
|
|
332
|
+
primary: "sl-bg-stachelock-600 dark:sl-bg-stachelock-500",
|
|
333
|
+
success: "sl-bg-green-600 dark:sl-bg-green-500",
|
|
334
|
+
warning: "sl-bg-amber-600 dark:sl-bg-amber-500",
|
|
335
|
+
neutral: "sl-bg-gray-600 dark:sl-bg-slate-500"
|
|
336
|
+
})[a.variant]);
|
|
337
|
+
return (l, d) => (e(), t("div", Q, [
|
|
338
|
+
o("div", U, [
|
|
339
|
+
i(l.$slots, "loading", {}, () => [
|
|
340
|
+
o("div", {
|
|
341
|
+
class: k(["sl-h-10 sl-w-10 sl-animate-spin sl-rounded-full sl-border-[3px] sl-border-t-transparent", b.value])
|
|
342
|
+
}, null, 2)
|
|
343
|
+
])
|
|
344
|
+
]),
|
|
345
|
+
s.badge ? (e(), t("p", {
|
|
346
|
+
key: 0,
|
|
347
|
+
class: k(["sl-text-xs sl-font-semibold sl-uppercase sl-tracking-[0.3em]", m.value])
|
|
348
|
+
}, g(s.badge), 3)) : u("", !0),
|
|
349
|
+
o("h2", X, g(s.title), 1),
|
|
350
|
+
s.description || l.$slots.description ? (e(), t("p", Y, [
|
|
351
|
+
i(l.$slots, "description", {}, () => [
|
|
352
|
+
x(g(s.description), 1)
|
|
353
|
+
])
|
|
354
|
+
])) : u("", !0),
|
|
355
|
+
i(l.$slots, "default"),
|
|
356
|
+
s.showProgress ? (e(), t("div", Z, [
|
|
357
|
+
o("div", _, [
|
|
358
|
+
o("div", {
|
|
359
|
+
class: k(["sl-h-full sl-transition-all sl-duration-300 sl-rounded-full", h.value]),
|
|
360
|
+
style: z({ width: `${s.progress}%` })
|
|
361
|
+
}, null, 6)
|
|
362
|
+
]),
|
|
363
|
+
s.progressLabel ? (e(), t("p", ss, g(s.progressLabel), 1)) : u("", !0)
|
|
364
|
+
])) : u("", !0)
|
|
365
|
+
]));
|
|
366
|
+
}
|
|
367
|
+
}), es = { class: "sl-text-center sl-py-6" }, ts = { class: "sl-mb-4 sl-flex sl-justify-center" }, ls = { class: "sl-text-xl sl-font-semibold sl-text-gray-800 dark:sl-text-slate-200 sl-mb-2" }, rs = { class: "sl-text-gray-600 dark:sl-text-slate-400 sl-mb-6" }, os = {
|
|
368
|
+
key: 0,
|
|
369
|
+
class: "sl-flex sl-justify-center sl-items-center"
|
|
370
|
+
}, as = {
|
|
371
|
+
key: 1,
|
|
372
|
+
class: "sl-mt-4"
|
|
373
|
+
}, gs = /* @__PURE__ */ p({
|
|
374
|
+
__name: "ResultState",
|
|
375
|
+
props: {
|
|
376
|
+
variant: { default: "success" },
|
|
377
|
+
title: {},
|
|
378
|
+
description: {},
|
|
379
|
+
animationData: {},
|
|
380
|
+
animationSize: { default: 140 },
|
|
381
|
+
animationLoop: { type: Boolean, default: !1 },
|
|
382
|
+
showAction: { type: Boolean, default: !1 },
|
|
383
|
+
actionLabel: { default: "Continue" }
|
|
384
|
+
},
|
|
385
|
+
emits: ["action"],
|
|
386
|
+
setup(s) {
|
|
387
|
+
const a = s, b = n(() => ({
|
|
388
|
+
success: "sl-bg-green-100 dark:sl-bg-green-900/30",
|
|
389
|
+
pending: "sl-bg-amber-100 dark:sl-bg-amber-900/30",
|
|
390
|
+
accepted: "sl-bg-green-100 dark:sl-bg-green-900/30",
|
|
391
|
+
expired: "sl-bg-gray-100 dark:sl-bg-slate-700",
|
|
392
|
+
revoked: "sl-bg-red-100 dark:sl-bg-red-900/30",
|
|
393
|
+
invalid: "sl-bg-red-100 dark:sl-bg-red-900/30",
|
|
394
|
+
info: "sl-bg-blue-100 dark:sl-bg-blue-900/30"
|
|
395
|
+
})[a.variant]), m = n(() => ({
|
|
396
|
+
success: "sl-text-green-600 dark:sl-text-green-400",
|
|
397
|
+
pending: "sl-text-amber-600 dark:sl-text-amber-400",
|
|
398
|
+
accepted: "sl-text-green-600 dark:sl-text-green-400",
|
|
399
|
+
expired: "sl-text-gray-500 dark:sl-text-slate-400",
|
|
400
|
+
revoked: "sl-text-red-600 dark:sl-text-red-400",
|
|
401
|
+
invalid: "sl-text-red-600 dark:sl-text-red-400",
|
|
402
|
+
info: "sl-text-blue-600 dark:sl-text-blue-400"
|
|
403
|
+
})[a.variant]), h = n(() => ({
|
|
404
|
+
success: "sl-bg-green-600 sl-text-white hover:sl-bg-green-700",
|
|
405
|
+
pending: "sl-bg-stachelock-600 sl-text-white hover:sl-bg-stachelock-700",
|
|
406
|
+
accepted: "sl-bg-stachelock-600 sl-text-white hover:sl-bg-stachelock-700",
|
|
407
|
+
expired: "sl-bg-gray-600 sl-text-white hover:sl-bg-gray-700",
|
|
408
|
+
revoked: "sl-bg-stachelock-600 sl-text-white hover:sl-bg-stachelock-700",
|
|
409
|
+
invalid: "sl-bg-stachelock-600 sl-text-white hover:sl-bg-stachelock-700",
|
|
410
|
+
info: "sl-bg-blue-600 sl-text-white hover:sl-bg-blue-700"
|
|
411
|
+
})[a.variant]), l = n(() => ({
|
|
412
|
+
success: {
|
|
413
|
+
props: {},
|
|
414
|
+
render() {
|
|
415
|
+
return r("svg", { fill: "none", viewBox: "0 0 24 24", "stroke-width": "2", stroke: "currentColor" }, [
|
|
416
|
+
r("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M4.5 12.75l6 6 9-13.5" })
|
|
417
|
+
]);
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
pending: {
|
|
421
|
+
props: {},
|
|
422
|
+
render() {
|
|
423
|
+
return r("svg", { fill: "none", viewBox: "0 0 24 24", "stroke-width": "2", stroke: "currentColor" }, [
|
|
424
|
+
r("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" })
|
|
425
|
+
]);
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
accepted: {
|
|
429
|
+
props: {},
|
|
430
|
+
render() {
|
|
431
|
+
return r("svg", { fill: "none", viewBox: "0 0 24 24", "stroke-width": "2", stroke: "currentColor" }, [
|
|
432
|
+
r("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" })
|
|
433
|
+
]);
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
expired: {
|
|
437
|
+
props: {},
|
|
438
|
+
render() {
|
|
439
|
+
return r("svg", { fill: "none", viewBox: "0 0 24 24", "stroke-width": "2", stroke: "currentColor" }, [
|
|
440
|
+
r("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" })
|
|
441
|
+
]);
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
revoked: {
|
|
445
|
+
props: {},
|
|
446
|
+
render() {
|
|
447
|
+
return r("svg", { fill: "none", viewBox: "0 0 24 24", "stroke-width": "2", stroke: "currentColor" }, [
|
|
448
|
+
r("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636" })
|
|
449
|
+
]);
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
invalid: {
|
|
453
|
+
props: {},
|
|
454
|
+
render() {
|
|
455
|
+
return r("svg", { fill: "none", viewBox: "0 0 24 24", "stroke-width": "2", stroke: "currentColor" }, [
|
|
456
|
+
r("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" })
|
|
457
|
+
]);
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
info: {
|
|
461
|
+
props: {},
|
|
462
|
+
render() {
|
|
463
|
+
return r("svg", { fill: "none", viewBox: "0 0 24 24", "stroke-width": "2", stroke: "currentColor" }, [
|
|
464
|
+
r("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" })
|
|
465
|
+
]);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
})[a.variant]);
|
|
469
|
+
return (d, f) => (e(), t("div", es, [
|
|
470
|
+
o("div", ts, [
|
|
471
|
+
i(d.$slots, "animation", {}, () => [
|
|
472
|
+
s.animationData ? (e(), w(C, {
|
|
473
|
+
key: 0,
|
|
474
|
+
"animation-data": s.animationData,
|
|
475
|
+
height: s.animationSize,
|
|
476
|
+
width: s.animationSize,
|
|
477
|
+
loop: s.animationLoop,
|
|
478
|
+
autoplay: !0
|
|
479
|
+
}, null, 8, ["animation-data", "height", "width", "loop"])) : (e(), t("div", {
|
|
480
|
+
key: 1,
|
|
481
|
+
class: k(["sl-flex sl-items-center sl-justify-center sl-h-20 sl-w-20 sl-rounded-full", b.value])
|
|
482
|
+
}, [
|
|
483
|
+
(e(), w($(l.value), {
|
|
484
|
+
class: k(["sl-h-10 sl-w-10", m.value])
|
|
485
|
+
}, null, 8, ["class"]))
|
|
486
|
+
], 2))
|
|
487
|
+
])
|
|
488
|
+
]),
|
|
489
|
+
o("h2", ls, g(s.title), 1),
|
|
490
|
+
o("p", rs, [
|
|
491
|
+
i(d.$slots, "description", {}, () => [
|
|
492
|
+
x(g(s.description), 1)
|
|
493
|
+
])
|
|
494
|
+
]),
|
|
495
|
+
i(d.$slots, "default"),
|
|
496
|
+
s.showAction ? (e(), t("div", os, [
|
|
497
|
+
o("button", {
|
|
498
|
+
type: "button",
|
|
499
|
+
onClick: f[0] || (f[0] = (y) => d.$emit("action")),
|
|
500
|
+
class: k(["sl-inline-flex sl-items-center sl-gap-x-2 sl-rounded-lg sl-px-4 sl-py-2.5 sl-text-sm sl-font-semibold sl-shadow-sm sl-transition-colors", h.value])
|
|
501
|
+
}, [
|
|
502
|
+
i(d.$slots, "action-icon"),
|
|
503
|
+
x(" " + g(s.actionLabel), 1)
|
|
504
|
+
], 2)
|
|
505
|
+
])) : u("", !0),
|
|
506
|
+
d.$slots.actions ? (e(), t("div", as, [
|
|
507
|
+
i(d.$slots, "actions")
|
|
508
|
+
])) : u("", !0)
|
|
509
|
+
]));
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
export {
|
|
513
|
+
ds as _,
|
|
514
|
+
cs as a,
|
|
515
|
+
us as b,
|
|
516
|
+
gs as c
|
|
517
|
+
};
|