treqit-ui-library 1.0.0
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/README.md +5 -0
- package/dist/ui-library.css +1 -0
- package/dist/ui-library.js +77 -0
- package/dist/ui-library.umd.cjs +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +28 -0
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Vue 3 + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
|
+
|
|
5
|
+
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.btn[data-v-8db92d47]{position:relative;display:inline-flex;align-items:center;justify-content:center;border:none;font-weight:700;cursor:pointer;transition:background-color .2s ease,color .2s ease,box-shadow .2s ease;padding:.5rem 1rem;font-size:1rem;min-width:80px;overflow:hidden}.btn[data-v-8db92d47]:disabled{cursor:not-allowed}.btn--full[data-v-8db92d47]{width:100%}.btn-loader[data-v-8db92d47]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center}.simple-spinner[data-v-8db92d47]{border:6px solid currentColor;border-top-color:transparent;border-radius:50%;width:32px;height:32px;animation:spin-8db92d47 .8s linear infinite;opacity:.7}@keyframes spin-8db92d47{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.btn-content.content-hidden[data-v-8db92d47]{visibility:hidden;opacity:0}.btn--x-large[data-v-8db92d47]{scrollbar-width:1.125rem;height:60px;font-size:1.35rem;min-width:92px;padding:0 24px;border-radius:12px}.btn--small[data-v-8db92d47]{padding:.25rem .75rem;font-size:.875rem;border-radius:5px!important}.btn--medium[data-v-8db92d47]{padding:.5rem 1rem;font-size:1rem;border-radius:8px!important}.btn--large[data-v-8db92d47]{padding:.75rem 1.5rem;font-size:1.125rem;border-radius:8px!important}.btn--primary[data-v-8db92d47]{background-color:var(--btn-primary-bg);color:#fff;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a}.btn--primary[data-v-8db92d47]:not(:disabled):hover{background-color:var(--btn-primary-hover-bg);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.btn--secondary[data-v-8db92d47]{background-color:var(--btn-secondary-bg);color:#1a202c;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;border:2px solid var(--secondary-color, #3C464D)}.btn--secondary[data-v-8db92d47]:not(:disabled):hover{background-color:var(--btn-secondary-hover-bg);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.btn--destructive[data-v-8db92d47]{background-color:#ef4444;color:#fff;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a}.btn--destructive[data-v-8db92d47]:not(:disabled):hover{background-color:#dc2626}.btn--outlined[data-v-8db92d47]{background-color:transparent;color:var(--btn-secondary-bg);border:2px solid var(--btn-secondary-bg);box-shadow:none}.btn--outlined[data-v-8db92d47]:not(:disabled):hover{background-color:var(--btn-primary-bg);color:#fff}.btn--outlined-primary[data-v-8db92d47]{background-color:transparent;color:var(--btn-primary-bg);border:2px solid var(--btn-primary-bg);box-shadow:none}.btn--outlined-primary[data-v-8db92d47]:not(:disabled):hover{background-color:var(--btn-primary-bg);color:#fff}.btn--outlined-secondary[data-v-8db92d47]{background-color:#fff;color:var(--secondary-color, #3C464D);border:2px solid var(--secondary-color, #3C464D);box-shadow:none}.btn--outlined-secondary[data-v-8db92d47]:not(:disabled):hover{background-color:var(--secondary-color, #3C464D);color:#fff;border-color:#fff}.btn--elevated[data-v-8db92d47]{background-color:var(--btn-primary-bg);color:#fff;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.btn--elevated[data-v-8db92d47]:not(:disabled):hover{background-color:var(--btn-primary-hover-bg);box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a}.btn--flat[data-v-8db92d47]{background-color:#fff;color:var(--btn-primary-bg);box-shadow:none}.btn--flat[data-v-8db92d47]:not(:disabled):hover{background-color:var(--btn-primary-hover-bg);color:#fff}.btn--text[data-v-8db92d47]{background-color:#fff;color:var(--btn-primary-bg);box-shadow:none}.btn--text[data-v-8db92d47]:not(:disabled):hover{background-color:#f0f0f0}.btn--rounded[data-v-8db92d47]{background-color:transparent;color:var(--secondary-color, #3C464D);border:2px solid var(--secondary-color, #3C464D);box-shadow:none;border-radius:50%!important;padding:.5rem;min-width:auto}@media screen and (max-width:768px){.btn--small[data-v-8db92d47]{padding:.2rem .6rem;font-size:.8rem}.btn--medium[data-v-8db92d47]{padding:.4rem .8rem;font-size:.9rem}.btn--large[data-v-8db92d47]{padding:.6rem 1.2rem;font-size:1rem}.btn--rounded[data-v-8db92d47]{padding:.3rem;font-size:.8rem;max-width:30px;max-height:30px}}
|
|
@@ -0,0 +1,77 @@
|
|
|
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)
|
|
5
|
+
l[a] = n;
|
|
6
|
+
return l;
|
|
7
|
+
}, f = ["type", "disabled"], p = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "btn-loader"
|
|
10
|
+
}, y = {
|
|
11
|
+
__name: "Button",
|
|
12
|
+
props: {
|
|
13
|
+
variant: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "primary",
|
|
16
|
+
// 'primary', 'secondary', 'destructive'
|
|
17
|
+
validator: (t) => ["primary", "secondary", "destructive", "flat", "elevated", "text", "outlined", "outlined-primary", "outlined-secondary", "rounded"].includes(t)
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "medium",
|
|
22
|
+
// 'small', 'medium', 'large'
|
|
23
|
+
validator: (t) => ["sm", "small", "medium", "large", "x-large"].includes(t)
|
|
24
|
+
},
|
|
25
|
+
type: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "button"
|
|
28
|
+
},
|
|
29
|
+
disabled: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
loading: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !1
|
|
36
|
+
},
|
|
37
|
+
full: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !1
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
emits: ["click"],
|
|
43
|
+
setup(t) {
|
|
44
|
+
const e = t, l = r(() => [
|
|
45
|
+
"btn",
|
|
46
|
+
`btn--${e.variant}`,
|
|
47
|
+
`btn--${e.size === "sm" ? "small" : e.size}`,
|
|
48
|
+
{
|
|
49
|
+
"btn--loading": e.loading,
|
|
50
|
+
"btn--full": e.full
|
|
51
|
+
}
|
|
52
|
+
]);
|
|
53
|
+
return (a, n) => (d(), o("button", {
|
|
54
|
+
type: t.type,
|
|
55
|
+
class: s(l.value),
|
|
56
|
+
disabled: t.disabled || t.loading,
|
|
57
|
+
onClick: n[0] || (n[0] = (v) => a.$emit("click"))
|
|
58
|
+
}, [
|
|
59
|
+
t.loading ? (d(), o("div", p, [...n[1] || (n[1] = [
|
|
60
|
+
i("div", { class: "simple-spinner" }, null, -1)
|
|
61
|
+
])])) : u("", !0),
|
|
62
|
+
i("span", {
|
|
63
|
+
class: s(["btn-content", { "content-hidden": t.loading }])
|
|
64
|
+
}, [
|
|
65
|
+
c(a.$slots, "default", {}, void 0, !0)
|
|
66
|
+
], 2)
|
|
67
|
+
], 10, f));
|
|
68
|
+
}
|
|
69
|
+
}, b = /* @__PURE__ */ m(y, [["__scopeId", "data-v-8db92d47"]]), B = {
|
|
70
|
+
install(t) {
|
|
71
|
+
t.component("Button", b);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
b as Button,
|
|
76
|
+
B as default
|
|
77
|
+
};
|
|
@@ -0,0 +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.UiLibrary={},n.Vue))})(this,(function(n,e){"use strict";const s=(t,l)=>{const i=t.__vccOpts||t;for(const[a,o]of l)i[a]=o;return i},r=["type","disabled"],u={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,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]=m=>a.$emit("click"))},[t.loading?(e.openBlock(),e.createElementBlock("div",u,[...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,r))}},[["__scopeId","data-v-8db92d47"]]),c={install(t){t.component("Button",d)}};n.Button=d,n.default=c,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"main": "./dist/ui-library.umd.cjs",
|
|
3
|
+
"module": "./dist/ui-library.js",
|
|
4
|
+
"files": [
|
|
5
|
+
"dist"
|
|
6
|
+
],
|
|
7
|
+
"name": "treqit-ui-library",
|
|
8
|
+
"private": false,
|
|
9
|
+
"version": "1.0.0",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"dev": "vite",
|
|
13
|
+
"build": "vue-tsc -b && vite build",
|
|
14
|
+
"preview": "vite preview"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"vue": "^3.5.22"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/node": "^24.6.0",
|
|
21
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
22
|
+
"@vue/tsconfig": "^0.8.1",
|
|
23
|
+
"sass-embedded": "^1.93.3",
|
|
24
|
+
"typescript": "~5.9.3",
|
|
25
|
+
"vite": "^7.1.7",
|
|
26
|
+
"vue-tsc": "^3.1.0"
|
|
27
|
+
}
|
|
28
|
+
}
|