sm-click-library-ui 0.0.18 → 0.0.20

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.
@@ -1,109 +1,114 @@
1
- import { getCurrentScope as P, onScopeDispose as V, unref as j, watch as I, ref as S, computed as b, openBlock as v, createElementBlock as g, createElementVNode as f, toDisplayString as x, normalizeClass as C, renderSlot as L, createCommentVNode as _ } from "vue";
2
- function F(t) {
3
- return P() ? (V(t), !0) : !1;
1
+ import { getCurrentScope as V, onScopeDispose as j, unref as L, watch as F, ref as S, computed as b, openBlock as v, createElementBlock as g, createElementVNode as f, toDisplayString as A, normalizeClass as C, renderSlot as W, createCommentVNode as w, pushScopeId as B, popScopeId as H } from "vue";
2
+ function M(e) {
3
+ return V() ? (j(e), !0) : !1;
4
4
  }
5
- function E(t) {
6
- return typeof t == "function" ? t() : j(t);
5
+ function O(e) {
6
+ return typeof e == "function" ? e() : L(e);
7
7
  }
8
- const O = typeof window < "u" && typeof document < "u";
8
+ const I = typeof window < "u" && typeof document < "u";
9
9
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
10
- const W = Object.prototype.toString, B = (t) => W.call(t) === "[object Object]", y = () => {
11
- }, H = /* @__PURE__ */ M();
12
- function M() {
13
- var t, i;
14
- return O && ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((i = window == null ? void 0 : window.navigator) == null ? void 0 : i.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
10
+ const D = Object.prototype.toString, N = (e) => D.call(e) === "[object Object]", y = () => {
11
+ }, T = /* @__PURE__ */ G();
12
+ function G() {
13
+ var e, l;
14
+ return I && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((l = window == null ? void 0 : window.navigator) == null ? void 0 : l.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
15
15
  }
16
- function w(t) {
17
- var i;
18
- const s = E(t);
19
- return (i = s == null ? void 0 : s.$el) != null ? i : s;
16
+ function _(e) {
17
+ var l;
18
+ const s = O(e);
19
+ return (l = s == null ? void 0 : s.$el) != null ? l : s;
20
20
  }
21
- const z = O ? window : void 0;
22
- function k(...t) {
23
- let i, s, n, r;
24
- if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([s, n, r] = t, i = z) : [i, s, n, r] = t, !i)
21
+ const z = I ? window : void 0;
22
+ function k(...e) {
23
+ let l, s, n, r;
24
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([s, n, r] = e, l = z) : [l, s, n, r] = e, !l)
25
25
  return y;
26
26
  Array.isArray(s) || (s = [s]), Array.isArray(n) || (n = [n]);
27
27
  const a = [], p = () => {
28
28
  a.forEach((c) => c()), a.length = 0;
29
- }, d = (c, u, o, e) => (c.addEventListener(u, o, e), () => c.removeEventListener(u, o, e)), m = I(
30
- () => [w(i), E(r)],
29
+ }, d = (c, u, o, t) => (c.addEventListener(u, o, t), () => c.removeEventListener(u, o, t)), m = F(
30
+ () => [_(l), O(r)],
31
31
  ([c, u]) => {
32
32
  if (p(), !c)
33
33
  return;
34
- const o = B(u) ? { ...u } : u;
34
+ const o = N(u) ? { ...u } : u;
35
35
  a.push(
36
- ...s.flatMap((e) => n.map((l) => d(c, e, l, o)))
36
+ ...s.flatMap((t) => n.map((i) => d(c, t, i, o)))
37
37
  );
38
38
  },
39
39
  { immediate: !0, flush: "post" }
40
40
  ), h = () => {
41
41
  m(), p();
42
42
  };
43
- return F(h), h;
43
+ return M(h), h;
44
44
  }
45
- let A = !1;
46
- function D(t, i, s = {}) {
45
+ let E = !1;
46
+ function $(e, l, s = {}) {
47
47
  const { window: n = z, ignore: r = [], capture: a = !0, detectIframe: p = !1 } = s;
48
48
  if (!n)
49
49
  return y;
50
- H && !A && (A = !0, Array.from(n.document.body.children).forEach((o) => o.addEventListener("click", y)), n.document.documentElement.addEventListener("click", y));
50
+ T && !E && (E = !0, Array.from(n.document.body.children).forEach((o) => o.addEventListener("click", y)), n.document.documentElement.addEventListener("click", y));
51
51
  let d = !0;
52
- const m = (o) => r.some((e) => {
53
- if (typeof e == "string")
54
- return Array.from(n.document.querySelectorAll(e)).some((l) => l === o.target || o.composedPath().includes(l));
52
+ const m = (o) => r.some((t) => {
53
+ if (typeof t == "string")
54
+ return Array.from(n.document.querySelectorAll(t)).some((i) => i === o.target || o.composedPath().includes(i));
55
55
  {
56
- const l = w(e);
57
- return l && (o.target === l || o.composedPath().includes(l));
56
+ const i = _(t);
57
+ return i && (o.target === i || o.composedPath().includes(i));
58
58
  }
59
59
  }), c = [
60
60
  k(n, "click", (o) => {
61
- const e = w(t);
62
- if (!(!e || e === o.target || o.composedPath().includes(e))) {
61
+ const t = _(e);
62
+ if (!(!t || t === o.target || o.composedPath().includes(t))) {
63
63
  if (o.detail === 0 && (d = !m(o)), !d) {
64
64
  d = !0;
65
65
  return;
66
66
  }
67
- i(o);
67
+ l(o);
68
68
  }
69
69
  }, { passive: !0, capture: a }),
70
70
  k(n, "pointerdown", (o) => {
71
- const e = w(t);
72
- d = !m(o) && !!(e && !o.composedPath().includes(e));
71
+ const t = _(e);
72
+ d = !m(o) && !!(t && !o.composedPath().includes(t));
73
73
  }, { passive: !0 }),
74
74
  p && k(n, "blur", (o) => {
75
75
  setTimeout(() => {
76
- var e;
77
- const l = w(t);
78
- ((e = n.document.activeElement) == null ? void 0 : e.tagName) === "IFRAME" && !(l != null && l.contains(n.document.activeElement)) && i(o);
76
+ var t;
77
+ const i = _(e);
78
+ ((t = n.document.activeElement) == null ? void 0 : t.tagName) === "IFRAME" && !(i != null && i.contains(n.document.activeElement)) && l(o);
79
79
  }, 0);
80
80
  })
81
81
  ].filter(Boolean);
82
82
  return () => c.forEach((o) => o());
83
83
  }
84
- const N = {
84
+ const q = (e, l) => {
85
+ const s = e.__vccOpts || e;
86
+ for (const [n, r] of l)
87
+ s[n] = r;
88
+ return s;
89
+ }, x = (e) => (B("data-v-a8f8c201"), e = e(), H(), e), R = {
85
90
  key: 0,
86
91
  class: "line-clamp-2 uppercase text-xs truncate text-white"
87
- }, T = {
92
+ }, Z = {
88
93
  key: 1,
89
94
  class: "line-clamp-2 uppercase text-xs truncate text-white"
90
- }, G = /* @__PURE__ */ f("path", {
95
+ }, J = /* @__PURE__ */ x(() => /* @__PURE__ */ f("path", {
91
96
  "fill-rule": "evenodd",
92
97
  d: "M18.4 10.3A2 2 0 0 0 17 7H7a2 2 0 0 0-1.5 3.3l4.9 5.9a2 2 0 0 0 3 0l5-6Z",
93
98
  "clip-rule": "evenodd"
94
- }, null, -1), $ = [
95
- G
96
- ], q = {
99
+ }, null, -1)), K = [
100
+ J
101
+ ], Q = {
97
102
  key: 0,
98
103
  class: "select_widget_lib"
99
- }, R = { key: 0 }, Z = {
104
+ }, U = { key: 0 }, X = {
100
105
  key: 1,
101
106
  class: "space-y-2"
102
- }, J = /* @__PURE__ */ f("p", { class: "line-clamp-2 uppercase text-xs truncate" }, "Vertical", -1), K = [
103
- J
104
- ], Q = /* @__PURE__ */ f("p", { class: "line-clamp-2 uppercase text-xs truncate" }, "Horizontal", -1), U = [
105
- Q
106
- ], X = {
107
+ }, Y = /* @__PURE__ */ x(() => /* @__PURE__ */ f("p", { class: "line-clamp-2 uppercase text-xs truncate" }, "Vertical", -1)), ee = [
108
+ Y
109
+ ], te = /* @__PURE__ */ x(() => /* @__PURE__ */ f("p", { class: "line-clamp-2 uppercase text-xs truncate" }, "Horizontal", -1)), oe = [
110
+ te
111
+ ], ne = {
107
112
  __name: "primary_select",
108
113
  props: {
109
114
  titleFreeSlot: {
@@ -119,19 +124,19 @@ const N = {
119
124
  }
120
125
  },
121
126
  emits: ["closeSelect"],
122
- setup(t, { emit: i }) {
123
- const s = t, n = i, r = S(!1), a = S("Horizontal"), p = S(null), d = b(() => s.selectConfig.length > 0), m = b(
124
- () => s.selectConfig.some((e) => e.chartsConfig)
127
+ setup(e, { emit: l }) {
128
+ const s = e, n = l, r = S(!1), a = S("Horizontal"), p = S(null), d = b(() => s.selectConfig.length > 0), m = b(
129
+ () => s.selectConfig.some((t) => t.chartsConfig)
125
130
  ), h = b(
126
- () => s.selectConfig.some((e) => e.freeSlot)
131
+ () => s.selectConfig.some((t) => t.freeSlot)
127
132
  ), c = () => {
128
133
  r.value = !r.value;
129
- }, u = (e) => {
130
- r.value = !1, a.value = e === "horizontal" ? "Vertical" : "Horizontal", n("closeSelect", e);
134
+ }, u = (t) => {
135
+ r.value = !1, a.value = t === "horizontal" ? "Vertical" : "Horizontal", n("closeSelect", t);
131
136
  };
132
- return D(p, () => {
137
+ return $(p, () => {
133
138
  r.value && (r.value = !1);
134
- }), (e, l) => d.value ? (v(), g("div", {
139
+ }), (t, i) => d.value ? (v(), g("div", {
135
140
  key: 0,
136
141
  ref_key: "target",
137
142
  ref: p,
@@ -139,10 +144,10 @@ const N = {
139
144
  }, [
140
145
  f("button", {
141
146
  onClick: c,
142
- class: "bg-base-200 z-10 truncate flex items-center justify-between gap-6 p-2 rounded-md lg:mt-0 w-full shadow-md shadow-base-300"
147
+ class: "bg-base-100 z-10 truncate flex items-center justify-between gap-6 p-2 rounded-md lg:mt-0 w-full shadow-md shadow-base-300"
143
148
  }, [
144
149
  f("div", null, [
145
- m.value ? (v(), g("p", N, x(a.value), 1)) : (v(), g("p", T, x(t.titleFreeSlot), 1))
150
+ m.value ? (v(), g("p", R, A(a.value), 1)) : (v(), g("p", Z, A(e.titleFreeSlot), 1))
146
151
  ]),
147
152
  f("div", null, [
148
153
  (v(), g("svg", {
@@ -150,32 +155,34 @@ const N = {
150
155
  xmlns: "http://www.w3.org/2000/svg",
151
156
  fill: "currentColor",
152
157
  viewBox: "0 0 24 24"
153
- }, $, 2))
158
+ }, K, 2))
154
159
  ])
155
160
  ]),
156
- r.value ? (v(), g("section", q, [
157
- h.value ? (v(), g("div", R, [
158
- L(e.$slots, "free-slot")
159
- ])) : _("", !0),
160
- m.value ? (v(), g("div", Z, [
161
+ r.value ? (v(), g("section", Q, [
162
+ h.value ? (v(), g("div", U, [
163
+ W(t.$slots, "free-slot", {}, void 0, !0)
164
+ ])) : w("", !0),
165
+ m.value ? (v(), g("div", X, [
161
166
  f("button", {
162
167
  class: C([a.value === "Vertical" ? "bg-green-500" : "", "btn_select_widget_lib"]),
163
- onClick: l[0] || (l[0] = () => u("horizontal"))
164
- }, K, 2),
168
+ onClick: i[0] || (i[0] = () => u("horizontal"))
169
+ }, ee, 2),
165
170
  f("button", {
166
171
  class: C([a.value !== "Vertical" ? "bg-green-500" : "", "btn_select_widget_lib"]),
167
- onClick: l[1] || (l[1] = () => u("vertical"))
168
- }, U, 2)
169
- ])) : _("", !0)
170
- ])) : _("", !0)
171
- ], 512)) : _("", !0);
172
+ onClick: i[1] || (i[1] = () => u("vertical"))
173
+ }, oe, 2)
174
+ ])) : w("", !0)
175
+ ])) : w("", !0)
176
+ ], 512)) : w("", !0);
172
177
  }
173
- };
174
- function Y(t) {
175
- t.component("primarySelect", X);
178
+ }, P = /* @__PURE__ */ q(ne, [["__scopeId", "data-v-a8f8c201"]]);
179
+ function se(e) {
180
+ e.component("primarySelect", P);
176
181
  }
177
- const te = { install: Y };
182
+ const ie = {
183
+ install: se,
184
+ primarySelect: P
185
+ };
178
186
  export {
179
- te as default,
180
- X as primarySelect
187
+ ie as default
181
188
  };
@@ -1 +1 @@
1
- (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f["sm-click-library-ui"]={},f.Vue))})(this,function(f,e){"use strict";function V(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function k(o){return typeof o=="function"?o():e.unref(o)}const S=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const x=Object.prototype.toString,B=o=>x.call(o)==="[object Object]",w=()=>{},A=N();function N(){var o,r;return S&&((o=window==null?void 0:window.navigator)==null?void 0:o.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((r=window==null?void 0:window.navigator)==null?void 0:r.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function g(o){var r;const s=k(o);return(r=s==null?void 0:s.$el)!=null?r:s}const b=S?window:void 0;function y(...o){let r,s,l,c;if(typeof o[0]=="string"||Array.isArray(o[0])?([s,l,c]=o,r=b):[r,s,l,c]=o,!r)return w;Array.isArray(s)||(s=[s]),Array.isArray(l)||(l=[l]);const d=[],m=()=>{d.forEach(a=>a()),d.length=0},p=(a,u,n,t)=>(a.addEventListener(u,n,t),()=>a.removeEventListener(u,n,t)),h=e.watch(()=>[g(r),k(c)],([a,u])=>{if(m(),!a)return;const n=B(u)?{...u}:u;d.push(...s.flatMap(t=>l.map(i=>p(a,t,i,n))))},{immediate:!0,flush:"post"}),_=()=>{h(),m()};return V(_),_}let E=!1;function O(o,r,s={}){const{window:l=b,ignore:c=[],capture:d=!0,detectIframe:m=!1}=s;if(!l)return w;A&&!E&&(E=!0,Array.from(l.document.body.children).forEach(n=>n.addEventListener("click",w)),l.document.documentElement.addEventListener("click",w));let p=!0;const h=n=>c.some(t=>{if(typeof t=="string")return Array.from(l.document.querySelectorAll(t)).some(i=>i===n.target||n.composedPath().includes(i));{const i=g(t);return i&&(n.target===i||n.composedPath().includes(i))}}),a=[y(l,"click",n=>{const t=g(o);if(!(!t||t===n.target||n.composedPath().includes(t))){if(n.detail===0&&(p=!h(n)),!p){p=!0;return}r(n)}},{passive:!0,capture:d}),y(l,"pointerdown",n=>{const t=g(o);p=!h(n)&&!!(t&&!n.composedPath().includes(t))},{passive:!0}),m&&y(l,"blur",n=>{setTimeout(()=>{var t;const i=g(o);((t=l.document.activeElement)==null?void 0:t.tagName)==="IFRAME"&&!(i!=null&&i.contains(l.document.activeElement))&&r(n)},0)})].filter(Boolean);return()=>a.forEach(n=>n())}const v={key:0,class:"line-clamp-2 uppercase text-xs truncate text-white"},z={key:1,class:"line-clamp-2 uppercase text-xs truncate text-white"},j=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M18.4 10.3A2 2 0 0 0 17 7H7a2 2 0 0 0-1.5 3.3l4.9 5.9a2 2 0 0 0 3 0l5-6Z","clip-rule":"evenodd"},null,-1)],P={key:0,class:"select_widget_lib"},I={key:0},L={key:1,class:"space-y-2"},M=[e.createElementVNode("p",{class:"line-clamp-2 uppercase text-xs truncate"},"Vertical",-1)],T=[e.createElementVNode("p",{class:"line-clamp-2 uppercase text-xs truncate"},"Horizontal",-1)],C={__name:"primary_select",props:{titleFreeSlot:{type:String,default:"Free Slot"},selectConfig:{type:Object,default:()=>({chartsConfig:!1,freeSlot:!1})}},emits:["closeSelect"],setup(o,{emit:r}){const s=o,l=r,c=e.ref(!1),d=e.ref("Horizontal"),m=e.ref(null),p=e.computed(()=>s.selectConfig.length>0),h=e.computed(()=>s.selectConfig.some(t=>t.chartsConfig)),_=e.computed(()=>s.selectConfig.some(t=>t.freeSlot)),a=()=>{c.value=!c.value},u=t=>{c.value=!1,d.value=t==="horizontal"?"Vertical":"Horizontal",l("closeSelect",t)};return O(m,()=>{c.value&&(c.value=!1)}),(t,i)=>p.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"target",ref:m,class:"relative w-full"},[e.createElementVNode("button",{onClick:a,class:"bg-base-200 z-10 truncate flex items-center justify-between gap-6 p-2 rounded-md lg:mt-0 w-full shadow-md shadow-base-300"},[e.createElementVNode("div",null,[h.value?(e.openBlock(),e.createElementBlock("p",v,e.toDisplayString(d.value),1)):(e.openBlock(),e.createElementBlock("p",z,e.toDisplayString(o.titleFreeSlot),1))]),e.createElementVNode("div",null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass([c.value?"rotate-180 transition-transform ease-in-out":"","w-3 h-3 text-white"]),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},j,2))])]),c.value?(e.openBlock(),e.createElementBlock("section",P,[_.value?(e.openBlock(),e.createElementBlock("div",I,[e.renderSlot(t.$slots,"free-slot")])):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("button",{class:e.normalizeClass([d.value==="Vertical"?"bg-green-500":"","btn_select_widget_lib"]),onClick:i[0]||(i[0]=()=>u("horizontal"))},M,2),e.createElementVNode("button",{class:e.normalizeClass([d.value!=="Vertical"?"bg-green-500":"","btn_select_widget_lib"]),onClick:i[1]||(i[1]=()=>u("vertical"))},T,2)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0)}};function F(o){o.component("primarySelect",C)}const W={install:F};f.default=W,f.primarySelect=C,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(e,h){typeof exports=="object"&&typeof module<"u"?module.exports=h(require("vue")):typeof define=="function"&&define.amd?define(["vue"],h):(e=typeof globalThis<"u"?globalThis:e||self,e["sm-click-library-ui"]=h(e.Vue))})(this,function(e){"use strict";function h(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function S(t){return typeof t=="function"?t():e.unref(t)}const E=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const V=Object.prototype.toString,B=t=>V.call(t)==="[object Object]",w=()=>{},A=N();function N(){var t,c;return E&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((c=window==null?void 0:window.navigator)==null?void 0:c.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function _(t){var c;const s=S(t);return(c=s==null?void 0:s.$el)!=null?c:s}const b=E?window:void 0;function y(...t){let c,s,l,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([s,l,i]=t,c=b):[c,s,l,i]=t,!c)return w;Array.isArray(s)||(s=[s]),Array.isArray(l)||(l=[l]);const d=[],p=()=>{d.forEach(a=>a()),d.length=0},f=(a,u,n,o)=>(a.addEventListener(u,n,o),()=>a.removeEventListener(u,n,o)),m=e.watch(()=>[_(c),S(i)],([a,u])=>{if(p(),!a)return;const n=B(u)?{...u}:u;d.push(...s.flatMap(o=>l.map(r=>f(a,o,r,n))))},{immediate:!0,flush:"post"}),g=()=>{m(),p()};return h(g),g}let C=!1;function O(t,c,s={}){const{window:l=b,ignore:i=[],capture:d=!0,detectIframe:p=!1}=s;if(!l)return w;A&&!C&&(C=!0,Array.from(l.document.body.children).forEach(n=>n.addEventListener("click",w)),l.document.documentElement.addEventListener("click",w));let f=!0;const m=n=>i.some(o=>{if(typeof o=="string")return Array.from(l.document.querySelectorAll(o)).some(r=>r===n.target||n.composedPath().includes(r));{const r=_(o);return r&&(n.target===r||n.composedPath().includes(r))}}),a=[y(l,"click",n=>{const o=_(t);if(!(!o||o===n.target||n.composedPath().includes(o))){if(n.detail===0&&(f=!m(n)),!f){f=!0;return}c(n)}},{passive:!0,capture:d}),y(l,"pointerdown",n=>{const o=_(t);f=!m(n)&&!!(o&&!n.composedPath().includes(o))},{passive:!0}),p&&y(l,"blur",n=>{setTimeout(()=>{var o;const r=_(t);((o=l.document.activeElement)==null?void 0:o.tagName)==="IFRAME"&&!(r!=null&&r.contains(l.document.activeElement))&&c(n)},0)})].filter(Boolean);return()=>a.forEach(n=>n())}const v=(t,c)=>{const s=t.__vccOpts||t;for(const[l,i]of c)s[l]=i;return s},k=t=>(e.pushScopeId("data-v-a8f8c201"),t=t(),e.popScopeId(),t),I={key:0,class:"line-clamp-2 uppercase text-xs truncate text-white"},z={key:1,class:"line-clamp-2 uppercase text-xs truncate text-white"},j=[k(()=>e.createElementVNode("path",{"fill-rule":"evenodd",d:"M18.4 10.3A2 2 0 0 0 17 7H7a2 2 0 0 0-1.5 3.3l4.9 5.9a2 2 0 0 0 3 0l5-6Z","clip-rule":"evenodd"},null,-1))],P={key:0,class:"select_widget_lib"},L={key:0},F={key:1,class:"space-y-2"},T=[k(()=>e.createElementVNode("p",{class:"line-clamp-2 uppercase text-xs truncate"},"Vertical",-1))],W=[k(()=>e.createElementVNode("p",{class:"line-clamp-2 uppercase text-xs truncate"},"Horizontal",-1))],x=v({__name:"primary_select",props:{titleFreeSlot:{type:String,default:"Free Slot"},selectConfig:{type:Object,default:()=>({chartsConfig:!1,freeSlot:!1})}},emits:["closeSelect"],setup(t,{emit:c}){const s=t,l=c,i=e.ref(!1),d=e.ref("Horizontal"),p=e.ref(null),f=e.computed(()=>s.selectConfig.length>0),m=e.computed(()=>s.selectConfig.some(o=>o.chartsConfig)),g=e.computed(()=>s.selectConfig.some(o=>o.freeSlot)),a=()=>{i.value=!i.value},u=o=>{i.value=!1,d.value=o==="horizontal"?"Vertical":"Horizontal",l("closeSelect",o)};return O(p,()=>{i.value&&(i.value=!1)}),(o,r)=>f.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"target",ref:p,class:"relative w-full"},[e.createElementVNode("button",{onClick:a,class:"bg-base-100 z-10 truncate flex items-center justify-between gap-6 p-2 rounded-md lg:mt-0 w-full shadow-md shadow-base-300"},[e.createElementVNode("div",null,[m.value?(e.openBlock(),e.createElementBlock("p",I,e.toDisplayString(d.value),1)):(e.openBlock(),e.createElementBlock("p",z,e.toDisplayString(t.titleFreeSlot),1))]),e.createElementVNode("div",null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass([i.value?"rotate-180 transition-transform ease-in-out":"","w-3 h-3 text-white"]),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},j,2))])]),i.value?(e.openBlock(),e.createElementBlock("section",P,[g.value?(e.openBlock(),e.createElementBlock("div",L,[e.renderSlot(o.$slots,"free-slot",{},void 0,!0)])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("button",{class:e.normalizeClass([d.value==="Vertical"?"bg-green-500":"","btn_select_widget_lib"]),onClick:r[0]||(r[0]=()=>u("horizontal"))},T,2),e.createElementVNode("button",{class:e.normalizeClass([d.value!=="Vertical"?"bg-green-500":"","btn_select_widget_lib"]),onClick:r[1]||(r[1]=()=>u("vertical"))},W,2)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0)}},[["__scopeId","data-v-a8f8c201"]]);function D(t){t.component("primarySelect",x)}return{install:D,primarySelect:x}});
@@ -527,12 +527,18 @@ video {
527
527
  .z-10 {
528
528
  z-index: 10;
529
529
  }
530
+ .z-30 {
531
+ z-index: 30;
532
+ }
530
533
  .z-50 {
531
534
  z-index: 50;
532
535
  }
533
536
  .ml-auto {
534
537
  margin-left: auto;
535
538
  }
539
+ .mt-2 {
540
+ margin-top: 0.5rem;
541
+ }
536
542
  .line-clamp-2 {
537
543
  overflow: hidden;
538
544
  display: -webkit-box;
@@ -629,6 +635,10 @@ video {
629
635
  border-top-left-radius: 1rem;
630
636
  border-top-right-radius: 1rem;
631
637
  }
638
+ .bg-base-100 {
639
+ --tw-bg-opacity: 1;
640
+ background-color: rgb(75 99 116 / var(--tw-bg-opacity));
641
+ }
632
642
  .bg-base-200 {
633
643
  --tw-bg-opacity: 1;
634
644
  background-color: rgb(38 52 61 / var(--tw-bg-opacity));
@@ -781,48 +791,11 @@ video {
781
791
  .scrollbar-thumb-gray-900 {
782
792
  --scrollbar-thumb: #111827 !important;
783
793
  }
784
-
785
- /* primary_select CSS */
786
- .btn_select_widget_lib {
787
- width: 100%;
788
- border-radius: 0.375rem;
789
- --tw-bg-opacity: 1;
790
- background-color: rgb(75 99 116 / var(--tw-bg-opacity));
791
- padding: 0.5rem;
792
- --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
793
- --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
794
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
795
- --tw-shadow-color: #111B21;
796
- --tw-shadow: var(--tw-shadow-colored);
797
- }
798
- .btn_select_widget_lib:hover {
799
- background-color: rgb(38 52 61 / 0.6);
800
- }
801
-
802
- .select_widget_lib {
803
- position: absolute;
804
- z-index: 30;
805
- margin-top: 0.5rem;
806
- width: 100%;
807
- border-radius: 0.375rem;
808
- --tw-bg-opacity: 1;
809
- background-color: rgb(38 52 61 / var(--tw-bg-opacity));
810
- padding: 0.375rem;
811
- --tw-text-opacity: 1;
812
- color: rgb(255 255 255 / var(--tw-text-opacity));
813
- --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
814
- --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
815
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
816
- --tw-shadow-color: #111B21;
817
- --tw-shadow: var(--tw-shadow-colored);
818
- }
819
-
820
794
  .hover\:scale-105:hover {
821
795
  --tw-scale-x: 1.05;
822
796
  --tw-scale-y: 1.05;
823
797
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
824
798
  }
825
-
826
799
  @media (min-width: 1280px) {
827
800
 
828
801
  .lg\:mt-0 {
@@ -832,4 +805,5 @@ video {
832
805
  .lg\:w-2\/6 {
833
806
  width: 33.333333%;
834
807
  }
835
- }
808
+ }
809
+
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "sm-click-library-ui",
3
- "version": "0.0.18",
4
- "main": "dist/sm-click-library-ui.es.js",
5
- "module": "dist/sm-click-library-ui.umd.js",
6
- "private": false,
3
+ "type": "module",
7
4
  "files": [
8
5
  "dist"
9
6
  ],
10
- "type": "module",
7
+ "version": "0.0.20",
8
+ "main": "dist/sm-click-library-ui.es.js",
9
+ "module": "dist/sm-click-library-ui.umd.js",
10
+ "private": false,
11
11
  "dependencies": {
12
12
  "@tailwindcss/typography": "^0.5.13",
13
13
  "@vueuse/core": "^10.11.0",
@@ -28,7 +28,7 @@
28
28
  "dev": "vite",
29
29
  "build": "pnpm run build:lib && pnpm run build:style",
30
30
  "build:lib": "vite build",
31
- "build:style": "postcss src/styleSmClick.css -o dist/styleSmClick.css",
31
+ "build:style": "postcss src/styles/styleSmClick.css -o dist/styleSmClick.css",
32
32
  "preview": "vite preview"
33
33
  }
34
34
  }