portabilis-ui
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -1,2 +0,7 @@ | ||
import { computed as l, defineComponent as g, h as a, ref as _, Transition as j } from "vue"; | ||
import { computed as l, defineComponent as g, h as i, ref as C, Transition as R } from "vue"; | ||
/** | ||
* Portabilis UI 0.0.4 | ||
* (c) 2022 | ||
* @license MIT | ||
*/ | ||
const S = { | ||
@@ -10,6 +15,6 @@ left: "start", | ||
stretch: "stretch" | ||
}, M = Object.keys(S), R = { | ||
}, j = Object.keys(S), M = { | ||
align: { | ||
type: String, | ||
validator: (e) => M.includes(e) | ||
validator: (e) => j.includes(e) | ||
} | ||
@@ -19,4 +24,4 @@ }; | ||
return l(() => { | ||
const t = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align; | ||
return `flex ${e.vertical === !0 ? "align-items" : "justify-content"}-${S[t]}`; | ||
const n = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align; | ||
return `flex ${e.vertical === !0 ? "align-items" : "justify-content"}-${S[n]}`; | ||
}); | ||
@@ -33,10 +38,10 @@ } | ||
}; | ||
function k(e, t = h) { | ||
function k(e, n = h) { | ||
return l( | ||
() => e.size !== void 0 ? { | ||
fontSize: e.size in t ? `${t[e.size]}px` : e.size | ||
fontSize: e.size in n ? `${n[e.size]}px` : e.size | ||
} : null | ||
); | ||
} | ||
const y = { | ||
const v = { | ||
none: 0, | ||
@@ -54,3 +59,3 @@ xs: 4, | ||
xl: 24 | ||
}, O = { | ||
}, X = { | ||
...$, | ||
@@ -80,3 +85,3 @@ type: { | ||
align: { | ||
...R.align, | ||
...M.align, | ||
default: "center" | ||
@@ -92,14 +97,14 @@ }, | ||
}; | ||
function E(e) { | ||
const t = k(e, P), i = N(e), r = l(() => { | ||
function _(e) { | ||
const n = k(e, P), a = N(e), r = l(() => { | ||
var d; | ||
const n = e.fab === !1 && e.fabMini === !1 ? t.value : {}; | ||
const t = e.fab === !1 && e.fabMini === !1 ? n.value : {}; | ||
return e.padding !== void 0 ? { | ||
...n, | ||
...t, | ||
padding: (d = e.padding) == null ? void 0 : d.split(/\s+/).map( | ||
(x) => x in y ? `${y[x]}px` : x | ||
(m) => m in v ? `${v[m]}px` : m | ||
).join(" "), | ||
minWidth: "0", | ||
minHeight: "0" | ||
} : n; | ||
} : t; | ||
}), s = l( | ||
@@ -112,12 +117,12 @@ () => e.rounded === !0 || e.fab === !0 || e.fabMini === !0 | ||
), f = l(() => e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.unelevated === !0 ? "unelevated" : "standard"), c = l(() => { | ||
const n = { | ||
const t = { | ||
tabindex: u.value, | ||
role: "button" | ||
}; | ||
return e.type !== "a" && (n.type = e.type), e.disable === !0 && (n.disabled = "", n["aria-disabled"] = "true"), n; | ||
return e.type !== "a" && (t.type = e.type), e.disable === !0 && (t.disabled = "", t["aria-disabled"] = "true"), t; | ||
}), b = l(() => { | ||
let n; | ||
return e.color !== void 0 ? e.flat === !0 ? n = `text-${e.textColor || e.color}` : e.outline === !0 ? n = `text-${e.textColor || e.color} border-${e.textColor || e.color}` : n = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (n = `text-${e.textColor}`), `x-btn--${f.value} x-btn--${e.round === !0 ? "round" : `rectangle${s.value === !0 ? " x-btn--rounded" : ""}`}` + (n !== void 0 ? " " + n : "") + (o.value === !0 ? " x-btn--actionable pmd-focusable pmd-hoverable" : e.disable === !0 ? " disabled" : "") + (e.fab === !0 ? " x-btn--fab" : e.fabMini === !0 ? " x-btn--fab-mini" : "") + (e.noCaps === !0 ? " x-btn--no-uppercase" : "") + (e.dense === !0 ? " x-btn--dense" : "") + (e.stretch === !0 ? " no-border-radius align-self-stretch" : ""); | ||
}), m = l( | ||
() => i.value + (e.stack === !0 ? " flex-col" : "") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " x-btn__content--hidden" : "") | ||
let t; | ||
return e.color !== void 0 ? e.flat === !0 ? t = `text-${e.textColor || e.color}` : e.outline === !0 ? t = `text-${e.textColor || e.color} border-${e.textColor || e.color}` : t = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (t = `text-${e.textColor}`), `x-btn--${f.value} x-btn--${e.round === !0 ? "round" : `rectangle${s.value === !0 ? " x-btn--rounded" : ""}`}` + (t !== void 0 ? " " + t : "") + (o.value === !0 ? " x-btn--actionable pmd-focusable pmd-hoverable" : e.disable === !0 ? " disabled" : "") + (e.fab === !0 ? " x-btn--fab" : e.fabMini === !0 ? " x-btn--fab-mini" : "") + (e.noCaps === !0 ? " x-btn--no-uppercase" : "") + (e.dense === !0 ? " x-btn--dense" : "") + (e.stretch === !0 ? " no-border-radius align-self-stretch" : ""); | ||
}), x = l( | ||
() => a.value + (e.stack === !0 ? " flex-col" : "") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " x-btn__content--hidden" : "") | ||
); | ||
@@ -127,3 +132,3 @@ return { | ||
style: r, | ||
innerClasses: m, | ||
innerClasses: x, | ||
attributes: c, | ||
@@ -133,9 +138,9 @@ isActionable: o | ||
} | ||
function z(e) { | ||
const t = e.default; | ||
return t !== void 0 ? t() : ""; | ||
function B(e) { | ||
const n = e.default; | ||
return n !== void 0 ? n() : ""; | ||
} | ||
function B(e, t) { | ||
const i = e.default; | ||
return i !== void 0 ? t.concat(i()) : t; | ||
function z(e, n) { | ||
const a = e.default; | ||
return a !== void 0 ? n.concat(a()) : n; | ||
} | ||
@@ -146,3 +151,3 @@ const w = { | ||
"pmd-": (e) => `icon-${e}` | ||
}, X = new RegExp(`^(${Object.keys(w).join("|")})`), q = /^[l|f]a[s|r|l|b|d]? /, v = g({ | ||
}, q = new RegExp(`^(${Object.keys(w).join("|")})`), A = /^[l|f]a[s|r|l|b|d]? /, y = g({ | ||
name: "Icon", | ||
@@ -166,4 +171,4 @@ props: { | ||
}, | ||
setup(e, { slots: t }) { | ||
const i = k(e), r = l( | ||
setup(e, { slots: n }) { | ||
const a = k(e), r = l( | ||
() => "pmd-icon" + (e.left === !0 ? " on-left" : "") + (e.right === !0 ? " on-right" : "") + (e.color !== void 0 ? ` text-${e.color}` : "") | ||
@@ -178,4 +183,4 @@ ), s = l(() => { | ||
}; | ||
const f = " ", c = u.match(X)[1]; | ||
return c !== null ? o = w[c](u) : q.test(u) === !0 && (o = u), { | ||
const f = " ", c = u.match(q)[1]; | ||
return c !== null ? o = w[c](u) : A.test(u) === !0 && (o = u), { | ||
cls: `${o} ${r.value}`, | ||
@@ -188,10 +193,10 @@ content: f | ||
class: s.value.cls, | ||
style: i.value, | ||
style: a.value, | ||
"aria-hidden": "true", | ||
role: "presentation" | ||
}; | ||
return s.value.none === !0 ? a(e.tag, o, z(t)) : a( | ||
return s.value.none === !0 ? i(e.tag, o, B(n)) : i( | ||
e.tag, | ||
o, | ||
B(t, [s.value.content]) | ||
z(n, [s.value.content]) | ||
); | ||
@@ -201,3 +206,3 @@ }; | ||
}); | ||
function A(e) { | ||
function E(e) { | ||
return { | ||
@@ -210,3 +215,3 @@ cSize: l( | ||
} | ||
const C = g({ | ||
const I = g({ | ||
props: { | ||
@@ -231,6 +236,6 @@ size: { | ||
setup(e) { | ||
const { cSize: t, classes: i } = A(e); | ||
return e.normal ? () => a("div", { | ||
class: `${i.value} x-normal-spinner d-flex` | ||
}) : () => a( | ||
const { cSize: n, classes: a } = E(e); | ||
return e.normal ? () => i("div", { | ||
class: `${a.value} x-normal-spinner d-flex` | ||
}) : () => i( | ||
"div", | ||
@@ -241,14 +246,14 @@ { | ||
[ | ||
a( | ||
i( | ||
"svg", | ||
{ | ||
class: `${i.value} | ||
class: `${a.value} | ||
x-spinner-mat | ||
`, | ||
width: t.value, | ||
height: t.value, | ||
width: n.value, | ||
height: n.value, | ||
viewBox: "25 25 50 50" | ||
}, | ||
[ | ||
a("circle", { | ||
i("circle", { | ||
class: "path", | ||
@@ -268,3 +273,3 @@ cx: "50", | ||
} | ||
}), I = g({ | ||
}), W = g({ | ||
name: "Skeleton", | ||
@@ -299,4 +304,4 @@ props: { | ||
}, | ||
setup(e, { slots: t }) { | ||
const i = l( | ||
setup(e, { slots: n }) { | ||
const a = l( | ||
() => e.size !== null ? { width: e.size, height: e.size } : { width: e.width, height: e.height } | ||
@@ -306,29 +311,30 @@ ), r = l( | ||
); | ||
return () => a( | ||
return () => i( | ||
e.tag, | ||
{ | ||
class: r.value, | ||
style: i.value | ||
style: a.value | ||
}, | ||
z(t) | ||
B(n) | ||
); | ||
} | ||
}), V = g({ | ||
}), L = g({ | ||
name: "XButton", | ||
props: { | ||
...O, | ||
...X, | ||
loadingNormal: Boolean | ||
}, | ||
emits: ["click"], | ||
setup(e, { slots: t, emit: i }) { | ||
const { classes: r, style: s, innerClasses: o, attributes: u } = E(e), f = _("btn"), c = l( | ||
setup(e, { slots: n, emit: a }) { | ||
const { classes: r, style: s, innerClasses: o, attributes: u } = _(e), f = C("btn"), c = l( | ||
() => e.label !== void 0 && e.label !== null && e.label !== "" | ||
); | ||
function b(n) { | ||
if (n !== void 0) { | ||
if (n.defaultPrevented === !0 || e.loading === !0) | ||
function b(t) { | ||
if (t !== void 0) { | ||
if (t.defaultPrevented === !0 || e.loading === !0) | ||
return; | ||
i("click", n); | ||
a("click", t); | ||
} | ||
} | ||
const m = l(() => ({ | ||
const x = l(() => ({ | ||
ref: f, | ||
@@ -346,5 +352,5 @@ class: [ | ||
return () => { | ||
let n = []; | ||
e.icon !== void 0 && n.push( | ||
a(v, { | ||
let t = []; | ||
e.icon !== void 0 && t.push( | ||
i(y, { | ||
name: e.icon, | ||
@@ -356,4 +362,4 @@ left: e.stack === !1 && c.value === !0, | ||
}) | ||
), c.value === !0 && n.push(a("span", { class: "block" }, [e.label])), n = B(t, n), e.iconRight !== void 0 && e.round === !1 && n.push( | ||
a(v, { | ||
), c.value === !0 && t.push(i("span", { class: "block" }, [e.label])), t = z(n, t), e.iconRight !== void 0 && e.round === !1 && t.push( | ||
i(y, { | ||
name: e.iconRight, | ||
@@ -368,3 +374,3 @@ right: e.stack === !1 && c.value === !0, | ||
return d.push( | ||
a( | ||
i( | ||
"span", | ||
@@ -379,7 +385,7 @@ { | ||
}, | ||
n | ||
t | ||
) | ||
), e.loading !== void 0 && d.push( | ||
a( | ||
j, | ||
i( | ||
R, | ||
{ | ||
@@ -389,3 +395,3 @@ name: "x-transition--fade" | ||
() => e.loading === !0 ? [ | ||
a( | ||
i( | ||
"span", | ||
@@ -396,4 +402,4 @@ { | ||
}, | ||
t.loading !== void 0 ? t.loading() : [ | ||
a(C, { | ||
n.loading !== void 0 ? n.loading() : [ | ||
i(I, { | ||
normal: e.loadingNormal, | ||
@@ -407,21 +413,18 @@ size: "sm", | ||
) | ||
), a("button", m.value, d); | ||
), i("button", x.value, d); | ||
}; | ||
} | ||
}), W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ | ||
__proto__: null, | ||
XButton: V, | ||
XIcon: v, | ||
XSpinner: C, | ||
XSkeleton: I | ||
}, Symbol.toStringTag, { value: "Module" })), T = (e) => { | ||
Object.entries(W).forEach(([t, i]) => { | ||
e.component( | ||
t, | ||
i | ||
); | ||
}); | ||
}; | ||
}); | ||
export { | ||
T as default | ||
L as XButton, | ||
y as XIcon, | ||
W as XSkeleton, | ||
I as XSpinner, | ||
S as alignMap, | ||
j as alignValues, | ||
M as useAlignProps, | ||
X as useBtnProps, | ||
h as useSizeDefaults, | ||
$ as useSizeProps | ||
}; | ||
//# sourceMappingURL=portabilis-ui.js.map |
{ | ||
"name": "portabilis-ui", | ||
"version": "0.0.3", | ||
"description": "UI Front-end Framework dos produtos Portabilis", | ||
"private": false, | ||
"version": "0.0.4", | ||
"type": "module", | ||
"main": "./dist/portabilis-ui.umd.cjs", | ||
"module": "./dist/portabilis-ui.js", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./dist/portabilis-ui.js", | ||
"require": "./dist/portabilis-ui.umd.cjs" | ||
} | ||
}, | ||
"files": [ | ||
"dist", | ||
"../../README.md" | ||
], | ||
"scripts": { | ||
@@ -26,18 +13,46 @@ "dev": "vite", | ||
}, | ||
"keywords": [ | ||
"vite" | ||
], | ||
"author": "Portabilis Tecnologia", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/portabilis/portabilis-ui", | ||
"directory": "packages/ui" | ||
"url": "https://github.com/portabilis/portabilis-ui.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/portabilis/portabilis-ui/issues" | ||
"browserslist": [ | ||
"> 1%", | ||
"last 2 versions", | ||
"not dead" | ||
], | ||
"license": "MIT", | ||
"main": "dist/portabilis-ui.js", | ||
"module": "dist/portabilis-ui.es.js", | ||
"style": "dist/style.css", | ||
"types": "dist/portabilis-ui.d.ts", | ||
"engines": { | ||
"node": ">=16", | ||
"yarn": "^1.22" | ||
}, | ||
"peerDependencies": { | ||
"vite": ">=3.0.0" | ||
"dependencies": { | ||
"vue": "^3.2.37" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.8.2", | ||
"@typescript-eslint/eslint-plugin": "^5.39.0", | ||
"@typescript-eslint/parser": "^5.39.0", | ||
"@vitejs/plugin-vue": "^3.1.0", | ||
"autoprefixer": "^10.4.12", | ||
"eslint": "^8.24.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-vue": "^9.6.0", | ||
"node-sass": "^7.0.3", | ||
"postcss": "^8.4.17", | ||
"postcss-import": "^15.0.0", | ||
"postcss-nested": "^5.0.6", | ||
"prettier": "^2.7.1", | ||
"sass": "^1.55.0", | ||
"sass-loader": "^13.0.2", | ||
"tailwindcss": "^3.1.8", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.6.4", | ||
"vite": "^3.1.0", | ||
"vite-plugin-dts": "^1.6.4", | ||
"vue-tsc": "^0.40.4" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
113371
56
1625
1
17
21
2
1
+ Addedvue@^3.2.37
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/parser@7.26.2(transitive)
+ Added@babel/types@7.26.0(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@vue/compiler-core@3.5.13(transitive)
+ Added@vue/compiler-dom@3.5.13(transitive)
+ Added@vue/compiler-sfc@3.5.13(transitive)
+ Added@vue/compiler-ssr@3.5.13(transitive)
+ Added@vue/reactivity@3.5.13(transitive)
+ Added@vue/runtime-core@3.5.13(transitive)
+ Added@vue/runtime-dom@3.5.13(transitive)
+ Added@vue/server-renderer@3.5.13(transitive)
+ Added@vue/shared@3.5.13(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addedentities@4.5.0(transitive)
+ Addedestree-walker@2.0.2(transitive)
+ Addedmagic-string@0.30.14(transitive)
+ Addedvue@3.5.13(transitive)
- Removed@esbuild/aix-ppc64@0.24.0(transitive)
- Removed@esbuild/android-arm@0.24.0(transitive)
- Removed@esbuild/android-arm64@0.24.0(transitive)
- Removed@esbuild/android-x64@0.24.0(transitive)
- Removed@esbuild/darwin-arm64@0.24.0(transitive)
- Removed@esbuild/darwin-x64@0.24.0(transitive)
- Removed@esbuild/freebsd-arm64@0.24.0(transitive)
- Removed@esbuild/freebsd-x64@0.24.0(transitive)
- Removed@esbuild/linux-arm@0.24.0(transitive)
- Removed@esbuild/linux-arm64@0.24.0(transitive)
- Removed@esbuild/linux-ia32@0.24.0(transitive)
- Removed@esbuild/linux-loong64@0.24.0(transitive)
- Removed@esbuild/linux-mips64el@0.24.0(transitive)
- Removed@esbuild/linux-ppc64@0.24.0(transitive)
- Removed@esbuild/linux-riscv64@0.24.0(transitive)
- Removed@esbuild/linux-s390x@0.24.0(transitive)
- Removed@esbuild/linux-x64@0.24.0(transitive)
- Removed@esbuild/netbsd-x64@0.24.0(transitive)
- Removed@esbuild/openbsd-arm64@0.24.0(transitive)
- Removed@esbuild/openbsd-x64@0.24.0(transitive)
- Removed@esbuild/sunos-x64@0.24.0(transitive)
- Removed@esbuild/win32-arm64@0.24.0(transitive)
- Removed@esbuild/win32-ia32@0.24.0(transitive)
- Removed@esbuild/win32-x64@0.24.0(transitive)
- Removed@rollup/rollup-android-arm-eabi@4.27.4(transitive)
- Removed@rollup/rollup-android-arm64@4.27.4(transitive)
- Removed@rollup/rollup-darwin-arm64@4.27.4(transitive)
- Removed@rollup/rollup-darwin-x64@4.27.4(transitive)
- Removed@rollup/rollup-freebsd-arm64@4.27.4(transitive)
- Removed@rollup/rollup-freebsd-x64@4.27.4(transitive)
- Removed@rollup/rollup-linux-arm-gnueabihf@4.27.4(transitive)
- Removed@rollup/rollup-linux-arm-musleabihf@4.27.4(transitive)
- Removed@rollup/rollup-linux-arm64-gnu@4.27.4(transitive)
- Removed@rollup/rollup-linux-arm64-musl@4.27.4(transitive)
- Removed@rollup/rollup-linux-powerpc64le-gnu@4.27.4(transitive)
- Removed@rollup/rollup-linux-riscv64-gnu@4.27.4(transitive)
- Removed@rollup/rollup-linux-s390x-gnu@4.27.4(transitive)
- Removed@rollup/rollup-linux-x64-gnu@4.27.4(transitive)
- Removed@rollup/rollup-linux-x64-musl@4.27.4(transitive)
- Removed@rollup/rollup-win32-arm64-msvc@4.27.4(transitive)
- Removed@rollup/rollup-win32-ia32-msvc@4.27.4(transitive)
- Removed@rollup/rollup-win32-x64-msvc@4.27.4(transitive)
- Removed@types/estree@1.0.6(transitive)
- Removedesbuild@0.24.0(transitive)
- Removedfsevents@2.3.3(transitive)
- Removedrollup@4.27.4(transitive)
- Removedvite@6.0.1(transitive)