@soul-refiner/design-system 0.2.127 → 0.2.129

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.
@@ -4,10 +4,17 @@ interface MediaItem {
4
4
  duration: number;
5
5
  progress?: number;
6
6
  src: string;
7
+ subtitles: Subtitle[];
7
8
  shortDescription: string;
8
9
  thumbnail: string;
9
10
  title: string;
10
11
  }
12
+ interface Subtitle {
13
+ id: string;
14
+ label: string;
15
+ locale: string;
16
+ src: string;
17
+ }
11
18
  export interface VideoPlayerProps {
12
19
  /**
13
20
  * @param activeIndex the media item from the playlist currently playing
@@ -31,10 +31,19 @@ export const VideoPlayer = ({ activeIndex, pip, playlist, onPipChange, onProgres
31
31
  React.createElement(P, { as: "h3", "$bold": true, "$color": "grey-8" }, subtitle))),
32
32
  React.createElement(ReactPlayer, { config: {
33
33
  file: {
34
+ attributes: {
35
+ crossOrigin: 'true',
36
+ },
34
37
  forceHLS: true,
35
38
  hlsOptions: {
36
39
  autoStartLoad: true,
37
40
  },
41
+ tracks: mediaItem.subtitles.map((subtitle) => ({
42
+ kind: 'subtitles',
43
+ label: subtitle.label,
44
+ src: subtitle.src,
45
+ srcLang: subtitle.locale,
46
+ })),
38
47
  },
39
48
  }, controls: true, height: "100%", light: React.createElement(Image, { alt: `thumbnail for ${title}`, layout: "fill", objectFit: "contain", priority: true, src: mediaItem.thumbnail }), onDisablePIP: () => onPipChange && onPipChange(false), onEnablePIP: () => onPipChange && onPipChange(true), onProgress: onProgress, onReady: handleReady, pip: pip, playing: true, ref: ref, style: {
40
49
  backgroundColor: 'var(--color-grey-0)',
@@ -5,5 +5,6 @@ export interface CalendarDateProps {
5
5
  dayOfWeek?: string;
6
6
  startTime?: string;
7
7
  endTime?: string;
8
+ sx?: string;
8
9
  }
9
- export declare const CalendarDate: ({ monthAbbreviation, date, dayOfWeek, startTime, endTime, }: CalendarDateProps) => React.JSX.Element;
10
+ export declare const CalendarDate: ({ monthAbbreviation, date, dayOfWeek, startTime, endTime, sx, }: CalendarDateProps) => React.JSX.Element;
@@ -2,8 +2,8 @@
2
2
  import React from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { H, P } from '../../atoms/typography';
5
- export const CalendarDate = ({ monthAbbreviation, date, dayOfWeek, startTime, endTime, }) => {
6
- return (React.createElement(Container, null,
5
+ export const CalendarDate = ({ monthAbbreviation, date, dayOfWeek, startTime, endTime, sx, }) => {
6
+ return (React.createElement(Container, { "$sx": sx },
7
7
  React.createElement(CalendarContainer, null,
8
8
  React.createElement(MonthContainer, null,
9
9
  React.createElement(H.Seven, { "$color": "white", "$textAlign": "center", sx: "font-weight: 600;" }, monthAbbreviation)),
@@ -16,6 +16,8 @@ const Container = styled.div `
16
16
  display: flex;
17
17
  flex-direction: column;
18
18
  align-items: center;
19
+
20
+ ${({ $sx }) => ($sx ? $sx : '')}
19
21
  `;
20
22
  const CalendarContainer = styled.div `
21
23
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soul-refiner/design-system",
3
- "version": "0.2.127",
3
+ "version": "0.2.129",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "publishConfig": {