@charpente-ui/vue 1.0.0-beta.2 → 1.0.0-beta.3
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 +9 -7
- package/dist/charpente.js +91 -59
- package/dist/charpente.umd.cjs +1 -1
- package/dist/components/BaseCheckbox.d.ts +6 -6
- package/dist/components/BaseLabel.d.ts +4 -8
- package/dist/components/BaseRadio.d.ts +12 -0
- package/dist/components/BaseSelect.d.ts +24 -0
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,10 +26,12 @@ import { CButton } from '@charpente-ui/vue';
|
|
|
26
26
|
|
|
27
27
|
## Components
|
|
28
28
|
|
|
29
|
-
| Name | Tag |
|
|
30
|
-
|
|
31
|
-
| Button | `CButton` |
|
|
32
|
-
| Input | `CInput` |
|
|
33
|
-
| Label | `CLabel` |
|
|
34
|
-
| Textarea | `CTextarea` |
|
|
35
|
-
| Checkbox | `CCheckbox` |
|
|
29
|
+
| Name | Status | Tag |
|
|
30
|
+
|----------|--------|-------------|
|
|
31
|
+
| Button | Ready | `CButton` |
|
|
32
|
+
| Input | Ready | `CInput` |
|
|
33
|
+
| Label | Ready | `CLabel` |
|
|
34
|
+
| Textarea | Ready | `CTextarea` |
|
|
35
|
+
| Checkbox | Ready | `CCheckbox` |
|
|
36
|
+
| Radio | Ready | `CRadio` |
|
|
37
|
+
| Select | Ready | `CSelect` |
|
package/dist/charpente.js
CHANGED
|
@@ -1,50 +1,39 @@
|
|
|
1
|
-
import { defineComponent as n, openBlock as u, createBlock as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as n, openBlock as u, createBlock as V, resolveDynamicComponent as h, normalizeProps as B, guardReactiveProps as C, withCtx as M, renderSlot as f, useModel as m, useAttrs as c, computed as p, useId as v, withDirectives as _, createElementBlock as d, mergeProps as i, vModelCheckbox as b, mergeModels as $, vModelDynamic as x, vModelRadio as A, vModelSelect as k, vModelText as I } from "vue";
|
|
2
|
+
const T = /* @__PURE__ */ n({
|
|
3
3
|
inheritAttrs: !1,
|
|
4
4
|
__name: "BaseButton",
|
|
5
5
|
props: {
|
|
6
6
|
as: { default: "button" }
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
return (
|
|
10
|
-
default:
|
|
11
|
-
|
|
8
|
+
setup(t) {
|
|
9
|
+
return (e, o) => (u(), V(h(t.as), B(C(e.$attrs)), {
|
|
10
|
+
default: M(() => [
|
|
11
|
+
f(e.$slots, "default")
|
|
12
12
|
]),
|
|
13
13
|
_: 3
|
|
14
14
|
}, 16));
|
|
15
15
|
}
|
|
16
|
-
}),
|
|
16
|
+
}), y = ["id", "value"], w = /* @__PURE__ */ n({
|
|
17
17
|
inheritAttrs: !1,
|
|
18
18
|
__name: "BaseCheckbox",
|
|
19
|
-
props: {
|
|
20
|
-
modelValue: { type: [Boolean, Array], default: !1 },
|
|
19
|
+
props: /* @__PURE__ */ $({
|
|
21
20
|
value: {}
|
|
22
|
-
},
|
|
21
|
+
}, {
|
|
22
|
+
modelValue: { type: [Boolean, Array] },
|
|
23
|
+
modelModifiers: {}
|
|
24
|
+
}),
|
|
23
25
|
emits: ["update:modelValue"],
|
|
24
|
-
setup(
|
|
25
|
-
const e =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
V > -1 && d.splice(V, 1);
|
|
34
|
-
}
|
|
35
|
-
r("update:modelValue", d);
|
|
36
|
-
} else
|
|
37
|
-
r("update:modelValue", h);
|
|
38
|
-
};
|
|
39
|
-
return (f, x) => (u(), m("input", p({
|
|
40
|
-
id: _(l),
|
|
41
|
-
type: "checkbox"
|
|
42
|
-
}, f.$attrs, {
|
|
43
|
-
checked: o.value,
|
|
44
|
-
onChange: k
|
|
45
|
-
}), null, 16, D));
|
|
26
|
+
setup(t) {
|
|
27
|
+
const e = m(t, "modelValue"), o = c(), l = p(() => o.id || v());
|
|
28
|
+
return (s, a) => _((u(), d("input", i({ type: "checkbox" }, s.$attrs, {
|
|
29
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => e.value = r),
|
|
30
|
+
id: l.value,
|
|
31
|
+
value: t.value
|
|
32
|
+
}), null, 16, y)), [
|
|
33
|
+
[b, e.value]
|
|
34
|
+
]);
|
|
46
35
|
}
|
|
47
|
-
}),
|
|
36
|
+
}), U = ["id"], L = /* @__PURE__ */ n({
|
|
48
37
|
inheritAttrs: !1,
|
|
49
38
|
__name: "BaseInput",
|
|
50
39
|
props: {
|
|
@@ -52,25 +41,66 @@ const z = /* @__PURE__ */ n({
|
|
|
52
41
|
modelModifiers: {}
|
|
53
42
|
},
|
|
54
43
|
emits: ["update:modelValue"],
|
|
55
|
-
setup(
|
|
56
|
-
const
|
|
57
|
-
return (
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
[
|
|
44
|
+
setup(t) {
|
|
45
|
+
const e = m(t, "modelValue"), o = c(), l = p(() => o.id || v());
|
|
46
|
+
return (s, a) => _((u(), d("input", i(s.$attrs, {
|
|
47
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => e.value = r),
|
|
48
|
+
id: l.value
|
|
49
|
+
}), null, 16, U)), [
|
|
50
|
+
[x, e.value]
|
|
62
51
|
]);
|
|
63
52
|
}
|
|
64
|
-
}),
|
|
53
|
+
}), R = ["for"], z = /* @__PURE__ */ n({
|
|
65
54
|
inheritAttrs: !1,
|
|
66
55
|
__name: "BaseLabel",
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
56
|
+
props: {
|
|
57
|
+
for: {}
|
|
58
|
+
},
|
|
59
|
+
setup(t) {
|
|
60
|
+
return (e, o) => (u(), d("label", i(e.$attrs, { for: t.for }), [
|
|
61
|
+
f(e.$slots, "default")
|
|
62
|
+
], 16, R));
|
|
63
|
+
}
|
|
64
|
+
}), S = ["id", "value"], E = /* @__PURE__ */ n({
|
|
65
|
+
inheritAttrs: !1,
|
|
66
|
+
__name: "BaseRadio",
|
|
67
|
+
props: /* @__PURE__ */ $({
|
|
68
|
+
value: {}
|
|
69
|
+
}, {
|
|
70
|
+
modelValue: {},
|
|
71
|
+
modelModifiers: {}
|
|
72
|
+
}),
|
|
73
|
+
emits: ["update:modelValue"],
|
|
74
|
+
setup(t) {
|
|
75
|
+
const e = m(t, "modelValue"), o = c(), l = p(() => o.id || v());
|
|
76
|
+
return (s, a) => _((u(), d("input", i({ type: "radio" }, s.$attrs, {
|
|
77
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => e.value = r),
|
|
78
|
+
id: l.value,
|
|
79
|
+
value: t.value
|
|
80
|
+
}), null, 16, S)), [
|
|
81
|
+
[A, e.value]
|
|
82
|
+
]);
|
|
83
|
+
}
|
|
84
|
+
}), g = ["id"], j = /* @__PURE__ */ n({
|
|
85
|
+
inheritAttrs: !1,
|
|
86
|
+
__name: "BaseSelect",
|
|
87
|
+
props: {
|
|
88
|
+
modelValue: {},
|
|
89
|
+
modelModifiers: {}
|
|
90
|
+
},
|
|
91
|
+
emits: ["update:modelValue"],
|
|
92
|
+
setup(t) {
|
|
93
|
+
const e = m(t, "modelValue"), o = c(), l = p(() => o.id || v());
|
|
94
|
+
return (s, a) => _((u(), d("select", i(s.$attrs, {
|
|
95
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => e.value = r),
|
|
96
|
+
id: l.value
|
|
97
|
+
}), [
|
|
98
|
+
f(s.$slots, "default")
|
|
99
|
+
], 16, g)), [
|
|
100
|
+
[k, e.value]
|
|
101
|
+
]);
|
|
72
102
|
}
|
|
73
|
-
}),
|
|
103
|
+
}), D = ["id"], q = /* @__PURE__ */ n({
|
|
74
104
|
inheritAttrs: !1,
|
|
75
105
|
__name: "BaseTextarea",
|
|
76
106
|
props: {
|
|
@@ -78,20 +108,22 @@ const z = /* @__PURE__ */ n({
|
|
|
78
108
|
modelModifiers: {}
|
|
79
109
|
},
|
|
80
110
|
emits: ["update:modelValue"],
|
|
81
|
-
setup(
|
|
82
|
-
const
|
|
83
|
-
return (
|
|
84
|
-
id:
|
|
85
|
-
"onUpdate:modelValue":
|
|
86
|
-
},
|
|
87
|
-
[
|
|
111
|
+
setup(t) {
|
|
112
|
+
const e = m(t, "modelValue"), o = c(), l = p(() => o.id || v());
|
|
113
|
+
return (s, a) => _((u(), d("textarea", i({
|
|
114
|
+
id: l.value,
|
|
115
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => e.value = r)
|
|
116
|
+
}, s.$attrs), null, 16, D)), [
|
|
117
|
+
[I, e.value]
|
|
88
118
|
]);
|
|
89
119
|
}
|
|
90
120
|
});
|
|
91
121
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
122
|
+
T as CButton,
|
|
123
|
+
w as CCheckbox,
|
|
124
|
+
L as CInput,
|
|
125
|
+
z as CLabel,
|
|
126
|
+
E as CRadio,
|
|
127
|
+
j as CSelect,
|
|
128
|
+
q as CTextarea
|
|
97
129
|
};
|
package/dist/charpente.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.Charpente={},n.Vue))})(this,(function(n,e){"use strict";const
|
|
1
|
+
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.Charpente={},n.Vue))})(this,(function(n,e){"use strict";const i=e.defineComponent({inheritAttrs:!1,__name:"BaseButton",props:{as:{default:"button"}},setup(o){return(t,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.as),e.normalizeProps(e.guardReactiveProps(t.$attrs)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16))}}),m=["id","value"],c=e.defineComponent({inheritAttrs:!1,__name:"BaseCheckbox",props:e.mergeModels({value:{}},{modelValue:{type:[Boolean,Array]},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=e.useModel(o,"modelValue"),s=e.useAttrs(),a=e.computed(()=>s.id||e.useId());return(r,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",e.mergeProps({type:"checkbox"},r.$attrs,{"onUpdate:modelValue":l[0]||(l[0]=d=>t.value=d),id:a.value,value:o.value}),null,16,m)),[[e.vModelCheckbox,t.value]])}}),p=["id"],u=e.defineComponent({inheritAttrs:!1,__name:"BaseInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(o){const t=e.useModel(o,"modelValue"),s=e.useAttrs(),a=e.computed(()=>s.id||e.useId());return(r,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",e.mergeProps(r.$attrs,{"onUpdate:modelValue":l[0]||(l[0]=d=>t.value=d),id:a.value}),null,16,p)),[[e.vModelDynamic,t.value]])}}),f=["for"],_=e.defineComponent({inheritAttrs:!1,__name:"BaseLabel",props:{for:{}},setup(o){return(t,s)=>(e.openBlock(),e.createElementBlock("label",e.mergeProps(t.$attrs,{for:o.for}),[e.renderSlot(t.$slots,"default")],16,f))}}),h=["id","value"],B=e.defineComponent({inheritAttrs:!1,__name:"BaseRadio",props:e.mergeModels({value:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=e.useModel(o,"modelValue"),s=e.useAttrs(),a=e.computed(()=>s.id||e.useId());return(r,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",e.mergeProps({type:"radio"},r.$attrs,{"onUpdate:modelValue":l[0]||(l[0]=d=>t.value=d),id:a.value,value:o.value}),null,16,h)),[[e.vModelRadio,t.value]])}}),V=["id"],$=e.defineComponent({inheritAttrs:!1,__name:"BaseSelect",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(o){const t=e.useModel(o,"modelValue"),s=e.useAttrs(),a=e.computed(()=>s.id||e.useId());return(r,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("select",e.mergeProps(r.$attrs,{"onUpdate:modelValue":l[0]||(l[0]=d=>t.value=d),id:a.value}),[e.renderSlot(r.$slots,"default")],16,V)),[[e.vModelSelect,t.value]])}}),C=["id"],k=e.defineComponent({inheritAttrs:!1,__name:"BaseTextarea",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(o){const t=e.useModel(o,"modelValue"),s=e.useAttrs(),a=e.computed(()=>s.id||e.useId());return(r,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("textarea",e.mergeProps({id:a.value,"onUpdate:modelValue":l[0]||(l[0]=d=>t.value=d)},r.$attrs),null,16,C)),[[e.vModelText,t.value]])}});n.CButton=i,n.CCheckbox=c,n.CInput=u,n.CLabel=_,n.CRadio=B,n.CSelect=$,n.CTextarea=k,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
modelValue?: boolean | any[];
|
|
3
2
|
value?: any;
|
|
4
3
|
};
|
|
5
|
-
|
|
4
|
+
type __VLS_PublicProps = {
|
|
5
|
+
modelValue?: boolean | any[];
|
|
6
|
+
} & __VLS_Props;
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
8
|
"update:modelValue": (value: boolean | any[]) => any;
|
|
7
|
-
}, string, import('vue').PublicProps, Readonly<
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
8
10
|
"onUpdate:modelValue"?: ((value: boolean | any[]) => any) | undefined;
|
|
9
|
-
}>, {
|
|
10
|
-
modelValue: boolean | any[];
|
|
11
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
export default _default;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
slots: {
|
|
4
|
-
default?(_: {}): any;
|
|
5
|
-
};
|
|
6
|
-
refs: {};
|
|
7
|
-
rootEl: any;
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
for?: string;
|
|
8
3
|
};
|
|
4
|
+
declare function __VLS_template(): void;
|
|
9
5
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
6
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
7
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
8
|
export default _default;
|
|
13
9
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
value: any;
|
|
3
|
+
};
|
|
4
|
+
type __VLS_PublicProps = {
|
|
5
|
+
modelValue?: any;
|
|
6
|
+
} & __VLS_Props;
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (value: any) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_PublicProps = {
|
|
2
|
+
modelValue?: any;
|
|
3
|
+
};
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: {
|
|
7
|
+
default?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: any;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (value: any) => any;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,4 +2,6 @@ export { default as CButton } from './components/BaseButton';
|
|
|
2
2
|
export { default as CCheckbox } from './components/BaseCheckbox';
|
|
3
3
|
export { default as CInput } from './components/BaseInput';
|
|
4
4
|
export { default as CLabel } from './components/BaseLabel';
|
|
5
|
+
export { default as CRadio } from './components/BaseRadio';
|
|
6
|
+
export { default as CSelect } from './components/BaseSelect';
|
|
5
7
|
export { default as CTextarea } from './components/BaseTextarea';
|