@flipdish/ui-library 0.21.0 → 0.23.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/components/__internal__/statusIcon/statusIcon.types.d.ts +12 -0
- package/dist/components/__internal__/statusIcon/statusIcon.types.d.ts.map +1 -0
- package/dist/components/__internal__/statusIcon/statusIcon.utils.cjs +21 -0
- package/dist/components/__internal__/statusIcon/statusIcon.utils.cjs.map +1 -0
- package/dist/components/__internal__/statusIcon/statusIcon.utils.d.ts +5 -0
- package/dist/components/__internal__/statusIcon/statusIcon.utils.d.ts.map +1 -0
- package/dist/components/__internal__/statusIcon/statusIcon.utils.js +19 -0
- package/dist/components/__internal__/statusIcon/statusIcon.utils.js.map +1 -0
- package/dist/components/atoms/BackgroundPattern/components/grid-check.cjs +14 -7
- package/dist/components/atoms/BackgroundPattern/components/grid-check.cjs.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/grid-check.d.ts.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/grid-check.js +14 -7
- package/dist/components/atoms/BackgroundPattern/components/grid-check.js.map +1 -1
- package/dist/components/atoms/BackgroundPattern/index.d.ts.map +1 -1
- package/dist/components/atoms/Badge/index.cjs +16 -3
- package/dist/components/atoms/Badge/index.cjs.map +1 -1
- package/dist/components/atoms/Badge/index.d.ts +13 -24
- package/dist/components/atoms/Badge/index.d.ts.map +1 -1
- package/dist/components/atoms/Badge/index.js +16 -3
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/Dot/Dot.styles.cjs +51 -0
- package/dist/components/atoms/Dot/Dot.styles.cjs.map +1 -0
- package/dist/components/atoms/Dot/Dot.styles.d.ts +109 -0
- package/dist/components/atoms/Dot/Dot.styles.d.ts.map +1 -0
- package/dist/components/atoms/Dot/Dot.styles.js +49 -0
- package/dist/components/atoms/Dot/Dot.styles.js.map +1 -0
- package/dist/components/atoms/Dot/index.cjs +5 -14
- package/dist/components/atoms/Dot/index.cjs.map +1 -1
- package/dist/components/atoms/Dot/index.d.ts +11 -3
- package/dist/components/atoms/Dot/index.d.ts.map +1 -1
- package/dist/components/atoms/Dot/index.js +5 -14
- package/dist/components/atoms/Dot/index.js.map +1 -1
- package/dist/components/molecules/Alert/index.cjs +3 -11
- package/dist/components/molecules/Alert/index.cjs.map +1 -1
- package/dist/components/molecules/Alert/index.d.ts +3 -2
- package/dist/components/molecules/Alert/index.d.ts.map +1 -1
- package/dist/components/molecules/Alert/index.js +3 -11
- package/dist/components/molecules/Alert/index.js.map +1 -1
- package/dist/components/molecules/Carousel/index.cjs +1 -1
- package/dist/components/molecules/Carousel/index.cjs.map +1 -1
- package/dist/components/molecules/Carousel/index.js +1 -1
- package/dist/components/molecules/Carousel/index.js.map +1 -1
- package/dist/components/molecules/Notification/index.cjs +3 -10
- package/dist/components/molecules/Notification/index.cjs.map +1 -1
- package/dist/components/molecules/Notification/index.d.ts +2 -1
- package/dist/components/molecules/Notification/index.d.ts.map +1 -1
- package/dist/components/molecules/Notification/index.js +3 -10
- package/dist/components/molecules/Notification/index.js.map +1 -1
- package/dist/components/molecules/Pagination/index.cjs +4 -4
- package/dist/components/molecules/Pagination/index.cjs.map +1 -1
- package/dist/components/molecules/Pagination/index.js +5 -5
- package/dist/components/molecules/Pagination/index.js.map +1 -1
- package/dist/components/molecules/Tags/index.cjs +1 -1
- package/dist/components/molecules/Tags/index.cjs.map +1 -1
- package/dist/components/molecules/Tags/index.js +1 -1
- package/dist/components/molecules/Tags/index.js.map +1 -1
- package/dist/components/organisms/ActivityFeed/index.cjs +1 -1
- package/dist/components/organisms/ActivityFeed/index.cjs.map +1 -1
- package/dist/components/organisms/ActivityFeed/index.js +1 -1
- package/dist/components/organisms/ActivityFeed/index.js.map +1 -1
- package/dist/components/organisms/Calendar/calendar.utils.cjs +41 -0
- package/dist/components/organisms/Calendar/calendar.utils.cjs.map +1 -1
- package/dist/components/organisms/Calendar/calendar.utils.d.ts +20 -0
- package/dist/components/organisms/Calendar/calendar.utils.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/calendar.utils.js +37 -1
- package/dist/components/organisms/Calendar/calendar.utils.js.map +1 -1
- package/dist/components/organisms/Calendar/components/calendar-day-view.cjs +86 -0
- package/dist/components/organisms/Calendar/components/calendar-day-view.cjs.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-day-view.d.ts +20 -0
- package/dist/components/organisms/Calendar/components/calendar-day-view.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-day-view.js +84 -0
- package/dist/components/organisms/Calendar/components/calendar-day-view.js.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-mobile-day-grid.cjs +21 -0
- package/dist/components/organisms/Calendar/components/calendar-mobile-day-grid.cjs.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-mobile-day-grid.d.ts +16 -0
- package/dist/components/organisms/Calendar/components/calendar-mobile-day-grid.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-mobile-day-grid.js +19 -0
- package/dist/components/organisms/Calendar/components/calendar-mobile-day-grid.js.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-month-view.cjs +265 -0
- package/dist/components/organisms/Calendar/components/calendar-month-view.cjs.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-month-view.d.ts +18 -0
- package/dist/components/organisms/Calendar/components/calendar-month-view.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-month-view.js +263 -0
- package/dist/components/organisms/Calendar/components/calendar-month-view.js.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-positioned-event.cjs +41 -0
- package/dist/components/organisms/Calendar/components/calendar-positioned-event.cjs.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-positioned-event.d.ts +15 -0
- package/dist/components/organisms/Calendar/components/calendar-positioned-event.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-positioned-event.js +39 -0
- package/dist/components/organisms/Calendar/components/calendar-positioned-event.js.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view-day.cjs +23 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view-day.cjs.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view-day.d.ts +15 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view-day.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view-day.js +21 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view-day.js.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view.cjs +77 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view.cjs.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view.d.ts +20 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view.js +75 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view.js.map +1 -0
- package/dist/components/organisms/Calendar/index.cjs +4 -504
- package/dist/components/organisms/Calendar/index.cjs.map +1 -1
- package/dist/components/organisms/Calendar/index.d.ts +1 -1
- package/dist/components/organisms/Calendar/index.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/index.js +6 -506
- package/dist/components/organisms/Calendar/index.js.map +1 -1
- package/dist/components/organisms/Charts/components/activity-gauge.cjs +4 -0
- package/dist/components/organisms/Charts/components/activity-gauge.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/activity-gauge.d.ts +4 -0
- package/dist/components/organisms/Charts/components/activity-gauge.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/activity-gauge.js +4 -0
- package/dist/components/organisms/Charts/components/activity-gauge.js.map +1 -1
- package/dist/components/organisms/Charts/components/bar-chart.cjs +1 -1
- package/dist/components/organisms/Charts/components/bar-chart.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/bar-chart.d.ts +1 -2
- package/dist/components/organisms/Charts/components/bar-chart.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/bar-chart.js +2 -2
- package/dist/components/organisms/Charts/components/bar-chart.js.map +1 -1
- package/dist/components/organisms/Charts/components/charts-base.cjs +1 -2
- package/dist/components/organisms/Charts/components/charts-base.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/charts-base.d.ts +13 -2
- package/dist/components/organisms/Charts/components/charts-base.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/charts-base.js +1 -2
- package/dist/components/organisms/Charts/components/charts-base.js.map +1 -1
- package/dist/components/organisms/Charts/components/line-chart.cjs +1 -1
- package/dist/components/organisms/Charts/components/line-chart.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/line-chart.d.ts +1 -2
- package/dist/components/organisms/Charts/components/line-chart.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/line-chart.js +2 -2
- package/dist/components/organisms/Charts/components/line-chart.js.map +1 -1
- package/dist/components/organisms/Charts/components/pie-chart.cjs +5 -0
- package/dist/components/organisms/Charts/components/pie-chart.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/pie-chart.d.ts +6 -2
- package/dist/components/organisms/Charts/components/pie-chart.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/pie-chart.js +5 -0
- package/dist/components/organisms/Charts/components/pie-chart.js.map +1 -1
- package/dist/components/organisms/Charts/components/radar-chart.cjs +3 -4
- package/dist/components/organisms/Charts/components/radar-chart.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/radar-chart.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/radar-chart.js +3 -4
- package/dist/components/organisms/Charts/components/radar-chart.js.map +1 -1
- package/dist/components/organisms/DatePicker/components/range-calendar.cjs +1 -1
- package/dist/components/organisms/DatePicker/components/range-calendar.cjs.map +1 -1
- package/dist/components/organisms/DatePicker/components/range-calendar.js +2 -2
- package/dist/components/organisms/DatePicker/components/range-calendar.js.map +1 -1
- package/dist/components/organisms/GradientPicker/components/gradient-area.cjs +157 -0
- package/dist/components/organisms/GradientPicker/components/gradient-area.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-area.d.ts +17 -0
- package/dist/components/organisms/GradientPicker/components/gradient-area.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-area.js +155 -0
- package/dist/components/organisms/GradientPicker/components/gradient-area.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-reverse-button.cjs +17 -0
- package/dist/components/organisms/GradientPicker/components/gradient-reverse-button.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-reverse-button.d.ts +3 -0
- package/dist/components/organisms/GradientPicker/components/gradient-reverse-button.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-reverse-button.js +15 -0
- package/dist/components/organisms/GradientPicker/components/gradient-reverse-button.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-slider.cjs +71 -0
- package/dist/components/organisms/GradientPicker/components/gradient-slider.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-slider.d.ts +7 -0
- package/dist/components/organisms/GradientPicker/components/gradient-slider.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-slider.js +69 -0
- package/dist/components/organisms/GradientPicker/components/gradient-slider.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-list.cjs +18 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-list.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-list.d.ts +4 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-list.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-list.js +16 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-list.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-row.cjs +49 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-row.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-row.d.ts +6 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-row.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-row.js +47 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-row.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-type-select.cjs +28 -0
- package/dist/components/organisms/GradientPicker/components/gradient-type-select.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-type-select.d.ts +3 -0
- package/dist/components/organisms/GradientPicker/components/gradient-type-select.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-type-select.js +26 -0
- package/dist/components/organisms/GradientPicker/components/gradient-type-select.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/position-input.cjs +43 -0
- package/dist/components/organisms/GradientPicker/components/position-input.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/position-input.d.ts +6 -0
- package/dist/components/organisms/GradientPicker/components/position-input.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/position-input.js +41 -0
- package/dist/components/organisms/GradientPicker/components/position-input.js.map +1 -0
- package/dist/components/organisms/GradientPicker/index.cjs +11 -327
- package/dist/components/organisms/GradientPicker/index.cjs.map +1 -1
- package/dist/components/organisms/GradientPicker/index.d.ts +7 -8
- package/dist/components/organisms/GradientPicker/index.d.ts.map +1 -1
- package/dist/components/organisms/GradientPicker/index.js +7 -323
- package/dist/components/organisms/GradientPicker/index.js.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.cjs +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.cjs.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.js +2 -2
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.js.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-button.cjs +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-button.cjs.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-button.d.ts.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-button.js +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-button.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.cjs +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.js +2 -2
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.cjs +1 -1
- package/dist/components/organisms/SidebarNavigation/index.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.js +2 -2
- package/dist/components/organisms/SidebarNavigation/index.js.map +1 -1
- package/dist/components/organisms/VideoPlayer/hooks/useVideoPlayback.cjs +169 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoPlayback.cjs.map +1 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoPlayback.d.ts +34 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoPlayback.d.ts.map +1 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoPlayback.js +167 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoPlayback.js.map +1 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoVolume.cjs +75 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoVolume.cjs.map +1 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoVolume.d.ts +16 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoVolume.d.ts.map +1 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoVolume.js +73 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoVolume.js.map +1 -0
- package/dist/components/organisms/VideoPlayer/index.cjs +9 -182
- package/dist/components/organisms/VideoPlayer/index.cjs.map +1 -1
- package/dist/components/organisms/VideoPlayer/index.d.ts.map +1 -1
- package/dist/components/organisms/VideoPlayer/index.js +10 -183
- package/dist/components/organisms/VideoPlayer/index.js.map +1 -1
- package/dist/hooks/useBreakpoints/index.cjs +4 -1
- package/dist/hooks/useBreakpoints/index.cjs.map +1 -1
- package/dist/hooks/useBreakpoints/index.d.ts +2 -0
- package/dist/hooks/useBreakpoints/index.d.ts.map +1 -1
- package/dist/hooks/useBreakpoints/index.js +4 -2
- package/dist/hooks/useBreakpoints/index.js.map +1 -1
- package/dist/native/components/atoms/Dot/Dot.styles.d.ts +109 -0
- package/dist/native/components/atoms/Dot/Dot.styles.d.ts.map +1 -0
- package/dist/native/components/atoms/Dot/Dot.styles.js +49 -0
- package/dist/native/components/atoms/Dot/Dot.styles.js.map +1 -0
- package/dist/native/components/atoms/Dot/index.d.ts +24 -8
- package/dist/native/components/atoms/Dot/index.d.ts.map +1 -0
- package/dist/native/components/atoms/Dot/index.js +25 -0
- package/dist/native/components/atoms/Dot/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -2,40 +2,21 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { VolumeX, VolumeMax, Minimize01, Maximize01 } from '@flipdish/ui-icons';
|
|
3
3
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
4
4
|
import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
5
|
-
import { useRef,
|
|
5
|
+
import { useRef, useImperativeHandle } from 'react';
|
|
6
6
|
import { TooltipTrigger, Focusable, Tooltip } from 'react-aria-components';
|
|
7
7
|
import { PlayIcon, PauseIcon } from './components/icons.js';
|
|
8
|
+
import { useVideoPlayback } from './hooks/useVideoPlayback.js';
|
|
9
|
+
import { useVideoVolume } from './hooks/useVideoVolume.js';
|
|
8
10
|
|
|
9
11
|
const VideoPlayer = ({ src, type = 'video/mp4', autoPlay = false, thumbnailUrl, thumbnailAlt, showThumbnailOverlay, className, thumbnailButtonClassName, size = 'md', ref, 'data-testid': dataTestId, }) => {
|
|
10
12
|
const testId = useResolvedTestId({ testId: dataTestId, segment: 'video-player', rootName: 'video-player' });
|
|
11
13
|
const videoRef = useRef(null);
|
|
12
14
|
const containerRef = useRef(null);
|
|
13
|
-
const progressRef =
|
|
14
|
-
const
|
|
15
|
-
const [currentTime, setCurrentTime] = useState(0);
|
|
16
|
-
const [duration, setDuration] = useState(0);
|
|
17
|
-
const [buffered, setBuffered] = useState(null);
|
|
18
|
-
const [hoverTime, setHoverTime] = useState(null);
|
|
19
|
-
const [hoverPosition, setHoverPosition] = useState(null);
|
|
20
|
-
const [showThumbnail, setShowThumbnail] = useState(true);
|
|
21
|
-
const [isFullscreen, setIsFullscreen] = useState(false);
|
|
22
|
-
const [volume, setVolume] = useState(1);
|
|
23
|
-
const [isMuted, setIsMuted] = useState(false);
|
|
24
|
-
const [previousVolume, setPreviousVolume] = useState(1);
|
|
25
|
-
const [playbackRate, setPlaybackRate] = useState(1);
|
|
15
|
+
const { progressRef, isPlaying, currentTime, duration, buffered, hoverTime, hoverPosition, showThumbnail, isFullscreen, playbackRate, formatTime, play, pause, togglePlay, handleProgressClick, handleProgressHover, toggleFullscreen, toggleSpeed, } = useVideoPlayback({ videoRef });
|
|
16
|
+
const { volume, isMuted, toggleMute, handleVolumeChange } = useVideoVolume({ videoRef });
|
|
26
17
|
useImperativeHandle(ref, () => ({
|
|
27
|
-
play
|
|
28
|
-
|
|
29
|
-
// element isn't ready or playback isn't permitted — swallow that rejection
|
|
30
|
-
// rather than leaving it unhandled; `isPlaying` still reflects user intent.
|
|
31
|
-
videoRef.current?.play().catch(() => { });
|
|
32
|
-
setIsPlaying(true);
|
|
33
|
-
setShowThumbnail(false);
|
|
34
|
-
},
|
|
35
|
-
pause: () => {
|
|
36
|
-
videoRef.current?.pause();
|
|
37
|
-
setIsPlaying(false);
|
|
38
|
-
},
|
|
18
|
+
play,
|
|
19
|
+
pause,
|
|
39
20
|
get paused() {
|
|
40
21
|
return videoRef.current?.paused ?? true;
|
|
41
22
|
},
|
|
@@ -43,150 +24,6 @@ const VideoPlayer = ({ src, type = 'video/mp4', autoPlay = false, thumbnailUrl,
|
|
|
43
24
|
return videoRef.current;
|
|
44
25
|
},
|
|
45
26
|
}));
|
|
46
|
-
const playbackSpeeds = [1, 1.25, 1.5, 1.75, 2];
|
|
47
|
-
const formatTime = (time) => {
|
|
48
|
-
const minutes = Math.max(Math.floor(time / 60), 0);
|
|
49
|
-
const seconds = Math.max(Math.floor(time % 60), 0);
|
|
50
|
-
return `${minutes}:${seconds.toString().padStart(2, '0')}`;
|
|
51
|
-
};
|
|
52
|
-
const togglePlay = () => {
|
|
53
|
-
setIsPlaying((prevPlaying) => {
|
|
54
|
-
// See the note on the imperative `play()` handle re: swallowing the rejection.
|
|
55
|
-
prevPlaying ? videoRef.current?.pause() : videoRef.current?.play().catch(() => { });
|
|
56
|
-
return !prevPlaying;
|
|
57
|
-
});
|
|
58
|
-
setShowThumbnail(false);
|
|
59
|
-
};
|
|
60
|
-
const handleProgressClick = (e) => {
|
|
61
|
-
if (progressRef.current && videoRef.current) {
|
|
62
|
-
const rect = progressRef.current.getBoundingClientRect();
|
|
63
|
-
const pos = (e.clientX - rect.left) / rect.width;
|
|
64
|
-
videoRef.current.currentTime = pos * duration;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
const handleProgressHover = (e) => {
|
|
68
|
-
if (progressRef.current && videoRef.current) {
|
|
69
|
-
const rect = progressRef.current.getBoundingClientRect();
|
|
70
|
-
const pos = (e.clientX - rect.left) / rect.width;
|
|
71
|
-
setHoverTime(pos * duration);
|
|
72
|
-
setHoverPosition(e.clientX - rect.left);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
const handleProgress = () => {
|
|
76
|
-
if (videoRef.current) {
|
|
77
|
-
setBuffered(videoRef.current.buffered);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
const toggleFullscreen = () => {
|
|
81
|
-
if (!document.fullscreenElement) {
|
|
82
|
-
videoRef.current?.parentElement?.requestFullscreen();
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
document.exitFullscreen();
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
const toggleMute = useCallback(() => {
|
|
89
|
-
if (isMuted) {
|
|
90
|
-
setVolume(previousVolume);
|
|
91
|
-
if (videoRef.current) {
|
|
92
|
-
videoRef.current.volume = previousVolume;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
setPreviousVolume(volume);
|
|
97
|
-
setVolume(0);
|
|
98
|
-
if (videoRef.current) {
|
|
99
|
-
videoRef.current.volume = 0;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
setIsMuted(!isMuted);
|
|
103
|
-
}, [isMuted, previousVolume, volume]);
|
|
104
|
-
const toggleSpeed = () => {
|
|
105
|
-
const currentIndex = playbackSpeeds.indexOf(playbackRate);
|
|
106
|
-
const nextIndex = (currentIndex + 1) % playbackSpeeds.length;
|
|
107
|
-
const nextSpeed = playbackSpeeds[nextIndex];
|
|
108
|
-
setPlaybackRate(nextSpeed);
|
|
109
|
-
if (videoRef.current) {
|
|
110
|
-
videoRef.current.playbackRate = nextSpeed;
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
const handleVolumeChange = (e) => {
|
|
114
|
-
const newVolume = parseFloat(e.target.value);
|
|
115
|
-
setVolume(newVolume);
|
|
116
|
-
if (videoRef.current) {
|
|
117
|
-
videoRef.current.volume = newVolume;
|
|
118
|
-
}
|
|
119
|
-
setIsMuted(newVolume === 0);
|
|
120
|
-
};
|
|
121
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: this is a side effect
|
|
122
|
-
useEffect(() => {
|
|
123
|
-
const video = videoRef.current;
|
|
124
|
-
if (!video)
|
|
125
|
-
return;
|
|
126
|
-
const handleTimeUpdate = () => setCurrentTime(video.currentTime);
|
|
127
|
-
const handleDurationChange = () => setDuration(video.duration);
|
|
128
|
-
const handleEnded = () => {
|
|
129
|
-
setIsPlaying(false);
|
|
130
|
-
setShowThumbnail(true);
|
|
131
|
-
};
|
|
132
|
-
const handleKeyDown = (e) => {
|
|
133
|
-
if (e.code === 'Space' || e.code === 'KeyK') {
|
|
134
|
-
e.preventDefault();
|
|
135
|
-
togglePlay();
|
|
136
|
-
}
|
|
137
|
-
if (e.code === 'KeyF') {
|
|
138
|
-
e.preventDefault();
|
|
139
|
-
toggleFullscreen();
|
|
140
|
-
}
|
|
141
|
-
if (e.code === 'KeyM') {
|
|
142
|
-
e.preventDefault();
|
|
143
|
-
toggleMute();
|
|
144
|
-
}
|
|
145
|
-
if (e.code === 'ArrowUp') {
|
|
146
|
-
e.preventDefault();
|
|
147
|
-
const newVolume = Math.min(video.volume + 0.1, 1);
|
|
148
|
-
video.volume = newVolume;
|
|
149
|
-
setVolume(newVolume);
|
|
150
|
-
setIsMuted(newVolume === 0);
|
|
151
|
-
}
|
|
152
|
-
if (e.code === 'ArrowDown') {
|
|
153
|
-
e.preventDefault();
|
|
154
|
-
const newVolume = Math.max(video.volume - 0.1, 0);
|
|
155
|
-
video.volume = newVolume;
|
|
156
|
-
setVolume(newVolume);
|
|
157
|
-
setIsMuted(newVolume === 0);
|
|
158
|
-
}
|
|
159
|
-
if (e.code === 'ArrowLeft') {
|
|
160
|
-
e.preventDefault();
|
|
161
|
-
video.currentTime = Math.max(video.currentTime - 10, 0);
|
|
162
|
-
}
|
|
163
|
-
if (e.code === 'ArrowRight') {
|
|
164
|
-
e.preventDefault();
|
|
165
|
-
video.currentTime = Math.min(video.currentTime + 10, video.duration);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
video.addEventListener('timeupdate', handleTimeUpdate);
|
|
169
|
-
video.addEventListener('durationchange', handleDurationChange);
|
|
170
|
-
video.addEventListener('ended', handleEnded);
|
|
171
|
-
video.addEventListener('progress', handleProgress);
|
|
172
|
-
video.addEventListener('keydown', handleKeyDown);
|
|
173
|
-
return () => {
|
|
174
|
-
video.removeEventListener('timeupdate', handleTimeUpdate);
|
|
175
|
-
video.removeEventListener('durationchange', handleDurationChange);
|
|
176
|
-
video.removeEventListener('ended', handleEnded);
|
|
177
|
-
video.removeEventListener('progress', handleProgress);
|
|
178
|
-
video.removeEventListener('keydown', handleKeyDown);
|
|
179
|
-
};
|
|
180
|
-
}, [toggleMute]);
|
|
181
|
-
useEffect(() => {
|
|
182
|
-
const handleFullscreenChange = () => {
|
|
183
|
-
setIsFullscreen(!!document.fullscreenElement);
|
|
184
|
-
};
|
|
185
|
-
document.addEventListener('fullscreenchange', handleFullscreenChange);
|
|
186
|
-
return () => {
|
|
187
|
-
document.removeEventListener('fullscreenchange', handleFullscreenChange);
|
|
188
|
-
};
|
|
189
|
-
}, []);
|
|
190
27
|
const renderBuffered = () => {
|
|
191
28
|
if (!buffered)
|
|
192
29
|
return null;
|
|
@@ -202,20 +39,10 @@ const VideoPlayer = ({ src, type = 'video/mp4', autoPlay = false, thumbnailUrl,
|
|
|
202
39
|
return segments;
|
|
203
40
|
};
|
|
204
41
|
const canShowTrickPlayTime = hoverTime !== null && hoverPosition !== null;
|
|
205
|
-
return (jsxs("div", { ref: containerRef, "data-testid": testId, className: cx('group/video relative',
|
|
206
|
-
|
|
207
|
-
'outline-focus-ring has-[video:focus-visible]:outline-2 has-[video:focus-visible]:outline-offset-4', className), children: [jsxs("div", { onClick: togglePlay, "data-testid": joinTestId(testId, 'thumbnail-play'), className: cx('group absolute inset-0 z-10 cursor-pointer rounded-[inherit] transition-all duration-300 ease-in', thumbnailUrl && showThumbnail ? 'visible opacity-100' : 'pointer-events-none invisible opacity-0'), children: [jsx("img", { src: thumbnailUrl, alt: thumbnailAlt, className: "size-full object-cover" }), jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: jsx("div", { className: cx('flex size-16 items-center justify-center', size !== 'sm' &&
|
|
208
|
-
'rounded-full bg-alpha-white/30 backdrop-blur transition duration-100 ease-linear group-hover:bg-alpha-white/40 hover:bg-alpha-white/40', thumbnailUrl && showThumbnail ? 'scale-100' : 'scale-90 duration-500', thumbnailButtonClassName), children: jsx(PlayIcon, { className: "size-5 text-fg-white" }) }) }), showThumbnailOverlay && jsx("div", { className: "absolute inset-0 rounded-[inherit] bg-black/10 outline-2 -outline-offset-1 outline-black/10" })] }), jsxs("video", { ref: videoRef, tabIndex: 0, autoPlay: autoPlay, "data-testid": joinTestId(testId, 'video'), className: "h-full w-full cursor-pointer rounded-[inherit] bg-black outline-1 -outline-offset-1 outline-black/10", onClick: togglePlay, onDoubleClick: toggleFullscreen, children: [jsx("source", { src: src, type: type }), "Your browser does not support the video tag."] }), jsx("div", { className: cx('absolute right-0 bottom-0 left-0 translate-y-4 transform bg-linear-to-t from-black/20 to-transparent opacity-0 transition duration-150 ease-in will-change-transform',
|
|
209
|
-
// Make it visible when video is hovered
|
|
210
|
-
'group-hover/video:translate-y-0 group-hover/video:opacity-100 group-hover/video:duration-200 group-hover/video:ease-out',
|
|
211
|
-
// Make it visible when video is focused
|
|
212
|
-
'group-has-[video:focus-visible]/video:translate-y-0 group-has-[video:focus-visible]/video:opacity-100 group-has-[video:focus-visible]/video:duration-200 group-has-[video:focus-visible]/video:ease-out',
|
|
213
|
-
// Sizes
|
|
214
|
-
size === 'sm' && 'px-1 pt-6 pb-1', size === 'md' && 'px-5 pt-10 pb-4', size === 'lg' && 'px-8 pt-12 pb-6'), children: jsxs("div", { className: cx('flex items-center', size === 'lg' ? 'gap-1' : 'gap-0.5'), children: [jsxs(VideoPlayerButton, { crossOffset: -12, tooltipPlacement: "top start", tooltipTitle: isPlaying ? 'Pause' : 'Play', tooltipDescription: "Space", tabIndex: -1, onClick: togglePlay, "aria-label": isPlaying ? 'Pause' : 'Play', "data-testid": joinTestId(testId, 'play'), className: "group/play relative", children: [jsx(PauseIcon, { className: cx('size-4 transition duration-100 ease-linear group-active/play:scale-[0.8]', isPlaying ? 'scale-100 opacity-100' : 'pointer-events-none scale-[0.8] opacity-0') }), jsx(PlayIcon, { className: cx('absolute size-4 transition duration-100 ease-linear group-active/play:scale-[0.8]', isPlaying ? 'pointer-events-none scale-[0.8] opacity-0' : 'scale-100 opacity-100') })] }), size !== 'lg' && (jsx(VideoPlayerButton, { tooltipPlacement: "top", tooltipTitle: isMuted ? 'Unmute' : 'Mute', tooltipDescription: "M", tabIndex: -1, onClick: toggleMute, "aria-label": isMuted ? 'Unmute' : 'Mute', "data-testid": joinTestId(testId, 'mute'), className: "group/play relative", children: isMuted || volume === 0 ? jsx(VolumeX, { className: "size-4" }) : jsx(VolumeMax, { className: "size-4" }) })), size === 'lg' && (jsxs("div", { className: "flex items-center rounded-md pr-2 outline-hidden transition duration-100 ease-linear hover:bg-alpha-white/20 hover:backdrop-blur-sm focus-visible:outline-offset-2 focus-visible:outline-white", children: [jsx("button", { tabIndex: -1, onClick: toggleMute, "aria-label": isMuted ? 'Unmute' : 'Mute', "data-testid": joinTestId(testId, 'mute'), className: "flex size-8 cursor-pointer items-center justify-center", children: isMuted || volume === 0 ? jsx(VolumeX, { className: "size-4 text-fg-white" }) : jsx(VolumeMax, { className: "size-4 text-fg-white" }) }), jsx("input", { type: "range", min: "0", max: "1", step: "0.1", value: volume, tabIndex: -1, onChange: handleVolumeChange, "aria-label": "Volume", "data-testid": joinTestId(testId, 'volume'), className: "h-1 w-11 cursor-pointer appearance-none rounded-full bg-alpha-white/30 [&::-moz-range-thumb]:h-3 [&::-moz-range-thumb]:w-3 [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:bg-white [&::-webkit-slider-thumb]:h-3 [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:translate-x-0 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-fg-white", style: {
|
|
42
|
+
return (jsxs("div", { ref: containerRef, "data-testid": testId, className: cx('group/video relative', 'outline-focus-ring has-[video:focus-visible]:outline-2 has-[video:focus-visible]:outline-offset-4', className), children: [jsxs("div", { onClick: togglePlay, "data-testid": joinTestId(testId, 'thumbnail-play'), className: cx('group absolute inset-0 z-10 cursor-pointer rounded-[inherit] transition-all duration-300 ease-in', thumbnailUrl && showThumbnail ? 'visible opacity-100' : 'pointer-events-none invisible opacity-0'), children: [jsx("img", { src: thumbnailUrl, alt: thumbnailAlt, className: "size-full object-cover" }), jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: jsx("div", { className: cx('flex size-16 items-center justify-center', size !== 'sm' &&
|
|
43
|
+
'rounded-full bg-alpha-white/30 backdrop-blur transition duration-100 ease-linear group-hover:bg-alpha-white/40 hover:bg-alpha-white/40', thumbnailUrl && showThumbnail ? 'scale-100' : 'scale-90 duration-500', thumbnailButtonClassName), children: jsx(PlayIcon, { className: "size-5 text-fg-white" }) }) }), showThumbnailOverlay && jsx("div", { className: "absolute inset-0 rounded-[inherit] bg-black/10 outline-2 -outline-offset-1 outline-black/10" })] }), jsxs("video", { ref: videoRef, tabIndex: 0, autoPlay: autoPlay, "data-testid": joinTestId(testId, 'video'), className: "h-full w-full cursor-pointer rounded-[inherit] bg-black outline-1 -outline-offset-1 outline-black/10", onClick: togglePlay, onDoubleClick: toggleFullscreen, children: [jsx("source", { src: src, type: type }), "Your browser does not support the video tag."] }), jsx("div", { className: cx('absolute right-0 bottom-0 left-0 translate-y-4 transform bg-linear-to-t from-black/20 to-transparent opacity-0 transition duration-150 ease-in will-change-transform', 'group-hover/video:translate-y-0 group-hover/video:opacity-100 group-hover/video:duration-200 group-hover/video:ease-out', 'group-has-[video:focus-visible]/video:translate-y-0 group-has-[video:focus-visible]/video:opacity-100 group-has-[video:focus-visible]/video:duration-200 group-has-[video:focus-visible]/video:ease-out', size === 'sm' && 'px-1 pt-6 pb-1', size === 'md' && 'px-5 pt-10 pb-4', size === 'lg' && 'px-8 pt-12 pb-6'), children: jsxs("div", { className: cx('flex items-center', size === 'lg' ? 'gap-1' : 'gap-0.5'), children: [jsxs(VideoPlayerButton, { crossOffset: -12, tooltipPlacement: "top start", tooltipTitle: isPlaying ? 'Pause' : 'Play', tooltipDescription: "Space", tabIndex: -1, onClick: togglePlay, "aria-label": isPlaying ? 'Pause' : 'Play', "data-testid": joinTestId(testId, 'play'), className: "group/play relative", children: [jsx(PauseIcon, { className: cx('size-4 transition duration-100 ease-linear group-active/play:scale-[0.8]', isPlaying ? 'scale-100 opacity-100' : 'pointer-events-none scale-[0.8] opacity-0') }), jsx(PlayIcon, { className: cx('absolute size-4 transition duration-100 ease-linear group-active/play:scale-[0.8]', isPlaying ? 'pointer-events-none scale-[0.8] opacity-0' : 'scale-100 opacity-100') })] }), size !== 'lg' && (jsx(VideoPlayerButton, { tooltipPlacement: "top", tooltipTitle: isMuted ? 'Unmute' : 'Mute', tooltipDescription: "M", tabIndex: -1, onClick: toggleMute, "aria-label": isMuted ? 'Unmute' : 'Mute', "data-testid": joinTestId(testId, 'mute'), className: "group/play relative", children: isMuted || volume === 0 ? jsx(VolumeX, { className: "size-4" }) : jsx(VolumeMax, { className: "size-4" }) })), size === 'lg' && (jsxs("div", { className: "flex items-center rounded-md pr-2 outline-hidden transition duration-100 ease-linear hover:bg-alpha-white/20 hover:backdrop-blur-sm focus-visible:outline-offset-2 focus-visible:outline-white", children: [jsx("button", { tabIndex: -1, onClick: toggleMute, "aria-label": isMuted ? 'Unmute' : 'Mute', "data-testid": joinTestId(testId, 'mute'), className: "flex size-8 cursor-pointer items-center justify-center", children: isMuted || volume === 0 ? jsx(VolumeX, { className: "size-4 text-fg-white" }) : jsx(VolumeMax, { className: "size-4 text-fg-white" }) }), jsx("input", { type: "range", min: "0", max: "1", step: "0.1", value: volume, tabIndex: -1, onChange: handleVolumeChange, "aria-label": "Volume", "data-testid": joinTestId(testId, 'volume'), className: "h-1 w-11 cursor-pointer appearance-none rounded-full bg-alpha-white/30 [&::-moz-range-thumb]:h-3 [&::-moz-range-thumb]:w-3 [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:bg-white [&::-webkit-slider-thumb]:h-3 [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:translate-x-0 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-fg-white", style: {
|
|
215
44
|
backgroundImage: `linear-gradient(to right, white ${volume * 100}%, transparent ${volume * 100}%)`,
|
|
216
|
-
} })] })), jsxs("div", { className: cx('flex min-w-0 flex-1 items-center gap-2 px-2',
|
|
217
|
-
// Visually hide progress bar when size is sm
|
|
218
|
-
size === 'sm' && 'pointer-events-none invisible opacity-0'), children: [jsx("span", { className: "pointer-events-none text-xs font-semibold text-white", children: formatTime(currentTime) }), jsx("div", { ref: progressRef, onClick: handleProgressClick, onMouseMove: handleProgressHover, "data-testid": joinTestId(testId, 'progress'), className: "group/progress -my-8 flex-1 cursor-pointer py-8", children: jsxs("div", { className: "relative h-2 flex-1 rounded-full bg-fg-white/30", children: [renderBuffered(), jsx("div", { className: "pointer-events-none absolute h-full min-w-2 rounded-full bg-fg-white", style: { width: `${(currentTime / duration) * 100}%` } }), jsx("div", { className: "pointer-events-none absolute top-1/2 h-8 w-px -translate-y-1/2 bg-fg-white/30 opacity-0 transition duration-100 ease-linear group-hover/progress:opacity-100", style: {
|
|
45
|
+
} })] })), jsxs("div", { className: cx('flex min-w-0 flex-1 items-center gap-2 px-2', size === 'sm' && 'pointer-events-none invisible opacity-0'), children: [jsx("span", { className: "pointer-events-none text-xs font-semibold text-white", children: formatTime(currentTime) }), jsx("div", { ref: progressRef, onClick: handleProgressClick, onMouseMove: handleProgressHover, "data-testid": joinTestId(testId, 'progress'), className: "group/progress -my-8 flex-1 cursor-pointer py-8", children: jsxs("div", { className: "relative h-2 flex-1 rounded-full bg-fg-white/30", children: [renderBuffered(), jsx("div", { className: "pointer-events-none absolute h-full min-w-2 rounded-full bg-fg-white", style: { width: `${(currentTime / duration) * 100}%` } }), jsx("div", { className: "pointer-events-none absolute top-1/2 h-8 w-px -translate-y-1/2 bg-fg-white/30 opacity-0 transition duration-100 ease-linear group-hover/progress:opacity-100", style: {
|
|
219
46
|
left: hoverPosition || 0,
|
|
220
47
|
} }), jsx("div", { className: "pointer-events-none absolute bottom-6 -translate-x-1/2 translate-y-2 transform text-xs font-semibold text-fg-white opacity-0 group-hover/progress:translate-y-0 group-hover/progress:opacity-100", style: {
|
|
221
48
|
left: hoverPosition || 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/organisms/VideoPlayer/index.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","AriaTooltipTrigger","AriaFocusable","AriaTooltip"],"mappings":";;;;;;;;AA+DO,MAAM,WAAW,GAAG,CAAC,EAC1B,GAAG,EACH,IAAI,GAAG,WAAW,EAClB,QAAQ,GAAG,KAAK,EAChB,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,SAAS,EACT,wBAAwB,EACxB,IAAI,GAAG,IAAI,EACX,GAAG,EACH,aAAa,EAAE,UAAU,GACR,KAAI;AACrB,IAAA,MAAM,MAAM,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;AAC3G,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAmB,IAAI,CAAC;AAC/C,IAAA,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC;AACjD,IAAA,MAAM,WAAW,GAAG,MAAM,CAAiB,IAAI,CAAC;IAChD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;IACjD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IACjD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IAC3C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAoB,IAAI,CAAC;IACjE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC;IAC/D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC;IACvE,MAAM,CAAC,aAAa,EAAE,gBAAg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A,EAAA,EAAK,SAAS,EAAC,kCAAkC,EAAA,QAAA,EAAE,YAAY,EAAA,CAAO,EAEtEA,aAAK,SAAS,EAAC,wIAAwI,EAAA,QAAA,EACpJ,kBAAkB,GACf,CAAA,EAAA,CACM,CAAA,EAAA,CACK;AAEzB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/organisms/VideoPlayer/index.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","AriaTooltipTrigger","AriaFocusable","AriaTooltip"],"mappings":";;;;;;;;;;AAiEO,MAAM,WAAW,GAAG,CAAC,EAC1B,GAAG,EACH,IAAI,GAAG,WAAW,EAClB,QAAQ,GAAG,KAAK,EAChB,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,SAAS,EACT,wBAAwB,EACxB,IAAI,GAAG,IAAI,EACX,GAAG,EACH,aAAa,EAAE,UAAU,GACR,KAAI;AACrB,IAAA,MAAM,MAAM,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;AAC3G,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAmB,IAAI,CAAC;AAC/C,IAAA,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC;IAEjD,MAAM,EACJ,WAAW,EACX,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,GACZ,GAAG,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;AAElC,IAAA,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,GAAG,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC;AAExF,IAAA,mBAAmB,CAA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,GAAG,KAAK,EAOT,KAAI;IACH,QACEC,KAACC,cAAkB,EAAA,EAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAA,QAAA,EAAA,CAC3CF,GAAA,CAACG,SAAa,EAAA,EAAA,QAAA,EACZH,GAAA,CAAA,QAAA,EAAA,EAAA,GACM,KAAK,EACT,SAAS,EAAE,EAAE,CACX,kRAAkR,EAClR,KAAK,CAAC,SAAS,CAChB,iBACY,UAAU,EAAA,QAAA,EAEtB,QAAQ,EAAA,CACF,EAAA,CACK,EAChBC,IAAA,CAACG,OAAW,IACV,MAAM,EAAE,CAAC,EACT,SAAS,EAAE,gBAAgB,EAC3B,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,KACnC,EAAE,CACA,mJAAmJ,EACnJ,UAAU,IAAI,+EAA+E,EAC7F,SAAS,IAAI,gFAAgF,CAC9F,aAGHJ,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,kCAAkC,EAAA,QAAA,EAAE,YAAY,EAAA,CAAO,EAEtEA,aAAK,SAAS,EAAC,wIAAwI,EAAA,QAAA,EACpJ,kBAAkB,GACf,CAAA,EAAA,CACM,CAAA,EAAA,CACK;AAEzB,CAAC;;;;"}
|
|
@@ -17,7 +17,7 @@ const screens = {
|
|
|
17
17
|
*
|
|
18
18
|
* @returns A boolean indicating whether the viewport size applies.
|
|
19
19
|
*/
|
|
20
|
-
const
|
|
20
|
+
const useBreakpoints = (size) => {
|
|
21
21
|
const query = `(min-width: ${screens[size]})`;
|
|
22
22
|
const getMatches = () => (typeof window !== 'undefined' && typeof window.matchMedia === 'function' ? window.matchMedia(query).matches : false);
|
|
23
23
|
const [matches, setMatches] = React.useState(getMatches);
|
|
@@ -34,6 +34,9 @@ const useBreakpoint = (size) => {
|
|
|
34
34
|
}, [query]);
|
|
35
35
|
return matches;
|
|
36
36
|
};
|
|
37
|
+
/** @deprecated Use `useBreakpoints` instead — the export name now matches its subpath, `hooks/useBreakpoints`. */
|
|
38
|
+
const useBreakpoint = useBreakpoints;
|
|
37
39
|
|
|
38
40
|
exports.useBreakpoint = useBreakpoint;
|
|
41
|
+
exports.useBreakpoints = useBreakpoints;
|
|
39
42
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/hooks/useBreakpoints/index.ts"],"sourcesContent":[null],"names":["useState","useEffect"],"mappings":";;;;AAIA,MAAM,OAAO,GAAG;AACd,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,KAAK,EAAE,QAAQ;CACP;AAIV;;;;;;;AAOG;AACI,MAAM,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/hooks/useBreakpoints/index.ts"],"sourcesContent":[null],"names":["useState","useEffect"],"mappings":";;;;AAIA,MAAM,OAAO,GAAG;AACd,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,KAAK,EAAE,QAAQ;CACP;AAIV;;;;;;;AAOG;AACI,MAAM,cAAc,GAAG,CAAC,IAAgB,KAAI;IACjD,MAAM,KAAK,GAAG,CAAA,YAAA,EAAe,OAAO,CAAC,IAAI,CAAC,GAAG;AAE7C,IAAA,MAAM,UAAU,GAAG,OAAO,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,KAAK,CAAC;IAE9I,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAGA,cAAQ,CAAC,UAAU,CAAC;IAElDC,eAAS,CAAC,MAAK;AACb,QAAA,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,EAAE;YAC5E,UAAU,CAAC,KAAK,CAAC;YACjB;QACF;QAEA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC;AAE3C,QAAA,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC;AAE9B,QAAA,MAAM,YAAY,GAAG,CAAC,KAA0B,KAAK,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC;AAE9E,QAAA,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC;QACnD,OAAO,MAAM,UAAU,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC;AACrE,IAAA,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAEX,IAAA,OAAO,OAAO;AAChB;AAEA;AACO,MAAM,aAAa,GAAG;;;;;"}
|
|
@@ -14,6 +14,8 @@ type Breakpoint = keyof typeof screens;
|
|
|
14
14
|
*
|
|
15
15
|
* @returns A boolean indicating whether the viewport size applies.
|
|
16
16
|
*/
|
|
17
|
+
export declare const useBreakpoints: (size: Breakpoint) => boolean;
|
|
18
|
+
/** @deprecated Use `useBreakpoints` instead — the export name now matches its subpath, `hooks/useBreakpoints`. */
|
|
17
19
|
export declare const useBreakpoint: (size: Breakpoint) => boolean;
|
|
18
20
|
export {};
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBreakpoints/index.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,OAAO;;;;;;CAMH,CAAC;AAEX,KAAK,UAAU,GAAG,MAAM,OAAO,OAAO,CAAC;AAEvC;;;;;;;GAOG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBreakpoints/index.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,OAAO;;;;;;CAMH,CAAC;AAEX,KAAK,UAAU,GAAG,MAAM,OAAO,OAAO,CAAC;AAEvC;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,UAAU,YAwB9C,CAAC;AAEF,kHAAkH;AAClH,eAAO,MAAM,aAAa,SA3BW,UAAU,YA2BJ,CAAC"}
|
|
@@ -15,7 +15,7 @@ const screens = {
|
|
|
15
15
|
*
|
|
16
16
|
* @returns A boolean indicating whether the viewport size applies.
|
|
17
17
|
*/
|
|
18
|
-
const
|
|
18
|
+
const useBreakpoints = (size) => {
|
|
19
19
|
const query = `(min-width: ${screens[size]})`;
|
|
20
20
|
const getMatches = () => (typeof window !== 'undefined' && typeof window.matchMedia === 'function' ? window.matchMedia(query).matches : false);
|
|
21
21
|
const [matches, setMatches] = useState(getMatches);
|
|
@@ -32,6 +32,8 @@ const useBreakpoint = (size) => {
|
|
|
32
32
|
}, [query]);
|
|
33
33
|
return matches;
|
|
34
34
|
};
|
|
35
|
+
/** @deprecated Use `useBreakpoints` instead — the export name now matches its subpath, `hooks/useBreakpoints`. */
|
|
36
|
+
const useBreakpoint = useBreakpoints;
|
|
35
37
|
|
|
36
|
-
export { useBreakpoint };
|
|
38
|
+
export { useBreakpoint, useBreakpoints };
|
|
37
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/hooks/useBreakpoints/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAIA,MAAM,OAAO,GAAG;AACd,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,KAAK,EAAE,QAAQ;CACP;AAIV;;;;;;;AAOG;AACI,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/hooks/useBreakpoints/index.ts"],"sourcesContent":[null],"names":[],"mappings":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config, read by both `index.tsx` and `index.native.tsx`.
|
|
3
|
+
*
|
|
4
|
+
* `sizes` holds the circle geometry in pixels — `wh` is the bounding box, `c` the SVG centre
|
|
5
|
+
* (web only), `r` the radius. Numbers rather than Tailwind classes because the native
|
|
6
|
+
* implementation needs them as `style` values: React Native has no SVG host element, so it
|
|
7
|
+
* draws the circle as a `View` with a half-width `borderRadius`.
|
|
8
|
+
*
|
|
9
|
+
* `colors` maps each semantic name to the utility its platform needs. Web fills an SVG via
|
|
10
|
+
* `currentColor`, so it takes a `text-*` utility; React Native fills a `View`, which ignores
|
|
11
|
+
* `color` entirely and needs `bg-*`. Both strings are listed per colour rather than derived by
|
|
12
|
+
* swapping the prefix: utilities are generated from property-specific token namespaces (see the
|
|
13
|
+
* header comment in `ui-tokens/src/tokens.css`), so a name present in one is not guaranteed in
|
|
14
|
+
* another. `brand-solid` is exactly that case — `bg-brand-solid` exists but `text-brand-solid`
|
|
15
|
+
* generates no utility at all, so web pairs it with `text-fg-brand-primary`. Both resolve to
|
|
16
|
+
* `--color-brand-600` in light mode; in dark mode `fg-brand-primary` is brand-500 against
|
|
17
|
+
* `bg-brand-solid`'s brand-600, a divergence to revisit if dark mode ships.
|
|
18
|
+
*
|
|
19
|
+
* Complete literal class names, never template literals — Tailwind scans source for whole
|
|
20
|
+
* candidates and will not generate a class assembled at runtime.
|
|
21
|
+
*/
|
|
22
|
+
export declare const styles: {
|
|
23
|
+
sizes: {
|
|
24
|
+
sm: {
|
|
25
|
+
wh: number;
|
|
26
|
+
c: number;
|
|
27
|
+
r: number;
|
|
28
|
+
};
|
|
29
|
+
md: {
|
|
30
|
+
wh: number;
|
|
31
|
+
c: number;
|
|
32
|
+
r: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
colors: {
|
|
36
|
+
'brand-solid': {
|
|
37
|
+
web: string;
|
|
38
|
+
native: string;
|
|
39
|
+
};
|
|
40
|
+
'fg-primary': {
|
|
41
|
+
web: string;
|
|
42
|
+
native: string;
|
|
43
|
+
};
|
|
44
|
+
'fg-quaternary': {
|
|
45
|
+
web: string;
|
|
46
|
+
native: string;
|
|
47
|
+
};
|
|
48
|
+
'fg-success-secondary': {
|
|
49
|
+
web: string;
|
|
50
|
+
native: string;
|
|
51
|
+
};
|
|
52
|
+
'border-primary': {
|
|
53
|
+
web: string;
|
|
54
|
+
native: string;
|
|
55
|
+
};
|
|
56
|
+
'utility-neutral-500': {
|
|
57
|
+
web: string;
|
|
58
|
+
native: string;
|
|
59
|
+
};
|
|
60
|
+
'utility-brand-500': {
|
|
61
|
+
web: string;
|
|
62
|
+
native: string;
|
|
63
|
+
};
|
|
64
|
+
'utility-red-500': {
|
|
65
|
+
web: string;
|
|
66
|
+
native: string;
|
|
67
|
+
};
|
|
68
|
+
'utility-yellow-500': {
|
|
69
|
+
web: string;
|
|
70
|
+
native: string;
|
|
71
|
+
};
|
|
72
|
+
'utility-green-500': {
|
|
73
|
+
web: string;
|
|
74
|
+
native: string;
|
|
75
|
+
};
|
|
76
|
+
'utility-slate-500': {
|
|
77
|
+
web: string;
|
|
78
|
+
native: string;
|
|
79
|
+
};
|
|
80
|
+
'utility-sky-500': {
|
|
81
|
+
web: string;
|
|
82
|
+
native: string;
|
|
83
|
+
};
|
|
84
|
+
'utility-blue-500': {
|
|
85
|
+
web: string;
|
|
86
|
+
native: string;
|
|
87
|
+
};
|
|
88
|
+
'utility-indigo-500': {
|
|
89
|
+
web: string;
|
|
90
|
+
native: string;
|
|
91
|
+
};
|
|
92
|
+
'utility-purple-500': {
|
|
93
|
+
web: string;
|
|
94
|
+
native: string;
|
|
95
|
+
};
|
|
96
|
+
'utility-pink-500': {
|
|
97
|
+
web: string;
|
|
98
|
+
native: string;
|
|
99
|
+
};
|
|
100
|
+
'utility-orange-500': {
|
|
101
|
+
web: string;
|
|
102
|
+
native: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export type DotSize = keyof typeof styles.sizes;
|
|
107
|
+
export type DotColor = keyof typeof styles.colors;
|
|
108
|
+
export declare const dotColorNames: DotColor[];
|
|
109
|
+
//# sourceMappingURL=Dot.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dot.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Dot/Dot.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBlB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC;AAChD,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,MAAM,CAAC,MAAM,CAAC;AAElD,eAAO,MAAM,aAAa,EAAiC,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared `Dot` style config, read by both `index.tsx` and `index.native.tsx`.
|
|
3
|
+
*
|
|
4
|
+
* `sizes` holds the circle geometry in pixels — `wh` is the bounding box, `c` the SVG centre
|
|
5
|
+
* (web only), `r` the radius. Numbers rather than Tailwind classes because the native
|
|
6
|
+
* implementation needs them as `style` values: React Native has no SVG host element, so it
|
|
7
|
+
* draws the circle as a `View` with a half-width `borderRadius`.
|
|
8
|
+
*
|
|
9
|
+
* `colors` maps each semantic name to the utility its platform needs. Web fills an SVG via
|
|
10
|
+
* `currentColor`, so it takes a `text-*` utility; React Native fills a `View`, which ignores
|
|
11
|
+
* `color` entirely and needs `bg-*`. Both strings are listed per colour rather than derived by
|
|
12
|
+
* swapping the prefix: utilities are generated from property-specific token namespaces (see the
|
|
13
|
+
* header comment in `ui-tokens/src/tokens.css`), so a name present in one is not guaranteed in
|
|
14
|
+
* another. `brand-solid` is exactly that case — `bg-brand-solid` exists but `text-brand-solid`
|
|
15
|
+
* generates no utility at all, so web pairs it with `text-fg-brand-primary`. Both resolve to
|
|
16
|
+
* `--color-brand-600` in light mode; in dark mode `fg-brand-primary` is brand-500 against
|
|
17
|
+
* `bg-brand-solid`'s brand-600, a divergence to revisit if dark mode ships.
|
|
18
|
+
*
|
|
19
|
+
* Complete literal class names, never template literals — Tailwind scans source for whole
|
|
20
|
+
* candidates and will not generate a class assembled at runtime.
|
|
21
|
+
*/
|
|
22
|
+
const styles = {
|
|
23
|
+
sizes: {
|
|
24
|
+
sm: { wh: 8, c: 4, r: 2.5 },
|
|
25
|
+
md: { wh: 10, c: 5, r: 4 },
|
|
26
|
+
},
|
|
27
|
+
colors: {
|
|
28
|
+
'brand-solid': { web: 'text-fg-brand-primary', native: 'bg-brand-solid' },
|
|
29
|
+
'fg-primary': { web: 'text-fg-primary', native: 'bg-fg-primary' },
|
|
30
|
+
'fg-quaternary': { web: 'text-fg-quaternary', native: 'bg-fg-quaternary' },
|
|
31
|
+
'fg-success-secondary': { web: 'text-fg-success-secondary', native: 'bg-fg-success-secondary' },
|
|
32
|
+
'border-primary': { web: 'text-border-primary', native: 'bg-border-primary' },
|
|
33
|
+
'utility-neutral-500': { web: 'text-utility-neutral-500', native: 'bg-utility-neutral-500' },
|
|
34
|
+
'utility-brand-500': { web: 'text-utility-brand-500', native: 'bg-utility-brand-500' },
|
|
35
|
+
'utility-red-500': { web: 'text-utility-red-500', native: 'bg-utility-red-500' },
|
|
36
|
+
'utility-yellow-500': { web: 'text-utility-yellow-500', native: 'bg-utility-yellow-500' },
|
|
37
|
+
'utility-green-500': { web: 'text-utility-green-500', native: 'bg-utility-green-500' },
|
|
38
|
+
'utility-slate-500': { web: 'text-utility-slate-500', native: 'bg-utility-slate-500' },
|
|
39
|
+
'utility-sky-500': { web: 'text-utility-sky-500', native: 'bg-utility-sky-500' },
|
|
40
|
+
'utility-blue-500': { web: 'text-utility-blue-500', native: 'bg-utility-blue-500' },
|
|
41
|
+
'utility-indigo-500': { web: 'text-utility-indigo-500', native: 'bg-utility-indigo-500' },
|
|
42
|
+
'utility-purple-500': { web: 'text-utility-purple-500', native: 'bg-utility-purple-500' },
|
|
43
|
+
'utility-pink-500': { web: 'text-utility-pink-500', native: 'bg-utility-pink-500' },
|
|
44
|
+
'utility-orange-500': { web: 'text-utility-orange-500', native: 'bg-utility-orange-500' },
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { styles };
|
|
49
|
+
//# sourceMappingURL=Dot.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dot.styles.js","sources":["../../../../../../src/components/atoms/Dot/Dot.styles.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;AAoBG;AACI,MAAM,MAAM,GAAG;AACpB,IAAA,KAAK,EAAE;AACL,QAAA,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE;AAC3B,QAAA,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAC3B,KAAA;AACD,IAAA,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,MAAM,EAAE,gBAAgB,EAAE;QACzE,YAAY,EAAE,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,EAAE,eAAe,EAAE;QACjE,eAAe,EAAE,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,EAAE,kBAAkB,EAAE;QAC1E,sBAAsB,EAAE,EAAE,GAAG,EAAE,2BAA2B,EAAE,MAAM,EAAE,yBAAyB,EAAE;QAC/F,gBAAgB,EAAE,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,mBAAmB,EAAE;QAC7E,qBAAqB,EAAE,EAAE,GAAG,EAAE,0BAA0B,EAAE,MAAM,EAAE,wBAAwB,EAAE;QAC5F,mBAAmB,EAAE,EAAE,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,sBAAsB,EAAE;QACtF,iBAAiB,EAAE,EAAE,GAAG,EAAE,sBAAsB,EAAE,MAAM,EAAE,oBAAoB,EAAE;QAChF,oBAAoB,EAAE,EAAE,GAAG,EAAE,yBAAyB,EAAE,MAAM,EAAE,uBAAuB,EAAE;QACzF,mBAAmB,EAAE,EAAE,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,sBAAsB,EAAE;QACtF,mBAAmB,EAAE,EAAE,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,sBAAsB,EAAE;QACtF,iBAAiB,EAAE,EAAE,GAAG,EAAE,sBAAsB,EAAE,MAAM,EAAE,oBAAoB,EAAE;QAChF,kBAAkB,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,MAAM,EAAE,qBAAqB,EAAE;QACnF,oBAAoB,EAAE,EAAE,GAAG,EAAE,yBAAyB,EAAE,MAAM,EAAE,uBAAuB,EAAE;QACzF,oBAAoB,EAAE,EAAE,GAAG,EAAE,yBAAyB,EAAE,MAAM,EAAE,uBAAuB,EAAE;QACzF,kBAAkB,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,MAAM,EAAE,qBAAqB,EAAE;QACnF,oBAAoB,EAAE,EAAE,GAAG,EAAE,yBAAyB,EAAE,MAAM,EAAE,uBAAuB,EAAE;AAC1F,KAAA;;;;;"}
|
|
@@ -1,12 +1,28 @@
|
|
|
1
|
+
import { type DotColor, type DotSize } from './Dot.styles';
|
|
2
|
+
export type { DotColor, DotSize } from './Dot.styles';
|
|
3
|
+
export interface DotProps {
|
|
4
|
+
size?: DotSize;
|
|
5
|
+
/**
|
|
6
|
+
* Semantic fill colour, resolved per platform (`Dot.styles.ts`). Takes the same values as
|
|
7
|
+
* web. Defaults to `fg-primary` because React Native cannot inherit a colour the way web's
|
|
8
|
+
* `currentColor` does — without a default the circle would render fully transparent.
|
|
9
|
+
*/
|
|
10
|
+
color?: DotColor;
|
|
11
|
+
/** Layout classes only. Colour goes through `color`, which a `View` needs as a `bg-*` utility. */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Overrides the generated `testID` (defaults to `fd-dot`). */
|
|
14
|
+
'data-testid'?: string;
|
|
15
|
+
}
|
|
1
16
|
/**
|
|
2
|
-
* `Dot`
|
|
17
|
+
* React Native `Dot` — a filled circle drawn as a `View` with a half-width `borderRadius`,
|
|
18
|
+
* inside a fixed-size box matching web's SVG bounding box, since React Native has no SVG
|
|
19
|
+
* host element.
|
|
3
20
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* matching `index.js`, so Metro cannot bundle this module either.
|
|
21
|
+
* `View` `className` styling is confirmed working on-device (see `Avatar`'s root `View`),
|
|
22
|
+
* unlike the `Text` `className` bug, so colour stays token-driven here rather than falling
|
|
23
|
+
* back to a hardcoded hex.
|
|
8
24
|
*
|
|
9
|
-
*
|
|
10
|
-
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
25
|
+
* @summary status/list marker dot (React Native)
|
|
11
26
|
*/
|
|
12
|
-
export declare const
|
|
27
|
+
export declare const Dot: ({ size, color, className, "data-testid": dataTestId }: DotProps) => import("react").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Dot/index.native.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAU,MAAM,cAAc,CAAC;AAEnE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,GAAG,GAAI,uDAA6E,QAAQ,gCASxG,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cx } from '../../../utilities/cx/index.js';
|
|
3
|
+
import { useResolvedTestId } from '../../../utilities/testIdUtils/index.js';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { styles } from './Dot.styles.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* React Native `Dot` — a filled circle drawn as a `View` with a half-width `borderRadius`,
|
|
9
|
+
* inside a fixed-size box matching web's SVG bounding box, since React Native has no SVG
|
|
10
|
+
* host element.
|
|
11
|
+
*
|
|
12
|
+
* `View` `className` styling is confirmed working on-device (see `Avatar`'s root `View`),
|
|
13
|
+
* unlike the `Text` `className` bug, so colour stays token-driven here rather than falling
|
|
14
|
+
* back to a hardcoded hex.
|
|
15
|
+
*
|
|
16
|
+
* @summary status/list marker dot (React Native)
|
|
17
|
+
*/
|
|
18
|
+
const Dot = ({ size = 'md', color = 'fg-primary', className, 'data-testid': dataTestId }) => {
|
|
19
|
+
const dotTestId = useResolvedTestId({ testId: dataTestId, segment: 'dot', rootName: 'dot' });
|
|
20
|
+
const { wh, r } = styles.sizes[size];
|
|
21
|
+
return (jsx(View, { testID: dotTestId, className: cx('items-center justify-center', className), style: { width: wh, height: wh }, children: jsx(View, { className: styles.colors[color].native, style: { width: r * 2, height: r * 2, borderRadius: r } }) }));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { Dot };
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/components/atoms/Dot/index.native.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;AAqBA;;;;;;;;;;AAUG;MACU,GAAG,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,KAAK,GAAG,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAY,KAAI;AAC3G,IAAA,MAAM,SAAS,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAC5F,IAAA,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;AAEpC,IAAA,QACEA,GAAA,CAAC,IAAI,EAAA,EAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAA,QAAA,EAChHA,IAAC,IAAI,EAAA,EAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,EAAA,CAAI,EAAA,CACpG;AAEX;;;;"}
|