@can2421/ui-components 1.0.21 → 1.0.23
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 -0
- package/dist/styles/index.css +20 -0
- package/dist/styles/index.scss +1 -0
- package/dist/ui-components.mjs +27 -22
- package/dist/ui-components.umd.js +2 -1
- package/package.json +1 -1
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.c-button[data-v-74b530d6]{display:inline-block;padding:.5em 1em;outline:unset;border:unset;border-radius:4px;background:#fff;cursor:pointer}.c-button[data-v-74b530d6]:active{box-shadow:inset 0 0 0 1px #eaeaea}.c-button--primary[data-v-74b530d6]{background:#409eff;color:#fff}.c-button--disabled[data-v-74b530d6]{cursor:not-allowed;opacity:.5}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.c-button {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
padding: 0.5em 1em;
|
|
4
|
+
outline: unset;
|
|
5
|
+
border: unset;
|
|
6
|
+
border-radius: 4px;
|
|
7
|
+
background: #fff;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
}
|
|
10
|
+
.c-button:active {
|
|
11
|
+
box-shadow: inset 0 0 0 1px #eaeaea;
|
|
12
|
+
}
|
|
13
|
+
.c-button--primary {
|
|
14
|
+
background: #409eff;
|
|
15
|
+
color: #fff;
|
|
16
|
+
}
|
|
17
|
+
.c-button--disabled {
|
|
18
|
+
cursor: not-allowed;
|
|
19
|
+
opacity: 0.5;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use './button.scss';
|
package/dist/ui-components.mjs
CHANGED
|
@@ -1,42 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
}, t),
|
|
1
|
+
import { defineComponent as s, createElementBlock as l, openBlock as a, normalizeClass as i, renderSlot as p } from "vue";
|
|
2
|
+
const u = (t) => (t.install = (o) => {
|
|
3
|
+
const n = t.name || "UnknownComponent";
|
|
4
|
+
o.component(n, t);
|
|
5
|
+
}, t), r = {
|
|
6
6
|
type: {
|
|
7
7
|
type: String,
|
|
8
8
|
default: "primary"
|
|
9
9
|
},
|
|
10
10
|
size: String
|
|
11
|
-
},
|
|
11
|
+
}, _ = /* @__PURE__ */ s({
|
|
12
12
|
name: "CButton",
|
|
13
13
|
__name: "button",
|
|
14
|
-
props:
|
|
14
|
+
props: r,
|
|
15
15
|
setup(t) {
|
|
16
|
-
const
|
|
17
|
-
function
|
|
16
|
+
const o = t;
|
|
17
|
+
function n() {
|
|
18
18
|
console.log("click");
|
|
19
19
|
}
|
|
20
|
-
return (
|
|
21
|
-
class:
|
|
22
|
-
onClick:
|
|
20
|
+
return (e, c) => (a(), l("div", {
|
|
21
|
+
class: i(["c-button", [`c-button--${o.type}`]]),
|
|
22
|
+
onClick: n
|
|
23
23
|
}, [
|
|
24
|
-
|
|
24
|
+
p(e.$slots, "default", {}, void 0, !0)
|
|
25
25
|
], 2));
|
|
26
26
|
}
|
|
27
|
-
}),
|
|
27
|
+
}), d = (t, o) => {
|
|
28
|
+
const n = t.__vccOpts || t;
|
|
29
|
+
for (const [e, c] of o)
|
|
30
|
+
n[e] = c;
|
|
31
|
+
return n;
|
|
32
|
+
}, m = /* @__PURE__ */ d(_, [["__scopeId", "data-v-74b530d6"]]), f = u(m), b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
28
33
|
__proto__: null,
|
|
29
|
-
CButton:
|
|
30
|
-
buttonProps:
|
|
31
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
34
|
+
CButton: f,
|
|
35
|
+
buttonProps: r
|
|
36
|
+
}, Symbol.toStringTag, { value: "Module" })), y = {
|
|
32
37
|
install(t) {
|
|
33
|
-
Object.entries(
|
|
34
|
-
t.component(
|
|
38
|
+
Object.entries(b).forEach(([o, n]) => {
|
|
39
|
+
t.component(o, n);
|
|
35
40
|
});
|
|
36
41
|
}
|
|
37
42
|
};
|
|
38
43
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
f as CButton,
|
|
45
|
+
r as buttonProps,
|
|
46
|
+
y as default
|
|
42
47
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
(function(e,
|
|
1
|
+
(function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e["can-lib"]={},e.Vue))})(this,(function(e,n){"use strict";var s=document.createElement("style");s.textContent=`.c-button[data-v-74b530d6]{display:inline-block;padding:.5em 1em;outline:unset;border:unset;border-radius:4px;background:#fff;cursor:pointer}.c-button[data-v-74b530d6]:active{box-shadow:inset 0 0 0 1px #eaeaea}.c-button--primary[data-v-74b530d6]{background:#409eff;color:#fff}.c-button--disabled[data-v-74b530d6]{cursor:not-allowed;opacity:.5}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(s);const u=t=>(t.install=c=>{const o=t.name||"UnknownComponent";c.component(o,t)},t),a={type:{type:String,default:"primary"},size:String},i=u(((t,c)=>{const o=t.__vccOpts||t;for(const[r,d]of c)o[r]=d;return o})(n.defineComponent({name:"CButton",__name:"button",props:a,setup(t){const c=t;function o(){console.log("click")}return(r,d)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["c-button",[`c-button--${c.type}`]]),onClick:o},[n.renderSlot(r.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-74b530d6"]])),l=Object.freeze(Object.defineProperty({__proto__:null,CButton:i,buttonProps:a},Symbol.toStringTag,{value:"Module"})),p={install(t){Object.entries(l).forEach(([c,o])=>{t.component(c,o)})}};e.CButton=i,e.buttonProps=a,e.default=p,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|