@aura360/aura-nine-dot-menu 1.0.0
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/index.d.ts +1 -0
- package/dist/index.es.js +875 -0
- package/dist/index.umd.js +239 -0
- package/dist/react/AuraNineDotMenu.d.ts +14 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/web-component/AuraApp.d.ts +7 -0
- package/dist/web-component/AuraAppIcon.d.ts +5 -0
- package/dist/web-component/AuraAppText.d.ts +5 -0
- package/dist/web-component/AuraNineDotMenu.d.ts +18 -0
- package/dist/web-component/index.d.ts +0 -0
- package/package.json +34 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './react/AuraNineDotMenu';
|
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,875 @@
|
|
|
1
|
+
import $t, { useRef as gt, useEffect as Q } from "react";
|
|
2
|
+
const N = globalThis, W = N.ShadowRoot && (N.ShadyCSS === void 0 || N.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Z = /* @__PURE__ */ Symbol(), X = /* @__PURE__ */ new WeakMap();
|
|
3
|
+
let pt = class {
|
|
4
|
+
constructor(t, e, s) {
|
|
5
|
+
if (this._$cssResult$ = !0, s !== Z) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
6
|
+
this.cssText = t, this.t = e;
|
|
7
|
+
}
|
|
8
|
+
get styleSheet() {
|
|
9
|
+
let t = this.o;
|
|
10
|
+
const e = this.t;
|
|
11
|
+
if (W && t === void 0) {
|
|
12
|
+
const s = e !== void 0 && e.length === 1;
|
|
13
|
+
s && (t = X.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && X.set(e, t));
|
|
14
|
+
}
|
|
15
|
+
return t;
|
|
16
|
+
}
|
|
17
|
+
toString() {
|
|
18
|
+
return this.cssText;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const _t = (i) => new pt(typeof i == "string" ? i : i + "", void 0, Z), k = (i, ...t) => {
|
|
22
|
+
const e = i.length === 1 ? i[0] : t.reduce((s, r, o) => s + ((n) => {
|
|
23
|
+
if (n._$cssResult$ === !0) return n.cssText;
|
|
24
|
+
if (typeof n == "number") return n;
|
|
25
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
26
|
+
})(r) + i[o + 1], i[0]);
|
|
27
|
+
return new pt(e, i, Z);
|
|
28
|
+
}, mt = (i, t) => {
|
|
29
|
+
if (W) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
30
|
+
else for (const e of t) {
|
|
31
|
+
const s = document.createElement("style"), r = N.litNonce;
|
|
32
|
+
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
|
|
33
|
+
}
|
|
34
|
+
}, tt = W ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
35
|
+
let e = "";
|
|
36
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
37
|
+
return _t(e);
|
|
38
|
+
})(i) : i;
|
|
39
|
+
const { is: vt, defineProperty: yt, getOwnPropertyDescriptor: At, getOwnPropertyNames: bt, getOwnPropertySymbols: xt, getPrototypeOf: Et } = Object, j = globalThis, et = j.trustedTypes, wt = et ? et.emptyScript : "", St = j.reactiveElementPolyfillSupport, S = (i, t) => i, R = { toAttribute(i, t) {
|
|
40
|
+
switch (t) {
|
|
41
|
+
case Boolean:
|
|
42
|
+
i = i ? wt : null;
|
|
43
|
+
break;
|
|
44
|
+
case Object:
|
|
45
|
+
case Array:
|
|
46
|
+
i = i == null ? i : JSON.stringify(i);
|
|
47
|
+
}
|
|
48
|
+
return i;
|
|
49
|
+
}, fromAttribute(i, t) {
|
|
50
|
+
let e = i;
|
|
51
|
+
switch (t) {
|
|
52
|
+
case Boolean:
|
|
53
|
+
e = i !== null;
|
|
54
|
+
break;
|
|
55
|
+
case Number:
|
|
56
|
+
e = i === null ? null : Number(i);
|
|
57
|
+
break;
|
|
58
|
+
case Object:
|
|
59
|
+
case Array:
|
|
60
|
+
try {
|
|
61
|
+
e = JSON.parse(i);
|
|
62
|
+
} catch {
|
|
63
|
+
e = null;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return e;
|
|
67
|
+
} }, F = (i, t) => !vt(i, t), st = { attribute: !0, type: String, converter: R, reflect: !1, useDefault: !1, hasChanged: F };
|
|
68
|
+
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), j.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
69
|
+
let y = class extends HTMLElement {
|
|
70
|
+
static addInitializer(t) {
|
|
71
|
+
this._$Ei(), (this.l ??= []).push(t);
|
|
72
|
+
}
|
|
73
|
+
static get observedAttributes() {
|
|
74
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
75
|
+
}
|
|
76
|
+
static createProperty(t, e = st) {
|
|
77
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
78
|
+
const s = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, s, e);
|
|
79
|
+
r !== void 0 && yt(this.prototype, t, r);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
static getPropertyDescriptor(t, e, s) {
|
|
83
|
+
const { get: r, set: o } = At(this.prototype, t) ?? { get() {
|
|
84
|
+
return this[e];
|
|
85
|
+
}, set(n) {
|
|
86
|
+
this[e] = n;
|
|
87
|
+
} };
|
|
88
|
+
return { get: r, set(n) {
|
|
89
|
+
const h = r?.call(this);
|
|
90
|
+
o?.call(this, n), this.requestUpdate(t, h, s);
|
|
91
|
+
}, configurable: !0, enumerable: !0 };
|
|
92
|
+
}
|
|
93
|
+
static getPropertyOptions(t) {
|
|
94
|
+
return this.elementProperties.get(t) ?? st;
|
|
95
|
+
}
|
|
96
|
+
static _$Ei() {
|
|
97
|
+
if (this.hasOwnProperty(S("elementProperties"))) return;
|
|
98
|
+
const t = Et(this);
|
|
99
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
100
|
+
}
|
|
101
|
+
static finalize() {
|
|
102
|
+
if (this.hasOwnProperty(S("finalized"))) return;
|
|
103
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(S("properties"))) {
|
|
104
|
+
const e = this.properties, s = [...bt(e), ...xt(e)];
|
|
105
|
+
for (const r of s) this.createProperty(r, e[r]);
|
|
106
|
+
}
|
|
107
|
+
const t = this[Symbol.metadata];
|
|
108
|
+
if (t !== null) {
|
|
109
|
+
const e = litPropertyMetadata.get(t);
|
|
110
|
+
if (e !== void 0) for (const [s, r] of e) this.elementProperties.set(s, r);
|
|
111
|
+
}
|
|
112
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
113
|
+
for (const [e, s] of this.elementProperties) {
|
|
114
|
+
const r = this._$Eu(e, s);
|
|
115
|
+
r !== void 0 && this._$Eh.set(r, e);
|
|
116
|
+
}
|
|
117
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
118
|
+
}
|
|
119
|
+
static finalizeStyles(t) {
|
|
120
|
+
const e = [];
|
|
121
|
+
if (Array.isArray(t)) {
|
|
122
|
+
const s = new Set(t.flat(1 / 0).reverse());
|
|
123
|
+
for (const r of s) e.unshift(tt(r));
|
|
124
|
+
} else t !== void 0 && e.push(tt(t));
|
|
125
|
+
return e;
|
|
126
|
+
}
|
|
127
|
+
static _$Eu(t, e) {
|
|
128
|
+
const s = e.attribute;
|
|
129
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
130
|
+
}
|
|
131
|
+
constructor() {
|
|
132
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
133
|
+
}
|
|
134
|
+
_$Ev() {
|
|
135
|
+
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
|
|
136
|
+
}
|
|
137
|
+
addController(t) {
|
|
138
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
|
|
139
|
+
}
|
|
140
|
+
removeController(t) {
|
|
141
|
+
this._$EO?.delete(t);
|
|
142
|
+
}
|
|
143
|
+
_$E_() {
|
|
144
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
145
|
+
for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
|
146
|
+
t.size > 0 && (this._$Ep = t);
|
|
147
|
+
}
|
|
148
|
+
createRenderRoot() {
|
|
149
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
150
|
+
return mt(t, this.constructor.elementStyles), t;
|
|
151
|
+
}
|
|
152
|
+
connectedCallback() {
|
|
153
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
|
|
154
|
+
}
|
|
155
|
+
enableUpdating(t) {
|
|
156
|
+
}
|
|
157
|
+
disconnectedCallback() {
|
|
158
|
+
this._$EO?.forEach((t) => t.hostDisconnected?.());
|
|
159
|
+
}
|
|
160
|
+
attributeChangedCallback(t, e, s) {
|
|
161
|
+
this._$AK(t, s);
|
|
162
|
+
}
|
|
163
|
+
_$ET(t, e) {
|
|
164
|
+
const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s);
|
|
165
|
+
if (r !== void 0 && s.reflect === !0) {
|
|
166
|
+
const o = (s.converter?.toAttribute !== void 0 ? s.converter : R).toAttribute(e, s.type);
|
|
167
|
+
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
_$AK(t, e) {
|
|
171
|
+
const s = this.constructor, r = s._$Eh.get(t);
|
|
172
|
+
if (r !== void 0 && this._$Em !== r) {
|
|
173
|
+
const o = s.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : R;
|
|
174
|
+
this._$Em = r;
|
|
175
|
+
const h = n.fromAttribute(e, o.type);
|
|
176
|
+
this[r] = h ?? this._$Ej?.get(r) ?? h, this._$Em = null;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
requestUpdate(t, e, s, r = !1, o) {
|
|
180
|
+
if (t !== void 0) {
|
|
181
|
+
const n = this.constructor;
|
|
182
|
+
if (r === !1 && (o = this[t]), s ??= n.getPropertyOptions(t), !((s.hasChanged ?? F)(o, e) || s.useDefault && s.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(n._$Eu(t, s)))) return;
|
|
183
|
+
this.C(t, e, s);
|
|
184
|
+
}
|
|
185
|
+
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
186
|
+
}
|
|
187
|
+
C(t, e, { useDefault: s, reflect: r, wrapped: o }, n) {
|
|
188
|
+
s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
189
|
+
}
|
|
190
|
+
async _$EP() {
|
|
191
|
+
this.isUpdatePending = !0;
|
|
192
|
+
try {
|
|
193
|
+
await this._$ES;
|
|
194
|
+
} catch (e) {
|
|
195
|
+
Promise.reject(e);
|
|
196
|
+
}
|
|
197
|
+
const t = this.scheduleUpdate();
|
|
198
|
+
return t != null && await t, !this.isUpdatePending;
|
|
199
|
+
}
|
|
200
|
+
scheduleUpdate() {
|
|
201
|
+
return this.performUpdate();
|
|
202
|
+
}
|
|
203
|
+
performUpdate() {
|
|
204
|
+
if (!this.isUpdatePending) return;
|
|
205
|
+
if (!this.hasUpdated) {
|
|
206
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
207
|
+
for (const [r, o] of this._$Ep) this[r] = o;
|
|
208
|
+
this._$Ep = void 0;
|
|
209
|
+
}
|
|
210
|
+
const s = this.constructor.elementProperties;
|
|
211
|
+
if (s.size > 0) for (const [r, o] of s) {
|
|
212
|
+
const { wrapped: n } = o, h = this[r];
|
|
213
|
+
n !== !0 || this._$AL.has(r) || h === void 0 || this.C(r, void 0, o, h);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
let t = !1;
|
|
217
|
+
const e = this._$AL;
|
|
218
|
+
try {
|
|
219
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((s) => s.hostUpdate?.()), this.update(e)) : this._$EM();
|
|
220
|
+
} catch (s) {
|
|
221
|
+
throw t = !1, this._$EM(), s;
|
|
222
|
+
}
|
|
223
|
+
t && this._$AE(e);
|
|
224
|
+
}
|
|
225
|
+
willUpdate(t) {
|
|
226
|
+
}
|
|
227
|
+
_$AE(t) {
|
|
228
|
+
this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
229
|
+
}
|
|
230
|
+
_$EM() {
|
|
231
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
232
|
+
}
|
|
233
|
+
get updateComplete() {
|
|
234
|
+
return this.getUpdateComplete();
|
|
235
|
+
}
|
|
236
|
+
getUpdateComplete() {
|
|
237
|
+
return this._$ES;
|
|
238
|
+
}
|
|
239
|
+
shouldUpdate(t) {
|
|
240
|
+
return !0;
|
|
241
|
+
}
|
|
242
|
+
update(t) {
|
|
243
|
+
this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM();
|
|
244
|
+
}
|
|
245
|
+
updated(t) {
|
|
246
|
+
}
|
|
247
|
+
firstUpdated(t) {
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[S("elementProperties")] = /* @__PURE__ */ new Map(), y[S("finalized")] = /* @__PURE__ */ new Map(), St?.({ ReactiveElement: y }), (j.reactiveElementVersions ??= []).push("2.1.2");
|
|
251
|
+
const J = globalThis, rt = (i) => i, D = J.trustedTypes, it = D ? D.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ct = "$lit$", $ = `lit$${Math.random().toFixed(9).slice(2)}$`, dt = "?" + $, Pt = `<${dt}>`, v = document, P = () => v.createComment(""), C = (i) => i === null || typeof i != "object" && typeof i != "function", K = Array.isArray, Ct = (i) => K(i) || typeof i?.[Symbol.iterator] == "function", I = `[
|
|
252
|
+
\f\r]`, w = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ot = /-->/g, nt = />/g, _ = RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
|
|
253
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), at = /'/g, ht = /"/g, ut = /^(?:script|style|textarea|title)$/i, Ot = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), A = Ot(1), b = /* @__PURE__ */ Symbol.for("lit-noChange"), c = /* @__PURE__ */ Symbol.for("lit-nothing"), lt = /* @__PURE__ */ new WeakMap(), m = v.createTreeWalker(v, 129);
|
|
254
|
+
function ft(i, t) {
|
|
255
|
+
if (!K(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
256
|
+
return it !== void 0 ? it.createHTML(t) : t;
|
|
257
|
+
}
|
|
258
|
+
const Ut = (i, t) => {
|
|
259
|
+
const e = i.length - 1, s = [];
|
|
260
|
+
let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = w;
|
|
261
|
+
for (let h = 0; h < e; h++) {
|
|
262
|
+
const a = i[h];
|
|
263
|
+
let p, d, l = -1, u = 0;
|
|
264
|
+
for (; u < a.length && (n.lastIndex = u, d = n.exec(a), d !== null); ) u = n.lastIndex, n === w ? d[1] === "!--" ? n = ot : d[1] !== void 0 ? n = nt : d[2] !== void 0 ? (ut.test(d[2]) && (r = RegExp("</" + d[2], "g")), n = _) : d[3] !== void 0 && (n = _) : n === _ ? d[0] === ">" ? (n = r ?? w, l = -1) : d[1] === void 0 ? l = -2 : (l = n.lastIndex - d[2].length, p = d[1], n = d[3] === void 0 ? _ : d[3] === '"' ? ht : at) : n === ht || n === at ? n = _ : n === ot || n === nt ? n = w : (n = _, r = void 0);
|
|
265
|
+
const f = n === _ && i[h + 1].startsWith("/>") ? " " : "";
|
|
266
|
+
o += n === w ? a + Pt : l >= 0 ? (s.push(p), a.slice(0, l) + ct + a.slice(l) + $ + f) : a + $ + (l === -2 ? h : f);
|
|
267
|
+
}
|
|
268
|
+
return [ft(i, o + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
269
|
+
};
|
|
270
|
+
class O {
|
|
271
|
+
constructor({ strings: t, _$litType$: e }, s) {
|
|
272
|
+
let r;
|
|
273
|
+
this.parts = [];
|
|
274
|
+
let o = 0, n = 0;
|
|
275
|
+
const h = t.length - 1, a = this.parts, [p, d] = Ut(t, e);
|
|
276
|
+
if (this.el = O.createElement(p, s), m.currentNode = this.el.content, e === 2 || e === 3) {
|
|
277
|
+
const l = this.el.content.firstChild;
|
|
278
|
+
l.replaceWith(...l.childNodes);
|
|
279
|
+
}
|
|
280
|
+
for (; (r = m.nextNode()) !== null && a.length < h; ) {
|
|
281
|
+
if (r.nodeType === 1) {
|
|
282
|
+
if (r.hasAttributes()) for (const l of r.getAttributeNames()) if (l.endsWith(ct)) {
|
|
283
|
+
const u = d[n++], f = r.getAttribute(l).split($), H = /([.?@])?(.*)/.exec(u);
|
|
284
|
+
a.push({ type: 1, index: o, name: H[2], strings: f, ctor: H[1] === "." ? Mt : H[1] === "?" ? Ht : H[1] === "@" ? Nt : z }), r.removeAttribute(l);
|
|
285
|
+
} else l.startsWith($) && (a.push({ type: 6, index: o }), r.removeAttribute(l));
|
|
286
|
+
if (ut.test(r.tagName)) {
|
|
287
|
+
const l = r.textContent.split($), u = l.length - 1;
|
|
288
|
+
if (u > 0) {
|
|
289
|
+
r.textContent = D ? D.emptyScript : "";
|
|
290
|
+
for (let f = 0; f < u; f++) r.append(l[f], P()), m.nextNode(), a.push({ type: 2, index: ++o });
|
|
291
|
+
r.append(l[u], P());
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
} else if (r.nodeType === 8) if (r.data === dt) a.push({ type: 2, index: o });
|
|
295
|
+
else {
|
|
296
|
+
let l = -1;
|
|
297
|
+
for (; (l = r.data.indexOf($, l + 1)) !== -1; ) a.push({ type: 7, index: o }), l += $.length - 1;
|
|
298
|
+
}
|
|
299
|
+
o++;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
static createElement(t, e) {
|
|
303
|
+
const s = v.createElement("template");
|
|
304
|
+
return s.innerHTML = t, s;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
function x(i, t, e = i, s) {
|
|
308
|
+
if (t === b) return t;
|
|
309
|
+
let r = s !== void 0 ? e._$Co?.[s] : e._$Cl;
|
|
310
|
+
const o = C(t) ? void 0 : t._$litDirective$;
|
|
311
|
+
return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = r : e._$Cl = r), r !== void 0 && (t = x(i, r._$AS(i, t.values), r, s)), t;
|
|
312
|
+
}
|
|
313
|
+
class Tt {
|
|
314
|
+
constructor(t, e) {
|
|
315
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
316
|
+
}
|
|
317
|
+
get parentNode() {
|
|
318
|
+
return this._$AM.parentNode;
|
|
319
|
+
}
|
|
320
|
+
get _$AU() {
|
|
321
|
+
return this._$AM._$AU;
|
|
322
|
+
}
|
|
323
|
+
u(t) {
|
|
324
|
+
const { el: { content: e }, parts: s } = this._$AD, r = (t?.creationScope ?? v).importNode(e, !0);
|
|
325
|
+
m.currentNode = r;
|
|
326
|
+
let o = m.nextNode(), n = 0, h = 0, a = s[0];
|
|
327
|
+
for (; a !== void 0; ) {
|
|
328
|
+
if (n === a.index) {
|
|
329
|
+
let p;
|
|
330
|
+
a.type === 2 ? p = new T(o, o.nextSibling, this, t) : a.type === 1 ? p = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (p = new Rt(o, this, t)), this._$AV.push(p), a = s[++h];
|
|
331
|
+
}
|
|
332
|
+
n !== a?.index && (o = m.nextNode(), n++);
|
|
333
|
+
}
|
|
334
|
+
return m.currentNode = v, r;
|
|
335
|
+
}
|
|
336
|
+
p(t) {
|
|
337
|
+
let e = 0;
|
|
338
|
+
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
class T {
|
|
342
|
+
get _$AU() {
|
|
343
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
344
|
+
}
|
|
345
|
+
constructor(t, e, s, r) {
|
|
346
|
+
this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = r, this._$Cv = r?.isConnected ?? !0;
|
|
347
|
+
}
|
|
348
|
+
get parentNode() {
|
|
349
|
+
let t = this._$AA.parentNode;
|
|
350
|
+
const e = this._$AM;
|
|
351
|
+
return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
|
|
352
|
+
}
|
|
353
|
+
get startNode() {
|
|
354
|
+
return this._$AA;
|
|
355
|
+
}
|
|
356
|
+
get endNode() {
|
|
357
|
+
return this._$AB;
|
|
358
|
+
}
|
|
359
|
+
_$AI(t, e = this) {
|
|
360
|
+
t = x(this, t, e), C(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== b && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ct(t) ? this.k(t) : this._(t);
|
|
361
|
+
}
|
|
362
|
+
O(t) {
|
|
363
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
364
|
+
}
|
|
365
|
+
T(t) {
|
|
366
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
367
|
+
}
|
|
368
|
+
_(t) {
|
|
369
|
+
this._$AH !== c && C(this._$AH) ? this._$AA.nextSibling.data = t : this.T(v.createTextNode(t)), this._$AH = t;
|
|
370
|
+
}
|
|
371
|
+
$(t) {
|
|
372
|
+
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = O.createElement(ft(s.h, s.h[0]), this.options)), s);
|
|
373
|
+
if (this._$AH?._$AD === r) this._$AH.p(e);
|
|
374
|
+
else {
|
|
375
|
+
const o = new Tt(r, this), n = o.u(this.options);
|
|
376
|
+
o.p(e), this.T(n), this._$AH = o;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
_$AC(t) {
|
|
380
|
+
let e = lt.get(t.strings);
|
|
381
|
+
return e === void 0 && lt.set(t.strings, e = new O(t)), e;
|
|
382
|
+
}
|
|
383
|
+
k(t) {
|
|
384
|
+
K(this._$AH) || (this._$AH = [], this._$AR());
|
|
385
|
+
const e = this._$AH;
|
|
386
|
+
let s, r = 0;
|
|
387
|
+
for (const o of t) r === e.length ? e.push(s = new T(this.O(P()), this.O(P()), this, this.options)) : s = e[r], s._$AI(o), r++;
|
|
388
|
+
r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
|
|
389
|
+
}
|
|
390
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
|
391
|
+
for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
|
|
392
|
+
const s = rt(t).nextSibling;
|
|
393
|
+
rt(t).remove(), t = s;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
setConnected(t) {
|
|
397
|
+
this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
class z {
|
|
401
|
+
get tagName() {
|
|
402
|
+
return this.element.tagName;
|
|
403
|
+
}
|
|
404
|
+
get _$AU() {
|
|
405
|
+
return this._$AM._$AU;
|
|
406
|
+
}
|
|
407
|
+
constructor(t, e, s, r, o) {
|
|
408
|
+
this.type = 1, this._$AH = c, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = c;
|
|
409
|
+
}
|
|
410
|
+
_$AI(t, e = this, s, r) {
|
|
411
|
+
const o = this.strings;
|
|
412
|
+
let n = !1;
|
|
413
|
+
if (o === void 0) t = x(this, t, e, 0), n = !C(t) || t !== this._$AH && t !== b, n && (this._$AH = t);
|
|
414
|
+
else {
|
|
415
|
+
const h = t;
|
|
416
|
+
let a, p;
|
|
417
|
+
for (t = o[0], a = 0; a < o.length - 1; a++) p = x(this, h[s + a], e, a), p === b && (p = this._$AH[a]), n ||= !C(p) || p !== this._$AH[a], p === c ? t = c : t !== c && (t += (p ?? "") + o[a + 1]), this._$AH[a] = p;
|
|
418
|
+
}
|
|
419
|
+
n && !r && this.j(t);
|
|
420
|
+
}
|
|
421
|
+
j(t) {
|
|
422
|
+
t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
class Mt extends z {
|
|
426
|
+
constructor() {
|
|
427
|
+
super(...arguments), this.type = 3;
|
|
428
|
+
}
|
|
429
|
+
j(t) {
|
|
430
|
+
this.element[this.name] = t === c ? void 0 : t;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
class Ht extends z {
|
|
434
|
+
constructor() {
|
|
435
|
+
super(...arguments), this.type = 4;
|
|
436
|
+
}
|
|
437
|
+
j(t) {
|
|
438
|
+
this.element.toggleAttribute(this.name, !!t && t !== c);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
class Nt extends z {
|
|
442
|
+
constructor(t, e, s, r, o) {
|
|
443
|
+
super(t, e, s, r, o), this.type = 5;
|
|
444
|
+
}
|
|
445
|
+
_$AI(t, e = this) {
|
|
446
|
+
if ((t = x(this, t, e, 0) ?? c) === b) return;
|
|
447
|
+
const s = this._$AH, r = t === c && s !== c || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== c && (s === c || r);
|
|
448
|
+
r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
449
|
+
}
|
|
450
|
+
handleEvent(t) {
|
|
451
|
+
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
class Rt {
|
|
455
|
+
constructor(t, e, s) {
|
|
456
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
457
|
+
}
|
|
458
|
+
get _$AU() {
|
|
459
|
+
return this._$AM._$AU;
|
|
460
|
+
}
|
|
461
|
+
_$AI(t) {
|
|
462
|
+
x(this, t);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
const Dt = J.litHtmlPolyfillSupport;
|
|
466
|
+
Dt?.(O, T), (J.litHtmlVersions ??= []).push("3.3.2");
|
|
467
|
+
const kt = (i, t, e) => {
|
|
468
|
+
const s = e?.renderBefore ?? t;
|
|
469
|
+
let r = s._$litPart$;
|
|
470
|
+
if (r === void 0) {
|
|
471
|
+
const o = e?.renderBefore ?? null;
|
|
472
|
+
s._$litPart$ = r = new T(t.insertBefore(P(), o), o, void 0, e ?? {});
|
|
473
|
+
}
|
|
474
|
+
return r._$AI(i), r;
|
|
475
|
+
};
|
|
476
|
+
const Y = globalThis;
|
|
477
|
+
class g extends y {
|
|
478
|
+
constructor() {
|
|
479
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
480
|
+
}
|
|
481
|
+
createRenderRoot() {
|
|
482
|
+
const t = super.createRenderRoot();
|
|
483
|
+
return this.renderOptions.renderBefore ??= t.firstChild, t;
|
|
484
|
+
}
|
|
485
|
+
update(t) {
|
|
486
|
+
const e = this.render();
|
|
487
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = kt(e, this.renderRoot, this.renderOptions);
|
|
488
|
+
}
|
|
489
|
+
connectedCallback() {
|
|
490
|
+
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
491
|
+
}
|
|
492
|
+
disconnectedCallback() {
|
|
493
|
+
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
494
|
+
}
|
|
495
|
+
render() {
|
|
496
|
+
return b;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
g._$litElement$ = !0, g.finalized = !0, Y.litElementHydrateSupport?.({ LitElement: g });
|
|
500
|
+
const jt = Y.litElementPolyfillSupport;
|
|
501
|
+
jt?.({ LitElement: g });
|
|
502
|
+
(Y.litElementVersions ??= []).push("4.2.2");
|
|
503
|
+
const L = (i) => (t, e) => {
|
|
504
|
+
e !== void 0 ? e.addInitializer(() => {
|
|
505
|
+
customElements.define(i, t);
|
|
506
|
+
}) : customElements.define(i, t);
|
|
507
|
+
};
|
|
508
|
+
const zt = { attribute: !0, type: String, converter: R, reflect: !1, hasChanged: F }, Lt = (i = zt, t, e) => {
|
|
509
|
+
const { kind: s, metadata: r } = e;
|
|
510
|
+
let o = globalThis.litPropertyMetadata.get(r);
|
|
511
|
+
if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), s === "setter" && ((i = Object.create(i)).wrapped = !0), o.set(e.name, i), s === "accessor") {
|
|
512
|
+
const { name: n } = e;
|
|
513
|
+
return { set(h) {
|
|
514
|
+
const a = t.get.call(this);
|
|
515
|
+
t.set.call(this, h), this.requestUpdate(n, a, i, !0, h);
|
|
516
|
+
}, init(h) {
|
|
517
|
+
return h !== void 0 && this.C(n, void 0, i, h), h;
|
|
518
|
+
} };
|
|
519
|
+
}
|
|
520
|
+
if (s === "setter") {
|
|
521
|
+
const { name: n } = e;
|
|
522
|
+
return function(h) {
|
|
523
|
+
const a = this[n];
|
|
524
|
+
t.call(this, h), this.requestUpdate(n, a, i, !0, h);
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
throw Error("Unsupported decorator location: " + s);
|
|
528
|
+
};
|
|
529
|
+
function M(i) {
|
|
530
|
+
return (t, e) => typeof e == "object" ? Lt(i, t, e) : ((s, r, o) => {
|
|
531
|
+
const n = r.hasOwnProperty(o);
|
|
532
|
+
return r.constructor.createProperty(o, s), n ? Object.getOwnPropertyDescriptor(r, o) : void 0;
|
|
533
|
+
})(i, t, e);
|
|
534
|
+
}
|
|
535
|
+
function Bt(i) {
|
|
536
|
+
return M({ ...i, state: !0, attribute: !1 });
|
|
537
|
+
}
|
|
538
|
+
var It = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, B = (i, t, e, s) => {
|
|
539
|
+
for (var r = s > 1 ? void 0 : s ? qt(t, e) : t, o = i.length - 1, n; o >= 0; o--)
|
|
540
|
+
(n = i[o]) && (r = (s ? n(t, e, r) : n(r)) || r);
|
|
541
|
+
return s && r && It(t, e, r), r;
|
|
542
|
+
};
|
|
543
|
+
let E = class extends g {
|
|
544
|
+
constructor() {
|
|
545
|
+
super(...arguments), this.data = [], this.position = "top-right", this.open = !1;
|
|
546
|
+
}
|
|
547
|
+
render() {
|
|
548
|
+
return A`
|
|
549
|
+
<div class="trigger" @click=${this.toggle}>
|
|
550
|
+
<div class="dots"> ${Array.from({ length: 9 }).map(() => A`<span class="dot"></span>`)} </div> </div>
|
|
551
|
+
|
|
552
|
+
<div class="panel ${this.open ? "open" : ""}">
|
|
553
|
+
<div class="apps">
|
|
554
|
+
${this.data.map((i) => this.renderCard(i))}
|
|
555
|
+
</div>
|
|
556
|
+
</div>
|
|
557
|
+
`;
|
|
558
|
+
}
|
|
559
|
+
renderCard(i) {
|
|
560
|
+
return A`
|
|
561
|
+
<aura-app
|
|
562
|
+
href=${i.url}
|
|
563
|
+
.newTab=${i.newTab ?? !0}
|
|
564
|
+
key=${i.id}
|
|
565
|
+
>
|
|
566
|
+
<aura-app-icon>
|
|
567
|
+
<img src=${i.icon} alt=${i.label}
|
|
568
|
+
@error=${() => console.error("Failed to load icon")} alt="ACT icon"/>
|
|
569
|
+
</aura-app-icon>
|
|
570
|
+
|
|
571
|
+
<aura-app-text>${i.label}</aura-app-text>
|
|
572
|
+
</aura-app>
|
|
573
|
+
`;
|
|
574
|
+
}
|
|
575
|
+
toggle() {
|
|
576
|
+
this.open = !this.open;
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
E.styles = k`
|
|
580
|
+
:host {
|
|
581
|
+
--menu-bg: #ffffff;
|
|
582
|
+
--menu-text: #000000;
|
|
583
|
+
--dot-color: #000000;
|
|
584
|
+
--hover-bg: rgba(0, 0, 0, 0.08);
|
|
585
|
+
position: fixed;
|
|
586
|
+
z-index: 1000;
|
|
587
|
+
--offset: 16px;
|
|
588
|
+
font-family: system-ui, sans-serif;
|
|
589
|
+
--box-shadow: 0 4px 8px 3px rgba(0,0,0,.15),0 1px 3px rgba(0,0,0,.3);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
:host([position="top-right"]) {
|
|
593
|
+
top: var(--offset);
|
|
594
|
+
right: var(--offset);
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
:host([position="top-left"]) {
|
|
598
|
+
top: var(--offset);
|
|
599
|
+
left: var(--offset);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
:host([position="bottom-right"]) {
|
|
603
|
+
bottom: var(--offset);
|
|
604
|
+
right: var(--offset);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
:host([position="bottom-left"]) {
|
|
608
|
+
bottom: var(--offset);
|
|
609
|
+
left: var(--offset);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
:host([position*="right"]) .panel {
|
|
613
|
+
right: 0;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
:host([position*="left"]) .panel {
|
|
617
|
+
left: 0;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
@media (prefers-color-scheme: dark) {
|
|
622
|
+
:host {
|
|
623
|
+
--menu-bg: #202124;
|
|
624
|
+
--menu-text: #ffffff;
|
|
625
|
+
--dot-color: #ffffff;
|
|
626
|
+
--hover-bg: rgba(255, 255, 255, 0.1);
|
|
627
|
+
--box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4),
|
|
628
|
+
0 6px 16px rgba(0, 0, 0, 0.6),
|
|
629
|
+
0 12px 32px rgba(0, 0, 0, 0.4);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/* Trigger nine-dot button */
|
|
634
|
+
.trigger {
|
|
635
|
+
width: 40px;
|
|
636
|
+
height: 40px;
|
|
637
|
+
border-radius: 50%;
|
|
638
|
+
display: grid;
|
|
639
|
+
place-items: center;
|
|
640
|
+
cursor: pointer;
|
|
641
|
+
transition: background 0.2s ease;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.trigger:hover {
|
|
645
|
+
background: var(--hover-bg);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
.dots {
|
|
650
|
+
display: grid;
|
|
651
|
+
grid-template-columns: repeat(3, 6px);
|
|
652
|
+
gap: 4px;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.dot {
|
|
656
|
+
width: 6px;
|
|
657
|
+
height: 6px;
|
|
658
|
+
background: var(--dot-color);
|
|
659
|
+
border-radius: 50%;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/* Panel / card container */
|
|
663
|
+
.panel {
|
|
664
|
+
position: absolute;
|
|
665
|
+
margin-top: 12px;
|
|
666
|
+
background: var(--menu-bg);
|
|
667
|
+
color: var(--menu-text);
|
|
668
|
+
border-radius: 16px;
|
|
669
|
+
padding: 16px 12px;
|
|
670
|
+
width: 340px;
|
|
671
|
+
max-height: 420px;
|
|
672
|
+
overflow-y: auto;
|
|
673
|
+
|
|
674
|
+
opacity: 0;
|
|
675
|
+
transform: translateY(-8px) scale(0.96);
|
|
676
|
+
pointer-events: none;
|
|
677
|
+
transition: opacity 160ms ease-out, transform 160ms ease-out;
|
|
678
|
+
|
|
679
|
+
box-shadow: var(--box-shadow);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.panel.open {
|
|
683
|
+
opacity: 1;
|
|
684
|
+
transform: translateY(0) scale(1);
|
|
685
|
+
pointer-events: auto;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
/* App cards grid */
|
|
689
|
+
.apps {
|
|
690
|
+
display: grid;
|
|
691
|
+
grid-template-columns: repeat(3, 96px);
|
|
692
|
+
justify-content: center;
|
|
693
|
+
gap: 12px;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
.app {
|
|
698
|
+
display: flex;
|
|
699
|
+
flex-direction: column;
|
|
700
|
+
align-items: center;
|
|
701
|
+
gap: 8px;
|
|
702
|
+
padding: 12px;
|
|
703
|
+
border-radius: 12px;
|
|
704
|
+
color: var(--menu-text);
|
|
705
|
+
text-decoration: none;
|
|
706
|
+
cursor: pointer;
|
|
707
|
+
transition: background 0.15s ease;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.app:hover {
|
|
711
|
+
background: var(--hover-bg);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.app img {
|
|
715
|
+
width: 40px;
|
|
716
|
+
height: 40px;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.label {
|
|
720
|
+
font-size: 13px;
|
|
721
|
+
text-align: center;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.panel {
|
|
725
|
+
scrollbar-width: thin;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.panel::-webkit-scrollbar {
|
|
729
|
+
width: 6px;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.panel::-webkit-scrollbar-thumb {
|
|
733
|
+
background: rgba(255, 255, 255, 0.2);
|
|
734
|
+
border-radius: 4px;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
`;
|
|
738
|
+
B([
|
|
739
|
+
M({ type: Array })
|
|
740
|
+
], E.prototype, "data", 2);
|
|
741
|
+
B([
|
|
742
|
+
M({ reflect: !0 })
|
|
743
|
+
], E.prototype, "position", 2);
|
|
744
|
+
B([
|
|
745
|
+
Bt()
|
|
746
|
+
], E.prototype, "open", 2);
|
|
747
|
+
E = B([
|
|
748
|
+
L("aura-nine-dot-menu")
|
|
749
|
+
], E);
|
|
750
|
+
var Vt = Object.defineProperty, Wt = Object.getOwnPropertyDescriptor, G = (i, t, e, s) => {
|
|
751
|
+
for (var r = s > 1 ? void 0 : s ? Wt(t, e) : t, o = i.length - 1, n; o >= 0; o--)
|
|
752
|
+
(n = i[o]) && (r = (s ? n(t, e, r) : n(r)) || r);
|
|
753
|
+
return s && r && Vt(t, e, r), r;
|
|
754
|
+
};
|
|
755
|
+
let U = class extends g {
|
|
756
|
+
constructor() {
|
|
757
|
+
super(...arguments), this.href = "", this.newTab = !0;
|
|
758
|
+
}
|
|
759
|
+
render() {
|
|
760
|
+
return A`
|
|
761
|
+
<a
|
|
762
|
+
href=${this.href}
|
|
763
|
+
target=${this.newTab ? "_blank" : "_self"}
|
|
764
|
+
rel="noopener"
|
|
765
|
+
>
|
|
766
|
+
<slot></slot>
|
|
767
|
+
</a>
|
|
768
|
+
`;
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
U.styles = k`
|
|
772
|
+
:host {
|
|
773
|
+
display: block;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
a {
|
|
777
|
+
display: flex;
|
|
778
|
+
flex-direction: column;
|
|
779
|
+
align-items: center;
|
|
780
|
+
gap: 8px;
|
|
781
|
+
padding: 12px;
|
|
782
|
+
border-radius: 12px;
|
|
783
|
+
text-decoration: none;
|
|
784
|
+
color: white;
|
|
785
|
+
cursor: pointer;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
a:hover {
|
|
789
|
+
background: rgba(255, 255, 255, 0.1);
|
|
790
|
+
}
|
|
791
|
+
`;
|
|
792
|
+
G([
|
|
793
|
+
M()
|
|
794
|
+
], U.prototype, "href", 2);
|
|
795
|
+
G([
|
|
796
|
+
M({ type: Boolean })
|
|
797
|
+
], U.prototype, "newTab", 2);
|
|
798
|
+
U = G([
|
|
799
|
+
L("aura-app")
|
|
800
|
+
], U);
|
|
801
|
+
var Zt = Object.getOwnPropertyDescriptor, Ft = (i, t, e, s) => {
|
|
802
|
+
for (var r = s > 1 ? void 0 : s ? Zt(t, e) : t, o = i.length - 1, n; o >= 0; o--)
|
|
803
|
+
(n = i[o]) && (r = n(r) || r);
|
|
804
|
+
return r;
|
|
805
|
+
};
|
|
806
|
+
let q = class extends g {
|
|
807
|
+
// <-- Close the template literal here
|
|
808
|
+
render() {
|
|
809
|
+
return A`<slot></slot>`;
|
|
810
|
+
}
|
|
811
|
+
};
|
|
812
|
+
q.styles = k`
|
|
813
|
+
:host {
|
|
814
|
+
display: inline-flex;
|
|
815
|
+
color: white;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
::slotted(img),
|
|
819
|
+
::slotted(svg) {
|
|
820
|
+
width: 40px;
|
|
821
|
+
height: 40px;
|
|
822
|
+
display: block;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
::slotted(svg) {
|
|
826
|
+
fill: currentColor;
|
|
827
|
+
}
|
|
828
|
+
`;
|
|
829
|
+
q = Ft([
|
|
830
|
+
L("aura-app-icon")
|
|
831
|
+
], q);
|
|
832
|
+
var Jt = Object.getOwnPropertyDescriptor, Kt = (i, t, e, s) => {
|
|
833
|
+
for (var r = s > 1 ? void 0 : s ? Jt(t, e) : t, o = i.length - 1, n; o >= 0; o--)
|
|
834
|
+
(n = i[o]) && (r = n(r) || r);
|
|
835
|
+
return r;
|
|
836
|
+
};
|
|
837
|
+
let V = class extends g {
|
|
838
|
+
render() {
|
|
839
|
+
return A`<slot></slot>`;
|
|
840
|
+
}
|
|
841
|
+
};
|
|
842
|
+
V.styles = k`
|
|
843
|
+
:host {
|
|
844
|
+
font-size: 13px;
|
|
845
|
+
color: #000000;
|
|
846
|
+
text-align: center;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
@media (prefers-color-scheme: dark) {
|
|
850
|
+
:host {
|
|
851
|
+
color: #ffff !important;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
`;
|
|
855
|
+
V = Kt([
|
|
856
|
+
L("aura-app-text")
|
|
857
|
+
], V);
|
|
858
|
+
const Xt = ({
|
|
859
|
+
data: i,
|
|
860
|
+
position: t = "top-right",
|
|
861
|
+
onItemClick: e
|
|
862
|
+
}) => {
|
|
863
|
+
const s = gt(null);
|
|
864
|
+
return Q(() => {
|
|
865
|
+
s.current && (s.current.data = i, s.current.position = t);
|
|
866
|
+
}, [i, t]), Q(() => {
|
|
867
|
+
const r = s.current, o = (n) => {
|
|
868
|
+
e?.(n.detail);
|
|
869
|
+
};
|
|
870
|
+
return r?.addEventListener("item-click", o), () => r?.removeEventListener("item-click", o);
|
|
871
|
+
}, [e]), $t.createElement("aura-nine-dot-menu", { ref: s });
|
|
872
|
+
};
|
|
873
|
+
export {
|
|
874
|
+
Xt as AuraNineDotMenu
|
|
875
|
+
};
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
(function(m,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],f):(m=typeof globalThis<"u"?globalThis:m||self,f(m.AuraNineDotMenu={},m.React))})(this,(function(m,f){"use strict";const R=globalThis,V=R.ShadowRoot&&(R.ShadyCSS===void 0||R.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,W=Symbol(),tt=new WeakMap;let et=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==W)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(V&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=tt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&tt.set(e,t))}return t}toString(){return this.cssText}};const gt=i=>new et(typeof i=="string"?i:i+"",void 0,W),D=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((s,r,o)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[o+1],i[0]);return new et(e,i,W)},_t=(i,t)=>{if(V)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),r=R.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,i.appendChild(s)}},st=V?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return gt(e)})(i):i;const{is:mt,defineProperty:vt,getOwnPropertyDescriptor:yt,getOwnPropertyNames:At,getOwnPropertySymbols:bt,getPrototypeOf:xt}=Object,j=globalThis,rt=j.trustedTypes,Et=rt?rt.emptyScript:"",wt=j.reactiveElementPolyfillSupport,P=(i,t)=>i,k={toAttribute(i,t){switch(t){case Boolean:i=i?Et:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},Z=(i,t)=>!mt(i,t),it={attribute:!0,type:String,converter:k,reflect:!1,useDefault:!1,hasChanged:Z};Symbol.metadata??=Symbol("metadata"),j.litPropertyMetadata??=new WeakMap;let b=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=it){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&vt(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:r,set:o}=yt(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:r,set(n){const h=r?.call(this);o?.call(this,n),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??it}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;const t=xt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){const e=this.properties,s=[...At(e),...bt(e)];for(const r of s)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const r of s)e.unshift(st(r))}else t!==void 0&&e.push(st(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return _t(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){const o=(s.converter?.toAttribute!==void 0?s.converter:k).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const o=s.getPropertyOptions(r),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:k;this._$Em=r;const h=n.fromAttribute(e,o.type);this[r]=h??this._$Ej?.get(r)??h,this._$Em=null}}requestUpdate(t,e,s,r=!1,o){if(t!==void 0){const n=this.constructor;if(r===!1&&(o=this[t]),s??=n.getPropertyOptions(t),!((s.hasChanged??Z)(o,e)||s.useDefault&&s.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:o},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,o]of s){const{wrapped:n}=o,h=this[r];n!==!0||this._$AL.has(r)||h===void 0||this.C(r,void 0,o,h)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[P("elementProperties")]=new Map,b[P("finalized")]=new Map,wt?.({ReactiveElement:b}),(j.reactiveElementVersions??=[]).push("2.1.2");const F=globalThis,ot=i=>i,z=F.trustedTypes,nt=z?z.createPolicy("lit-html",{createHTML:i=>i}):void 0,at="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,ht="?"+$,St=`<${ht}>`,v=document,C=()=>v.createComment(""),O=i=>i===null||typeof i!="object"&&typeof i!="function",J=Array.isArray,Pt=i=>J(i)||typeof i?.[Symbol.iterator]=="function",K=`[
|
|
2
|
+
\f\r]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lt=/-->/g,pt=/>/g,y=RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ct=/'/g,dt=/"/g,ut=/^(?:script|style|textarea|title)$/i,Ct=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),x=Ct(1),E=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),ft=new WeakMap,A=v.createTreeWalker(v,129);function $t(i,t){if(!J(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return nt!==void 0?nt.createHTML(t):t}const Ot=(i,t)=>{const e=i.length-1,s=[];let r,o=t===2?"<svg>":t===3?"<math>":"",n=T;for(let h=0;h<e;h++){const a=i[h];let c,d,l=-1,u=0;for(;u<a.length&&(n.lastIndex=u,d=n.exec(a),d!==null);)u=n.lastIndex,n===T?d[1]==="!--"?n=lt:d[1]!==void 0?n=pt:d[2]!==void 0?(ut.test(d[2])&&(r=RegExp("</"+d[2],"g")),n=y):d[3]!==void 0&&(n=y):n===y?d[0]===">"?(n=r??T,l=-1):d[1]===void 0?l=-2:(l=n.lastIndex-d[2].length,c=d[1],n=d[3]===void 0?y:d[3]==='"'?dt:ct):n===dt||n===ct?n=y:n===lt||n===pt?n=T:(n=y,r=void 0);const _=n===y&&i[h+1].startsWith("/>")?" ":"";o+=n===T?a+St:l>=0?(s.push(c),a.slice(0,l)+at+a.slice(l)+$+_):a+$+(l===-2?h:_)}return[$t(i,o+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class U{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let o=0,n=0;const h=t.length-1,a=this.parts,[c,d]=Ot(t,e);if(this.el=U.createElement(c,s),A.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(r=A.nextNode())!==null&&a.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(const l of r.getAttributeNames())if(l.endsWith(at)){const u=d[n++],_=r.getAttribute(l).split($),q=/([.?@])?(.*)/.exec(u);a.push({type:1,index:o,name:q[2],strings:_,ctor:q[1]==="."?Ut:q[1]==="?"?Mt:q[1]==="@"?Ht:L}),r.removeAttribute(l)}else l.startsWith($)&&(a.push({type:6,index:o}),r.removeAttribute(l));if(ut.test(r.tagName)){const l=r.textContent.split($),u=l.length-1;if(u>0){r.textContent=z?z.emptyScript:"";for(let _=0;_<u;_++)r.append(l[_],C()),A.nextNode(),a.push({type:2,index:++o});r.append(l[u],C())}}}else if(r.nodeType===8)if(r.data===ht)a.push({type:2,index:o});else{let l=-1;for(;(l=r.data.indexOf($,l+1))!==-1;)a.push({type:7,index:o}),l+=$.length-1}o++}}static createElement(t,e){const s=v.createElement("template");return s.innerHTML=t,s}}function w(i,t,e=i,s){if(t===E)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl;const o=O(t)?void 0:t._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),o===void 0?r=void 0:(r=new o(i),r._$AT(i,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=w(i,r._$AS(i,t.values),r,s)),t}class Tt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??v).importNode(e,!0);A.currentNode=r;let o=A.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let c;a.type===2?c=new M(o,o.nextSibling,this,t):a.type===1?c=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(c=new Nt(o,this,t)),this._$AV.push(c),a=s[++h]}n!==a?.index&&(o=A.nextNode(),n++)}return A.currentNode=v,r}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=w(this,t,e),O(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Pt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(v.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=U.createElement($t(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{const o=new Tt(r,this),n=o.u(this.options);o.p(e),this.T(n),this._$AH=o}}_$AC(t){let e=ft.get(t.strings);return e===void 0&&ft.set(t.strings,e=new U(t)),e}k(t){J(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,r=0;for(const o of t)r===e.length?e.push(s=new M(this.O(C()),this.O(C()),this,this.options)):s=e[r],s._$AI(o),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const s=ot(t).nextSibling;ot(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class L{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,o){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,r){const o=this.strings;let n=!1;if(o===void 0)t=w(this,t,e,0),n=!O(t)||t!==this._$AH&&t!==E,n&&(this._$AH=t);else{const h=t;let a,c;for(t=o[0],a=0;a<o.length-1;a++)c=w(this,h[s+a],e,a),c===E&&(c=this._$AH[a]),n||=!O(c)||c!==this._$AH[a],c===p?t=p:t!==p&&(t+=(c??"")+o[a+1]),this._$AH[a]=c}n&&!r&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ut extends L{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}class Mt extends L{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}}class Ht extends L{constructor(t,e,s,r,o){super(t,e,s,r,o),this.type=5}_$AI(t,e=this){if((t=w(this,t,e,0)??p)===E)return;const s=this._$AH,r=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==p&&(s===p||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Nt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){w(this,t)}}const Rt=F.litHtmlPolyfillSupport;Rt?.(U,M),(F.litHtmlVersions??=[]).push("3.3.2");const Dt=(i,t,e)=>{const s=e?.renderBefore??t;let r=s._$litPart$;if(r===void 0){const o=e?.renderBefore??null;s._$litPart$=r=new M(t.insertBefore(C(),o),o,void 0,e??{})}return r._$AI(i),r};const Y=globalThis;class g extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Dt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return E}}g._$litElement$=!0,g.finalized=!0,Y.litElementHydrateSupport?.({LitElement:g});const jt=Y.litElementPolyfillSupport;jt?.({LitElement:g}),(Y.litElementVersions??=[]).push("4.2.2");const B=i=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(i,t)}):customElements.define(i,t)};const kt={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:Z},zt=(i=kt,t,e)=>{const{kind:s,metadata:r}=e;let o=globalThis.litPropertyMetadata.get(r);if(o===void 0&&globalThis.litPropertyMetadata.set(r,o=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),o.set(e.name,i),s==="accessor"){const{name:n}=e;return{set(h){const a=t.get.call(this);t.set.call(this,h),this.requestUpdate(n,a,i,!0,h)},init(h){return h!==void 0&&this.C(n,void 0,i,h),h}}}if(s==="setter"){const{name:n}=e;return function(h){const a=this[n];t.call(this,h),this.requestUpdate(n,a,i,!0,h)}}throw Error("Unsupported decorator location: "+s)};function H(i){return(t,e)=>typeof e=="object"?zt(i,t,e):((s,r,o)=>{const n=r.hasOwnProperty(o);return r.constructor.createProperty(o,s),n?Object.getOwnPropertyDescriptor(r,o):void 0})(i,t,e)}function Lt(i){return H({...i,state:!0,attribute:!1})}var Bt=Object.defineProperty,It=Object.getOwnPropertyDescriptor,I=(i,t,e,s)=>{for(var r=s>1?void 0:s?It(t,e):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=(s?n(t,e,r):n(r))||r);return s&&r&&Bt(t,e,r),r};let S=class extends g{constructor(){super(...arguments),this.data=[],this.position="top-right",this.open=!1}render(){return x`
|
|
4
|
+
<div class="trigger" @click=${this.toggle}>
|
|
5
|
+
<div class="dots"> ${Array.from({length:9}).map(()=>x`<span class="dot"></span>`)} </div> </div>
|
|
6
|
+
|
|
7
|
+
<div class="panel ${this.open?"open":""}">
|
|
8
|
+
<div class="apps">
|
|
9
|
+
${this.data.map(i=>this.renderCard(i))}
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
`}renderCard(i){return x`
|
|
13
|
+
<aura-app
|
|
14
|
+
href=${i.url}
|
|
15
|
+
.newTab=${i.newTab??!0}
|
|
16
|
+
key=${i.id}
|
|
17
|
+
>
|
|
18
|
+
<aura-app-icon>
|
|
19
|
+
<img src=${i.icon} alt=${i.label}
|
|
20
|
+
@error=${()=>console.error("Failed to load icon")} alt="ACT icon"/>
|
|
21
|
+
</aura-app-icon>
|
|
22
|
+
|
|
23
|
+
<aura-app-text>${i.label}</aura-app-text>
|
|
24
|
+
</aura-app>
|
|
25
|
+
`}toggle(){this.open=!this.open}};S.styles=D`
|
|
26
|
+
:host {
|
|
27
|
+
--menu-bg: #ffffff;
|
|
28
|
+
--menu-text: #000000;
|
|
29
|
+
--dot-color: #000000;
|
|
30
|
+
--hover-bg: rgba(0, 0, 0, 0.08);
|
|
31
|
+
position: fixed;
|
|
32
|
+
z-index: 1000;
|
|
33
|
+
--offset: 16px;
|
|
34
|
+
font-family: system-ui, sans-serif;
|
|
35
|
+
--box-shadow: 0 4px 8px 3px rgba(0,0,0,.15),0 1px 3px rgba(0,0,0,.3);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host([position="top-right"]) {
|
|
39
|
+
top: var(--offset);
|
|
40
|
+
right: var(--offset);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host([position="top-left"]) {
|
|
44
|
+
top: var(--offset);
|
|
45
|
+
left: var(--offset);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host([position="bottom-right"]) {
|
|
49
|
+
bottom: var(--offset);
|
|
50
|
+
right: var(--offset);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:host([position="bottom-left"]) {
|
|
54
|
+
bottom: var(--offset);
|
|
55
|
+
left: var(--offset);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([position*="right"]) .panel {
|
|
59
|
+
right: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host([position*="left"]) .panel {
|
|
63
|
+
left: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
@media (prefers-color-scheme: dark) {
|
|
68
|
+
:host {
|
|
69
|
+
--menu-bg: #202124;
|
|
70
|
+
--menu-text: #ffffff;
|
|
71
|
+
--dot-color: #ffffff;
|
|
72
|
+
--hover-bg: rgba(255, 255, 255, 0.1);
|
|
73
|
+
--box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4),
|
|
74
|
+
0 6px 16px rgba(0, 0, 0, 0.6),
|
|
75
|
+
0 12px 32px rgba(0, 0, 0, 0.4);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Trigger nine-dot button */
|
|
80
|
+
.trigger {
|
|
81
|
+
width: 40px;
|
|
82
|
+
height: 40px;
|
|
83
|
+
border-radius: 50%;
|
|
84
|
+
display: grid;
|
|
85
|
+
place-items: center;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
transition: background 0.2s ease;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.trigger:hover {
|
|
91
|
+
background: var(--hover-bg);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
.dots {
|
|
96
|
+
display: grid;
|
|
97
|
+
grid-template-columns: repeat(3, 6px);
|
|
98
|
+
gap: 4px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.dot {
|
|
102
|
+
width: 6px;
|
|
103
|
+
height: 6px;
|
|
104
|
+
background: var(--dot-color);
|
|
105
|
+
border-radius: 50%;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Panel / card container */
|
|
109
|
+
.panel {
|
|
110
|
+
position: absolute;
|
|
111
|
+
margin-top: 12px;
|
|
112
|
+
background: var(--menu-bg);
|
|
113
|
+
color: var(--menu-text);
|
|
114
|
+
border-radius: 16px;
|
|
115
|
+
padding: 16px 12px;
|
|
116
|
+
width: 340px;
|
|
117
|
+
max-height: 420px;
|
|
118
|
+
overflow-y: auto;
|
|
119
|
+
|
|
120
|
+
opacity: 0;
|
|
121
|
+
transform: translateY(-8px) scale(0.96);
|
|
122
|
+
pointer-events: none;
|
|
123
|
+
transition: opacity 160ms ease-out, transform 160ms ease-out;
|
|
124
|
+
|
|
125
|
+
box-shadow: var(--box-shadow);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.panel.open {
|
|
129
|
+
opacity: 1;
|
|
130
|
+
transform: translateY(0) scale(1);
|
|
131
|
+
pointer-events: auto;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* App cards grid */
|
|
135
|
+
.apps {
|
|
136
|
+
display: grid;
|
|
137
|
+
grid-template-columns: repeat(3, 96px);
|
|
138
|
+
justify-content: center;
|
|
139
|
+
gap: 12px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
.app {
|
|
144
|
+
display: flex;
|
|
145
|
+
flex-direction: column;
|
|
146
|
+
align-items: center;
|
|
147
|
+
gap: 8px;
|
|
148
|
+
padding: 12px;
|
|
149
|
+
border-radius: 12px;
|
|
150
|
+
color: var(--menu-text);
|
|
151
|
+
text-decoration: none;
|
|
152
|
+
cursor: pointer;
|
|
153
|
+
transition: background 0.15s ease;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.app:hover {
|
|
157
|
+
background: var(--hover-bg);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.app img {
|
|
161
|
+
width: 40px;
|
|
162
|
+
height: 40px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.label {
|
|
166
|
+
font-size: 13px;
|
|
167
|
+
text-align: center;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.panel {
|
|
171
|
+
scrollbar-width: thin;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.panel::-webkit-scrollbar {
|
|
175
|
+
width: 6px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.panel::-webkit-scrollbar-thumb {
|
|
179
|
+
background: rgba(255, 255, 255, 0.2);
|
|
180
|
+
border-radius: 4px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
`,I([H({type:Array})],S.prototype,"data",2),I([H({reflect:!0})],S.prototype,"position",2),I([Lt()],S.prototype,"open",2),S=I([B("aura-nine-dot-menu")],S);var qt=Object.defineProperty,Vt=Object.getOwnPropertyDescriptor,G=(i,t,e,s)=>{for(var r=s>1?void 0:s?Vt(t,e):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=(s?n(t,e,r):n(r))||r);return s&&r&&qt(t,e,r),r};let N=class extends g{constructor(){super(...arguments),this.href="",this.newTab=!0}render(){return x`
|
|
184
|
+
<a
|
|
185
|
+
href=${this.href}
|
|
186
|
+
target=${this.newTab?"_blank":"_self"}
|
|
187
|
+
rel="noopener"
|
|
188
|
+
>
|
|
189
|
+
<slot></slot>
|
|
190
|
+
</a>
|
|
191
|
+
`}};N.styles=D`
|
|
192
|
+
:host {
|
|
193
|
+
display: block;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
a {
|
|
197
|
+
display: flex;
|
|
198
|
+
flex-direction: column;
|
|
199
|
+
align-items: center;
|
|
200
|
+
gap: 8px;
|
|
201
|
+
padding: 12px;
|
|
202
|
+
border-radius: 12px;
|
|
203
|
+
text-decoration: none;
|
|
204
|
+
color: white;
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
a:hover {
|
|
209
|
+
background: rgba(255, 255, 255, 0.1);
|
|
210
|
+
}
|
|
211
|
+
`,G([H()],N.prototype,"href",2),G([H({type:Boolean})],N.prototype,"newTab",2),N=G([B("aura-app")],N);var Wt=Object.getOwnPropertyDescriptor,Zt=(i,t,e,s)=>{for(var r=s>1?void 0:s?Wt(t,e):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=n(r)||r);return r};let Q=class extends g{render(){return x`<slot></slot>`}};Q.styles=D`
|
|
212
|
+
:host {
|
|
213
|
+
display: inline-flex;
|
|
214
|
+
color: white;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
::slotted(img),
|
|
218
|
+
::slotted(svg) {
|
|
219
|
+
width: 40px;
|
|
220
|
+
height: 40px;
|
|
221
|
+
display: block;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
::slotted(svg) {
|
|
225
|
+
fill: currentColor;
|
|
226
|
+
}
|
|
227
|
+
`,Q=Zt([B("aura-app-icon")],Q);var Ft=Object.getOwnPropertyDescriptor,Jt=(i,t,e,s)=>{for(var r=s>1?void 0:s?Ft(t,e):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=n(r)||r);return r};let X=class extends g{render(){return x`<slot></slot>`}};X.styles=D`
|
|
228
|
+
:host {
|
|
229
|
+
font-size: 13px;
|
|
230
|
+
color: #000000;
|
|
231
|
+
text-align: center;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@media (prefers-color-scheme: dark) {
|
|
235
|
+
:host {
|
|
236
|
+
color: #ffff !important;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
`,X=Jt([B("aura-app-text")],X);const Kt=({data:i,position:t="top-right",onItemClick:e})=>{const s=f.useRef(null);return f.useEffect(()=>{s.current&&(s.current.data=i,s.current.position=t)},[i,t]),f.useEffect(()=>{const r=s.current,o=n=>{e?.(n.detail)};return r?.addEventListener("item-click",o),()=>r?.removeEventListener("item-click",o)},[e]),f.createElement("aura-nine-dot-menu",{ref:s})};m.AuraNineDotMenu=Kt,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface MenuItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
url: string;
|
|
7
|
+
newTab?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface Props {
|
|
10
|
+
data: MenuItem[];
|
|
11
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
12
|
+
onItemClick?: (item: MenuItem) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const AuraNineDotMenu: React.FC<Props>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
interface AuraAppCard {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
url: string;
|
|
7
|
+
newTab?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class AuraAuthenticAppMenu extends LitElement {
|
|
10
|
+
data: AuraAppCard[];
|
|
11
|
+
position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
12
|
+
private open;
|
|
13
|
+
static styles: import('lit').CSSResult;
|
|
14
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
15
|
+
private renderCard;
|
|
16
|
+
private toggle;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aura360/aura-nine-dot-menu",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Aura Nine Dot Menu (Lit Web Component + React Wrapper)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/types/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"require": "./dist/index.cjs",
|
|
16
|
+
"types": "./dist/types/index.d.ts"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"react": ">=17",
|
|
21
|
+
"react-dom": ">=17"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"lit": "^3.0.0"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "vite build"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
31
|
+
"vite": "^7.3.1",
|
|
32
|
+
"vite-plugin-dts": "^4.5.4"
|
|
33
|
+
}
|
|
34
|
+
}
|