@betterworldcollective/dashboard 0.0.0-stage → 0.0.3
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/components/card/CampaignCard.vue.d.ts +9 -0
- package/dist/components/header/BwHeader.story-mocks.d.ts +4 -0
- package/dist/components/header/BwHeader.vue.d.ts +25 -0
- package/dist/components/header/index.d.ts +1 -0
- package/dist/components/layout/BwLayout.vue.d.ts +29 -0
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/onboarding/campaign-card/BwOnboardingCampaignCardCreation.vue.d.ts +43 -0
- package/dist/components/onboarding/campaign-card/index.d.ts +1 -0
- package/dist/components/organization/OrganizationLogo.vue.d.ts +7 -0
- package/dist/components/sidebar/BwSidebar.vue.d.ts +12 -0
- package/dist/components/sidebar/BwSidebarBadge.vue.d.ts +12 -0
- package/dist/components/sidebar/BwSidebarGroup.vue.d.ts +18 -0
- package/dist/components/sidebar/BwSidebarItem.vue.d.ts +34 -0
- package/dist/components/sidebar/BwSidebarSubItem.vue.d.ts +27 -0
- package/dist/components/sidebar/context.d.ts +13 -0
- package/dist/components/sidebar/icons.d.ts +4 -0
- package/dist/components/sidebar/index.d.ts +5 -0
- package/dist/components/ticket/BwTicketStatsCard.vue.d.ts +34 -0
- package/dist/components/ticket/TicketStatsRing.vue.d.ts +9 -0
- package/dist/components/ticket/index.d.ts +2 -0
- package/dist/composables/useChart.d.ts +12 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +488 -0
- package/dist/index.js.map +1 -0
- package/dist/style.css +3 -0
- package/dist/types/Campaign.d.ts +17 -0
- package/package.json +47 -3
- package/README.md +0 -3
package/dist/index.js
ADDED
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
import { Comment as e, Fragment as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, defineComponent as d, inject as f, isVNode as p, markRaw as m, mergeModels as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, onUnmounted as ee, openBlock as x, provide as S, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, unref as k, useId as A, useModel as j, useSlots as M, watch as N, withCtx as P } from "vue";
|
|
2
|
+
import { BwSlideTransition as F } from "@betterworldcollective/core";
|
|
3
|
+
import { AthonIcon as I, CampaignIcon as te, CheckIcon as ne, ChevronDownIcon as re, CrowdfundingIcon as ie, DonationFormIcon as L, DonationIcon as ae, DonorIcon as oe, EventIcon as R, GiftIcon as z, GiveawaysIcon as B, HomeIcon as V, ImpactGivingIcon as H, LiveAuctionIcon as U, PaddleRaiseIcon as W, PeerToPeerIcon as G, SilentAuctionIcon as K } from "@betterworldcollective/icons";
|
|
4
|
+
import { PieChart as q } from "echarts/charts";
|
|
5
|
+
import { init as se, use as ce } from "echarts/core";
|
|
6
|
+
import { SVGRenderer as le } from "echarts/renderers";
|
|
7
|
+
// src/components/header/BwHeader.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var ue = { class: "bw-header flex w-full flex-col bg-surface-brand text-white" }, de = { class: "flex min-h-15 w-full items-stretch" }, fe = { class: "flex w-72.5 shrink-0 items-center px-7" }, pe = ["href"], me = { class: "relative flex min-w-0 flex-1 items-center px-7 py-3" }, he = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "bg-white text-text-primary"
|
|
11
|
+
}, J = /* @__PURE__ */ d({
|
|
12
|
+
__name: "BwHeader",
|
|
13
|
+
props: {
|
|
14
|
+
logoHref: { default: "/" },
|
|
15
|
+
isSubHeaderVisible: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !1
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
setup(e) {
|
|
21
|
+
return (t, n) => (x(), o("header", ue, [s("div", de, [s("div", fe, [T(t.$slots, "left", {}, () => [s("a", {
|
|
22
|
+
class: "block shrink-0 rounded-[4px] outline-none focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-white",
|
|
23
|
+
href: e.logoHref,
|
|
24
|
+
"aria-label": "BetterWorld"
|
|
25
|
+
}, [...n[0] ||= [s("svg", {
|
|
26
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
27
|
+
width: "136",
|
|
28
|
+
height: "20",
|
|
29
|
+
viewBox: "0 0 170 25",
|
|
30
|
+
fill: "none",
|
|
31
|
+
"aria-hidden": "true"
|
|
32
|
+
}, [s("path", {
|
|
33
|
+
fill: "currentColor",
|
|
34
|
+
"fill-rule": "evenodd",
|
|
35
|
+
"clip-rule": "evenodd",
|
|
36
|
+
d: "M4.39 23.25c-.14-.1-.36 0-.36.17v.74c0 .11-.1.2-.21.2H2.68c-.93 0-1.68-.74-1.68-1.67V1.2c0-.12.1-.21.21-.21h1.24c.92 0 1.68.75 1.68 1.68V9.8c0 .18.2.28.35.17a7.4 7.4 0 0 1 4.39-1.4 7.3 7.3 0 0 1 3.78.99 8.2 8.2 0 0 1 3.98 7.07 8.1 8.1 0 0 1-3.95 7.05A8 8 0 0 1 8.8 24.7c-1.67 0-3.2-.52-4.41-1.45m29.2-6.15q-.03.18-.21.2h-11.5a.2.2 0 0 0-.2.22 5 5 0 0 0 4.97 4.45c1.4 0 2.4-.41 3.17-.95.78-.54 1.84-.62 2.53.03l.65.62c.08.07.09.2.02.28a8.2 8.2 0 0 1-6.4 2.75c-4.5 0-8-3.43-8-8.07s3.16-8.06 7.54-8.06c4.31 0 7.44 3.49 7.44 8.06l-.02.47m-3.32-2.7a4.3 4.3 0 0 0-4.01-3.1 4.5 4.5 0 0 0-4.27 3.1.2.2 0 0 0 .2.26h7.89a.2.2 0 0 0 .2-.26m15.91 8.82c-.2-.91-1.15-1.48-2.08-1.48-.83 0-1.72-.3-2.14-.83-.4-.46-.46-1.15-.46-1.97V11.9q.02-.2.2-.21h3.05c.93 0 1.68-.76 1.68-1.68V9.1a.2.2 0 0 0-.2-.21H41.7a.2.2 0 0 1-.21-.21V4.83c0-.12-.1-.21-.21-.21h-1.24c-.93 0-1.68.75-1.68 1.68v2.4c0 .12-.1.2-.21.2H36.1c-.93 0-1.68.76-1.68 1.7v.9c0 .11.1.2.21.2h3.53q.19.02.2.22v6.86c0 1.68.34 3.1 1.26 4.12A5.6 5.6 0 0 0 44 24.7c.8 0 1.66-.1 2.25-.27a.2.2 0 0 0 .14-.24zm11.07-1.48c.94 0 1.88.57 2.09 1.48l.2.96a.2.2 0 0 1-.13.24c-.6.17-1.45.28-2.26.28-1.94 0-3.39-.7-4.38-1.81-.92-1.02-1.25-2.44-1.25-4.12v-6.86q-.02-.2-.2-.21h-3.54a.2.2 0 0 1-.2-.21v-.9c0-.94.75-1.7 1.68-1.7h2.05q.2-.01.21-.2V6.3c0-.93.76-1.68 1.69-1.68h1.23c.12 0 .21.1.21.21V8.7c0 .12.1.2.21.2h4.52q.18.02.2.22v.9c0 .93-.74 1.69-1.67 1.69h-3.05a.2.2 0 0 0-.2.2v7.04c0 .82.06 1.51.45 1.97.43.53 1.32.83 2.14.83m18.58-4.45c.1 0 .2-.08.2-.19q.03-.3.02-.47c0-4.57-3.12-8.06-7.44-8.06-4.37 0-7.53 3.42-7.53 8.06a7.86 7.86 0 0 0 8 8.07 8.2 8.2 0 0 0 6.4-2.75.2.2 0 0 0-.03-.28l-.65-.62c-.68-.65-1.75-.57-2.52-.03-.78.54-1.78.95-3.17.95a5 5 0 0 1-4.99-4.45.2.2 0 0 1 .21-.23zm-7.12-5.99a4.3 4.3 0 0 1 4.02 3.1.2.2 0 0 1-.2.26h-7.89a.2.2 0 0 1-.2-.26 4.5 4.5 0 0 1 4.27-3.1m19.32-2.66a.2.2 0 0 1 .17.23l-.19 1.57c-.07.65-.71 1.1-1.36 1.1a5.2 5.2 0 0 0-4.15 2.54l-.03.1v8.5c0 .94-.75 1.69-1.68 1.69h-1.24a.2.2 0 0 1-.2-.21V10.58c0-.93.74-1.68 1.67-1.68h1.14c.12 0 .21.1.21.2v.92c0 .2.28.3.42.16a6 6 0 0 1 4.22-1.61c.27 0 .68.02 1.02.07m14.64.26c-.66 0-1.25.4-1.49 1l-3.65 9.08a.21.21 0 0 1-.39 0l-3.62-9.03a1.7 1.7 0 0 0-1.56-1.05h-1.78a.2.2 0 0 0-.2.29l6.12 15.05q.06.13.2.13h1.88q.15 0 .2-.13l4.1-10.25a.21.21 0 0 1 .39 0l4.1 10.25q.05.12.19.13h1.89q.13 0 .2-.13l6.1-15.05a.21.21 0 0 0-.19-.3h-1.77c-.7 0-1.3.43-1.56 1.06l-3.63 9.03a.21.21 0 0 1-.4 0l-3.64-9.07a1.6 1.6 0 0 0-1.49-1.01m21.46 15.8c-4.58 0-8-3.46-8-8.07 0-4.6 3.42-8.06 8-8.06s8 3.46 8 8.06-3.43 8.07-8 8.07m0-13.17c-2.86 0-4.87 2.27-4.87 5.1s2 5.1 4.87 5.1c2.86 0 4.87-2.27 4.87-5.1s-2-5.1-4.87-5.1m20.16-2.66a.2.2 0 0 0-.17-.23 9 9 0 0 0-1.03-.07 6 6 0 0 0-4.22 1.61c-.14.15-.42.05-.42-.16v-.91a.2.2 0 0 0-.2-.21h-1.15c-.92 0-1.68.75-1.68 1.68v13.58c0 .11.1.2.21.2h1.24c.93 0 1.68-.74 1.68-1.67v-8.5q0-.06.03-.1a5.2 5.2 0 0 1 4.15-2.56c.65 0 1.29-.44 1.37-1.09zm3.02 15.5a.2.2 0 0 1-.21-.21V2.68c0-.93.75-1.68 1.68-1.68h1.24c.11 0 .2.1.2.21v21.48c0 .93-.75 1.68-1.67 1.68zm18.8-.21c0 .11.1.2.21.2h1.14c.93 0 1.68-.74 1.68-1.67V1.2c0-.12-.1-.21-.21-.21h-1.24c-.92 0-1.68.75-1.68 1.68V9.8c0 .18-.2.28-.35.17a7.4 7.4 0 0 0-4.39-1.4 7.3 7.3 0 0 0-3.78.99 8.2 8.2 0 0 0-3.98 7.07 8.1 8.1 0 0 0 3.95 7.05 8 8 0 0 0 3.88 1.02c1.67 0 3.2-.52 4.41-1.45.15-.1.36 0 .36.17zm.37-7.55a5.05 5.05 0 1 1-10.1 0 5.05 5.05 0 0 1 10.1 0M8.77 21.66a5.05 5.05 0 1 0 0-10.1 5.05 5.05 0 0 0 0 10.1"
|
|
37
|
+
})], -1)]], 8, pe)])]), s("div", me, [T(t.$slots, "right")])]), u(k(F), null, {
|
|
38
|
+
default: P(() => [e.isSubHeaderVisible && t.$slots["sub-header"] ? (x(), o("div", he, [T(t.$slots, "sub-header")])) : a("", !0)]),
|
|
39
|
+
_: 3
|
|
40
|
+
})]));
|
|
41
|
+
}
|
|
42
|
+
}), Y = Symbol("BwSidebar"), ge = { class: "bw-sidebar relative flex h-full w-72.5 overflow-hidden bg-white" }, _e = { class: "min-h-0 w-72.5 shrink-0 overflow-y-auto overflow-x-hidden bg-white py-[25px]" }, ve = { class: "flex flex-col" }, X = /* @__PURE__ */ d({
|
|
43
|
+
__name: "BwSidebar",
|
|
44
|
+
setup(e) {
|
|
45
|
+
let t = D([]), n = r(() => t.value.find((e) => e.hasActiveChild.value)?.id ?? null), i = C(null), a = r(() => i.value && t.value.some((e) => e.id === i.value) ? i.value : n.value);
|
|
46
|
+
return S(Y, {
|
|
47
|
+
expandedId: a,
|
|
48
|
+
register: (e) => {
|
|
49
|
+
t.value = [...t.value, e];
|
|
50
|
+
},
|
|
51
|
+
unregister: (e) => {
|
|
52
|
+
t.value = t.value.filter((t) => t.id !== e);
|
|
53
|
+
},
|
|
54
|
+
toggle: (e) => {
|
|
55
|
+
i.value = i.value === e ? null : e;
|
|
56
|
+
}
|
|
57
|
+
}), (e, t) => (x(), o("div", ge, [s("nav", _e, [s("ul", ve, [T(e.$slots, "default")])])]));
|
|
58
|
+
}
|
|
59
|
+
}), ye = { class: "bw-sidebar-group not-first:mt-5" }, be = {
|
|
60
|
+
key: 0,
|
|
61
|
+
class: "mx-4 flex w-65.5 items-center gap-3 pl-6 pr-2 text-[11px] font-normal leading-[1.35] text-text-primary opacity-30"
|
|
62
|
+
}, xe = ["id"], Se = ["aria-labelledby"], Ce = /* @__PURE__ */ d({
|
|
63
|
+
__name: "BwSidebarGroup",
|
|
64
|
+
props: { label: {} },
|
|
65
|
+
setup(e) {
|
|
66
|
+
let t = A();
|
|
67
|
+
return (n, r) => (x(), o("li", ye, [e.label || n.$slots.label ? (x(), o("div", be, [s("span", {
|
|
68
|
+
id: k(t),
|
|
69
|
+
class: "shrink-0"
|
|
70
|
+
}, [T(n.$slots, "label", {}, () => [l(O(e.label), 1)])], 8, xe), r[0] ||= s("span", { class: "h-px flex-1 bg-current opacity-30" }, null, -1)])) : a("", !0), s("ul", {
|
|
71
|
+
class: "flex flex-col",
|
|
72
|
+
"aria-labelledby": e.label || n.$slots.label ? k(t) : void 0
|
|
73
|
+
}, [T(n.$slots, "default")], 8, Se)]));
|
|
74
|
+
}
|
|
75
|
+
}), we = {
|
|
76
|
+
"data-slot": "sidebar-menu-badge",
|
|
77
|
+
class: "inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full bg-action-primary px-1 text-[11px] leading-none font-normal text-white tabular-nums"
|
|
78
|
+
}, Z = /* @__PURE__ */ d({
|
|
79
|
+
__name: "BwSidebarBadge",
|
|
80
|
+
setup(e) {
|
|
81
|
+
return (e, t) => (x(), o("span", we, [T(e.$slots, "default")]));
|
|
82
|
+
}
|
|
83
|
+
}), Te = {
|
|
84
|
+
home: V,
|
|
85
|
+
donation: ae,
|
|
86
|
+
form: L,
|
|
87
|
+
campaign: te,
|
|
88
|
+
event: R,
|
|
89
|
+
donor: oe,
|
|
90
|
+
gift: z
|
|
91
|
+
}, Ee = { class: "bw-sidebar-item [.bw-sidebar-item+&]:mt-1 [.bw-sidebar-group+&]:mt-5" }, De = { class: "flex w-[17px] shrink-0 items-center justify-center" }, Oe = { class: "min-w-0 flex-1 truncate text-[15px] font-normal leading-[1.35]" }, ke = { key: 0 }, Ae = { class: "flex flex-col gap-1 pt-1" }, je = /* @__PURE__ */ d({
|
|
92
|
+
__name: "BwSidebarItem",
|
|
93
|
+
props: {
|
|
94
|
+
label: {},
|
|
95
|
+
icon: {},
|
|
96
|
+
active: { type: Boolean },
|
|
97
|
+
badge: {},
|
|
98
|
+
href: {},
|
|
99
|
+
as: {}
|
|
100
|
+
},
|
|
101
|
+
setup(c) {
|
|
102
|
+
let d = c, m = M(), h = f(Y, null), g = Symbol("BwSidebarItem");
|
|
103
|
+
function v(n) {
|
|
104
|
+
let r = [];
|
|
105
|
+
for (let i of n) p(i) && (i.type === t ? r.push(...v(i.children ?? [])) : i.type !== e && r.push(i));
|
|
106
|
+
return r;
|
|
107
|
+
}
|
|
108
|
+
let y = r(() => v(m.default?.() ?? [])), b = r(() => y.value.length > 0), S = r(() => y.value.some((e) => e.props?.active === "" || e.props?.active === !0));
|
|
109
|
+
h?.register({
|
|
110
|
+
id: g,
|
|
111
|
+
hasActiveChild: S
|
|
112
|
+
}), ee(() => h?.unregister(g));
|
|
113
|
+
let C = r(() => h?.expandedId.value === g), w = r(() => d.badge !== void 0 && d.badge !== "" || !!m.badge), D = r(() => d.icon ? typeof d.icon == "string" ? Te[d.icon] : d.icon : null), A = r(() => d.as ?? (d.href && !b.value ? "a" : "button"));
|
|
114
|
+
function j(e) {
|
|
115
|
+
let t = e;
|
|
116
|
+
t.style.height = "0px", t.style.opacity = "0", t.offsetHeight, t.style.height = `${t.scrollHeight}px`, t.style.opacity = "1";
|
|
117
|
+
}
|
|
118
|
+
function N(e) {
|
|
119
|
+
let t = e;
|
|
120
|
+
t.style.height = "", t.style.opacity = "";
|
|
121
|
+
}
|
|
122
|
+
function F(e) {
|
|
123
|
+
let t = e;
|
|
124
|
+
t.style.height = `${t.scrollHeight}px`, t.style.opacity = "1", t.offsetHeight, t.style.height = "0px", t.style.opacity = "0";
|
|
125
|
+
}
|
|
126
|
+
return (e, t) => (x(), o("li", Ee, [(x(), i(E(A.value), {
|
|
127
|
+
href: A.value === "a" ? c.href : void 0,
|
|
128
|
+
type: A.value === "button" ? "button" : void 0,
|
|
129
|
+
class: _(["mx-4 flex w-65.5 items-center gap-[7px] rounded-[4px] py-2 pl-6 pr-2 text-left text-text-primary transition-colors duration-250 ease-in-out outline-none hover:bg-surface-brand/10 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring", c.active ? "bg-surface-brand/5" : ""]),
|
|
130
|
+
"aria-expanded": b.value ? C.value : void 0,
|
|
131
|
+
"aria-current": c.active ? "page" : void 0,
|
|
132
|
+
onClick: t[0] ||= (e) => b.value ? k(h)?.toggle(k(g)) : void 0
|
|
133
|
+
}, {
|
|
134
|
+
default: P(() => [
|
|
135
|
+
s("span", De, [T(e.$slots, "icon", {}, () => [D.value ? (x(), i(E(D.value), { key: 0 })) : a("", !0)])]),
|
|
136
|
+
s("span", Oe, [T(e.$slots, "label", {}, () => [l(O(c.label), 1)])]),
|
|
137
|
+
w.value ? (x(), i(Z, { key: 0 }, {
|
|
138
|
+
default: P(() => [T(e.$slots, "badge", {}, () => [l(O(c.badge), 1)])]),
|
|
139
|
+
_: 3
|
|
140
|
+
})) : a("", !0),
|
|
141
|
+
b.value ? (x(), i(k(re), {
|
|
142
|
+
key: 1,
|
|
143
|
+
class: _(["shrink-0 transition-[rotate] duration-250 ease-in-out", C.value ? "rotate-180" : ""])
|
|
144
|
+
}, null, 8, ["class"])) : a("", !0)
|
|
145
|
+
]),
|
|
146
|
+
_: 3
|
|
147
|
+
}, 8, [
|
|
148
|
+
"href",
|
|
149
|
+
"type",
|
|
150
|
+
"class",
|
|
151
|
+
"aria-expanded",
|
|
152
|
+
"aria-current"
|
|
153
|
+
])), u(n, {
|
|
154
|
+
"enter-active-class": "overflow-hidden transition-[height,opacity] duration-250 ease-in-out",
|
|
155
|
+
"leave-active-class": "overflow-hidden transition-[height,opacity] duration-250 ease-in-out",
|
|
156
|
+
onEnter: j,
|
|
157
|
+
onAfterEnter: N,
|
|
158
|
+
onLeave: F
|
|
159
|
+
}, {
|
|
160
|
+
default: P(() => [b.value && C.value ? (x(), o("div", ke, [s("ul", Ae, [T(e.$slots, "default")])])) : a("", !0)]),
|
|
161
|
+
_: 3
|
|
162
|
+
})]));
|
|
163
|
+
}
|
|
164
|
+
}), Me = { class: "bw-sidebar-sub-item" }, Ne = { class: "min-w-0 flex-1 truncate" }, Pe = /* @__PURE__ */ d({
|
|
165
|
+
__name: "BwSidebarSubItem",
|
|
166
|
+
props: {
|
|
167
|
+
label: {},
|
|
168
|
+
active: { type: Boolean },
|
|
169
|
+
badge: {},
|
|
170
|
+
href: {},
|
|
171
|
+
as: {}
|
|
172
|
+
},
|
|
173
|
+
setup(e) {
|
|
174
|
+
let t = e, n = M(), c = r(() => t.badge !== void 0 && t.badge !== "" || !!n.badge), u = r(() => t.as ?? (t.href ? "a" : "button"));
|
|
175
|
+
return (t, n) => (x(), o("li", Me, [(x(), i(E(u.value), {
|
|
176
|
+
href: e.href,
|
|
177
|
+
type: u.value === "button" ? "button" : void 0,
|
|
178
|
+
class: _(["ml-14 mr-4 flex w-55.5 items-center gap-[7px] rounded-[4px] py-2 pl-6 pr-2 text-left text-[15px] font-normal leading-[1.35] text-text-primary transition-colors outline-none hover:bg-surface-brand/10 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring", e.active ? "bg-surface-brand/5" : ""]),
|
|
179
|
+
"aria-current": e.active ? "page" : void 0
|
|
180
|
+
}, {
|
|
181
|
+
default: P(() => [s("span", Ne, [T(t.$slots, "default", {}, () => [l(O(e.label), 1)])]), c.value ? (x(), i(Z, { key: 0 }, {
|
|
182
|
+
default: P(() => [T(t.$slots, "badge", {}, () => [l(O(e.badge), 1)])]),
|
|
183
|
+
_: 3
|
|
184
|
+
})) : a("", !0)]),
|
|
185
|
+
_: 3
|
|
186
|
+
}, 8, [
|
|
187
|
+
"href",
|
|
188
|
+
"type",
|
|
189
|
+
"class",
|
|
190
|
+
"aria-current"
|
|
191
|
+
]))]));
|
|
192
|
+
}
|
|
193
|
+
}), Fe = { class: "bw-layout flex h-full w-full flex-col bg-[#F4F4F6]" }, Ie = { class: "flex min-h-0 flex-1" }, Le = { class: "min-w-0 flex-1 overflow-y-auto" }, Re = /* @__PURE__ */ d({
|
|
194
|
+
__name: "BwLayout",
|
|
195
|
+
props: {
|
|
196
|
+
logoHref: { default: "/" },
|
|
197
|
+
isSubHeaderVisible: {
|
|
198
|
+
type: Boolean,
|
|
199
|
+
default: !1
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
setup(e) {
|
|
203
|
+
return (t, n) => (x(), o("div", Fe, [u(k(J), {
|
|
204
|
+
class: "shrink-0",
|
|
205
|
+
"logo-href": e.logoHref,
|
|
206
|
+
"is-sub-header-visible": e.isSubHeaderVisible
|
|
207
|
+
}, c({ _: 2 }, [
|
|
208
|
+
t.$slots["header-left"] ? {
|
|
209
|
+
name: "left",
|
|
210
|
+
fn: P(() => [T(t.$slots, "header-left")]),
|
|
211
|
+
key: "0"
|
|
212
|
+
} : void 0,
|
|
213
|
+
t.$slots["header-right"] ? {
|
|
214
|
+
name: "right",
|
|
215
|
+
fn: P(() => [T(t.$slots, "header-right")]),
|
|
216
|
+
key: "1"
|
|
217
|
+
} : void 0,
|
|
218
|
+
t.$slots["sub-header"] ? {
|
|
219
|
+
name: "sub-header",
|
|
220
|
+
fn: P(() => [T(t.$slots, "sub-header")]),
|
|
221
|
+
key: "2"
|
|
222
|
+
} : void 0
|
|
223
|
+
]), 1032, ["logo-href", "is-sub-header-visible"]), s("div", Ie, [t.$slots.sidebar ? (x(), i(k(X), { key: 0 }, {
|
|
224
|
+
default: P(() => [T(t.$slots, "sidebar")]),
|
|
225
|
+
_: 3
|
|
226
|
+
})) : a("", !0), s("main", Le, [T(t.$slots, "default")])])]));
|
|
227
|
+
}
|
|
228
|
+
}), ze = { class: "flex h-6 w-6 items-center justify-center" }, Be = { class: "relative flex min-w-0 flex-1 flex-col gap-1.5" }, Ve = { class: "text-[18px] leading-[1.2]" }, He = {
|
|
229
|
+
key: 0,
|
|
230
|
+
class: "text-[13px] font-light leading-[1.2] text-text-primary/70"
|
|
231
|
+
}, Ue = {
|
|
232
|
+
key: 1,
|
|
233
|
+
class: "relative flex shrink-0 items-center"
|
|
234
|
+
}, We = {
|
|
235
|
+
"aria-hidden": "true",
|
|
236
|
+
class: "grid h-6 w-6 place-items-center"
|
|
237
|
+
}, Ge = {
|
|
238
|
+
key: 1,
|
|
239
|
+
class: "h-5.5 w-5.5 rounded-[5px] border-[1.5px] border-text-primary [grid-area:1/1]"
|
|
240
|
+
}, Ke = "shadow-[30px_0px_64px_0px_#3A4E610D,0px_6px_24px_0px_#0000001A,0px_4px_4px_0px_#0000000D] hover:shadow-[30px_0px_64px_0px_#3A4E610D,0px_4px_4px_0px_#0000000D]", qe = /* @__PURE__ */ d({
|
|
241
|
+
__name: "BwOnboardingCampaignCardCreation",
|
|
242
|
+
props: /*@__PURE__*/ h({
|
|
243
|
+
type: {},
|
|
244
|
+
title: { default: "" },
|
|
245
|
+
subtitle: { default: "" },
|
|
246
|
+
canSelect: {
|
|
247
|
+
type: Boolean,
|
|
248
|
+
default: !1
|
|
249
|
+
},
|
|
250
|
+
active: {
|
|
251
|
+
type: Boolean,
|
|
252
|
+
default: !1
|
|
253
|
+
},
|
|
254
|
+
showIcon: {
|
|
255
|
+
type: Boolean,
|
|
256
|
+
default: !0
|
|
257
|
+
}
|
|
258
|
+
}, {
|
|
259
|
+
modelValue: {
|
|
260
|
+
type: Boolean,
|
|
261
|
+
default: !1
|
|
262
|
+
},
|
|
263
|
+
modelModifiers: {}
|
|
264
|
+
}),
|
|
265
|
+
emits: ["update:modelValue"],
|
|
266
|
+
setup(e) {
|
|
267
|
+
let t = e, c = j(e, "modelValue"), d = {
|
|
268
|
+
auction: K,
|
|
269
|
+
"live-auction": U,
|
|
270
|
+
donation: L,
|
|
271
|
+
impact: H,
|
|
272
|
+
crowdfunding: ie,
|
|
273
|
+
paddleraise: W,
|
|
274
|
+
"peer-to-peer": G,
|
|
275
|
+
"ticketed-event": R,
|
|
276
|
+
giveaway: B,
|
|
277
|
+
"a-thons": I
|
|
278
|
+
}, f = r(() => t.active || c.value), p = C("50% 50%"), m = C(null);
|
|
279
|
+
async function h(e) {
|
|
280
|
+
if (!t.canSelect) return;
|
|
281
|
+
let n = e.currentTarget.getBoundingClientRect(), r = e.detail > 0 ? `${e.clientX - n.left}px ${e.clientY - n.top}px` : "50% 50%", i = m.value;
|
|
282
|
+
i && r !== p.value && (i.style.transition = "none", p.value = r, await g(), i.offsetWidth, i.style.transition = ""), c.value = !c.value;
|
|
283
|
+
}
|
|
284
|
+
let y = r(() => ({ clipPath: `circle(${f.value ? "150%" : "0%"} at ${p.value})` })), b = r(() => f.value ? "bg-action-primary/15 text-action-primary" : "bg-surface-brand/15 text-text-primary");
|
|
285
|
+
return (t, r) => (x(), i(E(e.canSelect ? "button" : "div"), {
|
|
286
|
+
type: e.canSelect ? "button" : void 0,
|
|
287
|
+
role: e.canSelect ? "checkbox" : void 0,
|
|
288
|
+
"aria-checked": e.canSelect ? c.value : void 0,
|
|
289
|
+
class: _(["relative flex w-full items-center gap-6 rounded-[24px] border border-white bg-white/40 px-5 py-4.5 text-left text-text-primary [transition:box-shadow_200ms_ease,transform_200ms_cubic-bezier(0.34,1.56,0.64,1)] motion-reduce:transition-none", [Ke, e.canSelect && "cursor-pointer active:scale-[0.99] focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-action-primary"]]),
|
|
290
|
+
onClick: h
|
|
291
|
+
}, {
|
|
292
|
+
default: P(() => [
|
|
293
|
+
s("span", {
|
|
294
|
+
ref_key: "rippleLayer",
|
|
295
|
+
ref: m,
|
|
296
|
+
"aria-hidden": "true",
|
|
297
|
+
class: "pointer-events-none absolute inset-0 rounded-[inherit] bg-[linear-gradient(158.53deg,#FFFFFF_20.63%,rgba(255,255,255,0.4)_100%)] [transition:clip-path_200ms_cubic-bezier(0.4,0,0.2,1)] motion-reduce:transition-none",
|
|
298
|
+
style: v(y.value)
|
|
299
|
+
}, null, 4),
|
|
300
|
+
e.showIcon ? (x(), o("span", {
|
|
301
|
+
key: 0,
|
|
302
|
+
"aria-hidden": "true",
|
|
303
|
+
class: _(["relative flex shrink-0 items-center justify-center rounded-lg p-5 transition-colors duration-200 motion-reduce:transition-none", b.value])
|
|
304
|
+
}, [s("span", ze, [(x(), i(E(d[e.type])))])], 2)) : a("", !0),
|
|
305
|
+
s("span", Be, [s("span", Ve, [T(t.$slots, "title", {}, () => [l(O(e.title), 1)])]), e.subtitle || t.$slots.subtitle ? (x(), o("span", He, [T(t.$slots, "subtitle", {}, () => [l(O(e.subtitle), 1)])])) : a("", !0)]),
|
|
306
|
+
e.canSelect || t.$slots.right ? (x(), o("span", Ue, [T(t.$slots, "right", { selected: c.value }, () => [s("span", We, [u(n, {
|
|
307
|
+
"enter-active-class": "transition duration-200 ease-[cubic-bezier(0.34,1.56,0.64,1)] motion-reduce:transition-none",
|
|
308
|
+
"enter-from-class": "opacity-0 scale-50",
|
|
309
|
+
"leave-active-class": "transition duration-100 ease-in motion-reduce:transition-none",
|
|
310
|
+
"leave-to-class": "opacity-0 scale-75"
|
|
311
|
+
}, {
|
|
312
|
+
default: P(() => [c.value ? (x(), i(k(ne), {
|
|
313
|
+
key: 0,
|
|
314
|
+
class: "text-action-primary [grid-area:1/1]",
|
|
315
|
+
width: "24",
|
|
316
|
+
height: "24"
|
|
317
|
+
})) : (x(), o("span", Ge))]),
|
|
318
|
+
_: 1
|
|
319
|
+
})])])])) : a("", !0)
|
|
320
|
+
]),
|
|
321
|
+
_: 3
|
|
322
|
+
}, 8, [
|
|
323
|
+
"type",
|
|
324
|
+
"role",
|
|
325
|
+
"aria-checked",
|
|
326
|
+
"class"
|
|
327
|
+
]));
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
// src/composables/useChart.ts
|
|
331
|
+
ce([q, le]);
|
|
332
|
+
function Je(e, t) {
|
|
333
|
+
let n = D(), r;
|
|
334
|
+
return b(() => {
|
|
335
|
+
e.value && (n.value = m(se(e.value, void 0, { renderer: "svg" })), n.value.setOption(t.value), r = new ResizeObserver(() => n.value?.resize()), r.observe(e.value));
|
|
336
|
+
}), N(t, (e) => n.value?.setOption(e), { deep: !0 }), y(() => {
|
|
337
|
+
r?.disconnect(), n.value?.dispose();
|
|
338
|
+
}), { chart: n };
|
|
339
|
+
}
|
|
340
|
+
// src/components/ticket/TicketStatsRing.vue?vue&type=script&setup=true&lang.ts
|
|
341
|
+
var Ye = ["aria-label"], Xe = { class: "pointer-events-none absolute inset-0 flex items-center justify-center text-[11px] leading-none" }, Q = 44, Ze = "77%", Qe = /* @__PURE__ */ d({
|
|
342
|
+
__name: "TicketStatsRing",
|
|
343
|
+
props: {
|
|
344
|
+
percent: {},
|
|
345
|
+
label: {},
|
|
346
|
+
summary: {}
|
|
347
|
+
},
|
|
348
|
+
setup(e) {
|
|
349
|
+
let t = e, n = C(null);
|
|
350
|
+
return Je(n, r(() => ({ series: [{
|
|
351
|
+
type: "pie",
|
|
352
|
+
radius: [Ze, "100%"],
|
|
353
|
+
startAngle: 90,
|
|
354
|
+
clockwise: !0,
|
|
355
|
+
silent: !0,
|
|
356
|
+
label: { show: !1 },
|
|
357
|
+
labelLine: { show: !1 },
|
|
358
|
+
animationDuration: 800,
|
|
359
|
+
animationDurationUpdate: 800,
|
|
360
|
+
animationEasing: "cubicOut",
|
|
361
|
+
animationEasingUpdate: "cubicOut",
|
|
362
|
+
data: [{
|
|
363
|
+
value: t.percent,
|
|
364
|
+
itemStyle: { color: "#1D9E75" }
|
|
365
|
+
}, {
|
|
366
|
+
value: 100 - t.percent,
|
|
367
|
+
itemStyle: { color: "#D9D9D9" }
|
|
368
|
+
}]
|
|
369
|
+
}] }))), (t, r) => (x(), o("div", {
|
|
370
|
+
class: "relative shrink-0",
|
|
371
|
+
style: v({
|
|
372
|
+
width: `${Q}px`,
|
|
373
|
+
height: `${Q}px`
|
|
374
|
+
}),
|
|
375
|
+
role: "img",
|
|
376
|
+
"aria-label": e.summary
|
|
377
|
+
}, [s("div", {
|
|
378
|
+
ref_key: "el",
|
|
379
|
+
ref: n,
|
|
380
|
+
class: "h-full w-full",
|
|
381
|
+
"aria-hidden": "true"
|
|
382
|
+
}, null, 512), s("span", Xe, O(e.label), 1)], 12, Ye));
|
|
383
|
+
}
|
|
384
|
+
}), $e = { class: "flex flex-col gap-3 rounded-lg border border-solid border-transparent px-3.5 py-3 text-text-primary shadow-[0px_5px_20px_0px_#3A4E6112] [background:linear-gradient(#FFFFFF,#FFFFFF)_padding-box,linear-gradient(180deg,rgba(229,232,235,0)_0%,#E5E8EB_100%)_border-box]" }, et = { class: "flex items-center gap-2" }, tt = {
|
|
385
|
+
key: 0,
|
|
386
|
+
class: "flex shrink-0 items-center",
|
|
387
|
+
"aria-hidden": "true"
|
|
388
|
+
}, nt = { class: "text-[14px] leading-normal" }, rt = { class: "flex items-center gap-3" }, it = { class: "flex min-w-0 flex-col" }, at = { class: "text-[32px] leading-none" }, ot = {
|
|
389
|
+
key: 0,
|
|
390
|
+
class: "mt-1 text-[10px] uppercase leading-normal tracking-[0.9px]"
|
|
391
|
+
}, st = /* @__PURE__ */ d({
|
|
392
|
+
__name: "BwTicketStatsCard",
|
|
393
|
+
props: {
|
|
394
|
+
icon: {},
|
|
395
|
+
title: {},
|
|
396
|
+
chartData: {},
|
|
397
|
+
description: {},
|
|
398
|
+
subText: {}
|
|
399
|
+
},
|
|
400
|
+
setup(e) {
|
|
401
|
+
let t = e, n = r(() => {
|
|
402
|
+
let e = t.chartData;
|
|
403
|
+
return !e || e.total <= 0 ? 0 : Math.min(100, Math.max(0, e.value / e.total * 100));
|
|
404
|
+
}), c = r(() => t.chartData?.label ?? `${Math.round(n.value)}%`);
|
|
405
|
+
return (t, r) => (x(), o("div", $e, [
|
|
406
|
+
s("div", et, [
|
|
407
|
+
T(t.$slots, "pre-header"),
|
|
408
|
+
e.icon ? (x(), o("span", tt, [(x(), i(E(e.icon)))])) : a("", !0),
|
|
409
|
+
s("span", nt, O(e.title), 1)
|
|
410
|
+
]),
|
|
411
|
+
r[0] ||= s("hr", { class: "m-0 border-0 border-t-[0.5px] border-solid border-t-[rgba(58,78,97,0.15)]" }, null, -1),
|
|
412
|
+
s("div", rt, [e.chartData ? (x(), i(Qe, {
|
|
413
|
+
key: 0,
|
|
414
|
+
percent: n.value,
|
|
415
|
+
label: c.value,
|
|
416
|
+
summary: `${e.chartData.value} of ${e.chartData.total} (${c.value})`
|
|
417
|
+
}, null, 8, [
|
|
418
|
+
"percent",
|
|
419
|
+
"label",
|
|
420
|
+
"summary"
|
|
421
|
+
])) : a("", !0), s("div", it, [T(t.$slots, "body", {}, () => [s("span", at, [T(t.$slots, "description", {}, () => [l(O(e.description), 1)])]), e.subText ? (x(), o("span", ot, O(e.subText), 1)) : a("", !0)])])])
|
|
422
|
+
]));
|
|
423
|
+
}
|
|
424
|
+
}), ct = {
|
|
425
|
+
Auction: "auction",
|
|
426
|
+
LiveAuction: "live-auction",
|
|
427
|
+
Donation: "donation",
|
|
428
|
+
Impact: "impact",
|
|
429
|
+
Crowdfunding: "crowdfunding",
|
|
430
|
+
PaddleRaise: "paddleraise",
|
|
431
|
+
PeerToPeer: "peer-to-peer",
|
|
432
|
+
TicketedEvent: "ticketed-event",
|
|
433
|
+
Giveaway: "giveaway",
|
|
434
|
+
Athons: "a-thons"
|
|
435
|
+
}, lt = { class: "py-3 px-4 shadow-high rounded-sm" }, ut = { class: "text-text-primary font-medium" }, dt = { class: "mt-4" }, ft = { class: "font-medium" }, $ = /* @__PURE__ */ d({
|
|
436
|
+
__name: "CampaignCard",
|
|
437
|
+
props: {
|
|
438
|
+
title: {},
|
|
439
|
+
items: {}
|
|
440
|
+
},
|
|
441
|
+
setup(e) {
|
|
442
|
+
return (n, r) => (x(), o("div", lt, [s("h6", ut, O(e.title), 1), s("div", dt, [(x(!0), o(t, null, w(e.items, (e, t) => (x(), o("div", {
|
|
443
|
+
key: t,
|
|
444
|
+
class: "flex items-center gap-1"
|
|
445
|
+
}, [s("span", null, O(e.label) + ":", 1), s("span", ft, O(e.value), 1)]))), 128))])]));
|
|
446
|
+
}
|
|
447
|
+
}), pt = { class: "flex gap-2.5 items-center text-left" }, mt = {
|
|
448
|
+
key: 0,
|
|
449
|
+
class: "rounded-xs bg-surface-brand w-12 h-12"
|
|
450
|
+
}, ht = ["src"], gt = ["href"], _t = { class: "text-base leading-6 lg:text-[20px] font-normal mt-1 text-text-primary" }, vt = /* @__PURE__ */ d({
|
|
451
|
+
__name: "OrganizationLogo",
|
|
452
|
+
props: {
|
|
453
|
+
logoUrl: {},
|
|
454
|
+
organizationName: {},
|
|
455
|
+
organizationUrl: {}
|
|
456
|
+
},
|
|
457
|
+
setup(e) {
|
|
458
|
+
return (t, n) => (x(), o("div", pt, [e.logoUrl ? (x(), o("div", mt, [s("img", {
|
|
459
|
+
src: e.logoUrl,
|
|
460
|
+
alt: "Logo",
|
|
461
|
+
width: "48",
|
|
462
|
+
height: "48",
|
|
463
|
+
class: "rounded-[inherit] w-[inherit] h-[inherit]"
|
|
464
|
+
}, null, 8, ht)])) : a("", !0), s("div", null, [n[1] ||= s("div", { class: "text-sm m-0 text-pineStone" }, " Organized by ", -1), s("a", {
|
|
465
|
+
href: e.organizationUrl,
|
|
466
|
+
class: "no-underline flex items-center gap-1 hover:gap-2 hover:underline transition-all"
|
|
467
|
+
}, [s("span", _t, O(e.organizationName), 1), n[0] ||= s("svg", {
|
|
468
|
+
width: "9",
|
|
469
|
+
height: "7",
|
|
470
|
+
viewBox: "0 0 9 7",
|
|
471
|
+
fill: "none",
|
|
472
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
473
|
+
class: "mt-1"
|
|
474
|
+
}, [s("path", {
|
|
475
|
+
d: "M5.66675 1L7.99995 3.33321L5.66675 5.66641",
|
|
476
|
+
stroke: "currentColor",
|
|
477
|
+
"stroke-linecap": "round",
|
|
478
|
+
"stroke-linejoin": "round"
|
|
479
|
+
}), s("path", {
|
|
480
|
+
d: "M7.22192 3.33325L1.00004 3.33325",
|
|
481
|
+
stroke: "currentColor",
|
|
482
|
+
"stroke-linecap": "round"
|
|
483
|
+
})], -1)], 8, gt)])]));
|
|
484
|
+
}
|
|
485
|
+
}), yt = { install() {} };
|
|
486
|
+
export { J as BwHeader, Re as BwLayout, qe as BwOnboardingCampaignCardCreation, X as BwSidebar, Ce as BwSidebarGroup, je as BwSidebarItem, Pe as BwSidebarSubItem, st as BwTicketStatsCard, $ as CampaignCard, ct as CampaignType, vt as OrganizationLogo, yt as default };
|
|
487
|
+
|
|
488
|
+
//# sourceMappingURL=index.js.map
|