@wereform/pkgm-shared 1.0.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.
- package/README.md +30 -0
- package/babel.config.js +3 -0
- package/dist/components/buttons/CustomizableButton.js +1 -0
- package/dist/components/dropdowns/DropDown.js +1 -0
- package/dist/components/headers/HeaderGlobal.js +1 -0
- package/dist/components/inputs/InputComment.js +1 -0
- package/dist/components/inputs/InputField.js +1 -0
- package/dist/components/menus/MenuChannelMeta.js +1 -0
- package/dist/components/menus/MenuInteraction.js +1 -0
- package/dist/components/menus/MenuNav.js +1 -0
- package/dist/components/titles/CustomizedTitle.js +1 -0
- package/dist/index.js +1 -0
- package/dist/styles/MenuChannelMetaStyles.js +1 -0
- package/dist/styles/MenuInteractionStyles.js +1 -0
- package/dist/styles/commentInputStyles.js +1 -0
- package/dist/styles/customizableButtonStyles.js +1 -0
- package/dist/styles/dropDownStyles.js +1 -0
- package/dist/styles/globalStyles.js +1 -0
- package/dist/styles/headerGlobalStyles.js +1 -0
- package/dist/styles/inputStyles.js +1 -0
- package/dist/styles/menuNavStyles.js +1 -0
- package/dist/utils/DateViews.js +1 -0
- package/dist/utils/dateHelpers.js +0 -0
- package/dist/utils/formatters.js +0 -0
- package/dist/utils/index.js +0 -0
- package/dist/utils/normalizeUrl.js +1 -0
- package/dist/utils/validators.js +0 -0
- package/package.json +30 -0
- package/packageJSON.md +28 -0
- package/src/components/buttons/CustomizableButton.jsx +69 -0
- package/src/components/dropdowns/DropDown.jsx +44 -0
- package/src/components/headers/HeaderGlobal.jsx +26 -0
- package/src/components/inputs/InputComment.jsx +16 -0
- package/src/components/inputs/InputField.jsx +85 -0
- package/src/components/menus/MenuChannelMeta.jsx +94 -0
- package/src/components/menus/MenuInteraction.jsx +52 -0
- package/src/components/menus/MenuNav.jsx +33 -0
- package/src/components/titles/CustomizedTitle.jsx +36 -0
- package/src/index.js +11 -0
- package/src/styles/MenuChannelMetaStyles.js +114 -0
- package/src/styles/MenuInteractionStyles.js +21 -0
- package/src/styles/commentInputStyles.js +30 -0
- package/src/styles/customizableButtonStyles.js +25 -0
- package/src/styles/dropDownStyles.js +54 -0
- package/src/styles/globalStyles.js +27 -0
- package/src/styles/headerGlobalStyles.js +26 -0
- package/src/styles/inputStyles.js +36 -0
- package/src/styles/menuNavStyles.js +23 -0
- package/src/utils/DateViews.jsx +72 -0
- package/src/utils/dateHelpers.js +0 -0
- package/src/utils/formatters.js +0 -0
- package/src/utils/index.js +0 -0
- package/src/utils/normalizeUrl.js +14 -0
- package/src/utils/validators.js +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @begenone/pkgm-shared
|
|
2
|
+
|
|
3
|
+
This is the **shared utility and components** package used across all BEGENONE modules.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
It holds **reusable code** that needs to be accessed from multiple packages — reducing duplication and ensuring consistent logic.
|
|
8
|
+
|
|
9
|
+
## Contents
|
|
10
|
+
|
|
11
|
+
- 🧩 UI components (buttons, cards, loaders)
|
|
12
|
+
- 🔁 Utility functions (formatting, parsing, validators)
|
|
13
|
+
- 🔐 Auth context & hooks
|
|
14
|
+
- 🌐 API layer helpers
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- Single source of truth for design components
|
|
19
|
+
- Shared logic between channel, video, wire, and settings packages
|
|
20
|
+
- Centralized error and logging utilities
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
Imported by all other packages that require consistent behavior or style.
|
|
25
|
+
|
|
26
|
+
## Tech Stack
|
|
27
|
+
|
|
28
|
+
- React + React Native
|
|
29
|
+
- TypeScript
|
|
30
|
+
- React Context & Hooks
|
package/babel.config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CustomizedButton=CustomizedButton;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _reactNative=require("react-native");var _customizableButtonStyles=require("../../styles/customizableButtonStyles");var _react=require("react");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-shared\\src\\components\\buttons\\CustomizableButton.jsx";function CustomizedButton(_ref){var label=_ref.label,onPress=_ref.onPress,onPressStyle=_ref.onPressStyle,textColor=_ref.textColor,fontSize=_ref.fontSize,fontFamily=_ref.fontFamily,fontWeight=_ref.fontWeight,customIcon=_ref.customIcon,style=_ref.style,isDisabled=_ref.isDisabled;if(!label){console.warn("CustomizedButton: 'label' prop is missing.");}var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),pressed=_useState2[0],setPressed=_useState2[1];return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:onPress||function(){return console.warn("CustomizedButton: onPress not provided");},onPressIn:function onPressIn(){return setPressed(true);},onPressOut:function onPressOut(){return setPressed(false);},style:[_customizableButtonStyles.customizableButtonStyles.buttonContainer,style,pressed&&onPressStyle],activeOpacity:1,disabled:isDisabled,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:customIcon?{flexDirection:"row",width:"100%",justifyContent:"space-between",alignItems:"center",paddingRight:12}:{},children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[_customizableButtonStyles.customizableButtonStyles.buttonText,{color:textColor||"#fff",fontSize:fontSize||16,fontFamily:fontFamily,fontWeight:fontWeight}],children:label||"Default Button"}),(0,_jsxRuntime.jsx)(_reactNative.View,{children:customIcon&&customIcon})]})});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.DropDown=DropDown;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _reactNative=require("react-native");var _reactNativeModalSelector=_interopRequireDefault(require("react-native-modal-selector"));var _react=require("react");var _dropDownStyles=require("../../styles/dropDownStyles");var _vectorIcons=require("@expo/vector-icons");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-shared\\src\\components\\dropdowns\\DropDown.jsx";function DropDown(_ref){var selectText=_ref.selectText,data=_ref.data,styles=_ref.styles,iconStyles=_ref.iconStyles;var _useState=(0,_react.useState)(selectText),_useState2=(0,_slicedToArray2.default)(_useState,2),selected=_useState2[0],setSelected=_useState2[1];return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[_dropDownStyles.dropDownStyles.container,styles],children:(0,_jsxRuntime.jsx)(_reactNativeModalSelector.default,{data:data,initValue:selectText||"Select Option",onChange:function onChange(option){console.log("Selected option:",option);setSelected(option);},overlayStyle:_dropDownStyles.dropDownStyles.overlayStyle,optionTextStyle:{color:"#fff",fontWeight:"500"},optionContainerStyle:_dropDownStyles.dropDownStyles.optionContainerStyle,cancelTextStyle:{color:"#000",fontFamily:"Inter",fontWeight:"800"},cancelStyle:_dropDownStyles.dropDownStyles.cancelContainerStyle,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_dropDownStyles.dropDownStyles.dropDownContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_dropDownStyles.dropDownStyles.dropDownText,children:typeof selected==="string"?selected:(selected==null?void 0:selected.label)||"Select Option"}),(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"caret-down",size:16,color:"white",style:iconStyles})]})})});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.HeaderGlobal=HeaderGlobal;var _reactNative=require("react-native");var _headerGlobalStyles=require("../../styles/headerGlobalStyles");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-shared\\src\\components\\headers\\HeaderGlobal.jsx";function HeaderGlobal(_ref){var aiIcon=_ref.aiIcon,notificationIcon=_ref.notificationIcon,searchIcon=_ref.searchIcon;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_headerGlobalStyles.headerGlobalStyles.container,children:[(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:"https://begenone-images.s3.us-east-1.amazonaws.com/begenone-white-transparent-logo-beta-min.png"},style:_headerGlobalStyles.headerGlobalStyles.image}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_headerGlobalStyles.headerGlobalStyles.iconsContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:_headerGlobalStyles.headerGlobalStyles.icons,children:aiIcon}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:_headerGlobalStyles.headerGlobalStyles.icons,children:notificationIcon}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:_headerGlobalStyles.headerGlobalStyles.icons,children:searchIcon})]})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.InputComment=InputComment;var _reactNative=require("react-native");var _commentInputStyles=require("../../styles/commentInputStyles");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-shared\\src\\components\\inputs\\InputComment.jsx";function InputComment(_ref){var placeholder=_ref.placeholder,submitIcon=_ref.submitIcon,props=_ref.props;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_commentInputStyles.commentInputStyles.container,children:[(0,_jsxRuntime.jsx)(_reactNative.TextInput,Object.assign({placeholder:placeholder,placeholderTextColor:"#999",style:[_commentInputStyles.commentInputStyles.input]},props)),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{children:submitIcon})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.InputField=InputField;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _inputStyles=require("../../styles/inputStyles");var _inter=require("@expo-google-fonts/inter");var _vectorIcons=require("@expo/vector-icons");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-shared\\src\\components\\inputs\\InputField.jsx";var _excluded=["placeholder","error","iconLeft","iconRight","onIconPress","iconRightColor","inputStyle","inputWrapper","multiline","onChangeText","isEditable","secureTextEntry","Children"];function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}function InputField(_ref){var placeholder=_ref.placeholder,error=_ref.error,iconLeft=_ref.iconLeft,iconRight=_ref.iconRight,onIconPress=_ref.onIconPress,iconRightColor=_ref.iconRightColor,inputStyle=_ref.inputStyle,inputWrapper=_ref.inputWrapper,multiline=_ref.multiline,onChangeText=_ref.onChangeText,isEditable=_ref.isEditable,secureTextEntry=_ref.secureTextEntry,Children=_ref.Children,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var _useFonts=(0,_inter.useFonts)({Inter_400Regular:_inter.Inter_400Regular,Inter_700Bold:_inter.Inter_700Bold}),_useFonts2=(0,_slicedToArray2.default)(_useFonts,1),fontsLoaded=_useFonts2[0];if(!fontsLoaded){return null;}var isMultiline=multiline||false;return(0,_jsxRuntime.jsxs)(_reactNative.View,{children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[_inputStyles.inputStyles.inputWrapper,inputWrapper],children:[iconLeft&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:_inputStyles.inputStyles.icon,children:iconLeft}),(0,_jsxRuntime.jsx)(_reactNative.TextInput,Object.assign({editable:isEditable,placeholder:placeholder,placeholderTextColor:"#999",multiline:isMultiline,style:[_inputStyles.inputStyles.input,inputStyle,isMultiline&&{textAlignVertical:"top"}],onChangeText:onChangeText,secureTextEntry:secureTextEntry},props)),iconRight&&(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:_inputStyles.inputStyles.icon,onPress:onIconPress,disabled:!onIconPress,children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:iconRight,size:18,color:iconRightColor||"#fff"})})]}),error&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:customErrorStyle,children:error})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.MenuChannelMeta=void 0;var _reactNative=require("react-native");var _MenuChannelMetaStyles=require("../../styles/MenuChannelMetaStyles");var _vectorIcons=require("@expo/vector-icons");var _react=require("react");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-shared\\src\\components\\menus\\MenuChannelMeta.jsx";var calcWidth;var calcHeight;var MenuChannelMeta=exports.MenuChannelMeta=function MenuChannelMeta(_ref){var timeAgo=_ref.timeAgo,viewsText=_ref.viewsText,channelLogo=_ref.channelLogo,userName=_ref.userName,subscribersCount=_ref.subscribersCount,containerStyles=_ref.containerStyles,channelContainerStyles=_ref.channelContainerStyles;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[_MenuChannelMetaStyles.MenuChannelMetaStyles.container,containerStyles],children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:_MenuChannelMetaStyles.MenuChannelMetaStyles.dateViewsContainer,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_MenuChannelMetaStyles.MenuChannelMetaStyles.dateContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:_MenuChannelMetaStyles.MenuChannelMetaStyles.dateIcon,children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"calendar",size:16,color:"white"})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_MenuChannelMetaStyles.MenuChannelMetaStyles.dateText,children:timeAgo||"14 Hours Ago"})]})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_MenuChannelMetaStyles.MenuChannelMetaStyles.channelMetaContainer,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_MenuChannelMetaStyles.MenuChannelMetaStyles.channelMetaContainer_ColumnOne,children:[(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:channelLogo||"https://begenone-images.s3.us-east-1.amazonaws.com/default-user-photo.jpg"},style:_MenuChannelMetaStyles.MenuChannelMetaStyles.userImage}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_MenuChannelMetaStyles.MenuChannelMetaStyles.nameSubcountContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[_MenuChannelMetaStyles.MenuChannelMetaStyles.userName,inlineStyles.userName],children:userName||"Default Username"}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_MenuChannelMetaStyles.MenuChannelMetaStyles.subCountContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_MenuChannelMetaStyles.MenuChannelMetaStyles.subCount,children:subscribersCount||"0"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_MenuChannelMetaStyles.MenuChannelMetaStyles.subText,children:"Subscribers"})]})]})]}),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{style:[_MenuChannelMetaStyles.MenuChannelMetaStyles.subscribeButtonContainer,{backgroundColor:"#303030"}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[_MenuChannelMetaStyles.MenuChannelMetaStyles.subscribeButtonText,{color:"#7f7f7f"}],children:"Subscribe"})})]})]});};var inlineStyles=_reactNative.StyleSheet.create({userName:{width:""}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.MenuInteraction=void 0;var _reactNative=require("react-native");var _MenuInteractionStyles=require("../../styles/MenuInteractionStyles");var _vectorIcons=require("@expo/vector-icons");var _react=require("react");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-shared\\src\\components\\menus\\MenuInteraction.jsx";var MenuInteraction=exports.MenuInteraction=function MenuInteraction(_ref){var containerStyles=_ref.containerStyles,columnMainIconStyles=_ref.columnMainIconStyles,pressed=_ref.pressed;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[_MenuInteractionStyles.MenuInteractionStyles.container,containerStyles],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[_MenuInteractionStyles.MenuInteractionStyles.column_mainIcons,columnMainIconStyles],children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:_MenuInteractionStyles.MenuInteractionStyles.icon,children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"arrow-redo",size:24,color:"white"})})}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:_MenuInteractionStyles.MenuInteractionStyles.icon,children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"chatbubble-ellipses",size:24,color:"white"})})}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:_MenuInteractionStyles.MenuInteractionStyles.icon,children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"repeat-outline",size:24,color:"white"})})}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:_MenuInteractionStyles.MenuInteractionStyles.icon,children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"thumbs-up-outline",size:24,color:"white"})})}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:_MenuInteractionStyles.MenuInteractionStyles.icon,children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"thumbs-down-outline",size:24,color:"white"})})})]}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:function onPress(){return pressed(true);},children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"ellipsis-vertical-outline",size:24,color:"white"})})]});};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.MenuNav=MenuNav;var _reactNative=require("react-native");var _menuNavStyles=require("../../styles/menuNavStyles");var _vectorIcons=require("@expo/vector-icons");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-shared\\src\\components\\menus\\MenuNav.jsx";function MenuNav(_ref){var homeIcon=_ref.homeIcon,wireIcon=_ref.wireIcon,uploadIcon=_ref.uploadIcon,channelIcon=_ref.channelIcon,profileIcon=_ref.profileIcon,onPressHome=_ref.onPressHome,onPressWire=_ref.onPressWire,onPressUpload=_ref.onPressUpload,onPressChannel=_ref.onPressChannel,onPressProfile=_ref.onPressProfile;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_menuNavStyles.menuNavStyles.container,children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:onPressHome,children:homeIcon}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:onPressWire,children:wireIcon}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:onPressUpload,children:uploadIcon}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:onPressChannel,children:channelIcon}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:onPressProfile,children:profileIcon||(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"person-outline",size:24,color:"white"})})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.CustomizedTitle=CustomizedTitle;var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-shared\\src\\components\\titles\\CustomizedTitle.jsx";function CustomizedTitle(_ref){var title=_ref.title,fontSize=_ref.fontSize,fontFamily=_ref.fontFamily,textColor=_ref.textColor,style=_ref.style,textStyle=_ref.textStyle,dateTextStyles=_ref.dateTextStyles;var displayTitle=title&&title.length>75?title.slice(0,75)+"…":title||"Here is your default Title!";return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{width:"100%"},style],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[{flexShrink:1,fontFamily:fontFamily,fontSize:fontSize,color:textColor,flexWrap:"wrap"},textStyle],numberOfLines:2,children:displayTitle})});}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"CustomizedButton",{enumerable:true,get:function get(){return _CustomizableButton.CustomizedButton;}});Object.defineProperty(exports,"CustomizedTitle",{enumerable:true,get:function get(){return _CustomizedTitle.CustomizedTitle;}});Object.defineProperty(exports,"DateViews",{enumerable:true,get:function get(){return _DateViews.DateViews;}});Object.defineProperty(exports,"DropDown",{enumerable:true,get:function get(){return _DropDown.DropDown;}});Object.defineProperty(exports,"HeaderGlobal",{enumerable:true,get:function get(){return _HeaderGlobal.HeaderGlobal;}});Object.defineProperty(exports,"InputComment",{enumerable:true,get:function get(){return _InputComment.InputComment;}});Object.defineProperty(exports,"InputField",{enumerable:true,get:function get(){return _InputField.InputField;}});Object.defineProperty(exports,"MenuChannelMeta",{enumerable:true,get:function get(){return _MenuChannelMeta.MenuChannelMeta;}});Object.defineProperty(exports,"MenuInteraction",{enumerable:true,get:function get(){return _MenuInteraction.MenuInteraction;}});Object.defineProperty(exports,"MenuNav",{enumerable:true,get:function get(){return _MenuNav.MenuNav;}});Object.defineProperty(exports,"normalizeUrl",{enumerable:true,get:function get(){return _normalizeUrl.default;}});var _InputField=require("./components/inputs/InputField");var _MenuNav=require("./components/menus/MenuNav");var _HeaderGlobal=require("./components/headers/HeaderGlobal");var _MenuInteraction=require("./components/menus/MenuInteraction");var _MenuChannelMeta=require("./components/menus/MenuChannelMeta");var _InputComment=require("./components/inputs/InputComment.jsx");var _DropDown=require("./components/dropdowns/DropDown.jsx");var _CustomizedTitle=require("./components/titles/CustomizedTitle.jsx");var _CustomizableButton=require("./components/buttons/CustomizableButton.jsx");var _DateViews=require("./utils/DateViews.jsx");var _normalizeUrl=_interopRequireDefault(require("./utils/normalizeUrl.js"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.checkDimensions=exports.MenuChannelMetaStyles=void 0;var _reactNative=require("react-native");var _globalStyles=require("./globalStyles");var checkDimensions=exports.checkDimensions=function checkDimensions(){};var MenuChannelMetaStyles=exports.MenuChannelMetaStyles=_reactNative.StyleSheet.create({container:{width:"auto",marginRight:12,marginLeft:12},dateViewsContainer:{width:"100%",flexDirection:"row",justifyContent:"space-between",marginTop:12,paddingRight:6,paddingLeft:6},dateContainer:{flexDirection:"row",rowGap:20},dateIcon:{marginRight:8},viewsContainer:{flexDirection:"row",alignItems:"center"},eyeIcon:{marginRight:8,marginLeft:8},dateText:{color:_globalStyles.globalStyles.colors.colorPrimary600},viewsText:{color:_globalStyles.globalStyles.colors.colorPrimary600},channelMetaContainer:{flexDirection:"row",backgroundColor:_globalStyles.globalStyles.colors.colorPrimary200,padding:12,marginBottom:6,marginTop:12,borderRadius:_globalStyles.globalStyles.borders.borderPrimary100,justifyContent:"space-between"},channelMetaContainer_ColumnOne:{flexDirection:"row"},userImage:{width:40,height:40,borderRadius:_globalStyles.globalStyles.borders.borderPrimary50},nameSubcountContainer:{flexDirection:"column",paddingLeft:12},userName:{color:"#fff",fontSize:_reactNative.Platform.OS==="ios"?16:14,paddingBottom:4,fontWeight:"bold"},subCountContainer:{flexDirection:"row"},subCount:{color:_globalStyles.globalStyles.colors.colorPrimary600,paddingRight:6,fontSize:12,fontWeight:"bold"},subText:{color:"#fff",fontSize:12},subscribeButtonContainer:{backgroundColor:_globalStyles.globalStyles.colors.colorPrimary600,width:_reactNative.Platform.OS==="ios"?100:80,borderRadius:_globalStyles.globalStyles.borders.borderPrimary400,alignItems:"center",justifyContent:"center"},subscribeButtonText:{color:"#fff",fontWeight:"bold",fontSize:_reactNative.Platform==="ios"?18:12}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.MenuInteractionStyles=void 0;var MenuInteractionStyles=exports.MenuInteractionStyles={container:{width:"100%",height:40,flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingRight:16},column_mainIcons:{flexDirection:"row",justifyContent:"space-evenly"},icon:{paddingLeft:18}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.commentInputStyles=void 0;var _globalStyles=require("./globalStyles");var commentInputStyles=exports.commentInputStyles={container:{flexDirection:"row",width:"auto",backgroundColor:_globalStyles.globalStyles.colors.colorPrimary350,borderRadius:_globalStyles.globalStyles.borders.borderPrimary200,height:50,justifyContent:"space-between",alignItems:"center",justifySelf:"center",marginRight:12,marginLeft:12,paddingLeft:12,paddingRight:24},input:{paddingLeft:8,paddingRight:8,color:"#fff"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.customizableButtonStyles=void 0;var _reactNative=require("react-native");var _globalStyles=require("./globalStyles");var customizableButtonStyles=exports.customizableButtonStyles=_reactNative.StyleSheet.create({container:{},buttonContainer:{height:50,width:"auto",flexGrow:1,justifyContent:"center",alignItems:"center",borderRadius:_globalStyles.globalStyles.borders.borderPrimary100,backgroundColor:"#fff"},buttonText:{flexDirection:"row",color:"#000",fontSize:16,textAlign:"center",textAlignVertical:"center",alignItems:"center"}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.dropDownStyles=void 0;var _globalStyles=require("./globalStyles");var dropDownStyles=exports.dropDownStyles={container:{width:"auto"},picker:{height:40,flex:1},overlayStyle:{backgroundColor:_globalStyles.globalStyles.colors.colorPrimary50},optionTextStyle:{color:"#fff"},optionContainerStyle:{backgroundColor:_globalStyles.globalStyles.colors.colorPrimary200,borderWidth:1,borderRadius:_globalStyles.globalStyles.borders.borderPrimary200,justifyContent:"space-between"},cancelContainerStyle:{backgroundColor:"#fff"},dropDownContainer:{flexDirection:"row",width:"100%",justifyContent:"space-between",borderRadius:_globalStyles.globalStyles.borders.borderPrimary200,height:50,alignItems:"center",paddingRight:12,paddingLeft:12,backgroundColor:_globalStyles.globalStyles.colors.colorPrimary200},dropDownText:{color:"#fff",paddingLeft:12}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.globalStyles=void 0;var globalStyles=exports.globalStyles={colors:{colorPrimary50:"rgba(21, 21, 21, .7)",colorPrimary100:"#151515",colorPrimary200:"#252525",colorPrimary250:"rgba(37, 37, 37, .9)",colorPrimary300:"#3C3C3C",colorPrimary350:"rgba(60,60,60,.2)",colorPrimary400:"#7F7F7F",colorPrimary500:"#D3D3D3",colorPrimary600:"#ff6600ff",colorPrimary700:"#FF8800"},borders:{borderPrimary50:8,borderPrimary100:10,borderPrimary200:12,borderPrimary300:15,borderPrimary400:30}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.headerGlobalStyles=void 0;var headerGlobalStyles=exports.headerGlobalStyles={container:{height:75,width:"100%",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginTop:-5},iconsContainer:{flexDirection:"row"},icons:{paddingRight:20},image:{width:120,height:120,resizeMode:"contain",marginLeft:24}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.inputStyles=void 0;var inputStyles=exports.inputStyles={label:{fontSize:14,marginBottom:5,color:"#333"},inputWrapper:{flexDirection:"row",alignItems:"center",borderRadius:8,borderWidth:1,borderColor:"rgba(37, 37, 37, 0)",overflow:"hidden"},input:{width:"auto",paddingLeft:14,paddingRight:14,fontFamily:"Inter",fontWeight:"700",color:"#3c3c3c"},icon:{marginHorizontal:5},error:{color:"red",fontSize:12,marginTop:4}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.menuNavStyles=void 0;var _reactNative=require("react-native");var _globalStyles=require("./globalStyles");var menuNavStyles=exports.menuNavStyles=_reactNative.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-evenly",backgroundColor:_globalStyles.globalStyles.colors.colorPrimary200,height:60,width:"80%",alignSelf:"center",alignItems:"center",borderRadius:_globalStyles.globalStyles.borders.borderPrimary300},uploadIcon:{color:_globalStyles.globalStyles.colors.colorPrimary600}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.DateViews=DateViews;var _reactNative=require("react-native");var _globalStyles=require("../styles/globalStyles");var _vectorIcons=require("@expo/vector-icons");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-shared\\src\\utils\\DateViews.jsx";function DateViews(_ref){var timeAgo=_ref.timeAgo,viewsText=_ref.viewsText,containerStyles=_ref.containerStyles,dateTextStyles=_ref.dateTextStyles,viewsTextStyles=_ref.viewsTextStyles,dateContainerStyles=_ref.dateContainerStyles;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.dateViewsContainer,containerStyles],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.dateContainer,dateContainerStyles],children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.dateIcon],children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"calendar-clear-outline",size:16,color:"white"})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.dateText,dateTextStyles],children:timeAgo||"14 Hours Ago"})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.viewsContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.eyeIcon],children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"eye-outline",size:16,color:"white"})}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:[styles.viewsText,viewsTextStyles],children:[viewsText||"123.400",(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:"white"},children:" Views"})]})]})]});}var styles=_reactNative.StyleSheet.create({dateViewsContainer:{width:"100%",height:30,flexDirection:"row",justifyContent:"space-between",marginTop:12,paddingRight:8},dateContainer:{flexDirection:"row",rowGap:20,paddingRight:16},dateIcon:{marginRight:8},viewsContainer:{flexDirection:"row"},eyeIcon:{marginRight:8},dateText:{color:_globalStyles.globalStyles.colors.colorPrimary600},viewsText:{color:_globalStyles.globalStyles.colors.colorPrimary600}});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var normalizeUrl=function normalizeUrl(url){if(!url)return null;if(/^https?:\/\//i.test(url))return url;if(/^[\w.-]+\.[a-z]{2,}$/i.test(url))return`https://${url}`;return null;};var _default=exports.default=normalizeUrl;
|
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wereform/pkgm-shared",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "babel src --out-dir dist --extensions .js,.jsx"
|
|
7
|
+
},
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"peerDependencies": {
|
|
12
|
+
"@react-native-picker/picker": "^2.11.4",
|
|
13
|
+
"react": "19.1.0",
|
|
14
|
+
"react-native": "^0.81.4"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@expo-google-fonts/inter": "^0.4.2",
|
|
18
|
+
"@expo/vector-icons": "^15.0.3",
|
|
19
|
+
"expo-font": "^14.0.9",
|
|
20
|
+
"react-native-dropdown-select-list": "^2.0.5",
|
|
21
|
+
"react-native-modal-selector": "^2.1.2",
|
|
22
|
+
"react-native-picker-select": "^9.3.1"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@babel/cli": "^7.28.3",
|
|
26
|
+
"@babel/core": "^7.28.5",
|
|
27
|
+
"@babel/preset-env": "^7.28.5",
|
|
28
|
+
"metro-react-native-babel-preset": "^0.77.0"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/packageJSON.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@begenone/pkgm-shared",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "babel src --out-dir dist --extensions .js,.jsx"
|
|
8
|
+
},
|
|
9
|
+
"peerDependencies": {
|
|
10
|
+
"@react-native-picker/picker": "^2.11.4",
|
|
11
|
+
"react": "19.1.0",
|
|
12
|
+
"react-native": "^0.81.4"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@expo-google-fonts/inter": "^0.4.2",
|
|
16
|
+
"@expo/vector-icons": "^15.0.3",
|
|
17
|
+
"expo-font": "^14.0.9",
|
|
18
|
+
"react-native-dropdown-select-list": "^2.0.5",
|
|
19
|
+
"react-native-modal-selector": "^2.1.2",
|
|
20
|
+
"react-native-picker-select": "^9.3.1"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@babel/cli": "^7.28.3",
|
|
24
|
+
"@babel/core": "^7.28.5",
|
|
25
|
+
"@babel/preset-env": "^7.28.5",
|
|
26
|
+
"metro-react-native-babel-preset": "^0.77.0"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Text, TouchableOpacity, View } from "react-native";
|
|
2
|
+
import { customizableButtonStyles } from "../../styles/customizableButtonStyles";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
|
|
5
|
+
export function CustomizedButton({
|
|
6
|
+
label,
|
|
7
|
+
onPress,
|
|
8
|
+
onPressStyle,
|
|
9
|
+
textColor,
|
|
10
|
+
fontSize,
|
|
11
|
+
fontFamily,
|
|
12
|
+
fontWeight,
|
|
13
|
+
customIcon,
|
|
14
|
+
style,
|
|
15
|
+
isDisabled,
|
|
16
|
+
}) {
|
|
17
|
+
if (!label) {
|
|
18
|
+
console.warn("CustomizedButton: 'label' prop is missing.");
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const [pressed, setPressed] = useState(false);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<TouchableOpacity
|
|
25
|
+
onPress={
|
|
26
|
+
onPress ||
|
|
27
|
+
(() => console.warn("CustomizedButton: onPress not provided"))
|
|
28
|
+
}
|
|
29
|
+
onPressIn={() => setPressed(true)}
|
|
30
|
+
onPressOut={() => setPressed(false)}
|
|
31
|
+
style={[
|
|
32
|
+
customizableButtonStyles.buttonContainer,
|
|
33
|
+
style,
|
|
34
|
+
pressed && onPressStyle,
|
|
35
|
+
]}
|
|
36
|
+
activeOpacity={1}
|
|
37
|
+
disabled={isDisabled}
|
|
38
|
+
>
|
|
39
|
+
<View
|
|
40
|
+
style={
|
|
41
|
+
customIcon
|
|
42
|
+
? {
|
|
43
|
+
flexDirection: "row",
|
|
44
|
+
width: "100%",
|
|
45
|
+
justifyContent: "space-between",
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
paddingRight: 12,
|
|
48
|
+
}
|
|
49
|
+
: {}
|
|
50
|
+
}
|
|
51
|
+
>
|
|
52
|
+
<Text
|
|
53
|
+
style={[
|
|
54
|
+
customizableButtonStyles.buttonText,
|
|
55
|
+
{
|
|
56
|
+
color: textColor || "#fff",
|
|
57
|
+
fontSize: fontSize || 16,
|
|
58
|
+
fontFamily: fontFamily,
|
|
59
|
+
fontWeight: fontWeight,
|
|
60
|
+
},
|
|
61
|
+
]}
|
|
62
|
+
>
|
|
63
|
+
{label || "Default Button"}
|
|
64
|
+
</Text>
|
|
65
|
+
<View>{customIcon && customIcon}</View>
|
|
66
|
+
</View>
|
|
67
|
+
</TouchableOpacity>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Text, View } from "react-native";
|
|
2
|
+
import ModalSelector from "react-native-modal-selector";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { dropDownStyles } from "../../styles/dropDownStyles";
|
|
5
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
6
|
+
|
|
7
|
+
export function DropDown({ selectText, data, styles, iconStyles }) {
|
|
8
|
+
const [selected, setSelected] = useState(selectText);
|
|
9
|
+
return (
|
|
10
|
+
<View style={[dropDownStyles.container, styles]}>
|
|
11
|
+
<ModalSelector
|
|
12
|
+
data={data}
|
|
13
|
+
initValue={selectText || "Select Option"}
|
|
14
|
+
onChange={option => {
|
|
15
|
+
console.log("Selected option:", option); // <-- key + label!
|
|
16
|
+
setSelected(option);
|
|
17
|
+
}}
|
|
18
|
+
overlayStyle={dropDownStyles.overlayStyle}
|
|
19
|
+
optionTextStyle={{ color: "#fff", fontWeight: "500" }}
|
|
20
|
+
optionContainerStyle={dropDownStyles.optionContainerStyle}
|
|
21
|
+
cancelTextStyle={{
|
|
22
|
+
color: "#000",
|
|
23
|
+
fontFamily: "Inter",
|
|
24
|
+
fontWeight: "800",
|
|
25
|
+
}}
|
|
26
|
+
cancelStyle={dropDownStyles.cancelContainerStyle}
|
|
27
|
+
>
|
|
28
|
+
<View style={dropDownStyles.dropDownContainer}>
|
|
29
|
+
<Text style={dropDownStyles.dropDownText}>
|
|
30
|
+
{typeof selected === "string"
|
|
31
|
+
? selected // shows default selectText
|
|
32
|
+
: selected?.label || "Select Option"}
|
|
33
|
+
</Text>
|
|
34
|
+
<Ionicons
|
|
35
|
+
name="caret-down"
|
|
36
|
+
size={16}
|
|
37
|
+
color={"white"}
|
|
38
|
+
style={iconStyles}
|
|
39
|
+
/>
|
|
40
|
+
</View>
|
|
41
|
+
</ModalSelector>
|
|
42
|
+
</View>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Image, TouchableOpacity, View } from "react-native";
|
|
2
|
+
import { headerGlobalStyles } from "../../styles/headerGlobalStyles";
|
|
3
|
+
|
|
4
|
+
export function HeaderGlobal({ aiIcon, notificationIcon, searchIcon }) {
|
|
5
|
+
return (
|
|
6
|
+
<View style={headerGlobalStyles.container}>
|
|
7
|
+
<Image
|
|
8
|
+
source={{
|
|
9
|
+
uri: "https://begenone-images.s3.us-east-1.amazonaws.com/begenone-white-transparent-logo-beta-min.png",
|
|
10
|
+
}}
|
|
11
|
+
style={headerGlobalStyles.image}
|
|
12
|
+
/>
|
|
13
|
+
<View style={headerGlobalStyles.iconsContainer}>
|
|
14
|
+
<TouchableOpacity style={headerGlobalStyles.icons}>
|
|
15
|
+
{aiIcon}
|
|
16
|
+
</TouchableOpacity>
|
|
17
|
+
<TouchableOpacity style={headerGlobalStyles.icons}>
|
|
18
|
+
{notificationIcon}
|
|
19
|
+
</TouchableOpacity>
|
|
20
|
+
<TouchableOpacity style={headerGlobalStyles.icons}>
|
|
21
|
+
{searchIcon}
|
|
22
|
+
</TouchableOpacity>
|
|
23
|
+
</View>
|
|
24
|
+
</View>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Pressable, TextInput, View } from "react-native";
|
|
2
|
+
import { commentInputStyles } from "../../styles/commentInputStyles";
|
|
3
|
+
|
|
4
|
+
export function InputComment({ placeholder, submitIcon, props }) {
|
|
5
|
+
return (
|
|
6
|
+
<View style={commentInputStyles.container}>
|
|
7
|
+
<TextInput
|
|
8
|
+
placeholder={placeholder}
|
|
9
|
+
placeholderTextColor="#999"
|
|
10
|
+
style={[commentInputStyles.input]}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
<Pressable>{submitIcon}</Pressable>
|
|
14
|
+
</View>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// packages/begenone-pkgm-shared/src/components/inputs/InputField.jsx
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import {
|
|
4
|
+
View,
|
|
5
|
+
TextInput,
|
|
6
|
+
Text,
|
|
7
|
+
StyleSheet,
|
|
8
|
+
TouchableOpacity,
|
|
9
|
+
} from "react-native";
|
|
10
|
+
import { inputStyles } from "../../styles/inputStyles";
|
|
11
|
+
import {
|
|
12
|
+
useFonts,
|
|
13
|
+
Inter_400Regular,
|
|
14
|
+
Inter_700Bold,
|
|
15
|
+
} from "@expo-google-fonts/inter";
|
|
16
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
17
|
+
|
|
18
|
+
export function InputField({
|
|
19
|
+
placeholder,
|
|
20
|
+
error,
|
|
21
|
+
iconLeft,
|
|
22
|
+
iconRight,
|
|
23
|
+
onIconPress,
|
|
24
|
+
iconRightColor,
|
|
25
|
+
inputStyle,
|
|
26
|
+
inputWrapper,
|
|
27
|
+
multiline,
|
|
28
|
+
onChangeText,
|
|
29
|
+
isEditable,
|
|
30
|
+
secureTextEntry,
|
|
31
|
+
Children,
|
|
32
|
+
// onPressFunction,
|
|
33
|
+
...props
|
|
34
|
+
}) {
|
|
35
|
+
const [fontsLoaded] = useFonts({
|
|
36
|
+
Inter_400Regular,
|
|
37
|
+
Inter_700Bold,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
if (!fontsLoaded) {
|
|
41
|
+
return null; // or <AppLoading />
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// console.log(`Multi Line CHECK`, multiline);
|
|
45
|
+
|
|
46
|
+
const isMultiline = multiline || false;
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<View>
|
|
50
|
+
<View style={[inputStyles.inputWrapper, inputWrapper]}>
|
|
51
|
+
{iconLeft && <View style={inputStyles.icon}>{iconLeft}</View>}
|
|
52
|
+
<TextInput
|
|
53
|
+
editable={isEditable}
|
|
54
|
+
placeholder={placeholder}
|
|
55
|
+
placeholderTextColor="#999"
|
|
56
|
+
multiline={isMultiline}
|
|
57
|
+
style={[
|
|
58
|
+
inputStyles.input,
|
|
59
|
+
inputStyle,
|
|
60
|
+
isMultiline && { textAlignVertical: "top" },
|
|
61
|
+
]}
|
|
62
|
+
onChangeText={onChangeText}
|
|
63
|
+
secureTextEntry={secureTextEntry}
|
|
64
|
+
{...props}
|
|
65
|
+
/>
|
|
66
|
+
{iconRight && (
|
|
67
|
+
<TouchableOpacity
|
|
68
|
+
style={inputStyles.icon}
|
|
69
|
+
onPress={onIconPress}
|
|
70
|
+
disabled={!onIconPress}
|
|
71
|
+
>
|
|
72
|
+
<Ionicons
|
|
73
|
+
name={iconRight}
|
|
74
|
+
size={18}
|
|
75
|
+
color={iconRightColor || "#fff"}
|
|
76
|
+
/>
|
|
77
|
+
</TouchableOpacity>
|
|
78
|
+
)}
|
|
79
|
+
</View>
|
|
80
|
+
{error && <Text style={customErrorStyle}>{error}</Text>}
|
|
81
|
+
</View>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
// ~2.28.0
|
|
85
|
+
// ~4.16.0
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Image,
|
|
3
|
+
Platform,
|
|
4
|
+
Pressable,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
Text,
|
|
7
|
+
useWindowDimensions,
|
|
8
|
+
View,
|
|
9
|
+
} from "react-native";
|
|
10
|
+
import { MenuChannelMetaStyles } from "../../styles/MenuChannelMetaStyles";
|
|
11
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
12
|
+
import { useEffect } from "react";
|
|
13
|
+
|
|
14
|
+
let calcWidth;
|
|
15
|
+
let calcHeight;
|
|
16
|
+
|
|
17
|
+
export const MenuChannelMeta = ({
|
|
18
|
+
timeAgo,
|
|
19
|
+
viewsText,
|
|
20
|
+
channelLogo,
|
|
21
|
+
userName,
|
|
22
|
+
subscribersCount,
|
|
23
|
+
containerStyles,
|
|
24
|
+
channelContainerStyles,
|
|
25
|
+
}) => {
|
|
26
|
+
return (
|
|
27
|
+
<View style={[MenuChannelMetaStyles.container, containerStyles]}>
|
|
28
|
+
<View style={MenuChannelMetaStyles.dateViewsContainer}>
|
|
29
|
+
<View style={MenuChannelMetaStyles.dateContainer}>
|
|
30
|
+
<View style={MenuChannelMetaStyles.dateIcon}>
|
|
31
|
+
<Ionicons name="calendar" size={16} color="white" />
|
|
32
|
+
</View>
|
|
33
|
+
<Text style={MenuChannelMetaStyles.dateText}>
|
|
34
|
+
{timeAgo || "14 Hours Ago"}
|
|
35
|
+
</Text>
|
|
36
|
+
</View>
|
|
37
|
+
{/* <View style={MenuChannelMetaStyles.viewsContainer}>
|
|
38
|
+
<Text style={MenuChannelMetaStyles.viewsText}>
|
|
39
|
+
{viewsText || "0"}
|
|
40
|
+
</Text>
|
|
41
|
+
<View style={MenuChannelMetaStyles.eyeIcon}>
|
|
42
|
+
<Ionicons name="eye" size={16} color="white" />
|
|
43
|
+
</View>
|
|
44
|
+
</View> */}
|
|
45
|
+
</View>
|
|
46
|
+
<View style={MenuChannelMetaStyles.channelMetaContainer}>
|
|
47
|
+
<View style={MenuChannelMetaStyles.channelMetaContainer_ColumnOne}>
|
|
48
|
+
<Image
|
|
49
|
+
source={{
|
|
50
|
+
uri:
|
|
51
|
+
channelLogo ||
|
|
52
|
+
"https://begenone-images.s3.us-east-1.amazonaws.com/default-user-photo.jpg",
|
|
53
|
+
}}
|
|
54
|
+
style={MenuChannelMetaStyles.userImage}
|
|
55
|
+
/>
|
|
56
|
+
<View style={MenuChannelMetaStyles.nameSubcountContainer}>
|
|
57
|
+
<Text
|
|
58
|
+
style={[MenuChannelMetaStyles.userName, inlineStyles.userName]}
|
|
59
|
+
>
|
|
60
|
+
{userName || "Default Username"}
|
|
61
|
+
</Text>
|
|
62
|
+
<View style={MenuChannelMetaStyles.subCountContainer}>
|
|
63
|
+
<Text style={MenuChannelMetaStyles.subCount}>
|
|
64
|
+
{subscribersCount || "0"}
|
|
65
|
+
</Text>
|
|
66
|
+
<Text style={MenuChannelMetaStyles.subText}>Subscribers</Text>
|
|
67
|
+
</View>
|
|
68
|
+
</View>
|
|
69
|
+
</View>
|
|
70
|
+
<Pressable
|
|
71
|
+
style={[
|
|
72
|
+
MenuChannelMetaStyles.subscribeButtonContainer,
|
|
73
|
+
{ backgroundColor: "#303030" },
|
|
74
|
+
]}
|
|
75
|
+
>
|
|
76
|
+
<Text
|
|
77
|
+
style={[
|
|
78
|
+
MenuChannelMetaStyles.subscribeButtonText,
|
|
79
|
+
{ color: "#7f7f7f" },
|
|
80
|
+
]}
|
|
81
|
+
>
|
|
82
|
+
Subscribe
|
|
83
|
+
</Text>
|
|
84
|
+
</Pressable>
|
|
85
|
+
</View>
|
|
86
|
+
</View>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const inlineStyles = StyleSheet.create({
|
|
91
|
+
userName: {
|
|
92
|
+
width: "",
|
|
93
|
+
},
|
|
94
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { TouchableOpacity, View } from "react-native";
|
|
2
|
+
import { MenuInteractionStyles } from "../../styles/MenuInteractionStyles";
|
|
3
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
|
|
6
|
+
export const MenuInteraction = ({
|
|
7
|
+
containerStyles,
|
|
8
|
+
columnMainIconStyles,
|
|
9
|
+
pressed,
|
|
10
|
+
}) => {
|
|
11
|
+
return (
|
|
12
|
+
<View style={[MenuInteractionStyles.container, containerStyles]}>
|
|
13
|
+
<View
|
|
14
|
+
style={[MenuInteractionStyles.column_mainIcons, columnMainIconStyles]}
|
|
15
|
+
>
|
|
16
|
+
<TouchableOpacity>
|
|
17
|
+
<View style={MenuInteractionStyles.icon}>
|
|
18
|
+
<Ionicons name="arrow-redo" size={24} color="white" />
|
|
19
|
+
</View>
|
|
20
|
+
</TouchableOpacity>
|
|
21
|
+
|
|
22
|
+
<TouchableOpacity>
|
|
23
|
+
<View style={MenuInteractionStyles.icon}>
|
|
24
|
+
<Ionicons name="chatbubble-ellipses" size={24} color="white" />
|
|
25
|
+
</View>
|
|
26
|
+
</TouchableOpacity>
|
|
27
|
+
|
|
28
|
+
<TouchableOpacity>
|
|
29
|
+
<View style={MenuInteractionStyles.icon}>
|
|
30
|
+
<Ionicons name="repeat-outline" size={24} color="white" />
|
|
31
|
+
</View>
|
|
32
|
+
</TouchableOpacity>
|
|
33
|
+
|
|
34
|
+
<TouchableOpacity>
|
|
35
|
+
<View style={MenuInteractionStyles.icon}>
|
|
36
|
+
<Ionicons name="thumbs-up-outline" size={24} color="white" />
|
|
37
|
+
</View>
|
|
38
|
+
</TouchableOpacity>
|
|
39
|
+
|
|
40
|
+
<TouchableOpacity>
|
|
41
|
+
<View style={MenuInteractionStyles.icon}>
|
|
42
|
+
<Ionicons name="thumbs-down-outline" size={24} color="white" />
|
|
43
|
+
</View>
|
|
44
|
+
</TouchableOpacity>
|
|
45
|
+
</View>
|
|
46
|
+
|
|
47
|
+
<TouchableOpacity onPress={() => pressed(true)}>
|
|
48
|
+
<Ionicons name="ellipsis-vertical-outline" size={24} color="white" />
|
|
49
|
+
</TouchableOpacity>
|
|
50
|
+
</View>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TouchableOpacity, View } from "react-native";
|
|
2
|
+
import { menuNavStyles } from "../../styles/menuNavStyles";
|
|
3
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
4
|
+
|
|
5
|
+
export function MenuNav({
|
|
6
|
+
homeIcon,
|
|
7
|
+
wireIcon,
|
|
8
|
+
uploadIcon,
|
|
9
|
+
channelIcon,
|
|
10
|
+
profileIcon,
|
|
11
|
+
|
|
12
|
+
onPressHome,
|
|
13
|
+
onPressWire,
|
|
14
|
+
onPressUpload,
|
|
15
|
+
onPressChannel,
|
|
16
|
+
onPressProfile,
|
|
17
|
+
}) {
|
|
18
|
+
return (
|
|
19
|
+
<View style={menuNavStyles.container}>
|
|
20
|
+
<TouchableOpacity onPress={onPressHome}>{homeIcon}</TouchableOpacity>
|
|
21
|
+
<TouchableOpacity onPress={onPressWire}>{wireIcon}</TouchableOpacity>
|
|
22
|
+
<TouchableOpacity onPress={onPressUpload}>{uploadIcon}</TouchableOpacity>
|
|
23
|
+
<TouchableOpacity onPress={onPressChannel}>
|
|
24
|
+
{channelIcon}
|
|
25
|
+
</TouchableOpacity>
|
|
26
|
+
<TouchableOpacity onPress={onPressProfile}>
|
|
27
|
+
{profileIcon || (
|
|
28
|
+
<Ionicons name="person-outline" size={24} color="white" />
|
|
29
|
+
)}
|
|
30
|
+
</TouchableOpacity>
|
|
31
|
+
</View>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Text, View } from "react-native";
|
|
2
|
+
|
|
3
|
+
export function CustomizedTitle({
|
|
4
|
+
title,
|
|
5
|
+
fontSize,
|
|
6
|
+
fontFamily,
|
|
7
|
+
textColor,
|
|
8
|
+
style,
|
|
9
|
+
textStyle,
|
|
10
|
+
dateTextStyles,
|
|
11
|
+
}) {
|
|
12
|
+
const displayTitle =
|
|
13
|
+
title && title.length > 75
|
|
14
|
+
? title.slice(0, 75) + "…" // adds an ellipsis when truncated
|
|
15
|
+
: title || "Here is your default Title!";
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<View style={[{ width: "100%" }, style]}>
|
|
19
|
+
<Text
|
|
20
|
+
style={[
|
|
21
|
+
{
|
|
22
|
+
flexShrink: 1,
|
|
23
|
+
fontFamily: fontFamily,
|
|
24
|
+
fontSize: fontSize,
|
|
25
|
+
color: textColor,
|
|
26
|
+
flexWrap: "wrap",
|
|
27
|
+
},
|
|
28
|
+
textStyle,
|
|
29
|
+
]}
|
|
30
|
+
numberOfLines={2}
|
|
31
|
+
>
|
|
32
|
+
{displayTitle}
|
|
33
|
+
</Text>
|
|
34
|
+
</View>
|
|
35
|
+
);
|
|
36
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { InputField } from "./components/inputs/InputField";
|
|
2
|
+
export { MenuNav } from "./components/menus/MenuNav";
|
|
3
|
+
export { HeaderGlobal } from "./components/headers/HeaderGlobal";
|
|
4
|
+
export { MenuInteraction } from "./components/menus/MenuInteraction";
|
|
5
|
+
export { MenuChannelMeta } from "./components/menus/MenuChannelMeta";
|
|
6
|
+
export { InputComment } from "./components/inputs/InputComment.jsx";
|
|
7
|
+
export { DropDown } from "./components/dropdowns/DropDown.jsx";
|
|
8
|
+
export { CustomizedTitle } from "./components/titles/CustomizedTitle.jsx";
|
|
9
|
+
export { CustomizedButton } from "./components/buttons/CustomizableButton.jsx";
|
|
10
|
+
export { DateViews } from "./utils/DateViews.jsx";
|
|
11
|
+
export { default as normalizeUrl } from "./utils/normalizeUrl.js";
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Platform, StyleSheet, useWindowDimensions } from "react-native";
|
|
2
|
+
import { globalStyles } from "./globalStyles";
|
|
3
|
+
|
|
4
|
+
export const checkDimensions = () => {};
|
|
5
|
+
|
|
6
|
+
// checkDimensions();
|
|
7
|
+
|
|
8
|
+
export const MenuChannelMetaStyles = StyleSheet.create({
|
|
9
|
+
container: {
|
|
10
|
+
width: "auto",
|
|
11
|
+
marginRight: 12,
|
|
12
|
+
marginLeft: 12,
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
dateViewsContainer: {
|
|
16
|
+
width: "100%",
|
|
17
|
+
flexDirection: "row",
|
|
18
|
+
justifyContent: "space-between",
|
|
19
|
+
marginTop: 12,
|
|
20
|
+
paddingRight: 6,
|
|
21
|
+
paddingLeft: 6,
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
dateContainer: {
|
|
25
|
+
flexDirection: "row",
|
|
26
|
+
rowGap: 20,
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
dateIcon: {
|
|
30
|
+
marginRight: 8,
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
viewsContainer: {
|
|
34
|
+
flexDirection: "row",
|
|
35
|
+
alignItems: "center",
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
eyeIcon: {
|
|
39
|
+
marginRight: 8,
|
|
40
|
+
marginLeft: 8,
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
dateText: {
|
|
44
|
+
color: globalStyles.colors.colorPrimary600,
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
viewsText: {
|
|
48
|
+
color: globalStyles.colors.colorPrimary600,
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
channelMetaContainer: {
|
|
52
|
+
flexDirection: "row",
|
|
53
|
+
backgroundColor: globalStyles.colors.colorPrimary200,
|
|
54
|
+
// width: "100%",
|
|
55
|
+
// margin: 12,
|
|
56
|
+
padding: 12,
|
|
57
|
+
marginBottom: 6,
|
|
58
|
+
marginTop: 12,
|
|
59
|
+
borderRadius: globalStyles.borders.borderPrimary100,
|
|
60
|
+
justifyContent: "space-between",
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
channelMetaContainer_ColumnOne: {
|
|
64
|
+
flexDirection: "row",
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
userImage: {
|
|
68
|
+
width: 40,
|
|
69
|
+
height: 40,
|
|
70
|
+
borderRadius: globalStyles.borders.borderPrimary50,
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
nameSubcountContainer: {
|
|
74
|
+
flexDirection: "column",
|
|
75
|
+
paddingLeft: 12,
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
userName: {
|
|
79
|
+
color: "#fff",
|
|
80
|
+
fontSize: Platform.OS === "ios" ? 16 : 14,
|
|
81
|
+
paddingBottom: 4,
|
|
82
|
+
fontWeight: "bold",
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
subCountContainer: {
|
|
86
|
+
flexDirection: "row",
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
subCount: {
|
|
90
|
+
color: globalStyles.colors.colorPrimary600,
|
|
91
|
+
paddingRight: 6,
|
|
92
|
+
fontSize: 12,
|
|
93
|
+
fontWeight: "bold",
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
subText: {
|
|
97
|
+
color: "#fff",
|
|
98
|
+
fontSize: 12,
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
subscribeButtonContainer: {
|
|
102
|
+
backgroundColor: globalStyles.colors.colorPrimary600,
|
|
103
|
+
width: Platform.OS === "ios" ? 100 : 80,
|
|
104
|
+
borderRadius: globalStyles.borders.borderPrimary400,
|
|
105
|
+
alignItems: "center",
|
|
106
|
+
justifyContent: "center",
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
subscribeButtonText: {
|
|
110
|
+
color: "#fff",
|
|
111
|
+
fontWeight: "bold",
|
|
112
|
+
fontSize: Platform === "ios" ? 18 : 12,
|
|
113
|
+
},
|
|
114
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const MenuInteractionStyles = {
|
|
2
|
+
container: {
|
|
3
|
+
width: "100%",
|
|
4
|
+
height: 40,
|
|
5
|
+
// backgroundColor: "#be2e2eff",
|
|
6
|
+
flexDirection: "row",
|
|
7
|
+
justifyContent: "space-between",
|
|
8
|
+
alignItems: "center",
|
|
9
|
+
paddingRight: 16,
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
column_mainIcons: {
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
// width: "100%",
|
|
15
|
+
justifyContent: "space-evenly",
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
icon: {
|
|
19
|
+
paddingLeft: 18,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { globalStyles } from "./globalStyles";
|
|
2
|
+
|
|
3
|
+
export const commentInputStyles = {
|
|
4
|
+
container: {
|
|
5
|
+
flexDirection: "row",
|
|
6
|
+
width: "auto",
|
|
7
|
+
backgroundColor: globalStyles.colors.colorPrimary350,
|
|
8
|
+
borderRadius: globalStyles.borders.borderPrimary200,
|
|
9
|
+
height: 50,
|
|
10
|
+
|
|
11
|
+
justifyContent: "space-between",
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
|
|
14
|
+
justifySelf: "center",
|
|
15
|
+
|
|
16
|
+
marginRight: 12,
|
|
17
|
+
marginLeft: 12,
|
|
18
|
+
|
|
19
|
+
paddingLeft: 12,
|
|
20
|
+
paddingRight: 24,
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
input: {
|
|
24
|
+
// width: "100%",
|
|
25
|
+
|
|
26
|
+
paddingLeft: 8,
|
|
27
|
+
paddingRight: 8,
|
|
28
|
+
color: "#fff",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { globalStyles } from "./globalStyles";
|
|
3
|
+
|
|
4
|
+
export const customizableButtonStyles = StyleSheet.create({
|
|
5
|
+
container: {},
|
|
6
|
+
|
|
7
|
+
buttonContainer: {
|
|
8
|
+
height: 50,
|
|
9
|
+
width: "auto",
|
|
10
|
+
flexGrow: 1,
|
|
11
|
+
justifyContent: "center",
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
borderRadius: globalStyles.borders.borderPrimary100,
|
|
14
|
+
backgroundColor: "#fff",
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
buttonText: {
|
|
18
|
+
flexDirection: "row",
|
|
19
|
+
color: "#000",
|
|
20
|
+
fontSize: 16,
|
|
21
|
+
textAlign: "center",
|
|
22
|
+
textAlignVertical: "center",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { globalStyles } from "./globalStyles";
|
|
2
|
+
|
|
3
|
+
export const dropDownStyles = {
|
|
4
|
+
container: {
|
|
5
|
+
width: "auto",
|
|
6
|
+
// marginLeft: 16,
|
|
7
|
+
// marginRight: 16,
|
|
8
|
+
// justifyContent: "start",
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
picker: {
|
|
12
|
+
height: 40,
|
|
13
|
+
flex: 1,
|
|
14
|
+
|
|
15
|
+
// color: "#151515",
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
overlayStyle: {
|
|
19
|
+
backgroundColor: globalStyles.colors.colorPrimary50,
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
optionTextStyle: {
|
|
23
|
+
color: "#fff",
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
optionContainerStyle: {
|
|
27
|
+
backgroundColor: globalStyles.colors.colorPrimary200,
|
|
28
|
+
borderWidth: 1,
|
|
29
|
+
borderRadius: globalStyles.borders.borderPrimary200,
|
|
30
|
+
justifyContent: "space-between",
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
cancelContainerStyle: {
|
|
34
|
+
backgroundColor: "#fff",
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
dropDownContainer: {
|
|
38
|
+
flexDirection: "row",
|
|
39
|
+
width: "100%",
|
|
40
|
+
justifyContent: "space-between",
|
|
41
|
+
// borderWidth: 1,
|
|
42
|
+
borderRadius: globalStyles.borders.borderPrimary200,
|
|
43
|
+
height: 50,
|
|
44
|
+
alignItems: "center",
|
|
45
|
+
paddingRight: 12,
|
|
46
|
+
paddingLeft: 12,
|
|
47
|
+
backgroundColor: globalStyles.colors.colorPrimary200,
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
dropDownText: {
|
|
51
|
+
color: "#fff",
|
|
52
|
+
paddingLeft: 12,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const globalStyles = {
|
|
2
|
+
colors: {
|
|
3
|
+
colorPrimary50: "rgba(21, 21, 21, .7)",
|
|
4
|
+
colorPrimary100: "#151515",
|
|
5
|
+
|
|
6
|
+
colorPrimary200: "#252525",
|
|
7
|
+
colorPrimary250: "rgba(37, 37, 37, .9)",
|
|
8
|
+
|
|
9
|
+
colorPrimary300: "#3C3C3C",
|
|
10
|
+
colorPrimary350: "rgba(60,60,60,.2)",
|
|
11
|
+
|
|
12
|
+
colorPrimary400: "#7F7F7F",
|
|
13
|
+
|
|
14
|
+
colorPrimary500: "#D3D3D3",
|
|
15
|
+
|
|
16
|
+
colorPrimary600: "#ff6600ff",
|
|
17
|
+
|
|
18
|
+
colorPrimary700: "#FF8800",
|
|
19
|
+
},
|
|
20
|
+
borders: {
|
|
21
|
+
borderPrimary50: 8,
|
|
22
|
+
borderPrimary100: 10,
|
|
23
|
+
borderPrimary200: 12,
|
|
24
|
+
borderPrimary300: 15,
|
|
25
|
+
borderPrimary400: 30,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const headerGlobalStyles = {
|
|
2
|
+
container: {
|
|
3
|
+
height: 75,
|
|
4
|
+
width: "100%",
|
|
5
|
+
// backgroundColor: "#fffffff",
|
|
6
|
+
flexDirection: "row",
|
|
7
|
+
justifyContent: "space-between",
|
|
8
|
+
alignItems: "center",
|
|
9
|
+
marginTop: -5,
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
iconsContainer: {
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
icons: {
|
|
17
|
+
paddingRight: 20,
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
image: {
|
|
21
|
+
width: 120,
|
|
22
|
+
height: 120,
|
|
23
|
+
resizeMode: "contain",
|
|
24
|
+
marginLeft: 24,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const inputStyles = {
|
|
2
|
+
label: {
|
|
3
|
+
fontSize: 14,
|
|
4
|
+
marginBottom: 5,
|
|
5
|
+
color: "#333",
|
|
6
|
+
},
|
|
7
|
+
inputWrapper: {
|
|
8
|
+
flexDirection: "row",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
|
|
11
|
+
borderRadius: 8,
|
|
12
|
+
borderWidth: 1,
|
|
13
|
+
borderColor: "rgba(37, 37, 37, 0)",
|
|
14
|
+
// backgroundColor: "#fff",
|
|
15
|
+
// width: 320,
|
|
16
|
+
overflow: "hidden", // necessary for clipping children
|
|
17
|
+
},
|
|
18
|
+
input: {
|
|
19
|
+
// height: 50,
|
|
20
|
+
width: "auto",
|
|
21
|
+
paddingLeft: 14,
|
|
22
|
+
paddingRight: 14,
|
|
23
|
+
fontFamily: "Inter",
|
|
24
|
+
fontWeight: "700",
|
|
25
|
+
color: "#3c3c3c",
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
icon: {
|
|
29
|
+
marginHorizontal: 5,
|
|
30
|
+
},
|
|
31
|
+
error: {
|
|
32
|
+
color: "red",
|
|
33
|
+
fontSize: 12,
|
|
34
|
+
marginTop: 4,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { globalStyles } from "./globalStyles";
|
|
3
|
+
|
|
4
|
+
export const menuNavStyles = StyleSheet.create({
|
|
5
|
+
container: {
|
|
6
|
+
flexDirection: "row",
|
|
7
|
+
justifyContent: "space-evenly",
|
|
8
|
+
|
|
9
|
+
backgroundColor: globalStyles.colors.colorPrimary200,
|
|
10
|
+
|
|
11
|
+
height: 60,
|
|
12
|
+
width: "80%",
|
|
13
|
+
|
|
14
|
+
alignSelf: "center",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
|
|
17
|
+
borderRadius: globalStyles.borders.borderPrimary300,
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
uploadIcon: {
|
|
21
|
+
color: globalStyles.colors.colorPrimary600,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { StyleSheet, Text, View } from "react-native";
|
|
2
|
+
import { globalStyles } from "../styles/globalStyles";
|
|
3
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
4
|
+
|
|
5
|
+
export function DateViews({
|
|
6
|
+
timeAgo,
|
|
7
|
+
viewsText,
|
|
8
|
+
containerStyles,
|
|
9
|
+
dateTextStyles,
|
|
10
|
+
viewsTextStyles,
|
|
11
|
+
dateContainerStyles,
|
|
12
|
+
}) {
|
|
13
|
+
return (
|
|
14
|
+
<View style={[styles.dateViewsContainer, containerStyles]}>
|
|
15
|
+
<View style={[styles.dateContainer, dateContainerStyles]}>
|
|
16
|
+
<View style={[styles.dateIcon]}>
|
|
17
|
+
<Ionicons name="calendar-clear-outline" size={16} color="white" />
|
|
18
|
+
</View>
|
|
19
|
+
<Text style={[styles.dateText, dateTextStyles]}>
|
|
20
|
+
{timeAgo || "14 Hours Ago"}
|
|
21
|
+
</Text>
|
|
22
|
+
</View>
|
|
23
|
+
<View style={styles.viewsContainer}>
|
|
24
|
+
<View style={[styles.eyeIcon]}>
|
|
25
|
+
<Ionicons name="eye-outline" size={16} color="white" />
|
|
26
|
+
</View>
|
|
27
|
+
<Text style={[styles.viewsText, viewsTextStyles]}>
|
|
28
|
+
{viewsText || "123.400"}
|
|
29
|
+
<Text style={{ color: "white" }}>{" Views"}</Text>
|
|
30
|
+
</Text>
|
|
31
|
+
</View>
|
|
32
|
+
</View>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const styles = StyleSheet.create({
|
|
37
|
+
dateViewsContainer: {
|
|
38
|
+
width: "100%",
|
|
39
|
+
height: 30,
|
|
40
|
+
flexDirection: "row",
|
|
41
|
+
justifyContent: "space-between",
|
|
42
|
+
marginTop: 12,
|
|
43
|
+
paddingRight: 8,
|
|
44
|
+
// paddingLeft: 8,
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
dateContainer: {
|
|
48
|
+
flexDirection: "row",
|
|
49
|
+
rowGap: 20,
|
|
50
|
+
paddingRight: 16,
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
dateIcon: {
|
|
54
|
+
marginRight: 8,
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
viewsContainer: {
|
|
58
|
+
flexDirection: "row",
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
eyeIcon: {
|
|
62
|
+
marginRight: 8,
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
dateText: {
|
|
66
|
+
color: globalStyles.colors.colorPrimary600,
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
viewsText: {
|
|
70
|
+
color: globalStyles.colors.colorPrimary600,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const normalizeUrl = url => {
|
|
2
|
+
if (!url) return null;
|
|
3
|
+
|
|
4
|
+
// If it already starts with http:// or https://, return as-is
|
|
5
|
+
if (/^https?:\/\//i.test(url)) return url;
|
|
6
|
+
|
|
7
|
+
// If it looks like a domain (e.g. google.com or mysite.org)
|
|
8
|
+
if (/^[\w.-]+\.[a-z]{2,}$/i.test(url)) return `https://${url}`;
|
|
9
|
+
|
|
10
|
+
// Otherwise, not a valid link — return null or handle differently
|
|
11
|
+
return null;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default normalizeUrl;
|
|
File without changes
|