@stonecrop/beam 0.2.17 → 0.2.20
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/beam.js +260 -0
- package/dist/beam.js.map +1 -0
- package/dist/beam.umd.cjs +2 -0
- package/dist/beam.umd.cjs.map +1 -0
- package/dist/style.css +1 -0
- package/package.json +2 -1
package/dist/beam.js
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { defineComponent as u, openBlock as l, createElementBlock as i, createElementVNode as c, renderSlot as d, resolveComponent as b, createBlock as _, withCtx as $, withDirectives as L, vShow as g, ref as v, pushScopeId as V, popScopeId as B, computed as M, normalizeClass as N, toDisplayString as p, createCommentVNode as h, onMounted as k, onUnmounted as C, Fragment as S, renderList as E, resolveDynamicComponent as A, createVNode as T, createTextVNode as D } from "vue";
|
|
2
|
+
const F = { class: "beam__actionfooter" }, O = { class: "footer-action-wrapper" }, H = /* @__PURE__ */ u({
|
|
3
|
+
__name: "ActionFooter",
|
|
4
|
+
emits: ["click"],
|
|
5
|
+
setup(t, { emit: e }) {
|
|
6
|
+
const o = e, s = () => {
|
|
7
|
+
o("click");
|
|
8
|
+
};
|
|
9
|
+
return (n, a) => (l(), i("footer", F, [
|
|
10
|
+
c("span", O, [
|
|
11
|
+
c("button", {
|
|
12
|
+
class: "footer-action btn",
|
|
13
|
+
onClick: s
|
|
14
|
+
}, [
|
|
15
|
+
d(n.$slots, "default")
|
|
16
|
+
])
|
|
17
|
+
])
|
|
18
|
+
]));
|
|
19
|
+
}
|
|
20
|
+
}), P = { class: "beam__modal" }, U = /* @__PURE__ */ u({
|
|
21
|
+
__name: "BeamModal",
|
|
22
|
+
props: {
|
|
23
|
+
showModal: { type: Boolean }
|
|
24
|
+
},
|
|
25
|
+
setup(t) {
|
|
26
|
+
return (e, o) => {
|
|
27
|
+
const s = b("portal");
|
|
28
|
+
return l(), _(s, { to: "beam__modal_outlet" }, {
|
|
29
|
+
default: $(() => [
|
|
30
|
+
L(c("div", P, [
|
|
31
|
+
c("button", {
|
|
32
|
+
class: "btn",
|
|
33
|
+
onClick: o[0] || (o[0] = (n) => e.$emit("closemodal"))
|
|
34
|
+
}, "Close Modal"),
|
|
35
|
+
d(e.$slots, "default", {
|
|
36
|
+
onClosemodal: o[1] || (o[1] = (n) => e.$emit("closemodal")),
|
|
37
|
+
onConfirmmodal: o[2] || (o[2] = (n) => e.$emit("confirmmodal"))
|
|
38
|
+
})
|
|
39
|
+
], 512), [
|
|
40
|
+
[g, e.showModal]
|
|
41
|
+
])
|
|
42
|
+
]),
|
|
43
|
+
_: 3
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}), z = /* @__PURE__ */ u({
|
|
48
|
+
__name: "BeamModalOutlet",
|
|
49
|
+
emits: ["confirmmodal", "closemodal"],
|
|
50
|
+
setup(t, { emit: e }) {
|
|
51
|
+
return (o, s) => {
|
|
52
|
+
const n = b("portal-target");
|
|
53
|
+
return l(), _(n, { name: "beam__modal_outlet" });
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}), I = (t, e) => {
|
|
57
|
+
const o = t.__vccOpts || t;
|
|
58
|
+
for (const [s, n] of e)
|
|
59
|
+
o[s] = n;
|
|
60
|
+
return o;
|
|
61
|
+
}, W = {}, Y = { class: "beam__modal-confirm" }, j = /* @__PURE__ */ c("h2", null, "Would you like to continue?", -1);
|
|
62
|
+
function q(t, e) {
|
|
63
|
+
return l(), i("div", Y, [
|
|
64
|
+
j,
|
|
65
|
+
c("button", {
|
|
66
|
+
class: "btn",
|
|
67
|
+
onClick: e[0] || (e[0] = (o) => t.$emit("confirmmodal"))
|
|
68
|
+
}, "Yes"),
|
|
69
|
+
c("button", {
|
|
70
|
+
class: "btn",
|
|
71
|
+
onClick: e[1] || (e[1] = (o) => t.$emit("closemodal"))
|
|
72
|
+
}, "No")
|
|
73
|
+
]);
|
|
74
|
+
}
|
|
75
|
+
const G = /* @__PURE__ */ I(W, [["render", q]]), J = (t) => (V("data-v-4d5731cd"), t = t(), B(), t), K = { class: "container" }, Q = ["checked"], R = /* @__PURE__ */ J(() => /* @__PURE__ */ c("div", {
|
|
76
|
+
class: "checkmark",
|
|
77
|
+
tabindex: "0"
|
|
78
|
+
}, null, -1)), X = /* @__PURE__ */ u({
|
|
79
|
+
__name: "ItemCheck",
|
|
80
|
+
props: {
|
|
81
|
+
value: { type: Boolean }
|
|
82
|
+
},
|
|
83
|
+
emits: ["input"],
|
|
84
|
+
setup(t, { emit: e }) {
|
|
85
|
+
const o = t, s = e, n = v(o.value), a = (r) => {
|
|
86
|
+
s("input", n.value);
|
|
87
|
+
};
|
|
88
|
+
return (r, m) => (l(), i("label", K, [
|
|
89
|
+
c("input", {
|
|
90
|
+
type: "checkbox",
|
|
91
|
+
checked: r.value,
|
|
92
|
+
onInput: a,
|
|
93
|
+
tabindex: "-1"
|
|
94
|
+
}, null, 40, Q),
|
|
95
|
+
R
|
|
96
|
+
]));
|
|
97
|
+
}
|
|
98
|
+
}), w = /* @__PURE__ */ I(X, [["__scopeId", "data-v-4d5731cd"]]), Z = { class: "beam__itemcount" }, x = ["contenteditable"], ee = { key: 0 }, y = /* @__PURE__ */ u({
|
|
99
|
+
__name: "ItemCount",
|
|
100
|
+
props: {
|
|
101
|
+
value: { default: 0 },
|
|
102
|
+
denominator: {},
|
|
103
|
+
uom: { default: "" },
|
|
104
|
+
editable: { type: Boolean, default: !0 }
|
|
105
|
+
},
|
|
106
|
+
emits: ["input"],
|
|
107
|
+
setup(t, { emit: e }) {
|
|
108
|
+
const o = e, s = t, n = v(s.value), a = (m) => {
|
|
109
|
+
m.preventDefault(), m.stopPropagation(), n.value = Number(m.target.innerHTML.replace(/[^0-9]/g, "")), o("input", n.value);
|
|
110
|
+
}, r = M(() => n.value === s.denominator);
|
|
111
|
+
return (m, pe) => (l(), i("div", Z, [
|
|
112
|
+
c("span", {
|
|
113
|
+
contenteditable: m.editable,
|
|
114
|
+
class: N({ alert: r.value === !1 }),
|
|
115
|
+
onInput: a,
|
|
116
|
+
onClick: a
|
|
117
|
+
}, p(n.value), 43, x),
|
|
118
|
+
c("span", null, "/" + p(m.denominator), 1),
|
|
119
|
+
m.uom ? (l(), i("span", ee, " " + p(m.uom), 1)) : h("", !0)
|
|
120
|
+
]));
|
|
121
|
+
}
|
|
122
|
+
}), te = ["href"], oe = /* @__PURE__ */ u({
|
|
123
|
+
__name: "ListAnchor",
|
|
124
|
+
props: {
|
|
125
|
+
to: { default: "" }
|
|
126
|
+
},
|
|
127
|
+
setup(t) {
|
|
128
|
+
return (e, o) => (l(), i("a", {
|
|
129
|
+
href: e.to,
|
|
130
|
+
class: "beam__listanchor"
|
|
131
|
+
}, [
|
|
132
|
+
d(e.$slots, "default")
|
|
133
|
+
], 8, te));
|
|
134
|
+
}
|
|
135
|
+
}), ne = {
|
|
136
|
+
tabindex: "0",
|
|
137
|
+
class: "beam__listitem"
|
|
138
|
+
}, se = { class: "beam__listtext" }, f = /* @__PURE__ */ u({
|
|
139
|
+
__name: "ListItem",
|
|
140
|
+
props: {
|
|
141
|
+
item: {}
|
|
142
|
+
},
|
|
143
|
+
setup(t) {
|
|
144
|
+
return (e, o) => (l(), i("li", ne, [
|
|
145
|
+
c("div", se, [
|
|
146
|
+
c("label", null, p(e.item.label), 1),
|
|
147
|
+
c("p", null, p(e.item.description), 1)
|
|
148
|
+
]),
|
|
149
|
+
e.item.count ? (l(), _(y, {
|
|
150
|
+
key: 0,
|
|
151
|
+
modelValue: e.item.count.count,
|
|
152
|
+
"onUpdate:modelValue": o[0] || (o[0] = (s) => e.item.count.count = s),
|
|
153
|
+
denominator: e.item.count.of,
|
|
154
|
+
uom: e.item.count.uom,
|
|
155
|
+
editable: !0
|
|
156
|
+
}, null, 8, ["modelValue", "denominator", "uom"])) : h("", !0),
|
|
157
|
+
e.item.hasOwnProperty("checked") ? (l(), _(w, {
|
|
158
|
+
key: 1,
|
|
159
|
+
modelValue: e.item.checked,
|
|
160
|
+
"onUpdate:modelValue": o[1] || (o[1] = (s) => e.item.checked = s)
|
|
161
|
+
}, null, 8, ["modelValue"])) : h("", !0)
|
|
162
|
+
]));
|
|
163
|
+
}
|
|
164
|
+
}), ae = { class: "beam__listview" }, le = /* @__PURE__ */ u({
|
|
165
|
+
__name: "ListView",
|
|
166
|
+
props: {
|
|
167
|
+
items: {}
|
|
168
|
+
},
|
|
169
|
+
emits: ["scrollbottom"],
|
|
170
|
+
setup(t, { emit: e }) {
|
|
171
|
+
const o = e;
|
|
172
|
+
k(() => {
|
|
173
|
+
window.addEventListener("scroll", s);
|
|
174
|
+
}), C(() => {
|
|
175
|
+
window.removeEventListener("scroll", s);
|
|
176
|
+
});
|
|
177
|
+
const s = () => {
|
|
178
|
+
const n = document.documentElement.scrollHeight - window.innerHeight, a = document.documentElement.scrollTop;
|
|
179
|
+
n - a <= 2 && o("scrollbottom");
|
|
180
|
+
};
|
|
181
|
+
return (n, a) => (l(), i("ul", ae, [
|
|
182
|
+
(l(!0), i(S, null, E(n.items, (r, m) => (l(), i("li", { key: m }, [
|
|
183
|
+
r.linkComponent ? (l(), _(A(r.linkComponent), {
|
|
184
|
+
key: 0,
|
|
185
|
+
to: r.route,
|
|
186
|
+
tabindex: "-1"
|
|
187
|
+
}, {
|
|
188
|
+
default: $(() => [
|
|
189
|
+
T(f, { item: r }, null, 8, ["item"])
|
|
190
|
+
]),
|
|
191
|
+
_: 2
|
|
192
|
+
}, 1032, ["to"])) : (l(), _(f, {
|
|
193
|
+
key: 1,
|
|
194
|
+
item: r
|
|
195
|
+
}, null, 8, ["item"]))
|
|
196
|
+
]))), 128))
|
|
197
|
+
]));
|
|
198
|
+
}
|
|
199
|
+
}), ce = { class: "beam__navbar" }, ie = /* @__PURE__ */ c("span", { class: "home-icon" }, "⬣", -1), re = /* @__PURE__ */ c("h1", { class: "nav-title" }, "TITLE", -1), me = { class: "navbar-action-wrapper" }, ue = /* @__PURE__ */ u({
|
|
200
|
+
__name: "Navbar",
|
|
201
|
+
emits: ["click"],
|
|
202
|
+
setup(t, { emit: e }) {
|
|
203
|
+
const o = e, s = () => {
|
|
204
|
+
o("click");
|
|
205
|
+
};
|
|
206
|
+
return (n, a) => (l(), i("nav", ce, [
|
|
207
|
+
d(n.$slots, "icon", {}, () => [
|
|
208
|
+
ie
|
|
209
|
+
]),
|
|
210
|
+
d(n.$slots, "title", {}, () => [
|
|
211
|
+
re
|
|
212
|
+
]),
|
|
213
|
+
c("div", me, [
|
|
214
|
+
c("button", {
|
|
215
|
+
class: "navbar-action btn",
|
|
216
|
+
onClick: s
|
|
217
|
+
}, [
|
|
218
|
+
d(n.$slots, "navbaraction", {}, () => [
|
|
219
|
+
D("Action")
|
|
220
|
+
])
|
|
221
|
+
])
|
|
222
|
+
])
|
|
223
|
+
]));
|
|
224
|
+
}
|
|
225
|
+
}), de = { id: "scan_input" }, _e = /* @__PURE__ */ u({
|
|
226
|
+
__name: "ScanInput",
|
|
227
|
+
emits: ["scaninput"],
|
|
228
|
+
setup(t, { emit: e }) {
|
|
229
|
+
const o = e, s = v(""), n = (a) => {
|
|
230
|
+
a.target.tagName !== "INPUT" && (a.key !== "Enter" ? s.value += `${a.key}` : (o("scaninput", s.value), s.value = ""));
|
|
231
|
+
};
|
|
232
|
+
return k(() => {
|
|
233
|
+
document.addEventListener("keypress", (a) => {
|
|
234
|
+
n(a);
|
|
235
|
+
});
|
|
236
|
+
}), C(() => {
|
|
237
|
+
window.removeEventListener("keypress", (a) => {
|
|
238
|
+
n(a);
|
|
239
|
+
});
|
|
240
|
+
}), (a, r) => (l(), i("div", de));
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
function fe(t) {
|
|
244
|
+
t.component("ActionFooter", H), t.component("BeamModal", U), t.component("BeamModalOutlet", z), t.component("Confirm", G), t.component("ItemCheck", w), t.component("ItemCount", y), t.component("ListAnchor", oe), t.component("ListItem", f), t.component("ListView", le), t.component("Navbar", ue), t.component("ScanInput", _e);
|
|
245
|
+
}
|
|
246
|
+
export {
|
|
247
|
+
H as ActionFooter,
|
|
248
|
+
U as BeamModal,
|
|
249
|
+
z as BeamModalOutlet,
|
|
250
|
+
G as Confirm,
|
|
251
|
+
w as ItemCheck,
|
|
252
|
+
y as ItemCount,
|
|
253
|
+
oe as ListAnchor,
|
|
254
|
+
f as ListItem,
|
|
255
|
+
le as ListView,
|
|
256
|
+
ue as Navbar,
|
|
257
|
+
_e as ScanInput,
|
|
258
|
+
fe as install
|
|
259
|
+
};
|
|
260
|
+
//# sourceMappingURL=beam.js.map
|
package/dist/beam.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"beam.js","sources":["../src/components/ActionFooter.vue","../src/components/Confirm.vue","../src/components/ItemCheck.vue","../src/components/ItemCount.vue","../src/components/ListView.vue","../src/components/Navbar.vue","../src/components/ScanInput.vue","../src/index.ts"],"sourcesContent":["<template>\n\t<footer class=\"beam__actionfooter\">\n\t\t<span class=\"footer-action-wrapper\">\n\t\t\t<button class=\"footer-action btn\" @click=\"handleFooterAction\">\n\t\t\t\t<slot />\n\t\t\t</button>\n\t\t</span>\n\t</footer>\n</template>\n\n<script setup lang=\"ts\">\nconst emit = defineEmits(['click'])\n\nconst handleFooterAction = () => {\n\temit('click')\n}\n</script>\n","<template>\n\t<div class=\"beam__modal-confirm\">\n\t\t<h2>Would you like to continue?</h2>\n\t\t<button class=\"btn\" @click=\"$emit('confirmmodal')\">Yes</button>\n\t\t<button class=\"btn\" @click=\"$emit('closemodal')\">No</button>\n\t</div>\n</template>\n","<template>\n\t<label class=\"container\">\n\t\t<input type=\"checkbox\" :checked=\"value\" @input=\"handleInput\" tabindex=\"-1\" />\n\t\t<div class=\"checkmark\" tabindex=\"0\"></div>\n\t</label>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\n// make this v-model sensitive from parent\nconst props = defineProps<{\n\tvalue?: boolean\n}>()\n\nconst emit = defineEmits(['input'])\n\nconst checked = ref(props.value)\n\nconst handleInput = (e: InputEvent) => {\n\temit('input', checked.value)\n}\n</script>\n\n<style scoped>\n.container {\n\tdisplay: block;\n\tposition: relative;\n\tpadding-left: 2.5ch;\n\tmargin: 0;\n\tmargin-top: 0.5rem;\n\tcursor: pointer;\n\tfont-size: 2rem;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n}\n\n/* hide default checkbox */\n.container input {\n\tposition: absolute;\n\topacity: 0;\n\tcursor: pointer;\n\theight: 0;\n\twidth: 0;\n}\n\n.checkmark {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\theight: 2rem;\n\twidth: 2rem;\n\tbackground-color: #eee;\n\toutline: 2px solid transparent;\n\tborder: 1px solid var(--highlight);\n}\n\n.container:hover input ~ .checkmark {\n\tbackground-color: white;\n}\n\n.container input:checked ~ .checkmark {\n\tbackground-color: var(--brand-secondary);\n}\n\n.checkmark:after {\n\tcontent: '';\n\tposition: absolute;\n\tdisplay: none;\n}\n\n.container input:checked ~ .checkmark:after {\n\tdisplay: block;\n}\n\n.container .checkmark:after {\n\tleft: 25%;\n\ttop: 50%;\n\twidth: 0.5rem;\n\theight: 1rem;\n\tborder: solid var(--text-color);\n\tborder-width: 0 3px 3px 0;\n\t-webkit-transform: rotate(45deg);\n\t-ms-transform: rotate(45deg);\n\ttransform: rotate(45deg) translate(-50%, -50%);\n}\n</style>\n","<template>\n\t<div class=\"beam__itemcount\">\n\t\t<span\n\t\t\t:contenteditable=\"editable\"\n\t\t\t:class=\"{ alert: countColor === false }\"\n\t\t\t@input=\"handleInput\"\n\t\t\t@click=\"handleInput\">\n\t\t\t{{ count }}\n\t\t</span>\n\t\t<span>/{{ denominator }}</span>\n\t\t<span v-if=\"uom\"> {{ uom }}</span>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed } from 'vue'\n\nconst emit = defineEmits(['input'])\nconst props = withDefaults(\n\tdefineProps<{\n\t\tvalue?: number\n\t\tdenominator: number\n\t\tuom?: string\n\t\teditable?: boolean\n\t}>(),\n\t{ value: 0, editable: true, uom: '' }\n)\n\nconst count = ref(props.value)\n\nconst handleInput = (event: InputEvent | MouseEvent) => {\n\tevent.preventDefault()\n\tevent.stopPropagation()\n\tcount.value = Number(event.target.innerHTML.replace(/[^0-9]/g, ''))\n\temit('input', count.value)\n}\n\nconst countColor = computed(() => {\n\treturn count.value === props.denominator\n})\n</script>\n","<template>\n\t<ul class=\"beam__listview\">\n\t\t<li v-for=\"(item, index) in items\" :key=\"index\">\n\t\t\t<template v-if=\"item.linkComponent\">\n\t\t\t\t<component :is=\"item.linkComponent\" :to=\"item.route\" tabindex=\"-1\">\n\t\t\t\t\t<ListItem :item=\"item\"></ListItem>\n\t\t\t\t</component>\n\t\t\t</template>\n\t\t\t<template v-else>\n\t\t\t\t<ListItem :item=\"item\"></ListItem>\n\t\t\t</template>\n\t\t</li>\n\t</ul>\n</template>\n\n<script setup lang=\"ts\">\nimport { onMounted, onUnmounted } from 'vue'\n\nimport ListItem from './ListItem.vue'\n\ndefineProps<{\n\titems: {\n\t\tlabel: string\n\t\tdescription: string\n\t\tcount?: {\n\t\t\tcount: number\n\t\t\tof: number\n\t\t\tuom: string\n\t\t}\n\t\tchecked?: boolean\n\t\tlinkComponent?: string\n\t\troute?: string\n\t}[]\n}>()\n\nconst emit = defineEmits(['scrollbottom'])\n\nonMounted(() => {\n\twindow.addEventListener('scroll', handleScroll)\n})\n\nonUnmounted(() => {\n\twindow.removeEventListener('scroll', handleScroll)\n})\n\nconst handleScroll = () => {\n\tconst scrollHeightDifference = document.documentElement.scrollHeight - window.innerHeight\n\tconst scrollposition = document.documentElement.scrollTop\n\tif (scrollHeightDifference - scrollposition <= 2) {\n\t\temit('scrollbottom')\n\t}\n}\n</script>\n","<template>\n\t<nav class=\"beam__navbar\">\n\t\t<slot name=\"icon\">\n\t\t\t<span class=\"home-icon\">⬣</span>\n\t\t</slot>\n\t\t<slot name=\"title\">\n\t\t\t<h1 class=\"nav-title\">TITLE</h1>\n\t\t</slot>\n\t\t<div class=\"navbar-action-wrapper\">\n\t\t\t<button class=\"navbar-action btn\" @click=\"handlePrimaryAction\">\n\t\t\t\t<slot name=\"navbaraction\">Action</slot>\n\t\t\t</button>\n\t\t</div>\n\t</nav>\n</template>\n\n<script setup lang=\"ts\">\nconst emit = defineEmits(['click'])\n\nconst handlePrimaryAction = () => {\n\temit('click')\n}\n</script>\n","<template>\n\t<div id=\"scan_input\"></div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, onMounted, onUnmounted } from 'vue'\n\nconst emit = defineEmits(['scaninput'])\nconst barcode = ref('')\n\nconst handleScanInput = (event: InputEvent | KeyboardEvent) => {\n\tif (event.target.tagName !== 'INPUT') {\n\t\tif (event.key !== 'Enter') {\n\t\t\tbarcode.value += `${event.key}`\n\t\t} else {\n\t\t\temit('scaninput', barcode.value)\n\t\t\tbarcode.value = ''\n\t\t}\n\t}\n}\n\nonMounted(() => {\n\tdocument.addEventListener('keypress', event => {\n\t\thandleScanInput(event)\n\t})\n})\n\nonUnmounted(() => {\n\twindow.removeEventListener('keypress', event => {\n\t\thandleScanInput(event)\n\t})\n})\n</script>\n","import { App } from 'vue'\n\nimport ActionFooter from '@/components/ActionFooter.vue'\nimport BeamModal from '@/components/BeamModal.vue'\nimport BeamModalOutlet from '@/components/BeamModalOutlet.vue'\nimport Confirm from '@/components/Confirm.vue'\nimport ItemCheck from '@/components/ItemCheck.vue'\nimport ItemCount from '@/components/ItemCount.vue'\nimport ListAnchor from '@/components/ListAnchor.vue'\nimport ListItem from '@/components/ListItem.vue'\nimport ListView from '@/components/ListView.vue'\nimport Navbar from '@/components/Navbar.vue'\nimport ScanInput from '@/components/ScanInput.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ActionFooter', ActionFooter)\n\tapp.component('BeamModal', BeamModal)\n\tapp.component('BeamModalOutlet', BeamModalOutlet)\n\tapp.component('Confirm', Confirm)\n\tapp.component('ItemCheck', ItemCheck)\n\tapp.component('ItemCount', ItemCount)\n\tapp.component('ListAnchor', ListAnchor)\n\tapp.component('ListItem', ListItem)\n\tapp.component('ListView', ListView)\n\tapp.component('Navbar', Navbar)\n\tapp.component('ScanInput', ScanInput)\n}\n\nexport {\n\tActionFooter,\n\tBeamModal,\n\tBeamModalOutlet,\n\tConfirm,\n\tItemCheck,\n\tItemCount,\n\tListAnchor,\n\tListItem,\n\tListView,\n\tNavbar,\n\tScanInput,\n\tinstall,\n}\n"],"names":["emit","__emit","handleFooterAction","_hoisted_1","_sfc_render","_ctx","_cache","_openBlock","_createElementBlock","_hoisted_2","_createElementVNode","$event","props","__props","checked","ref","handleInput","e","count","event","countColor","computed","onMounted","handleScroll","onUnmounted","scrollHeightDifference","scrollposition","handlePrimaryAction","barcode","handleScanInput","install","app","ActionFooter","BeamModal","BeamModalOutlet","Confirm","ItemCheck","ItemCount","ListAnchor","ListItem","ListView","Navbar","ScanInput"],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(a,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(a=typeof globalThis<"u"?globalThis:a||self,e(a["@stonecrop/beam"]={},a.Vue))})(this,function(a,e){"use strict";const E={class:"beam__actionfooter"},V={class:"footer-action-wrapper"},_=e.defineComponent({__name:"ActionFooter",emits:["click"],setup(o,{emit:t}){const n=t,c=()=>{n("click")};return(l,s)=>(e.openBlock(),e.createElementBlock("footer",E,[e.createElementVNode("span",V,[e.createElementVNode("button",{class:"footer-action btn",onClick:c},[e.renderSlot(l.$slots,"default")])])]))}}),N={class:"beam__modal"},f=e.defineComponent({__name:"BeamModal",props:{showModal:{type:Boolean}},setup(o){return(t,n)=>{const c=e.resolveComponent("portal");return e.openBlock(),e.createBlock(c,{to:"beam__modal_outlet"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",N,[e.createElementVNode("button",{class:"btn",onClick:n[0]||(n[0]=l=>t.$emit("closemodal"))},"Close Modal"),e.renderSlot(t.$slots,"default",{onClosemodal:n[1]||(n[1]=l=>t.$emit("closemodal")),onConfirmmodal:n[2]||(n[2]=l=>t.$emit("confirmmodal"))})],512),[[e.vShow,t.showModal]])]),_:3})}}}),k=e.defineComponent({__name:"BeamModalOutlet",emits:["confirmmodal","closemodal"],setup(o,{emit:t}){return(n,c)=>{const l=e.resolveComponent("portal-target");return e.openBlock(),e.createBlock(l,{name:"beam__modal_outlet"})}}}),h=(o,t)=>{const n=o.__vccOpts||o;for(const[c,l]of t)n[c]=l;return n},y={},I={class:"beam__modal-confirm"},w=e.createElementVNode("h2",null,"Would you like to continue?",-1);function S(o,t){return e.openBlock(),e.createElementBlock("div",I,[w,e.createElementVNode("button",{class:"btn",onClick:t[0]||(t[0]=n=>o.$emit("confirmmodal"))},"Yes"),e.createElementVNode("button",{class:"btn",onClick:t[1]||(t[1]=n=>o.$emit("closemodal"))},"No")])}const u=h(y,[["render",S]]),g=o=>(e.pushScopeId("data-v-4d5731cd"),o=o(),e.popScopeId(),o),L={class:"container"},M=["checked"],A=g(()=>e.createElementVNode("div",{class:"checkmark",tabindex:"0"},null,-1)),d=h(e.defineComponent({__name:"ItemCheck",props:{value:{type:Boolean}},emits:["input"],setup(o,{emit:t}){const n=o,c=t,l=e.ref(n.value),s=i=>{c("input",l.value)};return(i,r)=>(e.openBlock(),e.createElementBlock("label",L,[e.createElementVNode("input",{type:"checkbox",checked:i.value,onInput:s,tabindex:"-1"},null,40,M),A]))}}),[["__scopeId","data-v-4d5731cd"]]),D={class:"beam__itemcount"},T=["contenteditable"],O={key:0},p=e.defineComponent({__name:"ItemCount",props:{value:{default:0},denominator:{},uom:{default:""},editable:{type:Boolean,default:!0}},emits:["input"],setup(o,{emit:t}){const n=t,c=o,l=e.ref(c.value),s=r=>{r.preventDefault(),r.stopPropagation(),l.value=Number(r.target.innerHTML.replace(/[^0-9]/g,"")),n("input",l.value)},i=e.computed(()=>l.value===c.denominator);return(r,K)=>(e.openBlock(),e.createElementBlock("div",D,[e.createElementVNode("span",{contenteditable:r.editable,class:e.normalizeClass({alert:i.value===!1}),onInput:s,onClick:s},e.toDisplayString(l.value),43,T),e.createElementVNode("span",null,"/"+e.toDisplayString(r.denominator),1),r.uom?(e.openBlock(),e.createElementBlock("span",O," "+e.toDisplayString(r.uom),1)):e.createCommentVNode("",!0)]))}}),F=["href"],b=e.defineComponent({__name:"ListAnchor",props:{to:{default:""}},setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("a",{href:t.to,class:"beam__listanchor"},[e.renderSlot(t.$slots,"default")],8,F))}}),P={tabindex:"0",class:"beam__listitem"},U={class:"beam__listtext"},m=e.defineComponent({__name:"ListItem",props:{item:{}},setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("li",P,[e.createElementVNode("div",U,[e.createElementVNode("label",null,e.toDisplayString(t.item.label),1),e.createElementVNode("p",null,e.toDisplayString(t.item.description),1)]),t.item.count?(e.openBlock(),e.createBlock(p,{key:0,modelValue:t.item.count.count,"onUpdate:modelValue":n[0]||(n[0]=c=>t.item.count.count=c),denominator:t.item.count.of,uom:t.item.count.uom,editable:!0},null,8,["modelValue","denominator","uom"])):e.createCommentVNode("",!0),t.item.hasOwnProperty("checked")?(e.openBlock(),e.createBlock(d,{key:1,modelValue:t.item.checked,"onUpdate:modelValue":n[1]||(n[1]=c=>t.item.checked=c)},null,8,["modelValue"])):e.createCommentVNode("",!0)]))}}),H={class:"beam__listview"},B=e.defineComponent({__name:"ListView",props:{items:{}},emits:["scrollbottom"],setup(o,{emit:t}){const n=t;e.onMounted(()=>{window.addEventListener("scroll",c)}),e.onUnmounted(()=>{window.removeEventListener("scroll",c)});const c=()=>{const l=document.documentElement.scrollHeight-window.innerHeight,s=document.documentElement.scrollTop;l-s<=2&&n("scrollbottom")};return(l,s)=>(e.openBlock(),e.createElementBlock("ul",H,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,(i,r)=>(e.openBlock(),e.createElementBlock("li",{key:r},[i.linkComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.linkComponent),{key:0,to:i.route,tabindex:"-1"},{default:e.withCtx(()=>[e.createVNode(m,{item:i},null,8,["item"])]),_:2},1032,["to"])):(e.openBlock(),e.createBlock(m,{key:1,item:i},null,8,["item"]))]))),128))]))}}),j={class:"beam__navbar"},q=e.createElementVNode("span",{class:"home-icon"},"⬣",-1),z=e.createElementVNode("h1",{class:"nav-title"},"TITLE",-1),W={class:"navbar-action-wrapper"},$=e.defineComponent({__name:"Navbar",emits:["click"],setup(o,{emit:t}){const n=t,c=()=>{n("click")};return(l,s)=>(e.openBlock(),e.createElementBlock("nav",j,[e.renderSlot(l.$slots,"icon",{},()=>[q]),e.renderSlot(l.$slots,"title",{},()=>[z]),e.createElementVNode("div",W,[e.createElementVNode("button",{class:"navbar-action btn",onClick:c},[e.renderSlot(l.$slots,"navbaraction",{},()=>[e.createTextVNode("Action")])])])]))}}),Y={id:"scan_input"},C=e.defineComponent({__name:"ScanInput",emits:["scaninput"],setup(o,{emit:t}){const n=t,c=e.ref(""),l=s=>{s.target.tagName!=="INPUT"&&(s.key!=="Enter"?c.value+=`${s.key}`:(n("scaninput",c.value),c.value=""))};return e.onMounted(()=>{document.addEventListener("keypress",s=>{l(s)})}),e.onUnmounted(()=>{window.removeEventListener("keypress",s=>{l(s)})}),(s,i)=>(e.openBlock(),e.createElementBlock("div",Y))}});function G(o){o.component("ActionFooter",_),o.component("BeamModal",f),o.component("BeamModalOutlet",k),o.component("Confirm",u),o.component("ItemCheck",d),o.component("ItemCount",p),o.component("ListAnchor",b),o.component("ListItem",m),o.component("ListView",B),o.component("Navbar",$),o.component("ScanInput",C)}a.ActionFooter=_,a.BeamModal=f,a.BeamModalOutlet=k,a.Confirm=u,a.ItemCheck=d,a.ItemCount=p,a.ListAnchor=b,a.ListItem=m,a.ListView=B,a.Navbar=$,a.ScanInput=C,a.install=G,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|
|
2
|
+
//# sourceMappingURL=beam.umd.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"beam.umd.cjs","sources":["../src/components/ActionFooter.vue","../src/components/Confirm.vue","../src/components/ItemCheck.vue","../src/components/ItemCount.vue","../src/components/ListView.vue","../src/components/Navbar.vue","../src/components/ScanInput.vue","../src/index.ts"],"sourcesContent":["<template>\n\t<footer class=\"beam__actionfooter\">\n\t\t<span class=\"footer-action-wrapper\">\n\t\t\t<button class=\"footer-action btn\" @click=\"handleFooterAction\">\n\t\t\t\t<slot />\n\t\t\t</button>\n\t\t</span>\n\t</footer>\n</template>\n\n<script setup lang=\"ts\">\nconst emit = defineEmits(['click'])\n\nconst handleFooterAction = () => {\n\temit('click')\n}\n</script>\n","<template>\n\t<div class=\"beam__modal-confirm\">\n\t\t<h2>Would you like to continue?</h2>\n\t\t<button class=\"btn\" @click=\"$emit('confirmmodal')\">Yes</button>\n\t\t<button class=\"btn\" @click=\"$emit('closemodal')\">No</button>\n\t</div>\n</template>\n","<template>\n\t<label class=\"container\">\n\t\t<input type=\"checkbox\" :checked=\"value\" @input=\"handleInput\" tabindex=\"-1\" />\n\t\t<div class=\"checkmark\" tabindex=\"0\"></div>\n\t</label>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\n// make this v-model sensitive from parent\nconst props = defineProps<{\n\tvalue?: boolean\n}>()\n\nconst emit = defineEmits(['input'])\n\nconst checked = ref(props.value)\n\nconst handleInput = (e: InputEvent) => {\n\temit('input', checked.value)\n}\n</script>\n\n<style scoped>\n.container {\n\tdisplay: block;\n\tposition: relative;\n\tpadding-left: 2.5ch;\n\tmargin: 0;\n\tmargin-top: 0.5rem;\n\tcursor: pointer;\n\tfont-size: 2rem;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n}\n\n/* hide default checkbox */\n.container input {\n\tposition: absolute;\n\topacity: 0;\n\tcursor: pointer;\n\theight: 0;\n\twidth: 0;\n}\n\n.checkmark {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\theight: 2rem;\n\twidth: 2rem;\n\tbackground-color: #eee;\n\toutline: 2px solid transparent;\n\tborder: 1px solid var(--highlight);\n}\n\n.container:hover input ~ .checkmark {\n\tbackground-color: white;\n}\n\n.container input:checked ~ .checkmark {\n\tbackground-color: var(--brand-secondary);\n}\n\n.checkmark:after {\n\tcontent: '';\n\tposition: absolute;\n\tdisplay: none;\n}\n\n.container input:checked ~ .checkmark:after {\n\tdisplay: block;\n}\n\n.container .checkmark:after {\n\tleft: 25%;\n\ttop: 50%;\n\twidth: 0.5rem;\n\theight: 1rem;\n\tborder: solid var(--text-color);\n\tborder-width: 0 3px 3px 0;\n\t-webkit-transform: rotate(45deg);\n\t-ms-transform: rotate(45deg);\n\ttransform: rotate(45deg) translate(-50%, -50%);\n}\n</style>\n","<template>\n\t<div class=\"beam__itemcount\">\n\t\t<span\n\t\t\t:contenteditable=\"editable\"\n\t\t\t:class=\"{ alert: countColor === false }\"\n\t\t\t@input=\"handleInput\"\n\t\t\t@click=\"handleInput\">\n\t\t\t{{ count }}\n\t\t</span>\n\t\t<span>/{{ denominator }}</span>\n\t\t<span v-if=\"uom\"> {{ uom }}</span>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed } from 'vue'\n\nconst emit = defineEmits(['input'])\nconst props = withDefaults(\n\tdefineProps<{\n\t\tvalue?: number\n\t\tdenominator: number\n\t\tuom?: string\n\t\teditable?: boolean\n\t}>(),\n\t{ value: 0, editable: true, uom: '' }\n)\n\nconst count = ref(props.value)\n\nconst handleInput = (event: InputEvent | MouseEvent) => {\n\tevent.preventDefault()\n\tevent.stopPropagation()\n\tcount.value = Number(event.target.innerHTML.replace(/[^0-9]/g, ''))\n\temit('input', count.value)\n}\n\nconst countColor = computed(() => {\n\treturn count.value === props.denominator\n})\n</script>\n","<template>\n\t<ul class=\"beam__listview\">\n\t\t<li v-for=\"(item, index) in items\" :key=\"index\">\n\t\t\t<template v-if=\"item.linkComponent\">\n\t\t\t\t<component :is=\"item.linkComponent\" :to=\"item.route\" tabindex=\"-1\">\n\t\t\t\t\t<ListItem :item=\"item\"></ListItem>\n\t\t\t\t</component>\n\t\t\t</template>\n\t\t\t<template v-else>\n\t\t\t\t<ListItem :item=\"item\"></ListItem>\n\t\t\t</template>\n\t\t</li>\n\t</ul>\n</template>\n\n<script setup lang=\"ts\">\nimport { onMounted, onUnmounted } from 'vue'\n\nimport ListItem from './ListItem.vue'\n\ndefineProps<{\n\titems: {\n\t\tlabel: string\n\t\tdescription: string\n\t\tcount?: {\n\t\t\tcount: number\n\t\t\tof: number\n\t\t\tuom: string\n\t\t}\n\t\tchecked?: boolean\n\t\tlinkComponent?: string\n\t\troute?: string\n\t}[]\n}>()\n\nconst emit = defineEmits(['scrollbottom'])\n\nonMounted(() => {\n\twindow.addEventListener('scroll', handleScroll)\n})\n\nonUnmounted(() => {\n\twindow.removeEventListener('scroll', handleScroll)\n})\n\nconst handleScroll = () => {\n\tconst scrollHeightDifference = document.documentElement.scrollHeight - window.innerHeight\n\tconst scrollposition = document.documentElement.scrollTop\n\tif (scrollHeightDifference - scrollposition <= 2) {\n\t\temit('scrollbottom')\n\t}\n}\n</script>\n","<template>\n\t<nav class=\"beam__navbar\">\n\t\t<slot name=\"icon\">\n\t\t\t<span class=\"home-icon\">⬣</span>\n\t\t</slot>\n\t\t<slot name=\"title\">\n\t\t\t<h1 class=\"nav-title\">TITLE</h1>\n\t\t</slot>\n\t\t<div class=\"navbar-action-wrapper\">\n\t\t\t<button class=\"navbar-action btn\" @click=\"handlePrimaryAction\">\n\t\t\t\t<slot name=\"navbaraction\">Action</slot>\n\t\t\t</button>\n\t\t</div>\n\t</nav>\n</template>\n\n<script setup lang=\"ts\">\nconst emit = defineEmits(['click'])\n\nconst handlePrimaryAction = () => {\n\temit('click')\n}\n</script>\n","<template>\n\t<div id=\"scan_input\"></div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, onMounted, onUnmounted } from 'vue'\n\nconst emit = defineEmits(['scaninput'])\nconst barcode = ref('')\n\nconst handleScanInput = (event: InputEvent | KeyboardEvent) => {\n\tif (event.target.tagName !== 'INPUT') {\n\t\tif (event.key !== 'Enter') {\n\t\t\tbarcode.value += `${event.key}`\n\t\t} else {\n\t\t\temit('scaninput', barcode.value)\n\t\t\tbarcode.value = ''\n\t\t}\n\t}\n}\n\nonMounted(() => {\n\tdocument.addEventListener('keypress', event => {\n\t\thandleScanInput(event)\n\t})\n})\n\nonUnmounted(() => {\n\twindow.removeEventListener('keypress', event => {\n\t\thandleScanInput(event)\n\t})\n})\n</script>\n","import { App } from 'vue'\n\nimport ActionFooter from '@/components/ActionFooter.vue'\nimport BeamModal from '@/components/BeamModal.vue'\nimport BeamModalOutlet from '@/components/BeamModalOutlet.vue'\nimport Confirm from '@/components/Confirm.vue'\nimport ItemCheck from '@/components/ItemCheck.vue'\nimport ItemCount from '@/components/ItemCount.vue'\nimport ListAnchor from '@/components/ListAnchor.vue'\nimport ListItem from '@/components/ListItem.vue'\nimport ListView from '@/components/ListView.vue'\nimport Navbar from '@/components/Navbar.vue'\nimport ScanInput from '@/components/ScanInput.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ActionFooter', ActionFooter)\n\tapp.component('BeamModal', BeamModal)\n\tapp.component('BeamModalOutlet', BeamModalOutlet)\n\tapp.component('Confirm', Confirm)\n\tapp.component('ItemCheck', ItemCheck)\n\tapp.component('ItemCount', ItemCount)\n\tapp.component('ListAnchor', ListAnchor)\n\tapp.component('ListItem', ListItem)\n\tapp.component('ListView', ListView)\n\tapp.component('Navbar', Navbar)\n\tapp.component('ScanInput', ScanInput)\n}\n\nexport {\n\tActionFooter,\n\tBeamModal,\n\tBeamModalOutlet,\n\tConfirm,\n\tItemCheck,\n\tItemCount,\n\tListAnchor,\n\tListItem,\n\tListView,\n\tNavbar,\n\tScanInput,\n\tinstall,\n}\n"],"names":["emit","__emit","handleFooterAction","_hoisted_1","_sfc_render","_ctx","_cache","_openBlock","_createElementBlock","_hoisted_2","_createElementVNode","$event","props","__props","checked","ref","handleInput","e","count","event","countColor","computed","onMounted","handleScroll","onUnmounted","scrollHeightDifference","scrollposition","handlePrimaryAction","barcode","handleScanInput","install","app","ActionFooter","BeamModal","BeamModalOutlet","Confirm","ItemCheck","ItemCount","ListAnchor","ListItem","ListView","Navbar","ScanInput"],"mappings":"2ZAWA,MAAMA,EAAOC,EAEPC,EAAqB,IAAM,CAChCF,EAAK,OAAO,CAAA,gkCCZXG,EAAA,CAAA,MAAA,qBAAA,qEADD,SAAAC,EAAAC,EAAAC,EAAA,QACqCC,YAAA,EAAAC,qBAAA,MAAAL,EAAA,CACpCM,EAAQC,EAAAA,mBAAW,SAAA,CAAE,MAAK,cAA4BJ,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAK,GAAAN,EAAA,MAAA,cAAA,EACM,EAAA,KAAA,EAApDK,EAAAA,mBAAW,SAAA,CAAE,MAAK,cAAyBJ,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAK,GAAAN,EAAA,MAAA,YAAA,kUCOrD,MAAMO,EAAQC,EAIRb,EAAOC,EAEPa,EAAUC,EAAAA,IAAIH,EAAM,KAAK,EAEzBI,EAAeC,GAAkB,CACjCjB,EAAA,QAASc,EAAQ,KAAK,CAAA,8aCH5B,MAAMd,EAAOC,EACPW,EAAQC,EAURK,EAAQH,EAAAA,IAAIH,EAAM,KAAK,EAEvBI,EAAeG,GAAmC,CACvDA,EAAM,eAAe,EACrBA,EAAM,gBAAgB,EAChBD,EAAA,MAAQ,OAAOC,EAAM,OAAO,UAAU,QAAQ,UAAW,EAAE,CAAC,EAC7DnB,EAAA,QAASkB,EAAM,KAAK,CAAA,EAGpBE,EAAaC,EAAAA,SAAS,IACpBH,EAAM,QAAUN,EAAM,WAC7B,2jDCJD,MAAMZ,EAAOC,EAEbqB,EAAAA,UAAU,IAAM,CACR,OAAA,iBAAiB,SAAUC,CAAY,CAAA,CAC9C,EAEDC,EAAAA,YAAY,IAAM,CACV,OAAA,oBAAoB,SAAUD,CAAY,CAAA,CACjD,EAED,MAAMA,EAAe,IAAM,CAC1B,MAAME,EAAyB,SAAS,gBAAgB,aAAe,OAAO,YACxEC,EAAiB,SAAS,gBAAgB,UAC5CD,EAAyBC,GAAkB,GAC9C1B,EAAK,cAAc,CACpB,utBCjCD,MAAMA,EAAOC,EAEP0B,EAAsB,IAAM,CACjC3B,EAAK,OAAO,CAAA,yaCbb,MAAMA,EAAOC,EACP2B,EAAUb,MAAI,EAAE,EAEhBc,EAAmBV,GAAsC,CAC1DA,EAAM,OAAO,UAAY,UACxBA,EAAM,MAAQ,QACTS,EAAA,OAAS,GAAGT,EAAM,GAAG,IAExBnB,EAAA,YAAa4B,EAAQ,KAAK,EAC/BA,EAAQ,MAAQ,IAElB,EAGDN,OAAAA,EAAAA,UAAU,IAAM,CACN,SAAA,iBAAiB,WAAqBH,GAAA,CAC9CU,EAAgBV,CAAK,CAAA,CACrB,CAAA,CACD,EAEDK,EAAAA,YAAY,IAAM,CACV,OAAA,oBAAoB,WAAqBL,GAAA,CAC/CU,EAAgBV,CAAK,CAAA,CACrB,CAAA,CACD,0DCjBD,SAASW,EAAQC,EAAwB,CACpCA,EAAA,UAAU,eAAgBC,CAAY,EACtCD,EAAA,UAAU,YAAaE,CAAS,EAChCF,EAAA,UAAU,kBAAmBG,CAAe,EAC5CH,EAAA,UAAU,UAAWI,CAAO,EAC5BJ,EAAA,UAAU,YAAaK,CAAS,EAChCL,EAAA,UAAU,YAAaM,CAAS,EAChCN,EAAA,UAAU,aAAcO,CAAU,EAClCP,EAAA,UAAU,WAAYQ,CAAQ,EAC9BR,EAAA,UAAU,WAAYS,CAAQ,EAC9BT,EAAA,UAAU,SAAUU,CAAM,EAC1BV,EAAA,UAAU,YAAaW,CAAS,CACrC"}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.container[data-v-4d5731cd]{display:block;position:relative;padding-left:2.5ch;margin:0;margin-top:.5rem;cursor:pointer;font-size:2rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container input[data-v-4d5731cd]{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark[data-v-4d5731cd]{position:absolute;top:0;left:0;height:2rem;width:2rem;background-color:#eee;outline:2px solid transparent;border:1px solid var(--highlight)}.container:hover input~.checkmark[data-v-4d5731cd]{background-color:#fff}.container input:checked~.checkmark[data-v-4d5731cd]{background-color:var(--brand-secondary)}.checkmark[data-v-4d5731cd]:after{content:"";position:absolute;display:none}.container input:checked~.checkmark[data-v-4d5731cd]:after{display:block}.container .checkmark[data-v-4d5731cd]:after{left:25%;top:50%;width:.5rem;height:1rem;border:solid var(--text-color);border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg) translate(-50%,-50%)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/beam",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.20",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"node": ">=20.11.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
|
+
"prepublish": "tsc -b && vite build",
|
|
57
58
|
"build": "tsc -b && vite build",
|
|
58
59
|
"dev": "vite",
|
|
59
60
|
"lint": "eslint . --ext .ts,.vue",
|