@squirrel-cloud/ui-vue 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,6 +23,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
23
23
  }>, {
24
24
  placement: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
25
25
  offset: number;
26
+ teleported: boolean;
26
27
  trigger: "hover" | "click" | "manual";
27
28
  showAfter: number;
28
29
  hideAfter: number;
@@ -1,4 +1,4 @@
1
- import { createElementBlock as _, openBlock as C, createElementVNode as J, defineComponent as z, computed as w, normalizeClass as M, createVNode as Xt, unref as H, withCtx as ft, createBlock as Q, createCommentVNode as st, renderSlot as T, resolveDynamicComponent as xt, useSlots as Ut, toDisplayString as le, mergeModels as bt, useModel as Yt, useTemplateRef as St, withDirectives as Kt, vModelText as ce, ref as nt, shallowRef as ae, watch as yt, getCurrentScope as ue, onScopeDispose as fe, shallowReadonly as Y, onBeforeUnmount as de, Fragment as pe, withModifiers as qt, Teleport as me, Transition as he, normalizeStyle as At, vShow as ge } from "vue";
1
+ import { createElementBlock as _, openBlock as C, createElementVNode as J, defineComponent as M, computed as w, normalizeClass as D, createVNode as Xt, unref as H, withCtx as ft, createBlock as Q, createCommentVNode as st, renderSlot as T, resolveDynamicComponent as xt, useSlots as Ut, toDisplayString as le, mergeModels as bt, useModel as Yt, useTemplateRef as St, withDirectives as Kt, vModelText as ce, ref as nt, shallowRef as ae, watch as yt, getCurrentScope as ue, onScopeDispose as fe, shallowReadonly as Y, onBeforeUnmount as de, Fragment as pe, withModifiers as qt, Teleport as me, Transition as he, normalizeStyle as At, vShow as ge } from "vue";
2
2
  const ve = (t, e) => {
3
3
  const n = t.__vccOpts || t;
4
4
  for (const [o, s] of e)
@@ -23,7 +23,7 @@ function xe(t, e) {
23
23
  ], -1)
24
24
  ]));
25
25
  }
26
- const be = /* @__PURE__ */ ve(ye, [["render", xe]]), Se = ["disabled"], On = /* @__PURE__ */ z({
26
+ const be = /* @__PURE__ */ ve(ye, [["render", xe]]), Se = ["disabled"], On = /* @__PURE__ */ M({
27
27
  __name: "SqButton",
28
28
  props: {
29
29
  type: {},
@@ -40,7 +40,7 @@ const be = /* @__PURE__ */ ve(ye, [["render", xe]]), Se = ["disabled"], On = /*
40
40
  return e.size !== "md" && i.push(`sq-button--${e.size}`), e.type && i.push(`is-${e.type}`), e.round && i.push("is-round"), e.text && i.push("is-text"), i;
41
41
  }), o = w(() => e.loading ? be : e.icon), s = w(() => e.loading || e.disabled);
42
42
  return (i, r) => (C(), _("button", {
43
- class: M(["sq-button", n.value]),
43
+ class: D(["sq-button", n.value]),
44
44
  disabled: s.value
45
45
  }, [
46
46
  Xt(H(kt), {
@@ -60,7 +60,7 @@ const be = /* @__PURE__ */ ve(ye, [["render", xe]]), Se = ["disabled"], On = /*
60
60
  }, Le = ["textContent"], Ae = {
61
61
  key: 1,
62
62
  class: "sq-card-footer"
63
- }, _n = /* @__PURE__ */ z({
63
+ }, _n = /* @__PURE__ */ M({
64
64
  __name: "SqCard",
65
65
  props: {
66
66
  title: {},
@@ -71,7 +71,7 @@ const be = /* @__PURE__ */ ve(ye, [["render", xe]]), Se = ["disabled"], On = /*
71
71
  return (o, s) => (C(), _("div", Re, [
72
72
  n.title || H(e).title ? (C(), _("div", Ce, [
73
73
  J("h2", {
74
- class: M({ "has-decorative": n.decorative }),
74
+ class: D({ "has-decorative": n.decorative }),
75
75
  textContent: le(n.title)
76
76
  }, null, 10, Le),
77
77
  T(o.$slots, "title")
@@ -88,7 +88,7 @@ const be = /* @__PURE__ */ ve(ye, [["render", xe]]), Se = ["disabled"], On = /*
88
88
  }, _e = ["disabled", "readonly"], Te = {
89
89
  key: 1,
90
90
  class: "sq-input-suffix"
91
- }, Tn = /* @__PURE__ */ z({
91
+ }, Tn = /* @__PURE__ */ M({
92
92
  __name: "SqInput",
93
93
  props: /* @__PURE__ */ bt({
94
94
  status: {},
@@ -121,7 +121,7 @@ const be = /* @__PURE__ */ ve(ye, [["render", xe]]), Se = ["disabled"], On = /*
121
121
  (p = l.value) == null || p.blur();
122
122
  }
123
123
  return e({ focus: m, blur: d }), (p, h) => (C(), _("section", {
124
- class: M(["sq-input", a.value])
124
+ class: D(["sq-input", a.value])
125
125
  }, [
126
126
  c.value ? (C(), _("span", Oe, [
127
127
  T(p.$slots, "prefix", {}, () => [
@@ -463,13 +463,13 @@ const He = function(t) {
463
463
  var Dt;
464
464
  const I = (Dt = U.filter((O) => {
465
465
  if (V) {
466
- const D = W(O.placement);
467
- return D === y || // Create a bias to the `y` side axis due to horizontal
466
+ const q = W(O.placement);
467
+ return q === y || // Create a bias to the `y` side axis due to horizontal
468
468
  // reading directions favoring greater width.
469
- D === "y";
469
+ q === "y";
470
470
  }
471
471
  return !0;
472
- }).map((O) => [O.placement, O.overflows.filter((D) => D > 0).reduce((D, re) => D + re, 0)]).sort((O, D) => O[1] - D[1])[0]) == null ? void 0 : Dt[0];
472
+ }).map((O) => [O.placement, O.overflows.filter((q) => q > 0).reduce((q, re) => q + re, 0)]).sort((O, q) => O[1] - q[1])[0]) == null ? void 0 : Dt[0];
473
473
  I && (et = I);
474
474
  break;
475
475
  }
@@ -594,13 +594,13 @@ function Tt(t) {
594
594
  return Qe.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || Ze.some((o) => (n.willChange || "").includes(o)) || tn.some((o) => (n.contain || "").includes(o));
595
595
  }
596
596
  function en(t) {
597
- let e = q(t);
597
+ let e = z(t);
598
598
  for (; B(e) && !tt(e); ) {
599
599
  if (Tt(e))
600
600
  return e;
601
601
  if (mt(e))
602
602
  return null;
603
- e = q(e);
603
+ e = z(e);
604
604
  }
605
605
  return null;
606
606
  }
@@ -623,7 +623,7 @@ function ht(t) {
623
623
  scrollTop: t.scrollY
624
624
  };
625
625
  }
626
- function q(t) {
626
+ function z(t) {
627
627
  if (X(t) === "html")
628
628
  return t;
629
629
  const e = (
@@ -636,7 +636,7 @@ function q(t) {
636
636
  return Ft(e) ? e.host : e;
637
637
  }
638
638
  function Qt(t) {
639
- const e = q(t);
639
+ const e = z(t);
640
640
  return tt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : B(e) && rt(e) ? e : Qt(e);
641
641
  }
642
642
  function it(t, e, n) {
@@ -816,7 +816,7 @@ function It(t, e, n) {
816
816
  return ut(o);
817
817
  }
818
818
  function ne(t, e) {
819
- const n = q(t);
819
+ const n = z(t);
820
820
  return n === e || !E(n) || tt(n) ? !1 : $(n).position === "fixed" || ne(n, e);
821
821
  }
822
822
  function dn(t, e) {
@@ -825,10 +825,10 @@ function dn(t, e) {
825
825
  return n;
826
826
  let o = it(t, [], !1).filter((l) => E(l) && X(l) !== "body"), s = null;
827
827
  const i = $(t).position === "fixed";
828
- let r = i ? q(t) : t;
828
+ let r = i ? z(t) : t;
829
829
  for (; E(r) && !tt(r); ) {
830
830
  const l = $(r), a = Tt(r);
831
- !a && l.position === "fixed" && (s = null), (i ? !a && !s : !a && l.position === "static" && !!s && un.has(s.position) || rt(r) && !a && ne(t, r)) ? o = o.filter((u) => u !== r) : s = l, r = q(r);
831
+ !a && l.position === "fixed" && (s = null), (i ? !a && !s : !a && l.position === "static" && !!s && un.has(s.position) || rt(r) && !a && ne(t, r)) ? o = o.filter((u) => u !== r) : s = l, r = z(r);
832
832
  }
833
833
  return e.set(t, o), o;
834
834
  }
@@ -900,11 +900,11 @@ function oe(t, e) {
900
900
  if (mt(t))
901
901
  return n;
902
902
  if (!B(t)) {
903
- let s = q(t);
903
+ let s = z(t);
904
904
  for (; s && !tt(s); ) {
905
905
  if (E(s) && !wt(s))
906
906
  return s;
907
- s = q(s);
907
+ s = z(s);
908
908
  }
909
909
  return n;
910
910
  }
@@ -1139,12 +1139,12 @@ function Ln(t, e, n) {
1139
1139
  update: b
1140
1140
  };
1141
1141
  }
1142
- const En = /* @__PURE__ */ z({
1142
+ const En = /* @__PURE__ */ M({
1143
1143
  __name: "SqPopover",
1144
1144
  props: /* @__PURE__ */ bt({
1145
1145
  placement: { default: "top" },
1146
1146
  offset: { default: 10 },
1147
- teleported: { type: Boolean },
1147
+ teleported: { type: Boolean, default: !0 },
1148
1148
  trigger: { default: "hover" },
1149
1149
  showAfter: { default: 0 },
1150
1150
  hideAfter: { default: 300 },
@@ -1190,7 +1190,7 @@ const En = /* @__PURE__ */ z({
1190
1190
  }
1191
1191
  return (d, p) => (C(), _(pe, null, [
1192
1192
  J("span", {
1193
- class: "sq-popover-trigger",
1193
+ class: D(["sq-popover-trigger", d.$attrs.class]),
1194
1194
  ref_key: "triggerRef",
1195
1195
  ref: o,
1196
1196
  onMouseenter: l,
@@ -1198,7 +1198,7 @@ const En = /* @__PURE__ */ z({
1198
1198
  onClick: qt(c, ["stop"])
1199
1199
  }, [
1200
1200
  T(d.$slots, "reference")
1201
- ], 544),
1201
+ ], 34),
1202
1202
  (C(), Q(me, {
1203
1203
  to: "body",
1204
1204
  disabled: !n.teleported
@@ -1206,7 +1206,7 @@ const En = /* @__PURE__ */ z({
1206
1206
  Xt(he, { name: "sq-fade" }, {
1207
1207
  default: ft(() => [
1208
1208
  Kt(J("div", {
1209
- class: M(["sq-popover", d.popoverClass]),
1209
+ class: D(["sq-popover", d.popoverClass]),
1210
1210
  ref_key: "popverRef",
1211
1211
  ref: s,
1212
1212
  style: At(H(r)),
@@ -1223,7 +1223,7 @@ const En = /* @__PURE__ */ z({
1223
1223
  ], 8, ["disabled"]))
1224
1224
  ], 64));
1225
1225
  }
1226
- }), $n = /* @__PURE__ */ z({
1226
+ }), $n = /* @__PURE__ */ M({
1227
1227
  __name: "SqProgress",
1228
1228
  props: {
1229
1229
  value: {},
@@ -1245,11 +1245,11 @@ const En = /* @__PURE__ */ z({
1245
1245
  return i;
1246
1246
  });
1247
1247
  return (i, r) => (C(), _("div", {
1248
- class: M(["sq-progress", n.value]),
1248
+ class: D(["sq-progress", n.value]),
1249
1249
  style: At(s.value)
1250
1250
  }, null, 6));
1251
1251
  }
1252
- }), kn = /* @__PURE__ */ z({
1252
+ }), kn = /* @__PURE__ */ M({
1253
1253
  __name: "SqTag",
1254
1254
  props: {
1255
1255
  type: {},
@@ -1263,7 +1263,7 @@ const En = /* @__PURE__ */ z({
1263
1263
  return e.size !== "md" && s.push(`sq-tag--${e.size}`), e.theme !== "materialize" && e.type && s.push(`is-${e.theme}`), e.type && s.push(`is-${e.type}`), e.round && s.push("is-round"), s;
1264
1264
  }), o = w(() => e.size === "lg" ? "md" : "sm");
1265
1265
  return (s, i) => (C(), Q(H(kt), {
1266
- class: M(["sq-tag", n.value]),
1266
+ class: D(["sq-tag", n.value]),
1267
1267
  size: o.value
1268
1268
  }, {
1269
1269
  default: ft(() => [
@@ -1272,7 +1272,7 @@ const En = /* @__PURE__ */ z({
1272
1272
  _: 3
1273
1273
  }, 8, ["class", "size"]));
1274
1274
  }
1275
- }), Bn = /* @__PURE__ */ z({
1275
+ }), Bn = /* @__PURE__ */ M({
1276
1276
  __name: "SqCheckTag",
1277
1277
  props: {
1278
1278
  checked: { type: Boolean, default: !1 },
@@ -1287,7 +1287,7 @@ const En = /* @__PURE__ */ z({
1287
1287
  return o.size !== "md" && r.push(`sq-tag--${o.size}`), o.type && r.push(`is-${o.type}`), o.round && r.push("is-round"), o.checked && r.push("is-checked"), r;
1288
1288
  }), i = w(() => o.size === "lg" ? "md" : "sm");
1289
1289
  return (r, l) => (C(), Q(H(kt), {
1290
- class: M(["sq-check-tag", s.value]),
1290
+ class: D(["sq-check-tag", s.value]),
1291
1291
  size: i.value,
1292
1292
  onClick: l[0] || (l[0] = (a) => n("change", !o.checked))
1293
1293
  }, {
@@ -1297,7 +1297,7 @@ const En = /* @__PURE__ */ z({
1297
1297
  _: 3
1298
1298
  }, 8, ["class", "size"]));
1299
1299
  }
1300
- }), kt = /* @__PURE__ */ z({
1300
+ }), kt = /* @__PURE__ */ M({
1301
1301
  __name: "SqText",
1302
1302
  props: {
1303
1303
  rowNum: { default: 1 },
@@ -1312,7 +1312,7 @@ const En = /* @__PURE__ */ z({
1312
1312
  () => e.ellipsis ? `--row-num: ${e.rowNum}` : ""
1313
1313
  );
1314
1314
  return (s, i) => (C(), _("span", {
1315
- class: M(["sq-text", n.value]),
1315
+ class: D(["sq-text", n.value]),
1316
1316
  style: At(o.value)
1317
1317
  }, [
1318
1318
  T(s.$slots, "default")
@@ -1 +1 @@
1
- (function(k,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(k=typeof globalThis<"u"?globalThis:k||self,i(k.SquirrelCloudUIVue={},k.Vue))})(this,(function(k,i){"use strict";const qt=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},Nt={},Ft={class:"sq-icon is-loading","data-icon":"loading"};function It(t,e){return i.openBlock(),i.createElementBlock("span",Ft,e[0]||(e[0]=[i.createElementVNode("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[i.createElementVNode("circle",{cx:"24",cy:"24",r:"20"})],-1)]))}const Wt=qt(Nt,[["render",It]]),Ht=["disabled"],jt=i.defineComponent({__name:"SqButton",props:{type:{},round:{type:Boolean},text:{type:Boolean},icon:{},loading:{type:Boolean},disabled:{type:Boolean},size:{default:"md"}},setup(t){const e=t,n=i.computed(()=>{const r=[];return e.size!=="md"&&r.push(`sq-button--${e.size}`),e.type&&r.push(`is-${e.type}`),e.round&&r.push("is-round"),e.text&&r.push("is-text"),r}),o=i.computed(()=>e.loading?Wt:e.icon),s=i.computed(()=>e.loading||e.disabled);return(r,l)=>(i.openBlock(),i.createElementBlock("button",{class:i.normalizeClass(["sq-button",n.value]),disabled:s.value},[i.createVNode(i.unref(rt),{size:e.size},{default:i.withCtx(()=>[o.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(o.value),{key:0})):i.createCommentVNode("",!0),i.renderSlot(r.$slots,"default")]),_:3},8,["size"])],10,Ht))}}),Xt={class:"sq-card"},Ut={key:0,class:"sq-card-header"},Yt=["textContent"],Kt={key:1,class:"sq-card-footer"},Gt=i.defineComponent({__name:"SqCard",props:{title:{},decorative:{type:Boolean,default:!1}},setup(t){const e=i.useSlots(),n=t;return(o,s)=>(i.openBlock(),i.createElementBlock("div",Xt,[n.title||i.unref(e).title?(i.openBlock(),i.createElementBlock("div",Ut,[i.createElementVNode("h2",{class:i.normalizeClass({"has-decorative":n.decorative}),textContent:i.toDisplayString(n.title)},null,10,Yt),i.renderSlot(o.$slots,"title")])):i.createCommentVNode("",!0),i.renderSlot(o.$slots,"default"),i.unref(e).footer?(i.openBlock(),i.createElementBlock("div",Kt,[i.renderSlot(o.$slots,"footer")])):i.createCommentVNode("",!0)]))}}),Jt={key:0,class:"sq-input-prefix"},Qt=["disabled","readonly"],Zt={key:1,class:"sq-input-suffix"},te=i.defineComponent({__name:"SqInput",props:i.mergeModels({status:{},round:{type:Boolean},showStatusIcon:{type:Boolean},prefixIcon:{},suffixIcon:{},disabled:{type:Boolean},readonly:{type:Boolean},size:{default:"md"}},{value:{type:String,default:""},valueModifiers:{}}),emits:i.mergeModels(["focus","blur","input","change"],["update:value"]),setup(t,{expose:e,emit:n}){const o=i.useSlots(),s=n,r=t,l=i.useModel(t,"value"),c=i.useTemplateRef("inputRef"),f=i.computed(()=>{const m=[];return r.size!=="md"&&m.push(`sq-input--${r.size}`),r.status&&m.push(`is-${r.status}`),r.round&&m.push("is-round"),r.disabled&&m.push("is-disabled"),m}),a=i.computed(()=>o.prefix||r.prefixIcon),u=i.computed(()=>{const m=r.showStatusIcon&&r.status;return o.suffix||m||r.suffixIcon}),d=i.computed(()=>r.suffixIcon);function h(){var m;(m=c.value)==null||m.focus()}function p(){var m;(m=c.value)==null||m.blur()}return e({focus:h,blur:p}),(m,g)=>(i.openBlock(),i.createElementBlock("section",{class:i.normalizeClass(["sq-input",f.value])},[a.value?(i.openBlock(),i.createElementBlock("span",Jt,[i.renderSlot(m.$slots,"prefix",{},()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.prefixIcon)))])])):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":g[0]||(g[0]=y=>l.value=y),class:"sq-input-inner",disabled:r.disabled,readonly:r.readonly,ref_key:"inputRef",ref:c,onFocus:g[1]||(g[1]=y=>s("focus",y)),onBlur:g[2]||(g[2]=y=>s("blur",y)),onInput:g[3]||(g[3]=y=>s("input",y)),onChange:g[4]||(g[4]=y=>s("change",y))},null,40,Qt),[[i.vModelText,l.value]]),u.value?(i.openBlock(),i.createElementBlock("span",Zt,[i.renderSlot(m.$slots,"suffix",{},()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(d.value)))])])):i.createCommentVNode("",!0)],2))}}),lt=Math.min,I=Math.max,J=Math.round,Q=Math.floor,O=t=>({x:t,y:t}),ee={left:"right",right:"left",bottom:"top",top:"bottom"},ne={start:"end",end:"start"};function ct(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function Z(t){return t.split("-")[1]}function oe(t){return t==="x"?"y":"x"}function yt(t){return t==="y"?"height":"width"}const ie=new Set(["top","bottom"]);function V(t){return ie.has(W(t))?"y":"x"}function wt(t){return oe(V(t))}function se(t,e,n){n===void 0&&(n=!1);const o=Z(t),s=wt(t),r=yt(s);let l=s==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=tt(l)),[l,tt(l)]}function re(t){const e=tt(t);return[at(t),e,at(e)]}function at(t){return t.replace(/start|end/g,e=>ne[e])}const xt=["left","right"],bt=["right","left"],le=["top","bottom"],ce=["bottom","top"];function ae(t,e,n){switch(t){case"top":case"bottom":return n?e?bt:xt:e?xt:bt;case"left":case"right":return e?le:ce;default:return[]}}function fe(t,e,n,o){const s=Z(t);let r=ae(W(t),n==="start",o);return s&&(r=r.map(l=>l+"-"+s),e&&(r=r.concat(r.map(at)))),r}function tt(t){return t.replace(/left|right|bottom|top/g,e=>ee[e])}function ue(t){return{top:0,right:0,bottom:0,left:0,...t}}function de(t){return typeof t!="number"?ue(t):{top:t,right:t,bottom:t,left:t}}function et(t){const{x:e,y:n,width:o,height:s}=t;return{width:o,height:s,top:n,left:e,right:e+o,bottom:n+s,x:e,y:n}}function St(t,e,n){let{reference:o,floating:s}=t;const r=V(e),l=wt(e),c=yt(l),f=W(e),a=r==="y",u=o.x+o.width/2-s.width/2,d=o.y+o.height/2-s.height/2,h=o[c]/2-s[c]/2;let p;switch(f){case"top":p={x:u,y:o.y-s.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-s.width,y:d};break;default:p={x:o.x,y:o.y}}switch(Z(e)){case"start":p[l]-=h*(n&&a?-1:1);break;case"end":p[l]+=h*(n&&a?-1:1);break}return p}const pe=async(t,e,n)=>{const{placement:o="bottom",strategy:s="absolute",middleware:r=[],platform:l}=n,c=r.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(e));let a=await l.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:d}=St(a,o,f),h=o,p={},m=0;for(let g=0;g<c.length;g++){const{name:y,fn:w}=c[g],{x,y:S,data:R,reset:C}=await w({x:u,y:d,initialPlacement:o,placement:h,strategy:s,middlewareData:p,rects:a,platform:l,elements:{reference:t,floating:e}});u=x??u,d=S??d,p={...p,[y]:{...p[y],...R}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(a=C.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:s}):C.rects),{x:u,y:d}=St(a,h,f)),g=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:p}};async function me(t,e){var n;e===void 0&&(e={});const{x:o,y:s,platform:r,rects:l,elements:c,strategy:f}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=ct(e,t),m=de(p),y=c[h?d==="floating"?"reference":"floating":d],w=et(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:f})),x=d==="floating"?{x:o,y:s,width:l.floating.width,height:l.floating.height}:l.reference,S=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),R=await(r.isElement==null?void 0:r.isElement(S))?await(r.getScale==null?void 0:r.getScale(S))||{x:1,y:1}:{x:1,y:1},C=et(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:S,strategy:f}):x);return{top:(w.top-C.top+m.top)/R.y,bottom:(C.bottom-w.bottom+m.bottom)/R.y,left:(w.left-C.left+m.left)/R.x,right:(C.right-w.right+m.right)/R.x}}const he=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:s,middlewareData:r,rects:l,initialPlacement:c,platform:f,elements:a}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=ct(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const w=W(s),x=V(c),S=W(c)===c,R=await(f.isRTL==null?void 0:f.isRTL(a.floating)),C=h||(S||!g?[tt(c)]:re(c)),P=m!=="none";!h&&P&&C.push(...fe(c,g,m,R));const b=[c,...C],v=await me(e,y),q=[];let X=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&q.push(v[w]),d){const N=se(s,l,R);q.push(v[N[0]],v[N[1]])}if(X=[...X,{placement:s,overflows:q}],!q.every(N=>N<=0)){var Dt,Mt;const N=(((Dt=r.flip)==null?void 0:Dt.index)||0)+1,gt=b[N];if(gt&&(!(d==="alignment"?x!==V(gt):!1)||X.every(L=>V(L.placement)===x?L.overflows[0]>0:!0)))return{data:{index:N,overflows:X},reset:{placement:gt}};let G=(Mt=X.filter(F=>F.overflows[0]<=0).sort((F,L)=>F.overflows[1]-L.overflows[1])[0])==null?void 0:Mt.placement;if(!G)switch(p){case"bestFit":{var Pt;const F=(Pt=X.filter(L=>{if(P){const z=V(L.placement);return z===x||z==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(z=>z>0).reduce((z,tn)=>z+tn,0)]).sort((L,z)=>L[1]-z[1])[0])==null?void 0:Pt[0];F&&(G=F);break}case"initialPlacement":G=c;break}if(s!==G)return{reset:{placement:G}}}return{}}}},ge=new Set(["left","top"]);async function ye(t,e){const{placement:n,platform:o,elements:s}=t,r=await(o.isRTL==null?void 0:o.isRTL(s.floating)),l=W(n),c=Z(n),f=V(n)==="y",a=ge.has(l)?-1:1,u=r&&f?-1:1,d=ct(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof m=="number"&&(p=c==="end"?m*-1:m),f?{x:p*u,y:h*a}:{x:h*a,y:p*u}}const we=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:s,y:r,placement:l,middlewareData:c}=e,f=await ye(e,t);return l===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:s+f.x,y:r+f.y,data:{...f,placement:l}}}}};function nt(){return typeof window<"u"}function D(t){return ft(t)?(t.nodeName||"").toLowerCase():"#document"}function B(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function A(t){var e;return(e=(ft(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ft(t){return nt()?t instanceof Node||t instanceof B(t).Node:!1}function E(t){return nt()?t instanceof Element||t instanceof B(t).Element:!1}function _(t){return nt()?t instanceof HTMLElement||t instanceof B(t).HTMLElement:!1}function Ct(t){return!nt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof B(t).ShadowRoot}const xe=new Set(["inline","contents"]);function U(t){const{overflow:e,overflowX:n,overflowY:o,display:s}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!xe.has(s)}const be=new Set(["table","td","th"]);function Se(t){return be.has(D(t))}const Ce=[":popover-open",":modal"];function ot(t){return Ce.some(e=>{try{return t.matches(e)}catch{return!1}})}const Re=["transform","translate","scale","rotate","perspective"],ke=["transform","translate","scale","rotate","perspective","filter"],Be=["paint","layout","strict","content"];function ut(t){const e=dt(),n=E(t)?T(t):t;return Re.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||ke.some(o=>(n.willChange||"").includes(o))||Be.some(o=>(n.contain||"").includes(o))}function ve(t){let e=$(t);for(;_(e)&&!H(e);){if(ut(e))return e;if(ot(e))return null;e=$(e)}return null}function dt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ee=new Set(["html","body","#document"]);function H(t){return Ee.has(D(t))}function T(t){return B(t).getComputedStyle(t)}function it(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function $(t){if(D(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ct(t)&&t.host||A(t);return Ct(e)?e.host:e}function Rt(t){const e=$(t);return H(e)?t.ownerDocument?t.ownerDocument.body:t.body:_(e)&&U(e)?e:Rt(e)}function Y(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=Rt(t),r=s===((o=t.ownerDocument)==null?void 0:o.body),l=B(s);if(r){const c=pt(l);return e.concat(l,l.visualViewport||[],U(s)?s:[],c&&n?Y(c):[])}return e.concat(s,Y(s,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function kt(t){const e=T(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const s=_(t),r=s?t.offsetWidth:n,l=s?t.offsetHeight:o,c=J(n)!==r||J(o)!==l;return c&&(n=r,o=l),{width:n,height:o,$:c}}function mt(t){return E(t)?t:t.contextElement}function j(t){const e=mt(t);if(!_(e))return O(1);const n=e.getBoundingClientRect(),{width:o,height:s,$:r}=kt(e);let l=(r?J(n.width):n.width)/o,c=(r?J(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const Te=O(0);function Bt(t){const e=B(t);return!dt()||!e.visualViewport?Te:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Le(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==B(t)?!1:e}function M(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),r=mt(t);let l=O(1);e&&(o?E(o)&&(l=j(o)):l=j(t));const c=Le(r,n,o)?Bt(r):O(0);let f=(s.left+c.x)/l.x,a=(s.top+c.y)/l.y,u=s.width/l.x,d=s.height/l.y;if(r){const h=B(r),p=o&&E(o)?B(o):o;let m=h,g=pt(m);for(;g&&o&&p!==m;){const y=j(g),w=g.getBoundingClientRect(),x=T(g),S=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,R=w.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;f*=y.x,a*=y.y,u*=y.x,d*=y.y,f+=S,a+=R,m=B(g),g=pt(m)}}return et({width:u,height:d,x:f,y:a})}function st(t,e){const n=it(t).scrollLeft;return e?e.left+n:M(A(t)).left+n}function vt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-st(t,n),s=n.top+e.scrollTop;return{x:o,y:s}}function Oe(t){let{elements:e,rect:n,offsetParent:o,strategy:s}=t;const r=s==="fixed",l=A(o),c=e?ot(e.floating):!1;if(o===l||c&&r)return n;let f={scrollLeft:0,scrollTop:0},a=O(1);const u=O(0),d=_(o);if((d||!d&&!r)&&((D(o)!=="body"||U(l))&&(f=it(o)),_(o))){const p=M(o);a=j(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}const h=l&&!d&&!r?vt(l,f):O(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-f.scrollLeft*a.x+u.x+h.x,y:n.y*a.y-f.scrollTop*a.y+u.y+h.y}}function Ae(t){return Array.from(t.getClientRects())}function _e(t){const e=A(t),n=it(t),o=t.ownerDocument.body,s=I(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=I(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+st(t);const c=-n.scrollTop;return T(o).direction==="rtl"&&(l+=I(e.clientWidth,o.clientWidth)-s),{width:s,height:r,x:l,y:c}}const Et=25;function $e(t,e){const n=B(t),o=A(t),s=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,c=0,f=0;if(s){r=s.width,l=s.height;const u=dt();(!u||u&&e==="fixed")&&(c=s.offsetLeft,f=s.offsetTop)}const a=st(o);if(a<=0){const u=o.ownerDocument,d=u.body,h=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(o.clientWidth-d.clientWidth-p);m<=Et&&(r-=m)}else a<=Et&&(r+=a);return{width:r,height:l,x:c,y:f}}const ze=new Set(["absolute","fixed"]);function Ve(t,e){const n=M(t,!0,e==="fixed"),o=n.top+t.clientTop,s=n.left+t.clientLeft,r=_(t)?j(t):O(1),l=t.clientWidth*r.x,c=t.clientHeight*r.y,f=s*r.x,a=o*r.y;return{width:l,height:c,x:f,y:a}}function Tt(t,e,n){let o;if(e==="viewport")o=$e(t,n);else if(e==="document")o=_e(A(t));else if(E(e))o=Ve(e,n);else{const s=Bt(t);o={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return et(o)}function Lt(t,e){const n=$(t);return n===e||!E(n)||H(n)?!1:T(n).position==="fixed"||Lt(n,e)}function De(t,e){const n=e.get(t);if(n)return n;let o=Y(t,[],!1).filter(c=>E(c)&&D(c)!=="body"),s=null;const r=T(t).position==="fixed";let l=r?$(t):t;for(;E(l)&&!H(l);){const c=T(l),f=ut(l);!f&&c.position==="fixed"&&(s=null),(r?!f&&!s:!f&&c.position==="static"&&!!s&&ze.has(s.position)||U(l)&&!f&&Lt(t,l))?o=o.filter(u=>u!==l):s=c,l=$(l)}return e.set(t,o),o}function Me(t){let{element:e,boundary:n,rootBoundary:o,strategy:s}=t;const l=[...n==="clippingAncestors"?ot(e)?[]:De(e,this._c):[].concat(n),o],c=l[0],f=l.reduce((a,u)=>{const d=Tt(e,u,s);return a.top=I(d.top,a.top),a.right=lt(d.right,a.right),a.bottom=lt(d.bottom,a.bottom),a.left=I(d.left,a.left),a},Tt(e,c,s));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Pe(t){const{width:e,height:n}=kt(t);return{width:e,height:n}}function qe(t,e,n){const o=_(e),s=A(e),r=n==="fixed",l=M(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const f=O(0);function a(){f.x=st(s)}if(o||!o&&!r)if((D(e)!=="body"||U(s))&&(c=it(e)),o){const p=M(e,!0,r,e);f.x=p.x+e.clientLeft,f.y=p.y+e.clientTop}else s&&a();r&&!o&&s&&a();const u=s&&!o&&!r?vt(s,c):O(0),d=l.left+c.scrollLeft-f.x-u.x,h=l.top+c.scrollTop-f.y-u.y;return{x:d,y:h,width:l.width,height:l.height}}function ht(t){return T(t).position==="static"}function Ot(t,e){if(!_(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return A(t)===n&&(n=n.ownerDocument.body),n}function At(t,e){const n=B(t);if(ot(t))return n;if(!_(t)){let s=$(t);for(;s&&!H(s);){if(E(s)&&!ht(s))return s;s=$(s)}return n}let o=Ot(t,e);for(;o&&Se(o)&&ht(o);)o=Ot(o,e);return o&&H(o)&&ht(o)&&!ut(o)?n:o||ve(t)||n}const Ne=async function(t){const e=this.getOffsetParent||At,n=this.getDimensions,o=await n(t.floating);return{reference:qe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Fe(t){return T(t).direction==="rtl"}const Ie={convertOffsetParentRelativeRectToViewportRelativeRect:Oe,getDocumentElement:A,getClippingRect:Me,getOffsetParent:At,getElementRects:Ne,getClientRects:Ae,getDimensions:Pe,getScale:j,isElement:E,isRTL:Fe};function _t(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function We(t,e){let n=null,o;const s=A(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),r();const a=t.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=a;if(c||e(),!h||!p)return;const m=Q(d),g=Q(s.clientWidth-(u+h)),y=Q(s.clientHeight-(d+p)),w=Q(u),S={rootMargin:-m+"px "+-g+"px "+-y+"px "+-w+"px",threshold:I(0,lt(1,f))||1};let R=!0;function C(P){const b=P[0].intersectionRatio;if(b!==f){if(!R)return l();b?l(!1,b):o=setTimeout(()=>{l(!1,1e-7)},1e3)}b===1&&!_t(a,t.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(C,{...S,root:s.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(t)}return l(!0),r}function He(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,a=mt(t),u=s||r?[...a?Y(a):[],...Y(e)]:[];u.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const d=a&&c?We(a,n):null;let h=-1,p=null;l&&(p=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(e)})),n()}),a&&!f&&p.observe(a),p.observe(e));let m,g=f?M(t):null;f&&y();function y(){const w=M(t);g&&!_t(g,w)&&n(),g=w,m=requestAnimationFrame(y)}return n(),()=>{var w;u.forEach(x=>{s&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),d==null||d(),(w=p)==null||w.disconnect(),p=null,f&&cancelAnimationFrame(m)}}const je=we,Xe=he,Ue=(t,e,n)=>{const o=new Map,s={platform:Ie,...n},r={...s.platform,_c:o};return pe(t,e,{...s,platform:r})};function Ye(t){return t!=null&&typeof t=="object"&&"$el"in t}function $t(t){if(Ye(t)){const e=t.$el;return ft(e)&&D(e)==="#comment"?null:e}return t}function K(t){return typeof t=="function"?t():i.unref(t)}function zt(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Vt(t,e){const n=zt(t);return Math.round(e*n)/n}function Ke(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,s=i.computed(()=>{var b;return(b=K(n.open))!=null?b:!0}),r=i.computed(()=>K(n.middleware)),l=i.computed(()=>{var b;return(b=K(n.placement))!=null?b:"bottom"}),c=i.computed(()=>{var b;return(b=K(n.strategy))!=null?b:"absolute"}),f=i.computed(()=>{var b;return(b=K(n.transform))!=null?b:!0}),a=i.computed(()=>$t(t.value)),u=i.computed(()=>$t(e.value)),d=i.ref(0),h=i.ref(0),p=i.ref(c.value),m=i.ref(l.value),g=i.shallowRef({}),y=i.ref(!1),w=i.computed(()=>{const b={position:p.value,left:"0",top:"0"};if(!u.value)return b;const v=Vt(u.value,d.value),q=Vt(u.value,h.value);return f.value?{...b,transform:"translate("+v+"px, "+q+"px)",...zt(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:v+"px",top:q+"px"}});let x;function S(){if(a.value==null||u.value==null)return;const b=s.value;Ue(a.value,u.value,{middleware:r.value,placement:l.value,strategy:c.value}).then(v=>{d.value=v.x,h.value=v.y,p.value=v.strategy,m.value=v.placement,g.value=v.middlewareData,y.value=b!==!1})}function R(){typeof x=="function"&&(x(),x=void 0)}function C(){if(R(),o===void 0){S();return}if(a.value!=null&&u.value!=null){x=o(a.value,u.value,S);return}}function P(){s.value||(y.value=!1)}return i.watch([r,l,c,s],S,{flush:"sync"}),i.watch([a,u],C,{flush:"sync"}),i.watch(s,P,{flush:"sync"}),i.getCurrentScope()&&i.onScopeDispose(R),{x:i.shallowReadonly(d),y:i.shallowReadonly(h),strategy:i.shallowReadonly(p),placement:i.shallowReadonly(m),middlewareData:i.shallowReadonly(g),isPositioned:i.shallowReadonly(y),floatingStyles:w,update:S}}const Ge=i.defineComponent({__name:"SqPopover",props:i.mergeModels({placement:{default:"top"},offset:{default:10},teleported:{type:Boolean},trigger:{default:"hover"},showAfter:{default:0},hideAfter:{default:300},disabled:{type:Boolean},popoverClass:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(t){let e;const n=t,o=i.useTemplateRef("triggerRef"),s=i.useTemplateRef("popverRef"),r=i.useModel(t,"visible"),{floatingStyles:l}=Ke(o,s,{placement:n.placement,whileElementsMounted:He,transform:!1,middleware:[je(n.offset),Xe()]});i.onBeforeUnmount(()=>{h(),document.removeEventListener("click",d)});function c(){n.trigger!=="hover"||n.disabled||(h(),e=setTimeout(()=>{u()},n.showAfter))}function f(){n.trigger==="hover"&&(h(),e=setTimeout(()=>{d()},n.hideAfter))}function a(){n.trigger==="click"&&(r.value?d():n.disabled||u())}function u(){r.value=!0,document.addEventListener("click",d)}function d(){r.value=!1,document.removeEventListener("click",d)}function h(){e&&(clearTimeout(e),e=void 0)}return(p,m)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("span",{class:"sq-popover-trigger",ref_key:"triggerRef",ref:o,onMouseenter:c,onMouseleave:f,onClick:i.withModifiers(a,["stop"])},[i.renderSlot(p.$slots,"reference")],544),(i.openBlock(),i.createBlock(i.Teleport,{to:"body",disabled:!n.teleported},[i.createVNode(i.Transition,{name:"sq-fade"},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{class:i.normalizeClass(["sq-popover",p.popoverClass]),ref_key:"popverRef",ref:s,style:i.normalizeStyle(i.unref(l)),onClick:m[0]||(m[0]=i.withModifiers(()=>{},["stop"]))},[i.renderSlot(p.$slots,"default")],6),[[i.vShow,r.value]])]),_:3})],8,["disabled"]))],64))}}),Je=i.defineComponent({__name:"SqProgress",props:{value:{},min:{default:0},max:{default:100},color:{},type:{default:"primary"}},setup(t){const e=t,n=i.computed(()=>e.color?[]:[`is-${e.type}`]),o=i.computed(()=>{const r=e.max-e.min;return(e.value-e.min)*100/r}),s=i.computed(()=>{const r={};if(r["--progress-value"]=`${o.value}%`,e.color){const c=typeof e.color=="string"?e.color:e.color(o.value);r["--progress-color"]=c}return r});return(r,l)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sq-progress",n.value]),style:i.normalizeStyle(s.value)},null,6))}}),Qe=i.defineComponent({__name:"SqTag",props:{type:{},theme:{default:"materialize"},round:{type:Boolean},size:{default:"md"}},setup(t){const e=t,n=i.computed(()=>{const s=[];return e.size!=="md"&&s.push(`sq-tag--${e.size}`),e.theme!=="materialize"&&e.type&&s.push(`is-${e.theme}`),e.type&&s.push(`is-${e.type}`),e.round&&s.push("is-round"),s}),o=i.computed(()=>e.size==="lg"?"md":"sm");return(s,r)=>(i.openBlock(),i.createBlock(i.unref(rt),{class:i.normalizeClass(["sq-tag",n.value]),size:o.value},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},8,["class","size"]))}}),Ze=i.defineComponent({__name:"SqCheckTag",props:{checked:{type:Boolean,default:!1},type:{default:"primary"},round:{type:Boolean},size:{default:"md"}},emits:["change"],setup(t,{emit:e}){const n=e,o=t,s=i.computed(()=>{const l=[];return o.size!=="md"&&l.push(`sq-tag--${o.size}`),o.type&&l.push(`is-${o.type}`),o.round&&l.push("is-round"),o.checked&&l.push("is-checked"),l}),r=i.computed(()=>o.size==="lg"?"md":"sm");return(l,c)=>(i.openBlock(),i.createBlock(i.unref(rt),{class:i.normalizeClass(["sq-check-tag",s.value]),size:r.value,onClick:c[0]||(c[0]=f=>n("change",!o.checked))},{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},8,["class","size"]))}}),rt=i.defineComponent({__name:"SqText",props:{rowNum:{default:1},ellipsis:{type:Boolean,default:!1},size:{default:"md"}},setup(t){const e=t,n=i.computed(()=>{const s=[];return e.size!=="md"&&s.push(`s-text--${e.size}`),e.ellipsis&&s.push(e.rowNum>1?"multi-line":"single-line"),s}),o=i.computed(()=>e.ellipsis?`--row-num: ${e.rowNum}`:"");return(s,r)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["sq-text",n.value]),style:i.normalizeStyle(o.value)},[i.renderSlot(s.$slots,"default")],6))}});k.SqButton=jt,k.SqCard=Gt,k.SqCheckTag=Ze,k.SqInput=te,k.SqPopover=Ge,k.SqProgress=Je,k.SqTag=Qe,k.SqText=rt,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(k,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(k=typeof globalThis<"u"?globalThis:k||self,i(k.SquirrelCloudUIVue={},k.Vue))})(this,(function(k,i){"use strict";const qt=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},Nt={},Ft={class:"sq-icon is-loading","data-icon":"loading"};function It(t,e){return i.openBlock(),i.createElementBlock("span",Ft,e[0]||(e[0]=[i.createElementVNode("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[i.createElementVNode("circle",{cx:"24",cy:"24",r:"20"})],-1)]))}const Wt=qt(Nt,[["render",It]]),Ht=["disabled"],jt=i.defineComponent({__name:"SqButton",props:{type:{},round:{type:Boolean},text:{type:Boolean},icon:{},loading:{type:Boolean},disabled:{type:Boolean},size:{default:"md"}},setup(t){const e=t,n=i.computed(()=>{const r=[];return e.size!=="md"&&r.push(`sq-button--${e.size}`),e.type&&r.push(`is-${e.type}`),e.round&&r.push("is-round"),e.text&&r.push("is-text"),r}),o=i.computed(()=>e.loading?Wt:e.icon),s=i.computed(()=>e.loading||e.disabled);return(r,l)=>(i.openBlock(),i.createElementBlock("button",{class:i.normalizeClass(["sq-button",n.value]),disabled:s.value},[i.createVNode(i.unref(rt),{size:e.size},{default:i.withCtx(()=>[o.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(o.value),{key:0})):i.createCommentVNode("",!0),i.renderSlot(r.$slots,"default")]),_:3},8,["size"])],10,Ht))}}),Xt={class:"sq-card"},Ut={key:0,class:"sq-card-header"},Yt=["textContent"],Kt={key:1,class:"sq-card-footer"},Gt=i.defineComponent({__name:"SqCard",props:{title:{},decorative:{type:Boolean,default:!1}},setup(t){const e=i.useSlots(),n=t;return(o,s)=>(i.openBlock(),i.createElementBlock("div",Xt,[n.title||i.unref(e).title?(i.openBlock(),i.createElementBlock("div",Ut,[i.createElementVNode("h2",{class:i.normalizeClass({"has-decorative":n.decorative}),textContent:i.toDisplayString(n.title)},null,10,Yt),i.renderSlot(o.$slots,"title")])):i.createCommentVNode("",!0),i.renderSlot(o.$slots,"default"),i.unref(e).footer?(i.openBlock(),i.createElementBlock("div",Kt,[i.renderSlot(o.$slots,"footer")])):i.createCommentVNode("",!0)]))}}),Jt={key:0,class:"sq-input-prefix"},Qt=["disabled","readonly"],Zt={key:1,class:"sq-input-suffix"},te=i.defineComponent({__name:"SqInput",props:i.mergeModels({status:{},round:{type:Boolean},showStatusIcon:{type:Boolean},prefixIcon:{},suffixIcon:{},disabled:{type:Boolean},readonly:{type:Boolean},size:{default:"md"}},{value:{type:String,default:""},valueModifiers:{}}),emits:i.mergeModels(["focus","blur","input","change"],["update:value"]),setup(t,{expose:e,emit:n}){const o=i.useSlots(),s=n,r=t,l=i.useModel(t,"value"),c=i.useTemplateRef("inputRef"),f=i.computed(()=>{const m=[];return r.size!=="md"&&m.push(`sq-input--${r.size}`),r.status&&m.push(`is-${r.status}`),r.round&&m.push("is-round"),r.disabled&&m.push("is-disabled"),m}),a=i.computed(()=>o.prefix||r.prefixIcon),u=i.computed(()=>{const m=r.showStatusIcon&&r.status;return o.suffix||m||r.suffixIcon}),d=i.computed(()=>r.suffixIcon);function h(){var m;(m=c.value)==null||m.focus()}function p(){var m;(m=c.value)==null||m.blur()}return e({focus:h,blur:p}),(m,g)=>(i.openBlock(),i.createElementBlock("section",{class:i.normalizeClass(["sq-input",f.value])},[a.value?(i.openBlock(),i.createElementBlock("span",Jt,[i.renderSlot(m.$slots,"prefix",{},()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.prefixIcon)))])])):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":g[0]||(g[0]=y=>l.value=y),class:"sq-input-inner",disabled:r.disabled,readonly:r.readonly,ref_key:"inputRef",ref:c,onFocus:g[1]||(g[1]=y=>s("focus",y)),onBlur:g[2]||(g[2]=y=>s("blur",y)),onInput:g[3]||(g[3]=y=>s("input",y)),onChange:g[4]||(g[4]=y=>s("change",y))},null,40,Qt),[[i.vModelText,l.value]]),u.value?(i.openBlock(),i.createElementBlock("span",Zt,[i.renderSlot(m.$slots,"suffix",{},()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(d.value)))])])):i.createCommentVNode("",!0)],2))}}),lt=Math.min,I=Math.max,J=Math.round,Q=Math.floor,O=t=>({x:t,y:t}),ee={left:"right",right:"left",bottom:"top",top:"bottom"},ne={start:"end",end:"start"};function ct(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function Z(t){return t.split("-")[1]}function oe(t){return t==="x"?"y":"x"}function yt(t){return t==="y"?"height":"width"}const ie=new Set(["top","bottom"]);function V(t){return ie.has(W(t))?"y":"x"}function wt(t){return oe(V(t))}function se(t,e,n){n===void 0&&(n=!1);const o=Z(t),s=wt(t),r=yt(s);let l=s==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=tt(l)),[l,tt(l)]}function re(t){const e=tt(t);return[at(t),e,at(e)]}function at(t){return t.replace(/start|end/g,e=>ne[e])}const xt=["left","right"],bt=["right","left"],le=["top","bottom"],ce=["bottom","top"];function ae(t,e,n){switch(t){case"top":case"bottom":return n?e?bt:xt:e?xt:bt;case"left":case"right":return e?le:ce;default:return[]}}function fe(t,e,n,o){const s=Z(t);let r=ae(W(t),n==="start",o);return s&&(r=r.map(l=>l+"-"+s),e&&(r=r.concat(r.map(at)))),r}function tt(t){return t.replace(/left|right|bottom|top/g,e=>ee[e])}function ue(t){return{top:0,right:0,bottom:0,left:0,...t}}function de(t){return typeof t!="number"?ue(t):{top:t,right:t,bottom:t,left:t}}function et(t){const{x:e,y:n,width:o,height:s}=t;return{width:o,height:s,top:n,left:e,right:e+o,bottom:n+s,x:e,y:n}}function St(t,e,n){let{reference:o,floating:s}=t;const r=V(e),l=wt(e),c=yt(l),f=W(e),a=r==="y",u=o.x+o.width/2-s.width/2,d=o.y+o.height/2-s.height/2,h=o[c]/2-s[c]/2;let p;switch(f){case"top":p={x:u,y:o.y-s.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-s.width,y:d};break;default:p={x:o.x,y:o.y}}switch(Z(e)){case"start":p[l]-=h*(n&&a?-1:1);break;case"end":p[l]+=h*(n&&a?-1:1);break}return p}const pe=async(t,e,n)=>{const{placement:o="bottom",strategy:s="absolute",middleware:r=[],platform:l}=n,c=r.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(e));let a=await l.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:d}=St(a,o,f),h=o,p={},m=0;for(let g=0;g<c.length;g++){const{name:y,fn:w}=c[g],{x,y:S,data:R,reset:C}=await w({x:u,y:d,initialPlacement:o,placement:h,strategy:s,middlewareData:p,rects:a,platform:l,elements:{reference:t,floating:e}});u=x??u,d=S??d,p={...p,[y]:{...p[y],...R}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(a=C.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:s}):C.rects),{x:u,y:d}=St(a,h,f)),g=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:p}};async function me(t,e){var n;e===void 0&&(e={});const{x:o,y:s,platform:r,rects:l,elements:c,strategy:f}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=ct(e,t),m=de(p),y=c[h?d==="floating"?"reference":"floating":d],w=et(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:f})),x=d==="floating"?{x:o,y:s,width:l.floating.width,height:l.floating.height}:l.reference,S=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),R=await(r.isElement==null?void 0:r.isElement(S))?await(r.getScale==null?void 0:r.getScale(S))||{x:1,y:1}:{x:1,y:1},C=et(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:S,strategy:f}):x);return{top:(w.top-C.top+m.top)/R.y,bottom:(C.bottom-w.bottom+m.bottom)/R.y,left:(w.left-C.left+m.left)/R.x,right:(C.right-w.right+m.right)/R.x}}const he=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:s,middlewareData:r,rects:l,initialPlacement:c,platform:f,elements:a}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=ct(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const w=W(s),x=V(c),S=W(c)===c,R=await(f.isRTL==null?void 0:f.isRTL(a.floating)),C=h||(S||!g?[tt(c)]:re(c)),P=m!=="none";!h&&P&&C.push(...fe(c,g,m,R));const b=[c,...C],v=await me(e,y),q=[];let X=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&q.push(v[w]),d){const N=se(s,l,R);q.push(v[N[0]],v[N[1]])}if(X=[...X,{placement:s,overflows:q}],!q.every(N=>N<=0)){var Dt,Mt;const N=(((Dt=r.flip)==null?void 0:Dt.index)||0)+1,gt=b[N];if(gt&&(!(d==="alignment"?x!==V(gt):!1)||X.every(L=>V(L.placement)===x?L.overflows[0]>0:!0)))return{data:{index:N,overflows:X},reset:{placement:gt}};let G=(Mt=X.filter(F=>F.overflows[0]<=0).sort((F,L)=>F.overflows[1]-L.overflows[1])[0])==null?void 0:Mt.placement;if(!G)switch(p){case"bestFit":{var Pt;const F=(Pt=X.filter(L=>{if(P){const z=V(L.placement);return z===x||z==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(z=>z>0).reduce((z,tn)=>z+tn,0)]).sort((L,z)=>L[1]-z[1])[0])==null?void 0:Pt[0];F&&(G=F);break}case"initialPlacement":G=c;break}if(s!==G)return{reset:{placement:G}}}return{}}}},ge=new Set(["left","top"]);async function ye(t,e){const{placement:n,platform:o,elements:s}=t,r=await(o.isRTL==null?void 0:o.isRTL(s.floating)),l=W(n),c=Z(n),f=V(n)==="y",a=ge.has(l)?-1:1,u=r&&f?-1:1,d=ct(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof m=="number"&&(p=c==="end"?m*-1:m),f?{x:p*u,y:h*a}:{x:h*a,y:p*u}}const we=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:s,y:r,placement:l,middlewareData:c}=e,f=await ye(e,t);return l===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:s+f.x,y:r+f.y,data:{...f,placement:l}}}}};function nt(){return typeof window<"u"}function D(t){return ft(t)?(t.nodeName||"").toLowerCase():"#document"}function B(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function A(t){var e;return(e=(ft(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ft(t){return nt()?t instanceof Node||t instanceof B(t).Node:!1}function E(t){return nt()?t instanceof Element||t instanceof B(t).Element:!1}function _(t){return nt()?t instanceof HTMLElement||t instanceof B(t).HTMLElement:!1}function Ct(t){return!nt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof B(t).ShadowRoot}const xe=new Set(["inline","contents"]);function U(t){const{overflow:e,overflowX:n,overflowY:o,display:s}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!xe.has(s)}const be=new Set(["table","td","th"]);function Se(t){return be.has(D(t))}const Ce=[":popover-open",":modal"];function ot(t){return Ce.some(e=>{try{return t.matches(e)}catch{return!1}})}const Re=["transform","translate","scale","rotate","perspective"],ke=["transform","translate","scale","rotate","perspective","filter"],Be=["paint","layout","strict","content"];function ut(t){const e=dt(),n=E(t)?T(t):t;return Re.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||ke.some(o=>(n.willChange||"").includes(o))||Be.some(o=>(n.contain||"").includes(o))}function ve(t){let e=$(t);for(;_(e)&&!H(e);){if(ut(e))return e;if(ot(e))return null;e=$(e)}return null}function dt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ee=new Set(["html","body","#document"]);function H(t){return Ee.has(D(t))}function T(t){return B(t).getComputedStyle(t)}function it(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function $(t){if(D(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ct(t)&&t.host||A(t);return Ct(e)?e.host:e}function Rt(t){const e=$(t);return H(e)?t.ownerDocument?t.ownerDocument.body:t.body:_(e)&&U(e)?e:Rt(e)}function Y(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=Rt(t),r=s===((o=t.ownerDocument)==null?void 0:o.body),l=B(s);if(r){const c=pt(l);return e.concat(l,l.visualViewport||[],U(s)?s:[],c&&n?Y(c):[])}return e.concat(s,Y(s,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function kt(t){const e=T(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const s=_(t),r=s?t.offsetWidth:n,l=s?t.offsetHeight:o,c=J(n)!==r||J(o)!==l;return c&&(n=r,o=l),{width:n,height:o,$:c}}function mt(t){return E(t)?t:t.contextElement}function j(t){const e=mt(t);if(!_(e))return O(1);const n=e.getBoundingClientRect(),{width:o,height:s,$:r}=kt(e);let l=(r?J(n.width):n.width)/o,c=(r?J(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const Te=O(0);function Bt(t){const e=B(t);return!dt()||!e.visualViewport?Te:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Le(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==B(t)?!1:e}function M(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),r=mt(t);let l=O(1);e&&(o?E(o)&&(l=j(o)):l=j(t));const c=Le(r,n,o)?Bt(r):O(0);let f=(s.left+c.x)/l.x,a=(s.top+c.y)/l.y,u=s.width/l.x,d=s.height/l.y;if(r){const h=B(r),p=o&&E(o)?B(o):o;let m=h,g=pt(m);for(;g&&o&&p!==m;){const y=j(g),w=g.getBoundingClientRect(),x=T(g),S=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,R=w.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;f*=y.x,a*=y.y,u*=y.x,d*=y.y,f+=S,a+=R,m=B(g),g=pt(m)}}return et({width:u,height:d,x:f,y:a})}function st(t,e){const n=it(t).scrollLeft;return e?e.left+n:M(A(t)).left+n}function vt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-st(t,n),s=n.top+e.scrollTop;return{x:o,y:s}}function Oe(t){let{elements:e,rect:n,offsetParent:o,strategy:s}=t;const r=s==="fixed",l=A(o),c=e?ot(e.floating):!1;if(o===l||c&&r)return n;let f={scrollLeft:0,scrollTop:0},a=O(1);const u=O(0),d=_(o);if((d||!d&&!r)&&((D(o)!=="body"||U(l))&&(f=it(o)),_(o))){const p=M(o);a=j(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}const h=l&&!d&&!r?vt(l,f):O(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-f.scrollLeft*a.x+u.x+h.x,y:n.y*a.y-f.scrollTop*a.y+u.y+h.y}}function Ae(t){return Array.from(t.getClientRects())}function _e(t){const e=A(t),n=it(t),o=t.ownerDocument.body,s=I(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=I(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+st(t);const c=-n.scrollTop;return T(o).direction==="rtl"&&(l+=I(e.clientWidth,o.clientWidth)-s),{width:s,height:r,x:l,y:c}}const Et=25;function $e(t,e){const n=B(t),o=A(t),s=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,c=0,f=0;if(s){r=s.width,l=s.height;const u=dt();(!u||u&&e==="fixed")&&(c=s.offsetLeft,f=s.offsetTop)}const a=st(o);if(a<=0){const u=o.ownerDocument,d=u.body,h=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(o.clientWidth-d.clientWidth-p);m<=Et&&(r-=m)}else a<=Et&&(r+=a);return{width:r,height:l,x:c,y:f}}const ze=new Set(["absolute","fixed"]);function Ve(t,e){const n=M(t,!0,e==="fixed"),o=n.top+t.clientTop,s=n.left+t.clientLeft,r=_(t)?j(t):O(1),l=t.clientWidth*r.x,c=t.clientHeight*r.y,f=s*r.x,a=o*r.y;return{width:l,height:c,x:f,y:a}}function Tt(t,e,n){let o;if(e==="viewport")o=$e(t,n);else if(e==="document")o=_e(A(t));else if(E(e))o=Ve(e,n);else{const s=Bt(t);o={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return et(o)}function Lt(t,e){const n=$(t);return n===e||!E(n)||H(n)?!1:T(n).position==="fixed"||Lt(n,e)}function De(t,e){const n=e.get(t);if(n)return n;let o=Y(t,[],!1).filter(c=>E(c)&&D(c)!=="body"),s=null;const r=T(t).position==="fixed";let l=r?$(t):t;for(;E(l)&&!H(l);){const c=T(l),f=ut(l);!f&&c.position==="fixed"&&(s=null),(r?!f&&!s:!f&&c.position==="static"&&!!s&&ze.has(s.position)||U(l)&&!f&&Lt(t,l))?o=o.filter(u=>u!==l):s=c,l=$(l)}return e.set(t,o),o}function Me(t){let{element:e,boundary:n,rootBoundary:o,strategy:s}=t;const l=[...n==="clippingAncestors"?ot(e)?[]:De(e,this._c):[].concat(n),o],c=l[0],f=l.reduce((a,u)=>{const d=Tt(e,u,s);return a.top=I(d.top,a.top),a.right=lt(d.right,a.right),a.bottom=lt(d.bottom,a.bottom),a.left=I(d.left,a.left),a},Tt(e,c,s));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Pe(t){const{width:e,height:n}=kt(t);return{width:e,height:n}}function qe(t,e,n){const o=_(e),s=A(e),r=n==="fixed",l=M(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const f=O(0);function a(){f.x=st(s)}if(o||!o&&!r)if((D(e)!=="body"||U(s))&&(c=it(e)),o){const p=M(e,!0,r,e);f.x=p.x+e.clientLeft,f.y=p.y+e.clientTop}else s&&a();r&&!o&&s&&a();const u=s&&!o&&!r?vt(s,c):O(0),d=l.left+c.scrollLeft-f.x-u.x,h=l.top+c.scrollTop-f.y-u.y;return{x:d,y:h,width:l.width,height:l.height}}function ht(t){return T(t).position==="static"}function Ot(t,e){if(!_(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return A(t)===n&&(n=n.ownerDocument.body),n}function At(t,e){const n=B(t);if(ot(t))return n;if(!_(t)){let s=$(t);for(;s&&!H(s);){if(E(s)&&!ht(s))return s;s=$(s)}return n}let o=Ot(t,e);for(;o&&Se(o)&&ht(o);)o=Ot(o,e);return o&&H(o)&&ht(o)&&!ut(o)?n:o||ve(t)||n}const Ne=async function(t){const e=this.getOffsetParent||At,n=this.getDimensions,o=await n(t.floating);return{reference:qe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Fe(t){return T(t).direction==="rtl"}const Ie={convertOffsetParentRelativeRectToViewportRelativeRect:Oe,getDocumentElement:A,getClippingRect:Me,getOffsetParent:At,getElementRects:Ne,getClientRects:Ae,getDimensions:Pe,getScale:j,isElement:E,isRTL:Fe};function _t(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function We(t,e){let n=null,o;const s=A(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),r();const a=t.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=a;if(c||e(),!h||!p)return;const m=Q(d),g=Q(s.clientWidth-(u+h)),y=Q(s.clientHeight-(d+p)),w=Q(u),S={rootMargin:-m+"px "+-g+"px "+-y+"px "+-w+"px",threshold:I(0,lt(1,f))||1};let R=!0;function C(P){const b=P[0].intersectionRatio;if(b!==f){if(!R)return l();b?l(!1,b):o=setTimeout(()=>{l(!1,1e-7)},1e3)}b===1&&!_t(a,t.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(C,{...S,root:s.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(t)}return l(!0),r}function He(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,a=mt(t),u=s||r?[...a?Y(a):[],...Y(e)]:[];u.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const d=a&&c?We(a,n):null;let h=-1,p=null;l&&(p=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(e)})),n()}),a&&!f&&p.observe(a),p.observe(e));let m,g=f?M(t):null;f&&y();function y(){const w=M(t);g&&!_t(g,w)&&n(),g=w,m=requestAnimationFrame(y)}return n(),()=>{var w;u.forEach(x=>{s&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),d==null||d(),(w=p)==null||w.disconnect(),p=null,f&&cancelAnimationFrame(m)}}const je=we,Xe=he,Ue=(t,e,n)=>{const o=new Map,s={platform:Ie,...n},r={...s.platform,_c:o};return pe(t,e,{...s,platform:r})};function Ye(t){return t!=null&&typeof t=="object"&&"$el"in t}function $t(t){if(Ye(t)){const e=t.$el;return ft(e)&&D(e)==="#comment"?null:e}return t}function K(t){return typeof t=="function"?t():i.unref(t)}function zt(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Vt(t,e){const n=zt(t);return Math.round(e*n)/n}function Ke(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,s=i.computed(()=>{var b;return(b=K(n.open))!=null?b:!0}),r=i.computed(()=>K(n.middleware)),l=i.computed(()=>{var b;return(b=K(n.placement))!=null?b:"bottom"}),c=i.computed(()=>{var b;return(b=K(n.strategy))!=null?b:"absolute"}),f=i.computed(()=>{var b;return(b=K(n.transform))!=null?b:!0}),a=i.computed(()=>$t(t.value)),u=i.computed(()=>$t(e.value)),d=i.ref(0),h=i.ref(0),p=i.ref(c.value),m=i.ref(l.value),g=i.shallowRef({}),y=i.ref(!1),w=i.computed(()=>{const b={position:p.value,left:"0",top:"0"};if(!u.value)return b;const v=Vt(u.value,d.value),q=Vt(u.value,h.value);return f.value?{...b,transform:"translate("+v+"px, "+q+"px)",...zt(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:v+"px",top:q+"px"}});let x;function S(){if(a.value==null||u.value==null)return;const b=s.value;Ue(a.value,u.value,{middleware:r.value,placement:l.value,strategy:c.value}).then(v=>{d.value=v.x,h.value=v.y,p.value=v.strategy,m.value=v.placement,g.value=v.middlewareData,y.value=b!==!1})}function R(){typeof x=="function"&&(x(),x=void 0)}function C(){if(R(),o===void 0){S();return}if(a.value!=null&&u.value!=null){x=o(a.value,u.value,S);return}}function P(){s.value||(y.value=!1)}return i.watch([r,l,c,s],S,{flush:"sync"}),i.watch([a,u],C,{flush:"sync"}),i.watch(s,P,{flush:"sync"}),i.getCurrentScope()&&i.onScopeDispose(R),{x:i.shallowReadonly(d),y:i.shallowReadonly(h),strategy:i.shallowReadonly(p),placement:i.shallowReadonly(m),middlewareData:i.shallowReadonly(g),isPositioned:i.shallowReadonly(y),floatingStyles:w,update:S}}const Ge=i.defineComponent({__name:"SqPopover",props:i.mergeModels({placement:{default:"top"},offset:{default:10},teleported:{type:Boolean,default:!0},trigger:{default:"hover"},showAfter:{default:0},hideAfter:{default:300},disabled:{type:Boolean},popoverClass:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(t){let e;const n=t,o=i.useTemplateRef("triggerRef"),s=i.useTemplateRef("popverRef"),r=i.useModel(t,"visible"),{floatingStyles:l}=Ke(o,s,{placement:n.placement,whileElementsMounted:He,transform:!1,middleware:[je(n.offset),Xe()]});i.onBeforeUnmount(()=>{h(),document.removeEventListener("click",d)});function c(){n.trigger!=="hover"||n.disabled||(h(),e=setTimeout(()=>{u()},n.showAfter))}function f(){n.trigger==="hover"&&(h(),e=setTimeout(()=>{d()},n.hideAfter))}function a(){n.trigger==="click"&&(r.value?d():n.disabled||u())}function u(){r.value=!0,document.addEventListener("click",d)}function d(){r.value=!1,document.removeEventListener("click",d)}function h(){e&&(clearTimeout(e),e=void 0)}return(p,m)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("span",{class:i.normalizeClass(["sq-popover-trigger",p.$attrs.class]),ref_key:"triggerRef",ref:o,onMouseenter:c,onMouseleave:f,onClick:i.withModifiers(a,["stop"])},[i.renderSlot(p.$slots,"reference")],34),(i.openBlock(),i.createBlock(i.Teleport,{to:"body",disabled:!n.teleported},[i.createVNode(i.Transition,{name:"sq-fade"},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{class:i.normalizeClass(["sq-popover",p.popoverClass]),ref_key:"popverRef",ref:s,style:i.normalizeStyle(i.unref(l)),onClick:m[0]||(m[0]=i.withModifiers(()=>{},["stop"]))},[i.renderSlot(p.$slots,"default")],6),[[i.vShow,r.value]])]),_:3})],8,["disabled"]))],64))}}),Je=i.defineComponent({__name:"SqProgress",props:{value:{},min:{default:0},max:{default:100},color:{},type:{default:"primary"}},setup(t){const e=t,n=i.computed(()=>e.color?[]:[`is-${e.type}`]),o=i.computed(()=>{const r=e.max-e.min;return(e.value-e.min)*100/r}),s=i.computed(()=>{const r={};if(r["--progress-value"]=`${o.value}%`,e.color){const c=typeof e.color=="string"?e.color:e.color(o.value);r["--progress-color"]=c}return r});return(r,l)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sq-progress",n.value]),style:i.normalizeStyle(s.value)},null,6))}}),Qe=i.defineComponent({__name:"SqTag",props:{type:{},theme:{default:"materialize"},round:{type:Boolean},size:{default:"md"}},setup(t){const e=t,n=i.computed(()=>{const s=[];return e.size!=="md"&&s.push(`sq-tag--${e.size}`),e.theme!=="materialize"&&e.type&&s.push(`is-${e.theme}`),e.type&&s.push(`is-${e.type}`),e.round&&s.push("is-round"),s}),o=i.computed(()=>e.size==="lg"?"md":"sm");return(s,r)=>(i.openBlock(),i.createBlock(i.unref(rt),{class:i.normalizeClass(["sq-tag",n.value]),size:o.value},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},8,["class","size"]))}}),Ze=i.defineComponent({__name:"SqCheckTag",props:{checked:{type:Boolean,default:!1},type:{default:"primary"},round:{type:Boolean},size:{default:"md"}},emits:["change"],setup(t,{emit:e}){const n=e,o=t,s=i.computed(()=>{const l=[];return o.size!=="md"&&l.push(`sq-tag--${o.size}`),o.type&&l.push(`is-${o.type}`),o.round&&l.push("is-round"),o.checked&&l.push("is-checked"),l}),r=i.computed(()=>o.size==="lg"?"md":"sm");return(l,c)=>(i.openBlock(),i.createBlock(i.unref(rt),{class:i.normalizeClass(["sq-check-tag",s.value]),size:r.value,onClick:c[0]||(c[0]=f=>n("change",!o.checked))},{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},8,["class","size"]))}}),rt=i.defineComponent({__name:"SqText",props:{rowNum:{default:1},ellipsis:{type:Boolean,default:!1},size:{default:"md"}},setup(t){const e=t,n=i.computed(()=>{const s=[];return e.size!=="md"&&s.push(`s-text--${e.size}`),e.ellipsis&&s.push(e.rowNum>1?"multi-line":"single-line"),s}),o=i.computed(()=>e.ellipsis?`--row-num: ${e.rowNum}`:"");return(s,r)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["sq-text",n.value]),style:i.normalizeStyle(o.value)},[i.renderSlot(s.$slots,"default")],6))}});k.SqButton=jt,k.SqCard=Gt,k.SqCheckTag=Ze,k.SqInput=te,k.SqPopover=Ge,k.SqProgress=Je,k.SqTag=Qe,k.SqText=rt,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@squirrel-cloud/ui-vue",
3
3
  "description": "松鼠的坚果屋前端VUE框架",
4
4
  "license": "GPL-3.0",
5
- "version": "0.2.2",
5
+ "version": "0.2.3",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "files": [