sm-click-library-ui 0.0.10 → 0.0.12

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,98 +1,98 @@
1
- import { getCurrentScope as B, onScopeDispose as V, unref as F, watch as W, ref as S, computed as k, openBlock as _, createElementBlock as m, createElementVNode as l, toDisplayString as $, normalizeClass as C, renderSlot as w, createCommentVNode as g, pushScopeId as E, popScopeId as I } from "vue";
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
2
  function H(e) {
3
- return B() ? (V(e), !0) : !1;
3
+ return P() ? (V(e), !0) : !1;
4
4
  }
5
- function L(e) {
6
- return typeof e == "function" ? e() : F(e);
5
+ function O(e) {
6
+ return typeof e == "function" ? e() : j(e);
7
7
  }
8
- const z = 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 D = Object.prototype.toString, N = (e) => D.call(e) === "[object Object]", y = () => {
11
- }, T = /* @__PURE__ */ G();
12
- function G() {
13
- var e, i;
14
- return z && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.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 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));
15
15
  }
16
- function b(e) {
17
- var i;
18
- const n = L(e);
19
- return (i = n == null ? void 0 : n.$el) != null ? i : n;
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 M = z ? window : void 0;
22
- function x(...e) {
23
- let i, n, s, c;
24
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, s, c] = e, i = M) : [i, n, s, c] = e, !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
- Array.isArray(n) || (n = [n]), Array.isArray(s) || (s = [s]);
27
- const r = [], p = () => {
28
- r.forEach((d) => d()), r.length = 0;
29
- }, f = (d, u, o, t) => (d.addEventListener(u, o, t), () => d.removeEventListener(u, o, t)), v = W(
30
- () => [b(i), L(c)],
31
- ([d, u]) => {
32
- if (p(), !d)
26
+ Array.isArray(s) || (s = [s]), Array.isArray(n) || (n = [n]);
27
+ const a = [], p = () => {
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)],
31
+ ([c, u]) => {
32
+ if (p(), !c)
33
33
  return;
34
- const o = N(u) ? { ...u } : u;
35
- r.push(
36
- ...n.flatMap((t) => s.map((a) => f(d, t, a, o)))
34
+ const o = D(u) ? { ...u } : u;
35
+ a.push(
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
- v(), p();
41
+ m(), p();
42
42
  };
43
43
  return H(h), h;
44
44
  }
45
- let A = !1;
46
- function q(e, i, n = {}) {
47
- const { window: s = M, ignore: c = [], capture: r = !0, detectIframe: p = !1 } = n;
48
- if (!s)
45
+ let E = !1;
46
+ function G(e, l, s = {}) {
47
+ const { window: n = z, ignore: r = [], capture: a = !0, detectIframe: p = !1 } = s;
48
+ if (!n)
49
49
  return y;
50
- T && !A && (A = !0, Array.from(s.document.body.children).forEach((o) => o.addEventListener("click", y)), s.document.documentElement.addEventListener("click", y));
51
- let f = !0;
52
- const v = (o) => c.some((t) => {
50
+ N && !E && (E = !0, Array.from(n.document.body.children).forEach((o) => o.addEventListener("click", y)), n.document.documentElement.addEventListener("click", y));
51
+ let d = !0;
52
+ const m = (o) => r.some((t) => {
53
53
  if (typeof t == "string")
54
- return Array.from(s.document.querySelectorAll(t)).some((a) => a === o.target || o.composedPath().includes(a));
54
+ return Array.from(n.document.querySelectorAll(t)).some((i) => i === o.target || o.composedPath().includes(i));
55
55
  {
56
- const a = b(t);
57
- return a && (o.target === a || o.composedPath().includes(a));
56
+ const i = _(t);
57
+ return i && (o.target === i || o.composedPath().includes(i));
58
58
  }
59
- }), d = [
60
- x(s, "click", (o) => {
61
- const t = b(e);
59
+ }), c = [
60
+ k(n, "click", (o) => {
61
+ const t = _(e);
62
62
  if (!(!t || t === o.target || o.composedPath().includes(t))) {
63
- if (o.detail === 0 && (f = !v(o)), !f) {
64
- f = !0;
63
+ if (o.detail === 0 && (d = !m(o)), !d) {
64
+ d = !0;
65
65
  return;
66
66
  }
67
- i(o);
67
+ l(o);
68
68
  }
69
- }, { passive: !0, capture: r }),
70
- x(s, "pointerdown", (o) => {
71
- const t = b(e);
72
- f = !v(o) && !!(t && !o.composedPath().includes(t));
69
+ }, { passive: !0, capture: a }),
70
+ k(n, "pointerdown", (o) => {
71
+ const t = _(e);
72
+ d = !m(o) && !!(t && !o.composedPath().includes(t));
73
73
  }, { passive: !0 }),
74
- p && x(s, "blur", (o) => {
74
+ p && k(n, "blur", (o) => {
75
75
  setTimeout(() => {
76
76
  var t;
77
- const a = b(e);
78
- ((t = s.document.activeElement) == null ? void 0 : t.tagName) === "IFRAME" && !(a != null && a.contains(s.document.activeElement)) && i(o);
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
- return () => d.forEach((o) => o());
82
+ return () => c.forEach((o) => o());
83
83
  }
84
- const j = (e, i) => {
85
- const n = e.__vccOpts || e;
86
- for (const [s, c] of i)
87
- n[s] = c;
88
- return n;
89
- }, O = (e) => (E("data-v-b5d1c144"), e = e(), I(), e), R = {
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-66a625cd"), e = e(), B(), e), q = {
90
90
  key: 0,
91
91
  class: "line-clamp-2 uppercase text-xs truncate text-white"
92
- }, U = {
92
+ }, R = {
93
93
  key: 1,
94
94
  class: "line-clamp-2 uppercase text-xs truncate text-white"
95
- }, Z = /* @__PURE__ */ O(() => /* @__PURE__ */ l("path", {
95
+ }, Z = /* @__PURE__ */ x(() => /* @__PURE__ */ f("path", {
96
96
  "fill-rule": "evenodd",
97
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",
98
98
  "clip-rule": "evenodd"
@@ -101,14 +101,14 @@ const j = (e, i) => {
101
101
  ], K = {
102
102
  key: 0,
103
103
  class: "select_widget_lib"
104
- }, Q = { key: 0 }, X = {
104
+ }, Q = { key: 0 }, U = {
105
105
  key: 1,
106
- class: "space-y-2 mt-2"
107
- }, Y = /* @__PURE__ */ O(() => /* @__PURE__ */ l("p", { class: "line-clamp-2 uppercase text-xs truncate" }, "Vertical", -1)), ee = [
108
- Y
109
- ], te = /* @__PURE__ */ O(() => /* @__PURE__ */ l("p", { class: "line-clamp-2 uppercase text-xs truncate" }, "Horizontal", -1)), oe = [
110
- te
111
- ], se = {
106
+ 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 = {
112
112
  __name: "primary_select",
113
113
  props: {
114
114
  titleFreeSlot: {
@@ -124,121 +124,63 @@ const j = (e, i) => {
124
124
  }
125
125
  },
126
126
  emits: ["closeSelect"],
127
- setup(e, { emit: i }) {
128
- const n = e, s = i, c = S(!1), r = S("Horizontal"), p = S(null), f = k(() => n.selectConfig.length > 0), v = k(
129
- () => n.selectConfig.some((t) => t.chartsConfig)
130
- ), h = k(
131
- () => n.selectConfig.some((t) => t.freeSlot)
132
- ), d = () => {
133
- c.value = !c.value;
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)
130
+ ), h = b(
131
+ () => s.selectConfig.some((t) => t.freeSlot)
132
+ ), c = () => {
133
+ r.value = !r.value;
134
134
  }, u = (t) => {
135
- c.value = !1, r.value = t === "horizontal" ? "Vertical" : "Horizontal", s("closeSelect", t);
135
+ r.value = !1, a.value = t === "horizontal" ? "Vertical" : "Horizontal", n("closeSelect", t);
136
136
  };
137
- return q(p, () => {
138
- c.value && (c.value = !1);
139
- }), (t, a) => f.value ? (_(), m("div", {
137
+ return G(p, () => {
138
+ r.value && (r.value = !1);
139
+ }), (t, i) => d.value ? (v(), g("div", {
140
140
  key: 0,
141
141
  ref_key: "target",
142
142
  ref: p,
143
143
  class: "relative w-full"
144
144
  }, [
145
- l("button", {
146
- onClick: d,
147
- class: "bg-lib-base-200 z-10 truncate flex items-center justify-between gap-6 p-2 rounded-md lg:mt-0 w-full shadow-md shadow-lib-base-300"
145
+ f("button", {
146
+ onClick: c,
147
+ 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
148
  }, [
149
- l("div", null, [
150
- v.value ? (_(), m("p", R, $(r.value), 1)) : (_(), m("p", U, $(e.titleFreeSlot), 1))
149
+ f("div", null, [
150
+ m.value ? (v(), g("p", q, A(a.value), 1)) : (v(), g("p", R, A(e.titleFreeSlot), 1))
151
151
  ]),
152
- l("div", null, [
153
- (_(), m("svg", {
154
- class: C([c.value ? "rotate-180 transition-transform ease-in-out" : "", "w-3 h-3 text-white"]),
152
+ f("div", null, [
153
+ (v(), g("svg", {
154
+ class: C([r.value ? "rotate-180 transition-transform ease-in-out" : "", "w-3 h-3 text-white"]),
155
155
  xmlns: "http://www.w3.org/2000/svg",
156
156
  fill: "currentColor",
157
157
  viewBox: "0 0 24 24"
158
158
  }, J, 2))
159
159
  ])
160
160
  ]),
161
- c.value ? (_(), m("section", K, [
162
- h.value ? (_(), m("div", Q, [
163
- w(t.$slots, "free-slot", {}, void 0, !0)
164
- ])) : g("", !0),
165
- v.value ? (_(), m("div", X, [
166
- l("button", {
167
- class: C([r.value === "Vertical" ? "bg-green-500" : "", "btn_select_widget_lib"]),
168
- onClick: a[0] || (a[0] = () => u("horizontal"))
169
- }, ee, 2),
170
- l("button", {
171
- class: C([r.value !== "Vertical" ? "bg-green-500" : "", "btn_select_widget_lib"]),
172
- onClick: a[1] || (a[1] = () => u("vertical"))
173
- }, oe, 2)
174
- ])) : g("", !0)
175
- ])) : g("", !0)
176
- ], 512)) : g("", !0);
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, [
166
+ f("button", {
167
+ class: C([a.value === "Vertical" ? "bg-green-500" : "", "btn_select_widget_lib"]),
168
+ onClick: i[0] || (i[0] = () => u("horizontal"))
169
+ }, Y, 2),
170
+ f("button", {
171
+ 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);
177
177
  }
178
- }, ne = /* @__PURE__ */ j(se, [["__scopeId", "data-v-b5d1c144"]]), P = (e) => (E("data-v-606bbd6b"), e = e(), I(), e), le = {
179
- key: 0,
180
- class: "modal_head_lib"
181
- }, ie = /* @__PURE__ */ P(() => /* @__PURE__ */ l("div", { class: "modal-overlay_lib absolute h-full bg-gray-600 w-full opacity-70" }, null, -1)), ce = { class: "modal_responsive_lib" }, ae = { class: "flex min-h-full items-center justify-center text-center lib-sm:p-0" }, re = { class: "modal_size_lib lg:w-2/6" }, de = { class: "modal_background_lib" }, ue = { class: "modal_tittle_lib text-current" }, pe = /* @__PURE__ */ P(() => /* @__PURE__ */ l("svg", {
182
- class: "h-5 w-5",
183
- fill: "currentColor",
184
- viewBox: "0 0 20 20",
185
- xmlns: "http://www.w3.org/2000/svg"
186
- }, [
187
- /* @__PURE__ */ l("path", {
188
- "fill-rule": "evenodd",
189
- d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
190
- "clip-rule": "evenodd"
191
- })
192
- ], -1)), fe = [
193
- pe
194
- ], _e = { class: "p-4" }, me = { class: "w-full" }, ve = { class: "block" }, he = { class: "modal_end_button_lib lib-sm" }, ge = {
195
- __name: "simple_modal",
196
- props: {
197
- isOpen: Boolean,
198
- default: !1
199
- },
200
- emits: ["update:isOpen"],
201
- setup(e, { emit: i }) {
202
- const n = e, s = i, c = () => {
203
- s("update:isOpen", !n.isOpen);
204
- };
205
- return (r, p) => e.isOpen ? (_(), m("div", le, [
206
- ie,
207
- l("div", ce, [
208
- l("div", ae, [
209
- l("div", re, [
210
- l("div", de, [
211
- l("div", ue, [
212
- w(r.$slots, "header", {}, void 0, !0),
213
- l("button", {
214
- onClick: c,
215
- class: "modal_close_button_lib",
216
- "data-modal-toggle": "editUserModal"
217
- }, fe)
218
- ]),
219
- l("div", _e, [
220
- l("div", me, [
221
- l("label", ve, [
222
- w(r.$slots, "body", {}, void 0, !0)
223
- ])
224
- ])
225
- ]),
226
- l("div", he, [
227
- w(r.$slots, "footer", {}, void 0, !0)
228
- ])
229
- ])
230
- ])
231
- ])
232
- ])
233
- ])) : g("", !0);
234
- }
235
- }, be = /* @__PURE__ */ j(ge, [["__scopeId", "data-v-606bbd6b"]]);
236
- function we(e) {
237
- e.component("primarySelect", ne), e.component("simpleModal", be);
178
+ }, ne = /* @__PURE__ */ $(oe, [["__scopeId", "data-v-66a625cd"]]);
179
+ function se(e) {
180
+ e.component("primarySelect", ne);
238
181
  }
239
- const Se = { install: we };
182
+ const ie = { install: se };
240
183
  export {
241
- Se as default,
242
- ne as primarySelect,
243
- be as simpleModal
184
+ ie as default,
185
+ ne as primarySelect
244
186
  };
@@ -1 +1 @@
1
- (function(p,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(p=typeof globalThis<"u"?globalThis:p||self,e(p["sm-click-library-ui"]={},p.Vue))})(this,function(p,e){"use strict";function B(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function E(t){return typeof t=="function"?t():e.unref(t)}const S=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const O=Object.prototype.toString,A=t=>O.call(t)==="[object Object]",b=()=>{},I=M();function M(){var t,c;return S&&((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=E(t);return(c=s==null?void 0:s.$el)!=null?c:s}const k=S?window:void 0;function w(...t){let c,s,l,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([s,l,i]=t,c=k):[c,s,l,i]=t,!c)return b;Array.isArray(s)||(s=[s]),Array.isArray(l)||(l=[l]);const a=[],u=()=>{a.forEach(d=>d()),a.length=0},f=(d,m,n,o)=>(d.addEventListener(m,n,o),()=>d.removeEventListener(m,n,o)),_=e.watch(()=>[h(c),E(i)],([d,m])=>{if(u(),!d)return;const n=A(m)?{...m}:m;a.push(...s.flatMap(o=>l.map(r=>f(d,o,r,n))))},{immediate:!0,flush:"post"}),g=()=>{_(),u()};return B(g),g}let V=!1;function z(t,c,s={}){const{window:l=k,ignore:i=[],capture:a=!0,detectIframe:u=!1}=s;if(!l)return b;I&&!V&&(V=!0,Array.from(l.document.body.children).forEach(n=>n.addEventListener("click",b)),l.document.documentElement.addEventListener("click",b));let f=!0;const _=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=h(o);return r&&(n.target===r||n.composedPath().includes(r))}}),d=[w(l,"click",n=>{const o=h(t);if(!(!o||o===n.target||n.composedPath().includes(o))){if(n.detail===0&&(f=!_(n)),!f){f=!0;return}c(n)}},{passive:!0,capture:a}),w(l,"pointerdown",n=>{const o=h(t);f=!_(n)&&!!(o&&!n.composedPath().includes(o))},{passive:!0}),u&&w(l,"blur",n=>{setTimeout(()=>{var o;const r=h(t);((o=l.document.activeElement)==null?void 0:o.tagName)==="IFRAME"&&!(r!=null&&r.contains(l.document.activeElement))&&c(n)},0)})].filter(Boolean);return()=>d.forEach(n=>n())}const C=(t,c)=>{const s=t.__vccOpts||t;for(const[l,i]of c)s[l]=i;return s},y=t=>(e.pushScopeId("data-v-b5d1c144"),t=t(),e.popScopeId(),t),v={key:0,class:"line-clamp-2 uppercase text-xs truncate text-white"},L={key:1,class:"line-clamp-2 uppercase text-xs truncate text-white"},j=[y(()=>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"},T={key:0},F={key:1,class:"space-y-2 mt-2"},W=[y(()=>e.createElementVNode("p",{class:"line-clamp-2 uppercase text-xs truncate"},"Vertical",-1))],D=[y(()=>e.createElementVNode("p",{class:"line-clamp-2 uppercase text-xs truncate"},"Horizontal",-1))],N=C({__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),a=e.ref("Horizontal"),u=e.ref(null),f=e.computed(()=>s.selectConfig.length>0),_=e.computed(()=>s.selectConfig.some(o=>o.chartsConfig)),g=e.computed(()=>s.selectConfig.some(o=>o.freeSlot)),d=()=>{i.value=!i.value},m=o=>{i.value=!1,a.value=o==="horizontal"?"Vertical":"Horizontal",l("closeSelect",o)};return z(u,()=>{i.value&&(i.value=!1)}),(o,r)=>f.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"target",ref:u,class:"relative w-full"},[e.createElementVNode("button",{onClick:d,class:"bg-lib-base-200 z-10 truncate flex items-center justify-between gap-6 p-2 rounded-md lg:mt-0 w-full shadow-md shadow-lib-base-300"},[e.createElementVNode("div",null,[_.value?(e.openBlock(),e.createElementBlock("p",v,e.toDisplayString(a.value),1)):(e.openBlock(),e.createElementBlock("p",L,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",T,[e.renderSlot(o.$slots,"free-slot",{},void 0,!0)])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("button",{class:e.normalizeClass([a.value==="Vertical"?"bg-green-500":"","btn_select_widget_lib"]),onClick:r[0]||(r[0]=()=>m("horizontal"))},W,2),e.createElementVNode("button",{class:e.normalizeClass([a.value!=="Vertical"?"bg-green-500":"","btn_select_widget_lib"]),onClick:r[1]||(r[1]=()=>m("vertical"))},D,2)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0)}},[["__scopeId","data-v-b5d1c144"]]),$=t=>(e.pushScopeId("data-v-606bbd6b"),t=t(),e.popScopeId(),t),H={key:0,class:"modal_head_lib"},q=$(()=>e.createElementVNode("div",{class:"modal-overlay_lib absolute h-full bg-gray-600 w-full opacity-70"},null,-1)),G={class:"modal_responsive_lib"},R={class:"flex min-h-full items-center justify-center text-center lib-sm:p-0"},U={class:"modal_size_lib lg:w-2/6"},Z={class:"modal_background_lib"},J={class:"modal_tittle_lib text-current"},K=[$(()=>e.createElementVNode("svg",{class:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1))],Q={class:"p-4"},X={class:"w-full"},Y={class:"block"},ee={class:"modal_end_button_lib lib-sm"},x=C({__name:"simple_modal",props:{isOpen:Boolean,default:!1},emits:["update:isOpen"],setup(t,{emit:c}){const s=t,l=c,i=()=>{l("update:isOpen",!s.isOpen)};return(a,u)=>t.isOpen?(e.openBlock(),e.createElementBlock("div",H,[q,e.createElementVNode("div",G,[e.createElementVNode("div",R,[e.createElementVNode("div",U,[e.createElementVNode("div",Z,[e.createElementVNode("div",J,[e.renderSlot(a.$slots,"header",{},void 0,!0),e.createElementVNode("button",{onClick:i,class:"modal_close_button_lib","data-modal-toggle":"editUserModal"},K)]),e.createElementVNode("div",Q,[e.createElementVNode("div",X,[e.createElementVNode("label",Y,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])]),e.createElementVNode("div",ee,[e.renderSlot(a.$slots,"footer",{},void 0,!0)])])])])])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-606bbd6b"]]);function te(t){t.component("primarySelect",N),t.component("simpleModal",x)}const oe={install:te};p.default=oe,p.primarySelect=N,p.simpleModal=x,Object.defineProperties(p,{__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(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-66a625cd"),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-66a625cd"]]);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"}})});
@@ -635,9 +635,13 @@ video {
635
635
  border-top-left-radius: 1rem;
636
636
  border-top-right-radius: 1rem;
637
637
  }
638
- .border-lib-base-300 {
639
- --tw-border-opacity: 1;
640
- border-color: rgb(17 27 33 / var(--tw-border-opacity));
638
+ .bg-base-100 {
639
+ --tw-bg-opacity: 1;
640
+ background-color: rgb(75 99 116 / var(--tw-bg-opacity));
641
+ }
642
+ .bg-base-200 {
643
+ --tw-bg-opacity: 1;
644
+ background-color: rgb(38 52 61 / var(--tw-bg-opacity));
641
645
  }
642
646
  .bg-black {
643
647
  --tw-bg-opacity: 1;
@@ -655,21 +659,6 @@ video {
655
659
  --tw-bg-opacity: 1;
656
660
  background-color: rgb(34 197 94 / var(--tw-bg-opacity));
657
661
  }
658
- .bg-lib-base-100 {
659
- --tw-bg-opacity: 1;
660
- background-color: rgb(75 99 116 / var(--tw-bg-opacity));
661
- }
662
- .bg-lib-base-200 {
663
- --tw-bg-opacity: 1;
664
- background-color: rgb(38 52 61 / var(--tw-bg-opacity));
665
- }
666
- .bg-lib-base-200\/40 {
667
- background-color: rgb(38 52 61 / 0.4);
668
- }
669
- .bg-lib-base-300 {
670
- --tw-bg-opacity: 1;
671
- background-color: rgb(17 27 33 / var(--tw-bg-opacity));
672
- }
673
662
  .p-1 {
674
663
  padding: 0.25rem;
675
664
  }
@@ -726,7 +715,7 @@ video {
726
715
  --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
727
716
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
728
717
  }
729
- .shadow-lib-base-300 {
718
+ .shadow-base-300 {
730
719
  --tw-shadow-color: #111B21;
731
720
  --tw-shadow: var(--tw-shadow-colored);
732
721
  }
@@ -803,19 +792,13 @@ video {
803
792
  --tw-scale-y: 1.05;
804
793
  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));
805
794
  }
806
- .hover\:bg-lib-base-100:hover {
807
- --tw-bg-opacity: 1;
808
- background-color: rgb(75 99 116 / var(--tw-bg-opacity));
809
- }
810
- @media (min-width: 864px) {
795
+ @media (min-width: 1280px) {
811
796
 
812
- .lib_md\:w-1\/2 {
813
- width: 50%;
797
+ .lg\:mt-0 {
798
+ margin-top: 0px;
814
799
  }
815
- }
816
- @media (min-width: 1512px) {
817
800
 
818
- .lib_xl\:w-1\/3 {
801
+ .lg\:w-2\/6 {
819
802
  width: 33.333333%;
820
803
  }
821
804
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sm-click-library-ui",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "main": "dist/sm-click-library-ui.es.js",
5
5
  "module": "dist/sm-click-library-ui.umd.js",
6
6
  "private": false,
@@ -11,6 +11,7 @@
11
11
  "dependencies": {
12
12
  "@tailwindcss/typography": "^0.5.13",
13
13
  "@vueuse/core": "^10.11.0",
14
+ "daisyui": "^4.12.10",
14
15
  "tailwind-scrollbar": "^3.1.0",
15
16
  "vue": "^3.4.29"
16
17
  },