@bbl-digital/snorre 3.1.58 → 3.1.60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. package/dist/bundle.js +171 -98
  2. package/esm/core/MediaCarousel/MediaCarousel.stories.js +34 -0
  3. package/esm/core/MediaCarousel/index.js +7 -4
  4. package/esm/core/MediaCarousel/styles.js +6 -6
  5. package/esm/core/Video/Video.stories.js +20 -10
  6. package/esm/core/Video/index.js +72 -13
  7. package/esm/core/Video/styles.js +16 -7
  8. package/esm/shared/components/SbIconGrid/index.js +1 -1
  9. package/lib/core/Alert/Alert.stories.d.ts +7 -6
  10. package/lib/core/Alert/Alert.stories.d.ts.map +1 -1
  11. package/lib/core/Alert/styles.d.ts +6 -6
  12. package/lib/core/AppLoader/AppLoader.stories.d.ts +3 -2
  13. package/lib/core/AppLoader/AppLoader.stories.d.ts.map +1 -1
  14. package/lib/core/AppLoader/styles.d.ts +1 -1
  15. package/lib/core/Autocomplete/Autocomplete.stories.d.ts +16 -16
  16. package/lib/core/Autocomplete/styles.d.ts +18 -18
  17. package/lib/core/Banner/Banner.stories.d.ts +7 -6
  18. package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
  19. package/lib/core/BarAndLineComposedChart/BarAndLineComposedChart.stories.d.ts +3 -2
  20. package/lib/core/BarAndLineComposedChart/BarAndLineComposedChart.stories.d.ts.map +1 -1
  21. package/lib/core/BarChartWithCustomizedEvent/BarChartWithCustomizedEvent.stories.d.ts +3 -2
  22. package/lib/core/BarChartWithCustomizedEvent/BarChartWithCustomizedEvent.stories.d.ts.map +1 -1
  23. package/lib/core/Box/Box.stories.d.ts +11 -10
  24. package/lib/core/Box/Box.stories.d.ts.map +1 -1
  25. package/lib/core/Box/styles.d.ts +5 -5
  26. package/lib/core/BoxedTable/BoxedTable.stories.d.ts +10 -9
  27. package/lib/core/BoxedTable/BoxedTable.stories.d.ts.map +1 -1
  28. package/lib/core/BoxedTable/HeaderCell/styles.d.ts +1 -1
  29. package/lib/core/BoxedTable/RowCell/styles.d.ts +8 -8
  30. package/lib/core/Button/Button.stories.d.ts +17 -16
  31. package/lib/core/Button/Button.stories.d.ts.map +1 -1
  32. package/lib/core/Button/styles.d.ts +18 -18
  33. package/lib/core/Calendar/Calendar.stories.d.ts +5 -4
  34. package/lib/core/Calendar/Calendar.stories.d.ts.map +1 -1
  35. package/lib/core/Card/Card.stories.d.ts +7 -7
  36. package/lib/core/Card/styles.d.ts +11 -11
  37. package/lib/core/Checkbox/Checkbox.stories.d.ts +7 -6
  38. package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
  39. package/lib/core/Checkbox/styles.d.ts +5 -5
  40. package/lib/core/CollapseList/CollapseList.stories.d.ts +4 -3
  41. package/lib/core/CollapseList/CollapseList.stories.d.ts.map +1 -1
  42. package/lib/core/CollapseList/styles.d.ts +2 -2
  43. package/lib/core/CommentsTimeline/CommentsTimeline.stories.d.ts +4 -3
  44. package/lib/core/CommentsTimeline/CommentsTimeline.stories.d.ts.map +1 -1
  45. package/lib/core/CustomText/CustomText.stories.d.ts +6 -5
  46. package/lib/core/CustomText/CustomText.stories.d.ts.map +1 -1
  47. package/lib/core/CustomText/styles.d.ts +1 -1
  48. package/lib/core/Datepicker/Datepicker.stories.d.ts +8 -7
  49. package/lib/core/Datepicker/Datepicker.stories.d.ts.map +1 -1
  50. package/lib/core/Datepicker/styles.d.ts +4 -4
  51. package/lib/core/DatepickerRange/DatepickerRange.stories.d.ts +3 -2
  52. package/lib/core/DatepickerRange/DatepickerRange.stories.d.ts.map +1 -1
  53. package/lib/core/DatepickerRange/styles.d.ts +4 -4
  54. package/lib/core/Divider/styles.d.ts +5 -5
  55. package/lib/core/Dropdown/Dropdown.stories.d.ts +7 -6
  56. package/lib/core/Dropdown/Dropdown.stories.d.ts.map +1 -1
  57. package/lib/core/Dropdown/styles.d.ts +3 -3
  58. package/lib/core/DropdownMenu/DropdownMenu.stories.d.ts +5 -4
  59. package/lib/core/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
  60. package/lib/core/DropdownMenu/styles.d.ts +1 -1
  61. package/lib/core/Editor/Editor.stories.d.ts +7 -6
  62. package/lib/core/Editor/Editor.stories.d.ts.map +1 -1
  63. package/lib/core/Editor/styles.d.ts +2 -2
  64. package/lib/core/FileInput/styles.d.ts +1 -1
  65. package/lib/core/GoogleButton/GoogleButton.stories.d.ts +3 -2
  66. package/lib/core/GoogleButton/GoogleButton.stories.d.ts.map +1 -1
  67. package/lib/core/Header/Header.stories.d.ts +10 -9
  68. package/lib/core/Header/Header.stories.d.ts.map +1 -1
  69. package/lib/core/Header/styles.d.ts +7 -7
  70. package/lib/core/HighlightText/HighlightText.stories.d.ts +4 -3
  71. package/lib/core/HighlightText/HighlightText.stories.d.ts.map +1 -1
  72. package/lib/core/Html/Html.stories.d.ts +6 -5
  73. package/lib/core/Html/Html.stories.d.ts.map +1 -1
  74. package/lib/core/Html/styles.d.ts +6 -6
  75. package/lib/core/Image/Image.stories.d.ts +5 -4
  76. package/lib/core/Image/Image.stories.d.ts.map +1 -1
  77. package/lib/core/Image/styles.d.ts +4 -4
  78. package/lib/core/ImagePicker/ImagePicker.stories.d.ts +2 -1
  79. package/lib/core/ImagePicker/ImagePicker.stories.d.ts.map +1 -1
  80. package/lib/core/ImagePicker/styles.d.ts +11 -11
  81. package/lib/core/InfoButton/InfoButton.stories.d.ts +7 -6
  82. package/lib/core/InfoButton/InfoButton.stories.d.ts.map +1 -1
  83. package/lib/core/InfoButton/styles.d.ts +7 -7
  84. package/lib/core/Input/styles.d.ts +16 -16
  85. package/lib/core/Link/Link.stories.d.ts +11 -10
  86. package/lib/core/Link/Link.stories.d.ts.map +1 -1
  87. package/lib/core/Link/styles.d.ts +9 -9
  88. package/lib/core/List/List.stories.d.ts +11 -10
  89. package/lib/core/List/List.stories.d.ts.map +1 -1
  90. package/lib/core/List/styles.d.ts +11 -11
  91. package/lib/core/ListPager/ListPager.stories.d.ts +3 -2
  92. package/lib/core/ListPager/ListPager.stories.d.ts.map +1 -1
  93. package/lib/core/ListPager/styles.d.ts +1 -1
  94. package/lib/core/MediaCarousel/MediaCarousel.stories.d.ts +12 -0
  95. package/lib/core/MediaCarousel/MediaCarousel.stories.d.ts.map +1 -0
  96. package/lib/core/MediaCarousel/MediaCarousel.stories.js +34 -0
  97. package/lib/core/MediaCarousel/index.d.ts +6 -3
  98. package/lib/core/MediaCarousel/index.d.ts.map +1 -1
  99. package/lib/core/MediaCarousel/index.js +7 -4
  100. package/lib/core/MediaCarousel/styles.d.ts.map +1 -1
  101. package/lib/core/MediaCarousel/styles.js +6 -6
  102. package/lib/core/Modal/Modal.stories.d.ts +7 -6
  103. package/lib/core/Modal/Modal.stories.d.ts.map +1 -1
  104. package/lib/core/NoticeCard/NoticeCard.stories.d.ts +4 -3
  105. package/lib/core/NoticeCard/NoticeCard.stories.d.ts.map +1 -1
  106. package/lib/core/NotificationCounter/NotificationCounter.stories.d.ts +4 -3
  107. package/lib/core/NotificationCounter/NotificationCounter.stories.d.ts.map +1 -1
  108. package/lib/core/NotificationCounter/styles.d.ts +1 -1
  109. package/lib/core/NotificationsMenu/NotificationsMenu.stories.d.ts +4 -3
  110. package/lib/core/NotificationsMenu/NotificationsMenu.stories.d.ts.map +1 -1
  111. package/lib/core/PieChart/PieChart.stories.d.ts +6 -5
  112. package/lib/core/PieChart/PieChart.stories.d.ts.map +1 -1
  113. package/lib/core/PreemptionCard/PreemptionCard.stories.d.ts +3 -2
  114. package/lib/core/PreemptionCard/PreemptionCard.stories.d.ts.map +1 -1
  115. package/lib/core/PreemptionCardLoading/PreemptionCardLoading.stories.d.ts +3 -2
  116. package/lib/core/PreemptionCardLoading/PreemptionCardLoading.stories.d.ts.map +1 -1
  117. package/lib/core/Radio/Radio.stories.d.ts +6 -5
  118. package/lib/core/Radio/Radio.stories.d.ts.map +1 -1
  119. package/lib/core/Radio/styles.d.ts +4 -4
  120. package/lib/core/SearchFilter/SearchFilter.stories.d.ts +6 -5
  121. package/lib/core/SearchFilter/SearchFilter.stories.d.ts.map +1 -1
  122. package/lib/core/SearchFilter/styles.d.ts +2 -2
  123. package/lib/core/SearchSelect/SearchSelect.stories.d.ts +4 -3
  124. package/lib/core/SearchSelect/SearchSelect.stories.d.ts.map +1 -1
  125. package/lib/core/SearchSelect/styles.d.ts +1 -1
  126. package/lib/core/Select/Select.stories.d.ts +13 -12
  127. package/lib/core/Select/Select.stories.d.ts.map +1 -1
  128. package/lib/core/Select/styles.d.ts +13 -13
  129. package/lib/core/SimpleBarChart/SimpleBarChart.stories.d.ts +6 -5
  130. package/lib/core/SimpleBarChart/SimpleBarChart.stories.d.ts.map +1 -1
  131. package/lib/core/SimpleLineChart/SimpleLineChart.stories.d.ts +3 -2
  132. package/lib/core/SimpleLineChart/SimpleLineChart.stories.d.ts.map +1 -1
  133. package/lib/core/Spinner/Spinner.stories.d.ts +6 -5
  134. package/lib/core/Spinner/Spinner.stories.d.ts.map +1 -1
  135. package/lib/core/Spinner/styles.d.ts +5 -5
  136. package/lib/core/TabBar/TabBar.stories.d.ts +3 -2
  137. package/lib/core/TabBar/TabBar.stories.d.ts.map +1 -1
  138. package/lib/core/TabNav/TabNav.stories.d.ts +13 -12
  139. package/lib/core/TabNav/TabNav.stories.d.ts.map +1 -1
  140. package/lib/core/TabNav/TabNavItem/styles.d.ts +1 -1
  141. package/lib/core/TabNav/styles.d.ts +4 -4
  142. package/lib/core/Table/Table.stories.d.ts +4 -3
  143. package/lib/core/Table/Table.stories.d.ts.map +1 -1
  144. package/lib/core/Table/styles.d.ts +14 -14
  145. package/lib/core/Tag/Tag.stories.d.ts +16 -15
  146. package/lib/core/Tag/Tag.stories.d.ts.map +1 -1
  147. package/lib/core/Tag/styles.d.ts +12 -12
  148. package/lib/core/Text/styles.d.ts +14 -14
  149. package/lib/core/Textarea/Textarea.stories.d.ts +6 -5
  150. package/lib/core/Textarea/Textarea.stories.d.ts.map +1 -1
  151. package/lib/core/Textarea/styles.d.ts +3 -3
  152. package/lib/core/Timeline/Timeline.stories.d.ts +3 -2
  153. package/lib/core/Timeline/Timeline.stories.d.ts.map +1 -1
  154. package/lib/core/Timeline/TimelineStep/styles.d.ts +3 -3
  155. package/lib/core/Timepicker/Timepicker.stories.d.ts +9 -8
  156. package/lib/core/Timepicker/Timepicker.stories.d.ts.map +1 -1
  157. package/lib/core/Timepicker/styles.d.ts +5 -5
  158. package/lib/core/Tooltip/Tooptip.stories.d.ts +3 -2
  159. package/lib/core/Tooltip/Tooptip.stories.d.ts.map +1 -1
  160. package/lib/core/Tooltip/styles.d.ts +2 -2
  161. package/lib/core/UserMenu/UserMenu.stories.d.ts +6 -5
  162. package/lib/core/UserMenu/UserMenu.stories.d.ts.map +1 -1
  163. package/lib/core/UserMenu/styles.d.ts +1 -1
  164. package/lib/core/Video/Video.stories.d.ts +8 -9
  165. package/lib/core/Video/Video.stories.d.ts.map +1 -1
  166. package/lib/core/Video/Video.stories.js +20 -10
  167. package/lib/core/Video/index.d.ts +16 -8
  168. package/lib/core/Video/index.d.ts.map +1 -1
  169. package/lib/core/Video/index.js +72 -13
  170. package/lib/core/Video/styles.d.ts +5 -6
  171. package/lib/core/Video/styles.d.ts.map +1 -1
  172. package/lib/core/Video/styles.js +16 -7
  173. package/lib/core/YearWheel/YearWheel.stories.d.ts +4 -3
  174. package/lib/core/YearWheel/YearWheel.stories.d.ts.map +1 -1
  175. package/lib/core/YearWheel/styles.d.ts +2 -2
  176. package/lib/globals/styles/styles.d.ts +1 -1
  177. package/lib/icons/Icon.stories.d.ts +13 -12
  178. package/lib/icons/Icon.stories.d.ts.map +1 -1
  179. package/lib/illustrations/Illustration.stories.d.ts +5 -5
  180. package/lib/illustrations/styles.d.ts +2 -2
  181. package/lib/layout/Footer/Footer.stories.d.ts +4 -3
  182. package/lib/layout/Footer/Footer.stories.d.ts.map +1 -1
  183. package/lib/layout/Footer/styles.d.ts +1 -1
  184. package/lib/layout/Layout/Layout.stories.d.ts +3 -2
  185. package/lib/layout/Layout/Layout.stories.d.ts.map +1 -1
  186. package/lib/layout/LayoutShell/LayoutShell.stories.d.ts +5 -4
  187. package/lib/layout/LayoutShell/LayoutShell.stories.d.ts.map +1 -1
  188. package/lib/layout/LayoutShell/styles.d.ts +1 -1
  189. package/lib/layout/Menu/Sidemenu.stories.d.ts +6 -5
  190. package/lib/layout/Menu/Sidemenu.stories.d.ts.map +1 -1
  191. package/lib/layout/Submenu/Submenu.stories.d.ts +8 -7
  192. package/lib/layout/Submenu/Submenu.stories.d.ts.map +1 -1
  193. package/lib/layout/Submenu/SubmenuItem/styles.d.ts +2 -2
  194. package/lib/layout/Submenu/styles.d.ts +4 -4
  195. package/lib/layout/Topbar/Topbar.stories.d.ts +4 -3
  196. package/lib/layout/Topbar/Topbar.stories.d.ts.map +1 -1
  197. package/lib/shared/components/SbIconGrid/index.js +1 -1
  198. package/package.json +2 -1
@@ -1,59 +1,60 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
1
+ /// <reference types="react" />
2
+ declare const _default;
2
3
  export default _default;
3
4
  export declare const Default: {
4
- render: () => JSX.Element;
5
+ render: () => import("react").JSX.Element;
5
6
  name: string;
6
7
  };
7
8
  export declare const Neutral: {
8
- render: () => JSX.Element;
9
+ render: () => import("react").JSX.Element;
9
10
  name: string;
10
11
  };
11
12
  export declare const Success: {
12
- render: () => JSX.Element;
13
+ render: () => import("react").JSX.Element;
13
14
  name: string;
14
15
  };
15
16
  export declare const Info: {
16
- render: () => JSX.Element;
17
+ render: () => import("react").JSX.Element;
17
18
  name: string;
18
19
  };
19
20
  export declare const Danger: {
20
- render: () => JSX.Element;
21
+ render: () => import("react").JSX.Element;
21
22
  name: string;
22
23
  };
23
24
  export declare const Dark: {
24
- render: () => JSX.Element;
25
+ render: () => import("react").JSX.Element;
25
26
  name: string;
26
27
  };
27
28
  export declare const Light: {
28
- render: () => JSX.Element;
29
+ render: () => import("react").JSX.Element;
29
30
  name: string;
30
31
  };
31
32
  export declare const Outline: {
32
- render: () => JSX.Element;
33
+ render: () => import("react").JSX.Element;
33
34
  name: string;
34
35
  };
35
36
  export declare const TagWithClose: {
36
- render: () => JSX.Element;
37
+ render: () => import("react").JSX.Element;
37
38
  name: string;
38
39
  };
39
40
  export declare const TagWithLoading: {
40
- render: () => JSX.Element;
41
+ render: () => import("react").JSX.Element;
41
42
  name: string;
42
43
  };
43
44
  export declare const TagWithCloseAndStrictClick: {
44
- render: () => JSX.Element;
45
+ render: () => import("react").JSX.Element;
45
46
  name: string;
46
47
  };
47
48
  export declare const TagWithCloseLoadingAndStrictClick: {
48
- render: () => JSX.Element;
49
+ render: () => import("react").JSX.Element;
49
50
  name: string;
50
51
  };
51
52
  export declare const TagWithCloseAndStrictClickWithColor: {
52
- render: () => JSX.Element;
53
+ render: () => import("react").JSX.Element;
53
54
  name: string;
54
55
  };
55
56
  export declare const WithIcon: {
56
- render: () => JSX.Element;
57
+ render: () => import("react").JSX.Element;
57
58
  name: string;
58
59
  };
59
60
  //# sourceMappingURL=Tag.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Tag/Tag.stories.tsx"],"names":[],"mappings":";AAIA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAGnB,CAAA;AAED,eAAO,MAAM,OAAO;;;CAGnB,CAAA;AAED,eAAO,MAAM,OAAO;;;CAGnB,CAAA;AAED,eAAO,MAAM,IAAI;;;CAGhB,CAAA;AAED,eAAO,MAAM,MAAM;;;CAGlB,CAAA;AAED,eAAO,MAAM,IAAI;;;CAGhB,CAAA;AAED,eAAO,MAAM,KAAK;;;CAGjB,CAAA;AAED,eAAO,MAAM,OAAO;;;CAGnB,CAAA;AAED,eAAO,MAAM,YAAY;;;CAOxB,CAAA;AAED,eAAO,MAAM,cAAc;;;CAG1B,CAAA;AAED,eAAO,MAAM,0BAA0B;;;CAOtC,CAAA;AAED,eAAO,MAAM,iCAAiC;;;CAO7C,CAAA;AAED,eAAO,MAAM,mCAAmC;;;CAO/C,CAAA;AAED,eAAO,MAAM,QAAQ;;;CAGpB,CAAA"}
1
+ {"version":3,"file":"Tag.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Tag/Tag.stories.tsx"],"names":[],"mappings":";;AAIA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAGnB,CAAA;AAED,eAAO,MAAM,OAAO;;;CAGnB,CAAA;AAED,eAAO,MAAM,OAAO;;;CAGnB,CAAA;AAED,eAAO,MAAM,IAAI;;;CAGhB,CAAA;AAED,eAAO,MAAM,MAAM;;;CAGlB,CAAA;AAED,eAAO,MAAM,IAAI;;;CAGhB,CAAA;AAED,eAAO,MAAM,KAAK;;;CAGjB,CAAA;AAED,eAAO,MAAM,OAAO;;;CAGnB,CAAA;AAED,eAAO,MAAM,YAAY;;;CAOxB,CAAA;AAED,eAAO,MAAM,cAAc;;;CAG1B,CAAA;AAED,eAAO,MAAM,0BAA0B;;;CAOtC,CAAA;AAED,eAAO,MAAM,iCAAiC;;;CAO7C,CAAA;AAED,eAAO,MAAM,mCAAmC;;;CAO/C,CAAA;AAED,eAAO,MAAM,QAAQ;;;CAGpB,CAAA"}
@@ -1,17 +1,17 @@
1
1
  import { IAppTheme } from '../../app-shell/theme';
2
2
  declare const styles: {
3
- default: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
4
- neutral: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
5
- success: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
6
- info: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
7
- danger: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
8
- dark: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
9
- light: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
10
- outline: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
11
- withclose: import("@emotion/utils").SerializedStyles;
12
- strictClose: import("@emotion/utils").SerializedStyles;
13
- loading: import("@emotion/utils").SerializedStyles;
14
- withicon: import("@emotion/utils").SerializedStyles;
3
+ default: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
4
+ neutral: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
5
+ success: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
6
+ info: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
7
+ danger: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
8
+ dark: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
9
+ light: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
10
+ outline: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
11
+ withclose: import("@emotion/react").SerializedStyles;
12
+ strictClose: import("@emotion/react").SerializedStyles;
13
+ loading: import("@emotion/react").SerializedStyles;
14
+ withicon: import("@emotion/react").SerializedStyles;
15
15
  };
16
16
  export default styles;
17
17
  export { styles };
@@ -1,19 +1,19 @@
1
1
  import { IAppTheme } from '../../app-shell/theme';
2
2
  declare const styles: {
3
- default: (theme: IAppTheme, color: string | undefined) => import("@emotion/utils").SerializedStyles;
4
- paragraph: import("@emotion/utils").SerializedStyles;
5
- intro: import("@emotion/utils").SerializedStyles;
6
- small: import("@emotion/utils").SerializedStyles;
7
- extrasmall: import("@emotion/utils").SerializedStyles;
8
- bold: import("@emotion/utils").SerializedStyles;
9
- semiBold: import("@emotion/utils").SerializedStyles;
10
- size: (size: string) => import("@emotion/utils").SerializedStyles;
11
- subtle: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
12
- setColor: (color: string) => import("@emotion/utils").SerializedStyles;
13
- italic: import("@emotion/utils").SerializedStyles;
14
- align: (align: string) => import("@emotion/utils").SerializedStyles;
15
- setWordBreak: (value: string) => import("@emotion/utils").SerializedStyles;
16
- setWhiteSpace: (value: string) => import("@emotion/utils").SerializedStyles;
3
+ default: (theme: IAppTheme, color: string | undefined) => import("@emotion/react").SerializedStyles;
4
+ paragraph: import("@emotion/react").SerializedStyles;
5
+ intro: import("@emotion/react").SerializedStyles;
6
+ small: import("@emotion/react").SerializedStyles;
7
+ extrasmall: import("@emotion/react").SerializedStyles;
8
+ bold: import("@emotion/react").SerializedStyles;
9
+ semiBold: import("@emotion/react").SerializedStyles;
10
+ size: (size: string) => import("@emotion/react").SerializedStyles;
11
+ subtle: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
12
+ setColor: (color: string) => import("@emotion/react").SerializedStyles;
13
+ italic: import("@emotion/react").SerializedStyles;
14
+ align: (align: string) => import("@emotion/react").SerializedStyles;
15
+ setWordBreak: (value: string) => import("@emotion/react").SerializedStyles;
16
+ setWhiteSpace: (value: string) => import("@emotion/react").SerializedStyles;
17
17
  };
18
18
  export default styles;
19
19
  export { styles };
@@ -1,19 +1,20 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
1
+ /// <reference types="react" />
2
+ declare const _default;
2
3
  export default _default;
3
4
  export declare const Default: {
4
- render: () => JSX.Element;
5
+ render: () => import("react").JSX.Element;
5
6
  name: string;
6
7
  };
7
8
  export declare const Value: {
8
- render: () => JSX.Element;
9
+ render: () => import("react").JSX.Element;
9
10
  name: string;
10
11
  };
11
12
  export declare const Validation: {
12
- render: () => JSX.Element;
13
+ render: () => import("react").JSX.Element;
13
14
  name: string;
14
15
  };
15
16
  export declare const MaxHeight: {
16
- render: () => JSX.Element;
17
+ render: () => import("react").JSX.Element;
17
18
  name: string;
18
19
  };
19
20
  //# sourceMappingURL=Textarea.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Textarea/Textarea.stories.tsx"],"names":[],"mappings":";AAGA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAWnB,CAAA;AAED,eAAO,MAAM,KAAK;;;CAGjB,CAAA;AAED,eAAO,MAAM,UAAU;;;CAGtB,CAAA;AAED,eAAO,MAAM,SAAS;;;CAGrB,CAAA"}
1
+ {"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Textarea/Textarea.stories.tsx"],"names":[],"mappings":";;AAGA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAWnB,CAAA;AAED,eAAO,MAAM,KAAK;;;CAGjB,CAAA;AAED,eAAO,MAAM,UAAU;;;CAGtB,CAAA;AAED,eAAO,MAAM,SAAS;;;CAGrB,CAAA"}
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { IAppTheme } from '../../app-shell/theme';
3
3
  export declare const styles: {
4
- default: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
5
- resize: (resize: string) => import("@emotion/utils").SerializedStyles;
6
- maxHeight: (value: string) => import("@emotion/utils").SerializedStyles;
4
+ default: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
5
+ resize: (resize: string) => import("@emotion/react").SerializedStyles;
6
+ maxHeight: (value: string) => import("@emotion/react").SerializedStyles;
7
7
  };
8
8
  export declare const Wrapper: import("@emotion/styled").StyledComponent<{
9
9
  theme?: import("@emotion/react").Theme | undefined;
@@ -1,7 +1,8 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
1
+ /// <reference types="react" />
2
+ declare const _default;
2
3
  export default _default;
3
4
  export declare const TimelineDefault: {
4
- render: () => JSX.Element;
5
+ render: () => import("react").JSX.Element;
5
6
  name: string;
6
7
  };
7
8
  //# sourceMappingURL=Timeline.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Timeline.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Timeline/Timeline.stories.tsx"],"names":[],"mappings":";AAIA,wBAGS;AAET,eAAO,MAAM,eAAe;;;CAU3B,CAAA"}
1
+ {"version":3,"file":"Timeline.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Timeline/Timeline.stories.tsx"],"names":[],"mappings":";;AAIA,wBAGS;AAET,eAAO,MAAM,eAAe;;;CAU3B,CAAA"}
@@ -10,8 +10,8 @@ export declare const TextWrapper: import("@emotion/styled").StyledComponent<{
10
10
  as?: import("react").ElementType<any> | undefined;
11
11
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
12
12
  export declare const styles: {
13
- defaultCircle: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
14
- active: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
15
- complete: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
13
+ defaultCircle: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
14
+ active: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
15
+ complete: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
16
16
  };
17
17
  //# sourceMappingURL=styles.d.ts.map
@@ -1,31 +1,32 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
1
+ /// <reference types="react" />
2
+ declare const _default;
2
3
  export default _default;
3
4
  export declare const TimepickerDefault: {
4
- render: () => JSX.Element;
5
+ render: () => import("react").JSX.Element;
5
6
  name: string;
6
7
  };
7
8
  export declare const WithSeconds: {
8
- render: () => JSX.Element;
9
+ render: () => import("react").JSX.Element;
9
10
  name: string;
10
11
  };
11
12
  export declare const Disabled: {
12
- render: () => JSX.Element;
13
+ render: () => import("react").JSX.Element;
13
14
  name: string;
14
15
  };
15
16
  export declare const Nullable: {
16
- render: () => JSX.Element;
17
+ render: () => import("react").JSX.Element;
17
18
  name: string;
18
19
  };
19
20
  export declare const WithDateAsValue: {
20
- render: () => JSX.Element;
21
+ render: () => import("react").JSX.Element;
21
22
  name: string;
22
23
  };
23
24
  export declare const WithError: {
24
- render: () => JSX.Element;
25
+ render: () => import("react").JSX.Element;
25
26
  name: string;
26
27
  };
27
28
  export declare const Focus: {
28
- render: () => JSX.Element;
29
+ render: () => import("react").JSX.Element;
29
30
  name: string;
30
31
  };
31
32
  //# sourceMappingURL=Timepicker.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Timepicker.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Timepicker/Timepicker.stories.tsx"],"names":[],"mappings":";AAGA,wBAGS;AAET,eAAO,MAAM,iBAAiB;;;CAY7B,CAAA;AAED,eAAO,MAAM,WAAW;;;CAYvB,CAAA;AAED,eAAO,MAAM,QAAQ;;;CAYpB,CAAA;AAED,eAAO,MAAM,QAAQ;;;CAYpB,CAAA;AAED,eAAO,MAAM,eAAe;;;CAW3B,CAAA;AAED,eAAO,MAAM,SAAS;;;CAcrB,CAAA;AAED,eAAO,MAAM,KAAK;;;CAYjB,CAAA"}
1
+ {"version":3,"file":"Timepicker.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Timepicker/Timepicker.stories.tsx"],"names":[],"mappings":";;AAGA,wBAGS;AAET,eAAO,MAAM,iBAAiB;;;CAY7B,CAAA;AAED,eAAO,MAAM,WAAW;;;CAYvB,CAAA;AAED,eAAO,MAAM,QAAQ;;;CAYpB,CAAA;AAED,eAAO,MAAM,QAAQ;;;CAYpB,CAAA;AAED,eAAO,MAAM,eAAe;;;CAW3B,CAAA;AAED,eAAO,MAAM,SAAS;;;CAcrB,CAAA;AAED,eAAO,MAAM,KAAK;;;CAYjB,CAAA"}
@@ -9,11 +9,11 @@ export declare const ErrorMessage: import("@emotion/styled").StyledComponent<{
9
9
  as?: import("react").ElementType<any> | undefined;
10
10
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
11
11
  declare const styles: {
12
- default: (theme: IAppTheme, height: string, width: string) => import("@emotion/utils").SerializedStyles;
13
- disabled: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
14
- nullable: import("@emotion/utils").SerializedStyles;
15
- validation: import("@emotion/utils").SerializedStyles;
16
- invalid: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
12
+ default: (theme: IAppTheme, height: string, width: string) => import("@emotion/react").SerializedStyles;
13
+ disabled: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
14
+ nullable: import("@emotion/react").SerializedStyles;
15
+ validation: import("@emotion/react").SerializedStyles;
16
+ invalid: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
17
17
  };
18
18
  export default styles;
19
19
  export { styles };
@@ -1,7 +1,8 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
1
+ /// <reference types="react" />
2
+ declare const _default;
2
3
  export default _default;
3
4
  export declare const TooltipDefault: {
4
- render: () => JSX.Element;
5
+ render: () => import("react").JSX.Element;
5
6
  name: string;
6
7
  };
7
8
  //# sourceMappingURL=Tooptip.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooptip.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Tooltip/Tooptip.stories.tsx"],"names":[],"mappings":";AAGA,wBAGS;AAET,eAAO,MAAM,cAAc;;;CAO1B,CAAA"}
1
+ {"version":3,"file":"Tooptip.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Tooltip/Tooptip.stories.tsx"],"names":[],"mappings":";;AAGA,wBAGS;AAET,eAAO,MAAM,cAAc;;;CAO1B,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { IAppTheme } from '../../app-shell/theme';
2
2
  export declare const styles: {
3
- default: import("@emotion/utils").SerializedStyles;
4
- tooltip: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
3
+ default: import("@emotion/react").SerializedStyles;
4
+ tooltip: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
5
5
  };
6
6
  //# sourceMappingURL=styles.d.ts.map
@@ -1,19 +1,20 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
1
+ /// <reference types="react" />
2
+ declare const _default;
2
3
  export default _default;
3
4
  export declare const Default: {
4
- render: () => JSX.Element;
5
+ render: () => import("react").JSX.Element;
5
6
  name: string;
6
7
  };
7
8
  export declare const TypeMysite: {
8
- render: () => JSX.Element;
9
+ render: () => import("react").JSX.Element;
9
10
  name: string;
10
11
  };
11
12
  export declare const Avatar: {
12
- render: () => JSX.Element;
13
+ render: () => import("react").JSX.Element;
13
14
  name: string;
14
15
  };
15
16
  export declare const WithoutText: {
16
- render: () => JSX.Element;
17
+ render: () => import("react").JSX.Element;
17
18
  name: string;
18
19
  };
19
20
  //# sourceMappingURL=UserMenu.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/UserMenu/UserMenu.stories.tsx"],"names":[],"mappings":";AAKA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAkBnB,CAAA;AAED,eAAO,MAAM,UAAU;;;CAmBtB,CAAA;AAED,eAAO,MAAM,MAAM;;;CAoBlB,CAAA;AAED,eAAO,MAAM,WAAW;;;CAqBvB,CAAA"}
1
+ {"version":3,"file":"UserMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/UserMenu/UserMenu.stories.tsx"],"names":[],"mappings":";;AAKA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAkBnB,CAAA;AAED,eAAO,MAAM,UAAU;;;CAmBtB,CAAA;AAED,eAAO,MAAM,MAAM;;;CAoBlB,CAAA;AAED,eAAO,MAAM,WAAW;;;CAqBvB,CAAA"}
@@ -30,6 +30,6 @@ export declare const LogoutWrapper: import("@emotion/styled").StyledComponent<{
30
30
  theme?: import("@emotion/react").Theme | undefined;
31
31
  as?: import("react").ElementType<any> | undefined;
32
32
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
33
- export declare const userMenuOption: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
33
+ export declare const userMenuOption: (theme: IAppTheme) => import("@emotion/react").SerializedStyles;
34
34
  export {};
35
35
  //# sourceMappingURL=styles.d.ts.map
@@ -1,15 +1,14 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
1
+ import React from 'react';
2
+ declare const _default;
2
3
  export default _default;
3
- export declare const NoVideo: {
4
- render: () => JSX.Element;
5
- name: string;
4
+ export declare const Default: {
5
+ render: () => React.JSX.Element;
6
6
  };
7
7
  export declare const VideoWithSrc: {
8
- render: () => JSX.Element;
9
- name: string;
8
+ render: () => React.JSX.Element;
10
9
  };
11
- export declare const VideoWithHeightAndWidth: {
12
- render: () => JSX.Element;
13
- name: string;
10
+ export declare const VideoWithPoster: {
11
+ render: () => React.JSX.Element;
14
12
  };
13
+ export declare const VideoWithWidthAndHeight: () => React.JSX.Element;
15
14
  //# sourceMappingURL=Video.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Video.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Video/Video.stories.tsx"],"names":[],"mappings":";AAGA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAGnB,CAAA;AAED,eAAO,MAAM,YAAY;;;CAKxB,CAAA;AAED,eAAO,MAAM,uBAAuB;;;CAQnC,CAAA"}
1
+ {"version":3,"file":"Video.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Video/Video.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;;AAGzB,wBAGS;AAET,eAAO,MAAM,OAAO;;CAOnB,CAAA;AAED,eAAO,MAAM,YAAY;;CAOxB,CAAA;AAED,eAAO,MAAM,eAAe;;CAQ3B,CAAA;AAED,eAAO,MAAM,uBAAuB,yBAQnC,CAAA"}
@@ -1,23 +1,33 @@
1
+ import React from 'react';
1
2
  import Video from '.';
2
3
  import { jsx as _jsx } from "react/jsx-runtime";
3
4
  export default {
4
5
  title: 'Core/Video',
5
6
  component: Video
6
7
  };
7
- export const NoVideo = {
8
- render: () => /*#__PURE__*/_jsx(Video, {}),
9
- name: 'No video'
8
+ export const Default = {
9
+ render: () => /*#__PURE__*/_jsx(Video, {
10
+ src: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
11
+ height: "100%"
12
+ })
10
13
  };
11
14
  export const VideoWithSrc = {
12
15
  render: () => /*#__PURE__*/_jsx(Video, {
13
- src: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4"
14
- }),
15
- name: 'Image with src'
16
+ src: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
17
+ height: "500px"
18
+ })
16
19
  };
17
- export const VideoWithHeightAndWidth = {
20
+ export const VideoWithPoster = {
18
21
  render: () => /*#__PURE__*/_jsx(Video, {
19
22
  src: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
20
- height: "300px"
21
- }),
22
- name: 'Video with height set. Width is auto and adjusted to the video ratio'
23
+ poster: "https://flxt.tmsimg.com/assets/p10163210_v_h9_aa.jpg",
24
+ height: "500px"
25
+ })
26
+ };
27
+ export const VideoWithWidthAndHeight = () => {
28
+ return /*#__PURE__*/_jsx(Video, {
29
+ src: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
30
+ poster: "https://flxt.tmsimg.com/assets/p10163210_v_h9_aa.jpg",
31
+ height: "500px"
32
+ });
23
33
  };
@@ -1,23 +1,31 @@
1
- /** @jsxImportSource @emotion/react */
2
- import React from 'react';
1
+ /// <reference types="react" />
3
2
  import { SerializedStyles } from '@emotion/react';
4
- interface IProps extends React.VideoHTMLAttributes<HTMLVideoElement> {
3
+ import { Config } from 'react-player';
4
+ interface IProps {
5
5
  /** The source */
6
6
  src?: string;
7
7
  /** Controls defaults to true */
8
8
  controls?: boolean;
9
- /** Indicating that the video is to be played inline, within the videos playback area */
10
- playsInline?: boolean;
11
- /** Intends to provide a hint to the browser about what the author thinks will lead to the best user experience regarding what content is loaded before the video is played. */
12
- preload?: 'auto' | 'metadata' | 'none';
9
+ /** Specify to let an Intersection Observer to auto stop or auto start the player when in the viewport */
10
+ intersectionObserver?: boolean;
11
+ /** Override config of the player */
12
+ config?: Config;
13
+ /** Set play state */
14
+ playing?: boolean;
15
+ /** Plays automatically when loaded */
16
+ autoPlay?: boolean;
13
17
  /** An URL for an image to be shown while the video is downloading */
14
18
  poster?: string;
15
19
  /** Video height, e.g. 100px */
16
20
  height?: string;
17
- /** Video with, e.g. 100% */
21
+ /** Video width, e.g. 100% */
18
22
  width?: string;
19
23
  /** CSS override */
20
24
  css?: SerializedStyles;
25
+ /** Pause callback */
26
+ onPause?: () => void;
27
+ /** Play callback */
28
+ onPlay?: () => void;
21
29
  }
22
30
  declare const Video: React.FC<IProps>;
23
31
  export default Video;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Video/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAGjD,UAAU,MAAO,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IAClE,iBAAiB;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wFAAwF;IACxF,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+KAA+K;IAC/K,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAAA;IACtC,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB;IACnB,GAAG,CAAC,EAAE,gBAAgB,CAAA;CACvB;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA6B3B,CAAA;AAED,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Video/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAoB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAGlD,UAAU,MAAM;IACd,iBAAiB;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yGAAyG;IACzG,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qBAAqB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB;IACnB,GAAG,CAAC,EAAE,gBAAgB,CAAA;IACtB,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA6F3B,CAAA;AAED,eAAe,KAAK,CAAA"}
@@ -1,28 +1,87 @@
1
1
  /** @jsxImportSource @emotion/react */
2
- import React from 'react';
3
- import styles from './styles';
2
+ import { useEffect, useRef, useState } from 'react';
3
+ import ReactPlayer from 'react-player';
4
+ import { PlayerContainer } from './styles';
4
5
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
5
6
  const Video = ({
6
7
  src,
8
+ intersectionObserver = false,
7
9
  controls = true,
8
- playsInline = true,
9
- preload = 'auto',
10
10
  poster,
11
- height = '100%',
11
+ config = {
12
+ file: {
13
+ attributes: {
14
+ controlsList: 'nodownload noplaybackrate'
15
+ }
16
+ }
17
+ },
18
+ playing = false,
19
+ autoPlay = false,
20
+ height = 'auto',
12
21
  width = '100%',
13
22
  css,
23
+ onPause,
24
+ onPlay,
14
25
  ...restProps
15
26
  }) => {
27
+ const containerRef = useRef(null);
28
+
29
+ /** Determines if the video controls have been physically interacted with */
30
+ const [playPressed, setPlayPressed] = useState(false);
31
+ /** The play state of the player */
32
+ const [isPlaying, setIsPlaying] = useState(playing);
16
33
  const videoSrc = src || undefined;
17
34
  const posterSrc = poster || undefined;
18
- return _jsx("video", {
19
- src: videoSrc,
20
- controls: controls,
21
- playsInline: playsInline,
22
- preload: preload,
23
- poster: posterSrc,
24
- css: () => [height && styles.height(height), width && styles.width(width), css && css],
25
- ...restProps
35
+ const intersectionObsOptions = {
36
+ root: null,
37
+ rootMargin: '0px',
38
+ threshold: 0.5
39
+ };
40
+ const intersectionCallback = entries => {
41
+ const [entry] = entries;
42
+ // If the video is in the viewport and autoPlay is true or the user has physically pressed play, start playing
43
+ if (entry.isIntersecting && (autoPlay || playPressed)) {
44
+ setIsPlaying(true);
45
+ } else {
46
+ setIsPlaying(false);
47
+ }
48
+ };
49
+ useEffect(() => {
50
+ if (!intersectionObserver || !window.IntersectionObserver) return;
51
+ const observer = new IntersectionObserver(intersectionCallback, intersectionObsOptions);
52
+ const currentRef = containerRef.current;
53
+ if (currentRef) {
54
+ observer.observe(currentRef);
55
+ }
56
+ return () => {
57
+ if (currentRef) observer.unobserve(currentRef);
58
+ };
59
+
60
+ // eslint-disable-next-line react-hooks/exhaustive-deps
61
+ }, [containerRef.current, intersectionObsOptions, intersectionObserver]);
62
+ const handlePlay = () => {
63
+ setPlayPressed(true);
64
+ onPlay && onPlay();
65
+ };
66
+ const handlePause = () => {
67
+ setPlayPressed(false);
68
+ onPause && onPause();
69
+ };
70
+ return _jsx(PlayerContainer, {
71
+ ref: containerRef,
72
+ children: _jsx(ReactPlayer, {
73
+ url: videoSrc,
74
+ controls: controls,
75
+ playing: isPlaying,
76
+ light: posterSrc ?? false,
77
+ width: width,
78
+ height: height,
79
+ config: config,
80
+ onPlay: handlePlay,
81
+ onPause: handlePause,
82
+ css: () => [css && css],
83
+ ...restProps
84
+ })
26
85
  });
27
86
  };
28
87
  export default Video;
@@ -1,7 +1,6 @@
1
- declare const styles: {
2
- height: (height: string) => import("@emotion/utils").SerializedStyles;
3
- width: (width: string) => import("@emotion/utils").SerializedStyles;
4
- };
5
- export default styles;
6
- export { styles };
1
+ /// <reference types="react" />
2
+ export declare const PlayerContainer: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
6
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Video/styles.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM;qBACO,MAAM;mBAGR,MAAM;CAGtB,CAAA;AAED,eAAe,MAAM,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,CAAA"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Video/styles.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,eAAe;;;yGAM3B,CAAA"}