New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lvjst

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lvjst - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

165

dist/lui-vue.es.js

@@ -17,3 +17,3 @@ var __defProp = Object.defineProperty;

};
import { computed, openBlock, createBlock, resolveDynamicComponent, mergeProps, withCtx, renderSlot, createElementBlock, normalizeClass, createElementVNode } from "vue";
import { computed, openBlock, createBlock, resolveDynamicComponent, mergeProps, withCtx, renderSlot, createElementBlock, normalizeClass, createElementVNode, ref, provide, Fragment, renderList, toDisplayString, inject, withDirectives, vShow } from "vue";
var index = "";

@@ -114,3 +114,3 @@ function variant(name, defaultValue) {

};
const _sfc_main$3 = {
const _sfc_main$5 = {
mixins: [

@@ -171,3 +171,3 @@ string("tag", "p", [

};
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps({ class: $setup.classes }, _ctx.$attrs), {

@@ -180,4 +180,4 @@ default: withCtx(() => [

}
var LuiText = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
const _sfc_main$2 = {
var LuiText = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
const _sfc_main$4 = {
mixins: [variant(), boolean("border"), size(), filter()],

@@ -199,3 +199,3 @@ setup(props) {

};
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("span", {

@@ -205,4 +205,4 @@ class: normalizeClass($setup.computedClasses)

}
var LuiBadge = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
const _sfc_main$1 = {
var LuiBadge = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
const _sfc_main$3 = {
mixins: [size("sm", ["sm", "lg"])],

@@ -255,5 +255,5 @@ inheritAttrs: false,

};
const _hoisted_1$1 = { class: "container" };
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", _hoisted_1$1, [
const _hoisted_1$3 = { class: "container" };
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", _hoisted_1$3, [
createElementVNode("input", mergeProps({

@@ -268,4 +268,4 @@ type: "checkbox",

}
var LuiSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
const _sfc_main = {
var LuiSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
const _sfc_main$2 = {
mixins: [size("sm", ["sm", "md", "lg"])],

@@ -323,5 +323,5 @@ inheritAttrs: false,

};
const _hoisted_1 = { class: "container" };
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", _hoisted_1, [
const _hoisted_1$2 = { class: "container" };
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", _hoisted_1$2, [
createElementVNode("input", mergeProps({

@@ -336,3 +336,132 @@ type: "radio",

}
var LuiRadio = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export { LuiBadge, LuiRadio, LuiSwitch, LuiText };
var LuiRadio = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
const _sfc_main$1 = {
mixins: [
string("alignTabs", "left", ["left", "center", "right"]),
string("alignContent", "left", ["left", "center", "right"]),
boolean("stretch")
],
setup(props, { slots }) {
const tabProps = ref(slots.default().map((tab) => tab.props));
let initialActive = tabProps.value.findIndex((t) => t.active !== void 0);
initialActive = initialActive === -1 ? false : initialActive;
let selectedTitle = ref(tabProps.value[initialActive || 0].title);
const elements = ref([]);
provide("selectedTitle", selectedTitle);
function handleKeyEvents(e, index2) {
let targetPosition = null;
if (e.keyCode === 39 && this.tabProps.length > index2 + 1)
targetPosition = index2 + 1;
if (e.keyCode === 37 && index2 - 1 >= 0)
targetPosition = index2 - 1;
if (e.keyCode === 36)
targetPosition = 0;
if (e.keyCode === 35)
targetPosition = this.tabProps.length - 1;
if (targetPosition !== null && this.tabProps[targetPosition].disabled === void 0) {
this.selectedTitle = this.tabProps[targetPosition].title;
elements.value[targetPosition].focus();
}
}
const computedClasses = computed(() => {
const tabContainer = {
width: "w-full",
display: "flex",
margin: "mb-8",
flexWrap: "flex-wrap",
alingItems: "items-center",
justifyContent: props.alignTabs === "left" ? "justify-start" : props.alignTabs === "center" ? "justify-center" : "justify-end"
};
const tab = {
lineHeight: "leading-5",
fontSize: "text-base",
fontWeight: "font-semibold",
position: "relative",
margin: "mb-2",
flexGrow: props.stretch ? "flex-grow" : "",
disabled: "disabled:text-secondary-300",
after: "after:w-full after:h-0.5 after:absolute after:-bottom-2 after:left-0 after:inline-block after:rounded-full after:bg-transparent"
};
const panel = props.alignContent === "left" ? "text-left" : props.alignContent === "center" ? "text-center" : "text-right";
const activeTab = "text-primary after:bg-primary";
const defaultTab = "text-secondary-500";
const tabMenuContainer = "w-full";
const tabText = "px-4";
return {
tabContainer: generateClasses([__spreadValues({}, tabContainer)]),
tab: generateClasses([__spreadValues({}, tab)]),
panel,
activeTab,
defaultTab,
tabMenuContainer,
tabText
};
});
return {
tabProps,
selectedTitle,
elements,
computedClasses,
handleKeyEvents
};
}
};
const _hoisted_1$1 = ["tabindex", "aria-selected", "disabled", "onClick", "onKeydown"];
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", {
class: normalizeClass($setup.computedClasses.tabMenuContainer)
}, [
createElementVNode("div", {
class: normalizeClass($setup.computedClasses.tabContainer),
role: "tablist"
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList($setup.tabProps, (prop, index2) => {
return openBlock(), createElementBlock("button", {
key: prop.title,
ref_for: true,
ref: (el) => $setup.elements[index2] = el,
role: "tab",
tabindex: $setup.selectedTitle === prop.title ? "0" : "-1",
"aria-selected": $setup.selectedTitle === prop.title ? true : false,
disabled: prop.disabled !== void 0 ? true : false,
class: normalizeClass([
$setup.computedClasses.tab,
$setup.selectedTitle === prop.title ? $setup.computedClasses.activeTab : $setup.computedClasses.defaultTab
]),
onClick: ($event) => $setup.selectedTitle = prop.title,
onKeydown: ($event) => $setup.handleKeyEvents($event, index2)
}, [
createElementVNode("span", {
class: normalizeClass($setup.computedClasses.tabText)
}, toDisplayString(prop.title), 3)
], 42, _hoisted_1$1);
}), 128))
], 2),
createElementVNode("div", {
class: normalizeClass($setup.computedClasses.panel)
}, [
renderSlot(_ctx.$slots, "default")
], 2)
], 2);
}
var LuiTabs = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
const _sfc_main = {
mixins: [string("title", "Title"), boolean("active"), boolean("disabled")],
setup() {
const selectedTitle = inject("selectedTitle");
return { selectedTitle };
}
};
const _hoisted_1 = {
role: "tabpanel",
tabindex: "0"
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
renderSlot(_ctx.$slots, "default")
], 512)), [
[vShow, _ctx.title == $setup.selectedTitle]
]);
}
var LuiTab = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export { LuiBadge, LuiRadio, LuiSwitch, LuiTab, LuiTabs, LuiText };

2

dist/lui-vue.umd.js

@@ -1,1 +0,1 @@

var T=Object.defineProperty;var m=Object.getOwnPropertySymbols;var W=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var b=(o,r,i)=>r in o?T(o,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[r]=i,d=(o,r)=>{for(var i in r||(r={}))W.call(r,i)&&b(o,i,r[i]);if(m)for(var i of m(r))q.call(r,i)&&b(o,i,r[i]);return o};(function(o,r){typeof exports=="object"&&typeof module!="undefined"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(o=typeof globalThis!="undefined"?globalThis:o||self,r(o.LuiVue={},o.Vue))})(this,function(o,r){"use strict";var i="";function g(e,s){return{props:{[e||"variant"]:{type:String,default:s||"primary",validator(n){return(e==="variant"?["primary","secondary","info","success","warning","danger"]:["light","dark","white","black","primary","secondary","info","success","warning","danger"]).includes(n)}}}}}function p(e){return{props:{[e||"filter"]:{type:String,default:"none",validator(s){return["darker","lighter","none"].includes(s)}}}}}function l(e,s){const t=s||["2xs","xs","sm","md","lg"];return{props:{size:{type:String,default:e||"md",validator:a=>t.includes(a)}}}}function h(e,s){return{props:{[e]:{type:Boolean,default:s||!1}}}}function w(e,s,n){let t={type:String,default:s||"none"};return n!==void 0&&(t.validator=a=>n.includes(a)),{props:{[e]:t}}}function c(e){const s=[];return e.map(n=>{s.push(...Object.values(n))}),s.join(" ").toString().replace(/\s+/g," ")}function y(e,s){const n=s==="none"?`bg-${e}`:s==="darker"?`bg-${e}-800`:`bg-${e}-100`,t=s==="none"?"text-white":s==="darker"?`text-${e}-100`:`text-${e}-800`;return{backgroundColor:n,fontColor:t}}var u=(e,s)=>{const n=e.__vccOpts||e;for(const[t,a]of s)n[t]=a;return n};const k={mixins:[w("tag","p",["p","span","br","strong","em","quotes","blockquote","code","pre","mark","ins","del","sup","sub","small","i","b","abbr","address","bdi","bdo","cite","dfn","kbs","meter","q","rp","rt","ruby","s","samp","time","u","var","wbr"]),l("md",["xs","sm","md","lg"]),g("variant","secondary")],setup(e){return{classes:r.computed(()=>{const n={fontColor:`text-${e.variant}-600`,fontSize:e.size==="xs"?"text-xs":e.size==="sm"?"text-sm":e.size==="md"?"text-base":"text-xl",lineHeight:e.size==="xs"?"leading-3":e.size==="sm"?"leading-4.5":e.size==="md"?"leading-5":"leading-6"};return c([d({},n)])})}}};function C(e,s,n,t,a,f){return r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.tag),r.mergeProps({class:t.classes},e.$attrs),{default:r.withCtx(()=>[r.renderSlot(e.$slots,"default")]),_:3},16,["class"])}var _=u(k,[["render",C]]);const x={mixins:[g(),h("border"),l(),p()],setup(e){return{computedClasses:r.computed(()=>{const n={width:e.size==="2xs"?"w-2":e.size==="xs"?"w-3":e.size==="sm"?"w-4":e.size==="md"?"w-5":"w-6",height:e.size==="2xs"?"h-2":e.size==="xs"?"h-3":e.size==="sm"?"h-4":e.size==="md"?"h-5":"h-6",backgroundColor:y(e.variant,e.filter).backgroundColor,border:e.border?"border border-white":"",display:"inline-block",borderRadius:"rounded-full"};return c([d({},n)])})}}};function z(e,s,n,t,a,f){return r.openBlock(),r.createElementBlock("span",{class:r.normalizeClass(t.computedClasses)},null,2)}var $=u(x,[["render",z]]);const B={mixins:[l("sm",["sm","lg"])],inheritAttrs:!1,setup(e){function s(t){return t[e.size]}return{computedClasses:r.computed(()=>{const t={input:{position:"absolute",opacity:"opacity-0",width:s({sm:"w-8",lg:"w-10"}),height:s({sm:"h-4",lg:"h-5"}),cursor:"cursor-pointer",peer:"peer"},span:{display:"flex items-center",alignItems:"peer-checked:justify-end",width:s({sm:"w-8",lg:"w-10"}),height:s({sm:"h-4",lg:"h-5"}),borderRadius:"rounded-full",backgroundColor:"bg-secondary-300 peer-checked:bg-success",borderWidth:"border",borderColor:"border-secondary-200 peer-checked:border-success-100",ringWidth:"peer-focus:ring-2",ringOffset:"peer-focus:ring-offset-2",ringColor:"peer-focus:ring-success",paddigX:"px-0.5"},spanBefore:{width:s({sm:"before:w-3",lg:"before:w-4"}),height:s({sm:"before:h-3",lg:"before:h-4"}),borderRadius:"before:rounded-full",backgroundColor:"before:bg-white",borderWidth:"before:border",borderColor:"before:border-secondary-200 peer-checked:before:border-success-100"}};return{input:c([d({},t.input)]),span:c([d({},t.span),d({},t.spanBefore)])}})}}},S={class:"container"};function L(e,s,n,t,a,f){return r.openBlock(),r.createElementBlock("div",S,[r.createElementVNode("input",r.mergeProps({type:"checkbox",class:t.computedClasses.input},e.$attrs),null,16),r.createElementVNode("span",{class:r.normalizeClass(t.computedClasses.span)},null,2)])}var E=u(B,[["render",L]]);const R={mixins:[l("sm",["sm","md","lg"])],inheritAttrs:!1,props:{state:{type:[String,Boolean,null],default:null,validator(e){return[null,"warning",!0,!1].includes(e)}}},setup(e){function s(t){return t[e.size]}return{computedClasses:r.computed(()=>{const t={input:{position:"absolute",opacity:"opacity-0",width:s({sm:"w-4",md:"w-5",lg:"w-6"}),height:s({sm:"h-4",md:"h-5",lg:"h-6"}),peer:"peer"},span:{width:s({sm:"w-4",md:"w-5",lg:"w-6"}),height:s({sm:"h-4",md:"h-5",lg:"h-6"}),display:"flex items-center justify-center",borderWidth:s({sm:"border-1.5",md:"border-2",lg:"border-2.5"}),borderColor:e.state===null?"border-primary":e.state==="warning"?"border-warning":e.state===!0?"border-success":"border-danger",borderRadius:"rounded-full",backgroundColor:"bg-white",ringWidth:e.size==="sm"?"peer-focus:ring-1":"peer-focus:ring-2",ringOffset:"peer-focus:ring-offset-2",ringColor:e.state===null?"peer-focus:ring-primary":e.state==="warning"?"peer-focus:ring-warning":e.state===!0?"peer-focus:ring-success":"peer-focus:ring-danger"},spanBefore:{width:s({sm:"before:w-2",md:"before:w-2.5",lg:"before:w-3"}),height:s({sm:"before:h-2",md:"before:h-2.5",lg:"before:h-3"}),borderRadius:"before:rounded-full",backgroundColor:"before:bg-white",backgroundColorChecked:e.state===null?"peer-checked:before:bg-primary":e.state==="warning"?"peer-checked:before:bg-warning":e.state===!0?"peer-checked:before:bg-success":"peer-checked:before:bg-danger"}};return{input:c([d({},t.input)]),span:c([d({},t.span),d({},t.spanBefore)])}})}}},V={class:"container"};function j(e,s,n,t,a,f){return r.openBlock(),r.createElementBlock("div",V,[r.createElementVNode("input",r.mergeProps({type:"radio",class:t.computedClasses.input},e.$attrs),null,16),r.createElementVNode("span",{class:r.normalizeClass(t.computedClasses.span)},null,2)])}var O=u(R,[["render",j]]);o.LuiBadge=$,o.LuiRadio=O,o.LuiSwitch=E,o.LuiText=_,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
var Y=Object.defineProperty;var k=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var _=(i,t,l)=>t in i?Y(i,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[t]=l,c=(i,t)=>{for(var l in t||(t={}))Z.call(t,l)&&_(i,l,t[l]);if(k)for(var l of k(t))v.call(t,l)&&_(i,l,t[l]);return i};(function(i,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(i=typeof globalThis!="undefined"?globalThis:i||self,t(i.LuiVue={},i.Vue))})(this,function(i,t){"use strict";var l="";function y(e,s){return{props:{[e||"variant"]:{type:String,default:s||"primary",validator(r){return(e==="variant"?["primary","secondary","info","success","warning","danger"]:["light","dark","white","black","primary","secondary","info","success","warning","danger"]).includes(r)}}}}}function x(e){return{props:{[e||"filter"]:{type:String,default:"none",validator(s){return["darker","lighter","none"].includes(s)}}}}}function h(e,s){const n=s||["2xs","xs","sm","md","lg"];return{props:{size:{type:String,default:e||"md",validator:o=>n.includes(o)}}}}function p(e,s){return{props:{[e]:{type:Boolean,default:s||!1}}}}function C(e,s,r){let n={type:String,default:s||"none"};return r!==void 0&&(n.validator=o=>r.includes(o)),{props:{[e]:n}}}function u(e){const s=[];return e.map(r=>{s.push(...Object.values(r))}),s.join(" ").toString().replace(/\s+/g," ")}function z(e,s){const r=s==="none"?`bg-${e}`:s==="darker"?`bg-${e}-800`:`bg-${e}-100`,n=s==="none"?"text-white":s==="darker"?`text-${e}-100`:`text-${e}-800`;return{backgroundColor:r,fontColor:n}}var m=(e,s)=>{const r=e.__vccOpts||e;for(const[n,o]of s)r[n]=o;return r};const T={mixins:[C("tag","p",["p","span","br","strong","em","quotes","blockquote","code","pre","mark","ins","del","sup","sub","small","i","b","abbr","address","bdi","bdo","cite","dfn","kbs","meter","q","rp","rt","ruby","s","samp","time","u","var","wbr"]),h("md",["xs","sm","md","lg"]),y("variant","secondary")],setup(e){return{classes:t.computed(()=>{const r={fontColor:`text-${e.variant}-600`,fontSize:e.size==="xs"?"text-xs":e.size==="sm"?"text-sm":e.size==="md"?"text-base":"text-xl",lineHeight:e.size==="xs"?"leading-3":e.size==="sm"?"leading-4.5":e.size==="md"?"leading-5":"leading-6"};return u([c({},r)])})}}};function $(e,s,r,n,o,b){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tag),t.mergeProps({class:n.classes},e.$attrs),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["class"])}var B=m(T,[["render",$]]);const S={mixins:[y(),p("border"),h(),x()],setup(e){return{computedClasses:t.computed(()=>{const r={width:e.size==="2xs"?"w-2":e.size==="xs"?"w-3":e.size==="sm"?"w-4":e.size==="md"?"w-5":"w-6",height:e.size==="2xs"?"h-2":e.size==="xs"?"h-3":e.size==="sm"?"h-4":e.size==="md"?"h-5":"h-6",backgroundColor:z(e.variant,e.filter).backgroundColor,border:e.border?"border border-white":"",display:"inline-block",borderRadius:"rounded-full"};return u([c({},r)])})}}};function E(e,s,r,n,o,b){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(n.computedClasses)},null,2)}var L=m(S,[["render",E]]);const j={mixins:[h("sm",["sm","lg"])],inheritAttrs:!1,setup(e){function s(n){return n[e.size]}return{computedClasses:t.computed(()=>{const n={input:{position:"absolute",opacity:"opacity-0",width:s({sm:"w-8",lg:"w-10"}),height:s({sm:"h-4",lg:"h-5"}),cursor:"cursor-pointer",peer:"peer"},span:{display:"flex items-center",alignItems:"peer-checked:justify-end",width:s({sm:"w-8",lg:"w-10"}),height:s({sm:"h-4",lg:"h-5"}),borderRadius:"rounded-full",backgroundColor:"bg-secondary-300 peer-checked:bg-success",borderWidth:"border",borderColor:"border-secondary-200 peer-checked:border-success-100",ringWidth:"peer-focus:ring-2",ringOffset:"peer-focus:ring-offset-2",ringColor:"peer-focus:ring-success",paddigX:"px-0.5"},spanBefore:{width:s({sm:"before:w-3",lg:"before:w-4"}),height:s({sm:"before:h-3",lg:"before:h-4"}),borderRadius:"before:rounded-full",backgroundColor:"before:bg-white",borderWidth:"before:border",borderColor:"before:border-secondary-200 peer-checked:before:border-success-100"}};return{input:u([c({},n.input)]),span:u([c({},n.span),c({},n.spanBefore)])}})}}},P={class:"container"};function V(e,s,r,n,o,b){return t.openBlock(),t.createElementBlock("div",P,[t.createElementVNode("input",t.mergeProps({type:"checkbox",class:n.computedClasses.input},e.$attrs),null,16),t.createElementVNode("span",{class:t.normalizeClass(n.computedClasses.span)},null,2)])}var N=m(j,[["render",V]]);const R={mixins:[h("sm",["sm","md","lg"])],inheritAttrs:!1,props:{state:{type:[String,Boolean,null],default:null,validator(e){return[null,"warning",!0,!1].includes(e)}}},setup(e){function s(n){return n[e.size]}return{computedClasses:t.computed(()=>{const n={input:{position:"absolute",opacity:"opacity-0",width:s({sm:"w-4",md:"w-5",lg:"w-6"}),height:s({sm:"h-4",md:"h-5",lg:"h-6"}),peer:"peer"},span:{width:s({sm:"w-4",md:"w-5",lg:"w-6"}),height:s({sm:"h-4",md:"h-5",lg:"h-6"}),display:"flex items-center justify-center",borderWidth:s({sm:"border-1.5",md:"border-2",lg:"border-2.5"}),borderColor:e.state===null?"border-primary":e.state==="warning"?"border-warning":e.state===!0?"border-success":"border-danger",borderRadius:"rounded-full",backgroundColor:"bg-white",ringWidth:e.size==="sm"?"peer-focus:ring-1":"peer-focus:ring-2",ringOffset:"peer-focus:ring-offset-2",ringColor:e.state===null?"peer-focus:ring-primary":e.state==="warning"?"peer-focus:ring-warning":e.state===!0?"peer-focus:ring-success":"peer-focus:ring-danger"},spanBefore:{width:s({sm:"before:w-2",md:"before:w-2.5",lg:"before:w-3"}),height:s({sm:"before:h-2",md:"before:h-2.5",lg:"before:h-3"}),borderRadius:"before:rounded-full",backgroundColor:"before:bg-white",backgroundColorChecked:e.state===null?"peer-checked:before:bg-primary":e.state==="warning"?"peer-checked:before:bg-warning":e.state===!0?"peer-checked:before:bg-success":"peer-checked:before:bg-danger"}};return{input:u([c({},n.input)]),span:u([c({},n.span),c({},n.spanBefore)])}})}}},W={class:"container"};function O(e,s,r,n,o,b){return t.openBlock(),t.createElementBlock("div",W,[t.createElementVNode("input",t.mergeProps({type:"radio",class:n.computedClasses.input},e.$attrs),null,16),t.createElementVNode("span",{class:t.normalizeClass(n.computedClasses.span)},null,2)])}var q=m(R,[["render",O]]);const K={mixins:[C("alignTabs","left",["left","center","right"]),C("alignContent","left",["left","center","right"]),p("stretch")],setup(e,{slots:s}){const r=t.ref(s.default().map(a=>a.props));let n=r.value.findIndex(a=>a.active!==void 0);n=n===-1?!1:n;let o=t.ref(r.value[n||0].title);const b=t.ref([]);t.provide("selectedTitle",o);function f(a,g){let d=null;a.keyCode===39&&this.tabProps.length>g+1&&(d=g+1),a.keyCode===37&&g-1>=0&&(d=g-1),a.keyCode===36&&(d=0),a.keyCode===35&&(d=this.tabProps.length-1),d!==null&&this.tabProps[d].disabled===void 0&&(this.selectedTitle=this.tabProps[d].title,b.value[d].focus())}const w=t.computed(()=>{const a={width:"w-full",display:"flex",margin:"mb-8",flexWrap:"flex-wrap",alingItems:"items-center",justifyContent:e.alignTabs==="left"?"justify-start":e.alignTabs==="center"?"justify-center":"justify-end"},g={lineHeight:"leading-5",fontSize:"text-base",fontWeight:"font-semibold",position:"relative",margin:"mb-2",flexGrow:e.stretch?"flex-grow":"",disabled:"disabled:text-secondary-300",after:"after:w-full after:h-0.5 after:absolute after:-bottom-2 after:left-0 after:inline-block after:rounded-full after:bg-transparent"},d=e.alignContent==="left"?"text-left":e.alignContent==="center"?"text-center":"text-right",X="text-primary after:bg-primary",J="text-secondary-500",Q="w-full",U="px-4";return{tabContainer:u([c({},a)]),tab:u([c({},g)]),panel:d,activeTab:X,defaultTab:J,tabMenuContainer:Q,tabText:U}});return{tabProps:r,selectedTitle:o,elements:b,computedClasses:w,handleKeyEvents:f}}},M=["tabindex","aria-selected","disabled","onClick","onKeydown"];function A(e,s,r,n,o,b){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(n.computedClasses.tabMenuContainer)},[t.createElementVNode("div",{class:t.normalizeClass(n.computedClasses.tabContainer),role:"tablist"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tabProps,(f,w)=>(t.openBlock(),t.createElementBlock("button",{key:f.title,ref_for:!0,ref:a=>n.elements[w]=a,role:"tab",tabindex:n.selectedTitle===f.title?"0":"-1","aria-selected":n.selectedTitle===f.title,disabled:f.disabled!==void 0,class:t.normalizeClass([n.computedClasses.tab,n.selectedTitle===f.title?n.computedClasses.activeTab:n.computedClasses.defaultTab]),onClick:a=>n.selectedTitle=f.title,onKeydown:a=>n.handleKeyEvents(a,w)},[t.createElementVNode("span",{class:t.normalizeClass(n.computedClasses.tabText)},t.toDisplayString(f.title),3)],42,M))),128))],2),t.createElementVNode("div",{class:t.normalizeClass(n.computedClasses.panel)},[t.renderSlot(e.$slots,"default")],2)],2)}var D=m(K,[["render",A]]);const I={mixins:[C("title","Title"),p("active"),p("disabled")],setup(){return{selectedTitle:t.inject("selectedTitle")}}},H={role:"tabpanel",tabindex:"0"};function F(e,s,r,n,o,b){return t.withDirectives((t.openBlock(),t.createElementBlock("div",H,[t.renderSlot(e.$slots,"default")],512)),[[t.vShow,e.title==n.selectedTitle]])}var G=m(I,[["render",F]]);i.LuiBadge=L,i.LuiRadio=q,i.LuiSwitch=N,i.LuiTab=G,i.LuiTabs=D,i.LuiText=B,Object.defineProperty(i,"__esModule",{value:!0}),i[Symbol.toStringTag]="Module"});
{
"name": "lvjst",
"version": "0.0.11",
"version": "0.0.12",
"scripts": {

@@ -5,0 +5,0 @@ "dev": "vite",

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