glass-studio-ui-pro 0.1.3 → 0.1.5

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,16 +1,17 @@
1
- import { defineComponent as S, computed as f, openBlock as d, createBlock as B, resolveDynamicComponent as V, normalizeStyle as C, normalizeClass as $, withCtx as F, createElementBlock as h, renderSlot as m, createCommentVNode as k, createElementVNode as b, h as x, unref as M, createStaticVNode as T } from "vue";
2
- let j = {
1
+ import { defineComponent as k, computed as f, openBlock as l, createBlock as S, resolveDynamicComponent as D, normalizeStyle as x, normalizeClass as w, withCtx as G, createElementBlock as m, renderSlot as p, createCommentVNode as y, createElementVNode as b, unref as V, createStaticVNode as F } from "vue";
2
+ import { Check as T } from "lucide-vue-next";
3
+ let M = {
3
4
  isValid: !0,
4
5
  // Default to true while checking
5
6
  tier: "pro"
6
7
  };
7
- const _ = () => j, U = {
8
+ const $ = () => M, U = {
8
9
  key: 0,
9
10
  class: "cm-card-header"
10
- }, N = { class: "cm-card-body" }, R = {
11
+ }, j = { class: "cm-card-body" }, R = {
11
12
  key: 1,
12
13
  class: "cm-card-footer"
13
- }, L = /* @__PURE__ */ S({
14
+ }, N = /* @__PURE__ */ k({
14
15
  __name: "CmCard",
15
16
  props: {
16
17
  type: { default: "none" },
@@ -24,8 +25,8 @@ const _ = () => j, U = {
24
25
  tag: { default: "div" },
25
26
  shadow: { type: [Boolean, String], default: void 0 }
26
27
  },
27
- setup(t) {
28
- const o = t, a = {
28
+ setup(a) {
29
+ const s = a, t = {
29
30
  "glass-frost": { blur: 0, opacity: 0, distortion: "mist", shadow: "reflex" },
30
31
  "light-frost": { blur: 5, opacity: 0.08, distortion: "frosted" },
31
32
  "heavy-frost": { blur: 24, opacity: 0, distortion: "frosted" },
@@ -43,60 +44,60 @@ const _ = () => j, U = {
43
44
  frosted: { blur: 20, opacity: 0.12, distortion: "frosted" },
44
45
  glass: { blur: 0, opacity: 1, distortion: "none" },
45
46
  none: { blur: 15, opacity: 0.1, distortion: "none" }
46
- }, s = f(() => {
47
- const e = a[o.type] || a.none, l = _().isValid ? o.distortion ?? e.distortion : "none";
47
+ }, o = f(() => {
48
+ const e = t[s.type] || t.none, d = $().isValid ? s.distortion ?? e.distortion : "none";
48
49
  return {
49
- blur: o.blur ?? e.blur,
50
- opacity: o.opacity ?? e.opacity,
51
- brightness: o.brightness ?? e.brightness,
52
- distortion: l,
53
- shadow: o.shadow ?? e.shadow
50
+ blur: s.blur ?? e.blur,
51
+ opacity: s.opacity ?? e.opacity,
52
+ brightness: s.brightness ?? e.brightness,
53
+ distortion: d,
54
+ shadow: s.shadow ?? e.shadow
54
55
  };
55
- }), n = (e) => !e || e === "none" ? "" : `url(#cm-glass-distortion-${e})`, i = f(() => {
56
- const e = s.value.shadow;
56
+ }), n = (e) => !e || e === "none" ? "" : `url(#cm-glass-distortion-${e})`, c = f(() => {
57
+ const e = o.value.shadow;
57
58
  return e === "mist" || e === "deep" ? "cm-shadow-mist" : e === "reflex" || e === !0 ? "cm-shadow-reflex" : "";
58
- }), p = f(() => {
59
- const e = [], r = typeof s.value.blur == "string" ? parseFloat(s.value.blur) : s.value.blur;
60
- r && r > 0 && e.push(`blur(${r}px)`), s.value.brightness && e.push(`brightness(${s.value.brightness})`);
61
- const l = n(s.value.distortion);
62
- l && e.push(l);
63
- const g = e.join(" ");
59
+ }), C = f(() => {
60
+ const e = [], r = typeof o.value.blur == "string" ? parseFloat(o.value.blur) : o.value.blur;
61
+ r && r > 0 && e.push(`blur(${r}px)`), o.value.brightness && e.push(`brightness(${o.value.brightness})`);
62
+ const d = n(o.value.distortion);
63
+ d && e.push(d);
64
+ const h = e.join(" ");
64
65
  let u;
65
- const c = s.value.shadow;
66
- return typeof c == "string" && c !== "mist" && c !== "reflex" && c !== "deep" && (u = c), {
67
- backdropFilter: g,
68
- "-webkit-backdrop-filter": g,
69
- background: `rgba(var(--glass-bg-rgb), ${s.value.opacity})`,
70
- borderRadius: o.radius,
66
+ const i = o.value.shadow;
67
+ return typeof i == "string" && i !== "mist" && i !== "reflex" && i !== "deep" && (u = i), {
68
+ backdropFilter: h,
69
+ "-webkit-backdrop-filter": h,
70
+ background: `rgba(var(--glass-bg-rgb), ${o.value.opacity})`,
71
+ borderRadius: s.radius,
71
72
  boxShadow: u,
72
73
  "-webkit-box-shadow": u
73
74
  };
74
75
  });
75
- return (e, r) => (d(), B(V(t.tag), {
76
- class: $(["cm-card", [
77
- { "cm-card-grain": t.grain },
78
- `cm-distortion-${s.value.distortion}`,
79
- `cm-type-${t.type}`,
80
- i.value,
81
- t.customClass
76
+ return (e, r) => (l(), S(D(a.tag), {
77
+ class: w(["cm-card", [
78
+ { "cm-card-grain": a.grain },
79
+ `cm-distortion-${o.value.distortion}`,
80
+ `cm-type-${a.type}`,
81
+ c.value,
82
+ a.customClass
82
83
  ]]),
83
- style: C(p.value)
84
+ style: x(C.value)
84
85
  }, {
85
- default: F(() => [
86
- e.$slots.header ? (d(), h("div", U, [
87
- m(e.$slots, "header")
88
- ])) : k("", !0),
89
- b("div", N, [
90
- m(e.$slots, "default")
86
+ default: G(() => [
87
+ e.$slots.header ? (l(), m("div", U, [
88
+ p(e.$slots, "header")
89
+ ])) : y("", !0),
90
+ b("div", j, [
91
+ p(e.$slots, "default")
91
92
  ]),
92
- e.$slots.footer ? (d(), h("div", R, [
93
- m(e.$slots, "footer")
94
- ])) : k("", !0)
93
+ e.$slots.footer ? (l(), m("div", R, [
94
+ p(e.$slots, "footer")
95
+ ])) : y("", !0)
95
96
  ]),
96
97
  _: 3
97
98
  }, 8, ["class", "style"]));
98
99
  }
99
- }), I = { class: "cm-btn-content" }, O = /* @__PURE__ */ S({
100
+ }), O = { class: "cm-btn-content" }, q = /* @__PURE__ */ k({
100
101
  __name: "CmButton",
101
102
  props: {
102
103
  variant: { default: "default" },
@@ -108,8 +109,8 @@ const _ = () => j, U = {
108
109
  shadow: { type: [Boolean, String], default: "none" }
109
110
  },
110
111
  emits: ["click"],
111
- setup(t, { emit: o }) {
112
- const a = t, s = f(() => ({
112
+ setup(a, { emit: s }) {
113
+ const t = a, o = f(() => ({
113
114
  // Main button element is a transparent container
114
115
  background: "none",
115
116
  border: "none",
@@ -117,180 +118,115 @@ const _ = () => j, U = {
117
118
  outline: "none",
118
119
  boxShadow: "none"
119
120
  // Handled by variants or shadowClass on main button
120
- })), n = (e) => !e || e === "none" ? "" : `url(#cm-glass-distortion-${e})`, i = f(() => {
121
+ })), n = (e) => !e || e === "none" ? "" : `url(#cm-glass-distortion-${e})`, c = f(() => {
121
122
  const e = [], r = [];
122
- a.blur > 0 && e.push(`blur(${a.blur}px)`);
123
- const g = _().isValid ? a.distortion : "none", u = n(g);
123
+ t.blur > 0 && e.push(`blur(${t.blur}px)`);
124
+ const h = $().isValid ? t.distortion : "none", u = n(h);
124
125
  u && r.push(u);
125
- const c = e.join(" "), G = r.join(" ");
126
- let v = `rgba(var(--glass-bg-rgb), ${a.opacity})`, y = "rgba(var(--glass-border-rgb), 0.15)";
127
- return a.variant === "primary" ? (v = `rgba(var(--primary-color-rgb), ${Math.min(a.opacity + 0.15, 0.4)})`, y = "rgba(var(--primary-color-rgb), 0.3)") : a.variant === "ghost" && (v = "transparent", y = "transparent", a.active && (v = `rgba(var(--glass-bg-rgb), ${a.opacity})`, y = "rgba(var(--glass-border-rgb), 0.15)")), {
126
+ const i = e.join(" "), _ = r.join(" ");
127
+ let g = `rgba(var(--glass-bg-rgb), ${t.opacity})`, v = "rgba(var(--glass-border-rgb), 0.15)";
128
+ return t.variant === "primary" ? (g = `rgba(var(--primary-color-rgb), ${Math.min(t.opacity + 0.15, 0.4)})`, v = "rgba(var(--primary-color-rgb), 0.3)") : t.variant === "ghost" && (g = "transparent", v = "transparent", t.active && (g = `rgba(var(--glass-bg-rgb), ${t.opacity})`, v = "rgba(var(--glass-border-rgb), 0.15)")), {
128
129
  position: "absolute",
129
130
  top: 0,
130
131
  left: 0,
131
132
  right: 0,
132
133
  bottom: 0,
133
- background: v,
134
- border: a.variant === "ghost" && !a.active ? "none" : `1px solid ${y}`,
135
- backdropFilter: c,
136
- "-webkit-backdrop-filter": c,
137
- filter: G,
134
+ background: g,
135
+ border: t.variant === "ghost" && !t.active ? "none" : `1px solid ${v}`,
136
+ backdropFilter: i,
137
+ "-webkit-backdrop-filter": i,
138
+ filter: _,
138
139
  // SVG filters on the colored surface
139
140
  pointerEvents: "none",
140
141
  zIndex: 1,
141
142
  borderRadius: "inherit",
142
143
  transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
143
144
  };
144
- }), p = f(() => {
145
- const e = a.shadow;
145
+ }), C = f(() => {
146
+ const e = t.shadow;
146
147
  return e === "mist" || e === "deep" ? "cm-shadow-mist" : e === "reflex" || e === !0 ? "cm-shadow-reflex" : "";
147
148
  });
148
- return (e, r) => (d(), h("button", {
149
- class: $(["cm-btn", [
150
- `cm-btn-${a.variant}`,
151
- { "cm-btn-active": a.active },
152
- { "cm-btn-glow": a.glow },
153
- p.value
149
+ return (e, r) => (l(), m("button", {
150
+ class: w(["cm-btn", [
151
+ `cm-btn-${t.variant}`,
152
+ { "cm-btn-active": t.active },
153
+ { "cm-btn-glow": t.glow },
154
+ C.value
154
155
  ]]),
155
- style: C(s.value),
156
- onClick: r[0] || (r[0] = (l) => e.$emit("click", l))
156
+ style: x(o.value),
157
+ onClick: r[0] || (r[0] = (d) => e.$emit("click", d))
157
158
  }, [
158
159
  b("div", {
159
160
  class: "cm-btn-surface",
160
- style: C(i.value)
161
+ style: x(c.value)
161
162
  }, null, 4),
162
- b("div", I, [
163
- m(e.$slots, "default")
163
+ b("div", O, [
164
+ p(e.$slots, "default")
164
165
  ])
165
166
  ], 6));
166
167
  }
167
- });
168
- /**
169
- * @license lucide-vue-next v0.477.0 - ISC
170
- *
171
- * This source code is licensed under the ISC license.
172
- * See the LICENSE file in the root directory of this source tree.
173
- */
174
- const q = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
175
- /**
176
- * @license lucide-vue-next v0.477.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */
181
- var w = {
182
- xmlns: "http://www.w3.org/2000/svg",
183
- width: 24,
184
- height: 24,
185
- viewBox: "0 0 24 24",
186
- fill: "none",
187
- stroke: "currentColor",
188
- "stroke-width": 2,
189
- "stroke-linecap": "round",
190
- "stroke-linejoin": "round"
191
- };
192
- /**
193
- * @license lucide-vue-next v0.477.0 - ISC
194
- *
195
- * This source code is licensed under the ISC license.
196
- * See the LICENSE file in the root directory of this source tree.
197
- */
198
- const E = ({ size: t, strokeWidth: o = 2, absoluteStrokeWidth: a, color: s, iconNode: n, name: i, class: p, ...e }, { slots: r }) => x(
199
- "svg",
200
- {
201
- ...w,
202
- width: t || w.width,
203
- height: t || w.height,
204
- stroke: s || w.stroke,
205
- "stroke-width": a ? Number(o) * 24 / Number(t) : o,
206
- class: ["lucide", `lucide-${q(i ?? "icon")}`],
207
- ...e
208
- },
209
- [...n.map((l) => x(...l)), ...r.default ? [r.default()] : []]
210
- );
211
- /**
212
- * @license lucide-vue-next v0.477.0 - ISC
213
- *
214
- * This source code is licensed under the ISC license.
215
- * See the LICENSE file in the root directory of this source tree.
216
- */
217
- const z = (t, o) => (a, { slots: s }) => x(
218
- E,
219
- {
220
- ...a,
221
- iconNode: o,
222
- name: t
223
- },
224
- s
225
- );
226
- /**
227
- * @license lucide-vue-next v0.477.0 - ISC
228
- *
229
- * This source code is licensed under the ISC license.
230
- * See the LICENSE file in the root directory of this source tree.
231
- */
232
- const A = z("CheckIcon", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]), P = { class: "cm-checkbox-wrapper" }, K = ["checked", "disabled"], Z = { class: "cm-checkbox-box" }, H = {
168
+ }), E = { class: "cm-checkbox-wrapper" }, L = ["checked", "disabled"], z = { class: "cm-checkbox-box" }, I = {
233
169
  key: 0,
234
170
  class: "cm-checkbox-label"
235
- }, J = /* @__PURE__ */ S({
171
+ }, P = /* @__PURE__ */ k({
236
172
  __name: "CmCheckbox",
237
173
  props: {
238
174
  modelValue: { type: Boolean, default: !1 },
239
175
  disabled: { type: Boolean, default: !1 }
240
176
  },
241
177
  emits: ["update:modelValue", "change"],
242
- setup(t, { emit: o }) {
243
- const a = o, s = (n) => {
244
- const i = n.target;
245
- a("update:modelValue", i.checked), a("change", i.checked);
178
+ setup(a, { emit: s }) {
179
+ const t = s, o = (n) => {
180
+ const c = n.target;
181
+ t("update:modelValue", c.checked), t("change", c.checked);
246
182
  };
247
- return (n, i) => (d(), h("label", {
248
- class: $(["cm-checkbox-container", { disabled: t.disabled }])
183
+ return (n, c) => (l(), m("label", {
184
+ class: w(["cm-checkbox-container", { disabled: a.disabled }])
249
185
  }, [
250
- b("div", P, [
186
+ b("div", E, [
251
187
  b("input", {
252
188
  type: "checkbox",
253
- checked: t.modelValue,
254
- onChange: s,
255
- disabled: t.disabled
256
- }, null, 40, K),
257
- b("div", Z, [
258
- t.modelValue ? (d(), B(M(A), {
189
+ checked: a.modelValue,
190
+ onChange: o,
191
+ disabled: a.disabled
192
+ }, null, 40, L),
193
+ b("div", z, [
194
+ a.modelValue ? (l(), S(V(T), {
259
195
  key: 0,
260
196
  class: "cm-checkbox-icon"
261
- })) : k("", !0)
197
+ })) : y("", !0)
262
198
  ])
263
199
  ]),
264
- n.$slots.default ? (d(), h("span", H, [
265
- m(n.$slots, "default", {}, void 0, !0)
266
- ])) : k("", !0)
200
+ n.$slots.default ? (l(), m("span", I, [
201
+ p(n.$slots, "default", {}, void 0, !0)
202
+ ])) : y("", !0)
267
203
  ], 2));
268
204
  }
269
- }), D = (t, o) => {
270
- const a = t.__vccOpts || t;
271
- for (const [s, n] of o)
272
- a[s] = n;
273
- return a;
274
- }, Q = /* @__PURE__ */ D(J, [["__scopeId", "data-v-d47cd0ab"]]), X = {}, Y = {
205
+ }), B = (a, s) => {
206
+ const t = a.__vccOpts || a;
207
+ for (const [o, n] of s)
208
+ t[o] = n;
209
+ return t;
210
+ }, A = /* @__PURE__ */ B(P, [["__scopeId", "data-v-d47cd0ab"]]), H = {}, J = {
275
211
  class: "cm-glass-filters",
276
212
  "aria-hidden": "true",
277
213
  focusable: "false"
278
214
  };
279
- function W(t, o) {
280
- return d(), h("svg", Y, [...o[0] || (o[0] = [
281
- T('<filter id="cm-glass-distortion-wavy" x="-10%" y="-10%" width="120%" height="120%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="fractalNoise" baseFrequency="0.003 0.007" numOctaves="1" result="turbulence" data-v-52af4cfb></feTurbulence><feDisplacementMap in="SourceGraphic" in2="turbulence" scale="200" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-frosted" x="-5%" y="-5%" width="110%" height="110%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="fractalNoise" baseFrequency="0.009 0.009" numOctaves="2" seed="92" result="noise" data-v-52af4cfb></feTurbulence><feGaussianBlur in="noise" stdDeviation="0.02" result="blur" data-v-52af4cfb></feGaussianBlur><feDisplacementMap in="SourceGraphic" in2="blur" scale="80" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-grain" x="0%" y="0%" width="100%" height="100%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="fractalNoise" baseFrequency="1.2 1.2" numOctaves="1" seed="9000" result="noise" data-v-52af4cfb></feTurbulence><feGaussianBlur in="noise" stdDeviation="0.1" result="blurred" data-v-52af4cfb></feGaussianBlur><feDisplacementMap in="SourceGraphic" in2="blurred" scale="100" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-ripple" x="-20%" y="-20%" width="140%" height="140%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="turbulence" baseFrequency="0.008" numOctaves="3" result="turbulence" data-v-52af4cfb></feTurbulence><feDisplacementMap in2="turbulence" in="SourceGraphic" scale="155" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-mist" x="-5%" y="-5%" width="110%" height="110%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="turbulence" baseFrequency="0.02" numOctaves="3" result="turbulence" data-v-52af4cfb></feTurbulence><feDisplacementMap in2="turbulence" in="SourceGraphic" scale="30" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter>', 5)
215
+ function K(a, s) {
216
+ return l(), m("svg", J, [...s[0] || (s[0] = [
217
+ F('<filter id="cm-glass-distortion-wavy" x="-10%" y="-10%" width="120%" height="120%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="fractalNoise" baseFrequency="0.003 0.007" numOctaves="1" result="turbulence" data-v-52af4cfb></feTurbulence><feDisplacementMap in="SourceGraphic" in2="turbulence" scale="200" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-frosted" x="-5%" y="-5%" width="110%" height="110%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="fractalNoise" baseFrequency="0.009 0.009" numOctaves="2" seed="92" result="noise" data-v-52af4cfb></feTurbulence><feGaussianBlur in="noise" stdDeviation="0.02" result="blur" data-v-52af4cfb></feGaussianBlur><feDisplacementMap in="SourceGraphic" in2="blur" scale="80" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-grain" x="0%" y="0%" width="100%" height="100%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="fractalNoise" baseFrequency="1.2 1.2" numOctaves="1" seed="9000" result="noise" data-v-52af4cfb></feTurbulence><feGaussianBlur in="noise" stdDeviation="0.1" result="blurred" data-v-52af4cfb></feGaussianBlur><feDisplacementMap in="SourceGraphic" in2="blurred" scale="100" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-ripple" x="-20%" y="-20%" width="140%" height="140%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="turbulence" baseFrequency="0.008" numOctaves="3" result="turbulence" data-v-52af4cfb></feTurbulence><feDisplacementMap in2="turbulence" in="SourceGraphic" scale="155" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-mist" x="-5%" y="-5%" width="110%" height="110%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="turbulence" baseFrequency="0.02" numOctaves="3" result="turbulence" data-v-52af4cfb></feTurbulence><feDisplacementMap in2="turbulence" in="SourceGraphic" scale="30" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter>', 5)
282
218
  ])]);
283
219
  }
284
- const ee = /* @__PURE__ */ D(X, [["render", W], ["__scopeId", "data-v-52af4cfb"]]), ae = {
285
- install(t) {
286
- t.component("CmCard", L), t.component("CmButton", O), t.component("CmCheckbox", Q), t.component("CmFilters", ee);
220
+ const Q = /* @__PURE__ */ B(H, [["render", K], ["__scopeId", "data-v-52af4cfb"]]), Y = {
221
+ install(a) {
222
+ a.component("CmCard", N), a.component("CmButton", q), a.component("CmCheckbox", A), a.component("CmFilters", Q);
287
223
  }
288
224
  };
289
225
  export {
290
- O as CmButton,
291
- L as CmCard,
292
- Q as CmCheckbox,
293
- ee as CmFilters,
294
- ae as default,
295
- _ as getLicenseStatus
226
+ q as CmButton,
227
+ N as CmCard,
228
+ A as CmCheckbox,
229
+ Q as CmFilters,
230
+ Y as default,
231
+ $ as getLicenseStatus
296
232
  };
@@ -1,26 +1 @@
1
- (function(i,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(i=typeof globalThis<"u"?globalThis:i||self,e(i.LiquidGlassUI={},i.Vue))})(this,(function(i,e){"use strict";let v={isValid:!0,tier:"pro"};const y=()=>v,x={key:0,class:"cm-card-header"},$={class:"cm-card-body"},_={key:1,class:"cm-card-footer"},k=e.defineComponent({__name:"CmCard",props:{type:{default:"none"},blur:{default:void 0},opacity:{default:void 0},brightness:{default:void 0},grain:{type:Boolean,default:!1},distortion:{default:void 0},customClass:{default:""},radius:{default:"16px"},tag:{default:"div"},shadow:{type:[Boolean,String],default:void 0}},setup(o){const a=o,n={"glass-frost":{blur:0,opacity:0,distortion:"mist",shadow:"reflex"},"light-frost":{blur:5,opacity:.08,distortion:"frosted"},"heavy-frost":{blur:24,opacity:0,distortion:"frosted"},"grain-frost":{blur:4,opacity:0,distortion:"grain"},"fine-frost":{blur:7,opacity:0,distortion:"mist",shadow:"reflex"},"soft-mist":{blur:20,opacity:0,distortion:"none",brightness:2,shadow:"mist"},crystal:{blur:10,opacity:.08,distortion:"none"},"deep-velvet":{blur:60,opacity:.2,distortion:"none"},frosted:{blur:20,opacity:.12,distortion:"frosted"},glass:{blur:0,opacity:1,distortion:"none"},none:{blur:15,opacity:.1,distortion:"none"}},r=e.computed(()=>{const t=n[a.type]||n.none,d=y().isValid?a.distortion??t.distortion:"none";return{blur:a.blur??t.blur,opacity:a.opacity??t.opacity,brightness:a.brightness??t.brightness,distortion:d,shadow:a.shadow??t.shadow}}),l=t=>!t||t==="none"?"":`url(#cm-glass-distortion-${t})`,c=e.computed(()=>{const t=r.value.shadow;return t==="mist"||t==="deep"?"cm-shadow-mist":t==="reflex"||t===!0?"cm-shadow-reflex":""}),m=e.computed(()=>{const t=[],s=typeof r.value.blur=="string"?parseFloat(r.value.blur):r.value.blur;s&&s>0&&t.push(`blur(${s}px)`),r.value.brightness&&t.push(`brightness(${r.value.brightness})`);const d=l(r.value.distortion);d&&t.push(d);const p=t.join(" ");let f;const u=r.value.shadow;return typeof u=="string"&&u!=="mist"&&u!=="reflex"&&u!=="deep"&&(f=u),{backdropFilter:p,"-webkit-backdrop-filter":p,background:`rgba(var(--glass-bg-rgb), ${r.value.opacity})`,borderRadius:a.radius,boxShadow:f,"-webkit-box-shadow":f}});return(t,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{class:e.normalizeClass(["cm-card",[{"cm-card-grain":o.grain},`cm-distortion-${r.value.distortion}`,`cm-type-${o.type}`,c.value,o.customClass]]),style:e.normalizeStyle(m.value)},{default:e.withCtx(()=>[t.$slots.header?(e.openBlock(),e.createElementBlock("div",x,[e.renderSlot(t.$slots,"header")])):e.createCommentVNode("",!0),e.createElementVNode("div",$,[e.renderSlot(t.$slots,"default")]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",_,[e.renderSlot(t.$slots,"footer")])):e.createCommentVNode("",!0)]),_:3},8,["class","style"]))}}),V={class:"cm-btn-content"},C=e.defineComponent({__name:"CmButton",props:{variant:{default:"default"},active:{type:Boolean,default:!1},glow:{type:Boolean,default:!1},blur:{default:12},opacity:{default:.12},distortion:{default:"none"},shadow:{type:[Boolean,String],default:"none"}},emits:["click"],setup(o,{emit:a}){const n=o,r=e.computed(()=>({background:"none",border:"none",outline:"none",boxShadow:"none"})),l=t=>!t||t==="none"?"":`url(#cm-glass-distortion-${t})`,c=e.computed(()=>{const t=[],s=[];n.blur>0&&t.push(`blur(${n.blur}px)`);const p=y().isValid?n.distortion:"none",f=l(p);f&&s.push(f);const u=t.join(" "),I=s.join(" ");let h=`rgba(var(--glass-bg-rgb), ${n.opacity})`,g="rgba(var(--glass-border-rgb), 0.15)";return n.variant==="primary"?(h=`rgba(var(--primary-color-rgb), ${Math.min(n.opacity+.15,.4)})`,g="rgba(var(--primary-color-rgb), 0.3)"):n.variant==="ghost"&&(h="transparent",g="transparent",n.active&&(h=`rgba(var(--glass-bg-rgb), ${n.opacity})`,g="rgba(var(--glass-border-rgb), 0.15)")),{position:"absolute",top:0,left:0,right:0,bottom:0,background:h,border:n.variant==="ghost"&&!n.active?"none":`1px solid ${g}`,backdropFilter:u,"-webkit-backdrop-filter":u,filter:I,pointerEvents:"none",zIndex:1,borderRadius:"inherit",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"}}),m=e.computed(()=>{const t=n.shadow;return t==="mist"||t==="deep"?"cm-shadow-mist":t==="reflex"||t===!0?"cm-shadow-reflex":""});return(t,s)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["cm-btn",[`cm-btn-${n.variant}`,{"cm-btn-active":n.active},{"cm-btn-glow":n.glow},m.value]]),style:e.normalizeStyle(r.value),onClick:s[0]||(s[0]=d=>t.$emit("click",d))},[e.createElementVNode("div",{class:"cm-btn-surface",style:e.normalizeStyle(c.value)},null,4),e.createElementVNode("div",V,[e.renderSlot(t.$slots,"default")])],6))}});/**
2
- * @license lucide-vue-next v0.477.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const N=o=>o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
7
- * @license lucide-vue-next v0.477.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */var b={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
12
- * @license lucide-vue-next v0.477.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const D=({size:o,strokeWidth:a=2,absoluteStrokeWidth:n,color:r,iconNode:l,name:c,class:m,...t},{slots:s})=>e.h("svg",{...b,width:o||b.width,height:o||b.height,stroke:r||b.stroke,"stroke-width":n?Number(a)*24/Number(o):a,class:["lucide",`lucide-${N(c??"icon")}`],...t},[...l.map(d=>e.h(...d)),...s.default?[s.default()]:[]]);/**
17
- * @license lucide-vue-next v0.477.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const E=(o,a)=>(n,{slots:r})=>e.h(D,{...n,iconNode:a,name:o},r);/**
22
- * @license lucide-vue-next v0.477.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const G=E("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),T={class:"cm-checkbox-wrapper"},F=["checked","disabled"],M={class:"cm-checkbox-box"},j={key:0,class:"cm-checkbox-label"},U=e.defineComponent({__name:"CmCheckbox",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(o,{emit:a}){const n=a,r=l=>{const c=l.target;n("update:modelValue",c.checked),n("change",c.checked)};return(l,c)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["cm-checkbox-container",{disabled:o.disabled}])},[e.createElementVNode("div",T,[e.createElementVNode("input",{type:"checkbox",checked:o.modelValue,onChange:r,disabled:o.disabled},null,40,F),e.createElementVNode("div",M,[o.modelValue?(e.openBlock(),e.createBlock(e.unref(G),{key:0,class:"cm-checkbox-icon"})):e.createCommentVNode("",!0)])]),l.$slots.default?(e.openBlock(),e.createElementBlock("span",j,[e.renderSlot(l.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)],2))}}),w=(o,a)=>{const n=o.__vccOpts||o;for(const[r,l]of a)n[r]=l;return n},B=w(U,[["__scopeId","data-v-d47cd0ab"]]),L={},R={class:"cm-glass-filters","aria-hidden":"true",focusable:"false"};function q(o,a){return e.openBlock(),e.createElementBlock("svg",R,[...a[0]||(a[0]=[e.createStaticVNode('<filter id="cm-glass-distortion-wavy" x="-10%" y="-10%" width="120%" height="120%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="fractalNoise" baseFrequency="0.003 0.007" numOctaves="1" result="turbulence" data-v-52af4cfb></feTurbulence><feDisplacementMap in="SourceGraphic" in2="turbulence" scale="200" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-frosted" x="-5%" y="-5%" width="110%" height="110%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="fractalNoise" baseFrequency="0.009 0.009" numOctaves="2" seed="92" result="noise" data-v-52af4cfb></feTurbulence><feGaussianBlur in="noise" stdDeviation="0.02" result="blur" data-v-52af4cfb></feGaussianBlur><feDisplacementMap in="SourceGraphic" in2="blur" scale="80" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-grain" x="0%" y="0%" width="100%" height="100%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="fractalNoise" baseFrequency="1.2 1.2" numOctaves="1" seed="9000" result="noise" data-v-52af4cfb></feTurbulence><feGaussianBlur in="noise" stdDeviation="0.1" result="blurred" data-v-52af4cfb></feGaussianBlur><feDisplacementMap in="SourceGraphic" in2="blurred" scale="100" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-ripple" x="-20%" y="-20%" width="140%" height="140%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="turbulence" baseFrequency="0.008" numOctaves="3" result="turbulence" data-v-52af4cfb></feTurbulence><feDisplacementMap in2="turbulence" in="SourceGraphic" scale="155" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-mist" x="-5%" y="-5%" width="110%" height="110%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="turbulence" baseFrequency="0.02" numOctaves="3" result="turbulence" data-v-52af4cfb></feTurbulence><feDisplacementMap in2="turbulence" in="SourceGraphic" scale="30" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter>',5)])])}const S=w(L,[["render",q],["__scopeId","data-v-52af4cfb"]]),z={install(o){o.component("CmCard",k),o.component("CmButton",C),o.component("CmCheckbox",B),o.component("CmFilters",S)}};i.CmButton=C,i.CmCard=k,i.CmCheckbox=B,i.CmFilters=S,i.default=z,i.getLicenseStatus=y,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(s,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lucide-vue-next")):typeof define=="function"&&define.amd?define(["exports","vue","lucide-vue-next"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.LiquidGlassUI={},s.Vue,s.LucideVueNext))})(this,(function(s,e,B){"use strict";let x={isValid:!0,tier:"pro"};const h=()=>x,w={key:0,class:"cm-card-header"},$={class:"cm-card-body"},_={key:1,class:"cm-card-footer"},y=e.defineComponent({__name:"CmCard",props:{type:{default:"none"},blur:{default:void 0},opacity:{default:void 0},brightness:{default:void 0},grain:{type:Boolean,default:!1},distortion:{default:void 0},customClass:{default:""},radius:{default:"16px"},tag:{default:"div"},shadow:{type:[Boolean,String],default:void 0}},setup(n){const r=n,o={"glass-frost":{blur:0,opacity:0,distortion:"mist",shadow:"reflex"},"light-frost":{blur:5,opacity:.08,distortion:"frosted"},"heavy-frost":{blur:24,opacity:0,distortion:"frosted"},"grain-frost":{blur:4,opacity:0,distortion:"grain"},"fine-frost":{blur:7,opacity:0,distortion:"mist",shadow:"reflex"},"soft-mist":{blur:20,opacity:0,distortion:"none",brightness:2,shadow:"mist"},crystal:{blur:10,opacity:.08,distortion:"none"},"deep-velvet":{blur:60,opacity:.2,distortion:"none"},frosted:{blur:20,opacity:.12,distortion:"frosted"},glass:{blur:0,opacity:1,distortion:"none"},none:{blur:15,opacity:.1,distortion:"none"}},a=e.computed(()=>{const t=o[r.type]||o.none,u=h().isValid?r.distortion??t.distortion:"none";return{blur:r.blur??t.blur,opacity:r.opacity??t.opacity,brightness:r.brightness??t.brightness,distortion:u,shadow:r.shadow??t.shadow}}),l=t=>!t||t==="none"?"":`url(#cm-glass-distortion-${t})`,d=e.computed(()=>{const t=a.value.shadow;return t==="mist"||t==="deep"?"cm-shadow-mist":t==="reflex"||t===!0?"cm-shadow-reflex":""}),g=e.computed(()=>{const t=[],i=typeof a.value.blur=="string"?parseFloat(a.value.blur):a.value.blur;i&&i>0&&t.push(`blur(${i}px)`),a.value.brightness&&t.push(`brightness(${a.value.brightness})`);const u=l(a.value.distortion);u&&t.push(u);const b=t.join(" ");let f;const c=a.value.shadow;return typeof c=="string"&&c!=="mist"&&c!=="reflex"&&c!=="deep"&&(f=c),{backdropFilter:b,"-webkit-backdrop-filter":b,background:`rgba(var(--glass-bg-rgb), ${a.value.opacity})`,borderRadius:r.radius,boxShadow:f,"-webkit-box-shadow":f}});return(t,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.tag),{class:e.normalizeClass(["cm-card",[{"cm-card-grain":n.grain},`cm-distortion-${a.value.distortion}`,`cm-type-${n.type}`,d.value,n.customClass]]),style:e.normalizeStyle(g.value)},{default:e.withCtx(()=>[t.$slots.header?(e.openBlock(),e.createElementBlock("div",w,[e.renderSlot(t.$slots,"header")])):e.createCommentVNode("",!0),e.createElementVNode("div",$,[e.renderSlot(t.$slots,"default")]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",_,[e.renderSlot(t.$slots,"footer")])):e.createCommentVNode("",!0)]),_:3},8,["class","style"]))}}),V={class:"cm-btn-content"},k=e.defineComponent({__name:"CmButton",props:{variant:{default:"default"},active:{type:Boolean,default:!1},glow:{type:Boolean,default:!1},blur:{default:12},opacity:{default:.12},distortion:{default:"none"},shadow:{type:[Boolean,String],default:"none"}},emits:["click"],setup(n,{emit:r}){const o=n,a=e.computed(()=>({background:"none",border:"none",outline:"none",boxShadow:"none"})),l=t=>!t||t==="none"?"":`url(#cm-glass-distortion-${t})`,d=e.computed(()=>{const t=[],i=[];o.blur>0&&t.push(`blur(${o.blur}px)`);const b=h().isValid?o.distortion:"none",f=l(b);f&&i.push(f);const c=t.join(" "),q=i.join(" ");let m=`rgba(var(--glass-bg-rgb), ${o.opacity})`,p="rgba(var(--glass-border-rgb), 0.15)";return o.variant==="primary"?(m=`rgba(var(--primary-color-rgb), ${Math.min(o.opacity+.15,.4)})`,p="rgba(var(--primary-color-rgb), 0.3)"):o.variant==="ghost"&&(m="transparent",p="transparent",o.active&&(m=`rgba(var(--glass-bg-rgb), ${o.opacity})`,p="rgba(var(--glass-border-rgb), 0.15)")),{position:"absolute",top:0,left:0,right:0,bottom:0,background:m,border:o.variant==="ghost"&&!o.active?"none":`1px solid ${p}`,backdropFilter:c,"-webkit-backdrop-filter":c,filter:q,pointerEvents:"none",zIndex:1,borderRadius:"inherit",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"}}),g=e.computed(()=>{const t=o.shadow;return t==="mist"||t==="deep"?"cm-shadow-mist":t==="reflex"||t===!0?"cm-shadow-reflex":""});return(t,i)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["cm-btn",[`cm-btn-${o.variant}`,{"cm-btn-active":o.active},{"cm-btn-glow":o.glow},g.value]]),style:e.normalizeStyle(a.value),onClick:i[0]||(i[0]=u=>t.$emit("click",u))},[e.createElementVNode("div",{class:"cm-btn-surface",style:e.normalizeStyle(d.value)},null,4),e.createElementVNode("div",V,[e.renderSlot(t.$slots,"default")])],6))}}),D={class:"cm-checkbox-wrapper"},E=["checked","disabled"],G={class:"cm-checkbox-box"},N={key:0,class:"cm-checkbox-label"},T=e.defineComponent({__name:"CmCheckbox",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(n,{emit:r}){const o=r,a=l=>{const d=l.target;o("update:modelValue",d.checked),o("change",d.checked)};return(l,d)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["cm-checkbox-container",{disabled:n.disabled}])},[e.createElementVNode("div",D,[e.createElementVNode("input",{type:"checkbox",checked:n.modelValue,onChange:a,disabled:n.disabled},null,40,E),e.createElementVNode("div",G,[n.modelValue?(e.openBlock(),e.createBlock(e.unref(B.Check),{key:0,class:"cm-checkbox-icon"})):e.createCommentVNode("",!0)])]),l.$slots.default?(e.openBlock(),e.createElementBlock("span",N,[e.renderSlot(l.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)],2))}}),C=(n,r)=>{const o=n.__vccOpts||n;for(const[a,l]of r)o[a]=l;return o},v=C(T,[["__scopeId","data-v-d47cd0ab"]]),F={},M={class:"cm-glass-filters","aria-hidden":"true",focusable:"false"};function j(n,r){return e.openBlock(),e.createElementBlock("svg",M,[...r[0]||(r[0]=[e.createStaticVNode('<filter id="cm-glass-distortion-wavy" x="-10%" y="-10%" width="120%" height="120%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="fractalNoise" baseFrequency="0.003 0.007" numOctaves="1" result="turbulence" data-v-52af4cfb></feTurbulence><feDisplacementMap in="SourceGraphic" in2="turbulence" scale="200" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-frosted" x="-5%" y="-5%" width="110%" height="110%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="fractalNoise" baseFrequency="0.009 0.009" numOctaves="2" seed="92" result="noise" data-v-52af4cfb></feTurbulence><feGaussianBlur in="noise" stdDeviation="0.02" result="blur" data-v-52af4cfb></feGaussianBlur><feDisplacementMap in="SourceGraphic" in2="blur" scale="80" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-grain" x="0%" y="0%" width="100%" height="100%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="fractalNoise" baseFrequency="1.2 1.2" numOctaves="1" seed="9000" result="noise" data-v-52af4cfb></feTurbulence><feGaussianBlur in="noise" stdDeviation="0.1" result="blurred" data-v-52af4cfb></feGaussianBlur><feDisplacementMap in="SourceGraphic" in2="blurred" scale="100" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-ripple" x="-20%" y="-20%" width="140%" height="140%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="turbulence" baseFrequency="0.008" numOctaves="3" result="turbulence" data-v-52af4cfb></feTurbulence><feDisplacementMap in2="turbulence" in="SourceGraphic" scale="155" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter><filter id="cm-glass-distortion-mist" x="-5%" y="-5%" width="110%" height="110%" filterUnits="objectBoundingBox" data-v-52af4cfb><feTurbulence type="turbulence" baseFrequency="0.02" numOctaves="3" result="turbulence" data-v-52af4cfb></feTurbulence><feDisplacementMap in2="turbulence" in="SourceGraphic" scale="30" xChannelSelector="R" yChannelSelector="G" data-v-52af4cfb></feDisplacementMap></filter>',5)])])}const S=C(F,[["render",j],["__scopeId","data-v-52af4cfb"]]),U={install(n){n.component("CmCard",y),n.component("CmButton",k),n.component("CmCheckbox",v),n.component("CmFilters",S)}};s.CmButton=k,s.CmCard=y,s.CmCheckbox=v,s.CmFilters=S,s.default=U,s.getLicenseStatus=h,Object.defineProperties(s,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glass-studio-ui-pro",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -24,18 +24,24 @@
24
24
  "default": "./dist/style.css"
25
25
  }
26
26
  },
27
+ "typesVersions": {
28
+ "*": {
29
+ "styles": ["./dist/styles.d.ts"]
30
+ }
31
+ },
27
32
  "scripts": {
28
33
  "dev": "vite",
29
34
  "build": "vue-tsc && vite build",
30
35
  "preview": "vite preview"
31
36
  },
32
37
  "peerDependencies": {
33
- "vue": "^3.3.0"
38
+ "vue": "^3.3.0",
39
+ "lucide-vue-next": ">=0.400.0"
34
40
  },
35
41
  "dependencies": {
36
- "lucide-vue-next": "^0.477.0"
37
42
  },
38
43
  "devDependencies": {
44
+ "lucide-vue-next": "^0.477.0",
39
45
  "@types/node": "^22.0.0",
40
46
  "@vitejs/plugin-vue": "^5.2.1",
41
47
  "@vue/tsconfig": "^0.7.0",