@homecode/ui 5.4.0 → 5.5.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/dist/esm/index.js +1 -0
- package/dist/esm/src/components/Autocomplete/Autocomplete.js +3 -2
- package/dist/esm/src/components/Gallery/Gallery.js +5 -6
- package/dist/esm/src/components/Gallery/Gallery.styl.js +1 -1
- package/dist/esm/src/components/Icon/icons/index.js +2 -0
- package/dist/esm/src/components/Icon/icons/volume.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/volumeOff.svg.js +15 -0
- package/dist/esm/src/components/InputFile/InputFile.js +3 -2
- package/dist/esm/src/components/Slider/Slider.js +53 -10
- package/dist/esm/src/components/Slider/Slider.styl.js +2 -2
- package/dist/esm/src/components/Tabs/Tabs.js +3 -1
- package/dist/esm/src/components/Tooltip/Tooltip.styl.js +1 -1
- package/dist/esm/src/components/Tooltip/TooltipOverTrigger.js +7 -44
- package/dist/esm/src/components/Tooltip/TooltipSimple.js +4 -0
- package/dist/esm/src/components/Tooltip/tooltipTextStyles.js +49 -0
- package/dist/esm/src/components/VideoPlayer/VideoPlayer.helpers.js +82 -0
- package/dist/esm/src/components/VideoPlayer/VideoPlayer.js +348 -0
- package/dist/esm/src/components/VideoPlayer/VideoPlayer.styl.js +7 -0
- package/dist/esm/types/src/components/AssistiveText/AssistiveText.d.ts +1 -1
- package/dist/esm/types/src/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/esm/types/src/components/Button/Button.d.ts +1 -1
- package/dist/esm/types/src/components/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/dist/esm/types/src/components/Calendar/Calendar.d.ts +1 -1
- package/dist/esm/types/src/components/Card/Card.d.ts +7 -7
- package/dist/esm/types/src/components/Chip/Chip.d.ts +1 -1
- package/dist/esm/types/src/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/esm/types/src/components/DatePickerInput/DatePickerInput.d.ts +1 -1
- package/dist/esm/types/src/components/DateTime/DateTime.d.ts +1 -1
- package/dist/esm/types/src/components/Dialogue/Dialogue.d.ts +1 -1
- package/dist/esm/types/src/components/Draggable/Draggable.d.ts +1 -1
- package/dist/esm/types/src/components/DropZone/DropZone.d.ts +1 -1
- package/dist/esm/types/src/components/Expand/Expand.d.ts +1 -1
- package/dist/esm/types/src/components/Flex/Flex.d.ts +1 -1
- package/dist/esm/types/src/components/Form/Form.d.ts +1 -1
- package/dist/esm/types/src/components/Form/SubmitButtons/SubmitButtons.d.ts +1 -1
- package/dist/esm/types/src/components/Gallery/Dots/Dots.d.ts +1 -1
- package/dist/esm/types/src/components/Gallery/Gallery.d.ts +1 -1
- package/dist/esm/types/src/components/Icon/Icon.d.ts +1 -1
- package/dist/esm/types/src/components/Icon/Icon.example.d.ts +1 -1
- package/dist/esm/types/src/components/Icon/icons/index.d.ts +2 -0
- package/dist/esm/types/src/components/InputFile/InputFile.d.ts +3 -3
- package/dist/esm/types/src/components/InputFile/Item/Item.d.ts +1 -1
- package/dist/esm/types/src/components/Label/Label.d.ts +1 -1
- package/dist/esm/types/src/components/LangSelector/LangSelector.d.ts +1 -1
- package/dist/esm/types/src/components/Lazy/Lazy.d.ts +1 -1
- package/dist/esm/types/src/components/LightBox/LightBox.d.ts +1 -1
- package/dist/esm/types/src/components/Notifications/Notifications.d.ts +1 -1
- package/dist/esm/types/src/components/Paranja/Paranja.d.ts +1 -1
- package/dist/esm/types/src/components/Popup/Popup.d.ts +3 -3
- package/dist/esm/types/src/components/PopupMenu/PopupMenu.d.ts +1 -1
- package/dist/esm/types/src/components/Portal/Portal.d.ts +2 -1
- package/dist/esm/types/src/components/Progress/Progress.d.ts +1 -1
- package/dist/esm/types/src/components/ProgressCircular/ProgressCircular.d.ts +1 -1
- package/dist/esm/types/src/components/RequiredStar/RequiredStar.d.ts +1 -1
- package/dist/esm/types/src/components/Router/Link/Link.d.ts +1 -1
- package/dist/esm/types/src/components/Router/Router.d.ts +1 -1
- package/dist/esm/types/src/components/Select/Select.d.ts +9 -9
- package/dist/esm/types/src/components/Select/Select2.d.ts +1 -1
- package/dist/esm/types/src/components/Shimmer/Shimmer.d.ts +1 -1
- package/dist/esm/types/src/components/Slider/Slider.d.ts +1 -1
- package/dist/esm/types/src/components/Slider/Slider.types.d.ts +9 -3
- package/dist/esm/types/src/components/Spinner/Spinner.d.ts +1 -1
- package/dist/esm/types/src/components/Table/Table.d.ts +4 -4
- package/dist/esm/types/src/components/Tabs/Tabs.d.ts +1 -1
- package/dist/esm/types/src/components/Text/Text.d.ts +6 -6
- package/dist/esm/types/src/components/TextShimmer/TextShimmer.d.ts +1 -1
- package/dist/esm/types/src/components/TextWithDeferTooltip/TextWithDeferTooltip.d.ts +1 -1
- package/dist/esm/types/src/components/Theme/Theme.d.ts +1 -1
- package/dist/esm/types/src/components/Theme/ThemeProvider.d.ts +1 -1
- package/dist/esm/types/src/components/Toggle/Toggle.d.ts +1 -1
- package/dist/esm/types/src/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/esm/types/src/components/Tooltip/TooltipCore.d.ts +1 -1
- package/dist/esm/types/src/components/Tooltip/TooltipOverTrigger.d.ts +1 -1
- package/dist/esm/types/src/components/Tooltip/TooltipProvider.d.ts +1 -1
- package/dist/esm/types/src/components/Tooltip/TooltipSimple.d.ts +1 -1
- package/dist/esm/types/src/components/Tooltip/tooltipTextStyles.d.ts +4 -0
- package/dist/esm/types/src/components/VH/VH.d.ts +1 -1
- package/dist/esm/types/src/components/VideoPlayer/VideoPlayer.d.ts +3 -0
- package/dist/esm/types/src/components/VideoPlayer/VideoPlayer.helpers.d.ts +23 -0
- package/dist/esm/types/src/components/VideoPlayer/VideoPlayer.types.d.ts +12 -0
- package/dist/esm/types/src/components/Virtualized/Cards/Cards.d.ts +2 -2
- package/dist/esm/types/src/components/Virtualized/List/List.d.ts +2 -2
- package/dist/esm/types/src/components/Virtualized/List/ListScroll.d.ts +1 -1
- package/dist/esm/types/src/components/Virtualized/Table/Table.d.ts +2 -2
- package/dist/esm/types/src/components/index.d.ts +1 -0
- package/dist/esm/types/src/services/i18n.d.ts +1 -1
- package/dist/esm/types/src/tiptap/slash-mention/SlashSuggestionList.d.ts +1 -1
- package/graphify-out/.graphify_labels.json +6 -11
- package/graphify-out/2026-07-18/.graphify_labels.json +217 -0
- package/graphify-out/2026-07-18/GRAPH_REPORT.md +1007 -0
- package/graphify-out/2026-07-18/cost.json +12 -0
- package/graphify-out/2026-07-18/graph.json +70772 -0
- package/graphify-out/2026-07-18/manifest.json +2342 -0
- package/graphify-out/GRAPH_REPORT.md +193 -221
- package/graphify-out/cache/ast/0d0d438582d5ce7adfc4db8f33ce31428bb9f5f1259e61481276d15876fd9673.json +1 -0
- package/graphify-out/cache/ast/494bb27524c0e6571e692c3092e4526a7d2c362cf8dd879d1ca7fea05e63ce5a.json +1 -0
- package/graphify-out/cache/ast/6315f77346a8bd9fd00e6325e2c9feba16677838f4b1979d65d0bf198afe222e.json +1 -0
- package/graphify-out/cache/ast/7c14f07fe0bd2a58d9b0f18c64bcb4309c22a94ab7d8d0b4816fbab57236cc00.json +1 -0
- package/graphify-out/cache/ast/9fa55f86bff0deafa27fe7f690ea34d0e13429d1a0fd14c464b9fb9ee1265896.json +1 -0
- package/graphify-out/cache/ast/dd4c6a81e7b8e9865855fb84e0c822fc53e30f0f3c90cb4166edc3352fbe04a7.json +1 -0
- package/graphify-out/cache/stat-index.json +1 -1
- package/graphify-out/graph.html +4 -4
- package/graphify-out/graph.json +4884 -3505
- package/graphify-out/manifest.json +118 -53
- package/package.json +6 -3
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useMemo, useState, useCallback, useEffect } from 'react';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import { Button } from '../Button/Button.js';
|
|
5
|
+
import { Icon } from '../Icon/Icon.js';
|
|
6
|
+
import { Popup } from '../Popup/Popup.js';
|
|
7
|
+
import { ProgressCircular } from '../ProgressCircular/ProgressCircular.js';
|
|
8
|
+
import { Slider } from '../Slider/Slider.js';
|
|
9
|
+
import useEvent from '../../hooks/useEvent.js';
|
|
10
|
+
import debounce from '../../tools/debounce.js';
|
|
11
|
+
import S from './VideoPlayer.styl.js';
|
|
12
|
+
import { TIME_PERSIST_DEBOUNCE_MS, saveStorage, formatTime, VOLUME_POPUP_HIDE_MS, clamp, leadingDebounce, isEditableTarget, loadStorage, getBufferedPercent, DOUBLE_TAP_MS, getStorageKey, timeToProgressPct, KEYBOARD_DEBOUNCE_MS, getSeekDelta, VOLUME_STEP } from './VideoPlayer.helpers.js';
|
|
13
|
+
|
|
14
|
+
let activePlayerId = null;
|
|
15
|
+
function VideoPlayer({ src, poster, storageKey, size = 'm', autoPlay = false, muted = false, loop = false, className, onPlayChange, onTimeUpdate, }) {
|
|
16
|
+
const rootRef = useRef(null);
|
|
17
|
+
const videoRef = useRef(null);
|
|
18
|
+
const barRef = useRef(null);
|
|
19
|
+
const progressInputRef = useRef(null);
|
|
20
|
+
const currentTimeLabelRef = useRef(null);
|
|
21
|
+
const isSeekingRef = useRef(false);
|
|
22
|
+
const durationRef = useRef(0);
|
|
23
|
+
const rafRef = useRef(0);
|
|
24
|
+
const volumeKeepOpenRef = useRef(false);
|
|
25
|
+
const volumeHideTimerRef = useRef(0);
|
|
26
|
+
const lastTapRef = useRef(0);
|
|
27
|
+
const singleClickTimerRef = useRef(0);
|
|
28
|
+
const playerId = useMemo(() => storageKey ?? src ?? Math.random().toString(36).slice(2), [storageKey, src]);
|
|
29
|
+
const lsKey = getStorageKey(src, storageKey);
|
|
30
|
+
const [isReady, setIsReady] = useState(false);
|
|
31
|
+
const [isPlaying, setIsPlaying] = useState(false);
|
|
32
|
+
const [isFullscreen, setIsFullscreen] = useState(false);
|
|
33
|
+
const [loadProgress, setLoadProgress] = useState(0);
|
|
34
|
+
const [duration, setDuration] = useState(0);
|
|
35
|
+
const [volume, setVolume] = useState(1);
|
|
36
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
37
|
+
const [isVolumePopupOpen, setIsVolumePopupOpen] = useState(false);
|
|
38
|
+
const showControlsBar = !isPlaying || isHovered || isVolumePopupOpen;
|
|
39
|
+
const persistTime = useMemo(() => debounce((time) => {
|
|
40
|
+
saveStorage(lsKey, { currentTime: time });
|
|
41
|
+
}, TIME_PERSIST_DEBOUNCE_MS), [lsKey]);
|
|
42
|
+
const persistVolume = useCallback((nextVolume) => {
|
|
43
|
+
saveStorage(lsKey, { volume: nextVolume });
|
|
44
|
+
}, [lsKey]);
|
|
45
|
+
const syncProgressDom = useCallback((time) => {
|
|
46
|
+
const duration = durationRef.current;
|
|
47
|
+
const input = progressInputRef.current;
|
|
48
|
+
const label = currentTimeLabelRef.current;
|
|
49
|
+
const pct = timeToProgressPct(time, duration);
|
|
50
|
+
if (input) {
|
|
51
|
+
if (input.valueAsNumber !== time)
|
|
52
|
+
input.value = String(time);
|
|
53
|
+
input.style.setProperty('--progress', pct);
|
|
54
|
+
}
|
|
55
|
+
if (label)
|
|
56
|
+
label.textContent = formatTime(time);
|
|
57
|
+
}, []);
|
|
58
|
+
const claimKeyboard = useCallback(() => {
|
|
59
|
+
activePlayerId = playerId;
|
|
60
|
+
}, [playerId]);
|
|
61
|
+
const clearVolumeHideTimer = useCallback(() => {
|
|
62
|
+
window.clearTimeout(volumeHideTimerRef.current);
|
|
63
|
+
}, []);
|
|
64
|
+
const openVolumePopup = useCallback(() => {
|
|
65
|
+
volumeKeepOpenRef.current = true;
|
|
66
|
+
clearVolumeHideTimer();
|
|
67
|
+
setIsVolumePopupOpen(true);
|
|
68
|
+
}, [clearVolumeHideTimer]);
|
|
69
|
+
const releaseVolumePopup = useCallback((delay = 0) => {
|
|
70
|
+
volumeKeepOpenRef.current = false;
|
|
71
|
+
clearVolumeHideTimer();
|
|
72
|
+
volumeHideTimerRef.current = window.setTimeout(() => {
|
|
73
|
+
if (!volumeKeepOpenRef.current)
|
|
74
|
+
setIsVolumePopupOpen(false);
|
|
75
|
+
}, delay);
|
|
76
|
+
}, [clearVolumeHideTimer]);
|
|
77
|
+
const flashVolumePopup = useCallback(() => {
|
|
78
|
+
setIsVolumePopupOpen(true);
|
|
79
|
+
clearVolumeHideTimer();
|
|
80
|
+
volumeHideTimerRef.current = window.setTimeout(() => {
|
|
81
|
+
if (!volumeKeepOpenRef.current)
|
|
82
|
+
setIsVolumePopupOpen(false);
|
|
83
|
+
}, VOLUME_POPUP_HIDE_MS);
|
|
84
|
+
}, [clearVolumeHideTimer]);
|
|
85
|
+
const applyVolume = useCallback((next, { flashPopup = false } = {}) => {
|
|
86
|
+
const video = videoRef.current;
|
|
87
|
+
const clamped = clamp(next, 0, 1);
|
|
88
|
+
setVolume(clamped);
|
|
89
|
+
if (video)
|
|
90
|
+
video.volume = clamped;
|
|
91
|
+
persistVolume(clamped);
|
|
92
|
+
if (flashPopup)
|
|
93
|
+
flashVolumePopup();
|
|
94
|
+
}, [persistVolume, flashVolumePopup]);
|
|
95
|
+
const seekBy = useCallback((delta) => {
|
|
96
|
+
const video = videoRef.current;
|
|
97
|
+
if (!video || !Number.isFinite(video.duration))
|
|
98
|
+
return;
|
|
99
|
+
const next = clamp(video.currentTime + delta, 0, video.duration);
|
|
100
|
+
video.currentTime = next;
|
|
101
|
+
syncProgressDom(next);
|
|
102
|
+
persistTime(next);
|
|
103
|
+
onTimeUpdate?.(next, video.duration || 0);
|
|
104
|
+
}, [syncProgressDom, persistTime, onTimeUpdate]);
|
|
105
|
+
const seekTo = useCallback((time) => {
|
|
106
|
+
const video = videoRef.current;
|
|
107
|
+
if (!video || !Number.isFinite(video.duration))
|
|
108
|
+
return;
|
|
109
|
+
const next = clamp(time, 0, video.duration);
|
|
110
|
+
video.currentTime = next;
|
|
111
|
+
syncProgressDom(next);
|
|
112
|
+
}, [syncProgressDom]);
|
|
113
|
+
const togglePlay = useCallback(async () => {
|
|
114
|
+
const video = videoRef.current;
|
|
115
|
+
if (!video || !isReady)
|
|
116
|
+
return;
|
|
117
|
+
claimKeyboard();
|
|
118
|
+
if (video.paused) {
|
|
119
|
+
try {
|
|
120
|
+
await video.play();
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
// Autoplay / play() can reject; ignore.
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
video.pause();
|
|
128
|
+
}
|
|
129
|
+
}, [claimKeyboard, isReady]);
|
|
130
|
+
const toggleFullscreen = useCallback(async () => {
|
|
131
|
+
const root = rootRef.current;
|
|
132
|
+
if (!root)
|
|
133
|
+
return;
|
|
134
|
+
claimKeyboard();
|
|
135
|
+
try {
|
|
136
|
+
if (document.fullscreenElement === root) {
|
|
137
|
+
await document.exitFullscreen();
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
await root.requestFullscreen();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
// Fullscreen may be blocked by the browser.
|
|
145
|
+
}
|
|
146
|
+
}, [claimKeyboard]);
|
|
147
|
+
const debouncedSeekLeft = useMemo(() => leadingDebounce(() => {
|
|
148
|
+
const duration = videoRef.current?.duration ?? 0;
|
|
149
|
+
seekBy(-getSeekDelta(duration));
|
|
150
|
+
}, KEYBOARD_DEBOUNCE_MS), [seekBy]);
|
|
151
|
+
const debouncedSeekRight = useMemo(() => leadingDebounce(() => {
|
|
152
|
+
const duration = videoRef.current?.duration ?? 0;
|
|
153
|
+
seekBy(getSeekDelta(duration));
|
|
154
|
+
}, KEYBOARD_DEBOUNCE_MS), [seekBy]);
|
|
155
|
+
const volumeRef = useRef(volume);
|
|
156
|
+
volumeRef.current = volume;
|
|
157
|
+
const debouncedVolumeUp = useMemo(() => leadingDebounce(() => applyVolume(volumeRef.current + VOLUME_STEP, { flashPopup: true }), KEYBOARD_DEBOUNCE_MS), [applyVolume]);
|
|
158
|
+
const debouncedVolumeDown = useMemo(() => leadingDebounce(() => applyVolume(volumeRef.current - VOLUME_STEP, { flashPopup: true }), KEYBOARD_DEBOUNCE_MS), [applyVolume]);
|
|
159
|
+
const onKeyDown = useCallback((e) => {
|
|
160
|
+
if (activePlayerId !== playerId)
|
|
161
|
+
return;
|
|
162
|
+
if (isEditableTarget(e.target))
|
|
163
|
+
return;
|
|
164
|
+
switch (e.code) {
|
|
165
|
+
case 'Space':
|
|
166
|
+
e.preventDefault();
|
|
167
|
+
togglePlay();
|
|
168
|
+
break;
|
|
169
|
+
case 'ArrowLeft':
|
|
170
|
+
e.preventDefault();
|
|
171
|
+
debouncedSeekLeft();
|
|
172
|
+
break;
|
|
173
|
+
case 'ArrowRight':
|
|
174
|
+
e.preventDefault();
|
|
175
|
+
debouncedSeekRight();
|
|
176
|
+
break;
|
|
177
|
+
case 'ArrowUp':
|
|
178
|
+
e.preventDefault();
|
|
179
|
+
debouncedVolumeUp();
|
|
180
|
+
break;
|
|
181
|
+
case 'ArrowDown':
|
|
182
|
+
e.preventDefault();
|
|
183
|
+
debouncedVolumeDown();
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
}, [
|
|
187
|
+
playerId,
|
|
188
|
+
togglePlay,
|
|
189
|
+
debouncedSeekLeft,
|
|
190
|
+
debouncedSeekRight,
|
|
191
|
+
debouncedVolumeUp,
|
|
192
|
+
debouncedVolumeDown,
|
|
193
|
+
]);
|
|
194
|
+
useEvent({
|
|
195
|
+
event: 'keydown',
|
|
196
|
+
callback: onKeyDown,
|
|
197
|
+
isActive: true,
|
|
198
|
+
});
|
|
199
|
+
useEffect(() => {
|
|
200
|
+
const onFullscreenChange = () => {
|
|
201
|
+
setIsFullscreen(document.fullscreenElement === rootRef.current);
|
|
202
|
+
};
|
|
203
|
+
document.addEventListener('fullscreenchange', onFullscreenChange);
|
|
204
|
+
return () => {
|
|
205
|
+
document.removeEventListener('fullscreenchange', onFullscreenChange);
|
|
206
|
+
if (activePlayerId === playerId)
|
|
207
|
+
activePlayerId = null;
|
|
208
|
+
clearVolumeHideTimer();
|
|
209
|
+
window.clearTimeout(singleClickTimerRef.current);
|
|
210
|
+
};
|
|
211
|
+
}, [playerId, clearVolumeHideTimer]);
|
|
212
|
+
// Sync DOM progress after controls mount / duration known.
|
|
213
|
+
useEffect(() => {
|
|
214
|
+
if (!isReady)
|
|
215
|
+
return;
|
|
216
|
+
const video = videoRef.current;
|
|
217
|
+
if (video)
|
|
218
|
+
syncProgressDom(video.currentTime);
|
|
219
|
+
}, [isReady, duration, syncProgressDom]);
|
|
220
|
+
// Realtime progress via rAF — no React state for currentTime.
|
|
221
|
+
useEffect(() => {
|
|
222
|
+
if (!isPlaying) {
|
|
223
|
+
cancelAnimationFrame(rafRef.current);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
const tick = () => {
|
|
227
|
+
const video = videoRef.current;
|
|
228
|
+
if (video && !isSeekingRef.current) {
|
|
229
|
+
const time = video.currentTime;
|
|
230
|
+
syncProgressDom(time);
|
|
231
|
+
onTimeUpdate?.(time, video.duration || 0);
|
|
232
|
+
persistTime(time);
|
|
233
|
+
}
|
|
234
|
+
rafRef.current = requestAnimationFrame(tick);
|
|
235
|
+
};
|
|
236
|
+
rafRef.current = requestAnimationFrame(tick);
|
|
237
|
+
return () => cancelAnimationFrame(rafRef.current);
|
|
238
|
+
}, [isPlaying, syncProgressDom, onTimeUpdate, persistTime]);
|
|
239
|
+
useEffect(() => {
|
|
240
|
+
setIsReady(false);
|
|
241
|
+
setIsPlaying(false);
|
|
242
|
+
setLoadProgress(0);
|
|
243
|
+
setDuration(0);
|
|
244
|
+
durationRef.current = 0;
|
|
245
|
+
activePlayerId = playerId;
|
|
246
|
+
syncProgressDom(0);
|
|
247
|
+
const stored = loadStorage(lsKey);
|
|
248
|
+
if (typeof stored.volume === 'number') {
|
|
249
|
+
setVolume(clamp(stored.volume, 0, 1));
|
|
250
|
+
}
|
|
251
|
+
}, [src, lsKey, playerId, syncProgressDom]);
|
|
252
|
+
const onLoadedMetadata = useCallback(() => {
|
|
253
|
+
const video = videoRef.current;
|
|
254
|
+
if (!video)
|
|
255
|
+
return;
|
|
256
|
+
const stored = loadStorage(lsKey);
|
|
257
|
+
const nextVolume = typeof stored.volume === 'number'
|
|
258
|
+
? clamp(stored.volume, 0, 1)
|
|
259
|
+
: video.volume;
|
|
260
|
+
video.volume = nextVolume;
|
|
261
|
+
setVolume(nextVolume);
|
|
262
|
+
const nextDuration = video.duration || 0;
|
|
263
|
+
durationRef.current = nextDuration;
|
|
264
|
+
setDuration(nextDuration);
|
|
265
|
+
let time = 0;
|
|
266
|
+
if (typeof stored.currentTime === 'number' &&
|
|
267
|
+
stored.currentTime > 0 &&
|
|
268
|
+
Number.isFinite(nextDuration)) {
|
|
269
|
+
time = clamp(stored.currentTime, 0, nextDuration);
|
|
270
|
+
video.currentTime = time;
|
|
271
|
+
}
|
|
272
|
+
syncProgressDom(time);
|
|
273
|
+
setLoadProgress(getBufferedPercent(video));
|
|
274
|
+
}, [lsKey, syncProgressDom]);
|
|
275
|
+
const onProgress = useCallback(() => {
|
|
276
|
+
setLoadProgress(getBufferedPercent(videoRef.current));
|
|
277
|
+
}, []);
|
|
278
|
+
const onCanPlay = useCallback(() => {
|
|
279
|
+
setIsReady(true);
|
|
280
|
+
setLoadProgress(100);
|
|
281
|
+
}, []);
|
|
282
|
+
const onPlay = useCallback(() => {
|
|
283
|
+
setIsPlaying(true);
|
|
284
|
+
onPlayChange?.(true);
|
|
285
|
+
}, [onPlayChange]);
|
|
286
|
+
const onPause = useCallback(() => {
|
|
287
|
+
setIsPlaying(false);
|
|
288
|
+
onPlayChange?.(false);
|
|
289
|
+
const video = videoRef.current;
|
|
290
|
+
if (video) {
|
|
291
|
+
syncProgressDom(video.currentTime);
|
|
292
|
+
persistTime(video.currentTime);
|
|
293
|
+
}
|
|
294
|
+
}, [onPlayChange, persistTime, syncProgressDom]);
|
|
295
|
+
const onEnded = useCallback(() => {
|
|
296
|
+
setIsPlaying(false);
|
|
297
|
+
onPlayChange?.(false);
|
|
298
|
+
const video = videoRef.current;
|
|
299
|
+
if (video)
|
|
300
|
+
syncProgressDom(video.currentTime);
|
|
301
|
+
}, [onPlayChange, syncProgressDom]);
|
|
302
|
+
const onRootKeyDown = useCallback((e) => {
|
|
303
|
+
if (e.code === 'Space' || e.code.startsWith('Arrow')) {
|
|
304
|
+
claimKeyboard();
|
|
305
|
+
}
|
|
306
|
+
}, [claimKeyboard]);
|
|
307
|
+
const onSeekPointerDown = useCallback(() => {
|
|
308
|
+
isSeekingRef.current = true;
|
|
309
|
+
}, []);
|
|
310
|
+
const onSeekPointerUp = useCallback(() => {
|
|
311
|
+
isSeekingRef.current = false;
|
|
312
|
+
const video = videoRef.current;
|
|
313
|
+
if (!video)
|
|
314
|
+
return;
|
|
315
|
+
syncProgressDom(video.currentTime);
|
|
316
|
+
persistTime(video.currentTime);
|
|
317
|
+
onTimeUpdate?.(video.currentTime, video.duration || 0);
|
|
318
|
+
}, [syncProgressDom, persistTime, onTimeUpdate]);
|
|
319
|
+
const onSeekChange = useCallback((value) => {
|
|
320
|
+
seekTo(value);
|
|
321
|
+
if (currentTimeLabelRef.current) {
|
|
322
|
+
currentTimeLabelRef.current.textContent = formatTime(value);
|
|
323
|
+
}
|
|
324
|
+
}, [seekTo]);
|
|
325
|
+
// Single tap/click → play/pause (delayed). Double → fullscreen.
|
|
326
|
+
const onVideoSurfaceActivate = useCallback(() => {
|
|
327
|
+
const now = Date.now();
|
|
328
|
+
if (now - lastTapRef.current < DOUBLE_TAP_MS) {
|
|
329
|
+
window.clearTimeout(singleClickTimerRef.current);
|
|
330
|
+
lastTapRef.current = 0;
|
|
331
|
+
toggleFullscreen();
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
lastTapRef.current = now;
|
|
335
|
+
window.clearTimeout(singleClickTimerRef.current);
|
|
336
|
+
singleClickTimerRef.current = window.setTimeout(() => {
|
|
337
|
+
lastTapRef.current = 0;
|
|
338
|
+
togglePlay();
|
|
339
|
+
}, DOUBLE_TAP_MS);
|
|
340
|
+
}, [toggleFullscreen, togglePlay]);
|
|
341
|
+
const volumeIcon = volume <= 0 ? 'volumeOff' : 'volume';
|
|
342
|
+
return (jsx("div", { ref: rootRef, className: cn(S.root, isFullscreen && S.fullscreen, S[`size-${size}`], className), tabIndex: 0, onPointerDown: claimKeyboard, onFocus: claimKeyboard, onKeyDown: onRootKeyDown, onPointerEnter: () => setIsHovered(true), onPointerLeave: () => setIsHovered(false), children: jsxs("div", { className: S.videoWrap, onClick: onVideoSurfaceActivate, children: [jsx("video", { ref: videoRef, className: S.video, src: src, poster: poster, muted: muted, loop: loop, autoPlay: autoPlay, playsInline: true, preload: "auto", onLoadedMetadata: onLoadedMetadata, onProgress: onProgress, onCanPlay: onCanPlay, onPlay: onPlay, onPause: onPause, onEnded: onEnded }), !isReady && (jsx("div", { className: S.loading, children: jsx(ProgressCircular, { value: loadProgress, size: "l", showPercentage: true }) })), isReady && (jsxs("div", { className: cn(S.controls, !showControlsBar && S.controlsCompact), onClick: e => e.stopPropagation(), children: [jsx("div", { className: S.progressRow, children: jsx(Slider, { className: S.progress, inputRef: progressInputRef, min: 0, max: duration || 1, step: 0.01, defaultValue: 0, size: size, showGhost: true, "aria-label": "Playback progress", disabled: !duration, onPointerDown: onSeekPointerDown, onPointerUp: onSeekPointerUp, onChange: onSeekChange }) }), jsxs("div", { ref: barRef, className: S.bar, children: [jsx(Button, { variant: "text", size: size, square: true, "aria-label": isPlaying ? 'Pause' : 'Play', onClick: togglePlay, children: jsx(Icon, { type: isPlaying ? 'pause' : 'play', size: size }) }), jsxs("span", { className: S.time, children: [jsx("span", { ref: currentTimeLabelRef, children: "0:00" }), ' / ', formatTime(duration)] }), jsx(Popup, { className: S.volumeControl, isOpen: isVolumePopupOpen, direction: "top", size: "s", blur: true, round: true, elevation: 1, animated: true, trigger: jsx(Button, { variant: "text", size: size, square: true, "aria-label": "Volume", "aria-valuenow": Math.round(volume * 100), onFocus: openVolumePopup, onBlur: () => releaseVolumePopup(VOLUME_POPUP_HIDE_MS), children: jsx(Icon, { type: volumeIcon, size: size }) }), triggerProps: {
|
|
343
|
+
onPointerEnter: openVolumePopup,
|
|
344
|
+
onPointerLeave: () => releaseVolumePopup(VOLUME_POPUP_HIDE_MS),
|
|
345
|
+
}, content: jsx("div", { className: S.volumePopup, onPointerEnter: openVolumePopup, onPointerLeave: () => releaseVolumePopup(VOLUME_POPUP_HIDE_MS), children: jsx("div", { className: S.volumeSliderWrap, children: jsx(Slider, { className: S.volumeSlider, vertical: true, min: 0, max: 1, step: 0.01, value: volume, size: size, "aria-label": "Volume level", onChange: value => applyVolume(value) }) }) }) }), jsx(Button, { variant: "text", size: size, square: true, "aria-label": isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen', onClick: toggleFullscreen, children: jsx(Icon, { type: isFullscreen ? 'fullscreenExit' : 'fullscreen', size: size }) })] })] }))] }) }));
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export { VideoPlayer };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".VideoPlayer_root__LGBzl{border-radius:var(--p-3);box-shadow:inset 0 0 0 2px none;color:var(--accent-color);flex-direction:column}.VideoPlayer_root__LGBzl,.VideoPlayer_videoWrap__sglO6{display:flex;overflow:hidden;position:relative;width:100%}.VideoPlayer_videoWrap__sglO6{align-items:center;aspect-ratio:16/9;border-radius:inherit}.VideoPlayer_video__fYIXE{display:block;height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.VideoPlayer_loading__PpSPh{align-items:center;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:var(--decent-color-alpha-200);border-radius:var(--p-3);display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute}.VideoPlayer_controls__ZtlUH{background:var(--decent-color-alpha-700);border-bottom-left-radius:var(--p-3);border-bottom-right-radius:var(--p-3);bottom:0;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;height:auto;left:0;pointer-events:none;position:absolute;right:0;top:auto;transform:translateY(0);transition:transform .25s ease;width:100%;z-index:2}.VideoPlayer_size-xs__gE1DT .VideoPlayer_controlsCompact__j25Ad{transform:translateY(calc(100% - 1px))}.VideoPlayer_size-s__7gpUI .VideoPlayer_controlsCompact__j25Ad{transform:translateY(calc(100% - 2px))}.VideoPlayer_size-m__oNx3V .VideoPlayer_controlsCompact__j25Ad{transform:translateY(calc(100% - 4px))}.VideoPlayer_size-l__BrHtn .VideoPlayer_controlsCompact__j25Ad{transform:translateY(calc(100% - 6px))}.VideoPlayer_size-xl__u0nqW .VideoPlayer_controlsCompact__j25Ad{transform:translateY(calc(100% - 10px))}.VideoPlayer_progressRow__u53xA{pointer-events:auto;width:100%}.VideoPlayer_progressRow__u53xA input{--track-radius:0}.VideoPlayer_progress__qRC1a{min-width:0;width:100%}.VideoPlayer_size-xs__gE1DT .VideoPlayer_progress__qRC1a{top:-5px}.VideoPlayer_size-s__7gpUI .VideoPlayer_progress__qRC1a{top:-6px}.VideoPlayer_size-m__oNx3V .VideoPlayer_progress__qRC1a{top:-4px}.VideoPlayer_size-l__BrHtn .VideoPlayer_progress__qRC1a,.VideoPlayer_size-xl__u0nqW .VideoPlayer_progress__qRC1a{top:-5px}.VideoPlayer_bar__myWn1{align-items:center;display:flex;gap:var(--p-2);padding:0 var(--p-3) var(--p-2);pointer-events:auto}.VideoPlayer_time__-icL3{font-feature-settings:\"tnum\";flex:1;font-size:13px;font-variant-numeric:tabular-nums;min-width:0;opacity:.85;white-space:nowrap}.VideoPlayer_volumeControl__XUc1I{align-items:center;display:inline-flex;flex-shrink:0}.VideoPlayer_volumePopup__eXzsE{align-items:center;box-sizing:border-box;display:flex;height:120px;justify-content:center;padding:var(--p-3) var(--p-2)}.VideoPlayer_volumeSliderWrap__ANQ55{align-items:stretch;display:flex;height:100%;justify-content:center;width:16px;width:var(--thumb-size,16px)}.VideoPlayer_volumeSlider__TWOG5{height:100%}.VideoPlayer_fullscreen__aue41,.VideoPlayer_fullscreen__aue41 .VideoPlayer_videoWrap__sglO6{border-radius:0}.VideoPlayer_fullscreen__aue41 video{-o-object-fit:contain;object-fit:contain}";
|
|
4
|
+
var S = {"root":"VideoPlayer_root__LGBzl","videoWrap":"VideoPlayer_videoWrap__sglO6","video":"VideoPlayer_video__fYIXE","loading":"VideoPlayer_loading__PpSPh","controls":"VideoPlayer_controls__ZtlUH","size-xs":"VideoPlayer_size-xs__gE1DT","controlsCompact":"VideoPlayer_controlsCompact__j25Ad","size-s":"VideoPlayer_size-s__7gpUI","size-m":"VideoPlayer_size-m__oNx3V","size-l":"VideoPlayer_size-l__BrHtn","size-xl":"VideoPlayer_size-xl__u0nqW","progressRow":"VideoPlayer_progressRow__u53xA","progress":"VideoPlayer_progress__qRC1a","bar":"VideoPlayer_bar__myWn1","time":"VideoPlayer_time__-icL3","volumeControl":"VideoPlayer_volumeControl__XUc1I","volumePopup":"VideoPlayer_volumePopup__eXzsE","volumeSliderWrap":"VideoPlayer_volumeSliderWrap__ANQ55","volumeSlider":"VideoPlayer_volumeSlider__TWOG5","fullscreen":"VideoPlayer_fullscreen__aue41"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as T from './AssistiveText.types';
|
|
2
|
-
export declare function AssistiveText(props: T.Props): JSX.Element;
|
|
2
|
+
export declare function AssistiveText(props: T.Props): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as T from './Autocomplete.types';
|
|
2
|
-
export declare function Autocomplete(props: T.Props): JSX.Element;
|
|
2
|
+
export declare function Autocomplete(props: T.Props): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as T from './ButtonGroup.types';
|
|
2
|
-
export declare function ButtonGroup(props: T.Props): JSX.Element;
|
|
2
|
+
export declare function ButtonGroup(props: T.Props): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as T from './Calendar.types';
|
|
2
|
-
export declare function Calendar({ className, value, onDayPointerDown, onDayPointerUp, renderDay, renderWeekDayLabel, renderMonthLabel, renderMonthesLabel, renderYearLabel, startOfWeek, weekendClassName, hideOtherMonthDays, isDayDisabled, size, }: T.Props): JSX.Element;
|
|
2
|
+
export declare function Calendar({ className, value, onDayPointerDown, onDayPointerUp, renderDay, renderWeekDayLabel, renderMonthLabel, renderMonthesLabel, renderYearLabel, startOfWeek, weekendClassName, hideOtherMonthDays, isDayDisabled, size, }: T.Props): import("react").JSX.Element;
|
|
@@ -3,11 +3,11 @@ declare const Card: import("react").ForwardRefExoticComponent<Omit<import("react
|
|
|
3
3
|
paddingSize?: "s" | "xs" | "m" | "l" | "xl";
|
|
4
4
|
blur?: boolean;
|
|
5
5
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
-
declare function LinkCard({ className, ...props }: LinkCardProps): JSX.Element;
|
|
7
|
-
declare function CardHeader({ className, icon, iconWithBackground, textsClassName, title, titleClassName, titleId, description, descriptionClassName, descriptionId, children, ...props }: CardHeaderProps): JSX.Element;
|
|
8
|
-
declare function CardTitle({ className, ...props }: CardTitleProps): JSX.Element;
|
|
9
|
-
declare function CardDescription({ className, ...props }: CardDescriptionProps): JSX.Element;
|
|
10
|
-
declare function CardAction({ className, ...props }: CardActionProps): JSX.Element;
|
|
11
|
-
declare function CardContent({ className, centered, fullHeight, noScroll, children, autoScrollBottom, ...props }: CardContentProps): JSX.Element;
|
|
12
|
-
declare function CardFooter({ className, ...props }: CardFooterProps): JSX.Element;
|
|
6
|
+
declare function LinkCard({ className, ...props }: LinkCardProps): import("react").JSX.Element;
|
|
7
|
+
declare function CardHeader({ className, icon, iconWithBackground, textsClassName, title, titleClassName, titleId, description, descriptionClassName, descriptionId, children, ...props }: CardHeaderProps): import("react").JSX.Element;
|
|
8
|
+
declare function CardTitle({ className, ...props }: CardTitleProps): import("react").JSX.Element;
|
|
9
|
+
declare function CardDescription({ className, ...props }: CardDescriptionProps): import("react").JSX.Element;
|
|
10
|
+
declare function CardAction({ className, ...props }: CardActionProps): import("react").JSX.Element;
|
|
11
|
+
declare function CardContent({ className, centered, fullHeight, noScroll, children, autoScrollBottom, ...props }: CardContentProps): import("react").JSX.Element;
|
|
12
|
+
declare function CardFooter({ className, ...props }: CardFooterProps): import("react").JSX.Element;
|
|
13
13
|
export { Card, LinkCard, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
@@ -9,5 +9,5 @@ type Props = {
|
|
|
9
9
|
removeTooltip?: ReactNode;
|
|
10
10
|
size?: Size;
|
|
11
11
|
};
|
|
12
|
-
export declare function Chip({ children, className, selected, onRemove, onClick, removeTooltip, size, }: Props): JSX.Element;
|
|
12
|
+
export declare function Chip({ children, className, selected, onRemove, onClick, removeTooltip, size, }: Props): import("react").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as T from './DatePicker.types';
|
|
2
|
-
export declare function DatePicker(props: T.Props): JSX.Element;
|
|
2
|
+
export declare function DatePicker(props: T.Props): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as T from './DatePickerInput.types';
|
|
2
|
-
export declare function DatePickerInput(props: T.Props): JSX.Element;
|
|
2
|
+
export declare function DatePickerInput(props: T.Props): import("react").JSX.Element;
|
|
@@ -4,4 +4,4 @@ export declare function formatDate({ value, format, locale }: {
|
|
|
4
4
|
format: any;
|
|
5
5
|
locale?: string;
|
|
6
6
|
}): any;
|
|
7
|
-
export declare function DateTime({ value, format, locale }: T.Props): JSX.Element;
|
|
7
|
+
export declare function DateTime({ value, format, locale }: T.Props): import("react").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Props as DialogueProps } from './Dialogue.types';
|
|
2
|
-
export declare function Dialogue({ open, onOpenChange, disabled, trigger, title, subtitle, icon, content, contentClassName, footer, footerAlignment, size, className, noScroll, maxHeight, autoScrollBottom, width, }: DialogueProps): JSX.Element;
|
|
2
|
+
export declare function Dialogue({ open, onOpenChange, disabled, trigger, title, subtitle, icon, content, contentClassName, footer, footerAlignment, size, className, noScroll, maxHeight, autoScrollBottom, width, }: DialogueProps): import("react").JSX.Element;
|
|
3
3
|
export { default as DialogueStyles } from './Dialogue.styl';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as T from './Expand.types';
|
|
2
|
-
export declare function Expand(props: T.Props): JSX.Element;
|
|
2
|
+
export declare function Expand(props: T.Props): import("react").JSX.Element;
|
|
@@ -2,5 +2,5 @@ import { CSSProperties, HTMLAttributes } from 'react';
|
|
|
2
2
|
type FlexProps = HTMLAttributes<HTMLDivElement> & Pick<CSSProperties, 'justifyContent' | 'alignItems' | 'flexDirection' | 'flexWrap' | 'flexGrow' | 'flexShrink' | 'flexBasis' | 'flex' | 'order' | 'alignSelf' | 'flexFlow' | 'width' | 'height'> & {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
};
|
|
5
|
-
export declare const Flex: ({ children, justifyContent, alignItems, flexDirection, flexWrap, flexGrow, flexShrink, flexBasis, flex, order, alignSelf, flexFlow, width, height, ...props }: FlexProps) => JSX.Element;
|
|
5
|
+
export declare const Flex: ({ children, justifyContent, alignItems, flexDirection, flexWrap, flexGrow, flexShrink, flexBasis, flex, order, alignSelf, flexFlow, width, height, ...props }: FlexProps) => import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as T from './Form.types';
|
|
2
2
|
export * from './Form.types';
|
|
3
|
-
export declare function Form(props: T.Props): JSX.Element;
|
|
3
|
+
export declare function Form(props: T.Props): import("react").JSX.Element;
|
|
4
4
|
export * from './SubmitButtons/SubmitButtons';
|
|
5
5
|
export * as FormTypes from './Form.types';
|
|
@@ -9,5 +9,5 @@ type Props = {
|
|
|
9
9
|
buttons: ButtonConfig[];
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
};
|
|
12
|
-
export declare const SubmitButtons: ({ buttons, className, ...props }: Props) => JSX.Element;
|
|
12
|
+
export declare const SubmitButtons: ({ buttons, className, ...props }: Props) => import("react").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: () => JSX.Element;
|
|
1
|
+
declare const _default: () => import("react").JSX.Element;
|
|
2
2
|
export default _default;
|
|
@@ -88,6 +88,8 @@ export { default as star } from './star.svg';
|
|
|
88
88
|
export { default as stop } from './stop.svg';
|
|
89
89
|
export { default as stopInCircle } from './stopInCircle.svg';
|
|
90
90
|
export { default as syncArrows } from './syncArrows.svg';
|
|
91
|
+
export { default as volume } from './volume.svg';
|
|
92
|
+
export { default as volumeOff } from './volumeOff.svg';
|
|
91
93
|
export { default as table } from './table.svg';
|
|
92
94
|
export { default as telegram } from './telegram.svg';
|
|
93
95
|
export { default as tool } from './tool.svg';
|
|
@@ -41,8 +41,8 @@ export declare class InputFile extends Component<T.Props> {
|
|
|
41
41
|
upload(file: any, index: any): Promise<void>;
|
|
42
42
|
demandedUploader: (upload: any) => Promise<any>;
|
|
43
43
|
remove: (e: any, value: any) => Promise<void>;
|
|
44
|
-
renderPlusButton(): JSX.Element;
|
|
45
|
-
renderItem: (i: any, props?: {}) => JSX.Element;
|
|
44
|
+
renderPlusButton(): import("react").JSX.Element;
|
|
45
|
+
renderItem: (i: any, props?: {}) => import("react").JSX.Element;
|
|
46
46
|
renderItems(): any;
|
|
47
|
-
render(): JSX.Element;
|
|
47
|
+
render(): import("react").JSX.Element;
|
|
48
48
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LangSelectorProps } from './LangSelector.types';
|
|
2
|
-
export declare function LangSelector(props: LangSelectorProps): JSX.Element;
|
|
2
|
+
export declare function LangSelector(props: LangSelectorProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as T from './LightBox.types';
|
|
2
|
-
export declare function LightBox({ children, className, onClose, blur, ...props }: T.Props): JSX.Element;
|
|
2
|
+
export declare function LightBox({ children, className, onClose, blur, ...props }: T.Props): import("react").JSX.Element;
|
|
@@ -13,5 +13,5 @@ export declare const NotificationsStore: {
|
|
|
13
13
|
close(id: any): void;
|
|
14
14
|
remove(id: any): void;
|
|
15
15
|
};
|
|
16
|
-
export declare const Notifications: (props: Props) => JSX.Element;
|
|
16
|
+
export declare const Notifications: (props: Props) => import("react").JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as T from './Paranja.types';
|
|
2
|
-
export declare const Paranja: ({ className, children, visible, inline, blur, }: T.Props) => JSX.Element;
|
|
2
|
+
export declare const Paranja: ({ className, children, visible, inline, blur, }: T.Props) => import("react").JSX.Element;
|
|
@@ -67,7 +67,7 @@ export declare class Popup extends Component<T.Props, T.State> {
|
|
|
67
67
|
afterOpen: () => void;
|
|
68
68
|
afterClose: () => void;
|
|
69
69
|
toggle: any;
|
|
70
|
-
renderTrigger(): JSX.Element;
|
|
71
|
-
renderContent(): JSX.Element;
|
|
72
|
-
render(): JSX.Element;
|
|
70
|
+
renderTrigger(): import("react").JSX.Element;
|
|
71
|
+
renderContent(): import("react").JSX.Element;
|
|
72
|
+
render(): import("react").JSX.Element;
|
|
73
73
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as T from './PopupMenu.types';
|
|
2
|
-
export declare function PopupMenu({ items, onClose, ...props }: T.Props): JSX.Element;
|
|
2
|
+
export declare function PopupMenu({ items, onClose, ...props }: T.Props): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
1
2
|
type Props = {
|
|
2
3
|
selector?: string;
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
};
|
|
5
|
-
export declare function Portal(props: Props):
|
|
6
|
+
export declare function Portal(props: Props): ReactElement | null;
|
|
6
7
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ProgressProps } from './Progress.types';
|
|
2
|
-
export declare function Progress({ value, showPercentage, size, alignText, className, }: ProgressProps): JSX.Element;
|
|
2
|
+
export declare function Progress({ value, showPercentage, size, alignText, className, }: ProgressProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ProgressCircularProps } from './ProgressCircular.types';
|
|
2
2
|
export type { ProgressCircularProps } from './ProgressCircular.types';
|
|
3
|
-
export declare function ProgressCircular({ value, showPercentage, size, strokeWidth, className, }: ProgressCircularProps): JSX.Element;
|
|
3
|
+
export declare function ProgressCircular({ value, showPercentage, size, strokeWidth, className, }: ProgressCircularProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as T from './RequiredStar.types';
|
|
2
|
-
export declare function RequiredStar(props: T.Props): JSX.Element;
|
|
2
|
+
export declare function RequiredStar(props: T.Props): import("react").JSX.Element;
|