@ilo-org/react 0.10.6 → 0.11.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.
Files changed (185) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/lib/cjs/AccordionCtx-be704051.js +9 -0
  3. package/lib/cjs/{GlobalCtx-97e4b433.js → GlobalCtx-10114bdd.js} +2 -2
  4. package/lib/cjs/ListCtx-14aa546f.js +9 -0
  5. package/lib/cjs/TagCtx-690a1d54.js +7 -0
  6. package/lib/cjs/components/Accordion/Accordion.js +6 -6
  7. package/lib/cjs/components/Accordion/AccordionButton.js +5 -5
  8. package/lib/cjs/components/Accordion/AccordionItem.js +2 -2
  9. package/lib/cjs/components/Accordion/AccordionPanel.js +8 -8
  10. package/lib/cjs/components/Accordion/index.js +2 -2
  11. package/lib/cjs/components/Breadcrumb/Breadcrumb.js +5 -5
  12. package/lib/cjs/components/Breadcrumb/index.js +1 -1
  13. package/lib/cjs/components/Button/Button.js +1 -1
  14. package/lib/cjs/components/Button/index.js +1 -1
  15. package/lib/cjs/components/Callout/Callout.js +4 -4
  16. package/lib/cjs/components/Callout/index.js +1 -1
  17. package/lib/cjs/components/Card/Card.js +2 -2
  18. package/lib/cjs/components/Card/CardGroup.js +2 -2
  19. package/lib/cjs/components/Card/index.js +2 -2
  20. package/lib/cjs/components/Checkbox/Checkbox.js +5 -5
  21. package/lib/cjs/components/Checkbox/index.js +1 -1
  22. package/lib/cjs/components/Collapse/Collapse.js +1194 -44
  23. package/lib/cjs/components/Collapse/index.js +0 -1
  24. package/lib/cjs/components/ContextMenu/ContextMenu.js +1 -1
  25. package/lib/cjs/components/ContextMenu/index.js +1 -1
  26. package/lib/cjs/components/Credit/Credit.js +3 -3
  27. package/lib/cjs/components/Credit/index.js +1 -1
  28. package/lib/cjs/components/DatePicker/DatePicker.js +4 -4
  29. package/lib/cjs/components/DatePicker/index.js +1 -1
  30. package/lib/cjs/components/Dropdown/Dropdown.js +5 -5
  31. package/lib/cjs/components/Dropdown/index.js +1 -1
  32. package/lib/cjs/components/Empty/Empty.js +1 -1
  33. package/lib/cjs/components/Empty/index.js +1 -1
  34. package/lib/cjs/components/Fieldset/Fieldset.js +5 -5
  35. package/lib/cjs/components/Fieldset/index.js +1 -1
  36. package/lib/cjs/components/FileUpload/FileUpload.js +5 -5
  37. package/lib/cjs/components/FileUpload/index.js +1 -1
  38. package/lib/cjs/components/Footer/Footer.js +1 -1
  39. package/lib/cjs/components/Footer/index.js +1 -1
  40. package/lib/cjs/components/Form/Form.js +3 -3
  41. package/lib/cjs/components/Form/index.js +1 -1
  42. package/lib/cjs/components/FormControl/FormControl.js +7 -7
  43. package/lib/cjs/components/FormControl/index.js +1 -1
  44. package/lib/cjs/components/GlobalProvider/GlobalProvider.js +1 -1
  45. package/lib/cjs/components/GlobalProvider/index.js +1 -1
  46. package/lib/cjs/components/Heading/Heading.js +1 -1
  47. package/lib/cjs/components/Heading/index.js +1 -1
  48. package/lib/cjs/components/Hero/Hero.js +1 -1
  49. package/lib/cjs/components/Hero/HeroCard.js +1 -1
  50. package/lib/cjs/components/Hero/index.js +1 -1
  51. package/lib/cjs/components/Icon/Icon.js +3 -3
  52. package/lib/cjs/components/Icon/index.js +1 -1
  53. package/lib/cjs/components/Image/Image.js +1 -1
  54. package/lib/cjs/components/Image/index.js +1 -1
  55. package/lib/cjs/components/Input/Input.js +1 -1
  56. package/lib/cjs/components/Input/index.js +1 -1
  57. package/lib/cjs/components/Link/Link.js +1 -1
  58. package/lib/cjs/components/Link/index.js +1 -1
  59. package/lib/cjs/components/LinkList/LinkList.js +1 -1
  60. package/lib/cjs/components/LinkList/index.js +1 -1
  61. package/lib/cjs/components/List/List.js +4 -4
  62. package/lib/cjs/components/List/ListItem.js +2 -2
  63. package/lib/cjs/components/List/index.js +2 -2
  64. package/lib/cjs/components/Loading/Loading.js +1 -1
  65. package/lib/cjs/components/Loading/index.js +1 -1
  66. package/lib/cjs/components/LocalNav/LocalNav.js +4 -4
  67. package/lib/cjs/components/LocalNav/index.js +1 -1
  68. package/lib/cjs/components/Logo/Logo.js +15 -15
  69. package/lib/cjs/components/Logo/index.js +1 -1
  70. package/lib/cjs/components/LogoGrid/LogoGrid.js +1 -1
  71. package/lib/cjs/components/LogoGrid/index.js +1 -1
  72. package/lib/cjs/components/Navigation/Navigation.js +6 -6
  73. package/lib/cjs/components/Navigation/index.js +1 -1
  74. package/lib/cjs/components/Notification/Notification.js +3 -3
  75. package/lib/cjs/components/Notification/index.js +1 -1
  76. package/lib/cjs/components/NumberPicker/NumberPicker.js +4 -4
  77. package/lib/cjs/components/NumberPicker/index.js +1 -1
  78. package/lib/cjs/components/Pagination/Pagination.js +1 -1
  79. package/lib/cjs/components/Pagination/index.js +1 -1
  80. package/lib/cjs/components/Profile/Profile.js +1 -1
  81. package/lib/cjs/components/Profile/index.js +1 -1
  82. package/lib/cjs/components/Radio/Radio.js +5 -5
  83. package/lib/cjs/components/Radio/index.js +1 -1
  84. package/lib/cjs/components/ReadMore/ReadMore.js +4 -4
  85. package/lib/cjs/components/ReadMore/index.js +1 -1
  86. package/lib/cjs/components/RichText/RichText.js +1 -1
  87. package/lib/cjs/components/RichText/index.js +1 -1
  88. package/lib/cjs/components/SearchField/SearchField.js +3 -3
  89. package/lib/cjs/components/SearchField/index.js +1 -1
  90. package/lib/cjs/components/SocialMedia/SocialMedia.js +1 -1
  91. package/lib/cjs/components/SocialMedia/index.js +1 -1
  92. package/lib/cjs/components/TableOfContents/TableOfContents.js +1 -1
  93. package/lib/cjs/components/TableOfContents/index.js +1 -1
  94. package/lib/cjs/components/Tabs/Tabs.args.js +156 -0
  95. package/lib/cjs/components/Tabs/Tabs.js +24 -0
  96. package/lib/cjs/components/Tabs/index.js +15 -0
  97. package/lib/cjs/components/Tag/Tag.js +4 -4
  98. package/lib/cjs/components/Tag/TagSet.js +6 -6
  99. package/lib/cjs/components/Tag/index.js +2 -2
  100. package/lib/cjs/components/TextInput/TextInput.js +4 -4
  101. package/lib/cjs/components/TextInput/index.js +1 -1
  102. package/lib/cjs/components/Textarea/Textarea.js +4 -4
  103. package/lib/cjs/components/Textarea/index.js +1 -1
  104. package/lib/cjs/components/Toggle/Toggle.js +4 -4
  105. package/lib/cjs/components/Toggle/index.js +1 -1
  106. package/lib/cjs/components/Tooltip/Tooltip.js +5 -5
  107. package/lib/cjs/components/Tooltip/index.js +1 -1
  108. package/lib/cjs/components/Video/Video.js +11 -12
  109. package/lib/cjs/components/Video/VideoPlayer.js +55 -13
  110. package/lib/cjs/components/Video/index.js +6 -8
  111. package/lib/cjs/components/index.js +9 -8
  112. package/lib/cjs/hooks/index.js +1 -1
  113. package/lib/cjs/hooks/useGlobalSettings.js +3 -3
  114. package/lib/cjs/hooks/usePrevious.js +3 -3
  115. package/lib/cjs/hooks/useVideoPlayer.js +7 -7
  116. package/lib/cjs/index.js +9 -8
  117. package/lib/esm/components/Collapse/Collapse.js +1156 -6
  118. package/lib/esm/components/Collapse/index.js +0 -1
  119. package/lib/esm/components/FileUpload/FileUpload.js +3 -3
  120. package/lib/esm/components/NumberPicker/NumberPicker.js +3 -3
  121. package/lib/esm/components/Radio/Radio.js +3 -3
  122. package/lib/esm/components/Tabs/Tabs.args.js +154 -0
  123. package/lib/esm/components/Tabs/Tabs.js +22 -0
  124. package/lib/esm/components/Tabs/index.js +9 -0
  125. package/lib/esm/components/TextInput/TextInput.js +3 -3
  126. package/lib/esm/components/Textarea/Textarea.js +3 -3
  127. package/lib/esm/components/Video/Video.js +10 -11
  128. package/lib/esm/components/Video/VideoPlayer.js +57 -11
  129. package/lib/esm/components/Video/index.js +5 -7
  130. package/lib/esm/components/index.js +4 -4
  131. package/lib/esm/index.js +4 -4
  132. package/lib/types/react/src/components/Tabs/Tabs.args.d.ts +10 -0
  133. package/lib/types/react/src/components/Tabs/Tabs.d.ts +4 -0
  134. package/lib/types/react/src/components/Tabs/Tabs.props.d.ts +12 -0
  135. package/lib/types/react/src/components/Tabs/index.d.ts +1 -0
  136. package/lib/types/react/src/components/Video/Video.d.ts +2 -2
  137. package/lib/types/react/src/components/Video/Video.props.d.ts +5 -43
  138. package/lib/types/react/src/components/Video/VideoPlayer.d.ts +3 -3
  139. package/lib/types/react/src/components/Video/VideoPlayer.props.d.ts +6 -31
  140. package/lib/types/react/src/components/index.d.ts +1 -0
  141. package/package.json +9 -7
  142. package/src/components/Tabs/Tabs.args.tsx +201 -0
  143. package/src/components/Tabs/Tabs.props.ts +13 -0
  144. package/src/components/Tabs/Tabs.tsx +60 -0
  145. package/src/components/Tabs/index.ts +1 -0
  146. package/src/components/Video/Video.args.ts +18 -24
  147. package/src/components/Video/Video.props.ts +5 -47
  148. package/src/components/Video/Video.tsx +24 -19
  149. package/src/components/Video/VideoPlayer.props.ts +7 -38
  150. package/src/components/Video/VideoPlayer.tsx +67 -322
  151. package/src/components/index.ts +1 -0
  152. package/src/declarations.d.ts +22 -0
  153. package/lib/cjs/AccordionCtx-fe08ff45.js +0 -9
  154. package/lib/cjs/DailyMotion-17b56ecb.js +0 -259
  155. package/lib/cjs/Facebook-0c8d86ee.js +0 -239
  156. package/lib/cjs/FilePlayer-01d6dc08.js +0 -596
  157. package/lib/cjs/Kaltura-40e8e581.js +0 -235
  158. package/lib/cjs/ListCtx-7db7fe04.js +0 -9
  159. package/lib/cjs/Mixcloud-e23f49d6.js +0 -222
  160. package/lib/cjs/Preview-8e490f54.js +0 -227
  161. package/lib/cjs/SoundCloud-2500b6cb.js +0 -249
  162. package/lib/cjs/Streamable-00723065.js +0 -234
  163. package/lib/cjs/TagCtx-929c7753.js +0 -7
  164. package/lib/cjs/Twitch-2c5c5733.js +0 -244
  165. package/lib/cjs/VideoPlayer-5f0a64c6.js +0 -2067
  166. package/lib/cjs/Vidyard-d36d6c45.js +0 -237
  167. package/lib/cjs/Vimeo-d311e3b8.js +0 -285
  168. package/lib/cjs/Wistia-318b4e43.js +0 -288
  169. package/lib/cjs/YouTube-a3796a55.js +0 -377
  170. package/lib/cjs/index-0af02e81.js +0 -1154
  171. package/lib/esm/DailyMotion-989c2db3.js +0 -257
  172. package/lib/esm/Facebook-04e9cc59.js +0 -237
  173. package/lib/esm/FilePlayer-0789336d.js +0 -594
  174. package/lib/esm/Kaltura-a9ed37a9.js +0 -233
  175. package/lib/esm/Mixcloud-5a3b4353.js +0 -220
  176. package/lib/esm/Preview-7ca1835e.js +0 -225
  177. package/lib/esm/SoundCloud-47bccd79.js +0 -247
  178. package/lib/esm/Streamable-ee762126.js +0 -232
  179. package/lib/esm/Twitch-3cd4b54b.js +0 -242
  180. package/lib/esm/VideoPlayer-96c2b20c.js +0 -2062
  181. package/lib/esm/Vidyard-258ab0ef.js +0 -235
  182. package/lib/esm/Vimeo-4b29b580.js +0 -283
  183. package/lib/esm/Wistia-3cbce669.js +0 -286
  184. package/lib/esm/YouTube-db52da1c.js +0 -375
  185. package/lib/esm/index-623ce3f5.js +0 -1152
@@ -3,7 +3,6 @@ import 'tslib';
3
3
  import 'react/jsx-runtime';
4
4
  import 'classnames';
5
5
  import 'react';
6
- import '../../index-623ce3f5.js';
7
6
  import 'react-dom';
8
7
  import '../../utils/createChainedFunction.js';
9
8
  import '../../utils/getDefaultDimensionValue.js';
@@ -1,6 +1,6 @@
1
1
  import { __rest } from 'tslib';
2
2
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
- import require$$0, { useState } from 'react';
3
+ import React, { useState } from 'react';
4
4
  import classNames from 'classnames';
5
5
  import useGlobalSettings from '../../hooks/useGlobalSettings.js';
6
6
  import FormControl, { useFormControl } from '../FormControl/FormControl.js';
@@ -18,7 +18,7 @@ function formatBytes(bytes, decimals = 2) {
18
18
  const i = Math.floor(Math.log(bytes) / Math.log(k));
19
19
  return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
20
20
  }
21
- const FileUpload = require$$0.forwardRef(({ onChange, onBlur, disabled = false, error, id, multiple, name, placeholder, required, accept, }, ref) => {
21
+ const FileUpload = React.forwardRef(({ onChange, onBlur, disabled = false, error, id, multiple, name, placeholder, required, accept, }, ref) => {
22
22
  const { prefix } = useGlobalSettings();
23
23
  const formControlCtx = useFormControl();
24
24
  const { ariaDescribedBy } = formControlCtx;
@@ -38,7 +38,7 @@ const FileUpload = require$$0.forwardRef(({ onChange, onBlur, disabled = false,
38
38
  const inputId = id ? id : name;
39
39
  return (jsxs(Fragment, { children: [jsx("div", Object.assign({ className: fileUploadClasses }, { children: jsxs("label", Object.assign({ className: inputClass }, { children: [placeholder, jsx("input", { ref: ref, id: inputId, name: name, accept: accept, onChange: handleChange, onBlur: onBlur, disabled: disabled, multiple: multiple, placeholder: placeholder, required: required, type: "file", "data-label": placeholder, "aria-describedby": ariaDescribedBy })] })) })), uploadfiles && uploadfiles.length > 0 && (jsx("ul", Object.assign({ className: `${baseClass}--list` }, { children: [...uploadfiles].map((file, i) => (jsx("li", Object.assign({ className: `${baseClass}--list-item` }, { children: `${file.name} (${formatBytes(file.size)})` }), `${baseClass}--list-item-${i}`))) })))] }));
40
40
  });
41
- const LabelledFileUpload = require$$0.forwardRef((props, ref) => {
41
+ const LabelledFileUpload = React.forwardRef((props, ref) => {
42
42
  const { style, inputStyle, className } = props, rest = __rest(props, ["style", "inputStyle", "className"]);
43
43
  const fieldId = props.id ? props.id : props.name;
44
44
  return (jsx(FormControl, Object.assign({ fieldId: fieldId, style: style, className: className }, rest, { children: jsx(FileUpload, Object.assign({ ref: ref, style: inputStyle }, rest)) })));
@@ -1,6 +1,6 @@
1
1
  import { __rest } from 'tslib';
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import require$$0 from 'react';
3
+ import React from 'react';
4
4
  import classNames from 'classnames';
5
5
  import useGlobalSettings from '../../hooks/useGlobalSettings.js';
6
6
  import FormControl, { useFormControl } from '../FormControl/FormControl.js';
@@ -9,7 +9,7 @@ import 'nanoid';
9
9
  import '../Tooltip/Tooltip.js';
10
10
  import '@popperjs/core';
11
11
 
12
- const NumberPicker = require$$0.forwardRef(({ onChange, onBlur, disabled = false, error, id, name, placeholder, required, max, min, step, }, ref) => {
12
+ const NumberPicker = React.forwardRef(({ onChange, onBlur, disabled = false, error, id, name, placeholder, required, max, min, step, }, ref) => {
13
13
  const { prefix } = useGlobalSettings();
14
14
  const formControlCtx = useFormControl();
15
15
  const { ariaDescribedBy } = formControlCtx;
@@ -26,7 +26,7 @@ const NumberPicker = require$$0.forwardRef(({ onChange, onBlur, disabled = false
26
26
  };
27
27
  return (jsx("input", { ref: ref, id: id ? id : name, name: name, onChange: handleChange, onBlur: onBlur, disabled: disabled, placeholder: placeholder, required: required, type: "number", className: numberPickerClasses, pattern: "[0-9]*", inputMode: "numeric", "aria-describedby": ariaDescribedBy, max: max, min: min, step: step }));
28
28
  });
29
- const LabelledNumberPicker = require$$0.forwardRef((props, ref) => {
29
+ const LabelledNumberPicker = React.forwardRef((props, ref) => {
30
30
  const { style, inputStyle, className } = props, rest = __rest(props, ["style", "inputStyle", "className"]);
31
31
  const fieldId = props.id ? props.id : props.name;
32
32
  return (jsx(FormControl, Object.assign({ fieldId: fieldId, style: style, className: className }, rest, { children: jsx(NumberPicker, Object.assign({ ref: ref, style: inputStyle }, rest)) })));
@@ -1,6 +1,6 @@
1
1
  import { __rest } from 'tslib';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import require$$0, { useEffect } from 'react';
3
+ import React, { useEffect } from 'react';
4
4
  import classNames from 'classnames';
5
5
  import useGlobalSettings from '../../hooks/useGlobalSettings.js';
6
6
  import { useFieldsetError } from '../Fieldset/Fieldset.js';
@@ -11,7 +11,7 @@ import '../Tooltip/Tooltip.js';
11
11
  import '@popperjs/core';
12
12
  import 'nanoid';
13
13
 
14
- const Radio = require$$0.forwardRef(({ onChange, onBlur, disabled = false, error, id, name, required, checked, defaultChecked = false, value, }, ref) => {
14
+ const Radio = React.forwardRef(({ onChange, onBlur, disabled = false, error, id, name, required, checked, defaultChecked = false, value, }, ref) => {
15
15
  const { prefix } = useGlobalSettings();
16
16
  const { setHasError } = useFieldsetError();
17
17
  const formControlCtx = useFormControl();
@@ -36,7 +36,7 @@ const Radio = require$$0.forwardRef(({ onChange, onBlur, disabled = false, error
36
36
  });
37
37
  return (jsxs("div", Object.assign({ className: RadioClasses }, { children: [jsx("input", { ref: ref, id: id ? id : name, name: name, onChange: handleChange, onBlur: onBlur, disabled: disabled, required: required, type: "radio", defaultChecked: defaultChecked, "aria-describedby": ariaDescribedBy, checked: checked, value: value }), jsx("span", { className: controlClass })] })));
38
38
  });
39
- const LabelledRadio = require$$0.forwardRef((props, ref) => {
39
+ const LabelledRadio = React.forwardRef((props, ref) => {
40
40
  const { style, inputStyle, className, labelPlacement = "end", labelSize = "small" } = props, rest = __rest(props, ["style", "inputStyle", "className", "labelPlacement", "labelSize"]);
41
41
  const fieldId = props.id ? props.id : props.name;
42
42
  return (jsx(FormControl, Object.assign({ fieldId: fieldId, style: style, className: className, labelPlacement: labelPlacement, labelSize: labelSize }, rest, { children: jsx(Radio, Object.assign({ ref: ref, style: inputStyle }, rest)) })));
@@ -0,0 +1,154 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import RichText from '../RichText/RichText.js';
3
+ import Image from '../Image/Image.js';
4
+ import 'classnames';
5
+ import '../../hooks/useGlobalSettings.js';
6
+ import 'tslib';
7
+ import 'react';
8
+ import '../../GlobalCtx-7fb23cfa.js';
9
+ import '../Credit/Credit.js';
10
+
11
+ const tabs = {
12
+ items: [
13
+ {
14
+ label: "Tab Label With A Really Really Lenghty Title Even Though We Do Not Recommend Such A Lengthy Title",
15
+ content: (jsx(Image, { alt: "My alt text", caption: "Women construction workers in Nepal build roads and bridges as part of a National Rural Transport Programme co-sponsored by the ILO.", credit: "\u00A9 Marcel Crozet/ILO", url: [
16
+ { breakpoint: 0, src: "/small.jpg" },
17
+ { breakpoint: 800, src: "/medium.jpg" },
18
+ { breakpoint: 1200, src: "/large.jpg" },
19
+ { breakpoint: 1440, src: "/large.jpg" },
20
+ ] })),
21
+ },
22
+ {
23
+ label: "Tab Label 2",
24
+ content: (jsx(RichText, { content: "<h2>International Labour Organization</h2> <p>The <b>International Labour Organization</b> (<b>ILO</b>) is a <a href='https://www.un.org'>United Nations</a> agency whose mandate is to advance social and economic justice by setting international labour standards. Founded in October 1919 under the League of Nations, it is the first and oldest specialised agency of the UN. The ILO has 187 member states: 186 out of 193 UN member states plus the Cook Islands.</p> <p>Whereas also the failure of any nation to adopt humane conditions of labour is an obstacle in the way of other nations which desire to improve the conditions in their own countries.</p> <figure><img alt='placeholder image' class='right' src='/ilo-headquarters.jpg'><figcaption>The ILO's headquarters in Geneva, Switzerland. \u00A9Steiner SA</figcaption></figure> <h3>ILO Constitution</h3> <p>The driving forces for the ILO's creation arose from security, humanitarian, political and economic considerations.</p> <blockquote> <p>The fundamental ideas that forged the ILO one hundred and three years ago still underpin the global pledge to leave no one behind.</p> <cite>ILO Director-General Gilbert F. Houngbo</cite> </blockquote> Reflecting these ideas, the Preamble of the ILO Constitution states:</p> <ol> <li>Whereas universal and lasting peace can be established only if it is based upon social justice;</li> <li>And whereas conditions of labour exist involving such injustice, hardship and privation to large numbers of people as to produce unrest so great that the peace and harmony of the world are imperilled; and an improvement of those conditions is urgently required;</li> <li>Whereas also the failure of any nation to adopt humane conditions of labour is an obstacle in the way of other nations which desire to improve the conditions in their own countries.</li> </ol>" })),
25
+ },
26
+ ],
27
+ };
28
+ const withIcon = {
29
+ items: [
30
+ {
31
+ icon: {
32
+ hidden: false,
33
+ name: "info",
34
+ },
35
+ label: "Tab Label With A Really Really Lenghty Title Even Though We Do Not Recommend Such A Lengthy Title",
36
+ content: (jsx(Image, { alt: "My alt text", caption: "Women construction workers in Nepal build roads and bridges as part of a National Rural Transport Programme co-sponsored by the ILO.", credit: "\u00A9 Marcel Crozet/ILO", url: [
37
+ { breakpoint: 0, src: "/small.jpg" },
38
+ { breakpoint: 800, src: "/medium.jpg" },
39
+ { breakpoint: 1200, src: "/large.jpg" },
40
+ { breakpoint: 1440, src: "/large.jpg" },
41
+ ] })),
42
+ },
43
+ {
44
+ icon: {
45
+ hidden: false,
46
+ name: "info",
47
+ },
48
+ label: "Tab Label 2",
49
+ content: (jsx(RichText, { content: "<h2>International Labour Organization</h2> <p>The <b>International Labour Organization</b> (<b>ILO</b>) is a <a href='https://www.un.org'>United Nations</a> agency whose mandate is to advance social and economic justice by setting international labour standards. Founded in October 1919 under the League of Nations, it is the first and oldest specialised agency of the UN. The ILO has 187 member states: 186 out of 193 UN member states plus the Cook Islands.</p> <p>Whereas also the failure of any nation to adopt humane conditions of labour is an obstacle in the way of other nations which desire to improve the conditions in their own countries.</p> <figure><img alt='placeholder image' class='right' src='/ilo-headquarters.jpg'><figcaption>The ILO's headquarters in Geneva, Switzerland. \u00A9Steiner SA</figcaption></figure> <h3>ILO Constitution</h3> <p>The driving forces for the ILO's creation arose from security, humanitarian, political and economic considerations.</p> <blockquote> <p>The fundamental ideas that forged the ILO one hundred and three years ago still underpin the global pledge to leave no one behind.</p> <cite>ILO Director-General Gilbert F. Houngbo</cite> </blockquote> Reflecting these ideas, the Preamble of the ILO Constitution states:</p> <ol> <li>Whereas universal and lasting peace can be established only if it is based upon social justice;</li> <li>And whereas conditions of labour exist involving such injustice, hardship and privation to large numbers of people as to produce unrest so great that the peace and harmony of the world are imperilled; and an improvement of those conditions is urgently required;</li> <li>Whereas also the failure of any nation to adopt humane conditions of labour is an obstacle in the way of other nations which desire to improve the conditions in their own countries.</li> </ol>" })),
50
+ },
51
+ ],
52
+ };
53
+ const fiveItems = {
54
+ items: [
55
+ {
56
+ label: "Tab One",
57
+ content: (jsx(RichText, { content: "<h2>International Labour Organization</h2> <p>The <b>International Labour Organization</b> (<b>ILO</b>) is a <a href='https://www.un.org'>United Nations</a> agency whose mandate is to advance social and economic justice by setting international labour standards. Founded in October 1919 under the League of Nations, it is the first and oldest specialised agency of the UN. The ILO has 187 member states: 186 out of 193 UN member states plus the Cook Islands.</p> <p>Whereas also the failure of any nation to adopt humane conditions of labour is an obstacle in the way of other nations which desire to improve the conditions in their own countries.</p> <figure><img alt='placeholder image' class='right' src='/ilo-headquarters.jpg'><figcaption>The ILO's headquarters in Geneva, Switzerland. \u00A9Steiner SA</figcaption></figure> <h3>ILO Constitution</h3> <p>The driving forces for the ILO's creation arose from security, humanitarian, political and economic considerations.</p> <blockquote> <p>The fundamental ideas that forged the ILO one hundred and three years ago still underpin the global pledge to leave no one behind.</p> <cite>ILO Director-General Gilbert F. Houngbo</cite> </blockquote> Reflecting these ideas, the Preamble of the ILO Constitution states:</p> <ol> <li>Whereas universal and lasting peace can be established only if it is based upon social justice;</li> <li>And whereas conditions of labour exist involving such injustice, hardship and privation to large numbers of people as to produce unrest so great that the peace and harmony of the world are imperilled; and an improvement of those conditions is urgently required;</li> <li>Whereas also the failure of any nation to adopt humane conditions of labour is an obstacle in the way of other nations which desire to improve the conditions in their own countries.</li> </ol>" })),
58
+ },
59
+ {
60
+ label: "Tab Two",
61
+ content: (jsx(Image, { alt: "My alt text", caption: "Women construction workers in Nepal build roads and bridges as part of a National Rural Transport Programme co-sponsored by the ILO.", credit: "\u00A9 Marcel Crozet/ILO", url: [
62
+ {
63
+ breakpoint: 0,
64
+ src: "https://place-hold.it/400x300?text=Tab Two Image",
65
+ },
66
+ {
67
+ breakpoint: 800,
68
+ src: "https://place-hold.it/800x600?text=Tab Two Image",
69
+ },
70
+ {
71
+ breakpoint: 1200,
72
+ src: "https://place-hold.it/1200x900?text=Tab Two Image",
73
+ },
74
+ {
75
+ breakpoint: 1440,
76
+ src: "https://place-hold.it/1600x1200?text=Tab Two Image",
77
+ },
78
+ ] })),
79
+ },
80
+ {
81
+ label: "Tab Three",
82
+ content: (jsx(Image, { alt: "My alt text", caption: "Women construction workers in Nepal build roads and bridges as part of a National Rural Transport Programme co-sponsored by the ILO.", credit: "\u00A9 Marcel Crozet/ILO", url: [
83
+ {
84
+ breakpoint: 0,
85
+ src: "https://place-hold.it/400x300?text=Tab Three Image",
86
+ },
87
+ {
88
+ breakpoint: 800,
89
+ src: "https://place-hold.it/800x600?text=Tab Three Image",
90
+ },
91
+ {
92
+ breakpoint: 1200,
93
+ src: "https://place-hold.it/1200x900?text=Tab Three Image",
94
+ },
95
+ {
96
+ breakpoint: 1440,
97
+ src: "https://place-hold.it/1600x1200?text=Tab Three Image",
98
+ },
99
+ ] })),
100
+ },
101
+ {
102
+ label: "Tab Four Has A Really Lenghthy Title Which Might Get Truncated",
103
+ content: (jsx(Image, { alt: "My alt text", caption: "Women construction workers in Nepal build roads and bridges as part of a National Rural Transport Programme co-sponsored by the ILO.", credit: "\u00A9 Marcel Crozet/ILO", url: [
104
+ {
105
+ breakpoint: 0,
106
+ src: "https://place-hold.it/400x300?text=Tab Four Image",
107
+ },
108
+ {
109
+ breakpoint: 800,
110
+ src: "https://place-hold.it/800x600?text=Tab Four Image",
111
+ },
112
+ {
113
+ breakpoint: 1200,
114
+ src: "https://place-hold.it/1200x900?text=Tab Four Image",
115
+ },
116
+ {
117
+ breakpoint: 1440,
118
+ src: "https://place-hold.it/1600x1200?text=Tab Four Image",
119
+ },
120
+ ] })),
121
+ },
122
+ {
123
+ label: "Tab Five",
124
+ content: (jsx(Image, { alt: "My alt text", caption: "Women construction workers in Nepal build roads and bridges as part of a National Rural Transport Programme co-sponsored by the ILO.", credit: "\u00A9 Marcel Crozet/ILO", url: [
125
+ {
126
+ breakpoint: 0,
127
+ src: "https://place-hold.it/400x300?text=Tab Five Image",
128
+ },
129
+ {
130
+ breakpoint: 800,
131
+ src: "https://place-hold.it/800x600?text=Tab Five Image",
132
+ },
133
+ {
134
+ breakpoint: 1200,
135
+ src: "https://place-hold.it/1200x900?text=Tab Five Image",
136
+ },
137
+ {
138
+ breakpoint: 1440,
139
+ src: "https://place-hold.it/1600x1200?text=Tab Five Image",
140
+ },
141
+ ] })),
142
+ },
143
+ ],
144
+ };
145
+ /**
146
+ * Sample prop definitions for Button's enumerable properties (imported in stories and tests).
147
+ */
148
+ const TabsArgs = {
149
+ tabs,
150
+ withIcon,
151
+ fiveItems,
152
+ };
153
+
154
+ export { TabsArgs as default };
@@ -0,0 +1,22 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useState } from 'react';
3
+ import useGlobalSettings from '../../hooks/useGlobalSettings.js';
4
+ import classNames from 'classnames';
5
+ import Icon from '../Icon/Icon.js';
6
+ import 'tslib';
7
+ import '../../GlobalCtx-7fb23cfa.js';
8
+ import '@ilo-org/icons-react';
9
+
10
+ const Tabs = ({ items }) => {
11
+ const [activeTab, setActiveTab] = useState(0);
12
+ const handleTabClick = (index, e) => {
13
+ setActiveTab(index);
14
+ e.preventDefault();
15
+ };
16
+ const { prefix } = useGlobalSettings();
17
+ const baseClass = `${prefix}--tabs`;
18
+ const tabsClasses = classNames(baseClass);
19
+ return (jsxs("div", Object.assign({ className: `${tabsClasses} tabs--js` }, { children: [jsx("ul", Object.assign({ className: `${baseClass}--selection`, role: "tablist" }, { children: items.map((tab, index) => (jsx("li", Object.assign({ role: "tab", className: `${baseClass}--selection--item ${activeTab === index ? "active" : ""}`, onClick: (e) => handleTabClick(index, e) }, { children: jsxs("a", Object.assign({ href: `#tab--${index}`, className: `${baseClass}--selection--button${tab.icon ? " icon" : ""}`, role: "tab", "aria-controls": `tab--${index}`, "aria-selected": index === activeTab ? true : false, title: tab.label }, { children: [jsx("span", Object.assign({ className: `${baseClass}--selection--label` }, { children: tab.label })), tab.icon && (jsx(Icon, { name: tab.icon.name, hidden: tab.icon.hidden }))] })) }), `#tab--${index}`))) })), jsx("div", Object.assign({ className: `${baseClass}--content` }, { children: items[activeTab].content }))] })));
20
+ };
21
+
22
+ export { Tabs as default };
@@ -0,0 +1,9 @@
1
+ export { default as Tabs } from './Tabs.js';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
4
+ import '../../hooks/useGlobalSettings.js';
5
+ import 'tslib';
6
+ import '../../GlobalCtx-7fb23cfa.js';
7
+ import 'classnames';
8
+ import '../Icon/Icon.js';
9
+ import '@ilo-org/icons-react';
@@ -1,6 +1,6 @@
1
1
  import { __rest } from 'tslib';
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import require$$0 from 'react';
3
+ import React from 'react';
4
4
  import classNames from 'classnames';
5
5
  import useGlobalSettings from '../../hooks/useGlobalSettings.js';
6
6
  import FormControl, { useFormControl } from '../FormControl/FormControl.js';
@@ -9,7 +9,7 @@ import 'nanoid';
9
9
  import '../Tooltip/Tooltip.js';
10
10
  import '@popperjs/core';
11
11
 
12
- const TextInput = require$$0.forwardRef(({ onChange, onBlur, error, id, name, placeholder, required, pattern, disabled = false, type = "text", }, ref) => {
12
+ const TextInput = React.forwardRef(({ onChange, onBlur, error, id, name, placeholder, required, pattern, disabled = false, type = "text", }, ref) => {
13
13
  const { prefix } = useGlobalSettings();
14
14
  const formControlCtx = useFormControl();
15
15
  const { ariaDescribedBy } = formControlCtx;
@@ -19,7 +19,7 @@ const TextInput = require$$0.forwardRef(({ onChange, onBlur, error, id, name, pl
19
19
  });
20
20
  return (jsx("input", { ref: ref, id: id ? id : name, name: name, onChange: onChange, onBlur: onBlur, disabled: disabled, placeholder: placeholder, required: required, type: type, className: inputClass, pattern: pattern, "aria-describedby": ariaDescribedBy }));
21
21
  });
22
- const LabelledTextInput = require$$0.forwardRef((props, ref) => {
22
+ const LabelledTextInput = React.forwardRef((props, ref) => {
23
23
  const { style, inputStyle, className } = props, rest = __rest(props, ["style", "inputStyle", "className"]);
24
24
  const fieldId = props.id ? props.id : props.name;
25
25
  return (jsx(FormControl, Object.assign({ fieldId: fieldId, style: style, className: className }, rest, { children: jsx(TextInput, Object.assign({ ref: ref, style: inputStyle }, rest)) })));
@@ -1,6 +1,6 @@
1
1
  import { __rest } from 'tslib';
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import require$$0 from 'react';
3
+ import React from 'react';
4
4
  import classNames from 'classnames';
5
5
  import useGlobalSettings from '../../hooks/useGlobalSettings.js';
6
6
  import FormControl, { useFormControl } from '../FormControl/FormControl.js';
@@ -9,7 +9,7 @@ import 'nanoid';
9
9
  import '../Tooltip/Tooltip.js';
10
10
  import '@popperjs/core';
11
11
 
12
- const Textarea = require$$0.forwardRef((_a, ref) => {
12
+ const Textarea = React.forwardRef((_a, ref) => {
13
13
  var { error, className, name, id } = _a, props = __rest(_a, ["error", "className", "name", "id"]);
14
14
  const { prefix } = useGlobalSettings();
15
15
  const formControlCtx = useFormControl();
@@ -21,7 +21,7 @@ const Textarea = require$$0.forwardRef((_a, ref) => {
21
21
  });
22
22
  return (jsx("textarea", Object.assign({ ref: ref, className: textAreaClass, name: name, id: id ? id : name, "aria-describedby": ariaDescribedBy }, props)));
23
23
  });
24
- const LabelledTextarea = require$$0.forwardRef((props, ref) => {
24
+ const LabelledTextarea = React.forwardRef((props, ref) => {
25
25
  const { style, inputStyle, className } = props, rest = __rest(props, ["style", "inputStyle", "className"]);
26
26
  const fieldId = props.id ? props.id : props.name;
27
27
  return (jsx(FormControl, Object.assign({ fieldId: fieldId, style: style, className: className }, rest, { children: jsx(Textarea, Object.assign({ ref: ref, style: inputStyle }, rest)) })));
@@ -1,25 +1,24 @@
1
+ import { __rest } from 'tslib';
1
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { forwardRef } from 'react';
2
4
  import classNames from 'classnames';
3
5
  import useGlobalSettings from '../../hooks/useGlobalSettings.js';
4
- import { V as VideoPlayer } from '../../VideoPlayer-96c2b20c.js';
5
- import 'tslib';
6
- import 'react';
6
+ import VideoPlayer from './VideoPlayer.js';
7
7
  import '../../GlobalCtx-7fb23cfa.js';
8
- import '../../index-623ce3f5.js';
9
- import 'react-dom';
10
- import '../../utils/hoursMinutesSeconds.js';
11
- import 'screenfull';
8
+ import 'videojs-youtube';
9
+ import 'video.js';
12
10
 
13
- const Video = ({ className, caption, poster, video }) => {
11
+ const Video = forwardRef((_a, ref) => {
12
+ var { className, caption } = _a, video = __rest(_a, ["className", "caption"]);
14
13
  const { prefix } = useGlobalSettings();
15
- const baseClass = `${prefix}--legacyvideo`;
14
+ const baseClass = `${prefix}--video`;
16
15
  const videoClasses = classNames(className, {
17
16
  [baseClass]: true,
18
17
  });
19
18
  const captionClasses = classNames("", {
20
19
  [`${baseClass}--caption`]: true,
21
20
  });
22
- return (jsxs("figure", Object.assign({ className: videoClasses }, { children: [jsx("div", Object.assign({ className: `${videoClasses}--wrapper` }, { children: video && jsx(VideoPlayer, Object.assign({}, video, { poster: poster })) })), caption && jsx("figcaption", Object.assign({ className: captionClasses }, { children: caption }))] })));
23
- };
21
+ return (jsxs("figure", Object.assign({ className: videoClasses }, { children: [jsx("div", Object.assign({ className: `${videoClasses}--wrapper` }, { children: video && jsx(VideoPlayer, Object.assign({}, video, { ref: ref })) })), caption && (jsx("figcaption", Object.assign({ className: captionClasses }, { children: caption })))] })));
22
+ });
24
23
 
25
24
  export { Video as default };
@@ -1,11 +1,57 @@
1
- import 'react/jsx-runtime';
2
- import 'react';
3
- export { V as default } from '../../VideoPlayer-96c2b20c.js';
4
- import 'react-dom';
5
- import 'classnames';
6
- import '../../hooks/useGlobalSettings.js';
7
- import '../../utils/hoursMinutesSeconds.js';
8
- import 'screenfull';
9
- import '../../index-623ce3f5.js';
10
- import 'tslib';
11
- import '../../GlobalCtx-7fb23cfa.js';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { forwardRef, useRef, useImperativeHandle, useEffect } from 'react';
3
+ import 'videojs-youtube';
4
+ import videojs from 'video.js';
5
+
6
+ const video = videojs;
7
+ const VideoPlayer = forwardRef(({ src, poster, youtube }, ref) => {
8
+ const videoNode = useRef(null);
9
+ const player = useRef();
10
+ useImperativeHandle(ref, () => ({
11
+ get player() {
12
+ return player.current;
13
+ },
14
+ }), [player]);
15
+ useEffect(() => {
16
+ if (videoNode.current) {
17
+ player.current = video(videoNode.current, {
18
+ autoplay: false,
19
+ controls: true,
20
+ preload: "auto",
21
+ bigPlayButton: false,
22
+ poster: poster === null || poster === void 0 ? void 0 : poster.src,
23
+ controlBar: {
24
+ descriptionsButton: false,
25
+ playbackRateMenuButton: false,
26
+ chaptersButton: false,
27
+ audioTrackButton: false,
28
+ pictureInPictureToggle: false,
29
+ subsCapsButton: false,
30
+ seekToLive: false,
31
+ liveDisplay: false,
32
+ },
33
+ errorDisplay: false,
34
+ textTrackSettings: false,
35
+ resizeManager: false,
36
+ /**
37
+ * If youtube is true, it will default to the youtube video
38
+ */
39
+ sources: [
40
+ { type: youtube ? "video/youtube" : undefined, src: src },
41
+ ],
42
+ dataSetup: {
43
+ techOrder: ["youtube"],
44
+ },
45
+ liveTracker: false,
46
+ });
47
+ }
48
+ return () => {
49
+ if (player.current) {
50
+ player.current.dispose();
51
+ }
52
+ };
53
+ }, [poster === null || poster === void 0 ? void 0 : poster.src, src, youtube]);
54
+ return (jsx("div", Object.assign({ className: "ilo--videoplayer" }, { children: jsx("video", { ref: videoNode, className: "ilo--video--element" }) })));
55
+ });
56
+
57
+ export { VideoPlayer as default };
@@ -1,12 +1,10 @@
1
1
  export { default as Video } from './Video.js';
2
+ import 'tslib';
2
3
  import 'react/jsx-runtime';
4
+ import 'react';
3
5
  import 'classnames';
4
6
  import '../../hooks/useGlobalSettings.js';
5
- import 'tslib';
6
- import 'react';
7
7
  import '../../GlobalCtx-7fb23cfa.js';
8
- import '../../VideoPlayer-96c2b20c.js';
9
- import '../../index-623ce3f5.js';
10
- import 'react-dom';
11
- import '../../utils/hoursMinutesSeconds.js';
12
- import 'screenfull';
8
+ import './VideoPlayer.js';
9
+ import 'videojs-youtube';
10
+ import 'video.js';
@@ -53,11 +53,11 @@ export { default as Navigation } from './Navigation/Navigation.js';
53
53
  export { default as Card } from './Card/Card.js';
54
54
  export { default as CardGroup } from './Card/CardGroup.js';
55
55
  export { default as Breadcrumb } from './Breadcrumb/Breadcrumb.js';
56
+ export { default as Tabs } from './Tabs/Tabs.js';
56
57
  import '../hooks/useGlobalSettings.js';
57
58
  import '../AccordionCtx-8c051900.js';
58
59
  import '@ilo-org/utils';
59
60
  import '../utils/checkArrayDuplicates.js';
60
- import '../index-623ce3f5.js';
61
61
  import 'react-dom';
62
62
  import '../utils/createChainedFunction.js';
63
63
  import '../utils/getDefaultDimensionValue.js';
@@ -72,9 +72,9 @@ import './Hero/HeroCard.js';
72
72
  import './SocialMedia/SocialMedia.js';
73
73
  import './Input/Input.js';
74
74
  import './FormElement/FormElement.js';
75
- import '../VideoPlayer-96c2b20c.js';
76
- import '../utils/hoursMinutesSeconds.js';
77
- import 'screenfull';
75
+ import './Video/VideoPlayer.js';
76
+ import 'videojs-youtube';
77
+ import 'video.js';
78
78
  import '@ilo-org/icons-react';
79
79
  import './Logo/Logo.js';
80
80
  import './List/ListItem.js';
package/lib/esm/index.js CHANGED
@@ -53,11 +53,11 @@ export { default as Navigation } from './components/Navigation/Navigation.js';
53
53
  export { default as Card } from './components/Card/Card.js';
54
54
  export { default as CardGroup } from './components/Card/CardGroup.js';
55
55
  export { default as Breadcrumb } from './components/Breadcrumb/Breadcrumb.js';
56
+ export { default as Tabs } from './components/Tabs/Tabs.js';
56
57
  import './hooks/useGlobalSettings.js';
57
58
  import './AccordionCtx-8c051900.js';
58
59
  import '@ilo-org/utils';
59
60
  import './utils/checkArrayDuplicates.js';
60
- import './index-623ce3f5.js';
61
61
  import 'react-dom';
62
62
  import './utils/createChainedFunction.js';
63
63
  import './utils/getDefaultDimensionValue.js';
@@ -73,8 +73,8 @@ import './components/Hero/HeroCard.js';
73
73
  import './components/SocialMedia/SocialMedia.js';
74
74
  import './components/Input/Input.js';
75
75
  import './components/FormElement/FormElement.js';
76
- import './VideoPlayer-96c2b20c.js';
77
- import './utils/hoursMinutesSeconds.js';
78
- import 'screenfull';
76
+ import './components/Video/VideoPlayer.js';
77
+ import 'videojs-youtube';
78
+ import 'video.js';
79
79
  import './components/Logo/Logo.js';
80
80
  import './components/List/ListItem.js';
@@ -0,0 +1,10 @@
1
+ import { TabsProps } from "./Tabs.props";
2
+ /**
3
+ * Sample prop definitions for Button's enumerable properties (imported in stories and tests).
4
+ */
5
+ declare const TabsArgs: {
6
+ tabs: TabsProps;
7
+ withIcon: TabsProps;
8
+ fiveItems: TabsProps;
9
+ };
10
+ export default TabsArgs;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { TabsProps } from "./Tabs.props";
3
+ declare const Tabs: FC<TabsProps>;
4
+ export default Tabs;
@@ -0,0 +1,12 @@
1
+ import { IconProps } from "../Icon/Icon.props";
2
+ export interface TabsProps {
3
+ /**
4
+ * Specify the items inside a tab
5
+ */
6
+ items: Required<Array<TabItem>>;
7
+ }
8
+ export interface TabItem {
9
+ icon?: IconProps;
10
+ label: Required<string>;
11
+ content: Required<any>;
12
+ }
@@ -0,0 +1 @@
1
+ export { default as Tabs } from "./Tabs";
@@ -1,4 +1,4 @@
1
- import { FC } from "react";
2
1
  import { VideoProps } from "./Video.props";
3
- declare const Video: FC<VideoProps>;
2
+ import { VideoPlayerRef } from "./VideoPlayer.props";
3
+ declare const Video: import("react").ForwardRefExoticComponent<VideoProps & import("react").RefAttributes<VideoPlayerRef>>;
4
4
  export default Video;
@@ -1,51 +1,18 @@
1
- import { TracksConfig } from "./VideoPlayer.props";
1
+ import { VideoPlayerControls } from "./VideoPlayer.props";
2
2
  export interface Poster {
3
- url: {
4
- src: string;
5
- }[];
3
+ src: string;
6
4
  alt: string;
7
5
  }
8
- interface VideoPlayerControls {
9
- /**
10
- * Specify the label for the fullscreen button
11
- */
12
- fullscreen?: Required<string>;
13
- /**
14
- * Specify the label for the play button
15
- */
16
- play?: Required<string>;
17
- /**
18
- * Specify the label for the pause button
19
- */
20
- pause?: Required<string>;
21
- /**
22
- * Specify the label for the volume button
23
- */
24
- volume?: Required<string>;
25
- }
26
- interface Video {
6
+ export interface VideoProps {
7
+ src: string;
27
8
  /**
28
9
  * Specify the strings to be used as labels for the video controls
29
10
  */
30
- controls?: Required<VideoPlayerControls | false>;
31
- /**
32
- * if self-hosted, specify the url of this video
33
- */
34
- src?: string | null;
35
- /**
36
- * if there are closed-caption tracks,
37
- */
38
- tracks?: TracksConfig[];
11
+ controls?: VideoPlayerControls;
39
12
  /**
40
13
  * if YouTube, set to true
41
14
  */
42
15
  youtube?: boolean;
43
- }
44
- export interface VideoProps {
45
- /**
46
- * Specify the alt for the image
47
- */
48
- alt: string;
49
16
  /**
50
17
  * Specify the caption for the image/video
51
18
  */
@@ -58,9 +25,4 @@ export interface VideoProps {
58
25
  * Specify the image src for the image
59
26
  */
60
27
  poster?: Poster;
61
- /**
62
- * Specify whether there is a video being shown
63
- */
64
- video: Video;
65
28
  }
66
- export {};
@@ -1,4 +1,4 @@
1
- import { FC } from "react";
2
- import { VideoPlayerProps } from "./VideoPlayer.props";
3
- declare const VideoPlayer: FC<VideoPlayerProps>;
1
+ import "videojs-youtube";
2
+ import { VideoPlayerProps, VideoPlayerRef } from "./VideoPlayer.props";
3
+ declare const VideoPlayer: import("react").ForwardRefExoticComponent<VideoPlayerProps & import("react").RefAttributes<VideoPlayerRef>>;
4
4
  export default VideoPlayer;