@feedmepos/mf-brand-app-builder 0.5.14-alpha.10 → 0.5.14-alpha.11

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.
@@ -61,7 +61,7 @@ const $ = { class: "shrink-0 w-64 h-full bg-fm-color-neutral-white border-r bord
61
61
  }
62
62
  return x(async () => {
63
63
  console.log(
64
- `Running v0.5.14-alpha.10 on ${e.namespace.value}`
64
+ `Running v0.5.14-alpha.11 on ${e.namespace.value}`
65
65
  ), e.hideSidebar.value = !0;
66
66
  }), y(() => {
67
67
  e.hideSidebar.value = !1;
@@ -0,0 +1,304 @@
1
+ import { defineComponent as x, resolveComponent as p, createElementBlock as v, openBlock as c, createElementVNode as r, createVNode as s, createCommentVNode as b, withCtx as f, unref as F, normalizeStyle as C, toDisplayString as g, ref as $, watch as B, createBlock as w } from "vue";
2
+ import { B as U } from "./index-CgMKkAzT.js";
3
+ import { K as S } from "./ColorPicker-BXOagDFY.js";
4
+ import { u as R } from "./index-CajMju7D.js";
5
+ import { useCoreStore as P } from "@feedmepos/mf-common";
6
+ import { u as E } from "./index-DzaJbB6y.js";
7
+ const N = { class: "fm-typo-en-body-md-400" }, h = { class: "flex gap-8 items-center" }, T = { class: "p-4 relative" }, A = { class: "shadow-lg rounded-lg p-8" }, I = {
8
+ key: 0,
9
+ class: "absolute top-8 right-8"
10
+ }, V = { class: "space-y-4" }, j = { class: "text-fm-color-typo-secondary" }, K = { class: "text-fm-color-typo-secondary px-4" }, n = /* @__PURE__ */ x({
11
+ __name: "ColorSelection",
12
+ props: {
13
+ initialColor: {},
14
+ color: {},
15
+ title: {},
16
+ description: {}
17
+ },
18
+ emits: ["remove", "update"],
19
+ setup(k, { emit: u }) {
20
+ const a = (e) => {
21
+ console.log("copy", e);
22
+ }, m = u;
23
+ return (e, l) => {
24
+ const y = p("FmButton"), d = p("FmPopover"), o = p("FmIcon");
25
+ return c(), v("div", N, [
26
+ r("div", h, [
27
+ r("div", T, [
28
+ s(d, null, {
29
+ "popover-button": f(() => [
30
+ r("div", {
31
+ class: "aspect-square w-[60px] rounded-sm border border-fm-color-neutral-gray-200 cursor-pointer",
32
+ style: C({
33
+ backgroundColor: e.color
34
+ })
35
+ }, null, 4)
36
+ ]),
37
+ default: f(() => [
38
+ r("div", A, [
39
+ s(F(S), {
40
+ copy: a,
41
+ onColorCopy: l[0] || (l[0] = (i) => a(i.cssColor)),
42
+ "default-format": "hex",
43
+ color: e.color,
44
+ onColorChange: l[1] || (l[1] = (i) => m("update", i.cssColor))
45
+ }, {
46
+ "copy-button": f(() => [
47
+ s(y, {
48
+ class: "w-full h-32",
49
+ variant: "secondary",
50
+ icon: "content_copy"
51
+ })
52
+ ]),
53
+ _: 1
54
+ }, 8, ["color"])
55
+ ])
56
+ ]),
57
+ _: 1
58
+ }),
59
+ e.initialColor != e.color ? (c(), v("div", I, [
60
+ r("div", {
61
+ onClick: l[2] || (l[2] = (i) => m("remove")),
62
+ class: "h-16 w-16 rounded-full bg-fm-color-neutral-white flex items-center justify-center cursor-pointer"
63
+ }, [
64
+ s(o, {
65
+ name: "close_small",
66
+ class: "!text-[16px]"
67
+ })
68
+ ])
69
+ ])) : b("", !0)
70
+ ]),
71
+ r("div", V, [
72
+ r("div", null, g(e.title), 1),
73
+ r("div", j, g(e.description), 1)
74
+ ])
75
+ ]),
76
+ r("div", K, g(e.color), 1)
77
+ ]);
78
+ };
79
+ }
80
+ }), D = { class: "p-24 h-full w-full flex flex-col bg-fm-color-neutral-white overflow-y-auto" }, J = {
81
+ key: 0,
82
+ class: "mt-12"
83
+ }, O = { class: "flex items-center justify-between" }, q = { class: "flex items-center justify-center gap-8" }, z = { class: "rounded-lg overflow-hidden mt-12 border border-fm-color-neutral-gray-100" }, G = { class: "py-12 px-24 flex flex-col gap-12" }, H = { class: "rounded-lg overflow-hidden mt-12 border border-fm-color-neutral-gray-100" }, L = { class: "py-12 px-24 flex flex-col gap-12" }, M = { class: "rounded-lg overflow-hidden mt-12 border border-fm-color-neutral-gray-100" }, Q = { class: "py-12 px-24 flex flex-col gap-12" }, W = { class: "rounded-lg overflow-hidden mt-12 border border-fm-color-neutral-gray-100" }, X = { class: "py-12 px-24 flex flex-col gap-12" }, to = /* @__PURE__ */ x({
84
+ __name: "BrandkitView",
85
+ setup(k) {
86
+ const u = P(), a = R(), m = E(), e = $(a.state.brandkit), l = () => ({
87
+ colors: {
88
+ primary: "#FF7823",
89
+ secondary: "#FFF3E6",
90
+ accent: "#FFF3E6",
91
+ background: {
92
+ base: "#F8F8F8",
93
+ elevated: "#FFFFFF"
94
+ },
95
+ neutral: {
96
+ light: "#ECF0F0",
97
+ mid: "#555555",
98
+ dark: "#1C1C1E"
99
+ },
100
+ status: {
101
+ success: "#4CAF50",
102
+ warning: "#FFC107",
103
+ error: "#F44336",
104
+ info: "#2196F3"
105
+ },
106
+ text: {
107
+ onPrimary: "#FFFFFF",
108
+ primary: "#1C1C1E",
109
+ secondary: "#555555",
110
+ tertiary: "#A2A09E"
111
+ }
112
+ },
113
+ fonts: {
114
+ brand: "Inter",
115
+ heading: "Inter",
116
+ body: "Roboto"
117
+ }
118
+ });
119
+ async function y() {
120
+ m.promise(
121
+ U.setBusinessBrandkit(
122
+ u.currentBusiness.value._id,
123
+ e.value
124
+ ),
125
+ {
126
+ loading: "Saving your settings...",
127
+ success: "Settings saved",
128
+ error: "Failed to save settings"
129
+ }
130
+ );
131
+ }
132
+ return B(
133
+ () => u.currentBusiness.value,
134
+ async (d, o) => {
135
+ d && d._id != (o == null ? void 0 : o._id) && (await a.getBusinessBrandkit(d._id), e.value = a.state.brandkit);
136
+ },
137
+ {
138
+ immediate: !0
139
+ }
140
+ ), (d, o) => {
141
+ const i = p("FmButton");
142
+ return c(), v("div", D, [
143
+ o[30] || (o[30] = r("div", { class: "fm-typo-en-title-md-600" }, "Brandkit", -1)),
144
+ e.value ? (c(), v("div", J, [
145
+ r("div", O, [
146
+ o[25] || (o[25] = r("div", { class: "fm-typo-en-title-sm-600 mt-8" }, "Colors", -1)),
147
+ r("div", q, [
148
+ JSON.stringify(e.value.colors) != JSON.stringify(l().colors) ? (c(), w(i, {
149
+ key: 0,
150
+ label: "Reset to default",
151
+ variant: "plain",
152
+ onClick: o[0] || (o[0] = (t) => e.value.colors = { ...l().colors })
153
+ })) : b("", !0),
154
+ s(i, {
155
+ label: "Save",
156
+ variant: "primary",
157
+ onClick: y
158
+ })
159
+ ])
160
+ ]),
161
+ r("div", z, [
162
+ r("div", null, [
163
+ o[26] || (o[26] = r("div", { class: "py-12 px-24 bg-fm-color-neutral-gray-100" }, [
164
+ r("div", { class: "fm-typo-en-body-lg-600" }, "Brand"),
165
+ r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " The colors that represent your brand identity ")
166
+ ], -1)),
167
+ r("div", G, [
168
+ s(n, {
169
+ "initial-color": l().colors.primary,
170
+ color: e.value.colors.primary,
171
+ onRemove: o[1] || (o[1] = (t) => e.value.colors.primary = l().colors.primary),
172
+ onUpdate: o[2] || (o[2] = (t) => e.value.colors.primary = t),
173
+ title: "Primary Color",
174
+ description: "Defines the core visual identity; used for key brand elements."
175
+ }, null, 8, ["initial-color", "color"]),
176
+ s(n, {
177
+ "initial-color": l().colors.secondary,
178
+ color: e.value.colors.secondary,
179
+ onRemove: o[3] || (o[3] = (t) => e.value.colors.secondary = l().colors.secondary),
180
+ onUpdate: o[4] || (o[4] = (t) => e.value.colors.secondary = t),
181
+ title: "Secondary Color",
182
+ description: "Supports the primary color in backgrounds and secondary elements."
183
+ }, null, 8, ["initial-color", "color"]),
184
+ s(n, {
185
+ "initial-color": l().colors.accent,
186
+ color: e.value.colors.accent,
187
+ onRemove: o[5] || (o[5] = (t) => e.value.colors.accent = l().colors.accent),
188
+ onUpdate: o[6] || (o[6] = (t) => e.value.colors.accent = t),
189
+ title: "Accent Color",
190
+ description: "Used for emphasis and highlighting important interactive elements."
191
+ }, null, 8, ["initial-color", "color"])
192
+ ])
193
+ ])
194
+ ]),
195
+ r("div", H, [
196
+ r("div", null, [
197
+ o[27] || (o[27] = r("div", { class: "py-12 px-24 bg-fm-color-neutral-gray-100" }, [
198
+ r("div", { class: "fm-typo-en-body-lg-600" }, "Typography"),
199
+ r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " The colors for texts appeared in the templates ")
200
+ ], -1)),
201
+ r("div", L, [
202
+ s(n, {
203
+ "initial-color": l().colors.text.onPrimary,
204
+ color: e.value.colors.text.onPrimary,
205
+ onRemove: o[7] || (o[7] = (t) => e.value.colors.text.onPrimary = l().colors.text.onPrimary),
206
+ onUpdate: o[8] || (o[8] = (t) => e.value.colors.text.onPrimary = t),
207
+ title: "Typo on Primary Color",
208
+ description: "Ensures clear text visibility when placed over primary-colored backgrounds."
209
+ }, null, 8, ["initial-color", "color"]),
210
+ s(n, {
211
+ "initial-color": l().colors.text.primary,
212
+ color: e.value.colors.text.primary,
213
+ onRemove: o[9] || (o[9] = (t) => e.value.colors.text.primary = l().colors.text.primary),
214
+ onUpdate: o[10] || (o[10] = (t) => e.value.colors.text.primary = t),
215
+ title: "Primary Color",
216
+ description: "Used for main body text and headings throughout the interface."
217
+ }, null, 8, ["initial-color", "color"]),
218
+ s(n, {
219
+ "initial-color": l().colors.text.secondary,
220
+ color: e.value.colors.text.secondary,
221
+ onRemove: o[11] || (o[11] = (t) => e.value.colors.text.secondary = l().colors.text.secondary),
222
+ onUpdate: o[12] || (o[12] = (t) => e.value.colors.text.secondary = t),
223
+ title: "Secondary Color",
224
+ description: "Applies to supporting content such as descriptions and labels."
225
+ }, null, 8, ["initial-color", "color"]),
226
+ s(n, {
227
+ "initial-color": l().colors.text.tertiary,
228
+ color: e.value.colors.text.tertiary,
229
+ onRemove: o[13] || (o[13] = (t) => e.value.colors.text.tertiary = l().colors.text.tertiary),
230
+ onUpdate: o[14] || (o[14] = (t) => e.value.colors.text.tertiary = t),
231
+ title: "Tertiary Color",
232
+ description: "For low-emphasis text like metadata, system notes, or disclaimers."
233
+ }, null, 8, ["initial-color", "color"])
234
+ ])
235
+ ])
236
+ ]),
237
+ r("div", M, [
238
+ r("div", null, [
239
+ o[28] || (o[28] = r("div", { class: "py-12 px-24 bg-fm-color-neutral-gray-100" }, [
240
+ r("div", { class: "fm-typo-en-body-lg-600" }, "Neutral colors"),
241
+ r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Color usage suitable for background, borders. ")
242
+ ], -1)),
243
+ r("div", Q, [
244
+ s(n, {
245
+ "initial-color": l().colors.neutral.light,
246
+ color: e.value.colors.neutral.light,
247
+ onRemove: o[15] || (o[15] = (t) => e.value.colors.neutral.light = l().colors.neutral.light),
248
+ onUpdate: o[16] || (o[16] = (t) => e.value.colors.neutral.light = t),
249
+ title: "Neutral color - light",
250
+ description: "Used for subtle background areas, separators, or low-emphasis surfaces."
251
+ }, null, 8, ["initial-color", "color"]),
252
+ s(n, {
253
+ "initial-color": l().colors.neutral.mid,
254
+ color: e.value.colors.neutral.mid,
255
+ onRemove: o[17] || (o[17] = (t) => e.value.colors.neutral.mid = l().colors.neutral.mid),
256
+ onUpdate: o[18] || (o[18] = (t) => e.value.colors.neutral.mid = t),
257
+ title: "Neutral color - mid",
258
+ description: "Supports visual structure and is applied to dividers and medium-emphasis UI elements."
259
+ }, null, 8, ["initial-color", "color"]),
260
+ s(n, {
261
+ "initial-color": l().colors.neutral.dark,
262
+ color: e.value.colors.neutral.dark,
263
+ onRemove: o[19] || (o[19] = (t) => e.value.colors.neutral.dark = l().colors.neutral.dark),
264
+ onUpdate: o[20] || (o[20] = (t) => e.value.colors.neutral.dark = t),
265
+ title: "Neutral color - dark",
266
+ description: "Provides strong contrast for high-emphasis elements and helps establish hierarchy."
267
+ }, null, 8, ["initial-color", "color"])
268
+ ])
269
+ ])
270
+ ])
271
+ ])) : b("", !0),
272
+ r("div", W, [
273
+ r("div", null, [
274
+ o[29] || (o[29] = r("div", { class: "py-12 px-24 bg-fm-color-neutral-gray-100" }, [
275
+ r("div", { class: "fm-typo-en-body-lg-600" }, "Background colors"),
276
+ r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Color usage suitable for backgrounds ")
277
+ ], -1)),
278
+ r("div", X, [
279
+ s(n, {
280
+ "initial-color": l().colors.background.base,
281
+ color: e.value.colors.background.base,
282
+ onRemove: o[21] || (o[21] = (t) => e.value.colors.background.base = l().colors.neutral.light),
283
+ onUpdate: o[22] || (o[22] = (t) => e.value.colors.background.base = t),
284
+ title: "Base",
285
+ description: "The default interface surface; supports layout and content clarity."
286
+ }, null, 8, ["initial-color", "color"]),
287
+ s(n, {
288
+ "initial-color": l().colors.background.elevated,
289
+ color: e.value.colors.background.elevated,
290
+ onRemove: o[23] || (o[23] = (t) => e.value.colors.background.elevated = l().colors.neutral.mid),
291
+ onUpdate: o[24] || (o[24] = (t) => e.value.colors.background.elevated = t),
292
+ title: "Elevated",
293
+ description: "Used for layered components like cards and modals to create depth."
294
+ }, null, 8, ["initial-color", "color"])
295
+ ])
296
+ ])
297
+ ])
298
+ ]);
299
+ };
300
+ }
301
+ });
302
+ export {
303
+ to as default
304
+ };