@shawnjs/a2ui-vue 0.1.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/README.md +68 -0
- package/dist/A2UIAudio-Dk04owGa.cjs +1 -0
- package/dist/A2UIAudio-WmrsVVdB.js +33 -0
- package/dist/A2UIButton-BMHO6K6u.js +35 -0
- package/dist/A2UIButton-DwvJiYmv.cjs +1 -0
- package/dist/A2UICard--_T_isvU.cjs +1 -0
- package/dist/A2UICard-Cq5q3ZgF.js +34 -0
- package/dist/A2UICheckbox-C6okxLrX.js +44 -0
- package/dist/A2UICheckbox-CaRtMj7t.cjs +1 -0
- package/dist/A2UIDateTimeInput-BdcHcmk1.cjs +1 -0
- package/dist/A2UIDateTimeInput-BwL6Ejy1.js +60 -0
- package/dist/A2UIDivider-BB5LjXlM.js +22 -0
- package/dist/A2UIDivider-BGrs9_ef.cjs +1 -0
- package/dist/A2UIIcon-Bcd0cbht.cjs +1 -0
- package/dist/A2UIIcon-C45CAVyd.js +32 -0
- package/dist/A2UIImage-BSUuRZUD.cjs +1 -0
- package/dist/A2UIImage-DFu1Sj-k.js +43 -0
- package/dist/A2UIList-BqdYBWRw.cjs +1 -0
- package/dist/A2UIList-CHIcUerI.js +36 -0
- package/dist/A2UIModal-BF1VvRqK.js +59 -0
- package/dist/A2UIModal-DrlSVixf.cjs +1 -0
- package/dist/A2UIMultipleChoice-BgozRN_k.cjs +1 -0
- package/dist/A2UIMultipleChoice-D0L-7Jol.js +52 -0
- package/dist/A2UISlider--Vdoo1SX.cjs +1 -0
- package/dist/A2UISlider-PkQlrUwf.js +55 -0
- package/dist/A2UITabs-BOBp5yGv.cjs +1 -0
- package/dist/A2UITabs-CfJUet-J.js +47 -0
- package/dist/A2UITextField-78jRsRX-.js +47 -0
- package/dist/A2UITextField-Ba85Y1ag.cjs +1 -0
- package/dist/A2UIVideo-BBH-3hgb.js +32 -0
- package/dist/A2UIVideo-BlJlTrZ9.cjs +1 -0
- package/dist/a2ui-vue.css +1 -0
- package/dist/index-BOrHKsf8.cjs +435 -0
- package/dist/index-BpE-uBH2.js +8060 -0
- package/dist/index.d.ts +104 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +12 -0
- package/package.json +45 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineComponent as f, useCssVars as _, ref as v, computed as T, openBlock as r, createElementBlock as m, createElementVNode as u, normalizeStyle as C, unref as a, normalizeClass as i, Fragment as h, renderList as y, toDisplayString as I, createVNode as g } from "vue";
|
|
2
|
+
import { u as k, m as x, _ as S, a as V } from "./index-BpE-uBH2.js";
|
|
3
|
+
const w = ["onClick", "disabled"], z = /* @__PURE__ */ f({
|
|
4
|
+
__name: "A2UITabs",
|
|
5
|
+
props: {
|
|
6
|
+
surfaceId: {},
|
|
7
|
+
component: {},
|
|
8
|
+
weight: {},
|
|
9
|
+
tabs: {}
|
|
10
|
+
},
|
|
11
|
+
setup(t) {
|
|
12
|
+
_((c) => ({
|
|
13
|
+
d731f76a: o.weight
|
|
14
|
+
}));
|
|
15
|
+
const o = t, { theme: e, resolvePrimitive: d } = k(o), s = v(0), b = T(() => {
|
|
16
|
+
const c = s.value;
|
|
17
|
+
return o.tabs.map((p, l) => l === c ? x(
|
|
18
|
+
e.components.Tabs.controls.all,
|
|
19
|
+
e.components.Tabs.controls.selected
|
|
20
|
+
) : e.components.Tabs.controls.all);
|
|
21
|
+
});
|
|
22
|
+
return (c, p) => (r(), m("a2ui-tabs", null, [
|
|
23
|
+
u("section", {
|
|
24
|
+
class: i(a(e).components.Tabs.container),
|
|
25
|
+
style: C(a(e).additionalStyles?.Tabs)
|
|
26
|
+
}, [
|
|
27
|
+
u("div", {
|
|
28
|
+
class: i(a(e).components.Tabs.element)
|
|
29
|
+
}, [
|
|
30
|
+
(r(!0), m(h, null, y(t.tabs, (l, n) => (r(), m("button", {
|
|
31
|
+
key: n,
|
|
32
|
+
onClick: (A) => s.value = n,
|
|
33
|
+
disabled: s.value === n,
|
|
34
|
+
class: i(b.value[n])
|
|
35
|
+
}, I(a(d)(l.title)), 11, w))), 128))
|
|
36
|
+
], 2),
|
|
37
|
+
g(S, {
|
|
38
|
+
"surface-id": t.surfaceId,
|
|
39
|
+
component: t.tabs[s.value].child
|
|
40
|
+
}, null, 8, ["surface-id", "component"])
|
|
41
|
+
], 6)
|
|
42
|
+
]));
|
|
43
|
+
}
|
|
44
|
+
}), E = /* @__PURE__ */ V(z, [["__scopeId", "data-v-036075bf"]]);
|
|
45
|
+
export {
|
|
46
|
+
E as default
|
|
47
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineComponent as v, useCssVars as y, computed as r, openBlock as p, createElementBlock as d, createElementVNode as m, normalizeClass as l, unref as t, toDisplayString as I, createCommentVNode as T, normalizeStyle as b } from "vue";
|
|
2
|
+
import { u as F, a as g } from "./index-BpE-uBH2.js";
|
|
3
|
+
const C = ["for"], V = ["id", "value", "type"], k = /* @__PURE__ */ v({
|
|
4
|
+
__name: "A2UITextField",
|
|
5
|
+
props: {
|
|
6
|
+
surfaceId: {},
|
|
7
|
+
component: {},
|
|
8
|
+
weight: {},
|
|
9
|
+
text: {},
|
|
10
|
+
label: {},
|
|
11
|
+
textFieldType: {}
|
|
12
|
+
},
|
|
13
|
+
setup(s) {
|
|
14
|
+
y((o) => ({
|
|
15
|
+
e0db091a: e.weight
|
|
16
|
+
}));
|
|
17
|
+
const e = s, { theme: n, resolvePrimitive: i, getUniqueId: f, setData: x } = F(e), _ = r(() => i(e.text) || ""), c = r(() => i(e.label)), u = f("a2ui-input");
|
|
18
|
+
function h(o) {
|
|
19
|
+
const a = e.text?.path;
|
|
20
|
+
!(o.target instanceof HTMLInputElement) || !a || x(e.component, a, o.target.value, e.surfaceId);
|
|
21
|
+
}
|
|
22
|
+
return (o, a) => (p(), d("a2ui-text-field", null, [
|
|
23
|
+
m("section", {
|
|
24
|
+
class: l(t(n).components.TextField.container)
|
|
25
|
+
}, [
|
|
26
|
+
c.value ? (p(), d("label", {
|
|
27
|
+
key: 0,
|
|
28
|
+
for: t(u),
|
|
29
|
+
class: l(t(n).components.TextField.label)
|
|
30
|
+
}, I(c.value), 11, C)) : T("", !0),
|
|
31
|
+
m("input", {
|
|
32
|
+
autocomplete: "off",
|
|
33
|
+
class: l(t(n).components.TextField.element),
|
|
34
|
+
style: b(t(n).additionalStyles?.TextField),
|
|
35
|
+
onInput: h,
|
|
36
|
+
id: t(u),
|
|
37
|
+
value: _.value,
|
|
38
|
+
placeholder: "Please enter a value",
|
|
39
|
+
type: s.textFieldType === "number" ? "number" : "text"
|
|
40
|
+
}, null, 46, V)
|
|
41
|
+
], 2)
|
|
42
|
+
]));
|
|
43
|
+
}
|
|
44
|
+
}), S = /* @__PURE__ */ g(k, [["__scopeId", "data-v-e5902200"]]);
|
|
45
|
+
export {
|
|
46
|
+
S as default
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BOrHKsf8.cjs"),f=["for"],x=["id","value","type"],_=e.defineComponent({__name:"A2UITextField",props:{surfaceId:{},component:{},weight:{},text:{},label:{},textFieldType:{}},setup(a){e.useCssVars(l=>({e0db091a:t.weight}));const t=a,{theme:n,resolvePrimitive:s,getUniqueId:i,setData:d}=u.useDynamicComponent(t),p=e.computed(()=>s(t.text)||""),c=e.computed(()=>s(t.label)),r=i("a2ui-input");function m(l){const o=t.text?.path;!(l.target instanceof HTMLInputElement)||!o||d(t.component,o,l.target.value,t.surfaceId)}return(l,o)=>(e.openBlock(),e.createElementBlock("a2ui-text-field",null,[e.createElementVNode("section",{class:e.normalizeClass(e.unref(n).components.TextField.container)},[c.value?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(r),class:e.normalizeClass(e.unref(n).components.TextField.label)},e.toDisplayString(c.value),11,f)):e.createCommentVNode("",!0),e.createElementVNode("input",{autocomplete:"off",class:e.normalizeClass(e.unref(n).components.TextField.element),style:e.normalizeStyle(e.unref(n).additionalStyles?.TextField),onInput:m,id:e.unref(r),value:p.value,placeholder:"Please enter a value",type:a.textFieldType==="number"?"number":"text"},null,46,x)],2)]))}}),v=u._export_sfc(_,[["__scopeId","data-v-e5902200"]]);exports.default=v;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent as i, useCssVars as d, computed as m, openBlock as s, createElementBlock as n, normalizeStyle as u, unref as c, normalizeClass as p, createElementVNode as _, createCommentVNode as f } from "vue";
|
|
2
|
+
import { u as v, a as V } from "./index-BpE-uBH2.js";
|
|
3
|
+
const h = ["src"], y = /* @__PURE__ */ i({
|
|
4
|
+
__name: "A2UIVideo",
|
|
5
|
+
props: {
|
|
6
|
+
surfaceId: {},
|
|
7
|
+
component: {},
|
|
8
|
+
weight: {},
|
|
9
|
+
url: {}
|
|
10
|
+
},
|
|
11
|
+
setup(r) {
|
|
12
|
+
d((l) => ({
|
|
13
|
+
v20422cde: e.weight
|
|
14
|
+
}));
|
|
15
|
+
const e = r, { theme: o, resolvePrimitive: a } = v(e), t = m(() => a(e.url));
|
|
16
|
+
return (l, C) => (s(), n("a2ui-video", null, [
|
|
17
|
+
t.value ? (s(), n("section", {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: p(c(o).components.Video),
|
|
20
|
+
style: u(c(o).additionalStyles?.Video)
|
|
21
|
+
}, [
|
|
22
|
+
_("video", {
|
|
23
|
+
controls: "",
|
|
24
|
+
src: t.value
|
|
25
|
+
}, null, 8, h)
|
|
26
|
+
], 6)) : f("", !0)
|
|
27
|
+
]));
|
|
28
|
+
}
|
|
29
|
+
}), k = /* @__PURE__ */ V(y, [["__scopeId", "data-v-fcd65921"]]);
|
|
30
|
+
export {
|
|
31
|
+
k as default
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-BOrHKsf8.cjs"),i=["src"],a=e.defineComponent({__name:"A2UIVideo",props:{surfaceId:{},component:{},weight:{},url:{}},setup(s){e.useCssVars(l=>({v20422cde:o.weight}));const o=s,{theme:t,resolvePrimitive:r}=c.useDynamicComponent(o),n=e.computed(()=>r(o.url));return(l,d)=>(e.openBlock(),e.createElementBlock("a2ui-video",null,[n.value?(e.openBlock(),e.createElementBlock("section",{key:0,class:e.normalizeClass(e.unref(t).components.Video),style:e.normalizeStyle(e.unref(t).additionalStyles?.Video)},[e.createElementVNode("video",{controls:"",src:n.value},null,8,i)],6)):e.createCommentVNode("",!0)]))}}),u=c._export_sfc(a,[["__scopeId","data-v-fcd65921"]]);exports.default=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a2ui-row[data-v-b53b531f]{display:flex;flex:var(--v2e813481)}section[data-v-b53b531f]{display:flex;flex-direction:row;width:100%;min-height:100%;box-sizing:border-box}.align-start[data-v-b53b531f]{align-items:start}.align-center[data-v-b53b531f]{align-items:center}.align-end[data-v-b53b531f]{align-items:end}.align-stretch[data-v-b53b531f]{align-items:stretch}.distribute-start[data-v-b53b531f]{justify-content:start}.distribute-center[data-v-b53b531f]{justify-content:center}.distribute-end[data-v-b53b531f]{justify-content:end}.distribute-spaceBetween[data-v-b53b531f]{justify-content:space-between}.distribute-spaceAround[data-v-b53b531f]{justify-content:space-around}.distribute-spaceEvenly[data-v-b53b531f]{justify-content:space-evenly}a2ui-column[data-v-962911bf]{display:flex;flex:var(--v34ef1c34)}section[data-v-962911bf]{display:flex;flex-direction:column;min-width:100%;height:100%;box-sizing:border-box}.align-start[data-v-962911bf]{align-items:start}.align-center[data-v-962911bf]{align-items:center}.align-end[data-v-962911bf]{align-items:end}.align-stretch[data-v-962911bf]{align-items:stretch}.distribute-start[data-v-962911bf]{justify-content:start}.distribute-center[data-v-962911bf]{justify-content:center}.distribute-end[data-v-962911bf]{justify-content:end}.distribute-spaceBetween[data-v-962911bf]{justify-content:space-between}.distribute-spaceAround[data-v-962911bf]{justify-content:space-around}.distribute-spaceEvenly[data-v-962911bf]{justify-content:space-evenly}a2ui-text{display:block;flex:var(--v8882f3e6)}a2ui-text h1,a2ui-text h2,a2ui-text h3,a2ui-text h4,a2ui-text h5{line-height:inherit;font:inherit}a2ui-surface[data-v-338a980c]{display:flex;min-height:0;max-height:100%;flex-direction:column;gap:16px}a2ui-list[data-v-e51293b1]{display:block;flex:var(--c5f7ed34);min-height:0}a2ui-list[data-direction=vertical] section[data-v-e51293b1]{display:flex;flex-direction:column;max-height:100%;overflow-y:auto}a2ui-list[data-direction=horizontal] section[data-v-e51293b1]{display:flex;max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.a2ui-list-item[data-v-e51293b1]{display:flex;cursor:pointer;box-sizing:border-box}a2ui-card[data-v-f7d01a5b]{display:block;flex:var(--v98a62c34);min-height:0;overflow:auto}a2ui-card>section[data-v-f7d01a5b]{height:100%;width:100%;min-height:0;overflow:auto}a2ui-card>section[data-v-f7d01a5b]>*{height:100%;width:100%}a2ui-image[data-v-a9a59223]{display:block;flex:var(--v2c130bb2);min-height:0;overflow:auto}img[data-v-a9a59223]{display:block;width:100%;height:100%;box-sizing:border-box}a2ui-icon[data-v-b7e12202]{display:block;flex:var(--v6ac4842f);min-height:0;overflow:auto}a2ui-video[data-v-fcd65921]{display:block;flex:var(--v20422cde);min-height:0;overflow:auto}video[data-v-fcd65921]{display:block;width:100%;box-sizing:border-box}a2ui-audio[data-v-829d1205]{display:block;flex:var(--cec1fb52);min-height:0;overflow:auto}audio[data-v-829d1205]{display:block;width:100%;box-sizing:border-box}a2ui-button[data-v-ac5ef68d]{display:block;flex:var(--v57ca72c8);min-height:0}a2ui-divider[data-v-d7e7f57c]{display:block;min-height:0;overflow:auto}hr[data-v-d7e7f57c]{height:1px;background:#ccc;border:none}a2ui-multiple-choice[data-v-87d123dc]{display:block;flex:var(--f0bbd890);min-height:0;overflow:auto}select[data-v-87d123dc]{width:100%;box-sizing:border-box}a2ui-text-field[data-v-e5902200]{display:flex;flex:var(--e0db091a)}section[data-v-e5902200],input[data-v-e5902200],label[data-v-e5902200]{box-sizing:border-box}input[data-v-e5902200]{display:block;width:100%}label[data-v-e5902200]{display:block;margin-bottom:4px}a2ui-datetime-input[data-v-7d80ddaa]{display:block;flex:var(--v6c13f311);min-height:0;overflow:auto}input[data-v-7d80ddaa]{display:block;width:100%;box-sizing:border-box}a2ui-checkbox[data-v-295ec633]{display:block;flex:var(--v475d4c56);min-height:0;overflow:auto}input[data-v-295ec633]{display:block;width:100%}a2ui-slider[data-v-a8446ae1]{display:block;flex:var(--v7cd6127a);width:100%}input[data-v-a8446ae1]{display:block;width:100%;box-sizing:border-box}a2ui-tabs[data-v-036075bf]{display:block;flex:var(--d731f76a);width:100%}dialog[data-v-8d9f325d]{padding:0;border:none;background:transparent;box-shadow:none;overflow:visible}dialog section .controls[data-v-8d9f325d]{display:flex;justify-content:end;margin-bottom:4px}dialog section .controls button[data-v-8d9f325d]{padding:0;background:none;width:20px;height:20px;border:none;cursor:pointer}
|