Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

onu-ui

Package Overview
Dependencies
Maintainers
0
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onu-ui - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

368

dist/onu-ui.js

@@ -1,23 +0,9 @@

import * as h from "vue";
import { ref as P, defineComponent as f, useSlots as z, useAttrs as O, computed as c, openBlock as i, createBlock as j, resolveDynamicComponent as $, mergeProps as S, unref as b, withCtx as G, createElementBlock as d, renderSlot as p, normalizeClass as _, createCommentVNode as V, createElementVNode as C, normalizeProps as E, guardReactiveProps as I } from "vue";
const M = "1.1.2", y = Symbol("Onu_UI_Installed");
function N(t = []) {
return {
version: M,
install: (n) => {
n[y] || (n[y] = !0, t.forEach((a) => n.use(a)));
}
};
}
var k = Object.defineProperty, D = Object.getOwnPropertyDescriptor, q = Object.getOwnPropertyNames, L = Object.prototype.hasOwnProperty, R = (t, e) => {
for (var n in e) k(t, n, { get: e[n], enumerable: !0 });
}, T = (t, e, n, a) => {
if (e && typeof e == "object" || typeof e == "function") for (let s of q(e)) !L.call(t, s) && s !== n && k(t, s, { get: () => e[s], enumerable: !(a = D(e, s)) || a.enumerable });
return t;
}, W = (t, e, n) => (T(t, e, "default"), n);
function m(t, e) {
return t.install = (n) => {
for (let a of [t, ...Object.values({})]) n.component(a.name, a);
}, t;
}
import * as A from "vue";
import { ref as P, defineComponent as b, openBlock as r, createElementBlock as u, mergeProps as M, unref as k, renderSlot as h, useAttrs as w, useSlots as G, computed as c, normalizeClass as B, createElementVNode as S, normalizeProps as L, guardReactiveProps as T, createBlock as j, resolveDynamicComponent as F, withCtx as U, createCommentVNode as W, mergeModels as _, useModel as x, Fragment as Y, renderList as J } from "vue";
var C = Object.defineProperty, K = Object.getOwnPropertyDescriptor, Q = Object.getOwnPropertyNames, X = Object.prototype.hasOwnProperty, Z = (a, e) => {
for (var t in e) C(a, t, { get: e[t], enumerable: !0 });
}, H = (a, e, t, n) => {
if (e && typeof e == "object" || typeof e == "function") for (let o of Q(e)) !X.call(a, o) && o !== t && C(a, o, { get: () => e[o], enumerable: !(n = K(e, o)) || n.enumerable });
return a;
}, ee = (a, e, t) => (H(a, e, "default"), t);
(() => {

@@ -30,45 +16,128 @@ try {

})();
var B = {};
R(B, { Vue: () => h, Vue2: () => K, del: () => H, install: () => Q, isVue2: () => Y, isVue3: () => F, set: () => U });
W(B, h);
var Y = !1, F = !0, K = void 0;
function Q() {
var I = {};
Z(I, { Vue: () => A, Vue2: () => ne, del: () => re, install: () => oe, isVue2: () => ae, isVue3: () => te, set: () => se });
ee(I, A);
var ae = !1, te = !0, ne = void 0;
function oe() {
}
function U(t, e, n) {
return Array.isArray(t) ? (t.length = Math.max(t.length, e), t.splice(e, 1, n), n) : (t[e] = n, n);
function se(a, e, t) {
return Array.isArray(a) ? (a.length = Math.max(a.length, e), a.splice(e, 1, t), t) : (a[e] = t, t);
}
function H(t, e) {
if (Array.isArray(t)) {
t.splice(e, 1);
function re(a, e) {
if (Array.isArray(a)) {
a.splice(e, 1);
return;
}
delete t[e];
delete a[e];
}
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
P();
const J = { type: Boolean }, X = { type: Boolean }, Z = { type: Boolean }, g = {
function g(a, e) {
return a.install = (t) => {
for (let n of [a, ...Object.values({})]) t.component(n.name, n);
}, a;
}
const N = { type: Boolean }, le = { type: Boolean }, ie = { type: Boolean }, y = {
type: String,
default: "md"
}, A = {
}, de = {
size: y,
src: String,
variant: { type: String },
online: Boolean,
offline: Boolean,
/**
* This props based on the UnoCSS.
*/
w: String
}, ce = {
size: y,
vertical: Boolean,
/**
* This props based on the UnoCSS.
*/
"space-x": {
type: String,
default: "-6"
},
"space-y": {
type: String,
default: "-6"
}
}, ue = /* @__PURE__ */ b({
name: "OAvatarGroup",
__name: "group",
props: ce,
setup(a) {
const e = a, n = [
"avatar-group",
{
xs: "avatar-group-xs",
sm: "avatar-group-sm",
md: "avatar-group-md",
lg: "avatar-group-lg"
}[e.size],
e.vertical ? "flex-col" : "flex-row"
], o = e.vertical ? { "space-y": e["space-y"] } : { "space-x": e["space-x"] };
return (s, i) => (r(), u("div", M({ class: n }, k(o)), [
h(s.$slots, "default")
], 16));
}
}), pe = ["w"], me = ["src"], ve = /* @__PURE__ */ b({
name: "OAvatar",
inheritAttrs: !1,
__name: "index",
props: de,
setup(a) {
const e = a, t = Object.assign({}, w()), n = G(), o = {
xs: "avatar-xs",
sm: "avatar-sm",
md: "avatar-md",
lg: "avatar-lg"
}, s = {
hexagon: "mask-hexagon",
squircle: "mask-squircle",
triangle: "mask-triangle"
}, i = c(() => [
"avatar",
e.size ? o[e.size] : "",
e.variant ? s[e.variant] : "",
n.default && !e.src ? "avatar-placeholder" : "",
e.online ? "avatar-online" : "",
e.offline ? "avatar-offline" : ""
]);
return (d, m) => (r(), u("div", {
class: B(i.value),
w: d.w
}, [
S("div", L(T(k(t))), [
d.src ? (r(), u("img", {
key: 0,
src: d.src
}, null, 8, me)) : h(d.$slots, "default", { key: 1 })
], 16)
], 10, pe));
}
}), fe = g(ve), be = g(ue), q = {
to: String,
rounded: Boolean,
icon: String,
size: g,
disabled: J,
readonly: X,
loading: Z,
size: y,
disabled: N,
readonly: le,
loading: ie,
variant: { type: String }
};
A.size;
const ee = {
q.size;
const ge = {
key: 0,
"i-carbon-circle-dash": "",
"animate-spin": ""
}, te = /* @__PURE__ */ f({
}, he = /* @__PURE__ */ b({
name: "OButton",
inheritAttrs: !1,
__name: "index",
props: A,
setup(t) {
const e = t, n = z(), a = Object.assign({}, O(), e.to ? { href: e.to } : {}), s = {
props: q,
setup(a) {
const e = a, t = G(), n = Object.assign({}, w(), e.to ? { href: e.to } : {}), o = {
xs: "btn-xs",

@@ -78,3 +147,3 @@ sm: "btn-sm",

lg: "btn-lg"
}, l = {
}, s = {
default: "btn-default",

@@ -90,21 +159,21 @@ soft: "btn btn-soft",

"ghost-light": "btn btn-ghost-light"
}, u = c(() => s[e.size]), r = c(() => [e.variant ? l[e.variant] ?? "btn" : "btn"]), v = c(() => e.loading || e.disabled), x = c(() => (n.icon || e.icon) && !n.default);
return (o, pe) => (i(), j($(o.to ? "a" : "button"), S(b(a), {
disabled: v.value,
"aria-disabled": v.value,
}, i = c(() => o[e.size]), d = c(() => [e.variant ? s[e.variant] ?? "btn" : "btn"]), m = c(() => e.loading || e.disabled), z = c(() => (t.icon || e.icon) && !t.default);
return (l, V) => (r(), j(F(l.to ? "a" : "button"), M(k(n), {
disabled: m.value,
"aria-disabled": m.value,
class: [
u.value,
r.value,
x.value && "aspect-square px-0",
o.rounded && "rounded-full"
i.value,
d.value,
z.value && "aspect-square px-0",
l.rounded && "rounded-full"
]
}), {
default: G(() => [
o.loading ? (i(), d("div", ee)) : p(o.$slots, "icon", { key: 1 }, () => [
o.icon ? (i(), d("div", {
default: U(() => [
l.loading ? (r(), u("div", ge)) : h(l.$slots, "icon", { key: 1 }, () => [
l.icon ? (r(), u("div", {
key: 0,
class: _(o.icon)
}, null, 2)) : V("", !0)
class: B(l.icon)
}, null, 2)) : W("", !0)
]),
p(o.$slots, "default")
h(l.$slots, "default")
]),

@@ -114,89 +183,112 @@ _: 3

}
}), ne = m(te), ae = {
size: g,
src: String,
variant: { type: String },
online: Boolean,
offline: Boolean,
/**
* This props based on the UnoCSS.
*/
w: String
}, se = {
size: g,
vertical: Boolean,
/**
* This props based on the UnoCSS.
*/
"space-x": {
}), ye = g(he), E = {
size: y,
disabled: N,
name: {
type: String
},
shape: {
type: String,
default: "-6"
default: "circle"
},
"space-y": {
type: String,
default: "-6"
modelValue: {
type: [String, Number, Boolean]
}
}, oe = ["w"], re = ["src"], ie = /* @__PURE__ */ f({
name: "OAvatar",
inheritAttrs: !1,
}, ze = {
...E,
value: {
type: [String, Number, Boolean]
}
}, Oe = {
...E,
options: {
type: Array,
required: !0
}
}, Se = ["for"], _e = ["id", "name", "data-type", "disabled", "value", "checked"], R = /* @__PURE__ */ b({
name: "ORadio",
__name: "index",
props: ae,
setup(t) {
const e = t, n = Object.assign({}, O()), a = z(), s = {
xs: "avatar-xs",
sm: "avatar-sm",
md: "avatar-md",
lg: "avatar-lg"
}, l = {
hexagon: "mask-hexagon",
squircle: "mask-squircle",
triangle: "mask-triangle"
}, u = c(() => [
"avatar",
e.size ? s[e.size] : "",
e.variant ? l[e.variant] : "",
a.default && !e.src ? "avatar-placeholder" : "",
e.online ? "avatar-online" : "",
e.offline ? "avatar-offline" : ""
]);
return (r, v) => (i(), d("div", {
class: _(u.value),
w: r.w
props: /* @__PURE__ */ _(ze, {
modelValue: {},
modelModifiers: {}
}),
emits: /* @__PURE__ */ _(["change"], ["update:modelValue"]),
setup(a, { emit: e }) {
const t = a, n = e, o = x(a, "modelValue"), s = P(Math.random().toString(36).substring(7)), i = c(() => o.value === t.value), d = {
xs: "radio-xs",
sm: "radio-sm",
md: "radio-md",
lg: "radio-lg"
}, m = {
circle: "radio-circle",
square: "radio-square"
}, z = c(() => d[t.size]), l = c(() => m[t.shape]);
function V(p) {
const { dataset: { type: v }, value: O } = p.target;
let f;
v === "number" ? f = Number(O) : v === "boolean" ? f = O === "true" : f = O, o.value = f, n("change", f);
}
return (p, v) => (r(), u("label", {
class: B(["radio radio-theme-400", [
z.value,
l.value
]]),
for: s.value
}, [
C("div", E(I(b(n))), [
r.src ? (i(), d("img", {
key: 0,
src: r.src
}, null, 8, re)) : p(r.$slots, "default", { key: 1 })
], 16)
], 10, oe));
S("input", {
id: s.value,
name: p.name,
"data-type": typeof p.value,
disabled: p.disabled,
value: p.value,
checked: i.value,
type: "radio",
class: "peer",
onChange: V
}, null, 40, _e),
v[0] || (v[0] = S("span", { class: "radio-dot" }, null, -1))
], 10, Se));
}
}), le = /* @__PURE__ */ f({
name: "OAvatarGroup",
}), ke = { flex: "~ gap-2" }, Be = /* @__PURE__ */ b({
name: "ORadioGroup",
__name: "group",
props: se,
setup(t) {
const e = t, a = [
"avatar-group",
{
xs: "avatar-group-xs",
sm: "avatar-group-sm",
md: "avatar-group-md",
lg: "avatar-group-lg"
}[e.size],
e.vertical ? "flex-col" : "flex-row"
], s = e.vertical ? { "space-y": e["space-y"] } : { "space-x": e["space-x"] };
return (l, u) => (i(), d("div", S({ class: a }, b(s)), [
p(l.$slots, "default")
], 16));
props: /* @__PURE__ */ _(Oe, {
modelValue: {},
modelModifiers: {}
}),
emits: ["update:modelValue"],
setup(a) {
const e = x(a, "modelValue");
return (t, n) => (r(), u("div", ke, [
(r(!0), u(Y, null, J(t.options, (o, s) => (r(), j(R, {
key: `${o.value}-${s}`,
modelValue: e.value,
"onUpdate:modelValue": n[0] || (n[0] = (i) => e.value = i),
value: o.value,
shape: t.shape,
size: t.size,
name: t.name
}, null, 8, ["modelValue", "value", "shape", "size", "name"]))), 128))
]));
}
}), ce = m(ie), de = m(le), ue = [
ce,
de,
ne
], w = N(ue), fe = w.install, be = w.version;
}), Ve = g(R), $e = g(Be), Ae = [
fe,
be,
ye,
Ve,
$e
], Pe = "1.1.3", $ = Symbol("Onu_UI_Installed");
function Me(a = []) {
return {
version: Pe,
install: (t) => {
t[$] || (t[$] = !0, a.forEach((n) => t.use(n)));
}
};
}
const D = Me(Ae), Ge = D.install, je = D.version;
export {
w as default,
fe as install,
be as version
D as default,
Ge as install,
je as version
};
{
"name": "onu-ui",
"type": "module",
"version": "1.1.2",
"version": "1.1.3",
"description": "Onu UI Vue Components",

@@ -34,10 +34,10 @@ "author": "Chris <https://github.com/zyyv>",

"dependencies": {
"@onu-ui/utils": "1.1.2"
"@onu-ui/utils": "1.1.3"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.2",
"unocss": "^0.62.3",
"vite": "^5.4.2",
"vue": "^3.4.38",
"@onu-ui/preset": "1.1.2"
"@vitejs/plugin-vue": "^5.1.4",
"unocss": "^0.64.0",
"vite": "^5.4.10",
"vue": "^3.5.12",
"@onu-ui/preset": "1.1.3"
},

@@ -44,0 +44,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc