Comparing version 0.0.14 to 0.0.15
@@ -113,3 +113,3 @@ var __defProp = Object.defineProperty; | ||
}; | ||
const _sfc_main$8 = { | ||
const _sfc_main$a = { | ||
mixins: [ | ||
@@ -170,3 +170,3 @@ string("tag", "p", [ | ||
}; | ||
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) { | ||
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps({ class: $setup.classes }, _ctx.$attrs), { | ||
@@ -179,4 +179,4 @@ default: withCtx(() => [ | ||
} | ||
var LuiText = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8]]); | ||
const _sfc_main$7 = { | ||
var LuiText = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]); | ||
const _sfc_main$9 = { | ||
mixins: [variant(), boolean("border"), size(), filter()], | ||
@@ -198,3 +198,3 @@ setup(props) { | ||
}; | ||
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) { | ||
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("span", { | ||
@@ -204,4 +204,4 @@ class: normalizeClass($setup.computedClasses) | ||
} | ||
var LuiBadge = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]); | ||
const _sfc_main$6 = { | ||
var LuiBadge = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]); | ||
const _sfc_main$8 = { | ||
mixins: [size("sm", ["sm", "lg"])], | ||
@@ -254,5 +254,5 @@ inheritAttrs: false, | ||
}; | ||
const _hoisted_1$5 = { class: "container" }; | ||
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("div", _hoisted_1$5, [ | ||
const _hoisted_1$6 = { class: "container" }; | ||
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("div", _hoisted_1$6, [ | ||
createElementVNode("input", mergeProps({ | ||
@@ -267,4 +267,4 @@ type: "checkbox", | ||
} | ||
var LuiSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]); | ||
const _sfc_main$5 = { | ||
var LuiSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8]]); | ||
const _sfc_main$7 = { | ||
mixins: [size("sm", ["sm", "md", "lg"])], | ||
@@ -322,5 +322,5 @@ inheritAttrs: false, | ||
}; | ||
const _hoisted_1$4 = { class: "container" }; | ||
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("div", _hoisted_1$4, [ | ||
const _hoisted_1$5 = { class: "container" }; | ||
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("div", _hoisted_1$5, [ | ||
createElementVNode("input", mergeProps({ | ||
@@ -335,4 +335,4 @@ type: "radio", | ||
} | ||
var LuiRadio = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]); | ||
const _sfc_main$4 = { | ||
var LuiRadio = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]); | ||
const _sfc_main$6 = { | ||
mixins: [ | ||
@@ -408,4 +408,4 @@ string("alignTabs", "left", ["left", "center", "right"]), | ||
}; | ||
const _hoisted_1$3 = ["tabindex", "aria-selected", "disabled", "onClick", "onKeydown"]; | ||
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { | ||
const _hoisted_1$4 = ["tabindex", "aria-selected", "disabled", "onClick", "onKeydown"]; | ||
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("div", { | ||
@@ -437,3 +437,3 @@ class: normalizeClass($setup.computedClasses.tabMenuContainer) | ||
}, toDisplayString(prop.title), 3) | ||
], 42, _hoisted_1$3); | ||
], 42, _hoisted_1$4); | ||
}), 128)) | ||
@@ -448,4 +448,4 @@ ], 2), | ||
} | ||
var LuiTabs = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]); | ||
const _sfc_main$3 = { | ||
var LuiTabs = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]); | ||
const _sfc_main$5 = { | ||
mixins: [string("title", "Title"), boolean("active"), boolean("disabled")], | ||
@@ -457,8 +457,8 @@ setup() { | ||
}; | ||
const _hoisted_1$2 = { | ||
const _hoisted_1$3 = { | ||
role: "tabpanel", | ||
tabindex: "0" | ||
}; | ||
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { | ||
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$2, [ | ||
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) { | ||
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$3, [ | ||
renderSlot(_ctx.$slots, "default") | ||
@@ -469,3 +469,3 @@ ], 512)), [ | ||
} | ||
var LuiTab = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]); | ||
var LuiTab = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]); | ||
const NOOP = () => { | ||
@@ -679,3 +679,3 @@ }; | ||
Promise.resolve(); | ||
const _sfc_main$2 = { | ||
const _sfc_main$4 = { | ||
mixins: [ | ||
@@ -716,7 +716,7 @@ string("name", true), | ||
}; | ||
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { | ||
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("i", mergeProps({ class: $setup.classes }, _ctx.$attrs), null, 16); | ||
} | ||
var LuiIcon = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]); | ||
const _sfc_main$1 = { | ||
var LuiIcon = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]); | ||
const _sfc_main$3 = { | ||
components: { LuiIcon }, | ||
@@ -787,4 +787,4 @@ mixins: [string("title", "title"), boolean("active"), boolean("disabled")], | ||
}; | ||
const _hoisted_1$1 = ["aria-expanded", "disabled"]; | ||
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { | ||
const _hoisted_1$2 = ["aria-expanded", "disabled"]; | ||
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { | ||
const _component_lui_icon = resolveComponent("lui-icon"); | ||
@@ -811,3 +811,3 @@ return openBlock(), createElementBlock("div", { | ||
}, null, 8, ["name", "class"]) | ||
], 42, _hoisted_1$1) | ||
], 42, _hoisted_1$2) | ||
]), | ||
@@ -824,4 +824,4 @@ $setup.isActive ? (openBlock(), createElementBlock("div", { | ||
} | ||
var LuiAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]); | ||
const _sfc_main = { | ||
var LuiAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]); | ||
const _sfc_main$2 = { | ||
setup() { | ||
@@ -832,12 +832,243 @@ let activeTitle = ref(null); | ||
}; | ||
const _hoisted_1 = { | ||
const _hoisted_1$1 = { | ||
ref: "LuiAccordionGroup", | ||
class: "accordionGroup" | ||
}; | ||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("div", _hoisted_1, [ | ||
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("div", _hoisted_1$1, [ | ||
renderSlot(_ctx.$slots, "default") | ||
], 512); | ||
} | ||
var LuiAccordionGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); | ||
export { LuiAccordion, LuiAccordionGroup, LuiBadge, LuiIcon, LuiRadio, LuiSwitch, LuiTab, LuiTabs, LuiText }; | ||
var LuiAccordionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]); | ||
const _sfc_main$1 = { | ||
components: { | ||
LuiIcon | ||
}, | ||
mixins: [ | ||
variant(), | ||
filter(), | ||
boolean("rounded"), | ||
boolean("roundedFull"), | ||
boolean("block"), | ||
boolean("uppercase"), | ||
boolean("iconLine"), | ||
string("prepend"), | ||
string("icon"), | ||
string("type", "default", ["default", "text", "outline", "link", "link-underline"]), | ||
size("md", ["sm", "md", "lg"]) | ||
], | ||
inheritAttrs: false, | ||
props: { | ||
disableStyles: { | ||
type: [Array, Boolean], | ||
default: () => [""], | ||
validator(value) { | ||
return typeof value === "boolean" || ["hover", "focus", "disable", "underline", ""].some((r) => value.indexOf(r) >= 0); | ||
} | ||
} | ||
}, | ||
setup(props, context) { | ||
const computedClasses = computed$1(() => { | ||
const classes = { | ||
padding: props.type === "link" || props.type === "link-underline" ? "p-0" : !context.slots.default ? props.size === "lg" ? "p-3" : props.size === "md" ? "p-2.5" : "p-1.5" : props.size === "lg" ? "px-6 py-3" : props.size === "md" ? "px-4 py-2" : "px-3 py-1.5", | ||
backgroundColor: props.type === "default" ? generateVariant(props.variant, props.filter).backgroundColor : "", | ||
fontColor: props.type === "default" ? generateVariant(props.variant, props.filter).fontColor : props.filter === "none" ? `text-${props.variant}` : props.filter === "darker" ? `text-${props.variant}-800` : `text-${props.variant}-50`, | ||
fontSize: props.size === "sm" ? "text-xs" : "text-base", | ||
lineHeight: props.size === "sm" ? "leading-4.5" : "leading-6", | ||
borderWidth: props.type === "outline" || props.type === "default" ? "border" : "", | ||
borderStyle: props.type === "outline" || props.type === "default" ? "border-solid" : "", | ||
borderColor: props.type === "outline" || props.type === "default" ? props.filter === "none" ? `border-${props.variant}` : props.filter === "darker" ? `border-${props.variant}-800` : `border-${props.variant}-50` : "", | ||
borderBottom: typeof props.disableStyles === "boolean" && props.disableStyles === true || Array.isArray(props.disableStyles) && props.disableStyles.includes("underline") ? "" : props.type === "link-underline" ? props.filter === "darker" ? `border-b border-${props.variant}-800` : props.filter === "lighter" ? `border-b border-${props.variant}-100` : `border-b border-${props.variant}` : "", | ||
borderRadius: props.type !== "link" && (props.rounded || props.roundedFull) ? props.rounded ? `rounded-${props.size}` : props.roundedFull ? "rounded-full" : "" : "", | ||
uppercase: props.uppercase ? "uppercase" : "", | ||
width: !props.block || props.type === "link" ? "" : "w-full", | ||
display: props.prepend !== "none" || props.icon !== "none" ? "flex" : "", | ||
justifyContent: props.prepend !== "none" || props.icon !== "none" ? "justify-center" : "", | ||
alignItems: props.prepend !== "none" || props.icon !== "none" ? "items-center" : "" | ||
}; | ||
let stateClasses = { | ||
hover: { | ||
backgroundColor: props.type === "link" || props.type === "link-underline" ? "" : props.type === "outline" ? props.filter === "darker" ? `hover:bg-${props.variant}-800` : props.filter === "lighter" ? `hover:bg-${props.variant}-50` : `hover:bg-${props.variant}` : props.filter === "lighter" ? `hover:bg-${props.variant}` : `hover:bg-${props.variant}-50`, | ||
fontColor: props.type === "default" ? props.filter === "none" ? `hover:text-${props.variant}` : props.filter === "darker" ? `hover:text-${props.variant}` : "hover:text-white" : props.type !== "outline" ? props.filter === "none" ? `hover:text-${props.variant}--400` : props.filter === "darker" ? `hover:text-${props.variant}--700` : `hover:text-${props.variant}--200` : "hover:text-white", | ||
borderColor: props.type === "outline" ? props.filter === "darker" ? `hover:border-${props.variant}-800` : `hover:border-${props.variant}-50` : props.type === "default" ? `hover:border-${props.variant}-50` : "" | ||
}, | ||
disable: { | ||
backgroundColor: props.type === "default" ? "disabled:bg-secondary-300" : props.type === "outline" ? "disabled:bg-secondary-100" : "", | ||
fontColor: props.type === "default" ? "disabled:text-white" : "disabled:text-secondary-300", | ||
borderColor: "disabled:border-secondary-300" | ||
}, | ||
focus: { | ||
outline: "focus:outline-none", | ||
boxShadow: props.filter === "darker" ? `focus:ring-2 focus:ring-${props.variant}-800 focus:ring-offset-2` : props.filter === "lighter" ? `focus:ring-2 focus:ring-${props.variant}-100 focus:ring-offset-2` : `focus:ring-2 focus:ring-${props.variant} focus:ring-offset-2` | ||
} | ||
}; | ||
if (typeof props.disableStyles === "boolean") { | ||
if (props.disableStyles === true) | ||
stateClasses = ""; | ||
} | ||
if (Array.isArray(props.disableStyles)) | ||
props.disableStyles.map((s) => stateClasses[s] = ""); | ||
const { disable, focus, hover } = stateClasses; | ||
return generateClasses([__spreadValues({}, classes), __spreadValues({}, disable), __spreadValues({}, focus), __spreadValues({}, hover)]); | ||
}); | ||
const iconClasses = computed$1(() => { | ||
const classes = { | ||
fontSize: props.size === "sm" ? "text-base" : props.size === "md" ? "text-xl" : "text-2xl", | ||
lineHeight: props.size === "lg" ? "leading-5" : "leading-none", | ||
prependMargin: props.prepend !== "none" && !!context.slots.default && props.icon === "none" ? props.size === "sm" ? "mr-1.5 -ml-0.5" : "mr-2 -ml-1" : "m-0", | ||
suffixMargin: props.prepend === "none" && !!context.slots.default && props.icon !== "none" ? props.size === "sm" ? "ml-1.5 -mr-0.5" : "ml-2 -mr-1" : "m-0" | ||
}; | ||
return generateClasses([__spreadValues({}, classes)]); | ||
}); | ||
return { computedClasses, iconClasses }; | ||
} | ||
}; | ||
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { | ||
const _component_lui_icon = resolveComponent("lui-icon"); | ||
return openBlock(), createElementBlock("button", mergeProps({ | ||
class: [$setup.computedClasses] | ||
}, _ctx.$attrs), [ | ||
_ctx.prepend !== "none" ? (openBlock(), createBlock(_component_lui_icon, { | ||
key: 0, | ||
name: _ctx.prepend, | ||
fill: !_ctx.iconLine, | ||
line: _ctx.iconLine, | ||
class: normalizeClass($setup.iconClasses) | ||
}, null, 8, ["name", "fill", "line", "class"])) : createCommentVNode("", true), | ||
_ctx.prepend !== "none" && _ctx.icon !== "none" ? (openBlock(), createElementBlock("span", { | ||
key: 1, | ||
class: normalizeClass(_ctx.size === "sm" ? "mx-1.5" : "mx-2.5") | ||
}, [ | ||
renderSlot(_ctx.$slots, "default") | ||
], 2)) : renderSlot(_ctx.$slots, "default", { key: 2 }), | ||
_ctx.icon !== "none" ? (openBlock(), createBlock(_component_lui_icon, { | ||
key: 3, | ||
name: _ctx.icon, | ||
fill: !_ctx.iconLine, | ||
line: _ctx.iconLine, | ||
class: normalizeClass($setup.iconClasses) | ||
}, null, 8, ["name", "fill", "line", "class"])) : createCommentVNode("", true) | ||
], 16); | ||
} | ||
var LuiButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]); | ||
const _sfc_main = { | ||
components: { | ||
LuiIcon, | ||
LuiBadge | ||
}, | ||
mixins: [ | ||
variant(), | ||
filter(), | ||
size(), | ||
boolean("rounded"), | ||
boolean("roundedFull"), | ||
boolean("border"), | ||
string("icon", " "), | ||
string("img", " ") | ||
], | ||
inheritAttrs: false, | ||
props: { | ||
text: { | ||
type: String, | ||
default: "", | ||
validator(value) { | ||
return value.length <= 2; | ||
} | ||
}, | ||
badge: { | ||
type: [Object], | ||
default() { | ||
return { | ||
position: "", | ||
variant: "" | ||
}; | ||
}, | ||
validator(obj) { | ||
return ["", "primary", "secondary", "info", "success", "warning", "danger"].includes(obj.variant) && ["", "top", "bottom"].includes(obj.position); | ||
} | ||
} | ||
}, | ||
emits: ["click"], | ||
setup(props) { | ||
const computedClasses = computed$1(() => { | ||
const classes = { | ||
width: props.size === "2xs" ? "w-5" : props.size === "xs" ? "w-6" : props.size === "sm" ? "w-8" : props.size === "md" ? "w-12" : props.size === "lg" ? "w-16" : "w-12", | ||
height: props.size === "2xs" ? "h-5" : props.size === "xs" ? "h-6" : props.size === "sm" ? "h-8" : props.size === "md" ? "h-12" : props.size === "lg" ? "h-16" : "h-12", | ||
display: "flex", | ||
justifyContent: "justify-center", | ||
alignItems: "items-center", | ||
verticalAlign: "align-middle", | ||
textAlign: "text-center", | ||
position: "relative", | ||
borderSize: props.border ? ["2xs", "xs", "sm"].includes(props.size) ? "border" : "border-2" : "", | ||
borderColor: props.border ? "border-white" : "", | ||
borderStyle: props.border ? "border-solid" : "", | ||
borderRadius: props.roundedFull ? "rounded-full" : props.rounded ? `rounded-${props.size}` : "", | ||
backgroundColor: generateVariant(props.variant, props.filter).backgroundColor, | ||
fontColor: generateVariant(props.variant, props.filter).fontColor, | ||
fontSize: props.size === "2xs" ? "text-2xs" : props.size === "xs" ? "text-2xs" : props.size === "sm" ? "text-sm" : props.size === "md" ? "text-md" : props.size === "lg" ? "text-xl" : "", | ||
fontWeight: "font-semibold" | ||
}; | ||
return generateClasses([__spreadValues({}, classes)]); | ||
}); | ||
const iconClasses = computed$1(() => { | ||
const classes = { | ||
fontSize: ["2xs", "xs"].includes(props.size) ? "text-2xs" : props.size === "sm" ? "text-sm" : props.size === "md" ? "text-xl" : "text-2xl" | ||
}; | ||
return generateClasses([__spreadValues({}, classes)]); | ||
}); | ||
const imgClasses = computed$1(() => { | ||
const classes = { | ||
width: "w-full", | ||
height: "h-full", | ||
borderRadius: props.roundedFull ? "rounded-full" : props.rounded ? `rounded-${props.size}` : "", | ||
objectFit: "object-cover" | ||
}; | ||
return generateClasses([__spreadValues({}, classes)]); | ||
}); | ||
const badgeClasses = computed$1(() => { | ||
const classes = { | ||
position: "absolute", | ||
top: props.badge.position === "top" ? "bottom-full" : "top-full", | ||
left: "left-full", | ||
transform: props.badge.position === "top" ? "-translate-x-1/2 translate-y-1/2" : "-translate-x-1/2 -translate-y-1/2", | ||
margin: props.roundedFull ? props.badge.position === "top" ? props.size === "lg" ? "-ml-2 -mb-2" : props.size === "md" ? "-ml-1.5 -mb-1.5" : props.size === "sm" ? "-ml-1 -mb-1" : props.size === "xs" ? "-ml-0.5 -mb-0.5" : "-ml-0.5 -mb-0.5" : props.size === "lg" ? "-ml-2 -mt-2" : props.size === "md" ? "-ml-1.5 -mt-1.5" : props.size === "sm" ? "-ml-1 -mt-1" : props.size === "xs" ? "-ml-0.5 -mt-0.5" : "-ml-0.5 -mt-0.5" : "" | ||
}; | ||
return generateClasses([__spreadValues({}, classes)]); | ||
}); | ||
return { computedClasses, iconClasses, imgClasses, badgeClasses }; | ||
} | ||
}; | ||
const _hoisted_1 = ["src"]; | ||
const _hoisted_2 = { key: 2 }; | ||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { | ||
const _component_lui_icon = resolveComponent("lui-icon"); | ||
const _component_lui_badge = resolveComponent("lui-badge"); | ||
return openBlock(), createElementBlock("div", mergeProps({ | ||
class: ["lui-avatar", [$setup.computedClasses]] | ||
}, _ctx.$attrs, { | ||
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click")) | ||
}), [ | ||
_ctx.icon !== "none" ? (openBlock(), createBlock(_component_lui_icon, { | ||
key: 0, | ||
name: _ctx.icon, | ||
fill: "", | ||
class: normalizeClass($setup.iconClasses) | ||
}, null, 8, ["name", "class"])) : createCommentVNode("", true), | ||
_ctx.img !== "" ? (openBlock(), createElementBlock("img", { | ||
key: 1, | ||
src: _ctx.img, | ||
class: normalizeClass($setup.imgClasses), | ||
alt: "Lui avatar" | ||
}, null, 10, _hoisted_1)) : (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString($props.text.toUpperCase().slice(0, 2)), 1)), | ||
$props.badge.variant !== "" && $props.badge.position !== "" ? (openBlock(), createBlock(_component_lui_badge, { | ||
key: 3, | ||
class: normalizeClass($setup.badgeClasses), | ||
variant: $props.badge.variant, | ||
border: "", | ||
size: ["2xs", "xs", "sm"].includes(_ctx.size) ? "2xs" : "xs" | ||
}, null, 8, ["class", "variant", "size"])) : createCommentVNode("", true) | ||
], 16); | ||
} | ||
var LuiAvatar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); | ||
export { LuiAccordion, LuiAccordionGroup, LuiAvatar, LuiBadge, LuiButton, LuiIcon, LuiRadio, LuiSwitch, LuiTab, LuiTabs, LuiText }; |
@@ -1,1 +0,1 @@ | ||
var De=Object.defineProperty;var j=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable;var P=(o,n,m)=>n in o?De(o,n,{enumerable:!0,configurable:!0,writable:!0,value:m}):o[n]=m,a=(o,n)=>{for(var m in n||(n={}))We.call(n,m)&&P(o,m,n[m]);if(j)for(var m of j(n))Fe.call(n,m)&&P(o,m,n[m]);return o};(function(o,n){typeof exports=="object"&&typeof module!="undefined"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(o=typeof globalThis!="undefined"?globalThis:o||self,n(o.LuiVue={},o.Vue))})(this,function(o,n){"use strict";var m="";function B(e,t){return{props:{[e||"variant"]:{type:String,default:t||"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 N(e){return{props:{[e||"filter"]:{type:String,default:"none",validator(t){return["darker","lighter","none"].includes(t)}}}}}function C(e,t){const s=t||["2xs","xs","sm","md","lg"];return{props:{size:{type:String,default:e||"md",validator:i=>s.includes(i)}}}}function h(e,t){return{props:{[e]:{type:Boolean,default:t||!1}}}}function k(e,t,r){let s={type:String,default:t||"none"};return r!==void 0&&(s.validator=i=>r.includes(i)),{props:{[e]:s}}}function d(e){const t=[];return e.map(r=>{t.push(...Object.values(r))}),t.join(" ").toString().replace(/\s+/g," ")}function I(e,t){const r=t==="none"?`bg-${e}`:t==="darker"?`bg-${e}-800`:`bg-${e}-100`,s=t==="none"?"text-white":t==="darker"?`text-${e}-100`:`text-${e}-800`;return{backgroundColor:r,fontColor:s}}var g=(e,t)=>{const r=e.__vccOpts||e;for(const[s,i]of t)r[s]=i;return r};const D={mixins:[k("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"]),C("md",["xs","sm","md","lg"]),B("variant","secondary")],setup(e){return{classes:n.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 d([a({},r)])})}}};function W(e,t,r,s,i,c){return n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.tag),n.mergeProps({class:s.classes},e.$attrs),{default:n.withCtx(()=>[n.renderSlot(e.$slots,"default")]),_:3},16,["class"])}var F=g(D,[["render",W]]);const M={mixins:[B(),h("border"),C(),N()],setup(e){return{computedClasses:n.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:I(e.variant,e.filter).backgroundColor,border:e.border?"border border-white":"",display:"inline-block",borderRadius:"rounded-full"};return d([a({},r)])})}}};function G(e,t,r,s,i,c){return n.openBlock(),n.createElementBlock("span",{class:n.normalizeClass(s.computedClasses)},null,2)}var O=g(M,[["render",G]]);const q={mixins:[C("sm",["sm","lg"])],inheritAttrs:!1,setup(e){function t(s){return s[e.size]}return{computedClasses:n.computed(()=>{const s={input:{position:"absolute",opacity:"opacity-0",width:t({sm:"w-8",lg:"w-10"}),height:t({sm:"h-4",lg:"h-5"}),cursor:"cursor-pointer",peer:"peer"},span:{display:"flex items-center",alignItems:"peer-checked:justify-end",width:t({sm:"w-8",lg:"w-10"}),height:t({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:t({sm:"before:w-3",lg:"before:w-4"}),height:t({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:d([a({},s.input)]),span:d([a({},s.span),a({},s.spanBefore)])}})}}},K={class:"container"};function H(e,t,r,s,i,c){return n.openBlock(),n.createElementBlock("div",K,[n.createElementVNode("input",n.mergeProps({type:"checkbox",class:s.computedClasses.input},e.$attrs),null,16),n.createElementVNode("span",{class:n.normalizeClass(s.computedClasses.span)},null,2)])}var X=g(q,[["render",H]]);const Y={mixins:[C("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 t(s){return s[e.size]}return{computedClasses:n.computed(()=>{const s={input:{position:"absolute",opacity:"opacity-0",width:t({sm:"w-4",md:"w-5",lg:"w-6"}),height:t({sm:"h-4",md:"h-5",lg:"h-6"}),peer:"peer"},span:{width:t({sm:"w-4",md:"w-5",lg:"w-6"}),height:t({sm:"h-4",md:"h-5",lg:"h-6"}),display:"flex items-center justify-center",borderWidth:t({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:t({sm:"before:w-2",md:"before:w-2.5",lg:"before:w-3"}),height:t({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:d([a({},s.input)]),span:d([a({},s.span),a({},s.spanBefore)])}})}}},v={class:"container"};function J(e,t,r,s,i,c){return n.openBlock(),n.createElementBlock("div",v,[n.createElementVNode("input",n.mergeProps({type:"radio",class:s.computedClasses.input},e.$attrs),null,16),n.createElementVNode("span",{class:n.normalizeClass(s.computedClasses.span)},null,2)])}var Q=g(Y,[["render",J]]);const U={mixins:[k("alignTabs","left",["left","center","right"]),k("alignContent","left",["left","center","right"]),h("stretch")],setup(e,{slots:t}){const r=n.ref(t.default().map(l=>l.props));let s=r.value.findIndex(l=>l.active!==void 0);s=s===-1?!1:s;let i=n.ref(r.value[s||0].title);const c=n.ref([]);n.provide("selectedTitle",i);function f(l,y){let u=null;l.keyCode===39&&this.tabProps.length>y+1&&(u=y+1),l.keyCode===37&&y-1>=0&&(u=y-1),l.keyCode===36&&(u=0),l.keyCode===35&&(u=this.tabProps.length-1),u!==null&&this.tabProps[u].disabled===void 0&&(this.selectedTitle=this.tabProps[u].title,c.value[u].focus())}const b=n.computed(()=>{const l={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"},y={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"},u=e.alignContent==="left"?"text-left":e.alignContent==="center"?"text-center":"text-right",S="text-primary after:bg-primary",Pe="text-secondary-500",Ne="w-full",Ie="px-4";return{tabContainer:d([a({},l)]),tab:d([a({},y)]),panel:u,activeTab:S,defaultTab:Pe,tabMenuContainer:Ne,tabText:Ie}});return{tabProps:r,selectedTitle:i,elements:c,computedClasses:b,handleKeyEvents:f}}},Z=["tabindex","aria-selected","disabled","onClick","onKeydown"];function ee(e,t,r,s,i,c){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(s.computedClasses.tabMenuContainer)},[n.createElementVNode("div",{class:n.normalizeClass(s.computedClasses.tabContainer),role:"tablist"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.tabProps,(f,b)=>(n.openBlock(),n.createElementBlock("button",{key:f.title,ref_for:!0,ref:l=>s.elements[b]=l,role:"tab",tabindex:s.selectedTitle===f.title?"0":"-1","aria-selected":s.selectedTitle===f.title,disabled:f.disabled!==void 0,class:n.normalizeClass([s.computedClasses.tab,s.selectedTitle===f.title?s.computedClasses.activeTab:s.computedClasses.defaultTab]),onClick:l=>s.selectedTitle=f.title,onKeydown:l=>s.handleKeyEvents(l,b)},[n.createElementVNode("span",{class:n.normalizeClass(s.computedClasses.tabText)},n.toDisplayString(f.title),3)],42,Z))),128))],2),n.createElementVNode("div",{class:n.normalizeClass(s.computedClasses.panel)},[n.renderSlot(e.$slots,"default")],2)],2)}var te=g(U,[["render",ee]]);const ne={mixins:[k("title","Title"),h("active"),h("disabled")],setup(){return{selectedTitle:n.inject("selectedTitle")}}},se={role:"tabpanel",tabindex:"0"};function re(e,t,r,s,i,c){return n.withDirectives((n.openBlock(),n.createElementBlock("div",se,[n.renderSlot(e.$slots,"default")],512)),[[n.vShow,e.title==s.selectedTitle]])}var ie=g(ne,[["render",re]]);const oe=()=>{},le=Array.isArray,ae=e=>typeof e=="function",ce=e=>typeof e=="symbol";let de;function fe(e,t){t=t||de,t&&t.active&&t.effects.push(e)}const ue=e=>{const t=new Set(e);return t.w=0,t.n=0,t},E=e=>(e.w&p)>0,L=e=>(e.n&p)>0,me=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=p},be=e=>{const{deps:t}=e;if(t.length){let r=0;for(let s=0;s<t.length;s++){const i=t[s];E(i)&&!L(i)?i.delete(e):t[r++]=i,i.w&=~p,i.n&=~p}t.length=r}};let _=0,p=1;const T=30,x=[];let w;class ge{constructor(t,r=null,s){this.fn=t,this.scheduler=r,this.active=!0,this.deps=[],fe(this,s)}run(){if(!this.active)return this.fn();if(!x.includes(this))try{return x.push(w=this),he(),p=1<<++_,_<=T?me(this):A(this),this.fn()}finally{_<=T&&be(this),p=1<<--_,pe(),x.pop();const t=x.length;w=t>0?x[t-1]:void 0}}stop(){this.active&&(A(this),this.onStop&&this.onStop(),this.active=!1)}}function A(e){const{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}let $=!0;const R=[];function he(){R.push($),$=!0}function pe(){const e=R.pop();$=e===void 0?!0:e}function ye(){return $&&w!==void 0}function we(e,t){let r=!1;_<=T?L(e)||(e.n|=p,r=!E(e)):r=!e.has(w),r&&(e.add(w),w.deps.push(e))}function ke(e,t){for(const r of le(e)?e:[...e])(r!==w||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(ce));function z(e){const t=e&&e.__v_raw;return t?z(t):e}function Ce(e){ye()&&(e=z(e),e.dep||(e.dep=ue()),we(e.dep))}function _e(e,t){e=z(e),e.dep&&ke(e.dep)}class xe{constructor(t,r,s){this._setter=r,this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this.effect=new ge(t,()=>{this._dirty||(this._dirty=!0,_e(this))}),this.__v_isReadonly=s}get value(){const t=z(this);return Ce(t),t._dirty&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function $e(e,t){let r,s;const i=ae(e);return i?(r=e,s=oe):(r=e.get,s=e.set),new xe(r,s,i||!s)}Promise.resolve();const ze={mixins:[k("name",!0),h("fill"),h("line"),C("none",["lg","xl","xxs","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x","fw","fwh","none"])],setup(e){return{classes:$e(()=>[`ri-${e.name}${e.fill?"-fill":""}${e.line?"-line":""}`,e.size!=="none"?`ri-${e.size}`:""])}}};function Te(e,t,r,s,i,c){return n.openBlock(),n.createElementBlock("i",n.mergeProps({class:s.classes},e.$attrs),null,16)}var V=g(ze,[["render",Te]]);const Se={components:{LuiIcon:V},mixins:[k("title","title"),h("active"),h("disabled")],setup(e){let t=n.inject("activeAccordion",n.ref(null)),r=n.computed(()=>t.value===e.title);function s(){t.value!==e.title?t.value=e.title:t.value=""}let i=n.ref(!1);const c=n.computed(()=>{const f={wrapper:{width:"w-full",border:"border",borderColor:e.disabled?"border-secondary-100":"border-secondary-200",borderRadius:"rounded-2xl",paddingY:"py-8",paddingX:"px-6",margin:"mb-7",focus:i.value?"ring-2 ring-primary ring-offset-2":""},button:{width:"w-full",display:"flex",alignItems:"items-center",justifyContent:"justify-between",disabled:"text-secondary-700 disabled:text-secondary-300",outline:"outline-none"},title:{fontSize:"text-lg",fontWeight:"font-semibold",lineHeight:"leading-6"},icon:{fontSize:"text-2xl"},content:{marginTop:"mt-6",fontColor:"text-secondary-600"}},{wrapper:b,button:l,title:y,icon:u,content:S}=f;return{wrapper:d([a({},b)]),button:d([a({},l)]),title:d([a({},y)]),icon:d([a({},u)]),content:d([a({},S)])}});return{expandItem:s,isActive:r,computedClasses:c,btnFocus:i}}},Be=["aria-expanded","disabled"];function Ee(e,t,r,s,i,c){const f=n.resolveComponent("lui-icon");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(s.computedClasses.wrapper)},[n.createElementVNode("h3",null,[n.createElementVNode("button",{"aria-expanded":s.isActive,disabled:e.disabled,class:n.normalizeClass(s.computedClasses.button),onClick:t[0]||(t[0]=(...b)=>s.expandItem&&s.expandItem(...b)),onFocus:t[1]||(t[1]=b=>s.btnFocus=!0),onFocusout:t[2]||(t[2]=b=>s.btnFocus=!1)},[n.createElementVNode("span",{class:n.normalizeClass(s.computedClasses.title)},n.toDisplayString(e.title),3),n.createVNode(f,{name:s.isActive?"close":"add",line:"",class:n.normalizeClass(s.computedClasses.icon)},null,8,["name","class"])],42,Be)]),s.isActive?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(s.computedClasses.content),role:"region",tabindex:"0"},[n.renderSlot(e.$slots,"default")],2)):n.createCommentVNode("",!0)],2)}var Le=g(Se,[["render",Ee]]);const Ae={setup(){let e=n.ref(null);n.provide("activeAccordion",e)}},Re={ref:"LuiAccordionGroup",class:"accordionGroup"};function Ve(e,t,r,s,i,c){return n.openBlock(),n.createElementBlock("div",Re,[n.renderSlot(e.$slots,"default")],512)}var je=g(Ae,[["render",Ve]]);o.LuiAccordion=Le,o.LuiAccordionGroup=je,o.LuiBadge=O,o.LuiIcon=V,o.LuiRadio=Q,o.LuiSwitch=X,o.LuiTab=ie,o.LuiTabs=te,o.LuiText=F,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"}); | ||
var Ke=Object.defineProperty;var F=Object.getOwnPropertySymbols;var Xe=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable;var I=(a,t,g)=>t in a?Ke(a,t,{enumerable:!0,configurable:!0,writable:!0,value:g}):a[t]=g,o=(a,t)=>{for(var g in t||(t={}))Xe.call(t,g)&&I(a,g,t[g]);if(F)for(var g of F(t))Ue.call(t,g)&&I(a,g,t[g]);return a};(function(a,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(a=typeof globalThis!="undefined"?globalThis:a||self,t(a.LuiVue={},a.Vue))})(this,function(a,t){"use strict";var g="";function B(e,n){return{props:{[e||"variant"]:{type:String,default:n||"primary",validator(l){return(e==="variant"?["primary","secondary","info","success","warning","danger"]:["light","dark","white","black","primary","secondary","info","success","warning","danger"]).includes(l)}}}}}function L(e){return{props:{[e||"filter"]:{type:String,default:"none",validator(n){return["darker","lighter","none"].includes(n)}}}}}function x(e,n){const i=n||["2xs","xs","sm","md","lg"];return{props:{size:{type:String,default:e||"md",validator:r=>i.includes(r)}}}}function u(e,n){return{props:{[e]:{type:Boolean,default:n||!1}}}}function h(e,n,l){let i={type:String,default:n||"none"};return l!==void 0&&(i.validator=r=>l.includes(r)),{props:{[e]:i}}}function f(e){const n=[];return e.map(l=>{n.push(...Object.values(l))}),n.join(" ").toString().replace(/\s+/g," ")}function z(e,n){const l=n==="none"?`bg-${e}`:n==="darker"?`bg-${e}-800`:`bg-${e}-100`,i=n==="none"?"text-white":n==="darker"?`text-${e}-100`:`text-${e}-800`;return{backgroundColor:l,fontColor:i}}var y=(e,n)=>{const l=e.__vccOpts||e;for(const[i,r]of n)l[i]=r;return l};const W={mixins:[h("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"]),x("md",["xs","sm","md","lg"]),B("variant","secondary")],setup(e){return{classes:t.computed(()=>{const l={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 f([o({},l)])})}}};function D(e,n,l,i,r,s){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tag),t.mergeProps({class:i.classes},e.$attrs),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["class"])}var M=y(W,[["render",D]]);const O={mixins:[B(),u("border"),x(),L()],setup(e){return{computedClasses:t.computed(()=>{const l={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 f([o({},l)])})}}};function G(e,n,l,i,r,s){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(i.computedClasses)},null,2)}var V=y(O,[["render",G]]);const H={mixins:[x("sm",["sm","lg"])],inheritAttrs:!1,setup(e){function n(i){return i[e.size]}return{computedClasses:t.computed(()=>{const i={input:{position:"absolute",opacity:"opacity-0",width:n({sm:"w-8",lg:"w-10"}),height:n({sm:"h-4",lg:"h-5"}),cursor:"cursor-pointer",peer:"peer"},span:{display:"flex items-center",alignItems:"peer-checked:justify-end",width:n({sm:"w-8",lg:"w-10"}),height:n({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:n({sm:"before:w-3",lg:"before:w-4"}),height:n({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:f([o({},i.input)]),span:f([o({},i.span),o({},i.spanBefore)])}})}}},q={class:"container"};function K(e,n,l,i,r,s){return t.openBlock(),t.createElementBlock("div",q,[t.createElementVNode("input",t.mergeProps({type:"checkbox",class:i.computedClasses.input},e.$attrs),null,16),t.createElementVNode("span",{class:t.normalizeClass(i.computedClasses.span)},null,2)])}var X=y(H,[["render",K]]);const U={mixins:[x("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 n(i){return i[e.size]}return{computedClasses:t.computed(()=>{const i={input:{position:"absolute",opacity:"opacity-0",width:n({sm:"w-4",md:"w-5",lg:"w-6"}),height:n({sm:"h-4",md:"h-5",lg:"h-6"}),peer:"peer"},span:{width:n({sm:"w-4",md:"w-5",lg:"w-6"}),height:n({sm:"h-4",md:"h-5",lg:"h-6"}),display:"flex items-center justify-center",borderWidth:n({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:n({sm:"before:w-2",md:"before:w-2.5",lg:"before:w-3"}),height:n({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:f([o({},i.input)]),span:f([o({},i.span),o({},i.spanBefore)])}})}}},Y={class:"container"};function J(e,n,l,i,r,s){return t.openBlock(),t.createElementBlock("div",Y,[t.createElementVNode("input",t.mergeProps({type:"radio",class:i.computedClasses.input},e.$attrs),null,16),t.createElementVNode("span",{class:t.normalizeClass(i.computedClasses.span)},null,2)])}var Q=y(U,[["render",J]]);const Z={mixins:[h("alignTabs","left",["left","center","right"]),h("alignContent","left",["left","center","right"]),u("stretch")],setup(e,{slots:n}){const l=t.ref(n.default().map(c=>c.props));let i=l.value.findIndex(c=>c.active!==void 0);i=i===-1?!1:i;let r=t.ref(l.value[i||0].title);const s=t.ref([]);t.provide("selectedTitle",r);function d(c,k){let b=null;c.keyCode===39&&this.tabProps.length>k+1&&(b=k+1),c.keyCode===37&&k-1>=0&&(b=k-1),c.keyCode===36&&(b=0),c.keyCode===35&&(b=this.tabProps.length-1),b!==null&&this.tabProps[b].disabled===void 0&&(this.selectedTitle=this.tabProps[b].title,s.value[b].focus())}const m=t.computed(()=>{const c={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"},k={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"},b=e.alignContent==="left"?"text-left":e.alignContent==="center"?"text-center":"text-right",v="text-primary after:bg-primary",Ge="text-secondary-500",He="w-full",qe="px-4";return{tabContainer:f([o({},c)]),tab:f([o({},k)]),panel:b,activeTab:v,defaultTab:Ge,tabMenuContainer:He,tabText:qe}});return{tabProps:l,selectedTitle:r,elements:s,computedClasses:m,handleKeyEvents:d}}},p=["tabindex","aria-selected","disabled","onClick","onKeydown"];function ee(e,n,l,i,r,s){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(i.computedClasses.tabMenuContainer)},[t.createElementVNode("div",{class:t.normalizeClass(i.computedClasses.tabContainer),role:"tablist"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.tabProps,(d,m)=>(t.openBlock(),t.createElementBlock("button",{key:d.title,ref_for:!0,ref:c=>i.elements[m]=c,role:"tab",tabindex:i.selectedTitle===d.title?"0":"-1","aria-selected":i.selectedTitle===d.title,disabled:d.disabled!==void 0,class:t.normalizeClass([i.computedClasses.tab,i.selectedTitle===d.title?i.computedClasses.activeTab:i.computedClasses.defaultTab]),onClick:c=>i.selectedTitle=d.title,onKeydown:c=>i.handleKeyEvents(c,m)},[t.createElementVNode("span",{class:t.normalizeClass(i.computedClasses.tabText)},t.toDisplayString(d.title),3)],42,p))),128))],2),t.createElementVNode("div",{class:t.normalizeClass(i.computedClasses.panel)},[t.renderSlot(e.$slots,"default")],2)],2)}var te=y(Z,[["render",ee]]);const ne={mixins:[h("title","Title"),u("active"),u("disabled")],setup(){return{selectedTitle:t.inject("selectedTitle")}}},ie={role:"tabpanel",tabindex:"0"};function le(e,n,l,i,r,s){return t.withDirectives((t.openBlock(),t.createElementBlock("div",ie,[t.renderSlot(e.$slots,"default")],512)),[[t.vShow,e.title==i.selectedTitle]])}var re=y(ne,[["render",le]]);const se=()=>{},ae=Array.isArray,oe=e=>typeof e=="function",de=e=>typeof e=="symbol";let ce;function fe(e,n){n=n||ce,n&&n.active&&n.effects.push(e)}const ue=e=>{const n=new Set(e);return n.w=0,n.n=0,n},j=e=>(e.w&C)>0,R=e=>(e.n&C)>0,me=({deps:e})=>{if(e.length)for(let n=0;n<e.length;n++)e[n].w|=C},be=e=>{const{deps:n}=e;if(n.length){let l=0;for(let i=0;i<n.length;i++){const r=n[i];j(r)&&!R(r)?r.delete(e):n[l++]=r,r.w&=~C,r.n&=~C}n.length=l}};let $=0,C=1;const A=30,_=[];let w;class ge{constructor(n,l=null,i){this.fn=n,this.scheduler=l,this.active=!0,this.deps=[],fe(this,i)}run(){if(!this.active)return this.fn();if(!_.includes(this))try{return _.push(w=this),he(),C=1<<++$,$<=A?me(this):N(this),this.fn()}finally{$<=A&&be(this),C=1<<--$,ye(),_.pop();const n=_.length;w=n>0?_[n-1]:void 0}}stop(){this.active&&(N(this),this.onStop&&this.onStop(),this.active=!1)}}function N(e){const{deps:n}=e;if(n.length){for(let l=0;l<n.length;l++)n[l].delete(e);n.length=0}}let S=!0;const P=[];function he(){P.push(S),S=!0}function ye(){const e=P.pop();S=e===void 0?!0:e}function ke(){return S&&w!==void 0}function Ce(e,n){let l=!1;$<=A?R(e)||(e.n|=C,l=!j(e)):l=!e.has(w),l&&(e.add(w),w.deps.push(e))}function xe(e,n){for(const l of ae(e)?e:[...e])(l!==w||l.allowRecurse)&&(l.scheduler?l.scheduler():l.run())}new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(de));function T(e){const n=e&&e.__v_raw;return n?T(n):e}function we(e){ke()&&(e=T(e),e.dep||(e.dep=ue()),Ce(e.dep))}function ze(e,n){e=T(e),e.dep&&xe(e.dep)}class $e{constructor(n,l,i){this._setter=l,this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this.effect=new ge(n,()=>{this._dirty||(this._dirty=!0,ze(this))}),this.__v_isReadonly=i}get value(){const n=T(this);return we(n),n._dirty&&(n._dirty=!1,n._value=n.effect.run()),n._value}set value(n){this._setter(n)}}function _e(e,n){let l,i;const r=oe(e);return r?(l=e,i=se):(l=e.get,i=e.set),new $e(l,i,r||!i)}Promise.resolve();const Be={mixins:[h("name",!0),u("fill"),u("line"),x("none",["lg","xl","xxs","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x","fw","fwh","none"])],setup(e){return{classes:_e(()=>[`ri-${e.name}${e.fill?"-fill":""}${e.line?"-line":""}`,e.size!=="none"?`ri-${e.size}`:""])}}};function Se(e,n,l,i,r,s){return t.openBlock(),t.createElementBlock("i",t.mergeProps({class:i.classes},e.$attrs),null,16)}var E=y(Be,[["render",Se]]);const Te={components:{LuiIcon:E},mixins:[h("title","title"),u("active"),u("disabled")],setup(e){let n=t.inject("activeAccordion",t.ref(null)),l=t.computed(()=>n.value===e.title);function i(){n.value!==e.title?n.value=e.title:n.value=""}let r=t.ref(!1);const s=t.computed(()=>{const d={wrapper:{width:"w-full",border:"border",borderColor:e.disabled?"border-secondary-100":"border-secondary-200",borderRadius:"rounded-2xl",paddingY:"py-8",paddingX:"px-6",margin:"mb-7",focus:r.value?"ring-2 ring-primary ring-offset-2":""},button:{width:"w-full",display:"flex",alignItems:"items-center",justifyContent:"justify-between",disabled:"text-secondary-700 disabled:text-secondary-300",outline:"outline-none"},title:{fontSize:"text-lg",fontWeight:"font-semibold",lineHeight:"leading-6"},icon:{fontSize:"text-2xl"},content:{marginTop:"mt-6",fontColor:"text-secondary-600"}},{wrapper:m,button:c,title:k,icon:b,content:v}=d;return{wrapper:f([o({},m)]),button:f([o({},c)]),title:f([o({},k)]),icon:f([o({},b)]),content:f([o({},v)])}});return{expandItem:i,isActive:l,computedClasses:s,btnFocus:r}}},Ee=["aria-expanded","disabled"];function Le(e,n,l,i,r,s){const d=t.resolveComponent("lui-icon");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(i.computedClasses.wrapper)},[t.createElementVNode("h3",null,[t.createElementVNode("button",{"aria-expanded":i.isActive,disabled:e.disabled,class:t.normalizeClass(i.computedClasses.button),onClick:n[0]||(n[0]=(...m)=>i.expandItem&&i.expandItem(...m)),onFocus:n[1]||(n[1]=m=>i.btnFocus=!0),onFocusout:n[2]||(n[2]=m=>i.btnFocus=!1)},[t.createElementVNode("span",{class:t.normalizeClass(i.computedClasses.title)},t.toDisplayString(e.title),3),t.createVNode(d,{name:i.isActive?"close":"add",line:"",class:t.normalizeClass(i.computedClasses.icon)},null,8,["name","class"])],42,Ee)]),i.isActive?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(i.computedClasses.content),role:"region",tabindex:"0"},[t.renderSlot(e.$slots,"default")],2)):t.createCommentVNode("",!0)],2)}var Ae=y(Te,[["render",Le]]);const ve={setup(){let e=t.ref(null);t.provide("activeAccordion",e)}},Ve={ref:"LuiAccordionGroup",class:"accordionGroup"};function je(e,n,l,i,r,s){return t.openBlock(),t.createElementBlock("div",Ve,[t.renderSlot(e.$slots,"default")],512)}var Re=y(ve,[["render",je]]);const Ne={components:{LuiIcon:E},mixins:[B(),L(),u("rounded"),u("roundedFull"),u("block"),u("uppercase"),u("iconLine"),h("prepend"),h("icon"),h("type","default",["default","text","outline","link","link-underline"]),x("md",["sm","md","lg"])],inheritAttrs:!1,props:{disableStyles:{type:[Array,Boolean],default:()=>[""],validator(e){return typeof e=="boolean"||["hover","focus","disable","underline",""].some(n=>e.indexOf(n)>=0)}}},setup(e,n){const l=t.computed(()=>{const r={padding:e.type==="link"||e.type==="link-underline"?"p-0":n.slots.default?e.size==="lg"?"px-6 py-3":e.size==="md"?"px-4 py-2":"px-3 py-1.5":e.size==="lg"?"p-3":e.size==="md"?"p-2.5":"p-1.5",backgroundColor:e.type==="default"?z(e.variant,e.filter).backgroundColor:"",fontColor:e.type==="default"?z(e.variant,e.filter).fontColor:e.filter==="none"?`text-${e.variant}`:e.filter==="darker"?`text-${e.variant}-800`:`text-${e.variant}-50`,fontSize:e.size==="sm"?"text-xs":"text-base",lineHeight:e.size==="sm"?"leading-4.5":"leading-6",borderWidth:e.type==="outline"||e.type==="default"?"border":"",borderStyle:e.type==="outline"||e.type==="default"?"border-solid":"",borderColor:e.type==="outline"||e.type==="default"?e.filter==="none"?`border-${e.variant}`:e.filter==="darker"?`border-${e.variant}-800`:`border-${e.variant}-50`:"",borderBottom:typeof e.disableStyles=="boolean"&&e.disableStyles===!0||Array.isArray(e.disableStyles)&&e.disableStyles.includes("underline")?"":e.type==="link-underline"?e.filter==="darker"?`border-b border-${e.variant}-800`:e.filter==="lighter"?`border-b border-${e.variant}-100`:`border-b border-${e.variant}`:"",borderRadius:e.type!=="link"&&(e.rounded||e.roundedFull)?e.rounded?`rounded-${e.size}`:e.roundedFull?"rounded-full":"":"",uppercase:e.uppercase?"uppercase":"",width:!e.block||e.type==="link"?"":"w-full",display:e.prepend!=="none"||e.icon!=="none"?"flex":"",justifyContent:e.prepend!=="none"||e.icon!=="none"?"justify-center":"",alignItems:e.prepend!=="none"||e.icon!=="none"?"items-center":""};let s={hover:{backgroundColor:e.type==="link"||e.type==="link-underline"?"":e.type==="outline"?e.filter==="darker"?`hover:bg-${e.variant}-800`:e.filter==="lighter"?`hover:bg-${e.variant}-50`:`hover:bg-${e.variant}`:e.filter==="lighter"?`hover:bg-${e.variant}`:`hover:bg-${e.variant}-50`,fontColor:e.type==="default"?e.filter==="none"?`hover:text-${e.variant}`:e.filter==="darker"?`hover:text-${e.variant}`:"hover:text-white":e.type!=="outline"?e.filter==="none"?`hover:text-${e.variant}--400`:e.filter==="darker"?`hover:text-${e.variant}--700`:`hover:text-${e.variant}--200`:"hover:text-white",borderColor:e.type==="outline"?e.filter==="darker"?`hover:border-${e.variant}-800`:`hover:border-${e.variant}-50`:e.type==="default"?`hover:border-${e.variant}-50`:""},disable:{backgroundColor:e.type==="default"?"disabled:bg-secondary-300":e.type==="outline"?"disabled:bg-secondary-100":"",fontColor:e.type==="default"?"disabled:text-white":"disabled:text-secondary-300",borderColor:"disabled:border-secondary-300"},focus:{outline:"focus:outline-none",boxShadow:e.filter==="darker"?`focus:ring-2 focus:ring-${e.variant}-800 focus:ring-offset-2`:e.filter==="lighter"?`focus:ring-2 focus:ring-${e.variant}-100 focus:ring-offset-2`:`focus:ring-2 focus:ring-${e.variant} focus:ring-offset-2`}};typeof e.disableStyles=="boolean"&&e.disableStyles===!0&&(s=""),Array.isArray(e.disableStyles)&&e.disableStyles.map(k=>s[k]="");const{disable:d,focus:m,hover:c}=s;return f([o({},r),o({},d),o({},m),o({},c)])}),i=t.computed(()=>{const r={fontSize:e.size==="sm"?"text-base":e.size==="md"?"text-xl":"text-2xl",lineHeight:e.size==="lg"?"leading-5":"leading-none",prependMargin:e.prepend!=="none"&&!!n.slots.default&&e.icon==="none"?e.size==="sm"?"mr-1.5 -ml-0.5":"mr-2 -ml-1":"m-0",suffixMargin:e.prepend==="none"&&!!n.slots.default&&e.icon!=="none"?e.size==="sm"?"ml-1.5 -mr-0.5":"ml-2 -mr-1":"m-0"};return f([o({},r)])});return{computedClasses:l,iconClasses:i}}};function Pe(e,n,l,i,r,s){const d=t.resolveComponent("lui-icon");return t.openBlock(),t.createElementBlock("button",t.mergeProps({class:[i.computedClasses]},e.$attrs),[e.prepend!=="none"?(t.openBlock(),t.createBlock(d,{key:0,name:e.prepend,fill:!e.iconLine,line:e.iconLine,class:t.normalizeClass(i.iconClasses)},null,8,["name","fill","line","class"])):t.createCommentVNode("",!0),e.prepend!=="none"&&e.icon!=="none"?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(e.size==="sm"?"mx-1.5":"mx-2.5")},[t.renderSlot(e.$slots,"default")],2)):t.renderSlot(e.$slots,"default",{key:2}),e.icon!=="none"?(t.openBlock(),t.createBlock(d,{key:3,name:e.icon,fill:!e.iconLine,line:e.iconLine,class:t.normalizeClass(i.iconClasses)},null,8,["name","fill","line","class"])):t.createCommentVNode("",!0)],16)}var Fe=y(Ne,[["render",Pe]]);const Ie={components:{LuiIcon:E,LuiBadge:V},mixins:[B(),L(),x(),u("rounded"),u("roundedFull"),u("border"),h("icon"," "),h("img"," ")],inheritAttrs:!1,props:{text:{type:String,default:"",validator(e){return e.length<=2}},badge:{type:[Object],default(){return{position:"",variant:""}},validator(e){return["","primary","secondary","info","success","warning","danger"].includes(e.variant)&&["","top","bottom"].includes(e.position)}}},emits:["click"],setup(e){const n=t.computed(()=>{const s={width:e.size==="2xs"?"w-5":e.size==="xs"?"w-6":e.size==="sm"?"w-8":e.size==="md"?"w-12":e.size==="lg"?"w-16":"w-12",height:e.size==="2xs"?"h-5":e.size==="xs"?"h-6":e.size==="sm"?"h-8":e.size==="md"?"h-12":e.size==="lg"?"h-16":"h-12",display:"flex",justifyContent:"justify-center",alignItems:"items-center",verticalAlign:"align-middle",textAlign:"text-center",position:"relative",borderSize:e.border?["2xs","xs","sm"].includes(e.size)?"border":"border-2":"",borderColor:e.border?"border-white":"",borderStyle:e.border?"border-solid":"",borderRadius:e.roundedFull?"rounded-full":e.rounded?`rounded-${e.size}`:"",backgroundColor:z(e.variant,e.filter).backgroundColor,fontColor:z(e.variant,e.filter).fontColor,fontSize:e.size==="2xs"||e.size==="xs"?"text-2xs":e.size==="sm"?"text-sm":e.size==="md"?"text-md":e.size==="lg"?"text-xl":"",fontWeight:"font-semibold"};return f([o({},s)])}),l=t.computed(()=>{const s={fontSize:["2xs","xs"].includes(e.size)?"text-2xs":e.size==="sm"?"text-sm":e.size==="md"?"text-xl":"text-2xl"};return f([o({},s)])}),i=t.computed(()=>{const s={width:"w-full",height:"h-full",borderRadius:e.roundedFull?"rounded-full":e.rounded?`rounded-${e.size}`:"",objectFit:"object-cover"};return f([o({},s)])}),r=t.computed(()=>{const s={position:"absolute",top:e.badge.position==="top"?"bottom-full":"top-full",left:"left-full",transform:e.badge.position==="top"?"-translate-x-1/2 translate-y-1/2":"-translate-x-1/2 -translate-y-1/2",margin:e.roundedFull?e.badge.position==="top"?e.size==="lg"?"-ml-2 -mb-2":e.size==="md"?"-ml-1.5 -mb-1.5":e.size==="sm"?"-ml-1 -mb-1":(e.size==="xs","-ml-0.5 -mb-0.5"):e.size==="lg"?"-ml-2 -mt-2":e.size==="md"?"-ml-1.5 -mt-1.5":e.size==="sm"?"-ml-1 -mt-1":(e.size==="xs","-ml-0.5 -mt-0.5"):""};return f([o({},s)])});return{computedClasses:n,iconClasses:l,imgClasses:i,badgeClasses:r}}},We=["src"],De={key:2};function Me(e,n,l,i,r,s){const d=t.resolveComponent("lui-icon"),m=t.resolveComponent("lui-badge");return t.openBlock(),t.createElementBlock("div",t.mergeProps({class:["lui-avatar",[i.computedClasses]]},e.$attrs,{onClick:n[0]||(n[0]=c=>e.$emit("click"))}),[e.icon!=="none"?(t.openBlock(),t.createBlock(d,{key:0,name:e.icon,fill:"",class:t.normalizeClass(i.iconClasses)},null,8,["name","class"])):t.createCommentVNode("",!0),e.img!==""?(t.openBlock(),t.createElementBlock("img",{key:1,src:e.img,class:t.normalizeClass(i.imgClasses),alt:"Lui avatar"},null,10,We)):(t.openBlock(),t.createElementBlock("span",De,t.toDisplayString(l.text.toUpperCase().slice(0,2)),1)),l.badge.variant!==""&&l.badge.position!==""?(t.openBlock(),t.createBlock(m,{key:3,class:t.normalizeClass(i.badgeClasses),variant:l.badge.variant,border:"",size:["2xs","xs","sm"].includes(e.size)?"2xs":"xs"},null,8,["class","variant","size"])):t.createCommentVNode("",!0)],16)}var Oe=y(Ie,[["render",Me]]);a.LuiAccordion=Ae,a.LuiAccordionGroup=Re,a.LuiAvatar=Oe,a.LuiBadge=V,a.LuiButton=Fe,a.LuiIcon=E,a.LuiRadio=Q,a.LuiSwitch=X,a.LuiTab=re,a.LuiTabs=te,a.LuiText=M,Object.defineProperty(a,"__esModule",{value:!0}),a[Symbol.toStringTag]="Module"}); |
{ | ||
"name": "lvjst", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "dev": "vite", |
Sorry, the diff of this file is not supported yet
200424
1669