sm-click-library-ui 0.0.17 → 0.0.18

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,114 +1,109 @@
1
- import { getCurrentScope as P, onScopeDispose as V, unref as j, watch as L, ref as S, computed as b, openBlock as v, createElementBlock as g, createElementVNode as f, toDisplayString as A, normalizeClass as C, renderSlot as F, createCommentVNode as w, pushScopeId as W, popScopeId as B } from "vue";
2
- function H(e) {
3
- return P() ? (V(e), !0) : !1;
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;
4
4
  }
5
- function O(e) {
6
- return typeof e == "function" ? e() : j(e);
5
+ function E(t) {
6
+ return typeof t == "function" ? t() : j(t);
7
7
  }
8
- const I = typeof window < "u" && typeof document < "u";
8
+ const O = typeof window < "u" && typeof document < "u";
9
9
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
10
- const M = Object.prototype.toString, D = (e) => M.call(e) === "[object Object]", y = () => {
11
- }, N = /* @__PURE__ */ T();
12
- function T() {
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));
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));
15
15
  }
16
- function _(e) {
17
- var l;
18
- const s = O(e);
19
- return (l = s == null ? void 0 : s.$el) != null ? l : s;
16
+ function w(t) {
17
+ var i;
18
+ const s = E(t);
19
+ return (i = s == null ? void 0 : s.$el) != null ? i : s;
20
20
  }
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)
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)
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, t) => (c.addEventListener(u, o, t), () => c.removeEventListener(u, o, t)), m = L(
30
- () => [_(l), O(r)],
29
+ }, d = (c, u, o, e) => (c.addEventListener(u, o, e), () => c.removeEventListener(u, o, e)), m = I(
30
+ () => [w(i), E(r)],
31
31
  ([c, u]) => {
32
32
  if (p(), !c)
33
33
  return;
34
- const o = D(u) ? { ...u } : u;
34
+ const o = B(u) ? { ...u } : u;
35
35
  a.push(
36
- ...s.flatMap((t) => n.map((i) => d(c, t, i, o)))
36
+ ...s.flatMap((e) => n.map((l) => d(c, e, l, o)))
37
37
  );
38
38
  },
39
39
  { immediate: !0, flush: "post" }
40
40
  ), h = () => {
41
41
  m(), p();
42
42
  };
43
- return H(h), h;
43
+ return F(h), h;
44
44
  }
45
- let E = !1;
46
- function G(e, l, s = {}) {
45
+ let A = !1;
46
+ function D(t, i, 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
- N && !E && (E = !0, Array.from(n.document.body.children).forEach((o) => o.addEventListener("click", y)), n.document.documentElement.addEventListener("click", y));
50
+ H && !A && (A = !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((t) => {
53
- if (typeof t == "string")
54
- return Array.from(n.document.querySelectorAll(t)).some((i) => i === o.target || o.composedPath().includes(i));
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));
55
55
  {
56
- const i = _(t);
57
- return i && (o.target === i || o.composedPath().includes(i));
56
+ const l = w(e);
57
+ return l && (o.target === l || o.composedPath().includes(l));
58
58
  }
59
59
  }), c = [
60
60
  k(n, "click", (o) => {
61
- const t = _(e);
62
- if (!(!t || t === o.target || o.composedPath().includes(t))) {
61
+ const e = w(t);
62
+ if (!(!e || e === o.target || o.composedPath().includes(e))) {
63
63
  if (o.detail === 0 && (d = !m(o)), !d) {
64
64
  d = !0;
65
65
  return;
66
66
  }
67
- l(o);
67
+ i(o);
68
68
  }
69
69
  }, { passive: !0, capture: a }),
70
70
  k(n, "pointerdown", (o) => {
71
- const t = _(e);
72
- d = !m(o) && !!(t && !o.composedPath().includes(t));
71
+ const e = w(t);
72
+ d = !m(o) && !!(e && !o.composedPath().includes(e));
73
73
  }, { passive: !0 }),
74
74
  p && k(n, "blur", (o) => {
75
75
  setTimeout(() => {
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);
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);
79
79
  }, 0);
80
80
  })
81
81
  ].filter(Boolean);
82
82
  return () => c.forEach((o) => o());
83
83
  }
84
- const $ = (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) => (W("data-v-da5c7e00"), e = e(), B(), e), q = {
84
+ const N = {
90
85
  key: 0,
91
86
  class: "line-clamp-2 uppercase text-xs truncate text-white"
92
- }, R = {
87
+ }, T = {
93
88
  key: 1,
94
89
  class: "line-clamp-2 uppercase text-xs truncate text-white"
95
- }, Z = /* @__PURE__ */ x(() => /* @__PURE__ */ f("path", {
90
+ }, G = /* @__PURE__ */ f("path", {
96
91
  "fill-rule": "evenodd",
97
92
  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",
98
93
  "clip-rule": "evenodd"
99
- }, null, -1)), J = [
100
- Z
101
- ], K = {
94
+ }, null, -1), $ = [
95
+ G
96
+ ], q = {
102
97
  key: 0,
103
98
  class: "select_widget_lib"
104
- }, Q = { key: 0 }, U = {
99
+ }, R = { key: 0 }, Z = {
105
100
  key: 1,
106
101
  class: "space-y-2"
107
- }, X = /* @__PURE__ */ x(() => /* @__PURE__ */ f("p", { class: "line-clamp-2 uppercase text-xs truncate" }, "Vertical", -1)), Y = [
108
- X
109
- ], ee = /* @__PURE__ */ x(() => /* @__PURE__ */ f("p", { class: "line-clamp-2 uppercase text-xs truncate" }, "Horizontal", -1)), te = [
110
- ee
111
- ], oe = {
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 = {
112
107
  __name: "primary_select",
113
108
  props: {
114
109
  titleFreeSlot: {
@@ -124,19 +119,19 @@ const $ = (e, l) => {
124
119
  }
125
120
  },
126
121
  emits: ["closeSelect"],
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)
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)
130
125
  ), h = b(
131
- () => s.selectConfig.some((t) => t.freeSlot)
126
+ () => s.selectConfig.some((e) => e.freeSlot)
132
127
  ), c = () => {
133
128
  r.value = !r.value;
134
- }, u = (t) => {
135
- r.value = !1, a.value = t === "horizontal" ? "Vertical" : "Horizontal", n("closeSelect", t);
129
+ }, u = (e) => {
130
+ r.value = !1, a.value = e === "horizontal" ? "Vertical" : "Horizontal", n("closeSelect", e);
136
131
  };
137
- return G(p, () => {
132
+ return D(p, () => {
138
133
  r.value && (r.value = !1);
139
- }), (t, i) => d.value ? (v(), g("div", {
134
+ }), (e, l) => d.value ? (v(), g("div", {
140
135
  key: 0,
141
136
  ref_key: "target",
142
137
  ref: p,
@@ -147,7 +142,7 @@ const $ = (e, l) => {
147
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"
148
143
  }, [
149
144
  f("div", null, [
150
- m.value ? (v(), g("p", q, A(a.value), 1)) : (v(), g("p", R, A(e.titleFreeSlot), 1))
145
+ m.value ? (v(), g("p", N, x(a.value), 1)) : (v(), g("p", T, x(t.titleFreeSlot), 1))
151
146
  ]),
152
147
  f("div", null, [
153
148
  (v(), g("svg", {
@@ -155,32 +150,32 @@ const $ = (e, l) => {
155
150
  xmlns: "http://www.w3.org/2000/svg",
156
151
  fill: "currentColor",
157
152
  viewBox: "0 0 24 24"
158
- }, J, 2))
153
+ }, $, 2))
159
154
  ])
160
155
  ]),
161
- r.value ? (v(), g("section", K, [
162
- h.value ? (v(), g("div", Q, [
163
- F(t.$slots, "free-slot", {}, void 0, !0)
164
- ])) : w("", !0),
165
- m.value ? (v(), g("div", U, [
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, [
166
161
  f("button", {
167
162
  class: C([a.value === "Vertical" ? "bg-green-500" : "", "btn_select_widget_lib"]),
168
- onClick: i[0] || (i[0] = () => u("horizontal"))
169
- }, Y, 2),
163
+ onClick: l[0] || (l[0] = () => u("horizontal"))
164
+ }, K, 2),
170
165
  f("button", {
171
166
  class: C([a.value !== "Vertical" ? "bg-green-500" : "", "btn_select_widget_lib"]),
172
- onClick: i[1] || (i[1] = () => u("vertical"))
173
- }, te, 2)
174
- ])) : w("", !0)
175
- ])) : w("", !0)
176
- ], 512)) : w("", !0);
167
+ onClick: l[1] || (l[1] = () => u("vertical"))
168
+ }, U, 2)
169
+ ])) : _("", !0)
170
+ ])) : _("", !0)
171
+ ], 512)) : _("", !0);
177
172
  }
178
- }, ne = /* @__PURE__ */ $(oe, [["__scopeId", "data-v-da5c7e00"]]);
179
- function se(e) {
180
- e.component("primarySelect", ne);
173
+ };
174
+ function Y(t) {
175
+ t.component("primarySelect", X);
181
176
  }
182
- const ie = { install: se };
177
+ const te = { install: Y };
183
178
  export {
184
- ie as default,
185
- ne as primarySelect
179
+ te as default,
180
+ X as primarySelect
186
181
  };
@@ -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(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function k(t){return typeof t=="function"?t():e.unref(t)}const b=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const B=Object.prototype.toString,A=t=>B.call(t)==="[object Object]",w=()=>{},O=N();function N(){var t,c;return b&&((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 h(t){var c;const s=k(t);return(c=s==null?void 0:s.$el)!=null?c:s}const E=b?window:void 0;function y(...t){let c,s,l,r;if(typeof t[0]=="string"||Array.isArray(t[0])?([s,l,r]=t,c=E):[c,s,l,r]=t,!c)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,o)=>(a.addEventListener(u,n,o),()=>a.removeEventListener(u,n,o)),_=e.watch(()=>[h(c),k(r)],([a,u])=>{if(m(),!a)return;const n=A(u)?{...u}:u;d.push(...s.flatMap(o=>l.map(i=>p(a,o,i,n))))},{immediate:!0,flush:"post"}),g=()=>{_(),m()};return V(g),g}let C=!1;function v(t,c,s={}){const{window:l=E,ignore:r=[],capture:d=!0,detectIframe:m=!1}=s;if(!l)return w;O&&!C&&(C=!0,Array.from(l.document.body.children).forEach(n=>n.addEventListener("click",w)),l.document.documentElement.addEventListener("click",w));let p=!0;const _=n=>r.some(o=>{if(typeof o=="string")return Array.from(l.document.querySelectorAll(o)).some(i=>i===n.target||n.composedPath().includes(i));{const i=h(o);return i&&(n.target===i||n.composedPath().includes(i))}}),a=[y(l,"click",n=>{const o=h(t);if(!(!o||o===n.target||n.composedPath().includes(o))){if(n.detail===0&&(p=!_(n)),!p){p=!0;return}c(n)}},{passive:!0,capture:d}),y(l,"pointerdown",n=>{const o=h(t);p=!_(n)&&!!(o&&!n.composedPath().includes(o))},{passive:!0}),m&&y(l,"blur",n=>{setTimeout(()=>{var o;const i=h(t);((o=l.document.activeElement)==null?void 0:o.tagName)==="IFRAME"&&!(i!=null&&i.contains(l.document.activeElement))&&c(n)},0)})].filter(Boolean);return()=>a.forEach(n=>n())}const I=(t,c)=>{const s=t.__vccOpts||t;for(const[l,r]of c)s[l]=r;return s},S=t=>(e.pushScopeId("data-v-da5c7e00"),t=t(),e.popScopeId(),t),z={key:0,class:"line-clamp-2 uppercase text-xs truncate text-white"},j={key:1,class:"line-clamp-2 uppercase text-xs truncate text-white"},P=[S(()=>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))],L={key:0,class:"select_widget_lib"},M={key:0},T={key:1,class:"space-y-2"},F=[S(()=>e.createElementVNode("p",{class:"line-clamp-2 uppercase text-xs truncate"},"Vertical",-1))],W=[S(()=>e.createElementVNode("p",{class:"line-clamp-2 uppercase text-xs truncate"},"Horizontal",-1))],x=I({__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,r=e.ref(!1),d=e.ref("Horizontal"),m=e.ref(null),p=e.computed(()=>s.selectConfig.length>0),_=e.computed(()=>s.selectConfig.some(o=>o.chartsConfig)),g=e.computed(()=>s.selectConfig.some(o=>o.freeSlot)),a=()=>{r.value=!r.value},u=o=>{r.value=!1,d.value=o==="horizontal"?"Vertical":"Horizontal",l("closeSelect",o)};return v(m,()=>{r.value&&(r.value=!1)}),(o,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,[_.value?(e.openBlock(),e.createElementBlock("p",z,e.toDisplayString(d.value),1)):(e.openBlock(),e.createElementBlock("p",j,e.toDisplayString(t.titleFreeSlot),1))]),e.createElementVNode("div",null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass([r.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"},P,2))])]),r.value?(e.openBlock(),e.createElementBlock("section",L,[g.value?(e.openBlock(),e.createElementBlock("div",M,[e.renderSlot(o.$slots,"free-slot",{},void 0,!0)])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("button",{class:e.normalizeClass([d.value==="Vertical"?"bg-green-500":"","btn_select_widget_lib"]),onClick:i[0]||(i[0]=()=>u("horizontal"))},F,2),e.createElementVNode("button",{class:e.normalizeClass([d.value!=="Vertical"?"bg-green-500":"","btn_select_widget_lib"]),onClick:i[1]||(i[1]=()=>u("vertical"))},W,2)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0)}},[["__scopeId","data-v-da5c7e00"]]);function D(t){t.component("primarySelect",x)}const H={install:D};f.default=H,f.primarySelect=x,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
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"}})});
@@ -527,18 +527,12 @@ video {
527
527
  .z-10 {
528
528
  z-index: 10;
529
529
  }
530
- .z-30 {
531
- z-index: 30;
532
- }
533
530
  .z-50 {
534
531
  z-index: 50;
535
532
  }
536
533
  .ml-auto {
537
534
  margin-left: auto;
538
535
  }
539
- .mt-2 {
540
- margin-top: 0.5rem;
541
- }
542
536
  .line-clamp-2 {
543
537
  overflow: hidden;
544
538
  display: -webkit-box;
@@ -635,10 +629,6 @@ video {
635
629
  border-top-left-radius: 1rem;
636
630
  border-top-right-radius: 1rem;
637
631
  }
638
- .bg-base-100 {
639
- --tw-bg-opacity: 1;
640
- background-color: rgb(75 99 116 / var(--tw-bg-opacity));
641
- }
642
632
  .bg-base-200 {
643
633
  --tw-bg-opacity: 1;
644
634
  background-color: rgb(38 52 61 / var(--tw-bg-opacity));
@@ -791,11 +781,48 @@ video {
791
781
  .scrollbar-thumb-gray-900 {
792
782
  --scrollbar-thumb: #111827 !important;
793
783
  }
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
+
794
820
  .hover\:scale-105:hover {
795
821
  --tw-scale-x: 1.05;
796
822
  --tw-scale-y: 1.05;
797
823
  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));
798
824
  }
825
+
799
826
  @media (min-width: 1280px) {
800
827
 
801
828
  .lg\:mt-0 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sm-click-library-ui",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "main": "dist/sm-click-library-ui.es.js",
5
5
  "module": "dist/sm-click-library-ui.umd.js",
6
6
  "private": false,