beans-ui-kit 0.0.39 → 0.0.41
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.
|
@@ -8,25 +8,28 @@ var h = i({
|
|
|
8
8
|
type: String,
|
|
9
9
|
default: "button"
|
|
10
10
|
},
|
|
11
|
-
propsLabel: { type: String }
|
|
11
|
+
propsLabel: { type: String },
|
|
12
|
+
disabled: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
}
|
|
12
16
|
}
|
|
13
17
|
}), g = (e, t) => {
|
|
14
18
|
let n = e.__vccOpts || e;
|
|
15
19
|
for (let [e, r] of t) n[e] = r;
|
|
16
20
|
return n;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
//#region src/components/BaseButton.vue
|
|
20
|
-
function _(e, i, s, c, d, f) {
|
|
21
|
+
}, _ = ["disabled"];
|
|
22
|
+
function v(e, i, s, c, d, f) {
|
|
21
23
|
return o(), n("div", { class: a(`${e.propsClass}__wrapper`) }, [e.propsLabel ? (o(), n("label", {
|
|
22
24
|
key: 0,
|
|
23
25
|
class: a(`${e.propsClass}__label`)
|
|
24
26
|
}, u(e.propsLabel), 3)) : t("", !0), r("button", {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
class: a(`${e.propsClass}`),
|
|
28
|
+
disabled: e.disabled,
|
|
29
|
+
onClick: i[0] ||= (t) => e.$emit("clicked")
|
|
30
|
+
}, [l(e.$slots, "default")], 10, _)], 2);
|
|
28
31
|
}
|
|
29
|
-
var
|
|
32
|
+
var y = /* @__PURE__ */ g(h, [["render", v]]), b = i({
|
|
30
33
|
emits: ["valueChanged"],
|
|
31
34
|
props: {
|
|
32
35
|
propsClass: {
|
|
@@ -64,8 +67,8 @@ var v = /* @__PURE__ */ g(h, [["render", _]]), y = i({
|
|
|
64
67
|
}
|
|
65
68
|
};
|
|
66
69
|
}
|
|
67
|
-
}),
|
|
68
|
-
function
|
|
70
|
+
}), x = ["for"], S = ["disabled", "id"];
|
|
71
|
+
function C(i, s, d, p, h, g) {
|
|
69
72
|
return o(), n("div", { class: a([`${i.propsClass}__wrapper`, i.disabled ? `${i.propsClass}__wrapper--disabled` : ""]) }, [
|
|
70
73
|
i.propsLabel ? (o(), n("label", {
|
|
71
74
|
key: 0,
|
|
@@ -74,7 +77,7 @@ function S(i, s, d, p, h, g) {
|
|
|
74
77
|
}, [r("span", { class: a(`${i.propsClass}__label`) }, u(i.propsLabel), 3), i.$slots["label-icon"] ? (o(), n("div", {
|
|
75
78
|
key: 0,
|
|
76
79
|
class: a(`${i.propsClass}__label__icon__wrapper`)
|
|
77
|
-
}, [l(i.$slots, "label-icon")], 2)) : t("", !0)], 10,
|
|
80
|
+
}, [l(i.$slots, "label-icon")], 2)) : t("", !0)], 10, x)) : t("", !0),
|
|
78
81
|
r("div", { class: a(`${i.propsClass}__inner`) }, [m(r("select", {
|
|
79
82
|
class: a(`${i.propsClass}`),
|
|
80
83
|
disabled: i.disabled,
|
|
@@ -89,7 +92,7 @@ function S(i, s, d, p, h, g) {
|
|
|
89
92
|
}, u(i.propsPlaceholder), 3)) : t("", !0), (o(!0), n(e, null, c(i.propsOptions, (e, t) => (o(), n("option", {
|
|
90
93
|
key: t,
|
|
91
94
|
class: a([`${i.propsClass}__option`, i.markedOptions.length && i.markedOptions.includes(e) ? `${i.propsClass}__option--marked` : ""])
|
|
92
|
-
}, u(e && typeof e == "object" && "value" in e ? e.value : e), 3))), 128))], 42,
|
|
95
|
+
}, u(e && typeof e == "object" && "value" in e ? e.value : e), 3))), 128))], 42, S), [[f, i.selectValue]]), i.$slots["select-icon"] ? (o(), n("div", {
|
|
93
96
|
key: 0,
|
|
94
97
|
class: a(`${i.propsClass}__icon__wrapper`)
|
|
95
98
|
}, [l(i.$slots, "select-icon")], 2)) : t("", !0)], 2),
|
|
@@ -102,7 +105,7 @@ function S(i, s, d, p, h, g) {
|
|
|
102
105
|
}, [l(i.$slots, "error-icon")], 2)) : t("", !0)], 2)) : t("", !0)
|
|
103
106
|
], 2);
|
|
104
107
|
}
|
|
105
|
-
var
|
|
108
|
+
var w = /* @__PURE__ */ g(b, [["render", C]]), T = i({
|
|
106
109
|
components: {},
|
|
107
110
|
emits: ["valueChanged"],
|
|
108
111
|
props: {
|
|
@@ -128,31 +131,36 @@ var C = /* @__PURE__ */ g(y, [["render", S]]), w = i({
|
|
|
128
131
|
default: ""
|
|
129
132
|
},
|
|
130
133
|
min: { type: Number },
|
|
131
|
-
max: { type: Number }
|
|
134
|
+
max: { type: Number },
|
|
135
|
+
disabled: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
default: !1
|
|
138
|
+
}
|
|
132
139
|
},
|
|
133
140
|
setup(e, { emit: t }) {
|
|
134
141
|
let n = s(e.propsValue);
|
|
135
142
|
return p(n, () => {
|
|
136
|
-
n.value && (e.min && Number(n.value) < e.min ? n.value = e.min : e.max && Number(n.value) > e.max && (n.value = e.max), t("valueChanged", n.value, e.propsName)
|
|
143
|
+
n.value && (e.min && Number(n.value) < e.min ? n.value = e.min : e.max && Number(n.value) > e.max && (n.value = e.max)), t("valueChanged", n.value, e.propsName);
|
|
137
144
|
}, {
|
|
138
145
|
deep: !0,
|
|
139
146
|
immediate: !0
|
|
140
147
|
}), { inputValue: n };
|
|
141
148
|
}
|
|
142
|
-
}),
|
|
149
|
+
}), E = ["for"], D = [
|
|
143
150
|
"id",
|
|
144
151
|
"type",
|
|
145
152
|
"placeholder",
|
|
146
153
|
"min",
|
|
147
|
-
"max"
|
|
154
|
+
"max",
|
|
155
|
+
"disabled"
|
|
148
156
|
];
|
|
149
|
-
function
|
|
157
|
+
function O(e, i, s, c, f, p) {
|
|
150
158
|
return o(), n("div", { class: a(`${e.propsClass}__wrapper`) }, [
|
|
151
159
|
e.propsLabel ? (o(), n("label", {
|
|
152
160
|
key: 0,
|
|
153
161
|
class: a(`${e.propsClass}__label`),
|
|
154
162
|
for: e.propsClass
|
|
155
|
-
}, u(e.propsLabel), 11,
|
|
163
|
+
}, u(e.propsLabel), 11, E)) : t("", !0),
|
|
156
164
|
m(r("input", {
|
|
157
165
|
class: a(e.propsClass),
|
|
158
166
|
id: e.propsClass,
|
|
@@ -160,14 +168,15 @@ function D(e, i, s, c, f, p) {
|
|
|
160
168
|
placeholder: e.propsPlaceholder,
|
|
161
169
|
min: e.min,
|
|
162
170
|
max: e.max,
|
|
171
|
+
disabled: e.disabled,
|
|
163
172
|
"onUpdate:modelValue": i[0] ||= (t) => e.inputValue = t
|
|
164
|
-
}, null, 10,
|
|
173
|
+
}, null, 10, D), [[d, e.inputValue]]),
|
|
165
174
|
e.$slots["input-icon"] ? (o(), n("div", {
|
|
166
175
|
key: 1,
|
|
167
176
|
class: a(`${e.propsClass}__icon__wrapper`)
|
|
168
177
|
}, [l(e.$slots, "input-icon")], 2)) : t("", !0)
|
|
169
178
|
], 2);
|
|
170
179
|
}
|
|
171
|
-
var
|
|
180
|
+
var k = /* @__PURE__ */ g(T, [["render", O]]);
|
|
172
181
|
//#endregion
|
|
173
|
-
export {
|
|
182
|
+
export { y as BaseButton, k as BaseInput, w 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`},propsLabel:{type:String}}}),r=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};function
|
|
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},disabled:{type:Boolean,default:!1}}}),r=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},i=[`disabled`];function a(e,n,r,a,o,s){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`,{class:(0,t.normalizeClass)(`${e.propsClass}`),disabled:e.disabled,onClick:n[0]||=t=>e.$emit(`clicked`)},[(0,t.renderSlot)(e.$slots,`default`)],10,i)],2)}var o=r(n,[[`render`,a]]),s=(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)(``);return(0,t.watch)(e,()=>{e.propsValue&&(r.value=String(e.propsValue))}),{selectValue:r,valueChanged:()=>{n(`valueChanged`,r.value)}}}}),c=[`for`],l=[`disabled`,`id`];function u(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__wrapper`),for:e.propsClass},[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(`${e.propsClass}__label`)},(0,t.toDisplayString)(e.propsLabel),3),e.$slots[`label-icon`]?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)(`${e.propsClass}__label__icon__wrapper`)},[(0,t.renderSlot)(e.$slots,`label-icon`)],2)):(0,t.createCommentVNode)(``,!0)],10,c)):(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,l),[[t.vModelSelect,e.selectValue]]),e.$slots[`select-icon`]?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)(`${e.propsClass}__icon__wrapper`)},[(0,t.renderSlot)(e.$slots,`select-icon`)],2)):(0,t.createCommentVNode)(``,!0)],2),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)(`${e.propsClass}__error__wrapper`)},[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(`${e.propsClass}__error`)},(0,t.toDisplayString)(e.error),3),e.$slots[`error-icon`]?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)(`${e.propsClass}__error__icon__wrapper`)},[(0,t.renderSlot)(e.$slots,`error-icon`)],2)):(0,t.createCommentVNode)(``,!0)],2)):(0,t.createCommentVNode)(``,!0)],2)}var d=r(s,[[`render`,u]]),f=(0,t.defineComponent)({components:{},emits:[`valueChanged`],props:{propsClass:{type:String,default:`input`},propsLabel:{type:String},propsValue:{type:[String,Number],default:null},propsType:{type:String,default:`text`},propsPlaceholder:{type:String,default:``},propsName:{type:String,default:``},min:{type:Number},max:{type:Number},disabled:{type:Boolean,default:!1}},setup(e,{emit:n}){let r=(0,t.ref)(e.propsValue);return(0,t.watch)(r,()=>{r.value&&(e.min&&Number(r.value)<e.min?r.value=e.min:e.max&&Number(r.value)>e.max&&(r.value=e.max)),n(`valueChanged`,r.value,e.propsName)},{deep:!0,immediate:!0}),{inputValue:r}}}),p=[`for`],m=[`id`,`type`,`placeholder`,`min`,`max`,`disabled`];function h(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.toDisplayString)(e.propsLabel),11,p)):(0,t.createCommentVNode)(``,!0),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{class:(0,t.normalizeClass)(e.propsClass),id:e.propsClass,type:e.propsType,placeholder:e.propsPlaceholder,min:e.min,max:e.max,disabled:e.disabled,"onUpdate:modelValue":n[0]||=t=>e.inputValue=t},null,10,m),[[t.vModelDynamic,e.inputValue]]),e.$slots[`input-icon`]?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)(`${e.propsClass}__icon__wrapper`)},[(0,t.renderSlot)(e.$slots,`input-icon`)],2)):(0,t.createCommentVNode)(``,!0)],2)}var g=r(f,[[`render`,h]]);e.BaseButton=o,e.BaseInput=g,e.BaseSelect=d});
|
|
@@ -7,6 +7,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
7
7
|
propsLabel: {
|
|
8
8
|
type: StringConstructor;
|
|
9
9
|
};
|
|
10
|
+
disabled: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
10
14
|
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "clicked"[], "clicked", PublicProps, Readonly< ExtractPropTypes<{
|
|
11
15
|
propsClass: {
|
|
12
16
|
type: StringConstructor;
|
|
@@ -15,9 +19,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
15
19
|
propsLabel: {
|
|
16
20
|
type: StringConstructor;
|
|
17
21
|
};
|
|
22
|
+
disabled: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
18
26
|
}>> & Readonly<{
|
|
19
27
|
onClicked?: ((...args: any[]) => any) | undefined;
|
|
20
28
|
}>, {
|
|
21
29
|
propsClass: string;
|
|
30
|
+
disabled: boolean;
|
|
22
31
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
23
32
|
export default _default;
|
|
@@ -29,6 +29,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
29
29
|
max: {
|
|
30
30
|
type: NumberConstructor;
|
|
31
31
|
};
|
|
32
|
+
disabled: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
32
36
|
}>, {
|
|
33
37
|
inputValue: Ref<string | number, string | number>;
|
|
34
38
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "valueChanged"[], "valueChanged", PublicProps, Readonly< ExtractPropTypes<{
|
|
@@ -61,10 +65,15 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
61
65
|
max: {
|
|
62
66
|
type: NumberConstructor;
|
|
63
67
|
};
|
|
68
|
+
disabled: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
64
72
|
}>> & Readonly<{
|
|
65
73
|
onValueChanged?: ((...args: any[]) => any) | undefined;
|
|
66
74
|
}>, {
|
|
67
75
|
propsClass: string;
|
|
76
|
+
disabled: boolean;
|
|
68
77
|
propsValue: string | number;
|
|
69
78
|
propsPlaceholder: string;
|
|
70
79
|
propsType: string;
|
|
@@ -30,8 +30,8 @@ declare const _default: DefineComponent<{
|
|
|
30
30
|
onValueChanged?: ((...args: any[]) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
propsClass: string;
|
|
33
|
+
disabled: boolean;
|
|
33
34
|
propsOptions: unknown[];
|
|
34
35
|
markedOptions: unknown[];
|
|
35
|
-
disabled: boolean;
|
|
36
36
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
37
37
|
export default _default;
|