@feedmepos/mf-miniprogram-v2 0.2.2-dev.7 → 0.2.2-dev.9
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-BtDqnBq4.js +193 -0
- package/dist/{mobile-illustration-ByFKNJha.js → AppTemplatePicker-eKlQ0c54.js} +179 -22
- package/dist/BrandFontPicker-CyLbp5nr.js +240 -0
- package/dist/BrandKitView-CaxS1T-W.js +217 -0
- package/dist/{ControlPlaneView-DN56RX1f.js → ControlPlaneView-DGDA8EFh.js} +6598 -6620
- package/dist/EcosystemView-Cx-3k7lB.js +186 -0
- package/dist/{LegacyWorkspaceEntry-7DvIosoj.js → LegacyWorkspaceEntry-opz_kWz9.js} +1 -1
- package/dist/MobileProjectsView-DEQ6q6Si.js +279 -0
- package/dist/{ModuleCenterView-Dqp-2hbL.js → ModuleCenterView-DEShxy_e.js} +1 -1
- package/dist/{ModuleDetailView-cpQ_UfS9.js → ModuleDetailView-BSndm4ov.js} +1 -1
- package/dist/{PagesView-CYc8LFYz.js → PagesView-CegMd6GC.js} +1 -1
- package/dist/{PortalSettingsView-CTy8c39M.js → PortalSettingsView-DFz6FUd9.js} +3 -3
- package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-Bh9Eoe_H.js +26 -0
- package/dist/{WorkspaceEntryView-aQfuZAPL.js → WorkspaceEntryView-e2EUnq9A.js} +1 -1
- package/dist/app.js +16 -10
- package/dist/{controlPlane-wUT1G_Gr.js → controlPlane-CoEgf9BA.js} +9 -9
- package/dist/{index-BDHUHtRw.js → index-D5qXvcfE.js} +24 -15
- package/dist/package.json +1 -1
- package/dist/{portalContext-CTVzkJV7.js → portalContext-C4HL_0kl.js} +2 -2
- package/dist/{routes-L0ady_Wy.js → routes-Boz_WlNM.js} +1 -0
- package/dist/style.css +1 -1
- package/dist/useBrandKit-BlKlqpo2.js +1020 -0
- package/dist/{useModuleCatalog-CD5N246F.js → useModuleCatalog-CkNuZzNM.js} +2 -2
- package/package.json +1 -1
- package/dist/App-KR6Q0u_b.js +0 -213
- package/dist/BrandKitView-B8t8RkHr.js +0 -221
- package/dist/EcosystemView-Dvay7NSY.js +0 -232
- package/dist/useBrandKit-CpyR2j6m.js +0 -924
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { defineComponent as oe, ref as n, computed as S, watch as N, resolveComponent as K, openBlock as s, createElementBlock as i, withKeys as T, withModifiers as $, createElementVNode as a, toDisplayString as b, createVNode as E, withCtx as R, normalizeStyle as P, withDirectives as z, vModelText as L, Fragment as j, renderList as te, createCommentVNode as p, unref as A, createBlock as ae, createTextVNode as W, nextTick as le } from "vue";
|
|
2
|
+
import { G, f as ne, b as m, l as se } from "./useBrandKit-BlKlqpo2.js";
|
|
3
|
+
import { _ as re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const ie = ["onKeydown"], ue = { class: "font-picker__label" }, de = ["disabled", "aria-label", "aria-expanded"], ce = ["onKeydown", "aria-label"], pe = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "font-picker__muted"
|
|
7
|
+
}, ve = ["aria-pressed", "onClick"], me = { key: 0 }, fe = { key: 1 }, ye = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "font-picker__muted",
|
|
10
|
+
role: "status"
|
|
11
|
+
}, _e = { class: "font-picker__preview" }, ke = { class: "font-picker__muted" }, be = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "font-picker__muted",
|
|
14
|
+
role: "status"
|
|
15
|
+
}, he = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "font-picker__muted"
|
|
18
|
+
}, we = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "font-picker__muted"
|
|
21
|
+
}, ge = /* @__PURE__ */ oe({
|
|
22
|
+
__name: "BrandFontPicker",
|
|
23
|
+
props: {
|
|
24
|
+
modelValue: {},
|
|
25
|
+
label: {},
|
|
26
|
+
disabled: { type: Boolean }
|
|
27
|
+
},
|
|
28
|
+
emits: ["update:modelValue"],
|
|
29
|
+
setup(d, { emit: J }) {
|
|
30
|
+
const f = d, Q = J, D = n(), h = n(), q = n(), O = n(360), U = n(), I = n(), v = n(!1), w = n(""), l = n(""), M = n("The quick brown fox jumps over the lazy dog. 0123456789"), c = n({}), y = S(
|
|
31
|
+
() => [
|
|
32
|
+
{ name: "App default", value: "", group: "Defaults" },
|
|
33
|
+
{ name: "System font", value: "system-ui, sans-serif", group: "Defaults" },
|
|
34
|
+
...G.map((e) => ({ name: e, value: ne(e), group: "Google Fonts" }))
|
|
35
|
+
].filter((e) => e.name.toLowerCase().includes(w.value.trim().toLowerCase()))
|
|
36
|
+
), g = S(() => m(f.modelValue || "")), F = S(() => m(l.value)), X = S(
|
|
37
|
+
() => !!l.value && !G.some((e) => e === F.value) && l.value !== "system-ui, sans-serif"
|
|
38
|
+
);
|
|
39
|
+
async function C(e) {
|
|
40
|
+
if (!(!G.some((o) => o === e) || c.value[e] === "loaded")) {
|
|
41
|
+
c.value[e] = "loading";
|
|
42
|
+
try {
|
|
43
|
+
await se(e), c.value[e] = "loaded";
|
|
44
|
+
} catch {
|
|
45
|
+
c.value[e] = "error";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
N(g, (e) => void C(e), { immediate: !0 }), N(y, (e) => {
|
|
50
|
+
v.value && e.forEach((o) => void C(o.name));
|
|
51
|
+
}), N(
|
|
52
|
+
() => f.disabled,
|
|
53
|
+
(e) => {
|
|
54
|
+
e && x();
|
|
55
|
+
}
|
|
56
|
+
), N(() => f.modelValue, x);
|
|
57
|
+
async function Y(e) {
|
|
58
|
+
var o, r;
|
|
59
|
+
v.value = e, e && (O.value = Math.max(320, ((o = D.value) == null ? void 0 : o.getBoundingClientRect().width) || 360), l.value = f.modelValue || "", w.value = "", v.value = !0, y.value.forEach((u) => void C(u.name)), await le(), (r = I.value) == null || r.focus());
|
|
60
|
+
}
|
|
61
|
+
function x() {
|
|
62
|
+
var e;
|
|
63
|
+
v.value = !1, (e = q.value) == null || e.hide();
|
|
64
|
+
}
|
|
65
|
+
function V() {
|
|
66
|
+
var e;
|
|
67
|
+
x(), (e = U.value) == null || e.focus();
|
|
68
|
+
}
|
|
69
|
+
function Z() {
|
|
70
|
+
f.disabled || (Q("update:modelValue", l.value.trim()), V());
|
|
71
|
+
}
|
|
72
|
+
function H(e) {
|
|
73
|
+
var r, u;
|
|
74
|
+
const o = e.relatedTarget;
|
|
75
|
+
o && !((r = D.value) != null && r.contains(o)) && !((u = h.value) != null && u.contains(o)) && x();
|
|
76
|
+
}
|
|
77
|
+
function ee(e) {
|
|
78
|
+
var B, t;
|
|
79
|
+
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) return;
|
|
80
|
+
const o = [...((B = h.value) == null ? void 0 : B.querySelectorAll("[data-font-option]")) || []];
|
|
81
|
+
if (!o.length) return;
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
const r = o.indexOf(document.activeElement), u = e.key === "Home" ? 0 : e.key === "End" ? o.length - 1 : (r + (e.key === "ArrowDown" ? 1 : -1) + o.length) % o.length;
|
|
84
|
+
(t = o[u]) == null || t.focus();
|
|
85
|
+
}
|
|
86
|
+
return (e, o) => {
|
|
87
|
+
const r = K("FmIcon"), u = K("FmButton"), B = K("FmPopover");
|
|
88
|
+
return s(), i("div", {
|
|
89
|
+
ref_key: "root",
|
|
90
|
+
ref: D,
|
|
91
|
+
class: "font-picker",
|
|
92
|
+
onFocusout: H,
|
|
93
|
+
onKeydown: T($(V, ["stop", "prevent"]), ["esc"])
|
|
94
|
+
}, [
|
|
95
|
+
a("span", ue, b(d.label), 1),
|
|
96
|
+
E(B, {
|
|
97
|
+
ref_key: "popover",
|
|
98
|
+
ref: q,
|
|
99
|
+
"show-popover": v.value,
|
|
100
|
+
disabled: d.disabled,
|
|
101
|
+
onPopoverChanged: Y
|
|
102
|
+
}, {
|
|
103
|
+
"popover-button": R(() => [
|
|
104
|
+
a("button", {
|
|
105
|
+
ref_key: "trigger",
|
|
106
|
+
ref: U,
|
|
107
|
+
type: "button",
|
|
108
|
+
class: "font-picker__trigger",
|
|
109
|
+
disabled: d.disabled,
|
|
110
|
+
"aria-label": `${d.label} font: ${g.value}`,
|
|
111
|
+
"aria-haspopup": "dialog",
|
|
112
|
+
"aria-expanded": v.value
|
|
113
|
+
}, [
|
|
114
|
+
a("span", {
|
|
115
|
+
style: P({ fontFamily: d.modelValue || "inherit" })
|
|
116
|
+
}, b(g.value), 5),
|
|
117
|
+
E(r, {
|
|
118
|
+
name: "expand_more",
|
|
119
|
+
size: "sm"
|
|
120
|
+
})
|
|
121
|
+
], 8, de)
|
|
122
|
+
]),
|
|
123
|
+
default: R(() => [
|
|
124
|
+
a("div", {
|
|
125
|
+
ref_key: "menu",
|
|
126
|
+
ref: h,
|
|
127
|
+
class: "font-picker__menu",
|
|
128
|
+
style: P({ width: `${O.value}px` }),
|
|
129
|
+
onFocusout: H,
|
|
130
|
+
onKeydown: T($(V, ["stop", "prevent"]), ["esc"]),
|
|
131
|
+
role: "dialog",
|
|
132
|
+
"aria-label": `Choose ${d.label.toLowerCase()} font`
|
|
133
|
+
}, [
|
|
134
|
+
o[7] || (o[7] = a("span", { class: "font-picker__muted" }, "Fonts available", -1)),
|
|
135
|
+
z(a("input", {
|
|
136
|
+
ref_key: "search",
|
|
137
|
+
ref: I,
|
|
138
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => w.value = t),
|
|
139
|
+
type: "search",
|
|
140
|
+
placeholder: "Search fonts",
|
|
141
|
+
"aria-label": "Search fonts",
|
|
142
|
+
class: "font-picker__input",
|
|
143
|
+
onKeydown: o[1] || (o[1] = T($((t) => {
|
|
144
|
+
var _, k;
|
|
145
|
+
return (k = (_ = h.value) == null ? void 0 : _.querySelector("[data-font-option]")) == null ? void 0 : k.focus();
|
|
146
|
+
}, ["prevent"]), ["down"]))
|
|
147
|
+
}, null, 544), [
|
|
148
|
+
[L, w.value]
|
|
149
|
+
]),
|
|
150
|
+
a("div", {
|
|
151
|
+
class: "font-picker__options",
|
|
152
|
+
onKeydown: ee
|
|
153
|
+
}, [
|
|
154
|
+
(s(!0), i(j, null, te(y.value, (t, _) => {
|
|
155
|
+
var k;
|
|
156
|
+
return s(), i(j, {
|
|
157
|
+
key: t.name
|
|
158
|
+
}, [
|
|
159
|
+
_ === 0 || ((k = y.value[_ - 1]) == null ? void 0 : k.group) !== t.group ? (s(), i("p", pe, b(t.group), 1)) : p("", !0),
|
|
160
|
+
a("button", {
|
|
161
|
+
type: "button",
|
|
162
|
+
"data-font-option": "",
|
|
163
|
+
class: "font-picker__option",
|
|
164
|
+
"aria-pressed": A(m)(l.value) === A(m)(t.value),
|
|
165
|
+
onClick: (Fe) => l.value = t.value
|
|
166
|
+
}, [
|
|
167
|
+
a("span", {
|
|
168
|
+
style: P({ fontFamily: t.value || "inherit" })
|
|
169
|
+
}, b(t.name), 5),
|
|
170
|
+
c.value[t.name] === "loading" ? (s(), i("small", me, "Loading…")) : c.value[t.name] === "error" ? (s(), i("small", fe, "Preview unavailable")) : p("", !0),
|
|
171
|
+
A(m)(l.value) === A(m)(t.value) ? (s(), ae(r, {
|
|
172
|
+
key: 2,
|
|
173
|
+
name: "check",
|
|
174
|
+
size: "sm"
|
|
175
|
+
})) : p("", !0)
|
|
176
|
+
], 8, ve)
|
|
177
|
+
], 64);
|
|
178
|
+
}), 128)),
|
|
179
|
+
y.value.length ? p("", !0) : (s(), i("p", ye, "No fonts found. Try another name."))
|
|
180
|
+
], 32),
|
|
181
|
+
a("div", _e, [
|
|
182
|
+
a("label", ke, [
|
|
183
|
+
W("Preview · " + b(F.value) + " ", 1),
|
|
184
|
+
z(a("textarea", {
|
|
185
|
+
"onUpdate:modelValue": o[2] || (o[2] = (t) => M.value = t),
|
|
186
|
+
rows: "2",
|
|
187
|
+
"aria-label": "Font preview text",
|
|
188
|
+
style: P({ fontFamily: l.value || "inherit" })
|
|
189
|
+
}, null, 4), [
|
|
190
|
+
[L, M.value]
|
|
191
|
+
])
|
|
192
|
+
]),
|
|
193
|
+
c.value[F.value] === "error" ? (s(), i("p", be, [
|
|
194
|
+
o[5] || (o[5] = W(" Font preview could not load. Showing a fallback font. ", -1)),
|
|
195
|
+
a("button", {
|
|
196
|
+
type: "button",
|
|
197
|
+
class: "font-picker__retry",
|
|
198
|
+
onClick: o[3] || (o[3] = (t) => C(F.value))
|
|
199
|
+
}, "Retry")
|
|
200
|
+
])) : p("", !0),
|
|
201
|
+
a("details", null, [
|
|
202
|
+
o[6] || (o[6] = a("summary", null, "Custom font stack", -1)),
|
|
203
|
+
z(a("input", {
|
|
204
|
+
"onUpdate:modelValue": o[4] || (o[4] = (t) => l.value = t),
|
|
205
|
+
class: "font-picker__input",
|
|
206
|
+
"aria-label": "Custom font stack",
|
|
207
|
+
placeholder: "App default",
|
|
208
|
+
spellcheck: "false"
|
|
209
|
+
}, null, 512), [
|
|
210
|
+
[L, l.value]
|
|
211
|
+
])
|
|
212
|
+
]),
|
|
213
|
+
X.value ? (s(), i("p", he, "Custom fonts preview only if installed or already loaded.")) : p("", !0)
|
|
214
|
+
]),
|
|
215
|
+
a("footer", null, [
|
|
216
|
+
E(u, {
|
|
217
|
+
label: "Cancel",
|
|
218
|
+
variant: "tertiary",
|
|
219
|
+
size: "md",
|
|
220
|
+
onClick: V
|
|
221
|
+
}),
|
|
222
|
+
E(u, {
|
|
223
|
+
label: "Apply",
|
|
224
|
+
size: "md",
|
|
225
|
+
disabled: d.disabled,
|
|
226
|
+
onClick: Z
|
|
227
|
+
}, null, 8, ["disabled"])
|
|
228
|
+
])
|
|
229
|
+
], 44, ce)
|
|
230
|
+
]),
|
|
231
|
+
_: 1
|
|
232
|
+
}, 8, ["show-popover", "disabled"]),
|
|
233
|
+
c.value[g.value] === "error" ? (s(), i("p", we, " Preview unavailable; showing a fallback font. ")) : p("", !0)
|
|
234
|
+
], 40, ie);
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
}), Be = /* @__PURE__ */ re(ge, [["__scopeId", "data-v-ba271d8c"]]);
|
|
238
|
+
export {
|
|
239
|
+
Be as B
|
|
240
|
+
};
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { defineComponent as P, ref as U, computed as N, onMounted as C, onScopeDispose as R, resolveComponent as x, openBlock as l, createElementBlock as r, createElementVNode as t, unref as a, toDisplayString as c, createCommentVNode as d, createVNode as v, createTextVNode as K, createBlock as w, Fragment as h, renderList as g, withDirectives as F, vModelText as V } from "vue";
|
|
2
|
+
import { useRouter as H, onBeforeRouteLeave as M } from "vue-router";
|
|
3
|
+
import { useDialog as O } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as Y, C as S, t as A, F as z, u as G, i as j } from "./useBrandKit-BlKlqpo2.js";
|
|
5
|
+
import { B as q } from "./BrandFontPicker-CyLbp5nr.js";
|
|
6
|
+
import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const Q = { class: "portal-page" }, W = { class: "portal-page-inner brand-page" }, X = { class: "portal-page-heading" }, Z = { class: "brand-actions" }, ee = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "brand-unsaved"
|
|
10
|
+
}, te = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "portal-notice"
|
|
13
|
+
}, ae = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "portal-loading",
|
|
16
|
+
role: "status"
|
|
17
|
+
}, se = {
|
|
18
|
+
key: 2,
|
|
19
|
+
role: "alert",
|
|
20
|
+
class: "portal-section portal-error"
|
|
21
|
+
}, oe = {
|
|
22
|
+
key: 3,
|
|
23
|
+
role: "status"
|
|
24
|
+
}, ne = { class: "portal-section" }, le = { class: "portal-section-head" }, re = { class: "brand-color-grid" }, ie = ["value", "aria-label", "disabled", "onInput"], de = { class: "brand-field-label" }, ue = ["onUpdate:modelValue", "aria-label", "aria-invalid", "disabled"], ce = {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: "portal-error"
|
|
27
|
+
}, pe = { class: "brand-advanced" }, ve = { class: "brand-role-grid" }, he = ["value", "aria-label", "disabled", "onInput"], be = ["onUpdate:modelValue", "aria-label", "aria-invalid", "disabled"], me = { class: "portal-section" }, ge = { class: "portal-section-head" }, ye = { class: "brand-font-grid" }, _e = /* @__PURE__ */ P({
|
|
28
|
+
__name: "BrandKitView",
|
|
29
|
+
setup(ke) {
|
|
30
|
+
const e = G(), b = Y(), y = O(), D = H(), u = U(!1), _ = ["primary", "secondary", "accent", "background.base", "text.primary"], E = _.map((n) => S.find((o) => o.path === n)), I = S.filter((n) => !_.includes(n.path)), L = N(
|
|
31
|
+
() => !b.value || !e.state.loaded || e.state.loading || e.state.saving || e.hasInvalidColor.value || e.dirtyCount.value === 0
|
|
32
|
+
), m = (n) => !!(e.state.colors[n] && !j(e.state.colors[n]));
|
|
33
|
+
function k(n, o) {
|
|
34
|
+
e.state.colors[n] = o.target.value, u.value = !1;
|
|
35
|
+
}
|
|
36
|
+
function f(n) {
|
|
37
|
+
n === "colors" ? e.state.colors = { ...e.state.savedColors } : e.state.fonts = { ...e.state.savedFonts }, u.value = !1;
|
|
38
|
+
}
|
|
39
|
+
function T() {
|
|
40
|
+
y.open({
|
|
41
|
+
title: "Save the live Brand Kit?",
|
|
42
|
+
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.",
|
|
43
|
+
dismissAway: !0,
|
|
44
|
+
primaryActions: { text: "Save Brand Kit", close: !0 },
|
|
45
|
+
secondaryActions: { text: "Cancel", close: !0 }
|
|
46
|
+
}).onPrimary(() => {
|
|
47
|
+
e.save().then(() => {
|
|
48
|
+
u.value = !0;
|
|
49
|
+
}).catch(() => {
|
|
50
|
+
u.value = !1;
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
C(() => {
|
|
55
|
+
e.load();
|
|
56
|
+
});
|
|
57
|
+
function B(n) {
|
|
58
|
+
!e.dirtyCount.value && !e.state.saving || (n.preventDefault(), n.returnValue = "");
|
|
59
|
+
}
|
|
60
|
+
return C(() => window.addEventListener("beforeunload", B)), R(() => window.removeEventListener("beforeunload", B)), M((n) => e.state.saving ? !1 : e.dirtyCount.value ? (y.open({
|
|
61
|
+
title: "Discard unsaved Brand Kit changes?",
|
|
62
|
+
message: "Your live Brand Kit has not changed. Leave this page and discard the changes you have not saved?",
|
|
63
|
+
dismissAway: !0,
|
|
64
|
+
primaryActions: { text: "Discard and leave", close: !0 },
|
|
65
|
+
secondaryActions: { text: "Keep editing", close: !0 }
|
|
66
|
+
}).onPrimary(() => {
|
|
67
|
+
e.discardEdits(), D.push(n);
|
|
68
|
+
}), !1) : !0), (n, o) => {
|
|
69
|
+
const p = x("FmButton"), $ = x("FmCircularProgress");
|
|
70
|
+
return l(), r("div", Q, [
|
|
71
|
+
t("div", W, [
|
|
72
|
+
t("header", X, [
|
|
73
|
+
o[4] || (o[4] = t("div", null, [
|
|
74
|
+
t("p", { class: "portal-eyebrow" }, "Shared across your business"),
|
|
75
|
+
t("h1", null, "Your business identity"),
|
|
76
|
+
t("p", { class: "portal-description" }, "Colors and typography for every app that uses your Brand Kit.")
|
|
77
|
+
], -1)),
|
|
78
|
+
t("div", Z, [
|
|
79
|
+
a(e).dirtyCount.value ? (l(), r("span", ee, c(a(e).dirtyCount.value) + " unsaved", 1)) : d("", !0),
|
|
80
|
+
v(p, {
|
|
81
|
+
label: "Save Brand Kit",
|
|
82
|
+
icon: "save",
|
|
83
|
+
disabled: L.value,
|
|
84
|
+
loading: a(e).state.saving,
|
|
85
|
+
onClick: T
|
|
86
|
+
}, null, 8, ["disabled", "loading"])
|
|
87
|
+
])
|
|
88
|
+
]),
|
|
89
|
+
o[11] || (o[11] = t("p", { class: "portal-notice" }, " Saves update the live Brand Kit immediately. Application code still uses the separate Build release → Set live workflow. ", -1)),
|
|
90
|
+
a(b) ? d("", !0) : (l(), r("p", te, " You can view this Brand Kit, but need Brand Kit management permission to save changes. ")),
|
|
91
|
+
a(e).state.loading ? (l(), r("div", ae, [
|
|
92
|
+
v($, { size: "xl" }),
|
|
93
|
+
o[5] || (o[5] = K("Loading Brand Kit… ", -1))
|
|
94
|
+
])) : d("", !0),
|
|
95
|
+
a(e).state.error ? (l(), r("div", se, [
|
|
96
|
+
t("p", null, c(a(e).state.error), 1),
|
|
97
|
+
a(e).state.loaded ? d("", !0) : (l(), w(p, {
|
|
98
|
+
key: 0,
|
|
99
|
+
label: "Try again",
|
|
100
|
+
variant: "secondary",
|
|
101
|
+
onClick: o[0] || (o[0] = (s) => a(e).load(!0))
|
|
102
|
+
}))
|
|
103
|
+
])) : d("", !0),
|
|
104
|
+
u.value && !a(e).dirtyCount.value && !a(e).state.error ? (l(), r("p", oe, " Brand Kit saved. Apps using this kit can now pick up the changes. ")) : d("", !0),
|
|
105
|
+
a(e).state.loaded && !a(e).state.loading ? (l(), r(h, { key: 4 }, [
|
|
106
|
+
t("section", ne, [
|
|
107
|
+
t("div", le, [
|
|
108
|
+
o[6] || (o[6] = t("div", null, [
|
|
109
|
+
t("h2", null, "Colors"),
|
|
110
|
+
t("p", { class: "portal-description" }, "The colors that represent your brand identity.")
|
|
111
|
+
], -1)),
|
|
112
|
+
v(p, {
|
|
113
|
+
label: "Reset unsaved colors",
|
|
114
|
+
variant: "tertiary",
|
|
115
|
+
disabled: a(e).state.saving,
|
|
116
|
+
onClick: o[1] || (o[1] = (s) => f("colors"))
|
|
117
|
+
}, null, 8, ["disabled"])
|
|
118
|
+
]),
|
|
119
|
+
t("div", re, [
|
|
120
|
+
(l(!0), r(h, null, g(a(E), (s) => (l(), r("label", {
|
|
121
|
+
key: s.path,
|
|
122
|
+
class: "brand-color-card"
|
|
123
|
+
}, [
|
|
124
|
+
t("input", {
|
|
125
|
+
type: "color",
|
|
126
|
+
value: a(A)(a(e).state.colors[s.path] ?? ""),
|
|
127
|
+
"aria-label": `${s.label} color picker`,
|
|
128
|
+
disabled: a(e).state.saving,
|
|
129
|
+
onInput: (i) => k(s.path, i)
|
|
130
|
+
}, null, 40, ie),
|
|
131
|
+
t("span", de, c(s.path === "background.base" ? "Background" : s.path === "text.primary" ? "Text" : s.label), 1),
|
|
132
|
+
F(t("input", {
|
|
133
|
+
"onUpdate:modelValue": (i) => a(e).state.colors[s.path] = i,
|
|
134
|
+
class: "brand-value",
|
|
135
|
+
"aria-label": `${s.path} hex color`,
|
|
136
|
+
"aria-invalid": m(s.path),
|
|
137
|
+
disabled: a(e).state.saving,
|
|
138
|
+
placeholder: "App default",
|
|
139
|
+
spellcheck: "false"
|
|
140
|
+
}, null, 8, ue), [
|
|
141
|
+
[V, a(e).state.colors[s.path]]
|
|
142
|
+
]),
|
|
143
|
+
m(s.path) ? (l(), r("small", ce, "Enter a hex color")) : d("", !0)
|
|
144
|
+
]))), 128))
|
|
145
|
+
]),
|
|
146
|
+
t("details", pe, [
|
|
147
|
+
o[7] || (o[7] = t("summary", null, [
|
|
148
|
+
K("More color roles "),
|
|
149
|
+
t("span", null, "Keep control of text, surfaces and status colors")
|
|
150
|
+
], -1)),
|
|
151
|
+
o[8] || (o[8] = t("p", { class: "portal-description" }, " Each role is saved independently. Changing a brand color does not automatically replace text or status colors. ", -1)),
|
|
152
|
+
t("div", ve, [
|
|
153
|
+
(l(!0), r(h, null, g(a(I), (s) => (l(), r("label", {
|
|
154
|
+
key: s.path
|
|
155
|
+
}, [
|
|
156
|
+
t("span", null, c(s.group) + " · " + c(s.label), 1),
|
|
157
|
+
t("div", null, [
|
|
158
|
+
t("input", {
|
|
159
|
+
type: "color",
|
|
160
|
+
value: a(A)(a(e).state.colors[s.path] ?? ""),
|
|
161
|
+
"aria-label": `${s.path} color picker`,
|
|
162
|
+
disabled: a(e).state.saving,
|
|
163
|
+
onInput: (i) => k(s.path, i)
|
|
164
|
+
}, null, 40, he),
|
|
165
|
+
F(t("input", {
|
|
166
|
+
"onUpdate:modelValue": (i) => a(e).state.colors[s.path] = i,
|
|
167
|
+
"aria-label": `${s.path} hex color`,
|
|
168
|
+
"aria-invalid": m(s.path),
|
|
169
|
+
disabled: a(e).state.saving,
|
|
170
|
+
class: "brand-value",
|
|
171
|
+
placeholder: "App default",
|
|
172
|
+
spellcheck: "false"
|
|
173
|
+
}, null, 8, be), [
|
|
174
|
+
[V, a(e).state.colors[s.path]]
|
|
175
|
+
])
|
|
176
|
+
]),
|
|
177
|
+
t("small", null, c(s.hint), 1)
|
|
178
|
+
]))), 128))
|
|
179
|
+
])
|
|
180
|
+
])
|
|
181
|
+
]),
|
|
182
|
+
t("section", me, [
|
|
183
|
+
t("div", ge, [
|
|
184
|
+
o[9] || (o[9] = t("div", null, [
|
|
185
|
+
t("h2", null, "Typeface"),
|
|
186
|
+
t("p", { class: "portal-description" }, "Fonts used in your interfaces.")
|
|
187
|
+
], -1)),
|
|
188
|
+
v(p, {
|
|
189
|
+
label: "Reset unsaved fonts",
|
|
190
|
+
variant: "tertiary",
|
|
191
|
+
disabled: a(e).state.saving,
|
|
192
|
+
onClick: o[2] || (o[2] = (s) => f("fonts"))
|
|
193
|
+
}, null, 8, ["disabled"])
|
|
194
|
+
]),
|
|
195
|
+
t("div", ye, [
|
|
196
|
+
(l(!0), r(h, null, g(a(z), (s) => (l(), w(q, {
|
|
197
|
+
key: s.path,
|
|
198
|
+
modelValue: a(e).state.fonts[s.path],
|
|
199
|
+
"onUpdate:modelValue": [
|
|
200
|
+
(i) => a(e).state.fonts[s.path] = i,
|
|
201
|
+
o[3] || (o[3] = (i) => u.value = !1)
|
|
202
|
+
],
|
|
203
|
+
label: s.label === "Heading" ? "Headings" : s.label,
|
|
204
|
+
disabled: !a(b) || a(e).state.saving
|
|
205
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled"]))), 128))
|
|
206
|
+
]),
|
|
207
|
+
o[10] || (o[10] = t("p", { class: "portal-description brand-font-help" }, "Supported by Google Fonts", -1))
|
|
208
|
+
])
|
|
209
|
+
], 64)) : d("", !0)
|
|
210
|
+
])
|
|
211
|
+
]);
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
}), Fe = /* @__PURE__ */ J(_e, [["__scopeId", "data-v-346c9cdb"]]);
|
|
215
|
+
export {
|
|
216
|
+
Fe as default
|
|
217
|
+
};
|