@ilo-org/react 0.13.0 → 0.14.1
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/lib/cjs/components/Cards/CardGroup/CardGroup.js +0 -1
- package/lib/cjs/components/Cards/CardGroup/index.js +197 -160
- package/lib/cjs/components/Cards/FactlistCard/FactListCard.js +0 -1
- package/lib/cjs/components/Cards/FactlistCard/index.js +0 -1
- package/lib/cjs/components/Cards/TextCard/TextCard.js +1 -1
- package/lib/cjs/components/List/List.js +9 -11
- package/lib/cjs/components/List/ListItem.js +4 -7
- package/lib/cjs/components/List/index.js +1 -2
- package/lib/cjs/components/index.js +0 -1
- package/lib/cjs/index.js +0 -1
- package/lib/esm/components/Cards/CardGroup/CardGroup.js +0 -1
- package/lib/esm/components/Cards/CardGroup/index.js +197 -160
- package/lib/esm/components/Cards/FactlistCard/FactListCard.js +0 -1
- package/lib/esm/components/Cards/FactlistCard/index.js +0 -1
- package/lib/esm/components/Cards/TextCard/TextCard.js +1 -1
- package/lib/esm/components/List/List.js +10 -12
- package/lib/esm/components/List/ListItem.js +4 -7
- package/lib/esm/components/List/index.js +1 -2
- package/lib/esm/components/index.js +0 -1
- package/lib/esm/index.js +0 -1
- package/lib/types/react/src/components/List/List.props.d.ts +2 -9
- package/lib/types/react/src/components/List/ListItem.props.d.ts +0 -6
- package/lib/types/react/src/types/index.d.ts +0 -2
- package/package.json +35 -12
- package/.eslintrc.cjs +0 -39
- package/CHANGELOG.md +0 -858
- package/lib/cjs/ListCtx-14aa546f.js +0 -9
- package/lib/esm/ListCtx-da435fdf.js +0 -6
- package/lib/types/react/src/components/List/ListCtx.d.ts +0 -4
- package/rollup.config.mjs +0 -70
- package/src/components/Accordion/Accordion.args.ts +0 -16
- package/src/components/Accordion/Accordion.props.ts +0 -41
- package/src/components/Accordion/Accordion.tsx +0 -62
- package/src/components/Accordion/AccordionButton.props.ts +0 -13
- package/src/components/Accordion/AccordionButton.tsx +0 -58
- package/src/components/Accordion/AccordionCtx.ts +0 -9
- package/src/components/Accordion/AccordionItem.props.ts +0 -25
- package/src/components/Accordion/AccordionItem.tsx +0 -27
- package/src/components/Accordion/AccordionPanel.props.ts +0 -25
- package/src/components/Accordion/AccordionPanel.tsx +0 -46
- package/src/components/Accordion/index.ts +0 -4
- package/src/components/Breadcrumb/Breadcrumb.args.ts +0 -61
- package/src/components/Breadcrumb/Breadcrumb.props.ts +0 -13
- package/src/components/Breadcrumb/Breadcrumb.tsx +0 -82
- package/src/components/Breadcrumb/index.ts +0 -1
- package/src/components/Button/Button.args.ts +0 -35
- package/src/components/Button/Button.props.ts +0 -89
- package/src/components/Button/Button.tsx +0 -77
- package/src/components/Button/index.ts +0 -2
- package/src/components/Callout/Callout.args.ts +0 -38
- package/src/components/Callout/Callout.props.ts +0 -60
- package/src/components/Callout/Callout.tsx +0 -80
- package/src/components/Callout/index.ts +0 -2
- package/src/components/Cards/CardGroup/CardGroup.args.ts +0 -768
- package/src/components/Cards/CardGroup/CardGroup.props.ts +0 -78
- package/src/components/Cards/CardGroup/CardGroup.tsx +0 -54
- package/src/components/Cards/CardGroup/index.tsx +0 -3
- package/src/components/Cards/DataCard/DataCard.args.ts +0 -69
- package/src/components/Cards/DataCard/DataCard.props.ts +0 -60
- package/src/components/Cards/DataCard/DataCard.tsx +0 -107
- package/src/components/Cards/DataCard/index.tsx +0 -3
- package/src/components/Cards/DetailCard/DetailCard.args.ts +0 -17
- package/src/components/Cards/DetailCard/DetailCard.props.ts +0 -43
- package/src/components/Cards/DetailCard/DetailCard.tsx +0 -62
- package/src/components/Cards/DetailCard/index.tsx +0 -3
- package/src/components/Cards/FactlistCard/FactListCard.args.ts +0 -14
- package/src/components/Cards/FactlistCard/FactListCard.props.ts +0 -19
- package/src/components/Cards/FactlistCard/FactListCard.tsx +0 -42
- package/src/components/Cards/FactlistCard/index.tsx +0 -3
- package/src/components/Cards/FeatureCard/FeatureCard.args.ts +0 -30
- package/src/components/Cards/FeatureCard/FeatureCard.props.ts +0 -38
- package/src/components/Cards/FeatureCard/FeatureCard.tsx +0 -69
- package/src/components/Cards/FeatureCard/index.tsx +0 -3
- package/src/components/Cards/MultilinkCard/MultiLinkCard.tsx +0 -76
- package/src/components/Cards/MultilinkCard/MultilinkCard.args.ts +0 -33
- package/src/components/Cards/MultilinkCard/MultilinkCard.props.ts +0 -30
- package/src/components/Cards/MultilinkCard/index.tsx +0 -3
- package/src/components/Cards/PromoCard/PromoCard.args.ts +0 -19
- package/src/components/Cards/PromoCard/PromoCard.props.ts +0 -36
- package/src/components/Cards/PromoCard/PromoCard.tsx +0 -60
- package/src/components/Cards/PromoCard/index.tsx +0 -3
- package/src/components/Cards/StatCard/StatCard.args.ts +0 -14
- package/src/components/Cards/StatCard/StatCard.props.ts +0 -21
- package/src/components/Cards/StatCard/StatCard.tsx +0 -36
- package/src/components/Cards/StatCard/index.tsx +0 -3
- package/src/components/Cards/TextCard/TextCard.args.ts +0 -21
- package/src/components/Cards/TextCard/TextCard.props.ts +0 -32
- package/src/components/Cards/TextCard/TextCard.tsx +0 -62
- package/src/components/Cards/TextCard/index.tsx +0 -3
- package/src/components/Checkbox/Checkbox.args.ts +0 -42
- package/src/components/Checkbox/Checkbox.props.ts +0 -5
- package/src/components/Checkbox/Checkbox.tsx +0 -94
- package/src/components/Checkbox/index.ts +0 -2
- package/src/components/Collapse/Collapse.props.ts +0 -92
- package/src/components/Collapse/Collapse.tsx +0 -130
- package/src/components/Collapse/index.ts +0 -1
- package/src/components/ContextMenu/ContextMenu.args.ts +0 -62
- package/src/components/ContextMenu/ContextMenu.props.ts +0 -28
- package/src/components/ContextMenu/ContextMenu.tsx +0 -32
- package/src/components/ContextMenu/index.ts +0 -1
- package/src/components/Credit/Credit.args.ts +0 -14
- package/src/components/Credit/Credit.props.ts +0 -11
- package/src/components/Credit/Credit.tsx +0 -41
- package/src/components/Credit/index.ts +0 -1
- package/src/components/DatePicker/DatePicker.args.ts +0 -56
- package/src/components/DatePicker/DatePicker.props.ts +0 -26
- package/src/components/DatePicker/DatePicker.tsx +0 -80
- package/src/components/DatePicker/index.ts +0 -1
- package/src/components/Dropdown/Dropdown.args.ts +0 -70
- package/src/components/Dropdown/Dropdown.props.ts +0 -53
- package/src/components/Dropdown/Dropdown.tsx +0 -95
- package/src/components/Dropdown/index.ts +0 -1
- package/src/components/Empty/Empty.props.ts +0 -13
- package/src/components/Empty/Empty.tsx +0 -16
- package/src/components/Empty/index.ts +0 -1
- package/src/components/Fieldset/Fieldset.props.ts +0 -33
- package/src/components/Fieldset/Fieldset.tsx +0 -96
- package/src/components/Fieldset/index.ts +0 -1
- package/src/components/FileUpload/FileUpload.args.ts +0 -60
- package/src/components/FileUpload/FileUpload.props.ts +0 -21
- package/src/components/FileUpload/FileUpload.tsx +0 -116
- package/src/components/FileUpload/index.ts +0 -1
- package/src/components/Footer/Footer.args.ts +0 -74
- package/src/components/Footer/Footer.props.ts +0 -60
- package/src/components/Footer/Footer.tsx +0 -99
- package/src/components/Footer/index.ts +0 -1
- package/src/components/Form/Form.args.ts +0 -5
- package/src/components/Form/Form.props.ts +0 -8
- package/src/components/Form/Form.tsx +0 -23
- package/src/components/Form/index.ts +0 -2
- package/src/components/FormControl/FormControl.props.ts +0 -72
- package/src/components/FormControl/FormControl.tsx +0 -169
- package/src/components/FormControl/index.ts +0 -2
- package/src/components/FormElement/FormElement.props.ts +0 -60
- package/src/components/FormElement/FormElement.tsx +0 -19
- package/src/components/FormElement/index.ts +0 -1
- package/src/components/GlobalProvider/GlobalCtx.ts +0 -6
- package/src/components/GlobalProvider/GlobalProvider.props.ts +0 -15
- package/src/components/GlobalProvider/GlobalProvider.tsx +0 -21
- package/src/components/GlobalProvider/index.ts +0 -2
- package/src/components/Heading/Heading.args.ts +0 -49
- package/src/components/Heading/Heading.props.ts +0 -24
- package/src/components/Heading/Heading.tsx +0 -28
- package/src/components/Heading/index.ts +0 -1
- package/src/components/Hero/Hero.args.ts +0 -136
- package/src/components/Hero/Hero.props.ts +0 -62
- package/src/components/Hero/Hero.tsx +0 -94
- package/src/components/Hero/HeroCard.props.ts +0 -54
- package/src/components/Hero/HeroCard.tsx +0 -65
- package/src/components/Hero/index.ts +0 -2
- package/src/components/Icon/Icon.args.ts +0 -15
- package/src/components/Icon/Icon.props.ts +0 -16
- package/src/components/Icon/Icon.tsx +0 -25
- package/src/components/Icon/index.ts +0 -1
- package/src/components/Image/Image.args.ts +0 -29
- package/src/components/Image/Image.props.ts +0 -43
- package/src/components/Image/Image.tsx +0 -51
- package/src/components/Image/index.ts +0 -1
- package/src/components/Input/Input.args.ts +0 -139
- package/src/components/Input/Input.props.ts +0 -65
- package/src/components/Input/Input.tsx +0 -65
- package/src/components/Input/index.ts +0 -1
- package/src/components/Link/Link.props.ts +0 -39
- package/src/components/Link/Link.tsx +0 -42
- package/src/components/Link/index.ts +0 -1
- package/src/components/LinkList/LinkList.args.ts +0 -193
- package/src/components/LinkList/LinkList.props.ts +0 -52
- package/src/components/LinkList/LinkList.tsx +0 -59
- package/src/components/LinkList/index.ts +0 -1
- package/src/components/List/List.args.ts +0 -34
- package/src/components/List/List.props.ts +0 -37
- package/src/components/List/List.tsx +0 -41
- package/src/components/List/ListCtx.ts +0 -7
- package/src/components/List/ListItem.props.ts +0 -25
- package/src/components/List/ListItem.tsx +0 -22
- package/src/components/List/index.ts +0 -2
- package/src/components/Loading/Loading.args.ts +0 -55
- package/src/components/Loading/Loading.props.ts +0 -23
- package/src/components/Loading/Loading.tsx +0 -24
- package/src/components/Loading/index.ts +0 -1
- package/src/components/LocalNav/LocalNav.args.ts +0 -64
- package/src/components/LocalNav/LocalNav.props.ts +0 -56
- package/src/components/LocalNav/LocalNav.tsx +0 -181
- package/src/components/LocalNav/index.ts +0 -1
- package/src/components/Logo/Logo.args.ts +0 -45
- package/src/components/Logo/Logo.props.ts +0 -67
- package/src/components/Logo/Logo.tsx +0 -247
- package/src/components/Logo/index.ts +0 -1
- package/src/components/LogoGrid/LogoGrid.args.ts +0 -50
- package/src/components/LogoGrid/LogoGrid.props.ts +0 -28
- package/src/components/LogoGrid/LogoGrid.tsx +0 -53
- package/src/components/LogoGrid/index.ts +0 -1
- package/src/components/Navigation/Navigation.args.ts +0 -113
- package/src/components/Navigation/Navigation.props.ts +0 -120
- package/src/components/Navigation/Navigation.tsx +0 -246
- package/src/components/Navigation/index.ts +0 -1
- package/src/components/Notification/Notification.args.ts +0 -157
- package/src/components/Notification/Notification.props.ts +0 -67
- package/src/components/Notification/Notification.tsx +0 -78
- package/src/components/Notification/index.ts +0 -1
- package/src/components/NumberPicker/NumberPicker.args.ts +0 -50
- package/src/components/NumberPicker/NumberPicker.props.ts +0 -26
- package/src/components/NumberPicker/NumberPicker.tsx +0 -88
- package/src/components/NumberPicker/index.ts +0 -1
- package/src/components/Pagination/Pagination.args.ts +0 -43
- package/src/components/Pagination/Pagination.props.ts +0 -66
- package/src/components/Pagination/Pagination.tsx +0 -115
- package/src/components/Pagination/index.ts +0 -1
- package/src/components/Profile/Profile.args.ts +0 -58
- package/src/components/Profile/Profile.props.ts +0 -55
- package/src/components/Profile/Profile.tsx +0 -51
- package/src/components/Profile/index.ts +0 -1
- package/src/components/Radio/Radio.args.ts +0 -15
- package/src/components/Radio/Radio.props.ts +0 -6
- package/src/components/Radio/Radio.tsx +0 -102
- package/src/components/Radio/index.ts +0 -2
- package/src/components/ReadMore/ReadMore.args.ts +0 -23
- package/src/components/ReadMore/ReadMore.props.ts +0 -38
- package/src/components/ReadMore/ReadMore.tsx +0 -55
- package/src/components/ReadMore/index.ts +0 -1
- package/src/components/RichText/RichText.props.ts +0 -11
- package/src/components/RichText/RichText.tsx +0 -22
- package/src/components/RichText/index.ts +0 -1
- package/src/components/RichText/richText.args.ts +0 -38
- package/src/components/SearchField/SearchField.args.ts +0 -73
- package/src/components/SearchField/SearchField.props.ts +0 -35
- package/src/components/SearchField/SearchField.tsx +0 -83
- package/src/components/SearchField/index.ts +0 -1
- package/src/components/SocialMedia/SocialMedia.args.ts +0 -54
- package/src/components/SocialMedia/SocialMedia.props.ts +0 -45
- package/src/components/SocialMedia/SocialMedia.tsx +0 -46
- package/src/components/SocialMedia/index.ts +0 -3
- package/src/components/TableOfContents/TableOfContents.args.ts +0 -35
- package/src/components/TableOfContents/TableOfContents.props.ts +0 -23
- package/src/components/TableOfContents/TableOfContents.tsx +0 -32
- package/src/components/TableOfContents/index.ts +0 -1
- package/src/components/Tabs/Tabs.args.tsx +0 -201
- package/src/components/Tabs/Tabs.props.ts +0 -13
- package/src/components/Tabs/Tabs.tsx +0 -60
- package/src/components/Tabs/index.ts +0 -1
- package/src/components/Tag/Tag.args.ts +0 -15
- package/src/components/Tag/Tag.props.ts +0 -34
- package/src/components/Tag/Tag.tsx +0 -104
- package/src/components/Tag/TagCtx.ts +0 -4
- package/src/components/Tag/TagSet.args.ts +0 -37
- package/src/components/Tag/TagSet.props.ts +0 -37
- package/src/components/Tag/TagSet.tsx +0 -61
- package/src/components/Tag/index.ts +0 -2
- package/src/components/TextInput/TextInput.args.ts +0 -75
- package/src/components/TextInput/TextInput.props.ts +0 -20
- package/src/components/TextInput/TextInput.tsx +0 -71
- package/src/components/TextInput/index.ts +0 -2
- package/src/components/Textarea/Textarea.args.ts +0 -34
- package/src/components/Textarea/Textarea.props.ts +0 -45
- package/src/components/Textarea/Textarea.tsx +0 -52
- package/src/components/Textarea/index.ts +0 -3
- package/src/components/Toggle/Toggle.args.ts +0 -62
- package/src/components/Toggle/Toggle.props.ts +0 -27
- package/src/components/Toggle/Toggle.tsx +0 -85
- package/src/components/Toggle/index.ts +0 -3
- package/src/components/Tooltip/Tooltip.args.ts +0 -39
- package/src/components/Tooltip/Tooltip.props.ts +0 -38
- package/src/components/Tooltip/Tooltip.tsx +0 -119
- package/src/components/Tooltip/index.ts +0 -1
- package/src/components/Video/Video.args.ts +0 -47
- package/src/components/Video/Video.props.ts +0 -35
- package/src/components/Video/Video.tsx +0 -34
- package/src/components/Video/VideoPlayer.props.ts +0 -51
- package/src/components/Video/VideoPlayer.tsx +0 -71
- package/src/components/Video/index.ts +0 -1
- package/src/components/Video/media-file-poster.jpg +0 -0
- package/src/components/index.ts +0 -46
- package/src/declarations.d.ts +0 -36
- package/src/hooks/index.ts +0 -2
- package/src/hooks/useGlobalSettings.ts +0 -13
- package/src/hooks/usePrevious.ts +0 -15
- package/src/hooks/useVideoPlayer.ts +0 -85
- package/src/index.ts +0 -1
- package/src/types/forms.args.ts +0 -288
- package/src/types/index.ts +0 -139
- package/src/types/temp.d.ts +0 -9
- package/src/utils/checkArrayDuplicates.ts +0 -3
- package/src/utils/createChainedFunction.ts +0 -31
- package/src/utils/getDefaultDimensionValue.ts +0 -28
- package/src/utils/hoursMinutesSeconds.ts +0 -8
- package/src/utils/index.ts +0 -6
- package/src/utils/transitionEndListener.ts +0 -29
- package/src/utils/triggerBrowserReflow.ts +0 -4
- package/tsconfig.build.json +0 -19
- package/tsconfig.json +0 -8
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from "react";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
import useGlobalSettings from "../../hooks/useGlobalSettings";
|
|
4
|
-
import { VideoProps } from "./Video.props";
|
|
5
|
-
import VideoPlayer from "./VideoPlayer";
|
|
6
|
-
import { VideoPlayerRef } from "./VideoPlayer.props";
|
|
7
|
-
|
|
8
|
-
const Video = forwardRef<VideoPlayerRef, VideoProps>(
|
|
9
|
-
({ className, caption, ...video }, ref) => {
|
|
10
|
-
const { prefix } = useGlobalSettings();
|
|
11
|
-
const baseClass = `${prefix}--video`;
|
|
12
|
-
|
|
13
|
-
const videoClasses = classNames(className, {
|
|
14
|
-
[baseClass]: true,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const captionClasses = classNames("", {
|
|
18
|
-
[`${baseClass}--caption`]: true,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<figure className={videoClasses}>
|
|
23
|
-
<div className={`${videoClasses}--wrapper`}>
|
|
24
|
-
{video && <VideoPlayer {...video} ref={ref} />}
|
|
25
|
-
</div>
|
|
26
|
-
{caption && (
|
|
27
|
-
<figcaption className={captionClasses}>{caption}</figcaption>
|
|
28
|
-
)}
|
|
29
|
-
</figure>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
export default Video;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Poster } from "./Video.props";
|
|
2
|
-
import videojs from "video.js";
|
|
3
|
-
|
|
4
|
-
export interface VideoPlayerRef {
|
|
5
|
-
player: videojs.Player | undefined;
|
|
6
|
-
}
|
|
7
|
-
export interface VideoPlayerControls {
|
|
8
|
-
/**
|
|
9
|
-
* Specify the label for the fullscreen button
|
|
10
|
-
*/
|
|
11
|
-
fullscreen: string;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Specify the label for the play button
|
|
15
|
-
*/
|
|
16
|
-
play: string;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Specify the label for the pause button
|
|
20
|
-
*/
|
|
21
|
-
pause: string;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Specify the label for the volume button
|
|
25
|
-
*/
|
|
26
|
-
volume: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface VideoPlayerProps {
|
|
30
|
-
src: string;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Specify an optional className to be added to your Media.
|
|
34
|
-
*/
|
|
35
|
-
className?: string;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Specify the strings to be used as labels for the video controls
|
|
39
|
-
*/
|
|
40
|
-
controls?: VideoPlayerControls;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* poster image for video
|
|
44
|
-
*/
|
|
45
|
-
poster?: Poster;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* if YouTube, set to true
|
|
49
|
-
*/
|
|
50
|
-
youtube?: boolean;
|
|
51
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
2
|
-
import "videojs-youtube";
|
|
3
|
-
import { VideoPlayerProps, VideoPlayerRef } from "./VideoPlayer.props";
|
|
4
|
-
import videojs, { ILOVideo } from "video.js";
|
|
5
|
-
|
|
6
|
-
const video = videojs as unknown as ILOVideo;
|
|
7
|
-
|
|
8
|
-
const VideoPlayer = forwardRef<VideoPlayerRef, VideoPlayerProps>(
|
|
9
|
-
({ src, poster, youtube }, ref) => {
|
|
10
|
-
const videoNode = useRef<HTMLVideoElement>(null);
|
|
11
|
-
const player = useRef<videojs.Player>();
|
|
12
|
-
|
|
13
|
-
useImperativeHandle(
|
|
14
|
-
ref,
|
|
15
|
-
() => ({
|
|
16
|
-
get player() {
|
|
17
|
-
return player.current;
|
|
18
|
-
},
|
|
19
|
-
}),
|
|
20
|
-
[player]
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
if (videoNode.current) {
|
|
25
|
-
player.current = video(videoNode.current, {
|
|
26
|
-
autoplay: false,
|
|
27
|
-
controls: true,
|
|
28
|
-
preload: "auto",
|
|
29
|
-
bigPlayButton: false,
|
|
30
|
-
poster: poster?.src,
|
|
31
|
-
controlBar: {
|
|
32
|
-
descriptionsButton: false,
|
|
33
|
-
playbackRateMenuButton: false,
|
|
34
|
-
chaptersButton: false,
|
|
35
|
-
audioTrackButton: false,
|
|
36
|
-
pictureInPictureToggle: false,
|
|
37
|
-
subsCapsButton: false,
|
|
38
|
-
seekToLive: false,
|
|
39
|
-
liveDisplay: false,
|
|
40
|
-
},
|
|
41
|
-
errorDisplay: false,
|
|
42
|
-
textTrackSettings: false,
|
|
43
|
-
resizeManager: false,
|
|
44
|
-
/**
|
|
45
|
-
* If youtube is true, it will default to the youtube video
|
|
46
|
-
*/
|
|
47
|
-
sources: [
|
|
48
|
-
{ type: youtube ? "video/youtube" : undefined, src: src as string },
|
|
49
|
-
],
|
|
50
|
-
dataSetup: {
|
|
51
|
-
techOrder: ["youtube"],
|
|
52
|
-
},
|
|
53
|
-
liveTracker: false,
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return () => {
|
|
57
|
-
if (player.current) {
|
|
58
|
-
player.current.dispose();
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
}, [poster?.src, src, youtube]);
|
|
62
|
-
|
|
63
|
-
return (
|
|
64
|
-
<div className="ilo--videoplayer">
|
|
65
|
-
<video ref={videoNode} className="ilo--video--element" />
|
|
66
|
-
</div>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
export default VideoPlayer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Video } from "./Video";
|
|
Binary file
|
package/src/components/index.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export {
|
|
2
|
-
Accordion,
|
|
3
|
-
AccordionButton,
|
|
4
|
-
AccordionItem,
|
|
5
|
-
AccordionPanel,
|
|
6
|
-
} from "./Accordion";
|
|
7
|
-
export { Form } from "./Form";
|
|
8
|
-
export { Collapse } from "./Collapse";
|
|
9
|
-
export { Empty } from "./Empty";
|
|
10
|
-
export { Image } from "./Image";
|
|
11
|
-
export { Loading } from "./Loading";
|
|
12
|
-
export { Radio } from "./Radio";
|
|
13
|
-
export { Tag } from "./Tag";
|
|
14
|
-
export { Button } from "./Button";
|
|
15
|
-
export { ContextMenu } from "./ContextMenu";
|
|
16
|
-
export { Fieldset } from "./Fieldset";
|
|
17
|
-
export { GlobalProvider } from "./GlobalProvider";
|
|
18
|
-
export { Notification } from "./Notification";
|
|
19
|
-
export { ReadMore } from "./ReadMore";
|
|
20
|
-
export { Textarea } from "./Textarea";
|
|
21
|
-
export { Callout } from "./Callout";
|
|
22
|
-
export { Credit } from "./Credit";
|
|
23
|
-
export { FileUpload } from "./FileUpload";
|
|
24
|
-
export { Heading } from "./Heading";
|
|
25
|
-
export { Link } from "./Link";
|
|
26
|
-
export { NumberPicker } from "./NumberPicker";
|
|
27
|
-
export { RichText } from "./RichText";
|
|
28
|
-
export { Tooltip } from "./Tooltip";
|
|
29
|
-
export { Checkbox } from "./Checkbox";
|
|
30
|
-
export { DatePicker } from "./DatePicker";
|
|
31
|
-
export { Hero } from "./Hero";
|
|
32
|
-
export { LinkList } from "./LinkList";
|
|
33
|
-
export { Pagination } from "./Pagination";
|
|
34
|
-
export { SearchField } from "./SearchField";
|
|
35
|
-
export { Video } from "./Video";
|
|
36
|
-
export { Dropdown } from "./Dropdown";
|
|
37
|
-
export { Icon } from "./Icon";
|
|
38
|
-
export { List } from "./List";
|
|
39
|
-
export { Profile } from "./Profile";
|
|
40
|
-
export { TableOfContents } from "./TableOfContents";
|
|
41
|
-
export { Footer } from "./Footer";
|
|
42
|
-
export { LocalNav } from "./LocalNav";
|
|
43
|
-
export { Navigation } from "./Navigation";
|
|
44
|
-
export { CardGroup } from "./Cards/CardGroup";
|
|
45
|
-
export { Breadcrumb } from "./Breadcrumb";
|
|
46
|
-
export { Tabs } from "./Tabs";
|
package/src/declarations.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import videojs from "video.js";
|
|
2
|
-
|
|
3
|
-
declare module "*.svg" {
|
|
4
|
-
const content: string;
|
|
5
|
-
export default content;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
declare module "*.png" {
|
|
9
|
-
const content: string;
|
|
10
|
-
export default content;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare module "*.jpg" {
|
|
14
|
-
const content: string;
|
|
15
|
-
export default content;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare module "video.js" {
|
|
19
|
-
interface VideoJsPlayerOptionsAugmentation extends videojs.PlayerOptions {
|
|
20
|
-
liveTracker: boolean;
|
|
21
|
-
textTrackSettings: boolean;
|
|
22
|
-
errorDisplay: boolean;
|
|
23
|
-
resizeManager: boolean;
|
|
24
|
-
dataSetup: {
|
|
25
|
-
techOrder: string[];
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
type ILOVideo = (
|
|
30
|
-
id: string | HTMLVideoElement,
|
|
31
|
-
options: VideoJsPlayerOptionsAugmentation,
|
|
32
|
-
ready?: () => void
|
|
33
|
-
) => videojs.Player;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
declare module "videojs-youtube" {}
|
package/src/hooks/index.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useContext } from "react";
|
|
2
|
-
import { GlobalProviderContext } from "../components/GlobalProvider";
|
|
3
|
-
|
|
4
|
-
const useGlobalSettings = () => {
|
|
5
|
-
const { prefix, ...rest } = useContext(GlobalProviderContext);
|
|
6
|
-
|
|
7
|
-
return {
|
|
8
|
-
prefix,
|
|
9
|
-
...rest,
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default useGlobalSettings;
|
package/src/hooks/usePrevious.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from "react";
|
|
2
|
-
|
|
3
|
-
// This code was shamelessly borrowed from the blog post
|
|
4
|
-
// "How to access previous props or state with React Hooks" by
|
|
5
|
-
// Ohans Emmanuel, published on LogRocket May 11, 2023
|
|
6
|
-
// https://blog.logrocket.com/accessing-previous-props-state-react-hooks/
|
|
7
|
-
|
|
8
|
-
export function usePrevious<T>(value: T) {
|
|
9
|
-
const ref = useRef<T>();
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
ref.current = value; //assign the value of ref to the argument
|
|
12
|
-
}, [value]); //this code will run when the value of 'value' changes
|
|
13
|
-
return ref.current; //in the end, return the current ref value.
|
|
14
|
-
}
|
|
15
|
-
export default usePrevious;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from "react";
|
|
2
|
-
|
|
3
|
-
const useVideoPlayer = (videoElement: any) => {
|
|
4
|
-
const [fullscreen, setFullscreen] = useState(false);
|
|
5
|
-
const [playing, setPlaying] = useState(false);
|
|
6
|
-
const [progress, setProgress] = useState(0);
|
|
7
|
-
const [showvolume, showVolume] = useState(false);
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Fullscreen functionality
|
|
11
|
-
*/
|
|
12
|
-
const toggleFullscreen = () => {
|
|
13
|
-
setFullscreen(!fullscreen);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
if (fullscreen) {
|
|
18
|
-
if (videoElement.requestFullscreen) {
|
|
19
|
-
videoElement.requestFullscreen();
|
|
20
|
-
}
|
|
21
|
-
} else {
|
|
22
|
-
document.exitFullscreen();
|
|
23
|
-
}
|
|
24
|
-
}, [fullscreen, videoElement]);
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Play/pause functionality
|
|
28
|
-
*/
|
|
29
|
-
const togglePlay = () => {
|
|
30
|
-
setPlaying(!playing);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
playing ? videoElement.current.play() : videoElement.current.pause();
|
|
35
|
-
}, [playing, videoElement]);
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Progress indicator
|
|
39
|
-
*/
|
|
40
|
-
const handleOnTimeUpdate = () => {
|
|
41
|
-
setProgress(
|
|
42
|
-
(videoElement.current.currentTime / videoElement.current.duration) * 100
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Scrub functionality
|
|
48
|
-
*/
|
|
49
|
-
const handleVideoScrub = (event: any) => {
|
|
50
|
-
const scrubValue = Number(
|
|
51
|
-
(event.offsetX * event.target.max) / event.target.offsetWidth
|
|
52
|
-
);
|
|
53
|
-
videoElement.current.currentTime =
|
|
54
|
-
videoElement.current.duration * scrubValue;
|
|
55
|
-
setProgress(scrubValue);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Show volume slider
|
|
60
|
-
*/
|
|
61
|
-
const toggleVolumeSlider = () => {
|
|
62
|
-
showVolume(!showvolume);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Volume change
|
|
67
|
-
*/
|
|
68
|
-
const handleVolumeChange = (event: any) => {
|
|
69
|
-
videoElement.volume = event.target.value;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
return {
|
|
73
|
-
handleOnTimeUpdate,
|
|
74
|
-
handleVideoScrub,
|
|
75
|
-
handleVolumeChange,
|
|
76
|
-
playing,
|
|
77
|
-
progress,
|
|
78
|
-
showvolume,
|
|
79
|
-
toggleFullscreen,
|
|
80
|
-
togglePlay,
|
|
81
|
-
toggleVolumeSlider,
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export default useVideoPlayer;
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./components";
|
package/src/types/forms.args.ts
DELETED
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
// This annoying file has to exist because at the present time, react-docgen-typescript can't generate argTypes for
|
|
2
|
-
// components that use forwardRef. So we have to create the argTypes manually. This only regards Form elements for the time being.
|
|
3
|
-
|
|
4
|
-
export const formFieldArgTypes = (element: string) => ({
|
|
5
|
-
className: {
|
|
6
|
-
description:
|
|
7
|
-
"The className of the Component. Passed to the outermost element.",
|
|
8
|
-
control: {
|
|
9
|
-
type: "text",
|
|
10
|
-
},
|
|
11
|
-
table: {
|
|
12
|
-
type: {
|
|
13
|
-
summary: "string | undefined",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
disabled: {
|
|
18
|
-
description: "Whether the Component is disabled",
|
|
19
|
-
control: {
|
|
20
|
-
type: "boolean",
|
|
21
|
-
},
|
|
22
|
-
table: {
|
|
23
|
-
defaultValue: { summary: "false" },
|
|
24
|
-
type: {
|
|
25
|
-
summary: "boolean | undefined",
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
error: {
|
|
30
|
-
description: "Whether the Component has an error",
|
|
31
|
-
control: {
|
|
32
|
-
type: "boolean",
|
|
33
|
-
},
|
|
34
|
-
table: {
|
|
35
|
-
defaultValue: { summary: "false" },
|
|
36
|
-
type: {
|
|
37
|
-
summary: "boolean | undefined",
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
id: {
|
|
42
|
-
description:
|
|
43
|
-
"The id attribute of the underlying form element. This will be the same as `name` if not set",
|
|
44
|
-
control: {
|
|
45
|
-
type: "text",
|
|
46
|
-
},
|
|
47
|
-
table: {
|
|
48
|
-
type: {
|
|
49
|
-
summary: "string | undefined",
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
inputStyle: {
|
|
54
|
-
description: "Inline styles for the input",
|
|
55
|
-
control: {
|
|
56
|
-
type: "object",
|
|
57
|
-
},
|
|
58
|
-
table: {
|
|
59
|
-
type: {
|
|
60
|
-
summary: "React.CSSProperties | undefined",
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
name: {
|
|
65
|
-
description:
|
|
66
|
-
"The name of the Component. This is required and should be unique",
|
|
67
|
-
control: {
|
|
68
|
-
type: "text",
|
|
69
|
-
},
|
|
70
|
-
type: {
|
|
71
|
-
required: true,
|
|
72
|
-
name: "other" as const,
|
|
73
|
-
value: "string",
|
|
74
|
-
},
|
|
75
|
-
table: {
|
|
76
|
-
type: {
|
|
77
|
-
summary: "string",
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
onBlur: {
|
|
82
|
-
description: "The onBlur handler of the Component",
|
|
83
|
-
control: {
|
|
84
|
-
type: "function",
|
|
85
|
-
},
|
|
86
|
-
table: {
|
|
87
|
-
type: {
|
|
88
|
-
summary: `(event: React.FocusEvent<${element}>) => any`,
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
onChange: {
|
|
93
|
-
description: "The onChange handler of the Component",
|
|
94
|
-
control: {
|
|
95
|
-
type: "function",
|
|
96
|
-
},
|
|
97
|
-
table: {
|
|
98
|
-
type: {
|
|
99
|
-
summary: `(event: React.ChangeEvent<${element}>) => any`,
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
required: {
|
|
104
|
-
description: "Whether the Component is required",
|
|
105
|
-
control: {
|
|
106
|
-
type: "boolean",
|
|
107
|
-
},
|
|
108
|
-
table: {
|
|
109
|
-
type: {
|
|
110
|
-
summary: "boolean | undefined",
|
|
111
|
-
},
|
|
112
|
-
defaultValue: { summary: false },
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
export const choiceFieldArgTypes = (element: string) => ({
|
|
118
|
-
...formFieldArgTypes(element),
|
|
119
|
-
defaultChecked: {
|
|
120
|
-
description: "Whether the Component is checked by default when it loads",
|
|
121
|
-
control: {
|
|
122
|
-
type: "boolean",
|
|
123
|
-
},
|
|
124
|
-
table: {
|
|
125
|
-
type: {
|
|
126
|
-
summary: "boolean | undefined",
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
checked: {
|
|
131
|
-
description: "Whether the Component is checked",
|
|
132
|
-
control: {
|
|
133
|
-
type: "boolean",
|
|
134
|
-
},
|
|
135
|
-
table: {
|
|
136
|
-
defaultValue: { summary: "false" },
|
|
137
|
-
type: {
|
|
138
|
-
summary: "boolean | undefined",
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
value: {
|
|
143
|
-
description: "The value of the Component",
|
|
144
|
-
control: {
|
|
145
|
-
type: "text",
|
|
146
|
-
},
|
|
147
|
-
table: {
|
|
148
|
-
type: {
|
|
149
|
-
summary: "string | undefined",
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
export const formControlArgTypes = {
|
|
156
|
-
className: {
|
|
157
|
-
description:
|
|
158
|
-
"The className of the Component. Passed to the outermost element.",
|
|
159
|
-
control: {
|
|
160
|
-
type: "text",
|
|
161
|
-
},
|
|
162
|
-
table: {
|
|
163
|
-
type: {
|
|
164
|
-
summary: "string | undefined",
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
disabled: {
|
|
169
|
-
description: "Whether the Component is disabled",
|
|
170
|
-
control: {
|
|
171
|
-
type: "boolean",
|
|
172
|
-
},
|
|
173
|
-
table: {
|
|
174
|
-
defaultValue: { summary: "false" },
|
|
175
|
-
type: {
|
|
176
|
-
summary: "boolean | undefined",
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
error: {
|
|
181
|
-
description: "Whether the Component has an error",
|
|
182
|
-
control: {
|
|
183
|
-
type: "boolean",
|
|
184
|
-
},
|
|
185
|
-
table: {
|
|
186
|
-
defaultValue: { summary: "false" },
|
|
187
|
-
type: {
|
|
188
|
-
summary: "boolean | undefined",
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
errorMessage: {
|
|
193
|
-
description: "The error message to display in case of an error",
|
|
194
|
-
control: {
|
|
195
|
-
type: "text",
|
|
196
|
-
},
|
|
197
|
-
table: {
|
|
198
|
-
type: {
|
|
199
|
-
summary: "string | undefined",
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
label: {
|
|
204
|
-
description: "The label of the Component. This is required.",
|
|
205
|
-
control: {
|
|
206
|
-
type: "text",
|
|
207
|
-
},
|
|
208
|
-
type: {
|
|
209
|
-
required: true,
|
|
210
|
-
name: "other" as const,
|
|
211
|
-
value: "string",
|
|
212
|
-
},
|
|
213
|
-
table: {
|
|
214
|
-
type: {
|
|
215
|
-
summary: "string | undefined",
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
},
|
|
219
|
-
labelSize: {
|
|
220
|
-
description: "The size of the label",
|
|
221
|
-
defaultValue: "medium",
|
|
222
|
-
control: "select",
|
|
223
|
-
options: ["small", "medium", "large"],
|
|
224
|
-
table: {
|
|
225
|
-
defaultValue: { summary: "medium" },
|
|
226
|
-
type: {
|
|
227
|
-
name: "enum",
|
|
228
|
-
summary: "small | medium | large",
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
labelPlacement: {
|
|
233
|
-
description: "The placement of the label",
|
|
234
|
-
defaultValue: "start",
|
|
235
|
-
control: "select",
|
|
236
|
-
options: ["top", "start", "bottom", "end"],
|
|
237
|
-
table: {
|
|
238
|
-
defaultValue: { summary: "start" },
|
|
239
|
-
type: {
|
|
240
|
-
name: "enum",
|
|
241
|
-
summary: "top | start | bottom | end",
|
|
242
|
-
},
|
|
243
|
-
},
|
|
244
|
-
},
|
|
245
|
-
helper: {
|
|
246
|
-
description: "Helper text to display with the label",
|
|
247
|
-
control: {
|
|
248
|
-
type: "text",
|
|
249
|
-
},
|
|
250
|
-
table: {
|
|
251
|
-
type: {
|
|
252
|
-
summary: "string | undefined",
|
|
253
|
-
},
|
|
254
|
-
},
|
|
255
|
-
},
|
|
256
|
-
style: {
|
|
257
|
-
description: "Inline styles for the outermost element of the Component",
|
|
258
|
-
control: {
|
|
259
|
-
type: "object",
|
|
260
|
-
},
|
|
261
|
-
table: {
|
|
262
|
-
type: {
|
|
263
|
-
summary: "React.CSSProperties | undefined",
|
|
264
|
-
},
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
tooltip: {
|
|
268
|
-
description: "Optional text to render in a tooltip",
|
|
269
|
-
control: {
|
|
270
|
-
type: "text",
|
|
271
|
-
},
|
|
272
|
-
table: {
|
|
273
|
-
type: {
|
|
274
|
-
summary: "string | undefined",
|
|
275
|
-
},
|
|
276
|
-
},
|
|
277
|
-
},
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
export const labelledFormFieldArgTypes = (element: string) => ({
|
|
281
|
-
...formControlArgTypes,
|
|
282
|
-
...formFieldArgTypes(element),
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
export const labelledChoiceFieldArgTypes = (element: string) => ({
|
|
286
|
-
...formControlArgTypes,
|
|
287
|
-
...choiceFieldArgTypes(element),
|
|
288
|
-
});
|