beans-ui-kit 0.0.4 → 0.0.5
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.
|
@@ -48,6 +48,7 @@ var _ = /* @__PURE__ */ h(m, [["render", g]]), v = a({
|
|
|
48
48
|
type: Array,
|
|
49
49
|
default: []
|
|
50
50
|
},
|
|
51
|
+
propsPlaceholder: { type: String },
|
|
51
52
|
labelIcon: { type: Object },
|
|
52
53
|
selectIcon: { type: Object }
|
|
53
54
|
},
|
|
@@ -65,7 +66,12 @@ function x(a, c, m, h, g, _) {
|
|
|
65
66
|
id: a.propsClass,
|
|
66
67
|
"onUpdate:modelValue": c[0] ||= (e) => a.selectValue = e,
|
|
67
68
|
onChange: c[1] ||= (e) => a.$emit("valueChanged", a.selectValue)
|
|
68
|
-
}, [
|
|
69
|
+
}, [a.propsPlaceholder ? (s(), r("option", {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: o(`${a.propsClass}__placeholder`),
|
|
72
|
+
disabled: "",
|
|
73
|
+
selected: ""
|
|
74
|
+
}, d(a.propsPlaceholder), 3)) : n("", !0), (s(!0), r(e, null, l(a.propsOptions, (e, t) => (s(), r("option", {
|
|
69
75
|
key: t,
|
|
70
76
|
class: o(`${a.propsClass}__option`)
|
|
71
77
|
}, d(e && typeof e == "object" && "value" in e ? e.value : e), 3))), 128))], 42, b), [[f, a.selectValue]]), a.selectIcon ? (s(), t(u(a.selectIcon), { key: 0 })) : n("", !0)], 2)], 2);
|
|
@@ -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`},propsTitle:{type:String,default:``},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.toDisplayString)(e.propsTitle),3)],2)}var a=r(n,[[`render`,i]]),o=(0,t.defineComponent)({components:{},emits:[`valueChanged`],props:{propsClass:{type:String,default:``},propsText:{type:String,default:``},propsLabel:{type:String},propsValue:{type:[String,Number]},propsOptions:{type:Array,default:[]},labelIcon:{type:Object},selectIcon:{type:Object}},setup(e){return{selectValue:(0,t.ref)(e.propsValue||e.propsOptions[0])}}}),s=[`for`],c=[`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.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})):(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}`),id:e.propsClass,"onUpdate:modelValue":n[0]||=t=>e.selectValue=t,onChange:n[1]||=t=>e.$emit(`valueChanged`,e.selectValue)},[((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`)},(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})):(0,t.createCommentVNode)(``,!0)],2)],2)}var u=r(o,[[`render`,l]]);e.BaseButton=a,e.BaseSelect=u});
|
|
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`},propsTitle:{type:String,default:``},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.toDisplayString)(e.propsTitle),3)],2)}var a=r(n,[[`render`,i]]),o=(0,t.defineComponent)({components:{},emits:[`valueChanged`],props:{propsClass:{type:String,default:``},propsText:{type:String,default:``},propsLabel:{type:String},propsValue:{type:[String,Number]},propsOptions:{type:Array,default:[]},propsPlaceholder:{type:String},labelIcon:{type:Object},selectIcon:{type:Object}},setup(e){return{selectValue:(0,t.ref)(e.propsValue||e.propsOptions[0])}}}),s=[`for`],c=[`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.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})):(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}`),id:e.propsClass,"onUpdate:modelValue":n[0]||=t=>e.selectValue=t,onChange:n[1]||=t=>e.$emit(`valueChanged`,e.selectValue)},[e.propsPlaceholder?((0,t.openBlock)(),(0,t.createElementBlock)(`option`,{key:0,class:(0,t.normalizeClass)(`${e.propsClass}__placeholder`),disabled:``,selected:``},(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`)},(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})):(0,t.createCommentVNode)(``,!0)],2)],2)}var u=r(o,[[`render`,l]]);e.BaseButton=a,e.BaseSelect=u});
|