treqit-ui-library 1.4.3 → 1.4.4

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