UNPKG

legion-vue-core

Version:

2,132 lines 72.3 kB
import { defineComponent as h, computed as _, openBlock as s, createElementBlock as l, normalizeClass as u, ref as B, onMounted as Z, createElementVNode as p, createBlock as b, resolveDynamicComponent as y, createCommentVNode as f, toDisplayString as C, normalizeStyle as H, reactive as ne, watch as O, Fragment as x, renderList as S, unref as L, createStaticVNode as X, renderSlot as k, createTextVNode as M, useSlots as le, provide as K, inject as G, mergeModels as E, useModel as R, withDirectives as W, vModelCheckbox as Y, withCtx as I, onBeforeUnmount as F, mergeProps as j, Teleport as ee, createVNode as U, vModelRadio as ae, vModelText as te, useAttrs as J, vModelDynamic as oe, resolveComponent as ie, vShow as re } from "vue";
const se = /* @__PURE__ */ h({
  __name: "Arrow",
  props: {
    active: { type: Boolean }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-arrow": !0,
      "lgn-arrow--active": e.active
    }));
    return (n, r) => (s(), l("span", {
      class: u(t.value)
    }, null, 2));
  }
}), ce = ["id", "disabled", "aria-expanded", "aria-controls"], de = ["aria-hidden", "id", "aria-labelledby"], ue = { key: 1 }, pe = /* @__PURE__ */ h({
  __name: "AccordionItem",
  props: {
    id: {},
    index: {},
    item: {},
    isActive: { type: Boolean },
    onClick: { type: Function },
    iconToggle: {}
  },
  setup(a) {
    const e = a, t = B(null), n = _(() => [
      "lgn-accordion__item",
      { "lgn-accordion__item--active": e.isActive },
      { "lgn-accordion__item--disabled": e.item.disabled }
    ]), r = _(() => [
      "lgn-accordion__button",
      { "lgn-accordion__button--active": e.isActive }
    ]), o = _(() => [
      "lgn-accordion__icon-left",
      { "lgn-accordion__icon-left--active": e.isActive },
      { "lgn-accordion__icon-left--disabled": e.item.disabled }
    ]), i = _(() => [
      "lgn-accordion__title",
      { "lgn-accordion__title--active": e.isActive },
      { "lgn-accordion__title--disabled": e.item.disabled }
    ]), c = _(() => [
      "lgn-accordion__icon-toggle",
      { "lgn-accordion__icon-toggle--active": e.isActive },
      { "lgn-accordion__icon-toggle--disabled": e.item.disabled }
    ]), d = () => t.value ? `${t.value.scrollHeight}px` : "0";
    Z(() => {
      d();
    });
    const m = _(() => typeof e.item.description == "object");
    return (g, v) => (s(), l("div", {
      class: u(n.value)
    }, [
      p("button", {
        class: u(r.value),
        onClick: v[0] || (v[0] = //@ts-ignore
        (...$) => e.onClick && e.onClick(...$)),
        id: `header-${g.id}-${g.index}`,
        disabled: e.item.disabled,
        "aria-expanded": e.isActive,
        "aria-controls": `panel-${g.id}-${g.index}`
      }, [
        g.item.iconLeft ? (s(), l("span", {
          key: 0,
          class: u(o.value)
        }, [
          (s(), b(y(g.item.iconLeft)))
        ], 2)) : f("", !0),
        p("span", {
          class: u(i.value)
        }, C(g.item.title), 3),
        p("span", {
          class: u(c.value)
        }, [
          g.iconToggle ? (s(), b(y(g.iconToggle), { key: 0 })) : (s(), b(se, {
            key: 1,
            active: g.isActive
          }, null, 8, ["active"]))
        ], 2)
      ], 10, ce),
      p("div", {
        role: "region",
        "aria-hidden": !g.isActive,
        id: `panel-${g.id}-${g.index}`,
        class: "lgn-accordion__panel",
        "aria-labelledby": `header-${g.id}-${g.index}`,
        style: H({ height: g.isActive ? d() : "0" })
      }, [
        p("div", {
          ref_key: "refDescription",
          ref: t,
          class: "lgn-accordion__description"
        }, [
          m.value ? (s(), b(y(g.item.description), { key: 0 })) : (s(), l("p", ue, C(g.item.description), 1))
        ], 512)
      ], 12, de)
    ], 2));
  }
});
function _e() {
  return Math.random().toString(36).substring(7);
}
const fe = { class: "lgn-accordion" }, Ps = /* @__PURE__ */ h({
  __name: "Accordion",
  props: {
    active: { default: () => [-1] },
    id: {},
    items: {},
    multiple: { type: Boolean },
    onClick: {},
    iconToggle: {}
  },
  setup(a) {
    const e = a, t = ne({
      activeIndex: [...e.active]
    });
    O(() => e.active, (o) => {
      o[0] !== -1 && (t.activeIndex = [...o]);
    });
    const n = (o) => {
      var c;
      (c = e.onClick) == null || c.call(e, o);
      const i = t.activeIndex.indexOf(o);
      e.multiple ? i > -1 ? t.activeIndex.splice(i, 1) : t.activeIndex.push(o) : t.activeIndex = i > -1 ? [] : [o];
    }, r = e.id || "id" + _e();
    return (o, i) => (s(), l("div", fe, [
      (s(!0), l(x, null, S(o.items, (c, d) => (s(), b(pe, {
        key: d,
        iconToggle: o.iconToggle,
        item: c,
        id: L(r),
        index: d,
        onClick: () => n(d),
        isActive: t.activeIndex.includes(d)
      }, null, 8, ["iconToggle", "item", "id", "index", "onClick", "isActive"]))), 128))
    ]));
  }
}), ge = /* @__PURE__ */ h({
  __name: "AlertButtonClose",
  props: {
    onClick: { type: Function }
  },
  setup(a) {
    return (e, t) => (s(), l("button", {
      onClick: t[0] || (t[0] = //@ts-ignore
      (...n) => e.onClick && e.onClick(...n)),
      class: "lgn-alert__icon-close",
      "aria-label": "close alert"
    }, t[1] || (t[1] = [
      X('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_23042_153)"><path d="M18 6L6 18" stroke="#212121" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6 6L18 18" stroke="#212121" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g><defs><clipPath id="clip0_23042_153"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg>', 1)
    ])));
  }
}), T = (a, e) => {
  const t = a.__vccOpts || a;
  for (const [n, r] of e)
    t[n] = r;
  return t;
}, he = {}, me = {
  width: "16",
  height: "16",
  viewBox: "0 0 16 16",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function ve(a, e) {
  return s(), l("svg", me, e[0] || (e[0] = [
    p("g", { "clip-path": "url(#clip0_23042_171)" }, [
      p("path", {
        d: "M11.3334 2.22667C12.3389 2.80724 13.1753 3.64035 13.7599 4.64353C14.3445 5.64672 14.6569 6.78518 14.6663 7.94623C14.6757 9.10727 14.3817 10.2506 13.8134 11.2631C13.2451 12.2756 12.4222 13.1221 11.4262 13.7189C10.4302 14.3156 9.29562 14.6419 8.13477 14.6654C6.97393 14.6889 5.82707 14.4088 4.80774 13.8528C3.78841 13.2969 2.93195 12.4844 2.32315 11.4957C1.71435 10.507 1.37431 9.37647 1.33671 8.216L1.33337 8L1.33671 7.784C1.37404 6.63266 1.70907 5.51064 2.30913 4.52733C2.90919 3.54402 3.75381 2.73297 4.76064 2.17325C5.76746 1.61354 6.90214 1.32426 8.05404 1.33362C9.20595 1.34299 10.3358 1.65066 11.3334 2.22667ZM7.00737 6.09333C6.86769 6.01019 6.70245 5.98094 6.54271 6.01109C6.38298 6.04124 6.23977 6.12871 6.14001 6.25705C6.04025 6.3854 5.99082 6.54577 6.00101 6.708C6.01121 6.87024 6.08033 7.02316 6.19537 7.138L7.05671 8L6.19537 8.862L6.14004 8.92467C6.03643 9.05866 5.98771 9.22707 6.00377 9.39568C6.01984 9.5643 6.09948 9.72048 6.22652 9.8325C6.35357 9.94452 6.51849 10.004 6.68779 9.99882C6.85708 9.99365 7.01807 9.92423 7.13804 9.80467L8.00004 8.94333L8.86204 9.80467L8.92471 9.86C9.0587 9.96361 9.22711 10.0123 9.39573 9.99627C9.56434 9.9802 9.72052 9.90056 9.83254 9.77352C9.94456 9.64647 10.004 9.48155 9.99886 9.31226C9.99369 9.14296 9.92427 8.98197 9.80471 8.862L8.94337 8L9.80471 7.138L9.86004 7.07533C9.96365 6.94134 10.0124 6.77293 9.99631 6.60432C9.98024 6.4357 9.9006 6.27952 9.77356 6.1675C9.64652 6.05548 9.4816 5.99601 9.3123 6.00118C9.143 6.00635 8.98201 6.07577 8.86204 6.19533L8.00004 7.05667L7.13804 6.19533L7.07537 6.14L7.00737 6.09333Z",
        fill: "white"
      })
    ], -1),
    p("defs", null, [
      p("clipPath", { id: "clip0_23042_171" }, [
        p("rect", {
          width: "16",
          height: "16",
          fill: "white"
        })
      ])
    ], -1)
  ]));
}
const Ce = /* @__PURE__ */ T(he, [["render", ve]]), be = {}, $e = {
  width: "16",
  height: "16",
  viewBox: "0 0 16 16",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function ke(a, e) {
  return s(), l("svg", $e, e[0] || (e[0] = [
    p("g", { "clip-path": "url(#clip0_23042_146)" }, [
      p("path", {
        d: "M8.00004 1.33334C11.682 1.33334 14.6667 4.318 14.6667 8C14.6681 9.75032 13.9811 11.431 12.754 12.6791C11.5269 13.9272 9.85814 14.6427 8.10806 14.6711C6.35797 14.6994 4.66693 14.0384 3.40004 12.8307C2.13315 11.623 1.39203 9.96544 1.33671 8.216L1.33337 8L1.33604 7.81334C1.43471 4.218 4.38004 1.33334 8.00004 1.33334ZM8.00004 7.33334H7.33337L7.25537 7.338C7.09334 7.35728 6.944 7.43531 6.83565 7.55731C6.7273 7.67932 6.66745 7.83683 6.66745 8C6.66745 8.16318 6.7273 8.32069 6.83565 8.44269C6.944 8.5647 7.09334 8.64273 7.25537 8.662L7.33337 8.66667V10.6667L7.33804 10.7447C7.35559 10.8935 7.42276 11.032 7.52872 11.138C7.63467 11.2439 7.77323 11.3111 7.92204 11.3287L8.00004 11.3333H8.66671L8.74471 11.3287C8.89352 11.3111 9.03208 11.2439 9.13803 11.138C9.24399 11.032 9.31116 10.8935 9.32871 10.7447L9.33337 10.6667L9.32871 10.5887C9.31277 10.4527 9.25533 10.3248 9.1642 10.2226C9.07307 10.1204 8.95267 10.0487 8.81937 10.0173L8.74471 10.004L8.66671 10V8L8.66204 7.922C8.64449 7.77319 8.57732 7.63463 8.47137 7.52868C8.36541 7.42272 8.22685 7.35555 8.07804 7.338L8.00004 7.33334ZM8.00671 5.33334L7.92204 5.338C7.76001 5.35728 7.61067 5.43531 7.50232 5.55731C7.39396 5.67932 7.33412 5.83683 7.33412 6C7.33412 6.16318 7.39396 6.32069 7.50232 6.44269C7.61067 6.5647 7.76001 6.64273 7.92204 6.662L8.00004 6.66667L8.08471 6.662C8.24674 6.64273 8.39608 6.5647 8.50443 6.44269C8.61279 6.32069 8.67263 6.16318 8.67263 6C8.67263 5.83683 8.61279 5.67932 8.50443 5.55731C8.39608 5.43531 8.24674 5.35728 8.08471 5.338L8.00671 5.33334Z",
        fill: "white"
      })
    ], -1),
    p("defs", null, [
      p("clipPath", { id: "clip0_23042_146" }, [
        p("rect", {
          width: "16",
          height: "16",
          fill: "white"
        })
      ])
    ], -1)
  ]));
}
const we = /* @__PURE__ */ T(be, [["render", ke]]), ye = {}, Le = {
  width: "16",
  height: "16",
  viewBox: "0 0 16 16",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function ze(a, e) {
  return s(), l("svg", Le, e[0] || (e[0] = [
    p("g", { "clip-path": "url(#clip0_23042_183)" }, [
      p("path", {
        d: "M11.3334 2.22667C12.3389 2.80724 13.1753 3.64035 13.7599 4.64353C14.3445 5.64672 14.6569 6.78518 14.6663 7.94623C14.6757 9.10727 14.3817 10.2506 13.8134 11.2631C13.2451 12.2756 12.4222 13.1221 11.4262 13.7189C10.4302 14.3156 9.29562 14.6419 8.13477 14.6654C6.97393 14.6889 5.82707 14.4088 4.80774 13.8528C3.78841 13.2969 2.93195 12.4844 2.32315 11.4957C1.71435 10.507 1.37431 9.37647 1.33671 8.216L1.33337 8L1.33671 7.784C1.37404 6.63266 1.70907 5.51064 2.30913 4.52733C2.90919 3.54402 3.75381 2.73297 4.76064 2.17325C5.76746 1.61354 6.90214 1.32426 8.05404 1.33362C9.20595 1.34299 10.3358 1.65066 11.3334 2.22667ZM10.4714 6.19533C10.3566 6.08055 10.2038 6.01159 10.0418 6.00141C9.87981 5.99122 9.71964 6.0405 9.59137 6.14L9.52871 6.19533L7.33337 8.39L6.47137 7.52867L6.40871 7.47333C6.28043 7.3739 6.12029 7.32468 5.95831 7.3349C5.79633 7.34512 5.64365 7.41408 5.52888 7.52884C5.41412 7.6436 5.34516 7.79629 5.33494 7.95827C5.32472 8.12025 5.37394 8.28039 5.47337 8.40867L5.52871 8.47133L6.86204 9.80467L6.92471 9.86C7.04162 9.95071 7.1854 9.99994 7.33337 9.99994C7.48135 9.99994 7.62513 9.95071 7.74204 9.86L7.80471 9.80467L10.4714 7.138L10.5267 7.07533C10.6262 6.94706 10.6755 6.7869 10.6653 6.62488C10.6551 6.46286 10.5862 6.31013 10.4714 6.19533Z",
        fill: "white"
      })
    ], -1),
    p("defs", null, [
      p("clipPath", { id: "clip0_23042_183" }, [
        p("rect", {
          width: "16",
          height: "16",
          fill: "white"
        })
      ])
    ], -1)
  ]));
}
const Ve = /* @__PURE__ */ T(ye, [["render", ze]]), Be = {}, Te = {
  width: "16",
  height: "16",
  viewBox: "0 0 16 16",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function xe(a, e) {
  return s(), l("svg", Te, e[0] || (e[0] = [
    p("g", { "clip-path": "url(#clip0_23042_195)" }, [
      p("path", {
        d: "M7.96004 1.33333C8.28081 1.33355 8.59679 1.41118 8.88114 1.55962C9.16549 1.70806 9.40982 1.92294 9.59338 2.18599L9.66538 2.29533L15.286 11.678C15.4545 11.97 15.546 12.3 15.5522 12.637C15.5584 12.974 15.479 13.3071 15.3214 13.6051C15.1638 13.9031 14.9332 14.1562 14.6512 14.3408C14.3691 14.5255 14.0449 14.6355 13.7087 14.6607L13.5754 14.6667H2.33804C2.0015 14.6626 1.67146 14.5735 1.37868 14.4075C1.0859 14.2415 0.839928 14.004 0.663684 13.7173C0.487439 13.4306 0.386666 13.1039 0.370758 12.7677C0.354851 12.4315 0.424327 12.0968 0.57271 11.7947L0.640043 11.6687L6.25671 2.29199C6.43436 1.99934 6.68441 1.75739 6.98276 1.58947C7.28111 1.42156 7.61769 1.33334 7.96004 1.33333ZM8.00671 10.6667L7.92204 10.6713C7.76001 10.6906 7.61067 10.7686 7.50232 10.8906C7.39396 11.0126 7.33412 11.1702 7.33412 11.3333C7.33412 11.4965 7.39396 11.654 7.50232 11.776C7.61067 11.898 7.76001 11.9761 7.92204 11.9953L8.00004 12L8.08471 11.9953C8.24674 11.9761 8.39608 11.898 8.50443 11.776C8.61279 11.654 8.67263 11.4965 8.67263 11.3333C8.67263 11.1702 8.61279 11.0126 8.50443 10.8906C8.39608 10.7686 8.24674 10.6906 8.08471 10.6713L8.00671 10.6667ZM8.00004 5.33333C7.83675 5.33335 7.67915 5.3933 7.55713 5.50181C7.43511 5.61031 7.35715 5.75983 7.33804 5.922L7.33338 6V8.66666L7.33804 8.74466C7.35732 8.90669 7.43535 9.05603 7.55735 9.16439C7.67936 9.27274 7.83687 9.33259 8.00004 9.33259C8.16322 9.33259 8.32073 9.27274 8.44273 9.16439C8.56474 9.05603 8.64277 8.90669 8.66204 8.74466L8.66671 8.66666V6L8.66204 5.922C8.64294 5.75983 8.56498 5.61031 8.44296 5.50181C8.32094 5.3933 8.16333 5.33335 8.00004 5.33333Z",
        fill: "white"
      })
    ], -1),
    p("defs", null, [
      p("clipPath", { id: "clip0_23042_195" }, [
        p("rect", {
          width: "16",
          height: "16",
          fill: "white"
        })
      ])
    ], -1)
  ]));
}
const Me = /* @__PURE__ */ T(Be, [["render", xe]]), Ie = { class: "lgn-alert__content" }, Hs = /* @__PURE__ */ h({
  __name: "Alert",
  props: {
    description: {},
    iconLeft: {},
    noIconLeft: { type: Boolean },
    onClose: {},
    title: {},
    status: { default: "information" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-alert": !0,
      [`lgn-alert--${e.status}`]: !0
    })), n = _(() => ({
      "lgn-alert__icon-left": !0,
      [`lgn-alert__icon-left--${e.status}`]: !0
    })), r = () => {
      var o;
      (o = e.onClose) == null || o.call(e);
    };
    return (o, i) => (s(), l("div", {
      class: u(t.value)
    }, [
      !o.iconLeft && !o.noIconLeft ? (s(), l("span", {
        key: 0,
        class: u(n.value)
      }, [
        o.status === "success" ? (s(), b(y(Ve), { key: 0 })) : o.status === "warning" ? (s(), b(y(Me), { key: 1 })) : o.status === "error" ? (s(), b(y(Ce), { key: 2 })) : (s(), b(y(we), { key: 3 }))
      ], 2)) : f("", !0),
      o.iconLeft && !o.noIconLeft ? (s(), l("span", {
        key: 1,
        class: u(n.value)
      }, [
        (s(), b(y(o.iconLeft)))
      ], 2)) : f("", !0),
      p("div", Ie, [
        o.title ? (s(), l("h3", {
          key: 0,
          class: u(`lgn-alert__title lgn-alert__title--${o.status}`)
        }, C(o.title), 3)) : f("", !0),
        o.description ? (s(), l("div", {
          key: 1,
          class: u(`lgn-alert__description lgn-alert__description--${o.status}`)
        }, [
          k(o.$slots, "description", {}, () => [
            M(C(o.description), 1)
          ])
        ], 2)) : f("", !0)
      ]),
      o.onClose ? (s(), b(ge, {
        key: 2,
        onClick: r
      })) : f("", !0)
    ], 2));
  }
}), Es = /* @__PURE__ */ h({
  __name: "Anchor",
  props: {
    disabled: { type: Boolean, default: !1 },
    size: { default: "md" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-anchor": !0,
      [`lgn-anchor--${e.size}`]: !0,
      "lgn-anchor--disabled": e.disabled
    }));
    return (n, r) => (s(), l("a", {
      class: u(t.value)
    }, [
      k(n.$slots, "default")
    ], 2));
  }
}), Se = ["src", "alt", "height", "width"], Rs = /* @__PURE__ */ h({
  __name: "Avatar",
  props: {
    alt: {},
    src: {},
    size: { default: "md" }
  },
  setup(a) {
    const e = a, t = { sm: 32, md: 40, lg: 64 }, n = _(() => ({
      "lgn-avatar": !0,
      [`lgn-avatar--${e.size}`]: !0
    }));
    return (r, o) => (s(), l("span", {
      class: u(n.value)
    }, [
      r.src ? (s(), l("img", {
        key: 0,
        src: r.src,
        alt: r.alt,
        loading: "lazy",
        height: t[r.size],
        width: t[r.size]
      }, null, 8, Se)) : f("", !0),
      r.src ? f("", !0) : k(r.$slots, "default", { key: 1 })
    ], 2));
  }
}), Ae = { class: "lgn-badge" }, Ws = /* @__PURE__ */ h({
  __name: "Badge",
  props: {
    color: { default: "primary" },
    count: {},
    offset: { default: () => ["0", "0"] },
    size: { default: "md" },
    text: {},
    icon: {}
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-badge__counter": !0,
      [`lgn-badge__counter--${e.color}`]: !0,
      [`lgn-badge__counter--${e.size}`]: e.count,
      [`lgn-badge__counter--${e.size}-none`]: !e.count
    })), n = _(() => ({
      "lgn-badge__text": !0,
      [`lgn-badge__text--${e.color}`]: !0,
      [`lgn-badge__text--${e.size}`]: !0
    })), r = _(() => ({
      top: e.offset[0],
      right: e.offset[1]
    }));
    return (o, i) => (s(), l("span", Ae, [
      k(o.$slots, "default"),
      o.icon ? (s(), l("span", {
        key: 0,
        class: u(t.value),
        style: H(r.value)
      }, [
        (s(), b(y(o.icon)))
      ], 6)) : f("", !0),
      !o.text && !o.icon ? (s(), l("sup", {
        key: 1,
        class: u(t.value),
        style: H(r.value)
      }, C(o.count), 7)) : f("", !0),
      o.text ? (s(), l("span", {
        key: 2,
        class: u(n.value)
      }, C(o.text), 3)) : f("", !0)
    ]));
  }
}), Zs = /* @__PURE__ */ h({
  __name: "Button",
  props: {
    block: { type: Boolean },
    center: { type: Boolean },
    color: { default: "primary" },
    size: { default: "md" },
    variant: { default: "solid" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-button": !0,
      [`lgn-button--${e.size}`]: !0,
      [`lgn-button--${e.color}-${e.variant}`]: !0,
      "lgn-button--block": e.block
    }));
    return (n, r) => (s(), l("button", {
      class: u(t.value)
    }, [
      k(n.$slots, "default")
    ], 2));
  }
}), De = {}, Pe = {
  width: "10",
  height: "12",
  viewBox: "0 0 10 12",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function He(a, e) {
  return s(), l("svg", Pe, e[0] || (e[0] = [
    p("path", {
      d: "M8.33431 1.33333L1.66764 10.6667",
      stroke: "#98A2B3",
      "stroke-width": "1.4",
      "stroke-linecap": "round",
      "stroke-linejoin": "round"
    }, null, -1)
  ]));
}
const Ee = /* @__PURE__ */ T(De, [["render", He]]), Re = { class: "lgn-breadcrumb" }, Os = /* @__PURE__ */ h({
  __name: "Breadcrumb",
  props: {
    separator: { default: Ee }
  },
  setup(a) {
    const e = le(), t = B(0);
    return Z(() => {
      t.value = Object.keys(e).length;
    }), K("separator", a.separator), (r, o) => (s(), l("ul", Re, [
      k(r.$slots, "default")
    ]));
  }
}), We = { class: "lgn-breadcrumb__item" }, Ze = {
  key: 0,
  class: "lgn-breadcrumb__separator"
}, Fs = /* @__PURE__ */ h({
  __name: "BreadcrumbItem",
  setup(a) {
    const e = G("separator");
    return (t, n) => (s(), l("li", We, [
      k(t.$slots, "default"),
      L(e) ? (s(), l("span", Ze, [
        (s(), b(y(L(e))))
      ])) : f("", !0)
    ]));
  }
}), js = /* @__PURE__ */ h({
  __name: "Card",
  props: {
    bordered: { type: Boolean },
    elevation: { default: 0 }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-card": !0,
      "lgn-card--bordered": e.bordered,
      [`lgn-card--elevation-${e.elevation}`]: !0
    }));
    return (n, r) => (s(), l("div", {
      class: u(t.value)
    }, [
      k(n.$slots, "default")
    ], 2));
  }
}), Oe = { class: "lgn-card__header" }, Fe = {
  key: 0,
  class: "lgn-card__header-title"
}, je = {
  key: 1,
  class: "lgn-card__header-description"
}, Us = /* @__PURE__ */ h({
  __name: "CardHeader",
  props: {
    title: {},
    description: {}
  },
  setup(a) {
    return (e, t) => (s(), l("header", Oe, [
      e.title ? (s(), l("h3", Fe, C(e.title), 1)) : f("", !0),
      e.description ? (s(), l("p", je, C(e.description), 1)) : f("", !0),
      k(e.$slots, "default")
    ]));
  }
}), Ue = { class: "lgn-card__body" }, Ne = {
  key: 0,
  class: "lgn-card__body-title"
}, qe = {
  key: 1,
  class: "lgn-card__body-description"
}, Ns = /* @__PURE__ */ h({
  __name: "CardBody",
  props: {
    title: {},
    description: {}
  },
  setup(a) {
    return (e, t) => (s(), l("div", Ue, [
      e.title ? (s(), l("h3", Ne, C(e.title), 1)) : f("", !0),
      e.description ? (s(), l("p", qe, C(e.description), 1)) : f("", !0),
      k(e.$slots, "default")
    ]));
  }
}), Ke = {}, Ge = { class: "lgn-card__footer" };
function Qe(a, e) {
  return s(), l("footer", Ge, [
    k(a.$slots, "default")
  ]);
}
const qs = /* @__PURE__ */ T(Ke, [["render", Qe]]), Xe = {}, Je = { class: "lgn-card__media" };
function Ye(a, e) {
  return s(), l("div", Je, [
    k(a.$slots, "default")
  ]);
}
const Ks = /* @__PURE__ */ T(Xe, [["render", Ye]]), et = {}, tt = {
  class: "lgn-checkbox-check",
  width: "10",
  height: "8",
  viewBox: "0 0 10 8",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function st(a, e) {
  return s(), l("svg", tt, e[0] || (e[0] = [
    p("path", {
      d: "M1.5 4L4 6.5L9 1.5",
      stroke: "white",
      "stroke-width": "2",
      "stroke-linecap": "round",
      "stroke-linejoin": "round"
    }, null, -1)
  ]));
}
const nt = /* @__PURE__ */ T(et, [["render", st]]), lt = {}, at = {
  class: "lgn-checkbox-min",
  width: "12",
  height: "2",
  viewBox: "0 0 12 2",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function ot(a, e) {
  return s(), l("svg", at, e[0] || (e[0] = [
    p("path", {
      d: "M1.33333 1H10.6667",
      stroke: "white",
      "stroke-width": "2",
      "stroke-linecap": "round",
      "stroke-linejoin": "round"
    }, null, -1)
  ]));
}
const it = /* @__PURE__ */ T(lt, [["render", ot]]), rt = ["id", "value", "checked", "disabled"], ct = ["id", "value"], dt = ["for"], Gs = /* @__PURE__ */ h({
  __name: "Checkbox",
  props: /* @__PURE__ */ E({
    checked: { type: Boolean },
    disabled: { type: Boolean },
    id: {},
    label: {},
    indeterminate: { type: Boolean },
    size: { default: "md" },
    value: {}
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(a) {
    const e = a, t = e.id || Math.random().toString(36).substring(7), n = R(a, "modelValue"), r = _(() => ({
      "lgn-checkbox": !0,
      [`lgn-checkbox--${e.size}`]: !0
    }));
    return (o, i) => (s(), l("div", {
      class: u(r.value)
    }, [
      o.checked || o.disabled ? (s(), l("input", {
        key: 0,
        id: L(t),
        type: "checkbox",
        value: o.value,
        checked: o.checked,
        disabled: o.disabled
      }, null, 8, rt)) : W((s(), l("input", {
        key: 1,
        id: L(t),
        type: "checkbox",
        value: o.value,
        "onUpdate:modelValue": i[0] || (i[0] = (c) => n.value = c)
      }, null, 8, ct)), [
        [Y, n.value]
      ]),
      p("span", {
        class: u(`lgn-checkbox__field lgn-checkbox__field--${o.size}`)
      }, [
        o.indeterminate ? (s(), b(it, { key: 0 })) : f("", !0),
        o.indeterminate ? f("", !0) : (s(), b(nt, { key: 1 }))
      ], 2),
      o.label ? (s(), l("label", {
        key: 2,
        for: L(t),
        class: u(`lgn-checkbox__label lgn-checkbox__label--${o.size}`)
      }, C(o.label), 11, dt)) : f("", !0)
    ], 2));
  }
}), Qs = /* @__PURE__ */ h({
  __name: "Chip",
  props: {
    as: { default: "span" },
    color: { default: "primary" },
    size: { default: "md" },
    variant: { default: "solid" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-chip": !0,
      [`lgn-chip--${e.color}-${e.variant}`]: !0,
      [`lgn-chip--${e.size}`]: !0,
      [`lgn-chip--${e.as}-${e.size}`]: e.as === "span",
      [`lgn-chip--${e.color}-${e.variant}--hoverable`]: e.as === "button"
    }));
    return (n, r) => (s(), b(y(n.as), {
      class: u(t.value)
    }, {
      default: I(() => [
        k(n.$slots, "default")
      ]),
      _: 3
    }, 8, ["class"]));
  }
}), Xs = /* @__PURE__ */ h({
  __name: "Divider",
  props: {
    position: { default: "center" },
    mode: { default: "horizontal" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-divider": !0,
      [`lgn-divider--${e.position}`]: !0,
      [`lgn-divider--${e.mode}`]: !0
    })), n = _(() => ({
      "lgn-divider__separator": !0,
      [`lgn-divider__separator--${e.mode}`]: !0
    })), r = _(() => ({
      "lgn-divider__text": !0,
      [`lgn-divider__text--${e.position}`]: !0,
      [`lgn-divider__text--${e.mode}`]: !0
    }));
    return (o, i) => (s(), l("div", {
      class: u(t.value),
      role: "separator"
    }, [
      o.position !== "left" ? (s(), l("span", {
        key: 0,
        class: u(n.value)
      }, null, 2)) : f("", !0),
      o.$slots.default ? (s(), l("span", {
        key: 1,
        class: u(r.value)
      }, [
        k(o.$slots, "default")
      ], 2)) : f("", !0),
      o.position !== "right" ? (s(), l("span", {
        key: 2,
        class: u(n.value)
      }, null, 2)) : f("", !0)
    ], 2));
  }
}), Js = /* @__PURE__ */ h({
  __name: "Dropdown",
  props: {
    position: { default: "left" }
  },
  setup(a) {
    const e = B(!1), t = B(null), n = B(null), r = a, o = _(() => ({
      "lgn-dropdown": !0,
      [`lgn-dropdown--${r.position}`]: !0
    })), i = (m) => {
      m.stopPropagation(), e.value = !e.value;
    }, c = (m) => {
      t.value && !t.value.contains(m.target) && (e.value = !1);
    }, d = () => n.value ? `${n.value.scrollHeight}px` : "0";
    return Z(() => {
      d(), document.addEventListener("click", c);
    }), F(() => {
      document.removeEventListener("click", c);
    }), K("isDropdownOpen", e), K("refContent", n), K("handleToggle", i), (m, g) => (s(), l("div", {
      class: u(o.value),
      ref_key: "refWrapper",
      ref: t
    }, [
      k(m.$slots, "default")
    ], 2));
  }
}), Ys = /* @__PURE__ */ h({
  __name: "DropdownTrigger",
  setup(a) {
    const e = G("handleToggle");
    return (t, n) => (s(), l("div", {
      class: "lgn-dropdown__trigger",
      onClick: n[0] || (n[0] = //@ts-ignore
      (...r) => L(e) && L(e)(...r))
    }, [
      k(t.$slots, "default")
    ]));
  }
}), en = /* @__PURE__ */ h({
  __name: "DropdownBody",
  setup(a) {
    const e = G("isDropdownOpen"), t = G("refContent");
    return (n, r) => (s(), l("div", {
      class: u(["lgn-dropdown__body", L(e) && "lgn-dropdown__body--open"]),
      ref: "refBody"
    }, [
      p("div", {
        class: "lgn-dropdown__content",
        ref_key: "refContent",
        ref: t
      }, [
        k(n.$slots, "default")
      ], 512)
    ], 2));
  }
}), ut = ["loading", "src", "alt"], tn = /* @__PURE__ */ h({
  __name: "Image",
  props: {
    alt: {},
    loading: { default: "lazy" },
    src: {},
    fit: { default: "fill" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-image": !0,
      [`lgn-image--${e.fit}`]: !0
    }));
    return (n, r) => (s(), l("img", j({
      class: t.value,
      loading: n.loading,
      src: n.src,
      alt: n.alt
    }, n.$attrs), null, 16, ut));
  }
}), pt = {}, _t = {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24",
  "aria-hidden": "true",
  height: "24",
  fill: "none",
  width: "24"
};
function ft(a, e) {
  return s(), l("svg", _t, e[0] || (e[0] = [
    p("path", {
      d: "M18 6L6 18",
      stroke: "#2E3032",
      "stroke-width": "1.5",
      "stroke-linecap": "round",
      "stroke-linejoin": "round"
    }, null, -1),
    p("path", {
      d: "M6 6L18 18",
      stroke: "#2E3032",
      "stroke-width": "1.5",
      "stroke-linecap": "round",
      "stroke-linejoin": "round"
    }, null, -1)
  ]));
}
const gt = /* @__PURE__ */ T(pt, [["render", ft]]), ht = { class: "lgn-modal__header" }, mt = { class: "lgn-modal__title" }, vt = { class: "lgn-modal__body" }, sn = /* @__PURE__ */ h({
  __name: "Modal",
  props: {
    icon: {},
    onClose: { type: Function },
    show: { type: Boolean },
    title: {}
  },
  setup(a, { expose: e }) {
    const t = a, n = B(null);
    e({ focus: () => {
      var d;
      (d = n.value) == null || d.focus();
    } });
    const o = (d) => {
      var m;
      d.key === "Escape" && ((m = t.onClose) == null || m.call(t));
    };
    O(
      () => t.show,
      (d) => {
        d ? document.addEventListener("keydown", o) : document.removeEventListener("keydown", o);
      }
    ), Z(() => {
      t.show && document.addEventListener("keydown", o);
    }), F(() => {
      document.removeEventListener("keydown", o);
    });
    const i = () => {
      var d;
      (d = t.onClose) == null || d.call(t);
    }, c = (d) => {
      d.stopPropagation();
    };
    return (d, m) => d.show ? (s(), b(ee, {
      key: 0,
      to: "body"
    }, [
      p("div", {
        class: "lgn-modal-overlay",
        onClick: i
      }, [
        p("div", j(d.$attrs, {
          class: "lgn-modal",
          onClick: c,
          ref_key: "modalRef",
          ref: n,
          tabindex: "-1"
        }), [
          p("header", ht, [
            d.icon ? (s(), b(y(d.icon), {
              key: 0,
              class: "lgn-modal__icon-left"
            })) : f("", !0),
            p("h3", mt, C(d.title), 1),
            p("button", {
              class: "lgn-modal__icon-right",
              onClick: m[0] || (m[0] = //@ts-ignore
              (...g) => d.onClose && d.onClose(...g))
            }, [
              U(gt)
            ])
          ]),
          p("div", vt, [
            k(d.$slots, "default")
          ])
        ], 16)
      ])
    ])) : f("", !0);
  }
}), Ct = {
  "aria-label": "Pagination",
  class: "lgn-pagination"
}, bt = ["disabled"], $t = ["onClick"], kt = ["disabled"], nn = /* @__PURE__ */ h({
  __name: "Pagination",
  props: {
    size: { default: 1 },
    modelValue: { default: 1 }
  },
  emits: ["update:modelValue"],
  setup(a, { emit: e }) {
    const t = a, n = e, r = _(() => {
      const i = t.size || 1, c = t.modelValue || 1, d = [];
      if (i <= 7)
        for (let m = 1; m <= i; m++)
          d.push(m);
      else
        c <= 4 ? d.push(1, 2, 3, 4, 5, "...", i) : c >= i - 3 ? d.push(1, "...", i - 4, i - 3, i - 2, i - 1, i) : d.push(1, "...", c - 1, c, c + 1, "...", i);
      return d;
    });
    function o(i) {
      i !== t.modelValue && n("update:modelValue", i);
    }
    return (i, c) => (s(), l("nav", Ct, [
      p("button", {
        class: "lgn-pagination__button",
        disabled: t.modelValue <= 1,
        onClick: c[0] || (c[0] = (d) => o(t.modelValue - 1))
      }, c[2] || (c[2] = [
        p("svg", {
          width: "9",
          height: "14",
          viewBox: "0 0 9 14",
          fill: "none",
          xmlns: "http://www.w3.org/2000/svg"
        }, [
          p("path", {
            "fill-rule": "evenodd",
            "clip-rule": "evenodd",
            d: "M8.21189 0.289939C8.30562 0.382902 8.38001 0.493503 8.43078 0.615362C8.48155 0.737221 8.50769 0.867927 8.50769 0.999939C8.50769 1.13195 8.48155 1.26266 8.43078 1.38452C8.38001 1.50638 8.30562 1.61698 8.21189 1.70994L2.91189 6.99994L8.21189 12.2899C8.4002 12.4782 8.50598 12.7336 8.50598 12.9999C8.50598 13.2662 8.4002 13.5216 8.21189 13.7099C8.02359 13.8982 7.76819 14.004 7.50189 14.004C7.23559 14.004 6.9802 13.8982 6.79189 13.7099L0.791892 7.70994C0.698164 7.61698 0.62377 7.50637 0.573001 7.38452C0.522232 7.26266 0.496094 7.13195 0.496094 6.99994C0.496094 6.86793 0.522232 6.73722 0.573001 6.61536C0.62377 6.4935 0.698164 6.3829 0.791892 6.28994L6.79189 0.289939C6.88486 0.196211 6.99546 0.121816 7.11732 0.0710478C7.23917 0.0202791 7.36988 -0.00585938 7.50189 -0.00585938C7.6339 -0.00585938 7.76461 0.0202791 7.88647 0.0710478C8.00833 0.121816 8.11893 0.196211 8.21189 0.289939Z",
            fill: "#101828"
          })
        ], -1)
      ]), 8, bt),
      (s(!0), l(x, null, S(r.value, (d) => (s(), l("button", {
        key: d,
        class: u({ "lgn-pagination__button--active": d === t.modelValue, "lgn-pagination__button": !0 }),
        onClick: (m) => typeof d == "number" && o(d)
      }, C(d), 11, $t))), 128)),
      p("button", {
        class: "lgn-pagination__button",
        disabled: t.modelValue >= t.size,
        onClick: c[1] || (c[1] = (d) => o(t.modelValue + 1))
      }, c[3] || (c[3] = [
        p("svg", {
          width: "9",
          height: "14",
          viewBox: "0 0 9 14",
          fill: "none",
          xmlns: "http://www.w3.org/2000/svg"
        }, [
          p("path", {
            "fill-rule": "evenodd",
            "clip-rule": "evenodd",
            d: "M0.792893 0.292893C1.18342 -0.0976311 1.81658 -0.0976311 2.20711 0.292893L8.20711 6.29289C8.59763 6.68342 8.59763 7.31658 8.20711 7.70711L2.20711 13.7071C1.81658 14.0976 1.18342 14.0976 0.792893 13.7071C0.402369 13.3166 0.402369 12.6834 0.792893 12.2929L6.08579 7L0.792893 1.70711C0.402369 1.31658 0.402369 0.683417 0.792893 0.292893Z",
            fill: "#101828"
          })
        ], -1)
      ]), 8, kt)
    ]));
  }
}), wt = { class: "lgn-pin-input" }, yt = ["maxLength", "defaultValue", "onChange"], ln = /* @__PURE__ */ h({
  __name: "PinInput",
  props: {
    modelValue: { default: "" },
    size: { default: "md" },
    variant: { default: "outline" },
    status: { default: "normal" },
    length: { default: 1 }
  },
  emits: ["update:modelValue"],
  setup(a, { emit: e }) {
    const t = new RegExp(/^(\d+|[A-Za-z]+)$/), n = a, r = e, o = _(() => {
      const v = n.modelValue ? n.modelValue.split("") : [], $ = [];
      for (let w = 0; w < n.length; w++) {
        const z = v[w];
        t.test(z) ? $.push(z) : $.push("");
      }
      return $;
    }), i = (v) => {
      const $ = v.nextElementSibling;
      $ && $.focus();
    }, c = (v) => {
      const $ = v.previousElementSibling;
      $ && $.focus();
    }, d = (v, $) => {
      const w = v.target;
      let z = w.value.trim();
      const P = t.test(z);
      if (!P && z !== "")
        return;
      const N = w.nextElementSibling;
      if (!P && N && N.value !== "")
        return;
      z = P ? z : "";
      const q = z.length;
      if (q === 1) {
        const Q = n.modelValue ? n.modelValue.substring(0, $) + z + n.modelValue.substring($ + 1) : z;
        if (r("update:modelValue", Q), !P)
          return;
        i(w);
      } else q === n.length && (r("update:modelValue", z), w.blur());
    }, m = (v) => {
      const { key: $ } = v, w = v.target;
      if ($ === "ArrowRight" || $ === "ArrowDown")
        return v.preventDefault(), i(w);
      if ($ === "ArrowLeft" || $ === "ArrowUp")
        return v.preventDefault(), c(w);
      const z = w.value.trim();
      if (w.setSelectionRange(0, z.length), v.key !== "Backspace" || z !== "")
        return i(w);
      c(w);
    }, g = (v) => {
      const { target: $ } = v, w = $.previousElementSibling;
      if (w && w.value === "")
        return w.focus();
      $.setSelectionRange(0, $.value.length);
    };
    return (v, $) => (s(), l("div", wt, [
      (s(!0), l(x, null, S(o.value, (w, z) => (s(), l("input", {
        key: z,
        maxLength: n.length,
        defaultValue: w,
        onChange: (P) => d(P, z),
        onKeydown: m,
        onFocus: g,
        inputMode: "numeric",
        class: u(`lgn-pin-input__field lgn-pin-input__field--${n.size} lgn-pin-input__field--${n.variant} lgn-pin-input__field--${n.status}`)
      }, null, 42, yt))), 128))
    ]));
  }
}), Lt = { class: "lgn-progressbar__track" }, an = /* @__PURE__ */ h({
  __name: "Progressbar",
  props: {
    value: {},
    textPlacement: { default: "none" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-progressbar": !0,
      [`lgn-progressbar--${e.textPlacement}`]: !0
    })), n = _(() => ({
      "lgn-progressbar__label": !0,
      "lgn-progressbar__label--tooltip": e.textPlacement === "float-top" || e.textPlacement === "float-bottom"
    }));
    return (r, o) => (s(), l("div", {
      class: u(t.value)
    }, [
      p("span", Lt, [
        p("span", {
          class: "lgn-progressbar__indicator",
          style: H(`width: ${r.value}%`)
        }, null, 4)
      ]),
      e.textPlacement !== "none" ? (s(), l("span", {
        key: 0,
        class: u(n.value),
        style: H(e.textPlacement !== "end" ? { marginLeft: `${e.value}%` } : {})
      }, C(e.value) + "% ", 7)) : f("", !0)
    ], 2));
  }
}), zt = ["id", "value", "checked", "disabled"], Vt = ["id", "value"], Bt = ["for"], on = /* @__PURE__ */ h({
  __name: "Radio",
  props: /* @__PURE__ */ E({
    checked: { type: Boolean },
    disabled: { type: Boolean },
    id: {},
    label: {},
    size: { default: "md" },
    value: {}
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(a) {
    const e = a, t = e.id || Math.random().toString(36).substring(7), n = R(a, "modelValue"), r = _(() => ({
      "lgn-radio": !0,
      [`lgn-radio--${e.size}`]: !0
    })), o = _(() => ({
      "lgn-radio__field": !0,
      [`lgn-radio__field--${e.size}`]: !0
    }));
    return (i, c) => (s(), l("div", {
      class: u(r.value)
    }, [
      !i.value || i.checked || i.disabled ? (s(), l("input", {
        key: 0,
        id: L(t),
        type: "radio",
        class: u(o.value),
        value: i.value,
        checked: i.checked,
        disabled: i.disabled
      }, null, 10, zt)) : W((s(), l("input", {
        key: 1,
        id: L(t),
        type: "radio",
        class: u(o.value),
        value: i.value,
        "onUpdate:modelValue": c[0] || (c[0] = (d) => n.value = d)
      }, null, 10, Vt)), [
        [ae, n.value]
      ]),
      i.label ? (s(), l("label", {
        key: 2,
        for: L(t),
        class: u(`lgn-radio__label lgn-radio_label--${i.size}`)
      }, C(i.label), 11, Bt)) : f("", !0)
    ], 2));
  }
}), Tt = {}, xt = {
  width: "24",
  height: "24",
  viewBox: "0 0 24 24",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function Mt(a, e) {
  return s(), l("svg", xt, e[0] || (e[0] = [
    p("path", {
      d: "M8.24277 7.34004L1.86277 8.26505L1.74977 8.28804C1.57871 8.33346 1.42276 8.42345 1.29786 8.54885C1.17296 8.67424 1.08357 8.83053 1.03883 9.00177C0.994087 9.17301 0.995593 9.35305 1.04319 9.52352C1.09079 9.69398 1.18278 9.84876 1.30977 9.97204L5.93177 14.471L4.84177 20.826L4.82877 20.936C4.81829 21.113 4.85503 21.2895 4.93522 21.4475C5.0154 21.6056 5.13615 21.7395 5.2851 21.8356C5.43405 21.9316 5.60585 21.9863 5.78291 21.9942C5.95997 22.002 6.13593 21.9626 6.29277 21.88L11.9988 18.88L17.6918 21.88L17.7918 21.926C17.9568 21.9911 18.1362 22.011 18.3115 21.9838C18.4868 21.9566 18.6517 21.8833 18.7894 21.7713C18.927 21.6593 19.0323 21.5128 19.0946 21.3467C19.1569 21.1806 19.1738 21.0009 19.1438 20.826L18.0528 14.471L22.6768 9.97104L22.7548 9.88604C22.8662 9.74881 22.9392 9.5845 22.9665 9.40984C22.9937 9.23518 22.9742 9.05642 22.9099 8.89178C22.8455 8.72713 22.7387 8.58248 22.6003 8.47256C22.4618 8.36264 22.2967 8.29138 22.1218 8.26604L15.7418 7.34004L12.8898 1.56004C12.8072 1.39258 12.6795 1.25156 12.521 1.15295C12.3624 1.05434 12.1795 1.00208 11.9928 1.00208C11.8061 1.00208 11.6231 1.05434 11.4646 1.15295C11.306 1.25156 11.1783 1.39258 11.0958 1.56004L8.24277 7.34004Z",
      fill: "#eaecf0"
    }, null, -1)
  ]));
}
const It = /* @__PURE__ */ T(Tt, [["render", Mt]]), St = {}, At = {
  width: "24",
  height: "24",
  viewBox: "0 0 24 24",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function Dt(a, e) {
  return s(), l("svg", At, e[0] || (e[0] = [
    X('<g clip-path="url(#clip0_11384_100216)"><path d="M8.24277 7.34004L1.86277 8.26505L1.74977 8.28804C1.57871 8.33346 1.42276 8.42345 1.29786 8.54885C1.17296 8.67424 1.08357 8.83053 1.03883 9.00177C0.994087 9.17301 0.995593 9.35305 1.04319 9.52352C1.09079 9.69398 1.18278 9.84876 1.30977 9.97204L5.93177 14.471L4.84177 20.826L4.82877 20.936C4.81829 21.113 4.85503 21.2895 4.93522 21.4475C5.0154 21.6056 5.13615 21.7395 5.2851 21.8356C5.43405 21.9316 5.60585 21.9863 5.78291 21.9942C5.95997 22.002 6.13593 21.9626 6.29277 21.88L11.9988 18.88L17.6918 21.88L17.7918 21.926C17.9568 21.9911 18.1362 22.011 18.3115 21.9838C18.4868 21.9566 18.6517 21.8833 18.7894 21.7713C18.927 21.6593 19.0323 21.5128 19.0946 21.3467C19.1569 21.1806 19.1738 21.0009 19.1438 20.826L18.0528 14.471L22.6768 9.97104L22.7548 9.88604C22.8662 9.74881 22.9392 9.5845 22.9665 9.40984C22.9937 9.23518 22.9742 9.05642 22.9099 8.89178C22.8455 8.72713 22.7387 8.58248 22.6003 8.47256C22.4618 8.36264 22.2967 8.29138 22.1218 8.26604L15.7418 7.34004L12.8898 1.56004C12.8072 1.39258 12.6795 1.25156 12.521 1.15295C12.3624 1.05434 12.1795 1.00208 11.9928 1.00208C11.8061 1.00208 11.6231 1.05434 11.4646 1.15295C11.306 1.25156 11.1783 1.39258 11.0958 1.56004L8.24277 7.34004Z" fill="#D0D5DD"></path></g><path d="M8.24277 7.34004L1.86277 8.26505L1.74977 8.28804C1.57871 8.33346 1.42276 8.42345 1.29786 8.54885C1.17296 8.67424 1.08357 8.83053 1.03883 9.00177C0.994087 9.17301 0.995593 9.35305 1.04319 9.52352C1.09079 9.69398 1.18278 9.84876 1.30977 9.97204L5.93177 14.471L4.84177 20.826L4.82877 20.936C4.81829 21.113 4.85503 21.2895 4.93522 21.4475C5.0154 21.6056 5.13615 21.7395 5.2851 21.8356C5.43405 21.9316 5.60585 21.9863 5.78291 21.9942C5.95997 22.002 6.13593 21.9626 6.29277 21.88L11.9988 18.88L17.6918 21.88L17.7918 21.926C17.9568 21.9911 18.1362 22.011 18.3115 21.9838C18.4868 21.9566 18.6517 21.8833 18.7894 21.7713C18.927 21.6593 19.0323 21.5128 19.0946 21.3467C19.1569 21.1806 19.1738 21.0009 19.1438 20.826L18.0528 14.471L22.6768 9.97104L22.7548 9.88604C22.8662 9.74881 22.9392 9.5845 22.9665 9.40984C22.9937 9.23518 22.9742 9.05642 22.9099 8.89178C22.8455 8.72713 22.7387 8.58248 22.6003 8.47256C22.4618 8.36264 22.2967 8.29138 22.1218 8.26604L15.7418 7.34004L12.8898 1.56004C12.8072 1.39258 12.6795 1.25156 12.521 1.15295C12.3624 1.05434 12.1795 1.00208 11.9928 1.00208C11.8061 1.00208 11.6231 1.05434 11.4646 1.15295C11.306 1.25156 11.1783 1.39258 11.0958 1.56004L8.24277 7.34004Z" fill="#D0D5DD"></path><path d="M1.86277 8.26505L8.24277 7.34004L11.0958 1.56004C11.1783 1.39258 11.306 1.25156 11.4646 1.15295C11.6231 1.05434 11.8061 1.00208 11.9928 1.00208L11.9988 18.88L6.29277 21.88C6.13593 21.9626 5.95997 22.002 5.78291 21.9942C5.60585 21.9863 5.43405 21.9316 5.2851 21.8356C5.13615 21.7395 5.0154 21.6056 4.93522 21.4475C4.85503 21.2895 4.81829 21.113 4.82877 20.936L4.84177 20.826L5.93177 14.471L1.30977 9.97204C1.18278 9.84876 1.09079 9.69398 1.04319 9.52352C0.995593 9.35305 0.994087 9.17301 1.03883 9.00177C1.08357 8.83053 1.17296 8.67424 1.29786 8.54885C1.42276 8.42345 1.57871 8.33346 1.74977 8.28804L1.86277 8.26505Z" fill="#f79009"></path><defs><clipPath id="clip0_11384_100216"><rect width="24" height="24" fill="white"></rect></clipPath></defs>', 4)
  ]));
}
const Pt = /* @__PURE__ */ T(St, [["render", Dt]]), Ht = { class: "lgn-rating" }, Et = ["disabled", "onClick"], rn = /* @__PURE__ */ h({
  __name: "Rating",
  props: {
    allowHalf: { type: Boolean },
    disabled: { type: Boolean },
    value: { default: 0 },
    total: { default: 5 }
  },
  emits: ["click"],
  setup(a, { emit: e }) {
    const t = e, n = (r) => {
      t("click", r);
    };
    return (r, o) => (s(), l("div", Ht, [
      (s(!0), l(x, null, S(r.total, (i) => (s(), l("button", {
        key: i,
        disabled: r.disabled,
        onClick: (c) => n(i),
        class: u(["lgn-rating__star", { "lgn-rating__star--active": i <= r.value }])
      }, [
        r.allowHalf && r.value === i - 0.5 ? (s(), b(Pt, { key: 0 })) : (s(), b(It, { key: 1 }))
      ], 10, Et))), 128))
    ]));
  }
}), Rt = { class: "lgn-select" }, Wt = { class: "lgn-select__inner" }, Zt = {
  key: 0,
  class: "lgn-select__placeholder"
}, Ot = {
  key: 0,
  class: "lgn-select__input-item"
}, Ft = ["onClick"], cn = /* @__PURE__ */ h({
  __name: "Select",
  props: {
    block: { type: Boolean },
    caption: {},
    defaultValue: { default: "" },
    disabled: { type: Boolean },
    hint: {},
    label: {},
    multiple: { type: Boolean },
    options: {},
    placeholder: {},
    searchable: { type: Boolean },
    size: { default: "md" },
    status: { default: "normal" },
    variant: { default: "outline" }
  },
  emits: ["update:modelValue"],
  setup(a, { emit: e }) {
    const t = a, n = B(t.defaultValue), r = B(!1), o = B(""), i = e, c = (V) => {
      if (t.multiple) {
        const A = new Set(n.value);
        A.has(V) ? A.delete(V) : A.add(V), n.value = Array.from(A);
      } else
        r.value = !1, n.value = V;
      i("update:modelValue", n.value);
    }, d = () => {
      r.value = !r.value;
    }, m = _(() => {
      const V = o.value.toLowerCase();
      return t.options.filter((A) => A.label.toLowerCase().includes(V));
    }), g = (V) => {
      V.target.closest(".lgn-select") || (r.value = !1);
    };
    Z(() => {
      window.addEventListener("click", g);
    }), F(() => {
      window.removeEventListener("click", g);
    });
    const v = (V) => ({
      [V]: !0,
      [`${V}--${t.size}`]: !0,
      [`${V}--${t.status}`]: !0,
      [`${V}--${t.variant}`]: !!t.variant
    }), $ = _(() => v("lgn-select__label")), w = _(() => ({
      ...v("lgn-select__field"),
      "lgn-select__field--disabled": t.disabled
    })), z = _(() => v("lgn-select__input")), P = _(() => ({
      "lgn-select__list": !0,
      "lgn-select__list--open": r.value
    })), N = _(() => v("lgn-select__search")), q = _(() => v("lgn-select__caption")), Q = _(() => v("lgn-select__hint"));
    return (V, A) => (s(), l("div", Rt, [
      V.label ? (s(), l("label", {
        key: 0,
        class: u($.value)
      }, C(V.label), 3)) : f("", !0),
      p("div", Wt, [
        p("div", {
          class: u(w.value),
          onClick: d
        }, [
          n.value ? f("", !0) : (s(), l("span", Zt, C(t.placeholder), 1)),
          n.value.length ? (s(), l("div", {
            key: 1,
            class: u(z.value)
          }, [
            Array.isArray(n.value) ? (s(!0), l(x, { key: 1 }, S(n.value, (D) => (s(), l("span", {
              class: "lgn-select__input-item",
              key: D
            }, C(D), 1))), 128)) : (s(), l("span", Ot, C(n.value), 1))
          ], 2)) : f("", !0),
          U(se, { active: r.value }, null, 8, ["active"])
        ], 2),
        t.options.length ? (s(), l("div", {
          key: 0,
          class: u(P.value)
        }, [
          V.searchable ? W((s(), l("input", {
            key: 0,
            class: u(N.value),
            "onUpdate:modelValue": A[0] || (A[0] = (D) => o.value = D),
            type: "search",
            placeholder: "Search"
          }, null, 2)), [
            [te, o.value]
          ]) : f("", !0),
          (s(!0), l(x, null, S(m.value, (D) => (s(), l("span", {
            class: u(`lgn-select__option lgn-select__option--${t.size} ${n.value.includes(D.value) ? "lgn-select__option--selected" : ""}`),
            key: D.value,
            onClick: (As) => c(D.value)
          }, C(D.label), 11, Ft))), 128))
        ], 2)) : f("", !0)
      ]),
      p("span", {
        class: u(q.value)
      }, C(V.caption), 3),
      p("span", {
        class: u(Q.value)
      }, C(V.hint), 3)
    ]));
  }
}), jt = {}, Ut = {
  width: "24",
  height: "24",
  viewBox: "0 0 24 24",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function Nt(a, e) {
  return s(), l("svg", Ut, e[0] || (e[0] = [
    X('<g clip-path="url(#clip0_13925_242)"><path d="M18 6L6 18" stroke="#875BF7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6 6L18 18" stroke="#875BF7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g><defs><clipPath id="clip0_13925_242"><rect width="24" height="24" fill="white"></rect></clipPath></defs>', 2)
  ]));
}
const qt = /* @__PURE__ */ T(jt, [["render", Nt]]), Kt = {
  key: 0,
  class: "lgn-snackbar__images"
}, Gt = {
  key: 0,
  class: "lgn-snackbar__image lgn-snackbar__image--icon"
}, Qt = ["src", "alt"], Xt = { class: "lgn-snackbar__content" }, Jt = {
  key: 0,
  class: "lgn-snackbar__text lgn-snackbar__text--title"
}, Yt = {
  key: 1,
  class: "lgn-snackbar__text lgn-snackbar__text--description"
}, dn = /* @__PURE__ */ h({
  __name: "Snackbar",
  props: {
    avatarSrc: {},
    avatarAlt: {},
    description: {},
    icon: {},
    onClose: {},
    position: { default: "bottom-left" },
    show: { type: Boolean, default: !1 },
    textClose: {},
    title: {},
    timer: { default: 5e3 }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-snackbar": !0,
      [`lgn-snackbar--${e.position}`]: !0
    })), n = B(e.show), r = () => {
      var c;
      (c = e.onClose) == null || c.call(e);
    };
    let o = null;
    const i = () => {
      e.show && (o = setTimeout(() => {
        n.value = !1;
      }, e.timer));
    };
    return O(() => e.show, () => {
      n.value = e.show, e.show ? i() : o && clearTimeout(o);
    }), F(() => {
      o && clearTimeout(o);
    }), (c, d) => n.value ? (s(), l("div", {
      key: 0,
      role: "presentation",
      class: u(t.value)
    }, [
      c.icon || c.avatarSrc ? (s(), l("div", Kt, [
        c.icon ? (s(), l("span", Gt, [
          (s(), b(y(c.icon)))
        ])) : f("", !0),
        c.avatarSrc ? (s(), l("img", {
          key: 1,
          src: c.avatarSrc,
          alt: c.avatarAlt,
          class: "lgn-snackbar__image lgn-snackbar__image--avatar"
        }, null, 8, Qt)) : f("", !0)
      ])) : f("", !0),
      p("div", Xt, [
        c.title ? (s(), l("h4", Jt, C(c.title), 1)) : f("", !0),
        c.description ? (s(), l("p", Yt, C(c.description), 1)) : f("", !0)
      ]),
      p("button", {
        class: "lgn-snackbar__close",
        onClick: r
      }, [
        M(C(c.textClose) + " ", 1),
        U(qt)
      ])
    ], 2)) : f("", !0);
  }
}), un = /* @__PURE__ */ h({
  __name: "Spinner",
  props: {
    size: { default: "md" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-spinner": !0,
      [`lgn-spinner--${e.size}`]: !0
    }));
    return (n, r) => (s(), l("span", {
      class: u(t.value)
    }, null, 2));
  }
}), es = { key: 1 }, ts = { class: "lgn-stepper__title" }, ss = { class: "lgn-stepper__description" }, pn = /* @__PURE__ */ h({
  __name: "Stepper",
  props: {
    items: { default: () => [] },
    active: { default: 0 },
    mode: { default: "horizontal" },
    textPlacement: { default: "right" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-stepper": !0,
      [`lgn-stepper--${e.mode}-${e.textPlacement}`]: !0
    })), n = _(() => ({
      "lgn-stepper__separator": !0,
      [`lgn-stepper__separator--${e.mode}-${e.textPlacement}`]: !0
    })), r = _(() => ({
      "lgn-stepper__button": !0,
      [`lgn-stepper__button--${e.textPlacement}`]: !0,
      "lgn-stepper__button--separator-horizontal": e.textPlacement === "bottom" && e.mode === "horizontal",
      "lgn-stepper__button--separator-vertical": e.textPlacement === "right" && e.mode === "vertical"
    })), o = _(() => ({
      "lgn-stepper__content": !0,
      [`lgn-stepper__content--${e.mode}-right`]: e.textPlacement === "right"
    }));
    return (i, c) => (s(), l("div", {
      class: u(t.value)
    }, [
      (s(!0), l(x, null, S(i.items, (d, m) => (s(), l(x, { key: m }, [
        m > 0 ? (s(), l("span", {
          key: 0,
          class: u([n.value, `${m <= i.active ? "lgn-stepper__separator--active" : ""}`])
        }, null, 2)) : f("", !0),
        p("button", {
          class: u([r.value, `${m < i.active ? "lgn-stepper__button--active" : ""}`])
        }, [
          p("span", {
            class: u(`lgn-stepper__indicator ${m < i.active ? "lgn-stepper__indicator--active" : ""}`)
          }, [
            d.icon ? (s(), b(y(d.icon), { key: 0 })) : f("", !0),
            d.icon ? f("", !0) : (s(), l("span", es, C(m + 1), 1))
          ], 2),
          p("span", {
            class: u(o.value)
          }, [
            p("span", ts, C(d.title), 1),
            p("span", ss, C(d.description), 1)
          ], 2)
        ], 2)
      ], 64))), 128))
    ], 2));
  }
}), ns = ["id", "value", "checked", "disabled"], ls = ["id", "value"], as = ["for"], _n = /* @__PURE__ */ h({
  __name: "Switch",
  props: /* @__PURE__ */ E({
    checked: { type: Boolean },
    disabled: { type: Boolean },
    id: {},
    label: {},
    size: { default: "md" },
    value: {}
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(a) {
    const e = a, t = e.id || Math.random().toString(36).substring(7), n = R(a, "modelValue"), r = _(() => ({
      "lgn-switch": !0,
      [`lgn-switch--${e.size}`]: !0
    })), o = _(() => ({
      "lgn-switch__field": !0,
      [`lgn-switch__field--${e.size}`]: !0
    }));
    return (i, c) => (s(), l("div", {
      class: u(r.value)
    }, [
      i.checked || i.disabled ? (s(), l("input", {
        key: 0,
        id: L(t),
        type: "checkbox",
        class: u(o.value),
        value: i.value,
        checked: i.checked,
        disabled: i.disabled
      }, null, 10, ns)) : W((s(), l("input", {
        key: 1,
        id: L(t),
        type: "checkbox",
        class: u(o.value),
        value: i.value,
        "onUpdate:modelValue": c[0] || (c[0] = (d) => n.value = d)
      }, null, 10, ls)), [
        [Y, n.value]
      ]),
      i.label ? (s(), l("label", {
        key: 2,
        for: L(t),
        class: u(`lgn-switch__label lgn-switch_label--${i.size}`)
      }, C(i.label), 11, as)) : f("", !0)
    ], 2));
  }
}), os = ["id"], is = ["onClick", "aria-selected", "aria-controls"], rs = {
  key: 0,
  class: "lgn-tabs__icon"
}, fn = /* @__PURE__ */ h({
  __name: "Tabs",
  props: {
    active: { default: 0 },
    id: {},
    items: { default: () => [] },
    onClick: {},
    mode: { default: "horizontal" },
    borderReverse: { type: Boolean }
  },
  setup(a) {
    const e = a, t = e.id ?? Math.random().toString(36).substring(7), n = B(e.active), r = _(() => ({
      "lgn-tabs": !0,
      [`lgn-tabs--${e.mode}`]: !0,
      [`lgn-tabs--${e.mode}-reverse`]: e.borderReverse
    })), o = (c) => ({
      "lgn-tabs__button": !0,
      [`lgn-tabs__button--${e.mode}`]: !0,
      [`lgn-tabs__button--${e.mode}-reverse`]: e.borderReverse,
      "lgn-tabs__button--active": c === n.value
    }), i = (c) => {
      var d;
      n.value = c, (d = e.onClick) == null || d.call(e, c);
    };
    return O(() => e.active, (c) => {
      n.value = c ?? 0;
    }), (c, d) => (s(), l("div", {
      class: u(r.value),
      id: c.id
    }, [
      (s(!0), l(x, null, S(e.items, (m, g) => (s(), l("button", {
        key: g,
        role: "tab",
        onClick: (v) => i(g),
        "aria-selected": g === n.value,
        "aria-controls": `tabpanel-${g}-${L(t)}`,
        class: u(o(g))
      }, [
        m.icon ? (s(), l("span", rs, [
          (s(), b(y(m.icon)))
        ])) : f("", !0),
        M(" " + C(m.label), 1)
      ], 10, is))), 128))
    ], 10, os));
  }
}), gn = /* @__PURE__ */ h({
  __name: "Table",
  props: {
    bordered: { type: Boolean, default: !1 },
    hoverable: { type: Boolean, default: !1 },
    striped: { type: Boolean, default: !1 }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-table": !0,
      "lgn-table--bordered": e.bordered,
      "lgn-table--hoverable": e.hoverable,
      "lgn-table--striped": e.striped
    }));
    return (n, r) => (s(), l("table", {
      class: u(t.value)
    }, [
      k(n.$slots, "default")
    ], 2));
  }
}), hn = /* @__PURE__ */ h({
  __name: "Text",
  props: {
    as: { default: "span" },
    size: { default: "bodySm" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-text": !0,
      [`lgn-text--${e.size}`]: !0
    }));
    return (n, r) => (s(), b(y(n.as), {
      class: u(t.value)
    }, {
      default: I(() => [
        k(n.$slots, "default")
      ]),
      _: 3
    }, 8, ["class"]));
  }
}), cs = /* @__PURE__ */ h({
  __name: "TextareaContainer",
  props: {
    block: { type: Boolean }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-textarea": !0,
      "lgn-textarea--block": e.block
    }));
    return (n, r) => (s(), l("div", {
      class: u(t.value)
    }, [
      k(n.$slots, "default")
    ], 2));
  }
}), ds = /* @__PURE__ */ h({
  __name: "TextareaLabel",
  props: {
    size: { default: "md" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-textarea__label": !0,
      [`lgn-textarea__label--${e.size}`]: !0
    }));
    return (n, r) => (s(), l("label", {
      class: u(t.value)
    }, [
      k(n.$slots, "default")
    ], 2));
  }
}), us = /* @__PURE__ */ h({
  __name: "TextareaField",
  props: /* @__PURE__ */ E({
    variant: { default: "outline" },
    size: { default: "md" },
    status: { default: "normal" }
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(a) {
    const e = a, t = R(a, "modelValue"), n = _(() => ({
      "lgn-textarea__field": !0,
      [`lgn-textarea__field--${e.size}`]: !0,
      [`lgn-textarea__field--${e.variant}`]: !0,
      [`lgn-textarea__field--${e.status}`]: !0
    }));
    return (r, o) => W((s(), l("textarea", {
      class: u(n.value),
      "onUpdate:modelValue": o[0] || (o[0] = (i) => t.value = i)
    }, null, 2)), [
      [te, t.value]
    ]);
  }
}), ps = /* @__PURE__ */ h({
  __name: "TextareaHint",
  props: {
    size: { default: "md" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-textarea__hint": !0,
      [`lgn-textarea__hint--${e.size}`]: !0
    }));
    return (n, r) => (s(), l("span", {
      class: u(t.value)
    }, [
      k(n.$slots, "default")
    ], 2));
  }
}), _s = /* @__PURE__ */ h({
  __name: "TextareaCaption",
  props: {
    size: { default: "md" },
    status: { default: "normal" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-textarea__caption": !0,
      [`lgn-textarea__caption--${e.size}`]: !0,
      [`lgn-textarea__caption--${e.status}`]: !0
    }));
    return (n, r) => (s(), l("span", {
      class: u(t.value)
    }, [
      k(n.$slots, "default")
    ], 2));
  }
}), mn = /* @__PURE__ */ h({
  __name: "Textarea",
  props: /* @__PURE__ */ E({
    caption: {},
    disabled: { type: Boolean },
    hint: {},
    id: {},
    label: {},
    name: {},
    block: { type: Boolean },
    variant: { default: "outline" },
    size: { default: "md" },
    status: { default: "normal" }
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(a) {
    const e = J(), t = a, n = t.id || `lgn-textarea-${Math.floor(Math.random() * 1e4)}`, r = R(a, "modelValue"), o = _(() => {
      const { style: i, ...c } = e ?? {};
      return c;
    });
    return (i, c) => (s(), b(cs, {
      block: t.block,
      style: {}
    }, {
      default: I(() => [
        i.label ? (s(), b(ds, {
          key: 0,
          for: L(n),
          size: t.size
        }, {
          default: I(() => [
            M(C(i.label), 1)
          ]),
          _: 1
        }, 8, ["for", "size"])) : f("", !0),
        U(us, j({
          id: L(n),
          disabled: t.disabled,
          name: t.name,
          variant: t.variant,
          size: t.size,
          status: t.status
        }, o.value, {
          modelValue: r.value,
          "onUpdate:modelValue": c[0] || (c[0] = (d) => r.value = d)
        }), null, 16, ["id", "disabled", "name", "variant", "size", "status", "modelValue"]),
        i.hint ? (s(), b(ps, {
          key: 1,
          size: t.size
        }, {
          default: I(() => [
            M(C(i.hint), 1)
          ]),
          _: 1
        }, 8, ["size"])) : f("", !0),
        i.caption ? (s(), b(_s, {
          key: 2,
          size: t.size,
          status: t.status
        }, {
          default: I(() => [
            M(C(i.caption), 1)
          ]),
          _: 1
        }, 8, ["size", "status"])) : f("", !0)
      ]),
      _: 1
    }, 8, ["block"]));
  }
}), fs = /* @__PURE__ */ h({
  __name: "TextfieldContainer",
  props: {
    block: { type: Boolean }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-textfield": !0,
      "lgn-textfield--block": e.block
    }));
    return (n, r) => (s(), l("div", {
      class: u(t.value)
    }, [
      k(n.$slots, "default")
    ], 2));
  }
}), gs = /* @__PURE__ */ h({
  __name: "TextfieldLabel",
  props: {
    size: { default: "md" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-textfield__label": !0,
      [`lgn-textfield__label--${e.size}`]: !0
    }));
    return (n, r) => (s(), l("label", {
      class: u(t.value)
    }, [
      k(n.$slots, "default")
    ], 2));
  }
}), hs = {
  key: 0,
  class: "lgn-textfield__prefix"
}, ms = ["disabled"], vs = {
  key: 3,
  class: "lgn-textfield__suffix"
}, Cs = /* @__PURE__ */ h({
  __name: "TextfieldField",
  props: /* @__PURE__ */ E({
    disabled: { type: Boolean },
    iconLeft: {},
    iconRight: {},
    id: {},
    name: {},
    prefix: {},
    suffix: {},
    variant: { default: "outline" },
    size: { default: "md" },
    status: { default: "normal" }
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(a) {
    const e = J(), t = R(a, "modelValue"), n = a, r = _(() => ({
      "lgn-textfield__field": !0,
      "lgn-textfield__field--disabled": n.disabled,
      [`lgn-textfield__field--${n.size}`]: !0,
      [`lgn-textfield__field--${n.variant}`]: !0,
      [`lgn-textfield__field--${n.status}`]: !0
    })), o = _(() => ({
      "lgn-textfield__input": !0,
      [`lgn-textfield__input--${n.status}`]: !0
    })), i = _(() => {
      const { style: c, ...d } = e ?? {};
      return d;
    });
    return (c, d) => (s(), l("div", {
      class: u(r.value)
    }, [
      n.prefix ? (s(), l("span", hs, C(n.prefix), 1)) : f("", !0),
      n.iconLeft ? (s(), l("span", {
        key: 1,
        class: u(`lgn-textfield__icon-left lgn-textfield__icon-left--${n.size}`)
      }, [
        (s(), b(y(n.iconLeft)))
      ], 2)) : f("", !0),
      W(p("input", j({
        "onUpdate:modelValue": d[0] || (d[0] = (m) => t.value = m),
        class: o.value,
        disabled: n.disabled
      }, i.value), null, 16, ms), [
        [oe, t.value]
      ]),
      n.iconRight ? (s(), l("span", {
        key: 2,
        class: u(`lgn-textfield__icon-left lgn-textfield__icon-left--${n.size}`)
      }, [
        (s(), b(y(n.iconRight)))
      ], 2)) : f("", !0),
      n.suffix ? (s(), l("span", vs, C(n.suffix), 1)) : f("", !0)
    ], 2));
  }
}), bs = /* @__PURE__ */ h({
  __name: "TextfieldHint",
  props: {
    size: { default: "md" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-textfield__hint": !0,
      [`lgn-textfield__hint--${e.size}`]: !0
    }));
    return (n, r) => (s(), l("span", {
      class: u(t.value)
    }, [
      k(n.$slots, "default")
    ], 2));
  }
}), $s = /* @__PURE__ */ h({
  __name: "TextfieldCaption",
  props: {
    size: { default: "md" },
    status: { default: "normal" }
  },
  setup(a) {
    const e = a, t = _(() => ({
      "lgn-textfield__caption": !0,
      [`lgn-textfield__caption--${e.size}`]: !0,
      [`lgn-textfield__caption--${e.status}`]: !0
    }));
    return (n, r) => (s(), l("span", {
      class: u(t.value)
    }, [
      k(n.$slots, "default")
    ], 2));
  }
}), vn = /* @__PURE__ */ h({
  __name: "Textfield",
  props: /* @__PURE__ */ E({
    caption: {},
    hint: {},
    label: {},
    block: { type: Boolean },
    disabled: { type: Boolean },
    iconLeft: {},
    iconRight: {},
    id: {},
    name: {},
    prefix: {},
    suffix: {},
    variant: { default: "outline" },
    size: { default: "md" },
    status: { default: "normal" }
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(a) {
    const e = J(), t = a, n = t.id || `lgn-textfield-${Math.floor(Math.random() * 1e4)}`, r = R(a, "modelValue"), o = _(() => {
      const { style: i, ...c } = e ?? {};
      return c;
    });
    return (i, c) => (s(), b(fs, {
      block: t.block,
      style: H(i.$attrs.style)
    }, {
      default: I(() => [
        i.label ? (s(), b(gs, {
          key: 0,
          for: L(n),
          size: t.size
        }, {
          default: I(() => [
            M(C(i.label), 1)
          ]),
          _: 1
        }, 8, ["for", "size"])) : f("", !0),
        U(Cs, j({
          modelValue: r.value,
          "onUpdate:modelValue": c[0] || (c[0] = (d) => r.value = d)
        }, o.value, {
          id: L(n),
          status: t.status,
          name: t.name,
          size: t.size,
          variant: t.variant,
          prefix: t.prefix,
          suffix: t.suffix,
          "icon-left": t.iconLeft,
          "icon-right": t.iconRight,
          disabled: t.disabled
        }), null, 16, ["modelValue", "id", "status", "name", "size", "variant", "prefix", "suffix", "icon-left", "icon-right", "disabled"]),
        i.hint ? (s(), b(bs, {
          key: 1,
          size: t.size
        }, {
          default: I(() => [
            M(C(i.hint), 1)
          ]),
          _: 1
        }, 8, ["size"])) : f("", !0),
        i.caption ? (s(), b($s, {
          key: 2,
          size: t.size,
          status: t.status
        }, {
          default: I(() => [
            M(C(i.caption), 1)
          ]),
          _: 1
        }, 8, ["size", "status"])) : f("", !0)
      ]),
      _: 1
    }, 8, ["block", "style"]));
  }
}), Cn = /* @__PURE__ */ h({
  __name: "Tooltip",
  props: {
    position: { default: "top" },
    text: {}
  },
  setup(a) {
    const e = a, t = B(null), n = B(null), r = B(!1), o = B({}), i = () => {
      r.value = !0, d();
    }, c = () => {
      r.value = !1;
    }, d = () => {
      if (t.value && n.value) {
        const g = t.value.getBoundingClientRect(), v = n.value.getBoundingClientRect(), $ = {};
        switch (e.position) {
          case "left":
            $.left = `${g.left - v.width - 8}px`, $.top = `${g.top + (g.height - v.height) / 2}px`;
            break;
          case "right":
            $.left = `${g.right + 8}px`, $.top = `${g.top + (g.height - v.height) / 2}px`;
            break;
          case "bottom":
            $.left = `${g.left + (g.width - v.width) / 2}px`, $.top = `${g.bottom + 8}px`;
            break;
          case "top":
            $.left = `${g.left + (g.width - v.width) / 2}px`, $.top = `${g.top - v.height - 8}px`;
            break;
        }
        o.value = $;
      }
    };
    Z(() => {
      window.addEventListener("resize", d), O(() => e.position, d);
    }), F(() => {
      window.removeEventListener("resize", d);
    });
    const m = _(() => ({
      "lgn-tooltip__triangle": !0,
      [`lgn-tooltip__triangle--${e.position}`]: !0
    }));
    return (g, v) => (s(), l(x, null, [
      p("div", {
        ref_key: "trigger",
        ref: t,
        class: "lgn-tooltip",
        onMouseenter: i,
        onMouseleave: c
      }, [
        k(g.$slots, "default")
      ], 544),
      (s(), b(ee, { to: "body" }, [
        p("div", {
          class: "lgn-tooltip-text",
          style: H([o.value, { opacity: r.value ? 1 : 0 }]),
          ref_key: "tooltip",
          ref: n
        }, [
          M(C(g.text) + " ", 1),
          (s(), l("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            class: u(m.value),
            width: "16",
            height: "9",
            viewBox: "0 0 16 9",
            fill: "none"
          }, v[0] || (v[0] = [
            p("path", {
              d: "M14.0711 0.485289C14.962 0.485289 15.4081 1.56243 14.7782 2.1924L8.70711 8.26347C8.31658 8.654 7.68342 8.654 7.29289 8.26347L1.22183 2.1924C0.591867 1.56243 1.03803 0.485289 1.92894 0.485289L14.0711 0.485289Z",
              fill: "white"
            }, null, -1)
          ]), 2))
        ], 4)
      ]))
    ], 64));
  }
}), ks = {}, ws = {
  width: "16",
  height: "16",
  viewBox: "0 0 16 16",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function ys(a, e) {
  return s(), l("svg", ws, e[0] || (e[0] = [
    p("path", {
      "fill-rule": "evenodd",
      "clip-rule": "evenodd",
      d: "M7 15C7 15.55 7.45 16 8 16C8.55 16 9 15.55 9 15V9H15C15.55 9 16 8.55 16 8C16 7.45 15.55 7 15 7H9V1C9 0.45 8.55 0 8 0C7.45 0 7 0.45 7 1V7H1C0.45 7 0 7.45 0 8C0 8.55 0.45 9 1 9H7V15Z",
      fill: "#212121"
    }, null, -1)
  ]));
}
const Ls = /* @__PURE__ */ T(ks, [["render", ys]]), zs = {}, Vs = {
  width: "16",
  height: "2",
  viewBox: "0 0 16 2",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function Bs(a, e) {
  return s(), l("svg", Vs, e[0] || (e[0] = [
    p("path", {
      d: "M1 1H15H1Z",
      fill: "#212121"
    }, null, -1),
    p("path", {
      d: "M1 1H15",
      stroke: "#212121",
      "stroke-width": "2",
      "stroke-linecap": "round",
      "stroke-linejoin": "round"
    }, null, -1)
  ]));
}
const Ts = /* @__PURE__ */ T(zs, [["render", Bs]]), xs = { class: "lgn-tree__label" }, Ms = { key: 0 }, Is = /* @__PURE__ */ h({
  __name: "TreeItem",
  props: {
    items: {},
    iconShow: {},
    iconHide: {}
  },
  setup(a) {
    const e = a, t = B(!1), n = _(() => {
      var i;
      return ((i = e.items) == null ? void 0 : i.children) && e.items.children.length;
    }), r = () => {
      t.value = !t.value;
    }, o = () => {
      n.value || (t.value = !0);
    };
    return (i, c) => {
      var m, g, v;
      const d = ie("TreeItem", !0);
      return s(), l("li", null, [
        p("span", xs, [
          (m = i.items) != null && m.children ? (s(), l("button", {
            key: 0,
            class: "lgn-tree__button",
            onClick: r,
            onDblclick: o
          }, [
            t.value && n.value ? (s(), b(y(i.iconShow ?? Ts), { key: 0 })) : (s(), b(y(i.iconHide ?? Ls), { key: 1 }))
          ], 32)) : f("", !0),
          M(" " + C((g = i.items) == null ? void 0 : g.title), 1)
        ]),
        n.value ? W((s(), l("ul", Ms, [
          (s(!0), l(x, null, S((v = i.items) == null ? void 0 : v.children, ($) => (s(), b(d, {
            items: $,
            "icon-hide": i.iconHide,
            "icon-show": i.iconShow
          }, null, 8, ["items", "icon-hide", "icon-show"]))), 256))
        ], 512)), [
          [re, t.value]
        ]) : f("", !0)
      ]);
    };
  }
}), Ss = { class: "lgn-tree" }, bn = /* @__PURE__ */ h({
  __name: "Tree",
  props: {
    items: {},
    iconShow: {},
    iconHide: {}
  },
  setup(a) {
    return (e, t) => (s(), l("ul", Ss, [
      (s(!0), l(x, null, S(e.items, (n, r) => (s(), b(Is, {
        key: r,
        items: n,
        "icon-hide": e.iconHide,
        "icon-show": e.iconShow
      }, null, 8, ["items", "icon-hide", "icon-show"]))), 128))
    ]));
  }
});
export {
  Ps as Accordion,
  Hs as Alert,
  Es as Anchor,
  Rs as Avatar,
  Ws as Badge,
  Os as Breadcrumb,
  Fs as BreadcrumbItem,
  Zs as Button,
  js as Card,
  Ns as CardBody,
  qs as CardFooter,
  Us as CardHeader,
  Ks as CardMedia,
  Gs as Checkbox,
  Qs as Chip,
  Xs as Divider,
  Js as Dropdown,
  en as DropdownBody,
  Ys as DropdownTrigger,
  tn as Image,
  sn as Modal,
  nn as Pagination,
  ln as PinInput,
  an as Progressbar,
  on as Radio,
  rn as Rating,
  cn as Select,
  dn as Snackbar,
  un as Spinner,
  pn as Stepper,
  _n as Switch,
  gn as Table,
  fn as Tabs,
  hn as Text,
  mn as Textarea,
  _s as TextareaCaption,
  cs as TextareaContainer,
  us as TextareaField,
  ps as TextareaHint,
  ds as TextareaLabel,
  vn as Textfield,
  $s as TextfieldCaption,
  fs as TextfieldContainer,
  Cs as TextfieldField,
  bs as TextfieldHint,
  gs as TextfieldLabel,
  Cn as Tooltip,
  bn as Tree
};
//# sourceMappingURL=index.es.js.map