@reillymc/react-native-components 0.10.13 → 0.10.15
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/components/AlertIndicator.js +1 -1
- package/lib/components/Avatar.js +1 -1
- package/lib/components/Panel.js +1 -1
- package/lib/components/SwipeAction.js +1 -1
- package/lib/components/Toast.js +1 -1
- package/lib/components/action/Action.js +1 -1
- package/lib/components/action/ActionBase.js +1 -1
- package/lib/components/action/IconAction.js +1 -1
- package/lib/components/action/IconActionBase.js +1 -1
- package/lib/components/action/index.js +1 -1
- package/lib/components/button/Button.js +1 -1
- package/lib/components/button/ButtonBase.js +1 -1
- package/lib/components/button/IconButton.js +1 -1
- package/lib/components/button/IconButtonBase.js +1 -1
- package/lib/components/button/index.js +1 -1
- package/lib/components/container/CollapsibleContainer.js +1 -1
- package/lib/components/container/FloatingContainer.js +1 -1
- package/lib/components/container/FloatingContainer.web.js +1 -1
- package/lib/components/container/FormContainer.js +1 -1
- package/lib/components/container/FormRow.js +1 -1
- package/lib/components/container/SwipeableContainer.js +1 -1
- package/lib/components/container/index.js +1 -1
- package/lib/components/icon/Icon.js +1 -1
- package/lib/components/icon/IconBase.js +1 -1
- package/lib/components/icon/InteractiveIcon.js +1 -1
- package/lib/components/icon/componentWithIcon.js +1 -1
- package/lib/components/icon/index.js +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/input/CounterInput.js +1 -1
- package/lib/components/input/DropdownInput.js +1 -1
- package/lib/components/input/DropdownInputBase.js +1 -1
- package/lib/components/input/InputAction.js +1 -1
- package/lib/components/input/InputBase.js +1 -1
- package/lib/components/input/InputRowContainer.js +1 -1
- package/lib/components/input/InputScaffold.js +1 -1
- package/lib/components/input/NumberInput.js +1 -1
- package/lib/components/input/NumberInputBase.js +1 -1
- package/lib/components/input/RatingInput.js +1 -1
- package/lib/components/input/SelectionInput.js +1 -1
- package/lib/components/input/TextInput.js +1 -1
- package/lib/components/input/TimeInput.js +1 -1
- package/lib/components/input/ToggleInput.js +1 -1
- package/lib/components/input/index.js +1 -1
- package/lib/components/listItem/ListItem.js +1 -1
- package/lib/components/listItem/ListItemAlert.js +1 -1
- package/lib/components/listItem/ListItemAvatar.js +1 -1
- package/lib/components/listItem/ListItemFooter.js +1 -1
- package/lib/components/listItem/ListItemRow.js +1 -1
- package/lib/components/listItem/index.js +1 -1
- package/lib/components/menu/Menu.js +1 -1
- package/lib/components/menu/MenuItem.js +1 -1
- package/lib/components/menu/index.js +1 -1
- package/lib/components/rating/Rating.js +1 -0
- package/lib/components/rating/index.js +1 -0
- package/lib/components/rating/ratingUtils.js +1 -0
- package/lib/components/tag/Tag.js +1 -1
- package/lib/components/tag/TagIcon.js +1 -1
- package/lib/components/tag/index.js +1 -1
- package/lib/components/text/HighlightedText.js +1 -1
- package/lib/components/text/InteractiveText.js +1 -1
- package/lib/components/text/Text.js +1 -1
- package/lib/components/text/index.js +1 -1
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/useForwardedRef.js +1 -1
- package/lib/hooks/useKeyboardHeight.js +1 -1
- package/lib/hooks/usePersistentKeyboardHeight.js +1 -1
- package/lib/hooks/useTheme.js +1 -1
- package/lib/hooks/useThemedStyles.js +1 -1
- package/lib/icons/base.js +1 -1
- package/lib/icons/index.js +1 -1
- package/lib/icons/octicons.js +1 -1
- package/lib/icons/stars/StarBorder.js +1 -1
- package/lib/icons/stars/StarFull.js +1 -1
- package/lib/icons/stars/StarHalf.js +1 -1
- package/lib/icons/stars/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/providers/ThemeContext.js +1 -0
- package/lib/providers/ThemeProvider.js +1 -1
- package/lib/providers/index.js +1 -1
- package/lib/theme/icons.js +1 -1
- package/lib/theme/index.js +1 -1
- package/lib/theme/styles.js +1 -1
- package/lib/theme/theme.js +1 -1
- package/lib/types/components/container/FloatingContainer.web.d.ts +17 -0
- package/lib/types/components/container/FloatingContainer.web.d.ts.map +1 -0
- package/lib/types/components/index.d.ts +1 -1
- package/lib/types/components/input/RatingInput.d.ts +1 -1
- package/lib/types/components/{Rating.d.ts → rating/Rating.d.ts} +2 -5
- package/lib/types/components/rating/Rating.d.ts.map +1 -0
- package/lib/types/components/rating/index.d.ts +3 -0
- package/lib/types/components/rating/index.d.ts.map +1 -0
- package/lib/types/components/rating/ratingUtils.d.ts +5 -0
- package/lib/types/components/rating/ratingUtils.d.ts.map +1 -0
- package/lib/types/icons/base.d.ts +12 -1
- package/lib/types/icons/base.d.ts.map +1 -1
- package/lib/types/icons/index.d.ts +1 -1
- package/lib/types/icons/index.d.ts.map +1 -1
- package/lib/types/providers/ThemeContext.d.ts +8 -0
- package/lib/types/providers/ThemeContext.d.ts.map +1 -0
- package/lib/types/providers/ThemeProvider.d.ts +1 -7
- package/lib/types/providers/ThemeProvider.d.ts.map +1 -1
- package/lib/types/providers/index.d.ts +2 -1
- package/lib/types/providers/index.d.ts.map +1 -1
- package/lib/types/theme/icons.d.ts +3 -3
- package/lib/types/theme/icons.d.ts.map +1 -1
- package/package.json +6 -5
- package/lib/components/Rating.js +0 -1
- package/lib/types/components/Rating.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{c as _c}from"react/compiler-runtime";import{useMemo}from"react";import{MergeStyles}from"../theme";import{useTheme}from"./useTheme";function hasKey(obj,key){return key in obj;}export var useThemedStyles=(componentName,generator,...t0)=>{var $=_c(15);var t1=t0[0];var t2;if($[0]!==t1){t2=t1===undefined?{}:t1;$[0]=t1;$[1]=t2;}else{t2=$[1];}var options=t2;var componentProps="props"in options?options.props:undefined;var componentStyles="styles"in options?options.styles:undefined;var _useTheme=useTheme(),theme=_useTheme.theme,originalStyles=_useTheme.styles,icons=_useTheme.icons;var generated;var t3;if($[2]!==componentName||$[3]!==componentProps||$[4]!==componentStyles||$[5]!==generator||$[6]!==icons||$[7]!==options||$[8]!==originalStyles||$[9]!==theme){var styles=MergeStyles(originalStyles,componentStyles);generated="props"in options?generator({theme,styles,icons},componentProps):generator({theme,styles,icons});t3=hasKey(styles,componentName)?hasKey(icons,componentName)?{style:styles[componentName],icons:icons[componentName]}:{style:styles[componentName]}:hasKey(icons,componentName)?{icons:icons[componentName]}:{};$[2]=componentName;$[3]=componentProps;$[4]=componentStyles;$[5]=generator;$[6]=icons;$[7]=options;$[8]=originalStyles;$[9]=theme;$[10]=generated;$[11]=t3;}else{generated=$[10];t3=$[11];}var componentResult=t3;var t4;if($[12]!==componentResult||$[13]!==generated){t4=[generated,componentResult];$[12]=componentResult;$[13]=generated;$[14]=t4;}else{t4=$[14];}var themedStyles=t4;return themedStyles;};export var useThemedStylesExternal=(generator,...t0)=>{var $=_c(10);var t1=t0[0];var t2;if($[0]!==t1){t2=t1===undefined?{}:t1;$[0]=t1;$[1]=t2;}else{t2=$[1];}var options=t2;var componentProps="props"in options?options.props:undefined;var componentStyles="styles"in options?options.styles:undefined;var _useTheme2=useTheme(),theme=_useTheme2.theme,originalStyles=_useTheme2.styles,icons=_useTheme2.icons;var t3;if($[2]!==componentProps||$[3]!==componentStyles||$[4]!==generator||$[5]!==icons||$[6]!==options||$[7]!==originalStyles||$[8]!==theme){var styles=MergeStyles(originalStyles,componentStyles);t3="props"in options?generator({theme,styles,icons},componentProps):generator({theme,styles,icons});$[2]=componentProps;$[3]=componentStyles;$[4]=generator;$[5]=icons;$[6]=options;$[7]=originalStyles;$[8]=theme;$[9]=t3;}else{t3=$[9];}var generated=t3;var themedStyles=generated;return themedStyles;};export var useStyles=componentStyles=>{var $=_c(3);var _useTheme3=useTheme(),originalStyles=_useTheme3.styles;var t0;if($[0]!==componentStyles||$[1]!==originalStyles){t0=MergeStyles(originalStyles,componentStyles);$[0]=componentStyles;$[1]=originalStyles;$[2]=t0;}else{t0=$[2];}var themedStyles=t0;return themedStyles;};
|
package/lib/icons/base.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{};
|
package/lib/icons/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{Octicons}from"./octicons";export{Stars}from"./stars";
|
package/lib/icons/octicons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{Octicons}from"@react-native-vector-icons/octicons";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/stars/StarBorder.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx}from"react/jsx-runtime";export var StarBorder=t0=>{var $=_c(5);var size=t0.size,color=t0.color;var t1;if($[0]!==color){t1=_jsx(Path,{fill:color,d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"});$[0]=color;$[1]=t1;}else{t1=$[1];}var t2;if($[2]!==size||$[3]!==t1){t2=_jsx(Svg,{height:size,viewBox:"0 0 24 24",width:size,children:t1});$[2]=size;$[3]=t1;$[4]=t2;}else{t2=$[4];}return t2;};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/stars/StarFull.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var StarFull=t0=>{var $=_c(7);var size=t0.size,color=t0.color;var t1;var t2;if($[0]===Symbol.for("react.memo_cache_sentinel")){t1=_jsx(Path,{d:"M0 0h24v24H0z",fill:"none"});t2=_jsx(Path,{d:"M0 0h24v24H0z",fill:"none"});$[0]=t1;$[1]=t2;}else{t1=$[0];t2=$[1];}var t3;if($[2]!==color){t3=_jsx(Path,{fill:color,d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"});$[2]=color;$[3]=t3;}else{t3=$[3];}var t4;if($[4]!==size||$[5]!==t3){t4=_jsxs(Svg,{height:size,viewBox:"0 0 24 24",width:size,children:[t1,t2,t3]});$[4]=size;$[5]=t3;$[6]=t4;}else{t4=$[6];}return t4;};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/stars/StarHalf.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path,Rect}from"react-native-svg";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var StarHalf=t0=>{var $=_c(6);var size=t0.size,color=t0.color;var t1;if($[0]===Symbol.for("react.memo_cache_sentinel")){t1=_jsx(Rect,{fill:"none",height:"24",width:"24",x:"0"});$[0]=t1;}else{t1=$[0];}var t2;if($[1]!==color){t2=_jsx(Path,{fill:color,d:"M22,9.24l-7.19-0.62L12,2L9.19,8.63L2,9.24l5.46,4.73L5.82,21L12,17.27L18.18,21l-1.63-7.03L22,9.24z M12,15.4V6.1 l1.71,4.04l4.38,0.38l-3.32,2.88l1,4.28L12,15.4z"});$[1]=color;$[2]=t2;}else{t2=$[2];}var t3;if($[3]!==size||$[4]!==t2){t3=_jsxs(Svg,{height:size,viewBox:"0 0 24 24",width:size,children:[t1,t2]});$[3]=size;$[4]=t2;$[5]=t3;}else{t3=$[5];}return t3;};
|
package/lib/icons/stars/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/stars/index.tsx";import{c as _c}from"react/compiler-runtime";import{StarBorder}from"./StarBorder";import{StarFull}from"./StarFull";import{StarHalf}from"./StarHalf";import{jsx as _jsx}from"react/jsx-runtime";var glyphMap={empty:StarBorder,full:StarFull,half:StarHalf};export var Stars=t0=>{var $=_c(7);var name=t0.name,color=t0.color,size=t0.size;var Glyph=glyphMap[name];if(!Glyph){var _t;if($[0]!==color||$[1]!==size){_t=_jsx(StarBorder,{color:color,size:size});$[0]=color;$[1]=size;$[2]=_t;}else{_t=$[2];}return _t;}var t1;if($[3]!==Glyph||$[4]!==color||$[5]!==size){t1=_jsx(Glyph,{color:color,size:size});$[3]=Glyph;$[4]=color;$[5]=size;$[6]=t1;}else{t1=$[6];}return t1;};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export*from"./components";export{useTheme,useThemedStylesExternal as useThemedStyles}from"./hooks";export{Stars}from"./icons";export*from"./providers";export*from"./theme";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";import{createDefaultStyles,DefaultIcons,DefaultTheme}from"../theme";export var ThemeContext=createContext({theme:DefaultTheme,styles:createDefaultStyles(DefaultTheme),icons:DefaultIcons});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/providers/ThemeProvider.tsx";import{c as _c}from"react/compiler-runtime";import{createDefaultStyles,DefaultIcons,DefaultTheme,MergeTheme}from"../theme";import{ThemeContext}from"./ThemeContext";import{jsx as _jsx}from"react/jsx-runtime";export var ThemeProvider=t0=>{var $=_c(11);var initialTheme=t0.theme,initialStyles=t0.styles,initialIcons=t0.icons,children=t0.children;var t1;var theme;if($[0]!==initialStyles||$[1]!==initialTheme){theme=MergeTheme(DefaultTheme,initialTheme);t1=initialStyles??createDefaultStyles(theme);$[0]=initialStyles;$[1]=initialTheme;$[2]=t1;$[3]=theme;}else{t1=$[2];theme=$[3];}var styles=t1;var icons=initialIcons??DefaultIcons;var t2;if($[4]!==icons||$[5]!==styles||$[6]!==theme){t2={theme,styles,icons};$[4]=icons;$[5]=styles;$[6]=theme;$[7]=t2;}else{t2=$[7];}var t3;if($[8]!==children||$[9]!==t2){t3=_jsx(ThemeContext.Provider,{value:t2,children:children});$[8]=children;$[9]=t2;$[10]=t3;}else{t3=$[10];}return t3;};
|
package/lib/providers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{ThemeContext}from"./ThemeContext";export{ThemeProvider}from"./ThemeProvider";
|
package/lib/theme/icons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Octicons,Stars}from"../icons";export var createIcons=config=>config;export var DefaultIcons=createIcons({inputScaffold:{error:{iconSet:Octicons,iconName:"exclamation"}},counterInput:{decrease:{iconSet:Octicons,iconName:"dash"},increase:{iconSet:Octicons,iconName:"plus"}},numberInput:{number:{iconSet:Octicons,iconName:"infinity"},fraction:{iconSet:Octicons,iconName:"number"},range:{iconSet:Octicons,iconName:"arrow-both"}},selectionInput:{showOptions:{iconSet:Octicons,iconName:"chevron-down"}},timeInput:{time:{iconSet:Octicons,iconName:"clock"}},toggleInput:{outline:{iconSet:Octicons,iconName:"circle"}},rating:{empty:{iconSet:Stars,iconName:"empty"},full:{iconSet:Stars,iconName:"full"},half:{iconSet:Stars,iconName:"half"}},ratingInput:{empty:{iconSet:Stars,iconName:"empty"},full:{iconSet:Stars,iconName:"full"},half:{iconSet:Stars,iconName:"half"}}});
|
package/lib/theme/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{createIcons,DefaultIcons}from"./icons";export{createDefaultStyles,MergeStyles}from"./styles";export{DefaultTheme,MergeTheme}from"./theme";
|
package/lib/theme/styles.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import merge from"lodash.merge";export var createDefaultStyles=({border,color,font,spacing})=>{var interactiveText={color:{enabled:color.primary,pressed:color.primaryLight,disabled:color.primaryLight}};var highlightedText={highlightedWeight:{body:"800",caption:"800",display:"800",heading:"800",label:"800",title:"800"}};var iconBase={color:color.textPrimary,size:20};var icon={color:color.textPrimary,size:{small:16,medium:iconBase.size,large:24}};var interactiveIcon={size:iconBase.size,color:{enabled:color.primary,pressed:color.primaryLight,disabled:color.primaryLight}};var action={label:{color:{primary:{enabled:color.primary,pressed:color.primaryLight,disabled:color.primaryLight},secondary:{enabled:color.secondary,pressed:color.secondaryHighlight,disabled:color.secondaryHighlight},destructive:{enabled:color.destructive,pressed:color.destructiveHighlight,disabled:color.destructiveHighlight}}}};var iconActionBase={gap:spacing.small,icon:interactiveText,text:interactiveText};var iconAction={icon:action.label,text:action.label};var buttonBase={height:42,width:{medium:"50%"},borderRadius:border.radius.regular,paddingHorizontal:spacing.medium,paddingVertical:spacing.small,backgroundColor:{enabled:color.primary,pressed:color.primaryLight,disabled:color.primaryLight}};var button={container:{borderRadius:buttonBase.borderRadius,color:{secondary:{enabled:color.textOnPrimary,disabled:color.textOnPrimary,pressed:color.textOnPrimary},primary:{enabled:color.primary,disabled:color.primaryLight,pressed:color.primaryLight},destructive:{enabled:color.textOnDestructive,disabled:color.textOnDestructive,pressed:color.textOnDestructive}}},label:{color:{secondary:{enabled:color.primary,disabled:color.primaryLight,pressed:color.primaryLight},primary:{enabled:color.textOnPrimary,disabled:color.textOnPrimary,pressed:color.textOnPrimary},destructive:{enabled:color.destructive,disabled:color.destructiveHighlight,pressed:color.destructiveHighlight}}}};var iconButtonBase={container:{padding:4,size:48,backgroundColor:{enabled:color.inputBackground,disabled:color.inputBackgroundDisabled,pressed:color.inputBackground},borderRadius:"50%"},icon:interactiveIcon};var iconButton={container:{size:icon.size.medium+spacing.small,backgroundColor:{primary:{enabled:color.background,disabled:color.backgroundHighlight,pressed:color.backgroundHighlight},secondary:{enabled:color.background,disabled:color.backgroundHighlight,pressed:color.backgroundHighlight},destructive:{enabled:color.destructive,disabled:color.destructiveHighlight,pressed:color.destructiveHighlight}}},icon:{color:{...action.label.color,destructive:{enabled:color.textOnDestructive,pressed:color.textOnDestructive,disabled:color.textOnDestructive}}}};var inputBase={container:{height:{regular:48,compact:36},borderRadius:border.radius.regular,padding:spacing.small,backgroundColor:{enabled:color.inputBackground,disabled:color.inputBackgroundDisabled}},text:{fontSize:font.size.regular,fontFamily:font.family.sans,color:{enabled:color.textPrimary,disabled:color.textSecondary},placeholderColor:color.textSecondary}};var inputScaffold={gap:spacing.tiny,mandatoryIndicator:{color:color.primaryDark},helpText:{gap:spacing.tiny}};var inputAction={icon:{color:action.label.color.secondary}};var selectionInput={container:{backgroundColor:{...inputBase.container.backgroundColor,pressed:color.backgroundHighlight}},selectionContainer:{gap:spacing.tiny},icon:inputAction.icon};var swipeAction={width:75};var floatingContainer={parentMargin:spacing.small};var menu={backgroundColor:color.inputBackground,borderRadius:inputBase.container.borderRadius,gap:spacing.tiny,padding:spacing.tiny,parentMargin:spacing.medium};var menuItem={paddingHorizontal:inputBase.container.padding-menu.padding,paddingVertical:spacing.small+spacing.tiny,borderRadius:menu.borderRadius/2};var rating={gap:spacing.tiny,icon:{color:{empty:color.primaryLight,half:color.primary,full:color.primary},size:icon.size.large}};var alertIndicator={size:28,borderRadius:14,backgroundColor:{primary:color.primary,secondary:color.secondary},color:{primary:color.textOnPrimary,secondary:color.textOnSecondary}};var tag={borderRadius:border.radius.loose,internalSpacing:spacing.small,padding:spacing.small};var styles={interactiveText,iconBase,icon,interactiveIcon,action,iconActionBase,iconAction,buttonBase,button,iconButtonBase,iconButton,inputBase,inputScaffold,inputAction,selectionInput,ratingInput:null,swipeAction,floatingContainer,menu,menuItem,rating,alertIndicator,tag,common:{action:{fontSize:{...font.size}}},text:{color:color.textPrimary,font:{caption:{family:font.family.sans,weight:"200",size:font.size.small},body:{family:font.family.sans,weight:"400",size:font.size.regular},label:{family:font.family.sans,weight:"500",size:font.size.emphasised},heading:{family:font.family.sans,weight:"600",size:font.size.large},title:{family:font.family.sans,weight:"800",size:font.size.xLarge},display:{family:font.family.sans,weight:"800",size:font.size.xxLarge}}},highlightedText,dropdownInput:{panelGap:4},toggleInput:{indicator:{size:{compact:icon.size.small,regular:icon.size.medium},color:{selected:action.label.color,deselected:{enabled:color.border,disabled:color.border,pressed:color.border}}},label:{gap:spacing.small}},listItem:{spacingMargin:12,internalSpacing:16,borderRadius:border.radius.loose,contentItemSpacing:8,contentItemTopMargin:4},avatar:{size:{large:80,regular:40,small:32},initials:{fontWeight:"600",fontSize:{large:font.size.xxLarge,regular:font.size.xLarge,small:font.size.large}},label:{fontSize:font.size.tiny,fontWeight:"500"},colors:[{background:color.red,foreground:color.textPrimary},{background:color.orange,foreground:color.textPrimary},{background:color.green,foreground:color.textPrimary},{background:color.blue,foreground:color.textPrimary},{background:color.purple,foreground:color.textPrimary}]},toast:{horizontalInset:spacing.pageHorizontal+spacing.medium,bottomInset:100}};return styles;};export var MergeStyles=(styles,overrides={})=>merge({},styles,overrides);
|
package/lib/theme/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export var DefaultTheme={font:{family:{sans:"Helvetica",mono:"Helvetica"},size:{tiny:12,small:14,regular:16,emphasised:18,large:20,xLarge:24,xxLarge:32}},color:{primary:"#FF4242",primaryDark:"#ff8585",primaryLight:"#ffbdbd",secondary:"#12263A",secondaryHighlight:"#718191",secondaryDisabled:"#B5EAD7",tertiary:"#06bcc1",destructive:"#ff382e",destructiveHighlight:"#ff9e96",light:"#F4EDEA",white:"#ffffff",black:"#000000",red:"#FF9AA2",orange:"#FFDAC1",green:"#E2F0CB",blue:"#B5EAD7",purple:"#C7CEEA",textPrimary:"#12263A",textSecondary:"#22476D",textHighlight:"#30669c",textInverted:"#F4EDEA",textDisabled:"#B5EAD7",textOnPrimary:"#F4EDEA",textOnSecondary:"#F4EDEA",textOnDestructive:"#F4EDEA",background:"#F4EDEA",backgroundHighlight:"#f7f3f2",foreground:"#ffffff",foregroundHighlight:"#B5EAD7",backgroundOverlay:"#000",shadow:"#555",border:"#E2E8F0",inputBackground:"#e4d8d4",inputBackgroundDisabled:"#f0e9e2ff",inputText:"#12263A",pressOverlay:"rgba(0, 0, 0, 0.1)",alert:"#d63333",error:"#d63333",success:"#4ed633",warning:"#f5c61d"},spacing:{screenContentTop:0,pageHorizontal:16,pageBottom:80,pageTop:16,navigationActionHorizontal:0,large:24,medium:16,small:8,tiny:4},border:{radius:{tight:4,regular:8,loose:16},width:{thick:4,regular:2,thin:1}}};export var MergeTheme=(first,second)=>({...DefaultTheme,...first,...second,color:{...DefaultTheme.color,...first.color,...second?.color},font:{...DefaultTheme.font,...first.font,...second?.font,family:{...DefaultTheme.font.family,...first.font?.family,...second?.font?.family},size:{...DefaultTheme.font.size,...first.font?.size,...second?.font?.size}},spacing:{...DefaultTheme.spacing,...first.spacing,...second?.spacing},border:{...DefaultTheme.border,...first.border,...second?.border,radius:{...DefaultTheme.border.radius,...first.border?.radius,...second?.border?.radius},width:{...DefaultTheme.border.width,...first.border?.width,...second?.border?.width}}});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type FC, type ReactNode, type RefObject } from "react";
|
|
2
|
+
import { type StyleProp, type TextInput, type ViewStyle } from "react-native";
|
|
3
|
+
export type FloatingContainerStyles = {
|
|
4
|
+
parentMargin: number;
|
|
5
|
+
};
|
|
6
|
+
type PanelLayout = {
|
|
7
|
+
parentHeight: number;
|
|
8
|
+
inverted: boolean;
|
|
9
|
+
};
|
|
10
|
+
export interface FloatingContainerProps {
|
|
11
|
+
parentRef: RefObject<TextInput | null>;
|
|
12
|
+
children?: ReactNode | ((panelLayout: PanelLayout) => ReactNode);
|
|
13
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
14
|
+
}
|
|
15
|
+
export declare const FloatingContainer: FC<FloatingContainerProps>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=FloatingContainer.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatingContainer.web.d.ts","sourceRoot":"","sources":["../../../../src/components/container/FloatingContainer.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,EAAE,EACP,KAAK,SAAS,EACd,KAAK,SAAS,EAGjB,MAAM,OAAO,CAAC;AACf,OAAO,EAEH,KAAK,SAAS,EAEd,KAAK,SAAS,EAGd,KAAK,SAAS,EACjB,MAAM,cAAc,CAAC;AAStB,MAAM,MAAM,uBAAuB,GAAG;IAClC,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,WAAW,GAAG;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACnC,SAAS,EAAE,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,KAAK,SAAS,CAAC,CAAC;IACjE,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAiDxD,CAAC"}
|
|
@@ -14,7 +14,7 @@ export { ListItem, ListItemAlert, ListItemAvatar, ListItemFooter, type ListItemP
|
|
|
14
14
|
export type { MenuItemProps, MenuItemStyles, MenuProps, MenuStyles, } from "./menu";
|
|
15
15
|
export { Menu, MenuItem, } from "./menu";
|
|
16
16
|
export { Panel, type PanelProps } from "./Panel";
|
|
17
|
-
export { getRatingIcons, Rating, type RatingIcons, type RatingProps, type RatingStyles, ratingToValue, valueToRating, } from "./
|
|
17
|
+
export { getRatingIcons, Rating, type RatingIcons, type RatingProps, type RatingStyles, ratingToValue, valueToRating, } from "./rating";
|
|
18
18
|
export { SwipeAction, type SwipeActionProps, type SwipeActionStyles, } from "./SwipeAction";
|
|
19
19
|
export { Toast, type ToastProps, type ToastStyles } from "./Toast";
|
|
20
20
|
export { Tag, TagIcon, type TagProps, type TagStyles } from "./tag";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FC } from "react";
|
|
2
2
|
import type { ComponentIconAssets } from "../../theme";
|
|
3
|
-
import { type RatingIconVariant, type RatingProps } from "../
|
|
3
|
+
import { type RatingIconVariant, type RatingProps } from "../rating";
|
|
4
4
|
import type { InputBaseProps } from "./InputBase";
|
|
5
5
|
import { type InputScaffoldFieldProps } from "./InputScaffold";
|
|
6
6
|
export type RatingInputStyles = null;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import { type ColorValue, type StyleProp, type ViewStyle } from "react-native";
|
|
3
3
|
import type { DeepPartial } from "@reillymc/es-utils";
|
|
4
|
-
import type { ComponentIconAssets } from "
|
|
5
|
-
|
|
4
|
+
import type { ComponentIconAssets } from "../../theme";
|
|
5
|
+
import { type RatingIconVariant } from "./ratingUtils";
|
|
6
6
|
export type RatingIcons = ComponentIconAssets<RatingIconVariant>;
|
|
7
|
-
export declare const valueToRating: (rating: number, starCount: number, scale: number) => number;
|
|
8
|
-
export declare const ratingToValue: (stars: number, starCount: number, scale: number) => number;
|
|
9
|
-
export declare const getRatingIcons: (rating: number, maxRating: number) => RatingIconVariant[];
|
|
10
7
|
export type RatingStyles = {
|
|
11
8
|
gap: number;
|
|
12
9
|
icon: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rating.d.ts","sourceRoot":"","sources":["../../../../src/components/rating/Rating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EACH,KAAK,UAAU,EACf,KAAK,SAAS,EAGd,KAAK,SAAS,EACjB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAEH,KAAK,iBAAiB,EAEzB,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,WAAW,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAEjE,MAAM,MAAM,YAAY,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE;QACF,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;KAChD,CAAC;CACL,CAAC;AAEF,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;IAElC;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CA+BlC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/rating/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,YAAY,GACpB,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,cAAc,EACd,KAAK,iBAAiB,EACtB,aAAa,EACb,aAAa,GAChB,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type RatingIconVariant = "full" | "half" | "empty";
|
|
2
|
+
export declare const valueToRating: (rating: number, starCount: number, scale: number) => number;
|
|
3
|
+
export declare const ratingToValue: (stars: number, starCount: number, scale: number) => number;
|
|
4
|
+
export declare const getRatingIcons: (rating: number, maxRating: number) => RatingIconVariant[];
|
|
5
|
+
//# sourceMappingURL=ratingUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ratingUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/rating/ratingUtils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1D,eAAO,MAAM,aAAa,GACtB,QAAQ,MAAM,EACd,WAAW,MAAM,EACjB,OAAO,MAAM,KACd,MAAsC,CAAC;AAE1C,eAAO,MAAM,aAAa,GACtB,OAAO,MAAM,EACb,WAAW,MAAM,EACjB,OAAO,MAAM,KACd,MAAqC,CAAC;AAEzC,eAAO,MAAM,cAAc,GACvB,QAAQ,MAAM,EACd,WAAW,MAAM,KAClB,iBAAiB,EAOd,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FC } from "react";
|
|
1
|
+
import type { FC, ReactNode } from "react";
|
|
2
2
|
import type { ColorValue } from "react-native";
|
|
3
3
|
export type IconSetItemProps = {
|
|
4
4
|
size: number;
|
|
@@ -7,5 +7,16 @@ export type IconSetItemProps = {
|
|
|
7
7
|
export type IconSet<G extends string> = FC<{
|
|
8
8
|
name: G;
|
|
9
9
|
} & IconSetItemProps & object>;
|
|
10
|
+
/**
|
|
11
|
+
* Icon sets are generic over their own glyph-name union, which makes
|
|
12
|
+
* `IconSet<G>` contravariant in `G` and therefore not mutually assignable.
|
|
13
|
+
* `AnyIconSet` uses a bivariant method signature (with optional item props) so a
|
|
14
|
+
* heterogeneous map of icon sets can be stored while keeping `name` as `string`.
|
|
15
|
+
*/
|
|
16
|
+
export type AnyIconSet = {
|
|
17
|
+
bivarianceHack(props: {
|
|
18
|
+
name: string;
|
|
19
|
+
} & Partial<IconSetItemProps> & object): ReactNode | Promise<ReactNode>;
|
|
20
|
+
}["bivarianceHack"];
|
|
10
21
|
export type IconSetGlyphMap<T extends string> = Record<T, FC<IconSetItemProps>>;
|
|
11
22
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/icons/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/icons/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI,EAAE,CACtC;IACI,IAAI,EAAE,CAAC,CAAC;CACX,GAAG,gBAAgB,GAChB,MAAM,CACb,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,cAAc,CACV,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,GAAG,MAAM,GAC7D,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CACrC,CAAC,gBAAgB,CAAC,CAAC;AAEpB,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Icons, type Styles, type Theme } from "../theme";
|
|
2
|
+
export interface ThemeContextDefinition {
|
|
3
|
+
theme: Theme;
|
|
4
|
+
styles: Styles;
|
|
5
|
+
icons: Icons;
|
|
6
|
+
}
|
|
7
|
+
export declare const ThemeContext: import("react").Context<ThemeContextDefinition>;
|
|
8
|
+
//# sourceMappingURL=ThemeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../src/providers/ThemeContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAIH,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,KAAK,EACb,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;CAChB;AAED,eAAO,MAAM,YAAY,iDAIvB,CAAC"}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FC, ReactNode } from "react";
|
|
2
2
|
import type { DeepPartial } from "@reillymc/es-utils";
|
|
3
3
|
import { type Icons, type Styles, type Theme } from "../theme";
|
|
4
|
-
export interface ThemeContextDefinition {
|
|
5
|
-
theme: Theme;
|
|
6
|
-
styles: Styles;
|
|
7
|
-
icons: Icons;
|
|
8
|
-
}
|
|
9
|
-
export declare const ThemeContext: import("react").Context<ThemeContextDefinition>;
|
|
10
4
|
interface ThemeProviderProps {
|
|
11
5
|
theme?: DeepPartial<Theme>;
|
|
12
6
|
styles?: Styles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAIH,KAAK,KAAK,EAEV,KAAK,MAAM,EACX,KAAK,KAAK,EACb,MAAM,UAAU,CAAC;AAGlB,UAAU,kBAAkB;IACxB,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAehD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import type { CounterInputIcons, InputScaffoldIcons, NumberInputIcons, RatingIcons, RatingInputIcons, SelectionInputIcons, TimeInputIcons, ToggleInputIcons } from "../components";
|
|
3
|
-
import { type IconSet } from "../icons";
|
|
3
|
+
import { type AnyIconSet, type IconSet } from "../icons";
|
|
4
4
|
export type ComponentIconAssets<K extends string> = K;
|
|
5
5
|
type ComponentIcons = {
|
|
6
6
|
inputScaffold: InputScaffoldIcons;
|
|
@@ -15,7 +15,7 @@ type ComponentIcons = {
|
|
|
15
15
|
export type Icons = {
|
|
16
16
|
[K in keyof ComponentIcons]: {
|
|
17
17
|
[I in ComponentIcons[K]]: {
|
|
18
|
-
iconSet:
|
|
18
|
+
iconSet: AnyIconSet;
|
|
19
19
|
iconName: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
@@ -26,7 +26,7 @@ type InferGlyph<T> = T extends IconSet<infer G> ? G : T extends FC<{
|
|
|
26
26
|
export type ComponentIconsConfig = {
|
|
27
27
|
[Category in keyof ComponentIcons]: {
|
|
28
28
|
[SubKey in ComponentIcons[Category]]: {
|
|
29
|
-
iconSet:
|
|
29
|
+
iconSet: AnyIconSet;
|
|
30
30
|
iconName: string;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/theme/icons.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EACR,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,OAAO,EAAmB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/theme/icons.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EACR,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,OAAO,EAAmB,MAAM,UAAU,CAAC;AAE1E,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,CAAC;AAEtD,KAAK,cAAc,GAAG;IAClB,aAAa,EAAE,kBAAkB,CAAC;IAClC,YAAY,EAAE,iBAAiB,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reillymc/react-native-components",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.15",
|
|
4
4
|
"description": "A collection of React Native components and resources",
|
|
5
5
|
"module": "lib/index.js",
|
|
6
6
|
"react-native": "lib/index.js",
|
|
@@ -11,15 +11,14 @@
|
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
13
|
"clean": "rm -rf ./lib",
|
|
14
|
-
"build": "npm run clean && tsc -p ./tsconfig.build.json && babel --extensions .ts,.tsx ./src -d ./lib",
|
|
14
|
+
"build": "npm run clean && tsc -p ./tsconfig.build.json && babel --config-file ./babel.config.build.js --extensions .ts,.tsx ./src -d ./lib",
|
|
15
15
|
"lint": "biome check --error-on-warnings",
|
|
16
16
|
"lint:fix": "biome check --fix",
|
|
17
17
|
"prepare": "npm run build",
|
|
18
18
|
"depcruise:src": "depcruise src --include-only 'src' --collapse 4 --output-type dot | dot -T svg > dependency-graph.svg",
|
|
19
19
|
"start": "expo start",
|
|
20
20
|
"typecheck": "tsc --noEmit -p ./tsconfig.build.json",
|
|
21
|
-
"typecheck:full": "tsc --noEmit -p ./tsconfig.json"
|
|
22
|
-
"build:devclient": "eas build --platform ios --profile development"
|
|
21
|
+
"typecheck:full": "tsc --noEmit -p ./tsconfig.json"
|
|
23
22
|
},
|
|
24
23
|
"keywords": [
|
|
25
24
|
"react-native",
|
|
@@ -50,6 +49,7 @@
|
|
|
50
49
|
"@babel/preset-typescript": "^7.27.1",
|
|
51
50
|
"@biomejs/biome": "2.4.9",
|
|
52
51
|
"@expo/metro-runtime": "~56.0.15",
|
|
52
|
+
"@react-native/babel-preset": "0.85.3",
|
|
53
53
|
"@react-native-vector-icons/octicons": "^21.1.2",
|
|
54
54
|
"@types/lodash.merge": "^4.6.9",
|
|
55
55
|
"@types/react": "~19.2.0",
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
"react-native-reanimated": "^4.3",
|
|
78
78
|
"react-native-safe-area-context": "^5.7",
|
|
79
79
|
"react-native-screens": "^4.23",
|
|
80
|
-
"react-native-svg": "^15.15"
|
|
80
|
+
"react-native-svg": "^15.15",
|
|
81
|
+
"react-native-worklets": "^0.8"
|
|
81
82
|
}
|
|
82
83
|
}
|
package/lib/components/Rating.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault").default;Object.defineProperty(exports,"__esModule",{value:true});exports.valueToRating=exports.ratingToValue=exports.getRatingIcons=exports.Rating=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _compilerRuntime=require("react/compiler-runtime");var _reactNative=require("react-native");var _hooks=require("../hooks");var _icon=require("./icon");var _jsxRuntime=require("react/jsx-runtime");var valueToRating=(rating,starCount,scale)=>rating/scale*starCount;exports.valueToRating=valueToRating;var ratingToValue=(stars,starCount,scale)=>stars*scale/starCount;exports.ratingToValue=ratingToValue;var getRatingIcons=(rating,maxRating)=>[...Array(maxRating)].map((_,i)=>{if(rating-i>=1){return"full";}return rating-i>=0.5?"half":"empty";});exports.getRatingIcons=getRatingIcons;var Rating=t0=>{var $=(0,_compilerRuntime.c)(16);var t1=t0.value,t2=t0.max,scale=t0.scale,styleOverrides=t0.style,containerStyle=t0.containerStyle;var value=t1===undefined?0:t1;var max=t2===undefined?5:t2;var t3;if($[0]!==styleOverrides){t3={styles:{rating:styleOverrides}};$[0]=styleOverrides;$[1]=t3;}else{t3=$[1];}var _useThemedStyles=(0,_hooks.useThemedStyles)("rating",createStyles,t3),_useThemedStyles2=(0,_slicedToArray2.default)(_useThemedStyles,2),styles=_useThemedStyles2[0],t4=_useThemedStyles2[1];var style=t4.style,icons=t4.icons;var t5;if($[2]!==containerStyle||$[3]!==icons||$[4]!==max||$[5]!==scale||$[6]!==style||$[7]!==styles.starRating||$[8]!==value){var scaledRating=scale?valueToRating(value,max,scale):value;var t6;if($[10]!==containerStyle||$[11]!==styles.starRating){t6=[styles.starRating,containerStyle];$[10]=containerStyle;$[11]=styles.starRating;$[12]=t6;}else{t6=$[12];}var t7;if($[13]!==icons||$[14]!==style){t7=(variant,i)=>(0,_jsxRuntime.jsx)(_icon.IconBase,Object.assign({},icons[variant],{style:{size:style.icon.size,color:style.icon.color[variant]}}),i);$[13]=icons;$[14]=style;$[15]=t7;}else{t7=$[15];}t5=(0,_jsxRuntime.jsx)(_reactNative.View,{style:t6,accessibilityLabel:`star rating. ${scaledRating} of ${max}.`,children:getRatingIcons(scaledRating,max).map(t7)});$[2]=containerStyle;$[3]=icons;$[4]=max;$[5]=scale;$[6]=style;$[7]=styles.starRating;$[8]=value;$[9]=t5;}else{t5=$[9];}return t5;};exports.Rating=Rating;var createStyles=_ref=>{var rating=_ref.styles.rating;return _reactNative.StyleSheet.create({starRating:{flexDirection:"row",gap:rating.gap}});};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Rating.d.ts","sourceRoot":"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