@ferris-wheel/plugin 1.2.0 → 1.4.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.
@@ -0,0 +1,86 @@
1
+ import { Fragment as e, computed as t, createBlock as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, onMounted as s, openBlock as c, ref as l, renderList as u, shallowRef as d, toDisplayString as f, unref as p, useModel as m, withCtx as h, withKeys as g } from "vue";
2
+ import { LButton as _, LFloating as v, LInput as y } from "@luna-park/design";
3
+ //#region src/inputs/IconMaterial.vue?vue&type=script&setup=true&lang.ts
4
+ var b = { class: "icon" }, x = /* @__PURE__ */ o({
5
+ __name: "IconMaterial",
6
+ props: { icon: {} },
7
+ setup(e) {
8
+ return (t, n) => (c(), r("span", b, f(e.icon), 1));
9
+ }
10
+ }), S = (e, t) => {
11
+ let n = e.__vccOpts || e;
12
+ for (let [e, r] of t) n[e] = r;
13
+ return n;
14
+ }, C = /* @__PURE__ */ S(x, [["__scopeId", "data-v-0a4349de"]]), w = { class: "icon-list" }, T = [
15
+ "title",
16
+ "onClick",
17
+ "onKeydown"
18
+ ], E = /* @__PURE__ */ S(/* @__PURE__ */ o({
19
+ __name: "IconList",
20
+ props: { filter: {} },
21
+ emits: ["select"],
22
+ setup(n) {
23
+ let i = n, o = d([]);
24
+ s(async () => {
25
+ let { icons: e } = await import("./material-DOGqlt_g.js");
26
+ o.value = e;
27
+ });
28
+ let l = t(() => {
29
+ let e = i.filter.split(" ");
30
+ return o.value.filter((t) => e.every((e) => t.search.includes(e))).slice(0, 128);
31
+ });
32
+ return (t, n) => (c(), r("div", w, [(c(!0), r(e, null, u(l.value, (e) => (c(), r("div", {
33
+ key: e.name,
34
+ class: "icon-wrapper",
35
+ tabindex: "0",
36
+ title: e.name,
37
+ onClick: (n) => t.$emit("select", e.name),
38
+ onKeydown: g((n) => t.$emit("select", e.name), ["enter"])
39
+ }, [a(C, {
40
+ class: "icon",
41
+ icon: e.name
42
+ }, null, 8, ["icon"])], 40, T))), 128))]));
43
+ }
44
+ }), [["__scopeId", "data-v-86efd1d5"]]), D = { class: "popper" }, O = /* @__PURE__ */ S(/* @__PURE__ */ o({
45
+ __name: "IconInput",
46
+ props: {
47
+ modelValue: { default: "" },
48
+ modelModifiers: {}
49
+ },
50
+ emits: ["update:modelValue"],
51
+ setup(e) {
52
+ let t = m(e, "modelValue"), r = l("");
53
+ function o(e, n) {
54
+ t.value = e, n();
55
+ }
56
+ return (e, s) => (c(), n(p(v), { border: "" }, {
57
+ popper: h(({ hide: e }) => [i("div", D, [a(p(y), {
58
+ modelValue: r.value,
59
+ "onUpdate:modelValue": s[0] ||= (e) => r.value = e,
60
+ border: "",
61
+ focus: "",
62
+ placeholder: "Search icon..."
63
+ }, null, 8, ["modelValue"]), a(E, {
64
+ class: "list",
65
+ filter: r.value,
66
+ onSelect: (t) => o(t, e)
67
+ }, null, 8, ["filter", "onSelect"])])]),
68
+ default: h(() => [a(p(_), {
69
+ border: "",
70
+ class: "button",
71
+ small: "",
72
+ square: "",
73
+ title: t.value
74
+ }, {
75
+ default: h(() => [a(C, {
76
+ class: "preview",
77
+ icon: t.value
78
+ }, null, 8, ["icon"])]),
79
+ _: 1
80
+ }, 8, ["title"])]),
81
+ _: 1
82
+ }));
83
+ }
84
+ }), [["__scopeId", "data-v-da550f43"]]);
85
+ //#endregion
86
+ export { O as default };
package/dist/index.css ADDED
@@ -0,0 +1,2 @@
1
+ @import "https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20,400,1,-25";.icon[data-v-0a4349de]{text-rendering:optimizelegibility;font-feature-settings:"liga";-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;font-family:Material Symbols Rounded,sans-serif;display:flex}.icon-list[data-v-86efd1d5]{grid-gap:var(--length-xxxs);grid-template-columns:repeat(auto-fill,minmax(24px,1fr));display:grid}.icon-list .icon-wrapper[data-v-86efd1d5]{padding:var(--length-xxxs);border-radius:var(--length-radius-m);cursor:pointer;border:2px solid #0000;justify-content:center;align-items:center;width:24px;height:24px;display:flex;overflow:hidden}.icon-list .icon-wrapper .icon[data-v-86efd1d5]{font-size:var(--font-icon-s);width:16px;height:16px}.icon-list .icon-wrapper[data-v-86efd1d5]:focus{border:2px dashed var(--color-primary)}.icon-list .icon-wrapper[data-v-86efd1d5]:hover{background-color:var(--color-primary-dark)}.button .preview[data-v-da550f43]{font-size:var(--font-size-s);width:.8rem;height:.8rem}.popper[data-v-da550f43]{gap:var(--length-xs);padding:var(--length-s);color:var(--color-content);flex-direction:column;display:flex}.popper .list[data-v-da550f43]{max-height:200px;overflow:auto}
2
+ /*$vite$:1*/