@feedmepos/mf-brand-app-builder 0.5.43-dev.1 → 0.5.44-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.
@@ -1,127 +0,0 @@
1
- import { useSnackbar as O } from "@feedmepos/ui-library";
2
- function L() {
3
- const a = O();
4
- function f(u, y) {
5
- const { loading: o, success: n, error: e, duration: t } = y, s = a.open(
6
- {
7
- message: typeof o == "function" ? o() : o,
8
- type: "info",
9
- spinner: !0,
10
- dismissable: !1
11
- },
12
- null
13
- );
14
- return (typeof u == "function" ? u() : u).then((c) => (a.close(s), n && a.open(
15
- {
16
- message: typeof n == "function" ? n() : n,
17
- type: "success",
18
- spinner: !1,
19
- dismissable: !0
20
- },
21
- t ?? 2e3
22
- ), c)).catch((c) => {
23
- throw e && (a.close(s), a.open(
24
- {
25
- message: typeof e == "function" ? e(c) : e,
26
- type: "error",
27
- spinner: !1,
28
- dismissable: !0
29
- },
30
- t ?? 2e3
31
- )), c;
32
- });
33
- }
34
- return {
35
- promise: f
36
- };
37
- }
38
- const S = /* @__PURE__ */ new Set(), T = {
39
- colors: {
40
- primary: "#ff7823",
41
- secondary: "#fff3e6",
42
- accent: "#B25300",
43
- background: {
44
- base: "#F8F8F8",
45
- elevated: "#FFFFFF"
46
- },
47
- neutral: {
48
- light: "#DADADA",
49
- mid: "#B2B3B6",
50
- dark: "#1C1C1E"
51
- },
52
- text: {
53
- onPrimary: "#FFFFFF",
54
- primary: "#1C1C1E",
55
- secondary: "#555555",
56
- tertiary: "#A2A09E"
57
- },
58
- status: {
59
- success: "#10B981",
60
- warning: "#F59E0B",
61
- error: "#EF4444",
62
- info: "#3B82F6"
63
- // Add info if missing previously
64
- }
65
- },
66
- fonts: {
67
- brand: "'Inter', sans-serif",
68
- heading: "'Inter', sans-serif",
69
- body: "'Roboto', sans-serif"
70
- },
71
- ordering: {
72
- app: {
73
- category: "VERTICAL",
74
- items: "LIST",
75
- singleCategory: !1
76
- },
77
- kiosk: {
78
- category: "VERTICAL",
79
- singleCategory: !1
80
- }
81
- },
82
- fontFamilies: []
83
- };
84
- function R(a = T, f, u) {
85
- var c, d, m, p, g, b, h, F, x, B, w, E, A, k, I, P;
86
- const y = {}, o = document.documentElement, n = (i, r) => {
87
- r && o.style.setProperty(`--brand-${i}`, r);
88
- }, { fonts: e } = a, t = y.overrideBy ? (m = (d = (c = a.ordering) == null ? void 0 : c[y.overrideBy]) == null ? void 0 : d.brandkitOverride) == null ? void 0 : m.colors : void 0, s = {
89
- primary: (t == null ? void 0 : t.primary) ?? a.colors.primary,
90
- secondary: (t == null ? void 0 : t.secondary) ?? a.colors.secondary,
91
- accent: (t == null ? void 0 : t.accent) ?? a.colors.accent,
92
- background: {
93
- base: ((p = t == null ? void 0 : t.background) == null ? void 0 : p.base) ?? a.colors.background.base,
94
- elevated: ((g = t == null ? void 0 : t.background) == null ? void 0 : g.elevated) ?? a.colors.background.elevated
95
- },
96
- neutral: {
97
- light: ((b = t == null ? void 0 : t.neutral) == null ? void 0 : b.light) ?? a.colors.neutral.light,
98
- mid: ((h = t == null ? void 0 : t.neutral) == null ? void 0 : h.mid) ?? a.colors.neutral.mid,
99
- dark: ((F = t == null ? void 0 : t.neutral) == null ? void 0 : F.dark) ?? a.colors.neutral.dark
100
- },
101
- status: {
102
- success: ((x = t == null ? void 0 : t.status) == null ? void 0 : x.success) ?? a.colors.status.success,
103
- warning: ((B = t == null ? void 0 : t.status) == null ? void 0 : B.warning) ?? a.colors.status.warning,
104
- error: ((w = t == null ? void 0 : t.status) == null ? void 0 : w.error) ?? a.colors.status.error,
105
- info: ((E = t == null ? void 0 : t.status) == null ? void 0 : E.info) ?? a.colors.status.info
106
- },
107
- text: {
108
- onPrimary: ((A = t == null ? void 0 : t.text) == null ? void 0 : A.onPrimary) ?? a.colors.text.onPrimary,
109
- primary: ((k = t == null ? void 0 : t.text) == null ? void 0 : k.primary) ?? a.colors.text.primary,
110
- secondary: ((I = t == null ? void 0 : t.text) == null ? void 0 : I.secondary) ?? a.colors.text.secondary,
111
- tertiary: ((P = t == null ? void 0 : t.text) == null ? void 0 : P.tertiary) ?? a.colors.text.tertiary
112
- }
113
- };
114
- n("color-primary", s.primary), n("color-secondary", s.secondary), n("color-accent", s.accent), n("color-background-base", s.background.base), n("color-background-elevated", s.background.elevated), n("color-neutral-light", s.neutral.light), n("color-neutral-mid", s.neutral.mid), n("color-neutral-dark", s.neutral.dark), n("color-typo-on-primary", s.text.onPrimary), n("color-typo-primary", s.text.primary), n("color-typo-secondary", s.text.secondary), n("color-typo-tertiary", s.text.tertiary), n("color-status-success", s.status.success), n("color-status-warning", s.status.warning), n("color-status-error", s.status.error), n("color-status-info", s.status.info), n("font-family-brand", e.brand), n("font-family-heading", e.heading ?? e.brand), n("font-family-body", e.body ?? e.brand);
115
- for (const i of a.fontFamilies ?? []) {
116
- const r = i.stylesheet;
117
- if (!r || S.has(r) || document.querySelector(`link[href="${r}"]`))
118
- continue;
119
- const l = document.createElement("link");
120
- l.rel = "stylesheet", l.href = r, l.setAttribute("data-brand-font", r), document.head.appendChild(l), S.add(r);
121
- }
122
- }
123
- export {
124
- R as a,
125
- T as b,
126
- L as u
127
- };