@vibes.diy/use-vibes-base 0.18.27-dev → 0.19.0-dev-simpler
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/contexts/VibeContext.d.ts +0 -4
- package/contexts/VibeContext.js +4 -22
- package/contexts/VibeContext.js.map +1 -1
- package/index.d.ts +3 -24
- package/index.js +7 -24
- package/index.js.map +1 -1
- package/package.json +12 -19
- package/clerk-token-strategy.d.ts +0 -26
- package/clerk-token-strategy.js +0 -65
- package/clerk-token-strategy.js.map +0 -1
- package/components/BrutalistCard/BrutalistCard.d.ts +0 -10
- package/components/BrutalistCard/BrutalistCard.js +0 -15
- package/components/BrutalistCard/BrutalistCard.js.map +0 -1
- package/components/BrutalistCard/BrutalistCard.styles.d.ts +0 -4
- package/components/BrutalistCard/BrutalistCard.styles.js +0 -73
- package/components/BrutalistCard/BrutalistCard.styles.js.map +0 -1
- package/components/BrutalistCard/index.d.ts +0 -3
- package/components/BrutalistCard/index.js +0 -2
- package/components/BrutalistCard/index.js.map +0 -1
- package/components/HiddenMenuWrapper/HiddenMenuWrapper.d.ts +0 -8
- package/components/HiddenMenuWrapper/HiddenMenuWrapper.js +0 -181
- package/components/HiddenMenuWrapper/HiddenMenuWrapper.js.map +0 -1
- package/components/HiddenMenuWrapper/HiddenMenuWrapper.styles.d.ts +0 -31
- package/components/HiddenMenuWrapper/HiddenMenuWrapper.styles.js +0 -112
- package/components/HiddenMenuWrapper/HiddenMenuWrapper.styles.js.map +0 -1
- package/components/LabelContainer/LabelContainer.d.ts +0 -9
- package/components/LabelContainer/LabelContainer.js +0 -10
- package/components/LabelContainer/LabelContainer.js.map +0 -1
- package/components/LabelContainer/LabelContainer.styles.d.ts +0 -7
- package/components/LabelContainer/LabelContainer.styles.js +0 -159
- package/components/LabelContainer/LabelContainer.styles.js.map +0 -1
- package/components/LabelContainer/index.d.ts +0 -2
- package/components/LabelContainer/index.js +0 -2
- package/components/LabelContainer/index.js.map +0 -1
- package/components/VibeControl.d.ts +0 -13
- package/components/VibeControl.js +0 -74
- package/components/VibeControl.js.map +0 -1
- package/components/VibesButton/VibesButton.d.ts +0 -18
- package/components/VibesButton/VibesButton.js +0 -47
- package/components/VibesButton/VibesButton.js.map +0 -1
- package/components/VibesButton/VibesButton.styles.d.ts +0 -7
- package/components/VibesButton/VibesButton.styles.js +0 -98
- package/components/VibesButton/VibesButton.styles.js.map +0 -1
- package/components/VibesButton/index.d.ts +0 -1
- package/components/VibesButton/index.js +0 -2
- package/components/VibesButton/index.js.map +0 -1
- package/components/VibesPanel.d.ts +0 -9
- package/components/VibesPanel.js +0 -97
- package/components/VibesPanel.js.map +0 -1
- package/components/VibesPanel.styles.d.ts +0 -14
- package/components/VibesPanel.styles.js +0 -137
- package/components/VibesPanel.styles.js.map +0 -1
- package/components/VibesSwitch/VibesSwitch.d.ts +0 -9
- package/components/VibesSwitch/VibesSwitch.js +0 -68
- package/components/VibesSwitch/VibesSwitch.js.map +0 -1
- package/components/VibesSwitch/VibesSwitch.styles.d.ts +0 -4
- package/components/VibesSwitch/VibesSwitch.styles.js +0 -5
- package/components/VibesSwitch/VibesSwitch.styles.js.map +0 -1
- package/components/icons/BackIcon.d.ts +0 -9
- package/components/icons/BackIcon.js +0 -7
- package/components/icons/BackIcon.js.map +0 -1
- package/components/icons/InviteIcon.d.ts +0 -9
- package/components/icons/InviteIcon.js +0 -7
- package/components/icons/InviteIcon.js.map +0 -1
- package/components/icons/LoginIcon.d.ts +0 -9
- package/components/icons/LoginIcon.js +0 -7
- package/components/icons/LoginIcon.js.map +0 -1
- package/components/icons/RemixIcon.d.ts +0 -9
- package/components/icons/RemixIcon.js +0 -7
- package/components/icons/RemixIcon.js.map +0 -1
- package/components/icons/SettingsIcon.d.ts +0 -9
- package/components/icons/SettingsIcon.js +0 -7
- package/components/icons/SettingsIcon.js.map +0 -1
- package/components/icons/index.d.ts +0 -5
- package/components/icons/index.js +0 -6
- package/components/icons/index.js.map +0 -1
- package/mounting/index.d.ts +0 -4
- package/mounting/index.js +0 -4
- package/mounting/index.js.map +0 -1
- package/mounting/mountVibeCode.d.ts +0 -15
- package/mounting/mountVibeCode.js +0 -66
- package/mounting/mountVibeCode.js.map +0 -1
- package/mounting/mountVibeWithCleanup.d.ts +0 -1
- package/mounting/mountVibeWithCleanup.js +0 -55
- package/mounting/mountVibeWithCleanup.js.map +0 -1
- package/mounting/types.d.ts +0 -10
- package/mounting/types.js +0 -7
- package/mounting/types.js.map +0 -1
- package/stories/VibeControl.stories.d.ts +0 -13
- package/stories/VibeControl.stories.js +0 -195
- package/stories/VibeControl.stories.js.map +0 -1
- package/styles/colors.css +0 -198
- package/vibe-app-mount.d.ts +0 -13
- package/vibe-app-mount.js +0 -39
- package/vibe-app-mount.js.map +0 -1
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useState, useEffect, useLayoutEffect } from 'react';
|
|
2
|
-
import { getWrapperStyle, getMenuStyle, getContentWrapperStyle, getContentStyle, getToggleButtonStyle, getInnerContentWrapperStyle, } from './HiddenMenuWrapper.styles.js';
|
|
3
|
-
import { VibesSwitch } from '../VibesSwitch/VibesSwitch.js';
|
|
4
|
-
export function HiddenMenuWrapper({ children, menuContent, triggerBounce, showVibesSwitch = true, }) {
|
|
5
|
-
const [menuOpen, setMenuOpen] = useState(false);
|
|
6
|
-
const [menuHeight, setMenuHeight] = useState(0);
|
|
7
|
-
const menuRef = useRef(null);
|
|
8
|
-
const buttonRef = useRef(null);
|
|
9
|
-
const menuContainerRef = useRef(null);
|
|
10
|
-
const rafIdRef = useRef(null);
|
|
11
|
-
const cancelRef = useRef(null);
|
|
12
|
-
const [isBouncing, setIsBouncing] = useState(false);
|
|
13
|
-
const [hasBouncedOnMount, setHasBouncedOnMount] = useState(false);
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
if (!hasBouncedOnMount && !menuOpen) {
|
|
16
|
-
const prefersReducedMotion = window.matchMedia?.('(prefers-reduced-motion: reduce)')?.matches || false;
|
|
17
|
-
if (!prefersReducedMotion) {
|
|
18
|
-
setIsBouncing(true);
|
|
19
|
-
setTimeout(() => setIsBouncing(false), 800);
|
|
20
|
-
}
|
|
21
|
-
setHasBouncedOnMount(true);
|
|
22
|
-
}
|
|
23
|
-
}, [hasBouncedOnMount, menuOpen]);
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
const styleId = 'vibes-drop-to-close-keyframes';
|
|
26
|
-
const existingStyle = document.getElementById(styleId);
|
|
27
|
-
if (!existingStyle) {
|
|
28
|
-
const style = document.createElement('style');
|
|
29
|
-
style.id = styleId;
|
|
30
|
-
style.textContent = `
|
|
31
|
-
@keyframes vibes-drop-to-close {
|
|
32
|
-
0% { transform: translateY(-400px); } /* Start pushed up */
|
|
33
|
-
10% { transform: translateY(0); } /* First big drop */
|
|
34
|
-
25% { transform: translateY(-175px); } /* First bounce back up */
|
|
35
|
-
35% { transform: translateY(0); } /* Second drop */
|
|
36
|
-
48% { transform: translateY(-75px); } /* Second bounce back up */
|
|
37
|
-
62% { transform: translateY(0); } /* Third drop */
|
|
38
|
-
72% { transform: translateY(-25px); } /* Third bounce back up */
|
|
39
|
-
80% { transform: translateY(0); } /* Fourth drop - faster */
|
|
40
|
-
82% { transform: translateY(-10px); } /* Fourth bounce back up - much faster */
|
|
41
|
-
88% { transform: translateY(0); } /* Fifth drop */
|
|
42
|
-
91% { transform: translateY(-5px); } /* Final tiny bounce back up */
|
|
43
|
-
95% { transform: translateY(0); } /* Final settle */
|
|
44
|
-
100% { transform: translateY(0); }
|
|
45
|
-
}
|
|
46
|
-
`;
|
|
47
|
-
document.head.appendChild(style);
|
|
48
|
-
}
|
|
49
|
-
}, []);
|
|
50
|
-
useEffect(() => {
|
|
51
|
-
if (triggerBounce) {
|
|
52
|
-
setIsBouncing(true);
|
|
53
|
-
const timeout = setTimeout(() => setIsBouncing(false), 800);
|
|
54
|
-
return () => clearTimeout(timeout);
|
|
55
|
-
}
|
|
56
|
-
}, [triggerBounce]);
|
|
57
|
-
useEffect(() => {
|
|
58
|
-
if (menuRef.current) {
|
|
59
|
-
const next = menuRef.current.offsetHeight;
|
|
60
|
-
setMenuHeight((prev) => (prev !== next ? next : prev));
|
|
61
|
-
}
|
|
62
|
-
}, [menuContent]);
|
|
63
|
-
useEffect(() => {
|
|
64
|
-
const handleKeyDown = (e) => {
|
|
65
|
-
if (e.key === 'Escape' && menuOpen) {
|
|
66
|
-
setMenuOpen(false);
|
|
67
|
-
buttonRef.current?.focus();
|
|
68
|
-
}
|
|
69
|
-
if (menuOpen && e.key === 'Tab' && menuContainerRef.current) {
|
|
70
|
-
const focusableElements = menuContainerRef.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
71
|
-
const first = focusableElements[0];
|
|
72
|
-
const last = focusableElements[focusableElements.length - 1];
|
|
73
|
-
if (!first || !last)
|
|
74
|
-
return;
|
|
75
|
-
if (e.shiftKey) {
|
|
76
|
-
if (document.activeElement === first) {
|
|
77
|
-
e.preventDefault();
|
|
78
|
-
last.focus();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
if (document.activeElement === last) {
|
|
83
|
-
e.preventDefault();
|
|
84
|
-
first.focus();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
90
|
-
return () => document.removeEventListener('keydown', handleKeyDown);
|
|
91
|
-
}, [menuOpen]);
|
|
92
|
-
useEffect(() => {
|
|
93
|
-
if (menuOpen) {
|
|
94
|
-
const firstFocusable = menuRef.current?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
95
|
-
firstFocusable?.focus();
|
|
96
|
-
}
|
|
97
|
-
}, [menuOpen]);
|
|
98
|
-
const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
|
|
99
|
-
useIsomorphicLayoutEffect(() => {
|
|
100
|
-
const menuEl = menuRef.current;
|
|
101
|
-
if (!menuEl)
|
|
102
|
-
return;
|
|
103
|
-
const scheduleSetHeight = (h) => {
|
|
104
|
-
if (rafIdRef.current != null && cancelRef.current) {
|
|
105
|
-
cancelRef.current(rafIdRef.current);
|
|
106
|
-
rafIdRef.current = null;
|
|
107
|
-
}
|
|
108
|
-
const run = () => setMenuHeight((prev) => (prev !== h ? h : prev));
|
|
109
|
-
if (typeof requestAnimationFrame !== 'undefined') {
|
|
110
|
-
const id = requestAnimationFrame(() => run());
|
|
111
|
-
rafIdRef.current = id;
|
|
112
|
-
cancelRef.current = (cancelId) => cancelAnimationFrame(cancelId);
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
const id = setTimeout(run, 0);
|
|
116
|
-
rafIdRef.current = id;
|
|
117
|
-
cancelRef.current = (cancelId) => clearTimeout(cancelId);
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
scheduleSetHeight(menuEl.offsetHeight);
|
|
121
|
-
if (typeof window.ResizeObserver !==
|
|
122
|
-
'undefined') {
|
|
123
|
-
const RO = window.ResizeObserver;
|
|
124
|
-
const resizeObserver = new RO(() => {
|
|
125
|
-
scheduleSetHeight(menuEl.offsetHeight);
|
|
126
|
-
});
|
|
127
|
-
resizeObserver.observe(menuEl);
|
|
128
|
-
return () => {
|
|
129
|
-
resizeObserver.disconnect();
|
|
130
|
-
if (rafIdRef.current != null && cancelRef.current) {
|
|
131
|
-
cancelRef.current(rafIdRef.current);
|
|
132
|
-
rafIdRef.current = null;
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
const mutationObserver = new MutationObserver(() => {
|
|
137
|
-
scheduleSetHeight(menuEl.offsetHeight);
|
|
138
|
-
});
|
|
139
|
-
mutationObserver.observe(menuEl, { childList: true, subtree: true });
|
|
140
|
-
const onResize = () => scheduleSetHeight(menuEl.offsetHeight);
|
|
141
|
-
window.addEventListener('resize', onResize);
|
|
142
|
-
window.addEventListener('orientationchange', onResize);
|
|
143
|
-
return () => {
|
|
144
|
-
mutationObserver.disconnect();
|
|
145
|
-
window.removeEventListener('resize', onResize);
|
|
146
|
-
window.removeEventListener('orientationchange', onResize);
|
|
147
|
-
if (rafIdRef.current != null && cancelRef.current) {
|
|
148
|
-
cancelRef.current(rafIdRef.current);
|
|
149
|
-
rafIdRef.current = null;
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
}, []);
|
|
153
|
-
useEffect(() => {
|
|
154
|
-
const menuEl = menuRef.current;
|
|
155
|
-
if (!menuEl)
|
|
156
|
-
return;
|
|
157
|
-
const defer = (cb) => {
|
|
158
|
-
if (typeof queueMicrotask === 'function') {
|
|
159
|
-
queueMicrotask(cb);
|
|
160
|
-
}
|
|
161
|
-
else if (typeof requestAnimationFrame !== 'undefined') {
|
|
162
|
-
requestAnimationFrame(cb);
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
setTimeout(cb, 0);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
defer(() => {
|
|
169
|
-
const next = menuEl.offsetHeight;
|
|
170
|
-
setMenuHeight((prev) => (prev !== next ? next : prev));
|
|
171
|
-
});
|
|
172
|
-
}, [menuOpen]);
|
|
173
|
-
return (React.createElement("div", { style: getWrapperStyle() },
|
|
174
|
-
React.createElement("div", { id: "hidden-menu", role: "dialog", "aria-modal": "true", "aria-label": "Hidden menu", "aria-hidden": !menuOpen, ref: menuRef, style: getMenuStyle() }, menuContent),
|
|
175
|
-
React.createElement("div", { style: getContentWrapperStyle(menuHeight, menuOpen, isBouncing), ref: menuContainerRef },
|
|
176
|
-
React.createElement("div", { style: getInnerContentWrapperStyle(menuOpen) },
|
|
177
|
-
React.createElement("div", { style: getContentStyle() }, children))),
|
|
178
|
-
showVibesSwitch && (React.createElement("button", { "aria-haspopup": "dialog", "aria-expanded": menuOpen, "aria-controls": "hidden-menu", ref: buttonRef, onClick: () => setMenuOpen(!menuOpen), style: getToggleButtonStyle() },
|
|
179
|
-
React.createElement(VibesSwitch, { size: 80 })))));
|
|
180
|
-
}
|
|
181
|
-
//# sourceMappingURL=HiddenMenuWrapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HiddenMenuWrapper.js","sourceRoot":"","sources":["../../../jsr/components/HiddenMenuWrapper/HiddenMenuWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAS5D,MAAM,UAAU,iBAAiB,CAAC,EAChC,QAAQ,EACR,WAAW,EACX,aAAa,EACb,eAAe,GAAG,IAAI,GACC,EAAE;IACzB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAClD,MAAM,gBAAgB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEtD,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC9C,MAAM,SAAS,GAAG,MAAM,CAAiC,IAAI,CAAC,CAAC;IAE/D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAGlE,SAAS,CAAC,GAAG,E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export declare const hiddenMenuTheme: {
|
|
3
|
-
colors: {
|
|
4
|
-
menuBg: string;
|
|
5
|
-
menuText: string;
|
|
6
|
-
contentBg: string;
|
|
7
|
-
shadow: string;
|
|
8
|
-
gridLineColor: string;
|
|
9
|
-
};
|
|
10
|
-
zIndex: {
|
|
11
|
-
menu: number;
|
|
12
|
-
content: number;
|
|
13
|
-
toggle: number;
|
|
14
|
-
};
|
|
15
|
-
dimensions: {
|
|
16
|
-
gridSize: string;
|
|
17
|
-
padding: string;
|
|
18
|
-
bottomOffset: string;
|
|
19
|
-
};
|
|
20
|
-
animation: {
|
|
21
|
-
duration: string;
|
|
22
|
-
easing: string;
|
|
23
|
-
blurAmount: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export declare const getWrapperStyle: () => CSSProperties;
|
|
27
|
-
export declare const getMenuStyle: () => CSSProperties;
|
|
28
|
-
export declare const getContentStyle: () => CSSProperties;
|
|
29
|
-
export declare const getContentWrapperStyle: (menuHeight: number, menuOpen: boolean, isBouncing: boolean) => CSSProperties;
|
|
30
|
-
export declare const getInnerContentWrapperStyle: (menuOpen: boolean) => CSSProperties;
|
|
31
|
-
export declare const getToggleButtonStyle: () => CSSProperties;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
if (typeof document !== 'undefined') {
|
|
2
|
-
const styleId = 'hidden-menu-wrapper-vars';
|
|
3
|
-
if (!document.getElementById(styleId)) {
|
|
4
|
-
const style = document.createElement('style');
|
|
5
|
-
style.id = styleId;
|
|
6
|
-
style.textContent = `
|
|
7
|
-
:root {
|
|
8
|
-
--hm-menu-bg: var(--vibes-gray-lightest);
|
|
9
|
-
--hm-menu-text: var(--vibes-white);
|
|
10
|
-
--hm-content-bg: #1e1e1e;
|
|
11
|
-
--hm-shadow: rgba(0, 0, 0, 0.3);
|
|
12
|
-
--hm-grid-line: rgba(255, 255, 255, 0.5);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@media (prefers-color-scheme: dark) {
|
|
16
|
-
:root {
|
|
17
|
-
--hm-menu-bg: #2a2a2a;
|
|
18
|
-
--hm-menu-text: var(--vibes-gray-ultralight);
|
|
19
|
-
--hm-content-bg: var(--vibes-near-black);
|
|
20
|
-
--hm-shadow: rgba(255, 255, 255, 0.1);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
document.head.appendChild(style);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
export const hiddenMenuTheme = {
|
|
28
|
-
colors: {
|
|
29
|
-
menuBg: 'var(--hm-menu-bg, var(--vibes-gray-lightest))',
|
|
30
|
-
menuText: 'var(--hm-menu-text, var(--vibes-white))',
|
|
31
|
-
contentBg: 'var(--hm-content-bg, #1e1e1e)',
|
|
32
|
-
shadow: 'var(--hm-shadow, rgba(0, 0, 0, 0.3))',
|
|
33
|
-
gridLineColor: 'var(--hm-grid-line, rgba(255, 255, 255, 0.5))',
|
|
34
|
-
},
|
|
35
|
-
zIndex: {
|
|
36
|
-
menu: 5,
|
|
37
|
-
content: 10,
|
|
38
|
-
toggle: 20,
|
|
39
|
-
},
|
|
40
|
-
dimensions: {
|
|
41
|
-
gridSize: '40px',
|
|
42
|
-
padding: '24px',
|
|
43
|
-
bottomOffset: '16px',
|
|
44
|
-
},
|
|
45
|
-
animation: {
|
|
46
|
-
duration: '0.4s',
|
|
47
|
-
easing: 'ease',
|
|
48
|
-
blurAmount: '4px',
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
export const getWrapperStyle = () => ({
|
|
52
|
-
position: 'relative',
|
|
53
|
-
overflow: 'hidden',
|
|
54
|
-
});
|
|
55
|
-
export const getMenuStyle = () => ({
|
|
56
|
-
position: 'fixed',
|
|
57
|
-
bottom: 0,
|
|
58
|
-
left: 0,
|
|
59
|
-
right: 0,
|
|
60
|
-
zIndex: hiddenMenuTheme.zIndex.menu,
|
|
61
|
-
color: hiddenMenuTheme.colors.menuText,
|
|
62
|
-
padding: hiddenMenuTheme.dimensions.padding,
|
|
63
|
-
boxShadow: `0 -2px 10px ${hiddenMenuTheme.colors.shadow}`,
|
|
64
|
-
backgroundColor: hiddenMenuTheme.colors.menuBg,
|
|
65
|
-
backgroundImage: `
|
|
66
|
-
linear-gradient(${hiddenMenuTheme.colors.gridLineColor} 1px, transparent 1px),
|
|
67
|
-
linear-gradient(90deg, ${hiddenMenuTheme.colors.gridLineColor} 1px, transparent 1px)
|
|
68
|
-
`,
|
|
69
|
-
backgroundSize: hiddenMenuTheme.dimensions.gridSize + ' ' + hiddenMenuTheme.dimensions.gridSize,
|
|
70
|
-
});
|
|
71
|
-
export const getContentStyle = () => ({
|
|
72
|
-
filter: 'none',
|
|
73
|
-
width: '100%',
|
|
74
|
-
height: '100%',
|
|
75
|
-
});
|
|
76
|
-
export const getContentWrapperStyle = (menuHeight, menuOpen, isBouncing) => ({
|
|
77
|
-
position: 'fixed',
|
|
78
|
-
top: 0,
|
|
79
|
-
left: 0,
|
|
80
|
-
right: 0,
|
|
81
|
-
bottom: 0,
|
|
82
|
-
zIndex: hiddenMenuTheme.zIndex.content,
|
|
83
|
-
transition: isBouncing
|
|
84
|
-
? `filter 0.3s ${hiddenMenuTheme.animation.easing}`
|
|
85
|
-
: `transform ${hiddenMenuTheme.animation.duration} ${hiddenMenuTheme.animation.easing}, filter 0.3s ${hiddenMenuTheme.animation.easing}`,
|
|
86
|
-
transform: menuOpen ? `translateY(-${menuHeight}px)` : 'translateY(0)',
|
|
87
|
-
overflowY: 'auto',
|
|
88
|
-
borderTopColor: hiddenMenuTheme.colors.menuBg,
|
|
89
|
-
borderTopWidth: '1px',
|
|
90
|
-
borderTopStyle: 'solid',
|
|
91
|
-
boxShadow: `0 -2px 10px ${hiddenMenuTheme.colors.shadow}`,
|
|
92
|
-
backgroundColor: hiddenMenuTheme.colors.contentBg,
|
|
93
|
-
animation: isBouncing
|
|
94
|
-
? 'vibes-drop-to-close 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94)'
|
|
95
|
-
: undefined,
|
|
96
|
-
willChange: isBouncing ? 'transform' : undefined,
|
|
97
|
-
});
|
|
98
|
-
export const getInnerContentWrapperStyle = (menuOpen) => ({
|
|
99
|
-
filter: menuOpen ? `blur(${hiddenMenuTheme.animation.blurAmount})` : 'none',
|
|
100
|
-
width: '100%',
|
|
101
|
-
height: '100%',
|
|
102
|
-
});
|
|
103
|
-
export const getToggleButtonStyle = () => ({
|
|
104
|
-
position: 'fixed',
|
|
105
|
-
bottom: hiddenMenuTheme.dimensions.bottomOffset,
|
|
106
|
-
right: 0,
|
|
107
|
-
zIndex: hiddenMenuTheme.zIndex.toggle,
|
|
108
|
-
backgroundColor: 'transparent',
|
|
109
|
-
border: 'none',
|
|
110
|
-
cursor: 'pointer',
|
|
111
|
-
});
|
|
112
|
-
//# sourceMappingURL=HiddenMenuWrapper.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HiddenMenuWrapper.styles.js","sourceRoot":"","sources":["../../../jsr/components/HiddenMenuWrapper/HiddenMenuWrapper.styles.ts"],"names":[],"mappings":"AAoBA,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;IACpC,MAAM,OAAO,GAAG,0BAA0B,CAAC;IAC3C,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9C,KAAK,CAAC,EAAE,GAAG,OAAO,CAAC;QACnB,KAAK,CAAC,WAAW,GAAG;;;;;;;;;;;;;;;;;KAiBnB,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;AACH,CAAC;AAGD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE;QACN,MAAM,EAAE,+CAA+C;QACvD,QAAQ,EAAE,yCAAyC;QACnD,SAAS,EAAE,+BAA+B;QAC1C,MAA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C;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAkB,EAAE,CAAC,CAAC;IACxD,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,eAAe,CAAC,UAAU,CAAC,YAAY;IAC/C,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM;IACrC,eAAe,EAAE,aAAa;IAC9B,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,SAAS;CAClB,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface LabelContainerProps {
|
|
3
|
-
label?: string;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
style?: React.CSSProperties;
|
|
6
|
-
className?: string;
|
|
7
|
-
disappear?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function LabelContainer({ label, children, style, className, disappear }: LabelContainerProps): React.JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { getResponsiveContainerStyle, getResponsiveLabelStyle, getResponsiveButtonWrapperStyle, } from './LabelContainer.styles.js';
|
|
3
|
-
import { useMobile } from '../../hooks/useMobile.js';
|
|
4
|
-
export function LabelContainer({ label, children, style, className, disappear = false, }) {
|
|
5
|
-
const isMobile = useMobile();
|
|
6
|
-
return (React.createElement("div", { style: { ...getResponsiveContainerStyle(isMobile), ...style }, className: className },
|
|
7
|
-
label && React.createElement("div", { style: getResponsiveLabelStyle(isMobile, disappear) }, label),
|
|
8
|
-
React.createElement("div", { style: getResponsiveButtonWrapperStyle(isMobile, disappear) }, children)));
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=LabelContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LabelContainer.js","sourceRoot":"","sources":["../../../jsr/components/LabelContainer/LabelContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAqBrD,MAAM,UAAU,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,SAAS,GAAG,KAAK,GACG,EAAE;IACtB,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAE7B,OAAO,CACL,6BAAK,KAAK,EAAE,EAAE,GAAG,2BAA2B,CAAC,QAAQ,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS;QACrF,KAAK,IAAI,6BAAK,KAAK,EAAE,uBAAuB,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAG,KAAK,CAAO;QACjF,6BAAK,KAAK,EAAE,+BAA+B,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAG,QAAQ,CAAO,CAC9E,CACP,CAAC;AAAA,CACH"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
export declare function getContainerStyle(): React.CSSProperties;
|
|
3
|
-
export declare function getLabelStyle(): React.CSSProperties;
|
|
4
|
-
export declare function getButtonWrapperStyle(): React.CSSProperties;
|
|
5
|
-
export declare function getResponsiveLabelStyle(isMobile: boolean, disappear?: boolean): React.CSSProperties;
|
|
6
|
-
export declare function getResponsiveButtonWrapperStyle(isMobile: boolean, disappear?: boolean): React.CSSProperties;
|
|
7
|
-
export declare function getResponsiveContainerStyle(isMobile: boolean): React.CSSProperties;
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
export function getContainerStyle() {
|
|
2
|
-
return {
|
|
3
|
-
position: 'relative',
|
|
4
|
-
display: 'inline-flex',
|
|
5
|
-
alignItems: 'stretch',
|
|
6
|
-
width: 'auto',
|
|
7
|
-
marginBottom: '40px',
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export function getLabelStyle() {
|
|
11
|
-
return {
|
|
12
|
-
background: 'var(--vibes-card-bg)',
|
|
13
|
-
border: '2px solid var(--vibes-card-border)',
|
|
14
|
-
borderLeft: 'none',
|
|
15
|
-
borderTopRightRadius: '8px',
|
|
16
|
-
borderBottomRightRadius: '8px',
|
|
17
|
-
padding: '12px 8px',
|
|
18
|
-
fontWeight: 700,
|
|
19
|
-
fontSize: '14px',
|
|
20
|
-
textTransform: 'uppercase',
|
|
21
|
-
letterSpacing: '1px',
|
|
22
|
-
whiteSpace: 'nowrap',
|
|
23
|
-
color: 'var(--vibes-card-text)',
|
|
24
|
-
writingMode: 'vertical-rl',
|
|
25
|
-
transform: 'rotate(180deg)',
|
|
26
|
-
display: 'flex',
|
|
27
|
-
alignItems: 'center',
|
|
28
|
-
justifyContent: 'center',
|
|
29
|
-
flexShrink: 0,
|
|
30
|
-
margin: '32px 0px',
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export function getButtonWrapperStyle() {
|
|
34
|
-
return {
|
|
35
|
-
background: 'var(--vibes-card-bg)',
|
|
36
|
-
border: '2px solid var(--vibes-card-border)',
|
|
37
|
-
borderRadius: '8px',
|
|
38
|
-
padding: '24px 24px 32px 24px',
|
|
39
|
-
display: 'flex',
|
|
40
|
-
alignItems: 'center',
|
|
41
|
-
justifyContent: 'center',
|
|
42
|
-
width: 'auto',
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
export function getResponsiveLabelStyle(isMobile, disappear = false) {
|
|
46
|
-
if (isMobile) {
|
|
47
|
-
if (disappear) {
|
|
48
|
-
return {
|
|
49
|
-
display: 'none',
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
background: 'var(--vibes-card-bg)',
|
|
54
|
-
border: '2px solid var(--vibes-card-border)',
|
|
55
|
-
borderLeft: '2px solid var(--vibes-card-border)', // Explicitly set to override desktop style
|
|
56
|
-
borderBottom: 'none',
|
|
57
|
-
borderTopLeftRadius: '8px',
|
|
58
|
-
borderTopRightRadius: '8px',
|
|
59
|
-
borderBottomRightRadius: '0', // Explicitly reset desktop radius
|
|
60
|
-
padding: '8px 12px',
|
|
61
|
-
fontWeight: 700,
|
|
62
|
-
fontSize: '14px',
|
|
63
|
-
textTransform: 'uppercase',
|
|
64
|
-
letterSpacing: '1px',
|
|
65
|
-
whiteSpace: 'nowrap',
|
|
66
|
-
color: 'var(--vibes-card-text)',
|
|
67
|
-
writingMode: 'horizontal-tb', // Explicitly reset from vertical-rl
|
|
68
|
-
transform: 'none', // Explicitly reset rotation
|
|
69
|
-
display: 'flex',
|
|
70
|
-
alignItems: 'center',
|
|
71
|
-
justifyContent: 'center',
|
|
72
|
-
flexShrink: 0,
|
|
73
|
-
width: 'calc(100% - 64px)',
|
|
74
|
-
margin: '0px 32px',
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
return {
|
|
78
|
-
background: 'var(--vibes-card-bg)',
|
|
79
|
-
border: '2px solid var(--vibes-card-border)',
|
|
80
|
-
borderLeft: 'none',
|
|
81
|
-
borderBottom: '2px solid var(--vibes-card-border)', // Explicitly set for desktop
|
|
82
|
-
borderTopRightRadius: '8px',
|
|
83
|
-
borderBottomRightRadius: '8px',
|
|
84
|
-
borderTopLeftRadius: '0', // Explicitly set for desktop
|
|
85
|
-
padding: '12px 8px',
|
|
86
|
-
fontWeight: 700,
|
|
87
|
-
fontSize: '14px',
|
|
88
|
-
textTransform: 'uppercase',
|
|
89
|
-
letterSpacing: '1px',
|
|
90
|
-
whiteSpace: 'nowrap',
|
|
91
|
-
color: 'var(--vibes-card-text)',
|
|
92
|
-
writingMode: 'vertical-rl',
|
|
93
|
-
transform: 'rotate(180deg)',
|
|
94
|
-
display: 'flex',
|
|
95
|
-
alignItems: 'center',
|
|
96
|
-
justifyContent: 'center',
|
|
97
|
-
flexShrink: 0,
|
|
98
|
-
margin: '32px 0px',
|
|
99
|
-
width: 'auto',
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
export function getResponsiveButtonWrapperStyle(isMobile, disappear = false) {
|
|
103
|
-
if (isMobile && disappear) {
|
|
104
|
-
return {
|
|
105
|
-
background: 'transparent',
|
|
106
|
-
border: 'none',
|
|
107
|
-
borderRadius: '0', // Explicitly reset
|
|
108
|
-
padding: '0',
|
|
109
|
-
paddingBottom: '24px',
|
|
110
|
-
display: 'flex',
|
|
111
|
-
alignItems: 'center',
|
|
112
|
-
justifyContent: 'center',
|
|
113
|
-
width: 'auto',
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
if (isMobile && !disappear) {
|
|
117
|
-
return {
|
|
118
|
-
background: 'var(--vibes-card-bg)',
|
|
119
|
-
border: '2px solid var(--vibes-card-border)',
|
|
120
|
-
borderRadius: '8px',
|
|
121
|
-
padding: '24px 24px 32px 24px',
|
|
122
|
-
display: 'flex',
|
|
123
|
-
alignItems: 'center',
|
|
124
|
-
justifyContent: 'center',
|
|
125
|
-
width: '100%',
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
return {
|
|
129
|
-
background: 'var(--vibes-card-bg)',
|
|
130
|
-
border: '2px solid var(--vibes-card-border)',
|
|
131
|
-
borderRadius: '8px',
|
|
132
|
-
padding: '24px 24px 32px 24px',
|
|
133
|
-
display: 'flex',
|
|
134
|
-
alignItems: 'center',
|
|
135
|
-
justifyContent: 'center',
|
|
136
|
-
width: 'auto',
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
export function getResponsiveContainerStyle(isMobile) {
|
|
140
|
-
if (isMobile) {
|
|
141
|
-
return {
|
|
142
|
-
position: 'relative',
|
|
143
|
-
display: 'inline-flex',
|
|
144
|
-
alignItems: 'stretch',
|
|
145
|
-
flexDirection: 'column',
|
|
146
|
-
width: '100%',
|
|
147
|
-
marginBottom: '40px',
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
return {
|
|
151
|
-
position: 'relative',
|
|
152
|
-
display: 'inline-flex',
|
|
153
|
-
alignItems: 'stretch',
|
|
154
|
-
flexDirection: 'row', // Explicitly set to override mobile column
|
|
155
|
-
width: 'auto',
|
|
156
|
-
marginBottom: '40px',
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
//# sourceMappingURL=LabelContainer.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LabelContainer.styles.js","sourceRoot":"","sources":["../../../jsr/components/LabelContainer/LabelContainer.styles.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,iBAAiB,GAAwB;IACvD,OAAO;QACL,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,aAAa;QACtB,UAAU,EAAE,SAAS;QACrB,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,MAAM;KACrB,CAAC;AAAA,CACH;AAED,MAAM,UAAU,aAAa,GAAwB;IACnD,OAAO;QACL,UAAU,EAAE,sBAAsB;QAClC,MAAM,EAAE,oCAAoC;QAC5C,UAAU,EAAE,MAAM;QAClB,oBAAoB,EAAE,KAAK;QAC3B,uBAAuB,EAAE,KAAK;QAC9B,OAAO,EAAE,UAAU;QACnB,UAAU,EAAE,GAAG;QACf,QAAQ,EAAE,MAAM;QAChB,aAAa,EAAE,WAAW;QAC1B,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,aAAa;QAC1B,SAAS,EAAE,gBAAgB;QAC3B,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,CAAC;QACb,MAAM,EAAE,UAAU;KACnB,CAAC;AAAA,CACH;AAED,MAAM,UAAU,qBAAqB,GAAwB;IAC3D,OAAO;QACL,UAAU,EAAE,sBAAsB;QAClC,MAAM,EAAE,oCAAoC;QAC5C,YAAY,EAAE,KAAK;QACnB,OAAO,EAAE,qBAAqB;QAC9B,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,KAAK,EAA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;QACb,OAAO;YACL,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,aAAa;YACtB,UAAU,EAAE,SAAS;YACrB,aAAa,EAAE,QAAQ;YACvB,KAAK,EAAE,MAAM;YACb,YAAY,EAAE,MAAM;SACrB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,aAAa;QACtB,UAAU,EAAE,SAAS;QACrB,aAAa,EAAE,KAAK,EAAE,2CAA2C;QACjE,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,MAAM;KACrB,CAAC;AAAA,CACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../jsr/components/LabelContainer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { VibeControlClasses } from '../utils/vibe-control-styles.js';
|
|
3
|
-
export interface VibeControlProps {
|
|
4
|
-
readonly label?: string;
|
|
5
|
-
readonly position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
6
|
-
readonly onOpen?: () => void;
|
|
7
|
-
readonly onClose?: () => void;
|
|
8
|
-
readonly children?: React.ReactNode;
|
|
9
|
-
readonly classes?: VibeControlClasses;
|
|
10
|
-
readonly visible?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare function VibeControl({ label, position, onOpen, onClose, children, classes, visible }: VibeControlProps): React.ReactElement | null;
|
|
13
|
-
export default VibeControl;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as ReactDOM from 'react-dom';
|
|
3
|
-
import { createVibeControlStyles, defaultVibeControlClasses, } from '../utils/vibe-control-styles.js';
|
|
4
|
-
export function VibeControl({ label = 'Open Vibes', position = 'bottom-right', onOpen, onClose, children, classes = defaultVibeControlClasses, visible = true, }) {
|
|
5
|
-
const [isOpen, setIsOpen] = React.useState(false);
|
|
6
|
-
const [isHoveringButton, setIsHoveringButton] = React.useState(false);
|
|
7
|
-
const [isHoveringClose, setIsHoveringClose] = React.useState(false);
|
|
8
|
-
const handleOpen = React.useCallback(() => {
|
|
9
|
-
setIsOpen(true);
|
|
10
|
-
onOpen?.();
|
|
11
|
-
}, [onOpen]);
|
|
12
|
-
const handleClose = React.useCallback(() => {
|
|
13
|
-
setIsOpen(false);
|
|
14
|
-
onClose?.();
|
|
15
|
-
}, [onClose]);
|
|
16
|
-
React.useEffect(() => {
|
|
17
|
-
const handleEscape = (event) => {
|
|
18
|
-
if (event.key === 'Escape' && isOpen) {
|
|
19
|
-
handleClose();
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
if (isOpen) {
|
|
23
|
-
document.addEventListener('keydown', handleEscape);
|
|
24
|
-
document.body.style.overflow = 'hidden';
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
document.body.style.overflow = '';
|
|
28
|
-
}
|
|
29
|
-
return () => {
|
|
30
|
-
document.removeEventListener('keydown', handleEscape);
|
|
31
|
-
document.body.style.overflow = '';
|
|
32
|
-
};
|
|
33
|
-
}, [isOpen, handleClose]);
|
|
34
|
-
const styles = createVibeControlStyles(position);
|
|
35
|
-
const buttonStyles = {
|
|
36
|
-
...styles.button,
|
|
37
|
-
...(isHoveringButton ? styles.buttonHover : {}),
|
|
38
|
-
};
|
|
39
|
-
const closeButtonStyles = {
|
|
40
|
-
...styles.closeButton,
|
|
41
|
-
...(isHoveringClose ? styles.closeButtonHover : {}),
|
|
42
|
-
};
|
|
43
|
-
if (!visible) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
const renderOverlay = () => {
|
|
47
|
-
if (!isOpen)
|
|
48
|
-
return null;
|
|
49
|
-
return ReactDOM.createPortal(React.createElement("div", { style: styles.backdrop, onClick: handleClose, className: classes.backdrop },
|
|
50
|
-
React.createElement("div", { style: styles.overlay, onClick: (e) => e.stopPropagation(), className: classes.overlay },
|
|
51
|
-
React.createElement("h2", { style: styles.overlayTitle, className: classes.overlayTitle }, "Vibe Control"),
|
|
52
|
-
React.createElement("button", { style: closeButtonStyles, onClick: handleClose, onMouseEnter: () => setIsHoveringClose(true), onMouseLeave: () => setIsHoveringClose(false), className: classes.closeButton, "aria-label": "Close overlay" }, "\u00D7"),
|
|
53
|
-
React.createElement("div", { style: styles.content, className: classes.content }, children || (React.createElement("div", null,
|
|
54
|
-
React.createElement("p", null, "Welcome to Vibe Control!"),
|
|
55
|
-
React.createElement("p", null, "This is the default content. You can customize this by passing children to the VibeControl component."),
|
|
56
|
-
React.createElement("div", { style: {
|
|
57
|
-
marginTop: '20px',
|
|
58
|
-
padding: '16px',
|
|
59
|
-
backgroundColor: '#f5f5f5',
|
|
60
|
-
borderRadius: '8px',
|
|
61
|
-
} },
|
|
62
|
-
React.createElement("h3", { style: { margin: '0 0 8px 0' } }, "Example Features:"),
|
|
63
|
-
React.createElement("ul", { style: { margin: 0, paddingLeft: '20px' } },
|
|
64
|
-
React.createElement("li", null, "Theme customization"),
|
|
65
|
-
React.createElement("li", null, "Settings management"),
|
|
66
|
-
React.createElement("li", null, "Component controls"),
|
|
67
|
-
React.createElement("li", null, "Debug information")))))))), document.body);
|
|
68
|
-
};
|
|
69
|
-
return (React.createElement(React.Fragment, null,
|
|
70
|
-
React.createElement("button", { style: buttonStyles, onClick: handleOpen, onMouseEnter: () => setIsHoveringButton(true), onMouseLeave: () => setIsHoveringButton(false), className: classes.button, "aria-label": label }, label),
|
|
71
|
-
renderOverlay()));
|
|
72
|
-
}
|
|
73
|
-
export default VibeControl;
|
|
74
|
-
//# sourceMappingURL=VibeControl.js.map
|