beans-ui-kit 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Fragment as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, ref as c, renderList as l,
|
|
1
|
+
import { Fragment as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, ref as c, renderList as l, renderSlot as u, resolveDynamicComponent as d, toDisplayString as f, vModelSelect as p, withDirectives as m } from "vue";
|
|
2
2
|
//#region src/components/BaseButton.vue?vue&type=script&lang.ts
|
|
3
|
-
var
|
|
3
|
+
var h = a({
|
|
4
4
|
components: {},
|
|
5
5
|
emits: ["clicked"],
|
|
6
6
|
props: {
|
|
@@ -8,29 +8,25 @@ var m = a({
|
|
|
8
8
|
type: String,
|
|
9
9
|
default: "button"
|
|
10
10
|
},
|
|
11
|
-
propsTitle: {
|
|
12
|
-
type: String,
|
|
13
|
-
default: ""
|
|
14
|
-
},
|
|
15
11
|
propsLabel: { type: String }
|
|
16
12
|
}
|
|
17
|
-
}),
|
|
13
|
+
}), g = (e, t) => {
|
|
18
14
|
let n = e.__vccOpts || e;
|
|
19
15
|
for (let [e, r] of t) n[e] = r;
|
|
20
16
|
return n;
|
|
21
17
|
};
|
|
22
18
|
//#endregion
|
|
23
19
|
//#region src/components/BaseButton.vue
|
|
24
|
-
function
|
|
20
|
+
function _(e, t, a, c, l, d) {
|
|
25
21
|
return s(), r("div", { class: o(`${e.propsClass}__wrapper`) }, [e.propsLabel ? (s(), r("label", {
|
|
26
22
|
key: 0,
|
|
27
23
|
class: o(`${e.propsClass}__label`)
|
|
28
|
-
},
|
|
24
|
+
}, f(e.propsLabel), 3)) : n("", !0), i("button", {
|
|
29
25
|
onClick: t[0] ||= (t) => e.$emit("clicked"),
|
|
30
26
|
class: o(`${e.propsClass}`)
|
|
31
|
-
},
|
|
27
|
+
}, [u(e.$slots, "default")], 2)], 2);
|
|
32
28
|
}
|
|
33
|
-
var
|
|
29
|
+
var v = /* @__PURE__ */ g(h, [["render", _]]), y = a({
|
|
34
30
|
emits: ["valueChanged"],
|
|
35
31
|
props: {
|
|
36
32
|
propsClass: {
|
|
@@ -66,15 +62,18 @@ var _ = /* @__PURE__ */ h(m, [["render", g]]), v = a({
|
|
|
66
62
|
}
|
|
67
63
|
};
|
|
68
64
|
}
|
|
69
|
-
}),
|
|
70
|
-
function
|
|
65
|
+
}), b = ["for"], x = ["disabled", "id"];
|
|
66
|
+
function S(a, c, u, h, g, _) {
|
|
71
67
|
return s(), r("div", { class: o([`${a.propsClass}__wrapper`, a.disabled ? `${a.propsClass}__wrapper--disabled` : ""]) }, [
|
|
72
68
|
a.propsLabel ? (s(), r("label", {
|
|
73
69
|
key: 0,
|
|
74
70
|
class: o(`${a.propsClass}__label`),
|
|
75
71
|
for: a.propsClass
|
|
76
|
-
}, [i("span", null,
|
|
77
|
-
|
|
72
|
+
}, [i("span", null, f(a.propsLabel), 1), a.labelIcon ? (s(), t(d(a.labelIcon), {
|
|
73
|
+
key: 0,
|
|
74
|
+
class: o(`${a.propsClass}__label__icon`)
|
|
75
|
+
}, null, 8, ["class"])) : n("", !0)], 10, b)) : n("", !0),
|
|
76
|
+
i("div", { class: o(`${a.propsClass}__inner`) }, [m(i("select", {
|
|
78
77
|
class: o(`${a.propsClass}`),
|
|
79
78
|
disabled: a.disabled,
|
|
80
79
|
id: a.propsClass,
|
|
@@ -85,22 +84,22 @@ function x(a, c, m, h, g, _) {
|
|
|
85
84
|
class: o(`${a.propsClass}__placeholder`),
|
|
86
85
|
disabled: "true",
|
|
87
86
|
value: ""
|
|
88
|
-
},
|
|
87
|
+
}, f(a.propsPlaceholder), 3)) : n("", !0), (s(!0), r(e, null, l(a.propsOptions, (e, t) => (s(), r("option", {
|
|
89
88
|
key: t,
|
|
90
89
|
class: o([`${a.propsClass}__option`, a.markedOptions.length && a.markedOptions.includes(e) ? `${a.propsClass}__option--marked` : ""])
|
|
91
|
-
},
|
|
90
|
+
}, f(e && typeof e == "object" && "value" in e ? e.value : e), 3))), 128))], 42, x), [[p, a.selectValue]]), a.selectIcon ? (s(), t(d(a.selectIcon), {
|
|
91
|
+
key: 0,
|
|
92
|
+
class: o(`${a.propsClass}__select__icon`)
|
|
93
|
+
}, null, 8, ["class"])) : n("", !0)], 2),
|
|
92
94
|
a.error ? (s(), r("div", {
|
|
93
95
|
key: 1,
|
|
94
96
|
class: o(`${a.propsClass}__error__wrapper`)
|
|
95
|
-
}, [a.errorIcon ? (s(), t(
|
|
97
|
+
}, [a.errorIcon ? (s(), t(d(a.errorIcon), {
|
|
96
98
|
key: 0,
|
|
97
99
|
class: o(`${a.propsClass}__error__icon`)
|
|
98
|
-
}, null, 8, ["class"])) : n("", !0), a.
|
|
99
|
-
key: 1,
|
|
100
|
-
class: o(`${a.propsClass}__error`)
|
|
101
|
-
}, d(a.error), 3)) : n("", !0)], 2)) : n("", !0)
|
|
100
|
+
}, null, 8, ["class"])) : n("", !0), i("div", { class: o(`${a.propsClass}__error`) }, f(a.error), 3)], 2)) : n("", !0)
|
|
102
101
|
], 2);
|
|
103
102
|
}
|
|
104
|
-
var
|
|
103
|
+
var C = /* @__PURE__ */ g(y, [["render", S]]);
|
|
105
104
|
//#endregion
|
|
106
|
-
export {
|
|
105
|
+
export { v as BaseButton, C as BaseSelect };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.beansBaseActions={},e.Vue))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=(0,t.defineComponent)({components:{},emits:[`clicked`],props:{propsClass:{type:String,default:`button`},
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.beansBaseActions={},e.Vue))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=(0,t.defineComponent)({components:{},emits:[`clicked`],props:{propsClass:{type:String,default:`button`},propsLabel:{type:String}}}),r=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};function i(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)(`${e.propsClass}__wrapper`)},[e.propsLabel?((0,t.openBlock)(),(0,t.createElementBlock)(`label`,{key:0,class:(0,t.normalizeClass)(`${e.propsClass}__label`)},(0,t.toDisplayString)(e.propsLabel),3)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`button`,{onClick:n[0]||=t=>e.$emit(`clicked`),class:(0,t.normalizeClass)(`${e.propsClass}`)},[(0,t.renderSlot)(e.$slots,`default`)],2)],2)}var a=r(n,[[`render`,i]]),o=(0,t.defineComponent)({emits:[`valueChanged`],props:{propsClass:{type:String,default:`select`},propsLabel:{type:String},propsValue:{type:[String,Number]},propsOptions:{type:Array,default:()=>[]},propsPlaceholder:{type:String},error:{type:String},labelIcon:{type:Object},selectIcon:{type:Object},errorIcon:{type:Object},markedOptions:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1}},setup(e,{emit:n}){let r=(0,t.ref)(e.propsValue||``);return{selectValue:r,valueChanged:()=>{n(`valueChanged`,r.value)}}}}),s=[`for`],c=[`disabled`,`id`];function l(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`${e.propsClass}__wrapper`,e.disabled?`${e.propsClass}__wrapper--disabled`:``])},[e.propsLabel?((0,t.openBlock)(),(0,t.createElementBlock)(`label`,{key:0,class:(0,t.normalizeClass)(`${e.propsClass}__label`),for:e.propsClass},[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(e.propsLabel),1),e.labelIcon?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.labelIcon),{key:0,class:(0,t.normalizeClass)(`${e.propsClass}__label__icon`)},null,8,[`class`])):(0,t.createCommentVNode)(``,!0)],10,s)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(`${e.propsClass}__inner`)},[(0,t.withDirectives)((0,t.createElementVNode)(`select`,{class:(0,t.normalizeClass)(`${e.propsClass}`),disabled:e.disabled,id:e.propsClass,"onUpdate:modelValue":n[0]||=t=>e.selectValue=t,onChange:n[1]||=(...t)=>e.valueChanged&&e.valueChanged(...t)},[e.propsPlaceholder?((0,t.openBlock)(),(0,t.createElementBlock)(`option`,{key:0,class:(0,t.normalizeClass)(`${e.propsClass}__placeholder`),disabled:`true`,value:``},(0,t.toDisplayString)(e.propsPlaceholder),3)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.propsOptions,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`option`,{key:r,class:(0,t.normalizeClass)([`${e.propsClass}__option`,e.markedOptions.length&&e.markedOptions.includes(n)?`${e.propsClass}__option--marked`:``])},(0,t.toDisplayString)(n&&typeof n==`object`&&`value`in n?n.value:n),3))),128))],42,c),[[t.vModelSelect,e.selectValue]]),e.selectIcon?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.selectIcon),{key:0,class:(0,t.normalizeClass)(`${e.propsClass}__select__icon`)},null,8,[`class`])):(0,t.createCommentVNode)(``,!0)],2),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)(`${e.propsClass}__error__wrapper`)},[e.errorIcon?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.errorIcon),{key:0,class:(0,t.normalizeClass)(`${e.propsClass}__error__icon`)},null,8,[`class`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(`${e.propsClass}__error`)},(0,t.toDisplayString)(e.error),3)],2)):(0,t.createCommentVNode)(``,!0)],2)}var u=r(o,[[`render`,l]]);e.BaseButton=a,e.BaseSelect=u});
|
|
@@ -4,10 +4,6 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
4
4
|
type: StringConstructor;
|
|
5
5
|
default: string;
|
|
6
6
|
};
|
|
7
|
-
propsTitle: {
|
|
8
|
-
type: StringConstructor;
|
|
9
|
-
default: string;
|
|
10
|
-
};
|
|
11
7
|
propsLabel: {
|
|
12
8
|
type: StringConstructor;
|
|
13
9
|
};
|
|
@@ -16,10 +12,6 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
16
12
|
type: StringConstructor;
|
|
17
13
|
default: string;
|
|
18
14
|
};
|
|
19
|
-
propsTitle: {
|
|
20
|
-
type: StringConstructor;
|
|
21
|
-
default: string;
|
|
22
|
-
};
|
|
23
15
|
propsLabel: {
|
|
24
16
|
type: StringConstructor;
|
|
25
17
|
};
|
|
@@ -27,6 +19,5 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
27
19
|
onClicked?: ((...args: any[]) => any) | undefined;
|
|
28
20
|
}>, {
|
|
29
21
|
propsClass: string;
|
|
30
|
-
propsTitle: string;
|
|
31
22
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
32
23
|
export default _default;
|