@feedmepos/mf-miniprogram-v2 0.2.1 → 0.2.2-dev.1
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/App-C-7evg9W.js +216 -0
- package/dist/BrandKitView-B8t8RkHr.js +221 -0
- package/dist/{ControlPlaneView-6H0B_TRn.js → ControlPlaneView-DmhLvgWt.js} +7208 -7206
- package/dist/EcosystemView--S4hk_t4.js +232 -0
- package/dist/LegacyWorkspaceEntry-7DvIosoj.js +36 -0
- package/dist/ModuleCenterView-Dqp-2hbL.js +147 -0
- package/dist/{ModuleDetailView-Ux0RKyv9.js → ModuleDetailView-cpQ_UfS9.js} +63 -65
- package/dist/PagesView-CrVOYOT9.js +43 -0
- package/dist/PlatformUnavailableView-Cdy-1zpi.js +40 -0
- package/dist/PortalIcon-D1RqQMzD.js +19 -0
- package/dist/PortalSettingsView-CkW-avwg.js +123 -0
- package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-Bh9Eoe_H.js +26 -0
- package/dist/WorkspaceEntryView-ZdXuMQoJ.js +21 -0
- package/dist/app.js +49 -11
- package/dist/controlPlane-wUT1G_Gr.js +144 -0
- package/dist/index-BDHUHtRw.js +46 -0
- package/dist/localPreference-DneUpUrQ.js +34 -0
- package/dist/package.json +2 -1
- package/dist/portalContext-CTVzkJV7.js +47 -0
- package/dist/portalNavigation-DKCfwTH8.js +28 -0
- package/dist/routes-L0ady_Wy.js +53 -0
- package/dist/style.css +1 -1
- package/dist/useBrandKit-CpyR2j6m.js +924 -0
- package/dist/{useModuleCatalog-C1Mk1Cdu.js → useModuleCatalog-CD5N246F.js} +16 -15
- package/package.json +2 -1
- package/dist/App-CaNGbhK8.js +0 -20
- package/dist/AppTabs.vue_vue_type_script_setup_true_lang-BGhFS69-.js +0 -274
- package/dist/ModuleCenterView-DTCi7hm2.js +0 -148
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { defineComponent as F, computed as v, ref as T, onMounted as R, onBeforeUnmount as z, resolveComponent as y, openBlock as s, createElementBlock as i, Fragment as S, createElementVNode as a, normalizeClass as x, createVNode as l, renderList as M, unref as t, withCtx as c, toDisplayString as b, createCommentVNode as E, createTextVNode as N, createBlock as V } from "vue";
|
|
2
|
+
import { useRoute as K, RouterView as O } from "vue-router";
|
|
3
|
+
import { useCoreStore as A } from "@feedmepos/mf-common";
|
|
4
|
+
import { P as f } from "./PortalIcon-D1RqQMzD.js";
|
|
5
|
+
import { p as $ } from "./portalContext-CTVzkJV7.js";
|
|
6
|
+
import { w as D, p as k } from "./portalNavigation-DKCfwTH8.js";
|
|
7
|
+
import { r as G, w as Q } from "./localPreference-DneUpUrQ.js";
|
|
8
|
+
import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
+
const H = {
|
|
10
|
+
class: "portal-sidebar",
|
|
11
|
+
"aria-label": "Mini Program navigation"
|
|
12
|
+
}, J = ["aria-expanded", "aria-label"], W = {
|
|
13
|
+
id: "miniprogram-navigation",
|
|
14
|
+
class: "portal-nav"
|
|
15
|
+
}, X = { class: "portal-nav-label" }, Y = { class: "portal-nav-label" }, Z = { class: "portal-main" }, ee = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "portal-breadcrumb",
|
|
18
|
+
"aria-label": "Breadcrumb"
|
|
19
|
+
}, ae = {
|
|
20
|
+
id: "miniprogram-content",
|
|
21
|
+
class: "portal-content",
|
|
22
|
+
tabindex: "-1"
|
|
23
|
+
}, te = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "portal-empty"
|
|
26
|
+
}, oe = {
|
|
27
|
+
key: 1,
|
|
28
|
+
class: "portal-loading",
|
|
29
|
+
role: "status"
|
|
30
|
+
}, le = {
|
|
31
|
+
key: 2,
|
|
32
|
+
class: "portal-empty",
|
|
33
|
+
role: "alert"
|
|
34
|
+
}, re = {
|
|
35
|
+
key: 3,
|
|
36
|
+
class: "portal-empty"
|
|
37
|
+
}, ne = /* @__PURE__ */ F({
|
|
38
|
+
__name: "App",
|
|
39
|
+
setup(se) {
|
|
40
|
+
const r = K(), _ = A(), n = $(), p = v(() => r.name === "miniprogram-v2-project"), m = T(
|
|
41
|
+
G(
|
|
42
|
+
"mpv2:portal-collapsed",
|
|
43
|
+
p.value || typeof window < "u" && window.matchMedia("(max-width: 1000px)").matches
|
|
44
|
+
)
|
|
45
|
+
), g = v(() => {
|
|
46
|
+
var u;
|
|
47
|
+
return (u = n.context.value) == null ? void 0 : u.projectId;
|
|
48
|
+
}), q = v(() => p.value && r.params.projectId !== g.value), B = v(
|
|
49
|
+
() => {
|
|
50
|
+
var u;
|
|
51
|
+
return p.value ? (u = n.context.value) == null ? void 0 : u.project.name : String(r.meta.title ?? "Ecosystem");
|
|
52
|
+
}
|
|
53
|
+
), I = [
|
|
54
|
+
{ name: "miniprogram-v2-ecosystem", label: "Ecosystem", icon: "ecosystem" },
|
|
55
|
+
{ name: "miniprogram-v2-brand-kit", label: "Brand Kit", icon: "brand" },
|
|
56
|
+
{ name: "miniprogram-v2-pages", label: "Pages", icon: "pages" }
|
|
57
|
+
], C = v(
|
|
58
|
+
() => g.value ? D(g.value, "workspace", r.query) : { name: "miniprogram-v2-control", query: r.query }
|
|
59
|
+
);
|
|
60
|
+
let P = !1;
|
|
61
|
+
R(() => {
|
|
62
|
+
P = _.hideSidebar.value, _.hideSidebar.value = !0;
|
|
63
|
+
}), z(() => {
|
|
64
|
+
_.hideSidebar.value = P;
|
|
65
|
+
});
|
|
66
|
+
function h() {
|
|
67
|
+
m.value = !m.value, Q("mpv2:portal-collapsed", m.value);
|
|
68
|
+
}
|
|
69
|
+
return (u, e) => {
|
|
70
|
+
const d = y("RouterLink"), w = y("FmIcon"), j = y("FmCircularProgress"), L = y("FmButton");
|
|
71
|
+
return s(), i(S, null, [
|
|
72
|
+
e[14] || (e[14] = a("link", {
|
|
73
|
+
href: "https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0..1,0",
|
|
74
|
+
rel: "stylesheet"
|
|
75
|
+
}, null, -1)),
|
|
76
|
+
a("div", {
|
|
77
|
+
class: x(["mpv2-app portal-shell", { "portal-shell--collapsed": m.value }])
|
|
78
|
+
}, [
|
|
79
|
+
e[13] || (e[13] = a("a", {
|
|
80
|
+
class: "portal-skip",
|
|
81
|
+
href: "#miniprogram-content"
|
|
82
|
+
}, "Skip to content", -1)),
|
|
83
|
+
a("aside", H, [
|
|
84
|
+
a("button", {
|
|
85
|
+
class: "portal-sidebar-toggle",
|
|
86
|
+
type: "button",
|
|
87
|
+
"aria-expanded": !m.value,
|
|
88
|
+
"aria-controls": "miniprogram-navigation",
|
|
89
|
+
"aria-label": m.value ? "Expand navigation" : "Collapse navigation",
|
|
90
|
+
onClick: h
|
|
91
|
+
}, [
|
|
92
|
+
l(f, { name: "collapse" }),
|
|
93
|
+
e[0] || (e[0] = a("span", { class: "portal-nav-label" }, "Mini Program", -1))
|
|
94
|
+
], 8, J),
|
|
95
|
+
a("nav", W, [
|
|
96
|
+
(s(), i(S, null, M(I, (o) => l(d, {
|
|
97
|
+
key: o.name,
|
|
98
|
+
to: { name: o.name, query: t(k)(t(r).query) },
|
|
99
|
+
class: "portal-nav-item",
|
|
100
|
+
title: o.label,
|
|
101
|
+
"aria-label": o.label,
|
|
102
|
+
"aria-current": t(r).name === o.name ? "page" : void 0
|
|
103
|
+
}, {
|
|
104
|
+
default: c(() => [
|
|
105
|
+
l(f, {
|
|
106
|
+
name: o.icon
|
|
107
|
+
}, null, 8, ["name"]),
|
|
108
|
+
a("span", X, b(o.label), 1)
|
|
109
|
+
]),
|
|
110
|
+
_: 2
|
|
111
|
+
}, 1032, ["to", "title", "aria-label", "aria-current"])), 64)),
|
|
112
|
+
e[3] || (e[3] = a("p", { class: "portal-nav-caption" }, "Platforms", -1)),
|
|
113
|
+
l(d, {
|
|
114
|
+
to: C.value,
|
|
115
|
+
class: x(["portal-nav-item", { "router-link-active": p.value }]),
|
|
116
|
+
title: "Mobile Ordering",
|
|
117
|
+
"aria-label": "Mobile Ordering",
|
|
118
|
+
"aria-current": p.value ? "page" : void 0
|
|
119
|
+
}, {
|
|
120
|
+
default: c(() => [
|
|
121
|
+
l(f, { name: "mobile" }),
|
|
122
|
+
e[1] || (e[1] = a("span", { class: "portal-nav-label" }, "Mobile Ordering", -1))
|
|
123
|
+
]),
|
|
124
|
+
_: 1
|
|
125
|
+
}, 8, ["to", "class", "aria-current"]),
|
|
126
|
+
(s(), i(S, null, M(["tablet", "kiosk"], (o) => l(d, {
|
|
127
|
+
key: o,
|
|
128
|
+
to: { name: `miniprogram-v2-${o}`, query: t(k)(t(r).query) },
|
|
129
|
+
class: "portal-nav-item",
|
|
130
|
+
title: o === "tablet" ? "Tablet" : "Kiosk",
|
|
131
|
+
"aria-label": o === "tablet" ? "Tablet" : "Kiosk"
|
|
132
|
+
}, {
|
|
133
|
+
default: c(() => [
|
|
134
|
+
l(f, { name: o }, null, 8, ["name"]),
|
|
135
|
+
a("span", Y, b(o === "tablet" ? "Tablet" : "Kiosk"), 1)
|
|
136
|
+
]),
|
|
137
|
+
_: 2
|
|
138
|
+
}, 1032, ["to", "title", "aria-label"])), 64)),
|
|
139
|
+
e[4] || (e[4] = a("div", { class: "portal-nav-divider" }, null, -1)),
|
|
140
|
+
l(d, {
|
|
141
|
+
to: { name: "miniprogram-v2-module-center", query: t(k)(t(r).query) },
|
|
142
|
+
class: x(["portal-nav-item", { "router-link-active": t(r).name === "miniprogram-v2-module-detail" }]),
|
|
143
|
+
title: "Module library",
|
|
144
|
+
"aria-label": "Module library"
|
|
145
|
+
}, {
|
|
146
|
+
default: c(() => [
|
|
147
|
+
l(w, {
|
|
148
|
+
name: "widgets",
|
|
149
|
+
size: "md"
|
|
150
|
+
}),
|
|
151
|
+
e[2] || (e[2] = a("span", { class: "portal-nav-label" }, "Module library", -1))
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
}, 8, ["to", "class"])
|
|
155
|
+
]),
|
|
156
|
+
l(d, {
|
|
157
|
+
to: { name: "miniprogram-v2-settings", query: t(k)(t(r).query) },
|
|
158
|
+
class: "portal-nav-item portal-settings-link",
|
|
159
|
+
title: "Settings",
|
|
160
|
+
"aria-label": "Settings"
|
|
161
|
+
}, {
|
|
162
|
+
default: c(() => [
|
|
163
|
+
l(w, {
|
|
164
|
+
name: "settings",
|
|
165
|
+
size: "md"
|
|
166
|
+
}),
|
|
167
|
+
e[5] || (e[5] = a("span", { class: "portal-nav-label" }, "Settings", -1))
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
}, 8, ["to"])
|
|
171
|
+
]),
|
|
172
|
+
a("div", Z, [
|
|
173
|
+
p.value ? E("", !0) : (s(), i("header", ee, [
|
|
174
|
+
a("span", null, b(t(n).businessName.value), 1),
|
|
175
|
+
e[6] || (e[6] = a("span", { "aria-hidden": "true" }, "/", -1)),
|
|
176
|
+
a("span", null, b(B.value), 1)
|
|
177
|
+
])),
|
|
178
|
+
a("div", ae, [
|
|
179
|
+
t(n).businessId.value ? t(n).loading.value ? (s(), i("div", oe, [
|
|
180
|
+
l(j, { size: "xl" }),
|
|
181
|
+
e[8] || (e[8] = a("span", null, "Loading your Mini Program…", -1))
|
|
182
|
+
])) : t(n).error.value ? (s(), i("section", le, [
|
|
183
|
+
e[9] || (e[9] = a("h1", null, "Could not open this Mini Program", -1)),
|
|
184
|
+
a("p", null, b(t(n).error.value), 1),
|
|
185
|
+
l(L, {
|
|
186
|
+
label: "Try again",
|
|
187
|
+
onClick: t(n).refresh
|
|
188
|
+
}, null, 8, ["onClick"])
|
|
189
|
+
])) : q.value ? (s(), i("section", re, [
|
|
190
|
+
e[11] || (e[11] = a("h1", null, "Project unavailable", -1)),
|
|
191
|
+
e[12] || (e[12] = a("p", null, "This link does not point to the selected business’s current mobile project.", -1)),
|
|
192
|
+
l(d, {
|
|
193
|
+
to: C.value,
|
|
194
|
+
class: "portal-link-button"
|
|
195
|
+
}, {
|
|
196
|
+
default: c(() => [...e[10] || (e[10] = [
|
|
197
|
+
N("Open current project", -1)
|
|
198
|
+
])]),
|
|
199
|
+
_: 1
|
|
200
|
+
}, 8, ["to"])
|
|
201
|
+
])) : (s(), V(t(O), {
|
|
202
|
+
key: `${t(n).businessId.value}:${g.value}`
|
|
203
|
+
})) : (s(), i("section", te, [...e[7] || (e[7] = [
|
|
204
|
+
a("h1", null, "Select a business", -1),
|
|
205
|
+
a("p", null, "Choose a business in the Portal header to open its Mini Program.", -1)
|
|
206
|
+
])]))
|
|
207
|
+
])
|
|
208
|
+
])
|
|
209
|
+
], 2)
|
|
210
|
+
], 64);
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}), ge = /* @__PURE__ */ U(ne, [["__scopeId", "data-v-693787ad"]]);
|
|
214
|
+
export {
|
|
215
|
+
ge as default
|
|
216
|
+
};
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { defineComponent as U, ref as $, computed as N, onMounted as w, onScopeDispose as P, resolveComponent as K, openBlock as l, createElementBlock as r, createElementVNode as t, unref as s, toDisplayString as u, createCommentVNode as d, createVNode as v, createTextVNode as F, createBlock as R, Fragment as b, renderList as m, withDirectives as g, vModelText as y, createStaticVNode as H } from "vue";
|
|
2
|
+
import { useRouter as M, onBeforeRouteLeave as O } from "vue-router";
|
|
3
|
+
import { useDialog as Y } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as G, C as S, t as V, F as z, u as j, i as q } from "./useBrandKit-CpyR2j6m.js";
|
|
5
|
+
import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
const Q = { class: "portal-page" }, W = { class: "portal-page-inner brand-page" }, X = { class: "portal-page-heading" }, Z = { class: "brand-actions" }, aa = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "brand-unsaved"
|
|
9
|
+
}, ta = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "portal-notice"
|
|
12
|
+
}, ea = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "portal-loading",
|
|
15
|
+
role: "status"
|
|
16
|
+
}, sa = {
|
|
17
|
+
key: 2,
|
|
18
|
+
role: "alert",
|
|
19
|
+
class: "portal-section portal-error"
|
|
20
|
+
}, oa = {
|
|
21
|
+
key: 3,
|
|
22
|
+
role: "status"
|
|
23
|
+
}, na = { class: "portal-section" }, la = { class: "portal-section-head" }, ra = { class: "brand-color-grid" }, ia = ["value", "aria-label", "disabled", "onInput"], da = { class: "brand-field-label" }, ua = ["onUpdate:modelValue", "aria-label", "aria-invalid", "disabled"], ca = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "portal-error"
|
|
26
|
+
}, pa = { class: "brand-advanced" }, va = { class: "brand-role-grid" }, ba = ["value", "aria-label", "disabled", "onInput"], ha = ["onUpdate:modelValue", "aria-label", "aria-invalid", "disabled"], ma = { class: "portal-section" }, ga = { class: "portal-section-head" }, ya = { class: "brand-font-grid" }, _a = ["onUpdate:modelValue", "disabled", "aria-label"], fa = /* @__PURE__ */ U({
|
|
27
|
+
__name: "BrandKitView",
|
|
28
|
+
setup(ka) {
|
|
29
|
+
const a = j(), _ = G(), f = Y(), A = M(), c = $(!1), k = ["primary", "secondary", "accent", "background.base", "text.primary"], D = k.map((n) => S.find((o) => o.path === n)), I = S.filter((n) => !k.includes(n.path)), E = N(
|
|
30
|
+
() => !_.value || !a.state.loaded || a.state.loading || a.state.saving || a.hasInvalidColor.value || a.dirtyCount.value === 0
|
|
31
|
+
), h = (n) => !!(a.state.colors[n] && !q(a.state.colors[n]));
|
|
32
|
+
function C(n, o) {
|
|
33
|
+
a.state.colors[n] = o.target.value, c.value = !1;
|
|
34
|
+
}
|
|
35
|
+
function B(n) {
|
|
36
|
+
n === "colors" ? a.state.colors = { ...a.state.savedColors } : a.state.fonts = { ...a.state.savedFonts }, c.value = !1;
|
|
37
|
+
}
|
|
38
|
+
function L() {
|
|
39
|
+
f.open({
|
|
40
|
+
title: "Save the live Brand Kit?",
|
|
41
|
+
message: "Colors and fonts are shared business settings. Apps using this kit pick up the change immediately. This does not build or publish application code.",
|
|
42
|
+
dismissAway: !0,
|
|
43
|
+
primaryActions: { text: "Save Brand Kit", close: !0 },
|
|
44
|
+
secondaryActions: { text: "Cancel", close: !0 }
|
|
45
|
+
}).onPrimary(() => {
|
|
46
|
+
a.save().then(() => {
|
|
47
|
+
c.value = !0;
|
|
48
|
+
}).catch(() => {
|
|
49
|
+
c.value = !1;
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
w(() => {
|
|
54
|
+
a.load();
|
|
55
|
+
});
|
|
56
|
+
function x(n) {
|
|
57
|
+
!a.dirtyCount.value && !a.state.saving || (n.preventDefault(), n.returnValue = "");
|
|
58
|
+
}
|
|
59
|
+
return w(() => window.addEventListener("beforeunload", x)), P(() => window.removeEventListener("beforeunload", x)), O((n) => a.state.saving ? !1 : a.dirtyCount.value ? (f.open({
|
|
60
|
+
title: "Discard unsaved Brand Kit changes?",
|
|
61
|
+
message: "Your live Brand Kit has not changed. Leave this page and discard the changes you have not saved?",
|
|
62
|
+
dismissAway: !0,
|
|
63
|
+
primaryActions: { text: "Discard and leave", close: !0 },
|
|
64
|
+
secondaryActions: { text: "Keep editing", close: !0 }
|
|
65
|
+
}).onPrimary(() => {
|
|
66
|
+
a.discardEdits(), A.push(n);
|
|
67
|
+
}), !1) : !0), (n, o) => {
|
|
68
|
+
const p = K("FmButton"), T = K("FmCircularProgress");
|
|
69
|
+
return l(), r("div", Q, [
|
|
70
|
+
t("div", W, [
|
|
71
|
+
t("header", X, [
|
|
72
|
+
o[3] || (o[3] = t("div", null, [
|
|
73
|
+
t("p", { class: "portal-eyebrow" }, "Shared across your business"),
|
|
74
|
+
t("h1", null, "Your business identity"),
|
|
75
|
+
t("p", { class: "portal-description" }, "Colors and typography for every app that uses your Brand Kit.")
|
|
76
|
+
], -1)),
|
|
77
|
+
t("div", Z, [
|
|
78
|
+
s(a).dirtyCount.value ? (l(), r("span", aa, u(s(a).dirtyCount.value) + " unsaved", 1)) : d("", !0),
|
|
79
|
+
v(p, {
|
|
80
|
+
label: "Save Brand Kit",
|
|
81
|
+
icon: "save",
|
|
82
|
+
disabled: E.value,
|
|
83
|
+
loading: s(a).state.saving,
|
|
84
|
+
onClick: L
|
|
85
|
+
}, null, 8, ["disabled", "loading"])
|
|
86
|
+
])
|
|
87
|
+
]),
|
|
88
|
+
o[10] || (o[10] = t("p", { class: "portal-notice" }, " Saves update the live Brand Kit immediately. Application code still uses the separate Build release → Set live workflow. ", -1)),
|
|
89
|
+
s(_) ? d("", !0) : (l(), r("p", ta, " You can view this Brand Kit, but need Brand Kit management permission to save changes. ")),
|
|
90
|
+
s(a).state.loading ? (l(), r("div", ea, [
|
|
91
|
+
v(T, { size: "xl" }),
|
|
92
|
+
o[4] || (o[4] = F("Loading Brand Kit… ", -1))
|
|
93
|
+
])) : d("", !0),
|
|
94
|
+
s(a).state.error ? (l(), r("div", sa, [
|
|
95
|
+
t("p", null, u(s(a).state.error), 1),
|
|
96
|
+
s(a).state.loaded ? d("", !0) : (l(), R(p, {
|
|
97
|
+
key: 0,
|
|
98
|
+
label: "Try again",
|
|
99
|
+
variant: "secondary",
|
|
100
|
+
onClick: o[0] || (o[0] = (e) => s(a).load(!0))
|
|
101
|
+
}))
|
|
102
|
+
])) : d("", !0),
|
|
103
|
+
c.value && !s(a).dirtyCount.value && !s(a).state.error ? (l(), r("p", oa, " Brand Kit saved. Apps using this kit can now pick up the changes. ")) : d("", !0),
|
|
104
|
+
s(a).state.loaded && !s(a).state.loading ? (l(), r(b, { key: 4 }, [
|
|
105
|
+
t("section", na, [
|
|
106
|
+
t("div", la, [
|
|
107
|
+
o[5] || (o[5] = t("div", null, [
|
|
108
|
+
t("h2", null, "Colors"),
|
|
109
|
+
t("p", { class: "portal-description" }, "The colors that represent your brand identity.")
|
|
110
|
+
], -1)),
|
|
111
|
+
v(p, {
|
|
112
|
+
label: "Reset unsaved colors",
|
|
113
|
+
variant: "tertiary",
|
|
114
|
+
disabled: s(a).state.saving,
|
|
115
|
+
onClick: o[1] || (o[1] = (e) => B("colors"))
|
|
116
|
+
}, null, 8, ["disabled"])
|
|
117
|
+
]),
|
|
118
|
+
t("div", ra, [
|
|
119
|
+
(l(!0), r(b, null, m(s(D), (e) => (l(), r("label", {
|
|
120
|
+
key: e.path,
|
|
121
|
+
class: "brand-color-card"
|
|
122
|
+
}, [
|
|
123
|
+
t("input", {
|
|
124
|
+
type: "color",
|
|
125
|
+
value: s(V)(s(a).state.colors[e.path] ?? ""),
|
|
126
|
+
"aria-label": `${e.label} color picker`,
|
|
127
|
+
disabled: s(a).state.saving,
|
|
128
|
+
onInput: (i) => C(e.path, i)
|
|
129
|
+
}, null, 40, ia),
|
|
130
|
+
t("span", da, u(e.path === "background.base" ? "Background" : e.path === "text.primary" ? "Text" : e.label), 1),
|
|
131
|
+
g(t("input", {
|
|
132
|
+
"onUpdate:modelValue": (i) => s(a).state.colors[e.path] = i,
|
|
133
|
+
class: "brand-value",
|
|
134
|
+
"aria-label": `${e.path} hex color`,
|
|
135
|
+
"aria-invalid": h(e.path),
|
|
136
|
+
disabled: s(a).state.saving,
|
|
137
|
+
placeholder: "App default",
|
|
138
|
+
spellcheck: "false"
|
|
139
|
+
}, null, 8, ua), [
|
|
140
|
+
[y, s(a).state.colors[e.path]]
|
|
141
|
+
]),
|
|
142
|
+
h(e.path) ? (l(), r("small", ca, "Enter a hex color")) : d("", !0)
|
|
143
|
+
]))), 128))
|
|
144
|
+
]),
|
|
145
|
+
t("details", pa, [
|
|
146
|
+
o[6] || (o[6] = t("summary", null, [
|
|
147
|
+
F("More color roles "),
|
|
148
|
+
t("span", null, "Keep control of text, surfaces and status colors")
|
|
149
|
+
], -1)),
|
|
150
|
+
o[7] || (o[7] = t("p", { class: "portal-description" }, " Each role is saved independently. Changing a brand color does not automatically replace text or status colors. ", -1)),
|
|
151
|
+
t("div", va, [
|
|
152
|
+
(l(!0), r(b, null, m(s(I), (e) => (l(), r("label", {
|
|
153
|
+
key: e.path
|
|
154
|
+
}, [
|
|
155
|
+
t("span", null, u(e.group) + " · " + u(e.label), 1),
|
|
156
|
+
t("div", null, [
|
|
157
|
+
t("input", {
|
|
158
|
+
type: "color",
|
|
159
|
+
value: s(V)(s(a).state.colors[e.path] ?? ""),
|
|
160
|
+
"aria-label": `${e.path} color picker`,
|
|
161
|
+
disabled: s(a).state.saving,
|
|
162
|
+
onInput: (i) => C(e.path, i)
|
|
163
|
+
}, null, 40, ba),
|
|
164
|
+
g(t("input", {
|
|
165
|
+
"onUpdate:modelValue": (i) => s(a).state.colors[e.path] = i,
|
|
166
|
+
"aria-label": `${e.path} hex color`,
|
|
167
|
+
"aria-invalid": h(e.path),
|
|
168
|
+
disabled: s(a).state.saving,
|
|
169
|
+
class: "brand-value",
|
|
170
|
+
placeholder: "App default",
|
|
171
|
+
spellcheck: "false"
|
|
172
|
+
}, null, 8, ha), [
|
|
173
|
+
[y, s(a).state.colors[e.path]]
|
|
174
|
+
])
|
|
175
|
+
]),
|
|
176
|
+
t("small", null, u(e.hint), 1)
|
|
177
|
+
]))), 128))
|
|
178
|
+
])
|
|
179
|
+
])
|
|
180
|
+
]),
|
|
181
|
+
t("section", ma, [
|
|
182
|
+
t("div", ga, [
|
|
183
|
+
o[8] || (o[8] = t("div", null, [
|
|
184
|
+
t("h2", null, "Typeface"),
|
|
185
|
+
t("p", { class: "portal-description" }, "Fonts used in your interfaces.")
|
|
186
|
+
], -1)),
|
|
187
|
+
v(p, {
|
|
188
|
+
label: "Reset unsaved fonts",
|
|
189
|
+
variant: "tertiary",
|
|
190
|
+
disabled: s(a).state.saving,
|
|
191
|
+
onClick: o[2] || (o[2] = (e) => B("fonts"))
|
|
192
|
+
}, null, 8, ["disabled"])
|
|
193
|
+
]),
|
|
194
|
+
t("div", ya, [
|
|
195
|
+
(l(!0), r(b, null, m(s(z), (e) => (l(), r("label", {
|
|
196
|
+
key: e.path
|
|
197
|
+
}, [
|
|
198
|
+
t("span", null, u(e.label === "Heading" ? "Headings" : e.label), 1),
|
|
199
|
+
g(t("input", {
|
|
200
|
+
"onUpdate:modelValue": (i) => s(a).state.fonts[e.path] = i,
|
|
201
|
+
class: "brand-font-input",
|
|
202
|
+
disabled: s(a).state.saving,
|
|
203
|
+
placeholder: "App default",
|
|
204
|
+
"aria-label": `${e.label} font stack`,
|
|
205
|
+
list: "brand-font-stacks"
|
|
206
|
+
}, null, 8, _a), [
|
|
207
|
+
[y, s(a).state.fonts[e.path]]
|
|
208
|
+
])
|
|
209
|
+
]))), 128))
|
|
210
|
+
]),
|
|
211
|
+
o[9] || (o[9] = H('<datalist id="brand-font-stacks" data-v-46dc6db9><option value="Inter, system-ui, sans-serif" data-v-46dc6db9></option><option value="'Nunito Sans', system-ui, sans-serif" data-v-46dc6db9></option><option value="'Poppins', system-ui, sans-serif" data-v-46dc6db9></option><option value="Georgia, serif" data-v-46dc6db9></option><option value="system-ui, sans-serif" data-v-46dc6db9></option></datalist><p class="portal-description brand-font-help" data-v-46dc6db9> Use a font already loaded by your app, or ask the agent to install it. Selecting a font stack here does not download Google Fonts. </p>', 2))
|
|
212
|
+
])
|
|
213
|
+
], 64)) : d("", !0)
|
|
214
|
+
])
|
|
215
|
+
]);
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
}), Fa = /* @__PURE__ */ J(fa, [["__scopeId", "data-v-46dc6db9"]]);
|
|
219
|
+
export {
|
|
220
|
+
Fa as default
|
|
221
|
+
};
|