@bobbykim/manguito-theme 0.28.3 → 1.0.0
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.
- package/CHANGELOG.md +60 -0
- package/README.md +175 -1
- package/dist/composable.cjs +1 -1
- package/dist/composable.d.ts +12 -0
- package/dist/composable.js +5 -2
- package/dist/core.cjs +4 -2
- package/dist/core.d.ts +328 -144
- package/dist/core.js +1778 -627
- package/dist/directives.cjs +1 -1
- package/dist/directives.d.ts +27 -24
- package/dist/directives.js +55 -57
- package/dist/{getGlassmorphismClass-CKSrH9Jg.cjs → getGlassmorphismClass-CVLAjoa8.cjs} +1 -1
- package/dist/{getGlassmorphismClass-C-7frTJB.js → getGlassmorphismClass-MdsD9yII.js} +2 -2
- package/dist/index-CYEzkRix.js +703 -0
- package/dist/index-CaGu958U.js +1175 -0
- package/dist/index-D9hDl4no.cjs +2 -0
- package/dist/index-DPCdWvOi.cjs +1 -0
- package/dist/mcl-theme-v4.css +9 -44
- package/dist/useModalScrollLock-BXOUgsHr.js +54 -0
- package/dist/useModalScrollLock-BbvxlEaZ.cjs +1 -0
- package/dist/util.cjs +1 -1
- package/dist/util.js +1 -1
- package/package.json +13 -7
- package/dist/index-CU3f0thH.cjs +0 -1
- package/dist/index-DHpsV8uC.js +0 -95
- package/dist/index-DoK_iF2I.js +0 -1368
- package/dist/index-M2bUcfcK.cjs +0 -1
- package/dist/observeVisible-CPssysCl.cjs +0 -1
- package/dist/observeVisible-CnnM-J1f.js +0 -19
package/dist/directives.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-D9hDl4no.cjs"),a=require("vue"),g=(t,e)=>{if(t.tagName==="A"){const o=t.getAttribute("href");return o?o.charAt(0)==="#"?o.substring(1):o:null}return e||null},v=t=>t?document.getElementById(t):null,p=t=>t.hasAttribute("visible"),u=t=>{const o=t.getAttribute("visible")==="true"?"false":"true";t.setAttribute("visible",o)},m=t=>{const e=`div[accordion="${t}"]`;return Array.from(document.querySelectorAll(e))},A=(t,e)=>{m(e).forEach(r=>{r.id===t.id?u(r):r.getAttribute("visible")==="true"&&r.setAttribute("visible","false")})},C=t=>{u(t)},b=t=>e=>{e.preventDefault();const o=e.target,r=g(o,t),l=v(r);if(!l){console.warn(`[v-collapse] Target element not found: ${r}`);return}if(!p(l)){console.warn(`[v-collapse] Target element missing 'visible' attribute: ${r}`);return}const n=l.getAttribute("accordion");n?A(l,n):C(l)},h={mounted(t,e){t.__HandleToggler=b(e.arg),t.addEventListener("click",t.__HandleToggler)},unmounted(t){t.__HandleToggler&&(t.removeEventListener("click",t.__HandleToggler),delete t.__HandleToggler)}},H=t=>e=>{e.preventDefault();const o=e.target,r=g(o,t),l=v(r);if(!l){console.warn(`[v-toggle] Target element not found: ${r}`);return}if(!p(l)){console.warn(`[v-toggle] Target element mission visible 'visible' attribute: ${r}`);return}u(l)},k={mounted(t,e){t.__ClickToggleHandler=H(e.arg),t.addEventListener("click",t.__ClickToggleHandler)},unmounted(t){t.__ClickToggleHandler&&(t.removeEventListener("click",t.__ClickToggleHandler),delete t.__ClickToggleHandler)}};let y=0;const s=(t,e,o,r)=>{if(t.hasAttribute(o))return t.getAttribute(o);if(typeof e.value=="object"&&e.value!==null&&r in e.value)return e.value[r]},E=(t,e)=>{if(t.hasAttribute("title"))return t.getAttribute("title")||void 0;if(typeof e.value=="string")return e.value;if(typeof e.value=="object"&&e.value?.title)return e.value.title},I=t=>{const e=Object.keys(t.modifiers);return e.length>0?e[0]:void 0},w=(t,e)=>{t.classList.add("relative","group","overflow-visible"),t.__TooltipId||(t.__TooltipId=`mcl-tooltip-${++y}`);const o=t.__TooltipId,r=E(t,e),l=s(t,e,"color","color"),n=s(t,e,"text-color","textColor"),c=s(t,e,"tooltip-width","width"),i=typeof e.value=="object"?e.value.customClass:void 0,_=I(e),T=a.createVNode(d.tooltip,{id:o,direction:_,content:r,color:l,textColor:n,width:c,customClass:i});a.render(T,t),t.setAttribute("aria-describedby",o)},x=t=>{a.render(null,t),t.removeAttribute("aria-describedby"),delete t.__TooltipId},f={mounted(t,e){t.__HandleTooltip=o=>w(t,o),t.__UnmountTooltip=()=>x(t),t.__HandleTooltip(e)},updated(t,e,o,r){const l=e.value!==e.oldValue;let n=!1;const c=r.dirs?.find(i=>i.dir===f);if(c){const i=c.arg;e.arg!==i&&(n=!0)}(l||n)&&t.__HandleTooltip(e)},unmounted(t){t.__UnmountTooltip()}};exports.vClickOutside=d.vClickOutside;exports.vCollapse=h;exports.vToggle=k;exports.vTooltip=f;
|
package/dist/directives.d.ts
CHANGED
|
@@ -36,8 +36,6 @@ declare interface CollapseElement extends HTMLElement {
|
|
|
36
36
|
|
|
37
37
|
declare type ColorPalette = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'light-1' | 'light-2' | 'light-3' | 'light-4' | 'dark-1' | 'dark-2' | 'dark-3' | 'dark-4' | 'black' | 'white' | 'transparent';
|
|
38
38
|
|
|
39
|
-
export declare const testExport = "pio!";
|
|
40
|
-
|
|
41
39
|
/**
|
|
42
40
|
* Extends HTMLElement to include the custom handler attached by the directive
|
|
43
41
|
*/
|
|
@@ -48,6 +46,7 @@ declare interface ToggleElement extends HTMLElement {
|
|
|
48
46
|
declare interface TooltipElementType extends HTMLElement {
|
|
49
47
|
__HandleTooltip: (binding: DirectiveBinding<TooltipValueType>) => void;
|
|
50
48
|
__UnmountTooltip: () => void;
|
|
49
|
+
__TooltipId?: string;
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
export declare interface TooltipValueObjectType {
|
|
@@ -55,7 +54,7 @@ export declare interface TooltipValueObjectType {
|
|
|
55
54
|
color?: ColorPalette;
|
|
56
55
|
textColor?: ColorPalette;
|
|
57
56
|
width?: number | string;
|
|
58
|
-
|
|
57
|
+
customClass?: string;
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
declare type TooltipValueType = TooltipValueObjectType | string;
|
|
@@ -76,43 +75,47 @@ declare type TooltipValueType = TooltipValueObjectType | string;
|
|
|
76
75
|
export declare const vClickOutside: Directive<ClickOutsideElement, ClickOutsideValue>;
|
|
77
76
|
|
|
78
77
|
/**
|
|
79
|
-
* Vue directive for collapsible elements with accordion support
|
|
78
|
+
* Vue directive for collapsible elements with accordion support.
|
|
80
79
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
80
|
+
* @deprecated `MclCollapseA` and `MclCollapseB` now manage state internally via the
|
|
81
|
+
* `useCollapseState` composable. This directive no longer has any effect on those
|
|
82
|
+
* components and will be removed in a future release.
|
|
83
83
|
*
|
|
84
|
-
*
|
|
84
|
+
* Migrate accordion groups to the `AccordionGroup` wrapper component:
|
|
85
85
|
*
|
|
86
86
|
* @example
|
|
87
|
-
* //
|
|
88
|
-
*
|
|
89
|
-
*
|
|
87
|
+
* // Preferred: AccordionGroup wrapper
|
|
88
|
+
* import { AccordionGroup } from '@bobbykim/manguito-theme'
|
|
89
|
+
* import { MclCollapseA } from '@bobbykim/mcl-collapse'
|
|
90
90
|
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
91
|
+
* <AccordionGroup>
|
|
92
|
+
* <MclCollapseA collapse-id="item1" title="Item 1">...</MclCollapseA>
|
|
93
|
+
* <MclCollapseA collapse-id="item2" title="Item 2">...</MclCollapseA>
|
|
94
|
+
* </AccordionGroup>
|
|
95
95
|
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
96
|
+
* @example
|
|
97
|
+
* // Preferred: standalone collapse (no wrapper needed)
|
|
98
|
+
* <MclCollapseA collapse-id="item1" title="Item 1">...</MclCollapseA>
|
|
98
99
|
*
|
|
99
100
|
*/
|
|
100
101
|
export declare const vCollapse: Directive<CollapseElement>;
|
|
101
102
|
|
|
102
103
|
/**
|
|
103
|
-
* Vue directive for toggling visibility of elements via the 'visible' attribute
|
|
104
|
+
* Vue directive for toggling visibility of elements via the 'visible' attribute.
|
|
104
105
|
*
|
|
105
|
-
*
|
|
106
|
+
* @deprecated Use the `defineExpose` API (`modalRef.open()`, `modalRef.toggle()`) or bind
|
|
107
|
+
* the `:visible` prop directly instead. This directive bypasses Vue's reactivity system
|
|
108
|
+
* and is not SSR-compatible. It will be removed in a future release.
|
|
106
109
|
*
|
|
107
110
|
* @example
|
|
108
|
-
* //
|
|
109
|
-
*
|
|
110
|
-
* <
|
|
111
|
+
* // Preferred: defineExpose ref
|
|
112
|
+
* const modalRef = ref()
|
|
113
|
+
* <button @click="modalRef.open()">Open Modal</button>
|
|
114
|
+
* <Modal ref="modalRef" />
|
|
111
115
|
*
|
|
112
116
|
* @example
|
|
113
|
-
* //
|
|
114
|
-
* <
|
|
115
|
-
* <aside id="mySidebar" visible="false">Sidebar content</aside>
|
|
117
|
+
* // Preferred: visible prop
|
|
118
|
+
* <Modal :visible="isOpen" />
|
|
116
119
|
*
|
|
117
120
|
*/
|
|
118
121
|
export declare const vToggle: Directive<ToggleElement>;
|
package/dist/directives.js
CHANGED
|
@@ -1,117 +1,116 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { v as N } from "./index-
|
|
1
|
+
import { t as _ } from "./index-CYEzkRix.js";
|
|
2
|
+
import { v as N } from "./index-CYEzkRix.js";
|
|
3
3
|
import { createVNode as m, render as u } from "vue";
|
|
4
4
|
const d = (t, e) => {
|
|
5
5
|
if (t.tagName === "A") {
|
|
6
|
-
const
|
|
7
|
-
return
|
|
6
|
+
const o = t.getAttribute("href");
|
|
7
|
+
return o ? o.charAt(0) === "#" ? o.substring(1) : o : null;
|
|
8
8
|
}
|
|
9
9
|
return e || null;
|
|
10
10
|
}, g = (t) => t ? document.getElementById(t) : null, v = (t) => t.hasAttribute("visible"), a = (t) => {
|
|
11
|
-
const
|
|
12
|
-
t.setAttribute("visible",
|
|
11
|
+
const o = t.getAttribute("visible") === "true" ? "false" : "true";
|
|
12
|
+
t.setAttribute("visible", o);
|
|
13
13
|
}, T = (t) => {
|
|
14
14
|
const e = `div[accordion="${t}"]`;
|
|
15
15
|
return Array.from(document.querySelectorAll(e));
|
|
16
|
-
},
|
|
17
|
-
T(e).forEach((
|
|
18
|
-
|
|
16
|
+
}, A = (t, e) => {
|
|
17
|
+
T(e).forEach((r) => {
|
|
18
|
+
r.id === t.id ? a(r) : r.getAttribute("visible") === "true" && r.setAttribute("visible", "false");
|
|
19
19
|
});
|
|
20
|
-
},
|
|
20
|
+
}, C = (t) => {
|
|
21
21
|
a(t);
|
|
22
|
-
},
|
|
22
|
+
}, b = (t) => (e) => {
|
|
23
23
|
e.preventDefault();
|
|
24
|
-
const
|
|
24
|
+
const o = e.target, r = d(o, t), l = g(r);
|
|
25
25
|
if (!l) {
|
|
26
|
-
console.warn(`[v-collapse] Target element not found: ${
|
|
26
|
+
console.warn(`[v-collapse] Target element not found: ${r}`);
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
if (!v(l)) {
|
|
30
30
|
console.warn(
|
|
31
|
-
`[v-collapse] Target element missing 'visible' attribute: ${
|
|
31
|
+
`[v-collapse] Target element missing 'visible' attribute: ${r}`
|
|
32
32
|
);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
const n = l.getAttribute("accordion");
|
|
36
|
-
n ?
|
|
37
|
-
},
|
|
36
|
+
n ? A(l, n) : C(l);
|
|
37
|
+
}, $ = {
|
|
38
38
|
mounted(t, e) {
|
|
39
|
-
t.__HandleToggler =
|
|
39
|
+
t.__HandleToggler = b(e.arg), t.addEventListener("click", t.__HandleToggler);
|
|
40
40
|
},
|
|
41
41
|
unmounted(t) {
|
|
42
42
|
t.__HandleToggler && (t.removeEventListener("click", t.__HandleToggler), delete t.__HandleToggler);
|
|
43
43
|
}
|
|
44
|
-
},
|
|
44
|
+
}, h = (t) => (e) => {
|
|
45
45
|
e.preventDefault();
|
|
46
|
-
const
|
|
46
|
+
const o = e.target, r = d(o, t), l = g(r);
|
|
47
47
|
if (!l) {
|
|
48
|
-
console.warn(`[v-toggle] Target element not found: ${
|
|
48
|
+
console.warn(`[v-toggle] Target element not found: ${r}`);
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
if (!v(l)) {
|
|
52
52
|
console.warn(
|
|
53
|
-
`[v-toggle] Target element mission visible 'visible' attribute: ${
|
|
53
|
+
`[v-toggle] Target element mission visible 'visible' attribute: ${r}`
|
|
54
54
|
);
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
a(l);
|
|
58
|
-
},
|
|
58
|
+
}, D = {
|
|
59
59
|
mounted(t, e) {
|
|
60
|
-
t.__ClickToggleHandler =
|
|
60
|
+
t.__ClickToggleHandler = h(e.arg), t.addEventListener("click", t.__ClickToggleHandler);
|
|
61
61
|
},
|
|
62
62
|
unmounted(t) {
|
|
63
63
|
t.__ClickToggleHandler && (t.removeEventListener("click", t.__ClickToggleHandler), delete t.__ClickToggleHandler);
|
|
64
64
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (
|
|
69
|
-
return
|
|
70
|
-
|
|
65
|
+
};
|
|
66
|
+
let H = 0;
|
|
67
|
+
const s = (t, e, o, r) => {
|
|
68
|
+
if (t.hasAttribute(o))
|
|
69
|
+
return t.getAttribute(o);
|
|
70
|
+
if (typeof e.value == "object" && e.value !== null && r in e.value)
|
|
71
|
+
return e.value[r];
|
|
72
|
+
}, k = (t, e) => {
|
|
71
73
|
if (t.hasAttribute("title"))
|
|
72
74
|
return t.getAttribute("title") || void 0;
|
|
73
75
|
if (typeof e.value == "string")
|
|
74
76
|
return e.value;
|
|
75
77
|
if (typeof e.value == "object" && e.value?.title)
|
|
76
78
|
return e.value.title;
|
|
77
|
-
},
|
|
79
|
+
}, E = (t) => {
|
|
78
80
|
const e = Object.keys(t.modifiers);
|
|
79
81
|
return e.length > 0 ? e[0] : void 0;
|
|
80
|
-
},
|
|
81
|
-
t.classList.add("relative", "group", "overflow-visible");
|
|
82
|
-
const r =
|
|
82
|
+
}, I = (t, e) => {
|
|
83
|
+
t.classList.add("relative", "group", "overflow-visible"), t.__TooltipId || (t.__TooltipId = `mcl-tooltip-${++H}`);
|
|
84
|
+
const o = t.__TooltipId, r = k(t, e), l = s(t, e, "color", "color"), n = s(
|
|
83
85
|
t,
|
|
84
86
|
e,
|
|
85
87
|
"text-color",
|
|
86
88
|
"textColor"
|
|
87
|
-
),
|
|
89
|
+
), c = s(
|
|
88
90
|
t,
|
|
89
91
|
e,
|
|
90
92
|
"tooltip-width",
|
|
91
93
|
"width"
|
|
92
|
-
),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
textColor: l,
|
|
101
|
-
width: n,
|
|
102
|
-
customClass: c
|
|
94
|
+
), i = typeof e.value == "object" ? e.value.customClass : void 0, p = E(e), f = m(_, {
|
|
95
|
+
id: o,
|
|
96
|
+
direction: p,
|
|
97
|
+
content: r,
|
|
98
|
+
color: l,
|
|
99
|
+
textColor: n,
|
|
100
|
+
width: c,
|
|
101
|
+
customClass: i
|
|
103
102
|
});
|
|
104
|
-
u(f, t);
|
|
105
|
-
},
|
|
106
|
-
u(null, t);
|
|
107
|
-
},
|
|
103
|
+
u(f, t), t.setAttribute("aria-describedby", o);
|
|
104
|
+
}, y = (t) => {
|
|
105
|
+
u(null, t), t.removeAttribute("aria-describedby"), delete t.__TooltipId;
|
|
106
|
+
}, w = {
|
|
108
107
|
mounted(t, e) {
|
|
109
|
-
t.__HandleTooltip = (
|
|
108
|
+
t.__HandleTooltip = (o) => I(t, o), t.__UnmountTooltip = () => y(t), t.__HandleTooltip(e);
|
|
110
109
|
},
|
|
111
|
-
updated(t, e,
|
|
110
|
+
updated(t, e, o, r) {
|
|
112
111
|
const l = e.value !== e.oldValue;
|
|
113
112
|
let n = !1;
|
|
114
|
-
const c =
|
|
113
|
+
const c = r.dirs?.find((i) => i.dir === w);
|
|
115
114
|
if (c) {
|
|
116
115
|
const i = c.arg;
|
|
117
116
|
e.arg !== i && (n = !0);
|
|
@@ -121,11 +120,10 @@ const d = (t, e) => {
|
|
|
121
120
|
unmounted(t) {
|
|
122
121
|
t.__UnmountTooltip();
|
|
123
122
|
}
|
|
124
|
-
}
|
|
123
|
+
};
|
|
125
124
|
export {
|
|
126
|
-
I as testExport,
|
|
127
125
|
N as vClickOutside,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
$ as vCollapse,
|
|
127
|
+
D as vToggle,
|
|
128
|
+
w as vTooltip
|
|
131
129
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("vue"),c=require("./index-
|
|
1
|
+
"use strict";const a=require("vue"),c=require("./index-DPCdWvOi.cjs"),t=a.defineComponent({setup(e,{slots:l}){const s=a.ref(!1);return a.onMounted(()=>{s.value=!0}),()=>s.value&&l.default?l.default():null}}),m={xs:"backdrop-blur-xs",sm:"backdrop-blur-sm",md:"backdrop-blur-md",lg:"backdrop-blur-lg",xl:"backdrop-blur-xl"},n={primary:"mcl-glass-primary",secondary:"mcl-glass-secondary",success:"mcl-glass-success",info:"mcl-glass-info",danger:"mcl-glass-danger",warning:"mcl-glass-warning","light-1":"mcl-glass-light-1","light-2":"mcl-glass-light-2","light-3":"mcl-glass-light-3","light-4":"mcl-glass-light-4","dark-1":"mcl-glass-dark-1","dark-2":"mcl-glass-dark-2","dark-3":"mcl-glass-dark-3","dark-4":"mcl-glass-dark-4",black:"mcl-glass-black",white:"mcl-glass-white",transparent:"mcl-glass-transparent"},d={10:"mcl-depth-10",20:"mcl-depth-20",30:"mcl-depth-30",40:"mcl-depth-40",50:"mcl-depth-50",60:"mcl-depth-60",70:"mcl-depth-70",80:"mcl-depth-80",90:"mcl-depth-90",100:"mcl-depth-100"},g=(e,l,s,r=10)=>["mcl-glassmorphism",n[e],m[l],c.generateClass.bgOpacityVariant({opacity:s}),d[r]].filter(Boolean).join(" ");exports.ClientSideRender=t;exports.getGlassmorphismClass=g;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as c, ref as e, onMounted as t } from "vue";
|
|
2
|
-
import { g as m } from "./index-
|
|
2
|
+
import { g as m } from "./index-CaGu958U.js";
|
|
3
3
|
const p = c({
|
|
4
4
|
setup(a, { slots: l }) {
|
|
5
5
|
const s = e(!1);
|
|
@@ -46,7 +46,7 @@ const p = c({
|
|
|
46
46
|
"mcl-glassmorphism",
|
|
47
47
|
d[a],
|
|
48
48
|
g[l],
|
|
49
|
-
m(
|
|
49
|
+
m.bgOpacityVariant({ opacity: s }),
|
|
50
50
|
n[r]
|
|
51
51
|
].filter(Boolean).join(" ");
|
|
52
52
|
export {
|