treqit-ui-library 1.4.1 → 1.4.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.
@@ -1,7 +1,7 @@
1
1
  import { computed as r, createElementBlock as o, openBlock as d, normalizeClass as s, createCommentVNode as u, createElementVNode as i, renderSlot as c } from "vue";
2
- const m = (t, e) => {
3
- const l = t.__vccOpts || t;
4
- for (const [a, n] of e)
2
+ const m = (e, t) => {
3
+ const l = e.__vccOpts || e;
4
+ for (const [a, n] of t)
5
5
  l[a] = n;
6
6
  return l;
7
7
  }, f = ["type", "disabled"], p = {
@@ -14,13 +14,13 @@ const m = (t, e) => {
14
14
  type: String,
15
15
  default: "primary",
16
16
  // 'primary', 'secondary', 'destructive'
17
- validator: (t) => ["primary", "secondary", "destructive", "flat", "elevated", "text", "outlined", "outlined-primary", "outlined-secondary", "rounded"].includes(t)
17
+ validator: (e) => ["primary", "secondary", "destructive", "flat", "elevated", "text", "outlined", "outlined-primary", "outlined-secondary", "rounded"].includes(e)
18
18
  },
19
19
  size: {
20
20
  type: String,
21
21
  default: "medium",
22
22
  // 'small', 'medium', 'large'
23
- validator: (t) => ["sm", "small", "medium", "large", "x-large"].includes(t)
23
+ validator: (e) => ["sm", "small", "medium", "large", "x-large"].includes(e)
24
24
  },
25
25
  type: {
26
26
  type: String,
@@ -40,37 +40,36 @@ const m = (t, e) => {
40
40
  }
41
41
  },
42
42
  emits: ["click"],
43
- setup(t) {
44
- const e = t, l = r(() => [
43
+ setup(e) {
44
+ const t = e, l = r(() => [
45
45
  "btn",
46
- `btn--${e.variant}`,
47
- `btn--${e.size === "sm" ? "small" : e.size}`,
46
+ `btn--${t.variant}`,
47
+ `btn--${t.size === "sm" ? "small" : t.size}`,
48
48
  {
49
- "btn--loading": e.loading,
50
- "btn--full": e.full
49
+ "btn--loading": t.loading,
50
+ "btn--full": t.full
51
51
  }
52
52
  ]);
53
53
  return (a, n) => (d(), o("button", {
54
- type: t.type,
54
+ type: e.type,
55
55
  class: s(l.value),
56
- disabled: t.disabled || t.loading,
57
- onClick: n[0] || (n[0] = (g) => a.$emit("click"))
56
+ disabled: e.disabled || e.loading,
57
+ onClick: n[0] || (n[0] = (v) => a.$emit("click"))
58
58
  }, [
59
- t.loading ? (d(), o("div", p, [...n[1] || (n[1] = [
59
+ e.loading ? (d(), o("div", p, [...n[1] || (n[1] = [
60
60
  i("div", { class: "simple-spinner" }, null, -1)
61
61
  ])])) : u("", !0),
62
62
  i("span", {
63
- class: s(["btn-content", { "content-hidden": t.loading }])
63
+ class: s(["btn-content", { "content-hidden": e.loading }])
64
64
  }, [
65
65
  c(a.$slots, "default", {}, void 0, !0)
66
66
  ], 2)
67
67
  ], 10, f));
68
68
  }
69
- }, b = /* @__PURE__ */ m(y, [["__scopeId", "data-v-8db92d47"]]), v = (t) => {
70
- t.component("Button", b);
71
- }, k = { install: v };
69
+ }, b = /* @__PURE__ */ m(y, [["__scopeId", "data-v-8db92d47"]]), B = (e) => {
70
+ e.component("Button", b);
71
+ };
72
72
  export {
73
73
  b as Button,
74
- k as default,
75
- v as install
74
+ B as TreqitUiLibrary
76
75
  };
@@ -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.TreqitUiLibrary={},n.Vue))})(this,(function(n,e){"use strict";const r=(t,l)=>{const i=t.__vccOpts||t;for(const[a,o]of l)i[a]=o;return i},u=["type","disabled"],c={key:0,class:"btn-loader"},d=r({__name:"Button",props:{variant:{type:String,default:"primary",validator:t=>["primary","secondary","destructive","flat","elevated","text","outlined","outlined-primary","outlined-secondary","rounded"].includes(t)},size:{type:String,default:"medium",validator:t=>["sm","small","medium","large","x-large"].includes(t)},type:{type:String,default:"button"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},full:{type:Boolean,default:!1}},emits:["click"],setup(t){const l=t,i=e.computed(()=>["btn",`btn--${l.variant}`,`btn--${l.size==="sm"?"small":l.size}`,{"btn--loading":l.loading,"btn--full":l.full}]);return(a,o)=>(e.openBlock(),e.createElementBlock("button",{type:t.type,class:e.normalizeClass(i.value),disabled:t.disabled||t.loading,onClick:o[0]||(o[0]=p=>a.$emit("click"))},[t.loading?(e.openBlock(),e.createElementBlock("div",c,[...o[1]||(o[1]=[e.createElementVNode("div",{class:"simple-spinner"},null,-1)])])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["btn-content",{"content-hidden":t.loading}])},[e.renderSlot(a.$slots,"default",{},void 0,!0)],2)],10,u))}},[["__scopeId","data-v-8db92d47"]]),s=t=>{t.component("Button",d)},f={install:s};n.Button=d,n.default=f,n.install=s,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
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.TreqitUiLibrary={},n.Vue))})(this,(function(n,e){"use strict";const s=(t,l)=>{const o=t.__vccOpts||t;for(const[a,i]of l)o[a]=i;return o},r=["type","disabled"],c={key:0,class:"btn-loader"},d=s({__name:"Button",props:{variant:{type:String,default:"primary",validator:t=>["primary","secondary","destructive","flat","elevated","text","outlined","outlined-primary","outlined-secondary","rounded"].includes(t)},size:{type:String,default:"medium",validator:t=>["sm","small","medium","large","x-large"].includes(t)},type:{type:String,default:"button"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},full:{type:Boolean,default:!1}},emits:["click"],setup(t){const l=t,o=e.computed(()=>["btn",`btn--${l.variant}`,`btn--${l.size==="sm"?"small":l.size}`,{"btn--loading":l.loading,"btn--full":l.full}]);return(a,i)=>(e.openBlock(),e.createElementBlock("button",{type:t.type,class:e.normalizeClass(o.value),disabled:t.disabled||t.loading,onClick:i[0]||(i[0]=m=>a.$emit("click"))},[t.loading?(e.openBlock(),e.createElementBlock("div",c,[...i[1]||(i[1]=[e.createElementVNode("div",{class:"simple-spinner"},null,-1)])])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["btn-content",{"content-hidden":t.loading}])},[e.renderSlot(a.$slots,"default",{},void 0,!0)],2)],10,r))}},[["__scopeId","data-v-8db92d47"]]),u=t=>{t.component("Button",d)};n.Button=d,n.TreqitUiLibrary=u,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "name": "treqit-ui-library",
16
16
  "private": false,
17
- "version": "1.4.1",
17
+ "version": "1.4.3",
18
18
  "type": "module",
19
19
  "types": "./dist/index.d.ts",
20
20
  "scripts": {