@draftbit/core 54.0.4-6c949a.2 → 54.0.4-982952.2
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/commonjs/components/DeckSwiper/DeckSwiper.js +1 -1
- package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js +1 -1
- package/lib/commonjs/components/Layout/Spacer.js +1 -1
- package/lib/commonjs/components/LottieAnimation.js +1 -1
- package/lib/commonjs/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +1 -1
- package/lib/commonjs/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +1 -1
- package/lib/commonjs/components/MediaPlayer/MediaPlaybackWrapper.js +1 -1
- package/lib/commonjs/components/MediaPlayer/MediaPlayerCommon.js +1 -1
- package/lib/commonjs/components/MediaPlayer/VideoPlayer/VideoPlayer.js +1 -1
- package/lib/commonjs/components/Picker/PickerInputContainer.js +1 -1
- package/lib/commonjs/components/Progress/CircularProgress/CircularProgress.js +1 -1
- package/lib/commonjs/components/Progress/LinearProgress/LinearProgress.js +1 -1
- package/lib/commonjs/components/SVG.js +1 -1
- package/lib/commonjs/components/SVG.native.js +1 -1
- package/lib/commonjs/components/SectionList/SectionHeader.js +1 -1
- package/lib/commonjs/components/SwipeableItem/SwipeableItem.js +1 -1
- package/lib/commonjs/components/Swiper/Swiper.js +1 -1
- package/lib/commonjs/components/Swiper/SwiperItem.js +1 -1
- package/lib/commonjs/components/Table/TableCell.js +1 -1
- package/lib/commonjs/components/Table/TableRow.js +1 -1
- package/lib/commonjs/components/YoutubePlayer/YoutubePlayer.js +1 -1
- package/lib/typescript/src/components/DeckSwiper/DeckSwiper.d.ts +1 -0
- package/lib/typescript/src/components/DeckSwiper/DeckSwiper.js +3 -2
- package/lib/typescript/src/components/DeckSwiper/DeckSwiper.js.map +1 -1
- package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts +2 -2
- package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.js +3 -3
- package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
- package/lib/typescript/src/components/Layout/Spacer.d.ts +2 -2
- package/lib/typescript/src/components/Layout/Spacer.js +2 -2
- package/lib/typescript/src/components/Layout/Spacer.js.map +1 -1
- package/lib/typescript/src/components/LottieAnimation.js +2 -2
- package/lib/typescript/src/components/LottieAnimation.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.d.ts +1 -0
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +4 -2
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.d.ts +3 -1
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +69 -54
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/MediaPlaybackWrapper.d.ts +3 -2
- package/lib/typescript/src/components/MediaPlayer/MediaPlaybackWrapper.js +19 -21
- package/lib/typescript/src/components/MediaPlayer/MediaPlaybackWrapper.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/MediaPlayerCommon.d.ts +5 -4
- package/lib/typescript/src/components/MediaPlayer/MediaPlayerCommon.js +3 -26
- package/lib/typescript/src/components/MediaPlayer/MediaPlayerCommon.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/VideoPlayer/VideoPlayer.d.ts +14 -4
- package/lib/typescript/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js +129 -62
- package/lib/typescript/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js.map +1 -1
- package/lib/typescript/src/components/Picker/PickerCommon.d.ts +1 -0
- package/lib/typescript/src/components/Picker/PickerCommon.js.map +1 -1
- package/lib/typescript/src/components/Picker/PickerInputContainer.js +4 -2
- package/lib/typescript/src/components/Picker/PickerInputContainer.js.map +1 -1
- package/lib/typescript/src/components/Progress/CircularProgress/CircularProgress.js +4 -2
- package/lib/typescript/src/components/Progress/CircularProgress/CircularProgress.js.map +1 -1
- package/lib/typescript/src/components/Progress/LinearProgress/LinearProgress.js +4 -2
- package/lib/typescript/src/components/Progress/LinearProgress/LinearProgress.js.map +1 -1
- package/lib/typescript/src/components/Progress/ProgressCommon.d.ts +1 -0
- package/lib/typescript/src/components/SVG.d.ts +1 -0
- package/lib/typescript/src/components/SVG.js +4 -2
- package/lib/typescript/src/components/SVG.js.map +1 -1
- package/lib/typescript/src/components/SVG.native.d.ts +1 -0
- package/lib/typescript/src/components/SVG.native.js +4 -2
- package/lib/typescript/src/components/SVG.native.js.map +1 -1
- package/lib/typescript/src/components/SectionList/SectionHeader.d.ts +2 -2
- package/lib/typescript/src/components/SectionList/SectionHeader.js +1 -1
- package/lib/typescript/src/components/SectionList/SectionHeader.js.map +1 -1
- package/lib/typescript/src/components/SwipeableItem/SwipeableItem.d.ts +1 -0
- package/lib/typescript/src/components/SwipeableItem/SwipeableItem.js +4 -2
- package/lib/typescript/src/components/SwipeableItem/SwipeableItem.js.map +1 -1
- package/lib/typescript/src/components/Swiper/Swiper.d.ts +2 -2
- package/lib/typescript/src/components/Swiper/Swiper.js +2 -2
- package/lib/typescript/src/components/Swiper/Swiper.js.map +1 -1
- package/lib/typescript/src/components/Swiper/SwiperItem.d.ts +3 -3
- package/lib/typescript/src/components/Swiper/SwiperItem.js +2 -2
- package/lib/typescript/src/components/Swiper/SwiperItem.js.map +1 -1
- package/lib/typescript/src/components/Table/TableCell.d.ts +1 -0
- package/lib/typescript/src/components/Table/TableCell.js +4 -2
- package/lib/typescript/src/components/Table/TableCell.js.map +1 -1
- package/lib/typescript/src/components/Table/TableRow.d.ts +1 -0
- package/lib/typescript/src/components/Table/TableRow.js +4 -2
- package/lib/typescript/src/components/Table/TableRow.js.map +1 -1
- package/lib/typescript/src/components/YoutubePlayer/YoutubePlayer.js +2 -2
- package/lib/typescript/src/components/YoutubePlayer/YoutubePlayer.js.map +1 -1
- package/lib/typescript/src/components/YoutubePlayer/YoutubePlayerProps.d.ts +1 -0
- package/lib/typescript/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/src/components/DeckSwiper/DeckSwiper.tsx +5 -1
- package/src/components/DeckSwiper/DeckSwiperCard.tsx +11 -3
- package/src/components/Layout/Spacer.tsx +4 -2
- package/src/components/LottieAnimation.tsx +1 -2
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.ts +1 -0
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.tsx +3 -0
- package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.tsx +84 -72
- package/src/components/MediaPlayer/MediaPlaybackWrapper.tsx +21 -24
- package/src/components/MediaPlayer/MediaPlayerCommon.ts +8 -34
- package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.tsx +220 -86
- package/src/components/Picker/PickerCommon.ts +1 -0
- package/src/components/Picker/PickerInputContainer.tsx +7 -1
- package/src/components/Progress/CircularProgress/CircularProgress.tsx +3 -0
- package/src/components/Progress/LinearProgress/LinearProgress.tsx +3 -0
- package/src/components/Progress/ProgressCommon.ts +1 -0
- package/src/components/SVG.native.tsx +7 -1
- package/src/components/SVG.tsx +10 -1
- package/src/components/SectionList/SectionHeader.tsx +8 -3
- package/src/components/SwipeableItem/SwipeableItem.tsx +4 -0
- package/src/components/Swiper/Swiper.tsx +4 -3
- package/src/components/Swiper/SwiperItem.tsx +12 -4
- package/src/components/Table/TableCell.tsx +4 -0
- package/src/components/Table/TableRow.tsx +4 -0
- package/src/components/YoutubePlayer/YoutubePlayer.tsx +5 -1
- package/src/components/YoutubePlayer/YoutubePlayerProps.ts +1 -0
|
@@ -2,7 +2,7 @@ import { withTheme } from "@draftbit/theme";
|
|
|
2
2
|
import React, { forwardRef, useImperativeHandle } from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
import SwiperComponent from "react-native-web-swiper";
|
|
5
|
-
const Swiper = forwardRef(({ theme, vertical = false, loop = false, timeout = 0, from = 0, prevTitle = "", nextTitle = "", prevTitleColor, nextTitleColor, dotsTouchable = true, dotColor = theme === null || theme === void 0 ? void 0 : theme.colors.foreground.base, dotActiveColor = theme === null || theme === void 0 ? void 0 : theme.colors.branding.primary, data, keyExtractor, renderItem, children: childrenProp, onIndexChanged: onIndexChangedProp, onSwipe, onSwipedNext, onSwipedPrevious, minDistanceForAction, minDistanceToCapture, style, hideDots = false, }, ref) => {
|
|
5
|
+
const Swiper = forwardRef(({ theme, vertical = false, loop = false, timeout = 0, from = 0, prevTitle = "", nextTitle = "", prevTitleColor, nextTitleColor, dotsTouchable = true, dotColor = theme === null || theme === void 0 ? void 0 : theme.colors.foreground.base, dotActiveColor = theme === null || theme === void 0 ? void 0 : theme.colors.branding.primary, data, keyExtractor, renderItem, children: childrenProp, onIndexChanged: onIndexChangedProp, onSwipe, onSwipedNext, onSwipedPrevious, minDistanceForAction, minDistanceToCapture, style, hideDots = false, ...rest }, ref) => {
|
|
6
6
|
var _a;
|
|
7
7
|
const [currentIndex, setCurrentIndex] = React.useState(0);
|
|
8
8
|
const numberOfItems = (_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : React.Children.count(childrenProp);
|
|
@@ -70,7 +70,7 @@ const Swiper = forwardRef(({ theme, vertical = false, loop = false, timeout = 0,
|
|
|
70
70
|
(_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.goToPrev();
|
|
71
71
|
},
|
|
72
72
|
}));
|
|
73
|
-
return (React.createElement(View, { style: style },
|
|
73
|
+
return (React.createElement(View, { style: style, ...rest },
|
|
74
74
|
React.createElement(SwiperComponent, { ref: swiperRef, from: from, loop: loop, timeout: timeout, vertical: vertical, onIndexChanged: onIndexChanged, minDistanceForAction: minDistanceForAction, minDistanceToCapture: minDistanceToCapture, controlsProps: {
|
|
75
75
|
prevTitle,
|
|
76
76
|
nextTitle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Swiper.js","sourceRoot":"","sources":["../../../../../src/components/Swiper/Swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"Swiper.js","sourceRoot":"","sources":["../../../../../src/components/Swiper/Swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAmC,MAAM,cAAc,CAAC;AACrE,OAAO,eAAe,MAAM,yBAAyB,CAAC;AAmCtD,MAAM,MAAM,GAAG,UAAU,CACvB,CACE,EACE,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,IAAI,GAAG,KAAK,EACZ,OAAO,GAAG,CAAC,EACX,IAAI,GAAG,CAAC,EACR,SAAS,GAAG,EAAE,EACd,SAAS,GAAG,EAAE,EACd,cAAc,EACd,cAAc,EACd,aAAa,GAAG,IAAI,EACpB,QAAQ,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,CAAC,UAAU,CAAC,IAAI,EACxC,cAAc,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,CAAC,QAAQ,CAAC,OAAO,EAC/C,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,QAAQ,EAAE,YAAY,EACtB,cAAc,EAAE,kBAAkB,EAClC,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,GAAG,IAAI,EACU,EACnB,GAAG,EACH,EAAE;;IACF,MAAM,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from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
export interface SwiperProps {
|
|
2
|
+
import { StyleProp, ViewStyle, ViewProps } from "react-native";
|
|
3
|
+
export interface SwiperProps extends Omit<ViewProps, "style" | "children"> {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
style?: StyleProp<ViewStyle>;
|
|
6
6
|
}
|
|
7
|
-
declare const SwiperItem: ({ children, style }: SwiperProps) => React.JSX.Element;
|
|
7
|
+
declare const SwiperItem: ({ children, style, ...rest }: SwiperProps) => React.JSX.Element;
|
|
8
8
|
export default SwiperItem;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { View, StyleSheet } from "react-native";
|
|
2
|
+
import { View, StyleSheet, } from "react-native";
|
|
3
3
|
const styles = StyleSheet.create({
|
|
4
4
|
wrapper: {
|
|
5
5
|
flex: 1,
|
|
6
6
|
},
|
|
7
7
|
});
|
|
8
|
-
const SwiperItem = ({ children, style }) => (React.createElement(View, { style: [styles.wrapper, style] }, children));
|
|
8
|
+
const SwiperItem = ({ children, style, ...rest }) => (React.createElement(View, { style: [styles.wrapper, style], ...rest }, children));
|
|
9
9
|
export default SwiperItem;
|
|
10
10
|
//# sourceMappingURL=SwiperItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwiperItem.js","sourceRoot":"","sources":["../../../../../src/components/Swiper/SwiperItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"SwiperItem.js","sourceRoot":"","sources":["../../../../../src/components/Swiper/SwiperItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,IAAI,EACJ,UAAU,GAIX,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAOH,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,EAAe,EAAE,EAAE,CAAC,CAChE,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,KAAM,IAAI,IAC3C,QAAQ,CACJ,CACR,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { View, StyleSheet } from "react-native";
|
|
3
3
|
import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
|
|
4
4
|
import Pressable from "../Pressable";
|
|
5
|
-
const TableCell = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false, drawBottomBorder = false, drawStartBorder = false, drawEndBorder = true, cellVerticalPadding, cellHorizontalPadding, children, onPress, style, }) => {
|
|
5
|
+
const TableCell = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false, drawBottomBorder = false, drawStartBorder = false, drawEndBorder = true, cellVerticalPadding, cellHorizontalPadding, children, onPress, className, style, }) => {
|
|
6
6
|
const parentContextValue = React.useContext(TableStyleContext);
|
|
7
7
|
const borderViewStyle = generateBorderStyles({
|
|
8
8
|
borderColor: borderColor || parentContextValue.borderColor,
|
|
@@ -14,7 +14,9 @@ const TableCell = ({ borderWidth, borderColor, borderStyle, drawTopBorder = fals
|
|
|
14
14
|
drawEndBorder,
|
|
15
15
|
});
|
|
16
16
|
const ContainerComponent = onPress ? Pressable : View;
|
|
17
|
-
return (React.createElement(ContainerComponent, { onPress: onPress,
|
|
17
|
+
return (React.createElement(ContainerComponent, { onPress: onPress,
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
className: className, style: [
|
|
18
20
|
styles.cellContainer,
|
|
19
21
|
borderViewStyle,
|
|
20
22
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../../../src/components/Table/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,UAAU,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,SAAS,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../../../src/components/Table/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,UAAU,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,SAAS,MAAM,cAAc,CAAC;AAQrC,MAAM,SAAS,GAA6C,CAAC,EAC3D,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,GAAG,KAAK,EACrB,gBAAgB,GAAG,KAAK,EACxB,eAAe,GAAG,KAAK,EACvB,aAAa,GAAG,IAAI,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,KAAK,GACN,EAAE,EAAE;IACH,MAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAE/D,MAAM,eAAe,GAAG,oBAAoB,CAAC;QAC3C,WAAW,EAAE,WAAW,IAAI,kBAAkB,CAAC,WAAW;QAC1D,WAAW,EAAE,WAAW,IAAI,kBAAkB,CAAC,WAAW;QAC1D,WAAW,EAAE,WAAW,IAAI,kBAAkB,CAAC,WAAW;QAC1D,aAAa;QACb,gBAAgB;QAChB,eAAe;QACf,aAAa;KACd,CAAC,CAAC;IAEH,MAAM,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;IACtD,OAAO,CACL,oBAAC,kBAAkB,IACjB,OAAO,EAAE,OAAO;QAChB,aAAa;QACb,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE;YACL,MAAM,CAAC,aAAa;YACpB,eAAe;YACf;gBACE,eAAe,EACb,mBAAmB,IAAI,kBAAkB,CAAC,mBAAmB;gBAC/D,iBAAiB,EACf,qBAAqB,IAAI,kBAAkB,CAAC,qBAAqB;aACpE;YACD,KAAK;SACN,IAEA,QAAQ,CACU,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,aAAa,EAAE;QACb,IAAI,EAAE,CAAC;QACP,aAAa,EAAE,KAAK;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -6,6 +6,7 @@ export interface Props extends TableProps {
|
|
|
6
6
|
onPress?: () => void;
|
|
7
7
|
isTableHeader?: boolean;
|
|
8
8
|
style?: StyleProp<ViewStyle>;
|
|
9
|
+
className?: string;
|
|
9
10
|
theme: ReadTheme;
|
|
10
11
|
}
|
|
11
12
|
declare const _default: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<Props>, "theme"> & React.RefAttributes<any>>;
|
|
@@ -3,7 +3,7 @@ import { View, StyleSheet } from "react-native";
|
|
|
3
3
|
import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
|
|
4
4
|
import { withTheme } from "@draftbit/theme";
|
|
5
5
|
import Pressable from "../Pressable";
|
|
6
|
-
const TableRow = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false, drawBottomBorder = true, drawStartBorder = true, drawEndBorder = false, cellVerticalPadding, cellHorizontalPadding, isTableHeader = false, children, onPress, style, theme, }) => {
|
|
6
|
+
const TableRow = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false, drawBottomBorder = true, drawStartBorder = true, drawEndBorder = false, cellVerticalPadding, cellHorizontalPadding, isTableHeader = false, children, onPress, className, style, theme, }) => {
|
|
7
7
|
const parentContextValue = React.useContext(TableStyleContext);
|
|
8
8
|
//Create context to use and pass to children based on own props or fall back to parent provided context
|
|
9
9
|
const contextValue = {
|
|
@@ -24,7 +24,9 @@ const TableRow = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false
|
|
|
24
24
|
});
|
|
25
25
|
const ContainerComponent = onPress ? Pressable : View;
|
|
26
26
|
return (React.createElement(TableStyleContext.Provider, { value: contextValue },
|
|
27
|
-
React.createElement(ContainerComponent, { onPress: onPress,
|
|
27
|
+
React.createElement(ContainerComponent, { onPress: onPress,
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
className: className, style: [
|
|
28
30
|
borderViewStyle,
|
|
29
31
|
isTableHeader
|
|
30
32
|
? { backgroundColor: theme.colors.branding.primary }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.js","sourceRoot":"","sources":["../../../../../src/components/Table/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,UAAU,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,GAElB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,SAAS,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"TableRow.js","sourceRoot":"","sources":["../../../../../src/components/Table/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,UAAU,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,GAElB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,SAAS,MAAM,cAAc,CAAC;AAUrC,MAAM,QAAQ,GAA6C,CAAC,EAC1D,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,GAAG,KAAK,E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;aACtB,IAEA,QAAQ,CACU,CACM,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,cAAc,EAAE;QACd,aAAa,EAAE,KAAK;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { extractStyles } from "../../utilities";
|
|
4
4
|
import YouTube from "react-youtube";
|
|
5
|
-
const YoutubePlayer = ({ videoId, playlist, autoplay = false, style, }) => {
|
|
5
|
+
const YoutubePlayer = ({ videoId, playlist, autoplay = false, style, className, }) => {
|
|
6
6
|
const { viewStyles } = extractStyles(style);
|
|
7
7
|
const defaultVideoId = "nwMUpDESXrI";
|
|
8
8
|
const options = {
|
|
@@ -14,7 +14,7 @@ const YoutubePlayer = ({ videoId, playlist, autoplay = false, style, }) => {
|
|
|
14
14
|
listType: "playlist",
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
|
-
return (React.createElement(View, { style: viewStyles },
|
|
17
|
+
return (React.createElement(View, { style: viewStyles, className: className },
|
|
18
18
|
React.createElement(YouTube, { style: { flex: 1 }, videoId: !videoId && !playlist ? defaultVideoId : videoId, opts: options })));
|
|
19
19
|
};
|
|
20
20
|
export default YoutubePlayer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YoutubePlayer.js","sourceRoot":"","sources":["../../../../../src/components/YoutubePlayer/YoutubePlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,OAAyB,MAAM,eAAe,CAAC;AAEtD,MAAM,aAAa,GAAiC,CAAC,EACnD,OAAO,EACP,QAAQ,EACR,QAAQ,G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