btt-ui 1.0.9 → 1.0.10

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.
@@ -1,10 +1,10 @@
1
- import { defineComponent as a, computed as c, openBlock as n, createElementBlock as p, normalizeClass as d, unref as o, normalizeStyle as r, createBlock as u, createCommentVNode as m, createElementVNode as b, renderSlot as y } from "vue";
1
+ import { defineComponent as a, computed as c, openBlock as n, createElementBlock as p, normalizeClass as u, unref as o, normalizeStyle as r, createElementVNode as s, createBlock as m, createCommentVNode as y, renderSlot as b } from "vue";
2
2
  import { Icon as f } from "../../icon/index.mjs";
3
3
  import { createNamespace as k } from "../../../assets/ts/utils.mjs";
4
4
  import "./style/index.css";
5
- const B = ["disabled"], z = a({
5
+ const B = ["disabled"], h = { style: { height: "1em", overflow: "hidden" } }, z = a({
6
6
  name: "k-button"
7
- }), E = a({
7
+ }), w = a({
8
8
  ...z,
9
9
  props: {
10
10
  type: { default: "default" },
@@ -20,14 +20,14 @@ const B = ["disabled"], z = a({
20
20
  textColor: {}
21
21
  },
22
22
  emits: [""],
23
- setup(s) {
24
- const t = s, { n: l } = k("button"), i = c(() => t.color ? {
23
+ setup(i) {
24
+ const t = i, { n: l } = k("button"), d = c(() => t.color ? {
25
25
  "--k-button-bg-color": t.color,
26
26
  "--k-button-text-color": "var(--k-color-white)",
27
27
  "--k-button-border-color": t.color
28
28
  } : {});
29
29
  return (e, C) => (n(), p("button", {
30
- class: d([
30
+ class: u([
31
31
  o(l)(),
32
32
  e.type && o(l)(`--${e.type}`),
33
33
  e.size && o(l)(`--${e.size}`),
@@ -39,23 +39,25 @@ const B = ["disabled"], z = a({
39
39
  ]),
40
40
  style: r({
41
41
  color: e.color,
42
- ...i.value
42
+ ...d.value
43
43
  }),
44
44
  disabled: e.disabled,
45
45
  type: "button"
46
46
  }, [
47
- e.icon ? (n(), u(o(f), {
48
- key: 0,
49
- name: e.icon
50
- }, null, 8, ["name"])) : m("", !0),
51
- b("span", {
47
+ s("span", h, [
48
+ e.icon ? (n(), m(o(f), {
49
+ key: 0,
50
+ name: e.icon
51
+ }, null, 8, ["name"])) : y("", !0)
52
+ ]),
53
+ s("span", {
52
54
  style: r({ color: e.textColor })
53
55
  }, [
54
- y(e.$slots, "default")
56
+ b(e.$slots, "default")
55
57
  ], 4)
56
58
  ], 14, B));
57
59
  }
58
60
  });
59
61
  export {
60
- E as default
62
+ w as default
61
63
  };
@@ -66,7 +66,7 @@ body {
66
66
  }
67
67
  .k-icon {
68
68
  --color: inherit;
69
- width: 1em;
69
+ height: 1em;
70
70
  display: flex;
71
71
  justify-content: center;
72
72
  position: relative;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../icon/index.js"),i=require("../../../assets/ts/utils.js");require("./style/index.css");const a=["disabled"],u=e.defineComponent({name:"k-button"}),c=e.defineComponent({...u,props:{type:{default:"default"},size:{},plain:{type:Boolean},autofocus:{type:Boolean},round:{type:Boolean},circle:{type:Boolean},text:{type:Boolean},icon:{},color:{},disabled:{type:Boolean},textColor:{}},emits:[""],setup(l){const t=l,{n}=i.createNamespace("button"),s=e.computed(()=>t.color?{"--k-button-bg-color":t.color,"--k-button-text-color":"var(--k-color-white)","--k-button-border-color":t.color}:{});return(o,d)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass([e.unref(n)(),o.type&&e.unref(n)(`--${o.type}`),o.size&&e.unref(n)(`--${o.size}`),o.plain&&"is-plain",o.round&&"is-round",o.circle&&"is-circle",o.disabled&&"is-disabled",o.text&&"is-text"]),style:e.normalizeStyle({color:o.color,...s.value}),disabled:o.disabled,type:"button"},[o.icon?(e.openBlock(),e.createBlock(e.unref(r.Icon),{key:0,name:o.icon},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",{style:e.normalizeStyle({color:o.textColor})},[e.renderSlot(o.$slots,"default")],4)],14,a))}});exports.default=c;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../icon/index.js"),i=require("../../../assets/ts/utils.js");require("./style/index.css");const a=["disabled"],u={style:{height:"1em",overflow:"hidden"}},c=e.defineComponent({name:"k-button"}),d=e.defineComponent({...c,props:{type:{default:"default"},size:{},plain:{type:Boolean},autofocus:{type:Boolean},round:{type:Boolean},circle:{type:Boolean},text:{type:Boolean},icon:{},color:{},disabled:{type:Boolean},textColor:{}},emits:[""],setup(l){const t=l,{n}=i.createNamespace("button"),s=e.computed(()=>t.color?{"--k-button-bg-color":t.color,"--k-button-text-color":"var(--k-color-white)","--k-button-border-color":t.color}:{});return(o,p)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass([e.unref(n)(),o.type&&e.unref(n)(`--${o.type}`),o.size&&e.unref(n)(`--${o.size}`),o.plain&&"is-plain",o.round&&"is-round",o.circle&&"is-circle",o.disabled&&"is-disabled",o.text&&"is-text"]),style:e.normalizeStyle({color:o.color,...s.value}),disabled:o.disabled,type:"button"},[e.createElementVNode("span",u,[o.icon?(e.openBlock(),e.createBlock(e.unref(r.Icon),{key:0,name:o.icon},null,8,["name"])):e.createCommentVNode("",!0)]),e.createElementVNode("span",{style:e.normalizeStyle({color:o.textColor})},[e.renderSlot(o.$slots,"default")],4)],14,a))}});exports.default=d;
@@ -66,7 +66,7 @@ body {
66
66
  }
67
67
  .k-icon {
68
68
  --color: inherit;
69
- width: 1em;
69
+ height: 1em;
70
70
  display: flex;
71
71
  justify-content: center;
72
72
  position: relative;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btt-ui",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "files": [