funuicss 3.9.6 → 3.9.7

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.9.6",
2
+ "version": "3.9.7",
3
3
  "name": "funuicss",
4
4
  "description": "React and Next.js component UI Library for creating Easy and good looking websites with fewer lines of code. Elevate your web development experience with our cutting-edge React/Next.js component UI Library. Craft stunning websites effortlessly, boasting both seamless functionality and aesthetic appeal—all achieved with minimal lines of code. Unleash the power of simplicity and style in your projects!",
5
5
  "main": "index.js",
@@ -112,6 +112,188 @@ function ToolTip(_a) {
112
112
  children && children !== text ? children : null),
113
113
  isBrowser && usePortal && text && isVisible && (0, react_dom_1.createPortal)(React.createElement("div", { className: "tip tip-".concat(tip), style: tooltipStyle }, text), document.body)));
114
114
  }
115
+ // 'use client';
116
+ // import * as React from 'react';
117
+ // import { createPortal } from 'react-dom';
118
+ // interface ToolTipProps {
119
+ // funcss?: string;
120
+ // children?: React.ReactNode;
121
+ // content?: React.ReactNode;
122
+ // message?: React.ReactNode;
123
+ // animation?: string;
124
+ // duration?: number;
125
+ // tip?: 'top' | 'bottom' | 'left' | 'right';
126
+ // usePortal?: boolean;
127
+ // }
128
+ // export default function ToolTip({
129
+ // funcss,
130
+ // children,
131
+ // content,
132
+ // message,
133
+ // animation,
134
+ // duration,
135
+ // tip = 'top',
136
+ // usePortal = true,
137
+ // ...rest
138
+ // }: ToolTipProps) {
139
+ // const [isVisible, setIsVisible] = React.useState(false);
140
+ // const [coords, setCoords] = React.useState({ x: 0, y: 0 });
141
+ // const [isMounted, setIsMounted] = React.useState(false);
142
+ // const triggerRef = React.useRef<HTMLSpanElement>(null);
143
+ // const tooltipRef = React.useRef<HTMLDivElement>(null);
144
+ // const portalContainerRef = React.useRef<HTMLDivElement | null>(null);
145
+ // const text = message || content || children;
146
+ // const updateTooltipPosition = React.useCallback(() => {
147
+ // if (!triggerRef.current || !isMounted) return;
148
+ // const rect = triggerRef.current.getBoundingClientRect();
149
+ // const scrollX = window.scrollX;
150
+ // const scrollY = window.scrollY;
151
+ // let x = rect.left + (rect.width / 2);
152
+ // let y = rect.top;
153
+ // if (tip === 'bottom') {
154
+ // y = rect.bottom;
155
+ // } else if (tip === 'left') {
156
+ // x = rect.left;
157
+ // y = rect.top + (rect.height / 2);
158
+ // } else if (tip === 'right') {
159
+ // x = rect.right;
160
+ // y = rect.top + (rect.height / 2);
161
+ // }
162
+ // setCoords({
163
+ // x: x + scrollX,
164
+ // y: y + scrollY
165
+ // });
166
+ // }, [tip, isMounted]);
167
+ // const handleMouseEnter = () => {
168
+ // if (!isMounted) setIsMounted(true);
169
+ // requestAnimationFrame(() => {
170
+ // updateTooltipPosition();
171
+ // setIsVisible(true);
172
+ // });
173
+ // };
174
+ // const handleMouseLeave = () => {
175
+ // setIsVisible(false);
176
+ // // Don't immediately unmount, let the transition finish
177
+ // setTimeout(() => {
178
+ // if (!isVisible) {
179
+ // setIsMounted(false);
180
+ // }
181
+ // }, 200); // Match the transition duration
182
+ // };
183
+ // // Handle scroll and resize to update position
184
+ // React.useEffect(() => {
185
+ // if (!isVisible || !usePortal || !isMounted) return;
186
+ // const handleScrollResize = () => {
187
+ // updateTooltipPosition();
188
+ // };
189
+ // window.addEventListener('scroll', handleScrollResize, { passive: true });
190
+ // window.addEventListener('resize', handleScrollResize);
191
+ // return () => {
192
+ // window.removeEventListener('scroll', handleScrollResize);
193
+ // window.removeEventListener('resize', handleScrollResize);
194
+ // };
195
+ // }, [isVisible, usePortal, updateTooltipPosition, isMounted]);
196
+ // // Update position when tooltip becomes visible
197
+ // React.useEffect(() => {
198
+ // if (isVisible && usePortal && isMounted) {
199
+ // updateTooltipPosition();
200
+ // }
201
+ // }, [isVisible, usePortal, updateTooltipPosition, isMounted]);
202
+ // // Create a stable portal container
203
+ // React.useEffect(() => {
204
+ // if (usePortal && isMounted && !portalContainerRef.current && typeof document !== 'undefined') {
205
+ // const container = document.createElement('div');
206
+ // container.id = `tooltip-portal-${Date.now()}`;
207
+ // document.body.appendChild(container);
208
+ // portalContainerRef.current = container;
209
+ // }
210
+ // return () => {
211
+ // if (portalContainerRef.current && portalContainerRef.current.parentNode) {
212
+ // portalContainerRef.current.parentNode.removeChild(portalContainerRef.current);
213
+ // }
214
+ // };
215
+ // }, [usePortal, isMounted]);
216
+ // const tooltipStyle: React.CSSProperties = {
217
+ // position: 'fixed',
218
+ // top: `${coords.y}px`,
219
+ // left: `${coords.x}px`,
220
+ // zIndex: 9999,
221
+ // opacity: isVisible ? 1 : 0,
222
+ // transition: 'opacity 0.2s ease',
223
+ // pointerEvents: 'none',
224
+ // transform: tip === 'top' ? 'translate(-50%, -100%)' :
225
+ // tip === 'bottom' ? 'translate(-50%, 0)' :
226
+ // tip === 'left' ? 'translate(-100%, -50%)' :
227
+ // 'translate(0, -50%)',
228
+ // visibility: isVisible ? 'visible' : 'hidden',
229
+ // };
230
+ // const nonPortalTooltipStyle: React.CSSProperties = {
231
+ // position: 'absolute',
232
+ // zIndex: 9999,
233
+ // opacity: isVisible ? 1 : 0,
234
+ // transition: 'opacity 0.2s ease',
235
+ // pointerEvents: 'none',
236
+ // visibility: isVisible ? 'visible' : 'hidden',
237
+ // whiteSpace: 'nowrap',
238
+ // };
239
+ // // Apply positioning for non-portal tooltips
240
+ // if (!usePortal) {
241
+ // if (tip === 'top') {
242
+ // nonPortalTooltipStyle.bottom = '100%';
243
+ // nonPortalTooltipStyle.left = '50%';
244
+ // nonPortalTooltipStyle.transform = 'translateX(-50%)';
245
+ // } else if (tip === 'bottom') {
246
+ // nonPortalTooltipStyle.top = '100%';
247
+ // nonPortalTooltipStyle.left = '50%';
248
+ // nonPortalTooltipStyle.transform = 'translateX(-50%)';
249
+ // } else if (tip === 'left') {
250
+ // nonPortalTooltipStyle.right = '100%';
251
+ // nonPortalTooltipStyle.top = '50%';
252
+ // nonPortalTooltipStyle.transform = 'translateY(-50%)';
253
+ // } else if (tip === 'right') {
254
+ // nonPortalTooltipStyle.left = '100%';
255
+ // nonPortalTooltipStyle.top = '50%';
256
+ // nonPortalTooltipStyle.transform = 'translateY(-50%)';
257
+ // }
258
+ // }
259
+ // // Render portal tooltip
260
+ // let portalTooltip = null;
261
+ // if (typeof document !== 'undefined' && usePortal && isMounted && text && portalContainerRef.current) {
262
+ // portalTooltip = createPortal(
263
+ // <div
264
+ // className={`tip tip-${tip}`}
265
+ // style={tooltipStyle}
266
+ // ref={tooltipRef}
267
+ // >
268
+ // {text}
269
+ // </div>,
270
+ // portalContainerRef.current
271
+ // );
272
+ // }
273
+ // return (
274
+ // <>
275
+ // <span
276
+ // ref={triggerRef}
277
+ // className={`tooltip ${funcss || ''}`}
278
+ // onMouseEnter={handleMouseEnter}
279
+ // onMouseLeave={handleMouseLeave}
280
+ // style={{ position: 'relative', display: 'inline-block' }}
281
+ // {...rest}
282
+ // >
283
+ // {!usePortal && text && (
284
+ // <div
285
+ // className={`tip tip-${tip}`}
286
+ // style={nonPortalTooltipStyle}
287
+ // >
288
+ // {text}
289
+ // </div>
290
+ // )}
291
+ // {children && children !== text ? children : null}
292
+ // </span>
293
+ // {portalTooltip}
294
+ // </>
295
+ // );
296
+ // }
115
297
  // import * as React from 'react';
116
298
  // import Tip from './Tip';
117
299
  // interface ToolTipProps {
@@ -28,6 +28,9 @@ interface VideoProps {
28
28
  loop?: boolean;
29
29
  muted?: boolean;
30
30
  seekAmount?: number;
31
+ preload?: 'none' | 'metadata' | 'auto';
32
+ preloadStrategy?: 'conservative' | 'moderate' | 'aggressive';
33
+ bufferThreshold?: number;
31
34
  funcss?: string;
32
35
  containerCss?: string;
33
36
  videoCss?: string;
@@ -47,5 +50,5 @@ interface VideoProps {
47
50
  volumeStyle?: 'slider' | 'compact' | 'hover';
48
51
  variant?: string;
49
52
  }
50
- export default function Video({ src, poster, onDuration, onEnded, isPause, spacebarPlay, className, autoPlay, showControls, showPlayPause, showProgress, showVolume, showTime, showFullscreen, showDownload, showSeekButtons, playIcon, pauseIcon, fullscreenIcon, downloadIcon, volumeIcon, muteIcon, rewindIcon, forwardIcon, hideControlsDelay, loop, muted, seekAmount, funcss, containerCss, videoCss, controlsCss, progressCss, progressBarCss, timeCss, playCss, pauseCss, volumeCss, fullscreenCss, downloadCss, rewindCss, forwardCss, buttonCss, volumeStyle, style, variant, ...rest }: VideoProps): React.JSX.Element;
53
+ export default function Video({ src, poster, onDuration, onEnded, isPause, spacebarPlay, className, autoPlay, showControls, showPlayPause, showProgress, showVolume, showTime, showFullscreen, showDownload, showSeekButtons, playIcon, pauseIcon, fullscreenIcon, downloadIcon, volumeIcon, muteIcon, rewindIcon, forwardIcon, hideControlsDelay, loop, muted, seekAmount, preload, preloadStrategy, bufferThreshold, funcss, containerCss, videoCss, controlsCss, progressCss, progressBarCss, timeCss, playCss, pauseCss, volumeCss, fullscreenCss, downloadCss, rewindCss, forwardCss, buttonCss, volumeStyle, style, variant, ...rest }: VideoProps): React.JSX.Element;
51
54
  export {};