@can2421/ui-components 1.0.26 → 1.0.27
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/dist/index.css +1 -1
- package/dist/packages/components/src/button/button.d.ts +9 -0
- package/dist/packages/components/src/button/button.types.d.ts +4 -0
- package/dist/packages/components/src/button/index.d.ts +15 -0
- package/dist/packages/components/src/types/baseProps.d.ts +6 -0
- package/dist/ui-components.mjs +33 -27
- package/dist/ui-components.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.c-button[data-v-
|
|
1
|
+
.c-button[data-v-e76271b0]{display:inline-block;padding:.5em 1em;outline:unset;border:unset;border-radius:4px;background:#fff;cursor:pointer}.c-button[data-v-e76271b0]:active{box-shadow:inset 0 0 0 1px #eaeaea}.c-button--primary[data-v-e76271b0]{background:#409eff;color:#fff}.c-button--disabled[data-v-e76271b0]{cursor:not-allowed;opacity:.5}
|
|
@@ -13,14 +13,23 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
13
13
|
readonly default: "primary";
|
|
14
14
|
};
|
|
15
15
|
readonly size: StringConstructor;
|
|
16
|
+
readonly namespace: {
|
|
17
|
+
readonly type: StringConstructor;
|
|
18
|
+
readonly default: "c";
|
|
19
|
+
};
|
|
16
20
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
21
|
readonly type: {
|
|
18
22
|
readonly type: import('vue').PropType<import('./button.types').ButtonType>;
|
|
19
23
|
readonly default: "primary";
|
|
20
24
|
};
|
|
21
25
|
readonly size: StringConstructor;
|
|
26
|
+
readonly namespace: {
|
|
27
|
+
readonly type: StringConstructor;
|
|
28
|
+
readonly default: "c";
|
|
29
|
+
};
|
|
22
30
|
}>> & Readonly<{}>, {
|
|
23
31
|
readonly type: import('./button.types').ButtonType;
|
|
32
|
+
readonly namespace: string;
|
|
24
33
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
25
34
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
35
|
export default _default;
|
|
@@ -6,5 +6,9 @@ export declare const buttonProps: {
|
|
|
6
6
|
readonly default: "primary";
|
|
7
7
|
};
|
|
8
8
|
readonly size: StringConstructor;
|
|
9
|
+
readonly namespace: {
|
|
10
|
+
readonly type: StringConstructor;
|
|
11
|
+
readonly default: "c";
|
|
12
|
+
};
|
|
9
13
|
};
|
|
10
14
|
export type ButtonProps = ExtractPropTypes<typeof buttonProps>;
|
|
@@ -5,8 +5,13 @@ declare const CButton: import('../../../utils/install').SFCWithInstall<{
|
|
|
5
5
|
readonly default: "primary";
|
|
6
6
|
};
|
|
7
7
|
readonly size: StringConstructor;
|
|
8
|
+
readonly namespace: {
|
|
9
|
+
readonly type: StringConstructor;
|
|
10
|
+
readonly default: "c";
|
|
11
|
+
};
|
|
8
12
|
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
9
13
|
readonly type: import('./button.types').ButtonType;
|
|
14
|
+
readonly namespace: string;
|
|
10
15
|
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
11
16
|
P: {};
|
|
12
17
|
B: {};
|
|
@@ -20,8 +25,13 @@ declare const CButton: import('../../../utils/install').SFCWithInstall<{
|
|
|
20
25
|
readonly default: "primary";
|
|
21
26
|
};
|
|
22
27
|
readonly size: StringConstructor;
|
|
28
|
+
readonly namespace: {
|
|
29
|
+
readonly type: StringConstructor;
|
|
30
|
+
readonly default: "c";
|
|
31
|
+
};
|
|
23
32
|
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
24
33
|
readonly type: import('./button.types').ButtonType;
|
|
34
|
+
readonly namespace: string;
|
|
25
35
|
}>;
|
|
26
36
|
__isFragment?: never;
|
|
27
37
|
__isTeleport?: never;
|
|
@@ -32,8 +42,13 @@ declare const CButton: import('../../../utils/install').SFCWithInstall<{
|
|
|
32
42
|
readonly default: "primary";
|
|
33
43
|
};
|
|
34
44
|
readonly size: StringConstructor;
|
|
45
|
+
readonly namespace: {
|
|
46
|
+
readonly type: StringConstructor;
|
|
47
|
+
readonly default: "c";
|
|
48
|
+
};
|
|
35
49
|
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
36
50
|
readonly type: import('./button.types').ButtonType;
|
|
51
|
+
readonly namespace: string;
|
|
37
52
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
38
53
|
$slots: {
|
|
39
54
|
default?(_: {}): any;
|
package/dist/ui-components.mjs
CHANGED
|
@@ -1,47 +1,53 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const u = (t) => (t.install = (
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
}, t),
|
|
1
|
+
import { defineComponent as r, createElementBlock as a, openBlock as l, normalizeClass as p, renderSlot as i } from "vue";
|
|
2
|
+
const u = (t) => (t.install = (n) => {
|
|
3
|
+
const e = t.name || "UnknownComponent";
|
|
4
|
+
n.component(e, t);
|
|
5
|
+
}, t), m = {
|
|
6
|
+
namespace: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "c"
|
|
9
|
+
}
|
|
10
|
+
}, c = {
|
|
11
|
+
...m,
|
|
6
12
|
type: {
|
|
7
13
|
type: String,
|
|
8
14
|
default: "primary"
|
|
9
15
|
},
|
|
10
16
|
size: String
|
|
11
|
-
},
|
|
17
|
+
}, d = /* @__PURE__ */ r({
|
|
12
18
|
name: "CButton",
|
|
13
19
|
__name: "button",
|
|
14
|
-
props:
|
|
20
|
+
props: c,
|
|
15
21
|
setup(t) {
|
|
16
|
-
const
|
|
17
|
-
function
|
|
22
|
+
const n = t;
|
|
23
|
+
function e() {
|
|
18
24
|
console.log("click");
|
|
19
25
|
}
|
|
20
|
-
return (
|
|
21
|
-
class:
|
|
22
|
-
onClick:
|
|
26
|
+
return (o, s) => (l(), a("div", {
|
|
27
|
+
class: p([`${o.namespace}-button`, `${o.namespace}-button--${n.type}`]),
|
|
28
|
+
onClick: e
|
|
23
29
|
}, [
|
|
24
|
-
|
|
30
|
+
i(o.$slots, "default", {}, void 0, !0)
|
|
25
31
|
], 2));
|
|
26
32
|
}
|
|
27
|
-
}),
|
|
28
|
-
const
|
|
29
|
-
for (const [
|
|
30
|
-
|
|
31
|
-
return
|
|
32
|
-
},
|
|
33
|
+
}), f = (t, n) => {
|
|
34
|
+
const e = t.__vccOpts || t;
|
|
35
|
+
for (const [o, s] of n)
|
|
36
|
+
e[o] = s;
|
|
37
|
+
return e;
|
|
38
|
+
}, _ = /* @__PURE__ */ f(d, [["__scopeId", "data-v-e76271b0"]]), b = u(_), y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
33
39
|
__proto__: null,
|
|
34
|
-
CButton:
|
|
35
|
-
buttonProps:
|
|
36
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
40
|
+
CButton: b,
|
|
41
|
+
buttonProps: c
|
|
42
|
+
}, Symbol.toStringTag, { value: "Module" })), k = {
|
|
37
43
|
install(t) {
|
|
38
|
-
Object.entries(
|
|
39
|
-
t.component(
|
|
44
|
+
Object.entries(y).forEach(([n, e]) => {
|
|
45
|
+
t.component(n, e);
|
|
40
46
|
});
|
|
41
47
|
}
|
|
42
48
|
};
|
|
43
49
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
b as CButton,
|
|
51
|
+
c as buttonProps,
|
|
52
|
+
k as default
|
|
47
53
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(
|
|
1
|
+
(function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t["can-lib"]={},t.Vue))})(this,(function(t,n){"use strict";var r=document.createElement("style");r.textContent=`.c-button[data-v-e76271b0]{display:inline-block;padding:.5em 1em;outline:unset;border:unset;border-radius:4px;background:#fff;cursor:pointer}.c-button[data-v-e76271b0]:active{box-shadow:inset 0 0 0 1px #eaeaea}.c-button--primary[data-v-e76271b0]{background:#409eff;color:#fff}.c-button--disabled[data-v-e76271b0]{cursor:not-allowed;opacity:.5}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(r);const l=e=>(e.install=a=>{const o=e.name||"UnknownComponent";a.component(o,e)},e),c={...{namespace:{type:String,default:"c"}},type:{type:String,default:"primary"},size:String},i=l(((e,a)=>{const o=e.__vccOpts||e;for(const[s,u]of a)o[s]=u;return o})(n.defineComponent({name:"CButton",__name:"button",props:c,setup(e){const a=e;function o(){console.log("click")}return(s,u)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([`${s.namespace}-button`,`${s.namespace}-button--${a.type}`]),onClick:o},[n.renderSlot(s.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-e76271b0"]])),d=Object.freeze(Object.defineProperty({__proto__:null,CButton:i,buttonProps:c},Symbol.toStringTag,{value:"Module"})),p={install(e){Object.entries(d).forEach(([a,o])=>{e.component(a,o)})}};t.CButton=i,t.buttonProps=c,t.default=p,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|