z-vue-design 0.0.3 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "z-vue-design",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "main": "./z-vue-design/z-vue-design.umd.js",
5
5
  "module": "./z-vue-design/z-vue-design.es.js",
6
6
  "exports": {
@@ -9,7 +9,9 @@
9
9
  "require": "./z-vue-design/z-vue-design.umd.js"
10
10
  }
11
11
  },
12
- "files": ["z-vue-design"],
12
+ "files": [
13
+ "z-vue-design"
14
+ ],
13
15
  "scripts": {
14
16
  "dev": "vite",
15
17
  "start": "vite",
@@ -20,6 +22,7 @@
20
22
  "@ant-design/icons-vue": "^7.0.1",
21
23
  "ant-design-vue": "^4.2.6",
22
24
  "axios": "^1.8.0",
25
+ "babel-plugin-import": "^1.13.8",
23
26
  "node-sass": "^9.0.0",
24
27
  "pinia": "^3.0.1",
25
28
  "sass": "^1.86.0",
@@ -1 +1 @@
1
- .z-button[data-v-eaabf67d]{display:inline-block;padding:.5rem 1rem;font-size:1rem;color:#fff;background-color:#007bff;border:none;border-radius:.25rem;cursor:pointer;transition:background-color .3s ease}.z-button[data-v-eaabf67d]:hover{background-color:#0056b3;color:#fff}.z-button[data-v-eaabf67d]:disabled{background-color:#6c757d;cursor:not-allowed}
1
+ :root[z-theme=bright][data-v-4ed7f0d0]{--main-bg: rgb(17, 18, 23)}:root[z-theme=dark][data-v-4ed7f0d0]{--main-bg: skyblue}.z-button[data-v-4ed7f0d0]{display:inline-block;padding:.5rem 1rem;font-size:1rem;border:none;background-color:var(--main-bg);border-radius:.25rem;cursor:pointer;transition:all .3s ease}.z-button[data-v-4ed7f0d0]:disabled{background-color:#6c757d;cursor:not-allowed}
@@ -1,48 +1,55 @@
1
- import { resolveComponent as u, createBlock as c, openBlock as r, withCtx as d, renderSlot as p } from "vue";
2
- import { Button as l } from "ant-design-vue";
3
- const f = (e, t) => {
4
- const n = e.__vccOpts || e;
5
- for (const [o, a] of t)
6
- n[o] = a;
1
+ import { resolveComponent as r, createBlock as u, openBlock as p, unref as d, withCtx as i, renderSlot as l } from "vue";
2
+ import { Button as f } from "ant-design-vue";
3
+ const m = (t, e) => {
4
+ const n = t.__vccOpts || t;
5
+ for (const [o, s] of e)
6
+ n[o] = s;
7
7
  return n;
8
8
  }, _ = {
9
9
  name: "ZButton",
10
10
  components: {
11
- AButton: l
11
+ AButton: f
12
12
  }
13
- }, i = /* @__PURE__ */ Object.assign(_, {
13
+ }, b = /* @__PURE__ */ Object.assign(_, {
14
14
  props: {
15
15
  type: {
16
16
  type: String,
17
- default: "button"
17
+ default: "primary"
18
18
  },
19
19
  disabled: {
20
20
  type: Boolean,
21
21
  default: !1
22
22
  }
23
23
  },
24
- setup(e) {
25
- return (t, n) => {
26
- const o = u("a-button");
27
- return r(), c(o, {
24
+ setup(t) {
25
+ const e = t, { type: n, disabled: o } = e;
26
+ return (s, h) => {
27
+ const c = r("a-button");
28
+ return p(), u(c, {
28
29
  class: "z-button",
29
- type: "default"
30
+ type: d(n),
31
+ disabled: d(o)
30
32
  }, {
31
- default: d(() => [
32
- p(t.$slots, "default", {}, void 0, !0)
33
+ default: i(() => [
34
+ l(s.$slots, "default", {}, void 0, !0)
33
35
  ]),
34
36
  _: 3
35
- });
37
+ }, 8, ["type", "disabled"]);
36
38
  };
37
39
  }
38
- }), m = /* @__PURE__ */ f(i, [["__scopeId", "data-v-eaabf67d"]]), b = [m], s = function(e) {
39
- s.installed || b.map((t) => e.component(t.name, t));
40
+ }), y = /* @__PURE__ */ m(b, [["__scopeId", "data-v-4ed7f0d0"]]), w = [y], a = function(t) {
41
+ a.installed || w.map((e) => t.component(e.name, e));
40
42
  };
41
- typeof window < "u" && window.Vue && s(window.Vue);
42
- const y = {
43
- install: s
43
+ typeof window < "u" && window.Vue && a(window.Vue);
44
+ function B(t = "dark") {
45
+ document.documentElement.setAttribute("Z-theme", t);
46
+ }
47
+ const x = {
48
+ install: a,
49
+ setTheme: B
44
50
  };
45
51
  export {
46
- m as ZButton,
47
- y as default
52
+ y as ZButton,
53
+ x as default,
54
+ B as setTheme
48
55
  };
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("ant-design-vue")):typeof define=="function"&&define.amd?define(["exports","vue","ant-design-vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.ZVueDesign={},e.Vue,e.antDesignVue))})(this,function(e,t,a){"use strict";const f=(o,n)=>{const s=o.__vccOpts||o;for(const[i,l]of n)s[i]=l;return s},c={name:"ZButton",components:{AButton:a.Button}},d=f(Object.assign(c,{props:{type:{type:String,default:"button"},disabled:{type:Boolean,default:!1}},setup(o){return(n,s)=>{const i=t.resolveComponent("a-button");return t.openBlock(),t.createBlock(i,{class:"z-button",type:"default"},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3})}}}),[["__scopeId","data-v-eaabf67d"]]),r=[d],u=function(o){u.installed||r.map(n=>o.component(n.name,n))};typeof window<"u"&&window.Vue&&u(window.Vue);const p={install:u};e.ZButton=d,e.default=p,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("ant-design-vue")):typeof define=="function"&&define.amd?define(["exports","vue","ant-design-vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.ZVueDesign={},t.Vue,t.antDesignVue))})(this,function(t,e,f){"use strict";const r=(n,o)=>{const s=n.__vccOpts||n;for(const[d,i]of o)s[d]=i;return s},l={name:"ZButton",components:{AButton:f.Button}},c=r(Object.assign(l,{props:{type:{type:String,default:"primary"},disabled:{type:Boolean,default:!1}},setup(n){const o=n,{type:s,disabled:d}=o;return(i,b)=>{const m=e.resolveComponent("a-button");return e.openBlock(),e.createBlock(m,{class:"z-button",type:e.unref(s),disabled:e.unref(d)},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default",{},void 0,!0)]),_:3},8,["type","disabled"])}}}),[["__scopeId","data-v-4ed7f0d0"]]),p=[c],u=function(n){u.installed||p.map(o=>n.component(o.name,o))};typeof window<"u"&&window.Vue&&u(window.Vue);function a(n="dark"){document.documentElement.setAttribute("Z-theme",n)}const _={install:u,setTheme:a};t.ZButton=c,t.default=_,t.setTheme=a,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});