@reillymc/react-native-components 0.11.6 → 0.12.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/lib/components/action/Action.js +1 -1
- package/lib/components/action/Action.styles.js +1 -1
- package/lib/components/action/ActionBase.js +1 -1
- package/lib/components/action/ActionBase.styles.js +1 -0
- package/lib/components/action/IconAction.js +1 -1
- package/lib/components/action/IconAction.styles.js +1 -1
- package/lib/components/action/IconActionBase.js +1 -1
- package/lib/components/action/IconActionBase.styles.js +1 -1
- package/lib/components/action/StateTint.js +1 -0
- package/lib/components/action/StateTint.styles.js +1 -0
- package/lib/components/action/index.js +1 -1
- package/lib/components/alert/AlertIndicator.styles.js +1 -1
- package/lib/components/avatar/Avatar.js +1 -1
- package/lib/components/avatar/Avatar.styles.js +1 -1
- package/lib/components/button/Button.js +1 -1
- package/lib/components/button/Button.styles.js +1 -1
- package/lib/components/button/ButtonBase.js +1 -1
- package/lib/components/button/ButtonBase.styles.js +1 -1
- package/lib/components/button/IconButton.js +1 -1
- package/lib/components/button/IconButton.styles.js +1 -1
- package/lib/components/button/IconButtonBase.js +1 -1
- package/lib/components/button/IconButtonBase.styles.js +1 -1
- package/lib/components/icon/Icon.styles.js +1 -1
- package/lib/components/icon/IconBase.styles.js +1 -1
- package/lib/components/icon/index.js +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/input/InputAction.js +1 -1
- package/lib/components/input/InputAction.styles.js +1 -1
- package/lib/components/input/InputBase.js +1 -1
- package/lib/components/input/InputBase.styles.js +1 -1
- package/lib/components/input/InputScaffold.js +1 -1
- package/lib/components/input/InputScaffold.styles.js +1 -1
- package/lib/components/input/SelectionInput.js +1 -1
- package/lib/components/input/SelectionInput.styles.js +1 -1
- package/lib/components/input/ToggleInput.js +1 -1
- package/lib/components/input/ToggleInput.styles.js +1 -1
- package/lib/components/listItem/ListItem.js +1 -1
- package/lib/components/menu/Menu.js +1 -1
- package/lib/components/menu/Menu.styles.js +1 -1
- package/lib/components/menu/MenuItem.js +1 -1
- package/lib/components/rating/Rating.styles.js +1 -1
- package/lib/components/surface/InteractionSurface.js +1 -0
- package/lib/components/surface/StateLayer.js +1 -0
- package/lib/components/surface/StateLayer.styles.js +1 -0
- package/lib/components/surface/index.js +1 -0
- package/lib/components/swipe/SwipeAction.js +1 -1
- package/lib/components/tag/Tag.js +1 -1
- package/lib/components/tag/TagIcon.js +1 -1
- package/lib/components/text/Text.styles.js +1 -1
- package/lib/components/text/index.js +1 -1
- package/lib/components/toast/Toast.js +1 -1
- package/lib/components/toast/Toast.styles.js +1 -1
- package/lib/hooks/useTheme.js +1 -1
- package/lib/hooks/useThemedStyles.js +1 -1
- package/lib/providers/ThemeContext.js +1 -1
- package/lib/providers/ThemeProvider.js +1 -1
- package/lib/theme/index.js +1 -1
- package/lib/theme/palette.js +1 -0
- package/lib/theme/styles.js +1 -1
- package/lib/theme/theme.js +1 -1
- package/lib/types/components/action/Action.d.ts +2 -2
- package/lib/types/components/action/Action.d.ts.map +1 -1
- package/lib/types/components/action/Action.styles.d.ts.map +1 -1
- package/lib/types/components/action/ActionBase.d.ts +12 -4
- package/lib/types/components/action/ActionBase.d.ts.map +1 -1
- package/lib/types/components/action/ActionBase.styles.d.ts +3 -0
- package/lib/types/components/action/ActionBase.styles.d.ts.map +1 -0
- package/lib/types/components/action/IconAction.d.ts +3 -12
- package/lib/types/components/action/IconAction.d.ts.map +1 -1
- package/lib/types/components/action/IconAction.styles.d.ts.map +1 -1
- package/lib/types/components/action/IconActionBase.d.ts +5 -10
- package/lib/types/components/action/IconActionBase.d.ts.map +1 -1
- package/lib/types/components/action/IconActionBase.styles.d.ts.map +1 -1
- package/lib/types/components/action/StateTint.d.ts +13 -0
- package/lib/types/components/action/StateTint.d.ts.map +1 -0
- package/lib/types/components/action/StateTint.styles.d.ts +3 -0
- package/lib/types/components/action/StateTint.styles.d.ts.map +1 -0
- package/lib/types/components/action/index.d.ts +2 -1
- package/lib/types/components/action/index.d.ts.map +1 -1
- package/lib/types/components/avatar/Avatar.d.ts.map +1 -1
- package/lib/types/components/button/Button.d.ts +15 -6
- package/lib/types/components/button/Button.d.ts.map +1 -1
- package/lib/types/components/button/Button.styles.d.ts.map +1 -1
- package/lib/types/components/button/ButtonBase.d.ts +3 -4
- package/lib/types/components/button/ButtonBase.d.ts.map +1 -1
- package/lib/types/components/button/ButtonBase.styles.d.ts.map +1 -1
- package/lib/types/components/button/IconButton.d.ts +7 -8
- package/lib/types/components/button/IconButton.d.ts.map +1 -1
- package/lib/types/components/button/IconButton.styles.d.ts.map +1 -1
- package/lib/types/components/button/IconButtonBase.d.ts +7 -4
- package/lib/types/components/button/IconButtonBase.d.ts.map +1 -1
- package/lib/types/components/button/IconButtonBase.styles.d.ts.map +1 -1
- package/lib/types/components/button/index.d.ts +1 -1
- package/lib/types/components/button/index.d.ts.map +1 -1
- package/lib/types/components/icon/index.d.ts +0 -1
- package/lib/types/components/icon/index.d.ts.map +1 -1
- package/lib/types/components/index.d.ts +7 -5
- package/lib/types/components/index.d.ts.map +1 -1
- package/lib/types/components/input/InputAction.d.ts +3 -2
- package/lib/types/components/input/InputAction.d.ts.map +1 -1
- package/lib/types/components/input/InputAction.styles.d.ts.map +1 -1
- package/lib/types/components/input/SelectionInput.d.ts +3 -3
- package/lib/types/components/input/SelectionInput.d.ts.map +1 -1
- package/lib/types/components/input/SelectionInput.styles.d.ts.map +1 -1
- package/lib/types/components/input/ToggleInput.d.ts +7 -3
- package/lib/types/components/input/ToggleInput.d.ts.map +1 -1
- package/lib/types/components/input/ToggleInput.styles.d.ts.map +1 -1
- package/lib/types/components/listItem/ListItem.d.ts.map +1 -1
- package/lib/types/components/menu/MenuItem.d.ts.map +1 -1
- package/lib/types/components/surface/InteractionSurface.d.ts +7 -0
- package/lib/types/components/surface/InteractionSurface.d.ts.map +1 -0
- package/lib/types/components/surface/StateLayer.d.ts +13 -0
- package/lib/types/components/surface/StateLayer.d.ts.map +1 -0
- package/lib/types/components/surface/StateLayer.styles.d.ts +4 -0
- package/lib/types/components/surface/StateLayer.styles.d.ts.map +1 -0
- package/lib/types/components/surface/index.d.ts +3 -0
- package/lib/types/components/surface/index.d.ts.map +1 -0
- package/lib/types/components/swipe/SwipeAction.d.ts.map +1 -1
- package/lib/types/components/tag/Tag.d.ts.map +1 -1
- package/lib/types/components/text/Text.d.ts +2 -2
- package/lib/types/components/text/Text.d.ts.map +1 -1
- package/lib/types/components/text/index.d.ts +0 -1
- package/lib/types/components/text/index.d.ts.map +1 -1
- package/lib/types/components/toast/Toast.d.ts +6 -3
- package/lib/types/components/toast/Toast.d.ts.map +1 -1
- package/lib/types/components/toast/Toast.styles.d.ts +1 -1
- package/lib/types/components/toast/Toast.styles.d.ts.map +1 -1
- package/lib/types/hooks/useTheme.d.ts +6 -1
- package/lib/types/hooks/useTheme.d.ts.map +1 -1
- package/lib/types/hooks/useThemedStyles.d.ts +4 -3
- package/lib/types/hooks/useThemedStyles.d.ts.map +1 -1
- package/lib/types/providers/ThemeContext.d.ts +4 -4
- package/lib/types/providers/ThemeContext.d.ts.map +1 -1
- package/lib/types/providers/ThemeProvider.d.ts +9 -6
- package/lib/types/providers/ThemeProvider.d.ts.map +1 -1
- package/lib/types/theme/index.d.ts +4 -3
- package/lib/types/theme/index.d.ts.map +1 -1
- package/lib/types/theme/palette.d.ts +28 -0
- package/lib/types/theme/palette.d.ts.map +1 -0
- package/lib/types/theme/styles.d.ts +9 -3
- package/lib/types/theme/styles.d.ts.map +1 -1
- package/lib/types/theme/theme.d.ts +7 -49
- package/lib/types/theme/theme.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/components/icon/InteractiveIcon.js +0 -1
- package/lib/components/icon/InteractiveIcon.styles.js +0 -1
- package/lib/components/text/InteractiveText.js +0 -1
- package/lib/components/text/InteractiveText.styles.js +0 -1
- package/lib/types/components/icon/InteractiveIcon.d.ts +0 -17
- package/lib/types/components/icon/InteractiveIcon.d.ts.map +0 -1
- package/lib/types/components/icon/InteractiveIcon.styles.d.ts +0 -4
- package/lib/types/components/icon/InteractiveIcon.styles.d.ts.map +0 -1
- package/lib/types/components/text/InteractiveText.d.ts +0 -18
- package/lib/types/components/text/InteractiveText.d.ts.map +0 -1
- package/lib/types/components/text/InteractiveText.styles.d.ts +0 -4
- package/lib/types/components/text/InteractiveText.styles.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/tag/Tag.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet}from"react-native";import{useThemedStyles}from"../../hooks";import{ActionBase}from"../action";import{Text}from"../text";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var Tag=t0=>{var $=_c(
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/tag/Tag.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{ActionBase}from"../action";import{Text}from"../text";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";export var Tag=t0=>{var $=_c(16);var label=t0.label,onPress=t0.onPress,icon=t0.icon,variant=t0.variant,style=t0.style;var t1;if($[0]!==label||$[1]!==variant){t1={props:{variant,label}};$[0]=label;$[1]=variant;$[2]=t1;}else{t1=$[2];}var _useThemedStyles=useThemedStyles("tag",createStyles,t1),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t2;if($[3]!==label||$[4]!==styles.text){t2=_jsx(Text,{style:styles.text,children:label});$[3]=label;$[4]=styles.text;$[5]=t2;}else{t2=$[5];}var t3;if($[6]!==icon||$[7]!==t2){t3=_jsxs(_Fragment,{children:[icon,t2]});$[6]=icon;$[7]=t2;$[8]=t3;}else{t3=$[8];}var content=t3;var t4;if($[9]!==style||$[10]!==styles.container){t4=[styles.container,style];$[9]=style;$[10]=styles.container;$[11]=t4;}else{t4=$[11];}var containerStyle=t4;var t5;if($[12]!==containerStyle||$[13]!==content||$[14]!==onPress){t5=onPress?_jsx(ActionBase,{onPress:onPress,containerStyle:containerStyle,children:content}):_jsx(View,{style:containerStyle,children:content});$[12]=containerStyle;$[13]=content;$[14]=onPress;$[15]=t5;}else{t5=$[15];}return t5;};var createStyles=({theme:{color},styles:{tag}},{variant="dark"})=>{var styles=StyleSheet.create({container:{display:"flex",flexDirection:"row",alignItems:"center",borderRadius:tag.borderRadius,padding:tag.padding,backgroundColor:variant==="dark"?color.background:color.surface,width:"auto",gap:tag.internalSpacing},text:{color:color.foreground}});return styles;};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/tag/TagIcon.tsx";function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t);}import{c as _c}from"react/compiler-runtime";import{useTheme}from"../../hooks";import{IconBase}from"../icon";import{jsx as _jsx}from"react/jsx-runtime";export var TagIcon=t0=>{var $=_c(6);var iconProps;if($[0]!==t0){iconProps=Object.assign({},(_objectDestructuringEmpty(t0),t0));$[0]=t0;$[1]=iconProps;}else{iconProps=$[1];}var _useTheme=useTheme(),theme=_useTheme.theme,styles=_useTheme.styles;var t1;if($[2]!==iconProps||$[3]!==styles.text.font.body.size||$[4]!==theme.color.
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/tag/TagIcon.tsx";function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t);}import{c as _c}from"react/compiler-runtime";import{useTheme}from"../../hooks";import{IconBase}from"../icon";import{jsx as _jsx}from"react/jsx-runtime";export var TagIcon=t0=>{var $=_c(6);var iconProps;if($[0]!==t0){iconProps=Object.assign({},(_objectDestructuringEmpty(t0),t0));$[0]=t0;$[1]=iconProps;}else{iconProps=$[1];}var _useTheme=useTheme(),theme=_useTheme.theme,styles=_useTheme.styles;var t1;if($[2]!==iconProps||$[3]!==styles.text.font.body.size||$[4]!==theme.color.foreground){t1=_jsx(IconBase,{...iconProps,color:theme.color.foreground,size:styles.text.font.body.size});$[2]=iconProps;$[3]=styles.text.font.body.size;$[4]=theme.color.foreground;$[5]=t1;}else{t1=$[5];}return t1;};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export var defaultTextStyles=({color,font})=>({color:color.
|
|
1
|
+
export var defaultTextStyles=({color,font})=>({color:color.foreground,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.large},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}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{HighlightedText}from"./HighlightedText";export{
|
|
1
|
+
export{HighlightedText}from"./HighlightedText";export{Text}from"./Text";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/toast/Toast.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import Animated,{LinearTransition,SlideInDown,SlideOutDown}from"react-native-reanimated";import{useThemedStyles}from"../../hooks";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var TOAST_ENTERING=SlideInDown.springify().mass(0.5);var TOAST_EXITING=SlideOutDown.springify().mass(0.5);var TOAST_LAYOUT=LinearTransition.springify().mass(0.5);export var Toast=t0=>{var $=_c(17);var action=t0.action,containerStyle=t0.containerStyle,children=t0.children;var _useThemedStyles=useThemedStyles("toast",createStyles),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t1;if($[0]!==containerStyle||$[1]!==styles.container){t1=[styles.container,containerStyle];$[0]=containerStyle;$[1]=styles.container;$[2]=t1;}else{t1=$[2];}var t2;if($[3]!==children||$[4]!==styles.contentContainer){t2=_jsx(View,{style:styles.contentContainer,children:children});$[3]=children;$[4]=styles.contentContainer;$[5]=t2;}else{t2=$[5];}var t3;if($[6]!==action||$[7]!==styles.actionContainer||$[8]!==styles.separator){t3=action&&_jsxs(View,{style:styles.actionContainer,children:[_jsx(Animated.View,{layout:TOAST_LAYOUT,style:styles.separator}),action]});$[6]=action;$[7]=styles.actionContainer;$[8]=styles.separator;$[9]=t3;}else{t3=$[9];}var t4;if($[10]!==styles.innerContainer||$[11]!==t2||$[12]!==t3){t4=_jsxs(View,{style:styles.innerContainer,children:[t2,t3]});$[10]=styles.innerContainer;$[11]=t2;$[12]=t3;$[13]=t4;}else{t4=$[13];}var t5;if($[14]!==t1||$[15]!==t4){t5=_jsx(Animated.View,{style:t1,entering:TOAST_ENTERING,exiting:TOAST_EXITING,layout:TOAST_LAYOUT,children:t4});$[14]=t1;$[15]=t4;$[16]=t5;}else{t5=$[16];}return t5;};var createStyles=({theme:{color,spacing
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/toast/Toast.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import Animated,{LinearTransition,SlideInDown,SlideOutDown}from"react-native-reanimated";import{useThemedStyles}from"../../hooks";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var TOAST_ENTERING=SlideInDown.springify().mass(0.5);var TOAST_EXITING=SlideOutDown.springify().mass(0.5);var TOAST_LAYOUT=LinearTransition.springify().mass(0.5);export var Toast=t0=>{var $=_c(17);var action=t0.action,containerStyle=t0.containerStyle,children=t0.children;var _useThemedStyles=useThemedStyles("toast",createStyles),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t1;if($[0]!==containerStyle||$[1]!==styles.container){t1=[styles.container,containerStyle];$[0]=containerStyle;$[1]=styles.container;$[2]=t1;}else{t1=$[2];}var t2;if($[3]!==children||$[4]!==styles.contentContainer){t2=_jsx(View,{style:styles.contentContainer,children:children});$[3]=children;$[4]=styles.contentContainer;$[5]=t2;}else{t2=$[5];}var t3;if($[6]!==action||$[7]!==styles.actionContainer||$[8]!==styles.separator){t3=action&&_jsxs(View,{style:styles.actionContainer,children:[_jsx(Animated.View,{layout:TOAST_LAYOUT,style:styles.separator}),action]});$[6]=action;$[7]=styles.actionContainer;$[8]=styles.separator;$[9]=t3;}else{t3=$[9];}var t4;if($[10]!==styles.innerContainer||$[11]!==t2||$[12]!==t3){t4=_jsxs(View,{style:styles.innerContainer,children:[t2,t3]});$[10]=styles.innerContainer;$[11]=t2;$[12]=t3;$[13]=t4;}else{t4=$[13];}var t5;if($[14]!==t1||$[15]!==t4){t5=_jsx(Animated.View,{style:t1,entering:TOAST_ENTERING,exiting:TOAST_EXITING,layout:TOAST_LAYOUT,children:t4});$[14]=t1;$[15]=t4;$[16]=t5;}else{t5=$[16];}return t5;};var createStyles=({theme:{color,spacing},styles:{toast}})=>StyleSheet.create({container:{backgroundColor:toast.container.backgroundColor,padding:toast.container.padding,borderRadius:toast.container.borderRadius,borderWidth:StyleSheet.hairlineWidth,borderColor:color.border},innerContainer:{flexDirection:"row",justifyContent:"space-between"},contentContainer:{flex:1},actionContainer:{flex:0,alignItems:"center",flexDirection:"row",height:"100%"},separator:{borderStartWidth:StyleSheet.hairlineWidth,borderStartColor:color.mutedForeground,height:"100%",marginHorizontal:spacing.medium}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export var defaultToastStyles=({spacing})=>({
|
|
1
|
+
export var defaultToastStyles=({color,spacing,border})=>({container:{backgroundColor:color.elevated,padding:spacing.medium,borderRadius:border.radius.loose}});
|
package/lib/hooks/useTheme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{use}from"react";import{ThemeContext}from"../providers";export
|
|
1
|
+
import{use}from"react";import{ThemeContext}from"../providers";export function useTheme(){return use(ThemeContext);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as _c}from"react/compiler-runtime";import{MergeStyleSlice}from"../theme/styles";import{useTheme}from"./useTheme";function hasKey(obj,key){return key in obj;}var EMPTY_OPTIONS={};var mergeStylesForComponent=(styles,name,override)=>{if(!hasKey(styles,name)){return{config:undefined,styles};}var base=styles[name];var config=MergeStyleSlice(base,override);return{config,styles:config===base?styles:{...styles,[name]:config}};};var buildComponentResult=(styles,icons,name,config)=>{var hasStyle=hasKey(styles,name);var hasIcons=hasKey(icons,name);if(hasStyle&&hasIcons){return{style:config,icons:icons[name]};}if(hasStyle){return{style:config};}if(hasIcons){return{icons:icons[name]};}return{};};export function useThemedStyles(...t0){var $=_c(10);var args=t0;var first=args[0];var isComponent=typeof first==="string";var componentName=isComponent?first:undefined;var generator=isComponent?args[1]:first;var options=(isComponent?args[2]:args[1])??EMPTY_OPTIONS;var hasProps="props"in options;var componentProps=hasProps?options.props:undefined;var componentStyles="styles"in options?options.styles:undefined;var _useTheme=useTheme(),theme=_useTheme.theme,styles=_useTheme.styles,icons=_useTheme.icons;var name=componentName;var t1;if($[0]!==componentProps||$[1]!==componentStyles||$[2]!==generator||$[3]!==hasProps||$[4]!==icons||$[5]!==isComponent||$[6]!==name||$[7]!==styles||$[8]!==theme){var _ref=isComponent?mergeStylesForComponent(styles,name,componentStyles?.[name]):{config:undefined,styles},config=_ref.config,stylesForGenerator=_ref.styles;var
|
|
1
|
+
import{c as _c}from"react/compiler-runtime";import{MergeStyleSlice}from"../theme/styles";import{useTheme}from"./useTheme";function hasKey(obj,key){return key in obj;}var EMPTY_OPTIONS={};var mergeStylesForComponent=(styles,name,override)=>{if(!hasKey(styles,name)){return{config:undefined,styles};}var base=styles[name];var config=MergeStyleSlice(base,override);return{config,styles:config===base?styles:{...styles,[name]:config}};};var buildComponentResult=(styles,icons,name,config)=>{var hasStyle=hasKey(styles,name);var hasIcons=hasKey(icons,name);if(hasStyle&&hasIcons){return{style:config,icons:icons[name]};}if(hasStyle){return{style:config};}if(hasIcons){return{icons:icons[name]};}return{};};export function useThemedStyles(...t0){var $=_c(10);var args=t0;var first=args[0];var isComponent=typeof first==="string";var componentName=isComponent?first:undefined;var generator=isComponent?args[1]:first;var options=(isComponent?args[2]:args[1])??EMPTY_OPTIONS;var hasProps="props"in options;var componentProps=hasProps?options.props:undefined;var componentStyles="styles"in options?options.styles:undefined;var _useTheme=useTheme(),theme=_useTheme.theme,styles=_useTheme.styles,icons=_useTheme.icons;var name=componentName;var t1;if($[0]!==componentProps||$[1]!==componentStyles||$[2]!==generator||$[3]!==hasProps||$[4]!==icons||$[5]!==isComponent||$[6]!==name||$[7]!==styles||$[8]!==theme){var _ref=isComponent?mergeStylesForComponent(styles,name,componentStyles?.[name]):{config:undefined,styles},config=_ref.config,stylesForGenerator=_ref.styles;var generatorInput={theme,styles:stylesForGenerator,icons};var _generated=hasProps?generator(generatorInput,componentProps):generator(generatorInput);t1=isComponent?[_generated,buildComponentResult(styles,icons,name,config)]:_generated;$[0]=componentProps;$[1]=componentStyles;$[2]=generator;$[3]=hasProps;$[4]=icons;$[5]=isComponent;$[6]=name;$[7]=styles;$[8]=theme;$[9]=t1;}else{t1=$[9];}return t1;}export var useStyles=componentStyles=>{var $=_c(7);var _useTheme2=useTheme(),styles=_useTheme2.styles;var merged=styles;var t0;if($[0]!==componentStyles){t0=Object.keys(componentStyles);$[0]=componentStyles;$[1]=t0;}else{t0=$[1];}var t1=t0;if($[2]!==componentStyles||$[3]!==merged||$[4]!==styles||$[5]!==t1){for(var key of t1){var override=componentStyles[key];if(override===undefined){continue;}var base=styles[key];var next=MergeStyleSlice(base,override);if(next!==base){merged={...merged,[key]:next};}}$[2]=componentStyles;$[3]=merged;$[4]=styles;$[5]=t1;$[6]=merged;}else{merged=$[6];}return merged;};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext}from"react";import{
|
|
1
|
+
import{createContext}from"react";import{DefaultIcons}from"../theme/icons";import{createStyles}from"../theme/styles";import{DefaultTheme}from"../theme/theme";export var ThemeContext=createContext({theme:DefaultTheme,styles:createStyles(DefaultTheme),icons:DefaultIcons});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/providers/ThemeProvider.tsx";import{c as _c}from"react/compiler-runtime";import{
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/providers/ThemeProvider.tsx";import{c as _c}from"react/compiler-runtime";import{createStyles}from"../theme";import{MergeIcons}from"../theme/icons";import{MergeTheme}from"../theme/theme";import{ThemeContext}from"./ThemeContext";import{jsx as _jsx}from"react/jsx-runtime";export var ThemeProvider=t0=>{var $=_c(13);var initialTheme=t0.theme,initialStyles=t0.styles,initialIcons=t0.icons,children=t0.children;var t1;var theme;if($[0]!==initialStyles||$[1]!==initialTheme){theme=MergeTheme(initialTheme);t1=createStyles(theme,initialStyles);$[0]=initialStyles;$[1]=initialTheme;$[2]=t1;$[3]=theme;}else{t1=$[2];theme=$[3];}var styles=t1;var t2;if($[4]!==initialIcons){t2=MergeIcons(initialIcons);$[4]=initialIcons;$[5]=t2;}else{t2=$[5];}var icons=t2;var t3;if($[6]!==icons||$[7]!==styles||$[8]!==theme){t3={theme,styles,icons};$[6]=icons;$[7]=styles;$[8]=theme;$[9]=t3;}else{t3=$[9];}var value=t3;var t4;if($[10]!==children||$[11]!==value){t4=_jsx(ThemeContext.Provider,{value:value,children:children});$[10]=children;$[11]=value;$[12]=t4;}else{t4=$[12];}return t4;};
|
package/lib/theme/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{darkPalette,lightPalette}from"./palette";export{createStyles}from"./styles";export{createTheme}from"./theme";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var lightPalette={background:"#F4EDEA",foreground:"#12263A",inset:"#e4d8d4",insetForeground:"#12263A",surface:"#ffffff",surfaceForeground:"#12263A",elevated:"#ffffff",elevatedForeground:"#12263A",primary:"#FF4242",primaryForeground:"#F4EDEA",secondary:"#e4d8d4",secondaryForeground:"#12263A",destructive:"#ff382e",destructiveForeground:"#F4EDEA",muted:"#f7f3f2",mutedForeground:"#718191",border:"#E2E8F0",tint1:"#FF9AA2",tint2:"#FFDAC1",tint3:"#E2F0CB",tint4:"#B5EAD7",tint5:"#C7CEEA"};export var darkPalette={background:"#09090b",foreground:"#fafafa",inset:"#27272a",insetForeground:"#fafafa",surface:"#18181b",surfaceForeground:"#fafafa",elevated:"#37373a",elevatedForeground:"#fafafa",primary:"#FF4242",primaryForeground:"#fafafa",secondary:"#27272a",secondaryForeground:"#fafafa",destructive:"#ff5c54",destructiveForeground:"#fafafa",muted:"#27272a",mutedForeground:"#a1a1aa",border:"#27272a",tint1:"#7a3b40",tint2:"#7a5a3b",tint3:"#4f5f3b",tint4:"#3b5f55",tint5:"#45456b"};
|
package/lib/theme/styles.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import merge from"lodash.merge";import{defaultActionStyles}from"../components/action/Action.styles";import{defaultIconActionStyles}from"../components/action/IconAction.styles";import{defaultIconActionBaseStyles}from"../components/action/IconActionBase.styles";import{defaultAlertIndicatorStyles}from"../components/alert/AlertIndicator.styles";import{defaultAvatarStyles}from"../components/avatar/Avatar.styles";import{defaultButtonStyles}from"../components/button/Button.styles";import{defaultButtonBaseStyles}from"../components/button/ButtonBase.styles";import{defaultIconButtonStyles}from"../components/button/IconButton.styles";import{defaultIconButtonBaseStyles}from"../components/button/IconButtonBase.styles";import{defaultFloatingContainerStyles}from"../components/container/FloatingContainer.styles";import{defaultIconStyles}from"../components/icon/Icon.styles";import{defaultIconBaseStyles}from"../components/icon/IconBase.styles";import{
|
|
1
|
+
import merge from"lodash.merge";import{defaultActionStyles}from"../components/action/Action.styles";import{defaultActionBaseStyles}from"../components/action/ActionBase.styles";import{defaultIconActionStyles}from"../components/action/IconAction.styles";import{defaultIconActionBaseStyles}from"../components/action/IconActionBase.styles";import{defaultStateTintStyles}from"../components/action/StateTint.styles";import{defaultAlertIndicatorStyles}from"../components/alert/AlertIndicator.styles";import{defaultAvatarStyles}from"../components/avatar/Avatar.styles";import{defaultButtonStyles}from"../components/button/Button.styles";import{defaultButtonBaseStyles}from"../components/button/ButtonBase.styles";import{defaultIconButtonStyles}from"../components/button/IconButton.styles";import{defaultIconButtonBaseStyles}from"../components/button/IconButtonBase.styles";import{defaultFloatingContainerStyles}from"../components/container/FloatingContainer.styles";import{defaultIconStyles}from"../components/icon/Icon.styles";import{defaultIconBaseStyles}from"../components/icon/IconBase.styles";import{defaultDropdownInputStyles}from"../components/input/DropdownInput.styles";import{defaultInputActionStyles}from"../components/input/InputAction.styles";import{defaultInputBaseStyles}from"../components/input/InputBase.styles";import{defaultInputScaffoldStyles}from"../components/input/InputScaffold.styles";import{defaultSelectionInputStyles}from"../components/input/SelectionInput.styles";import{defaultToggleInputStyles}from"../components/input/ToggleInput.styles";import{defaultListItemStyles}from"../components/listItem/ListItem.styles";import{defaultMenuStyles}from"../components/menu/Menu.styles";import{defaultMenuItemStyles}from"../components/menu/MenuItem.styles";import{defaultRatingStyles}from"../components/rating/Rating.styles";import{defaultStateLayerStyles}from"../components/surface/StateLayer.styles";import{defaultSwipeActionStyles}from"../components/swipe/SwipeAction.styles";import{defaultTagStyles}from"../components/tag/Tag.styles";import{defaultHighlightedTextStyles}from"../components/text/HighlightedText.styles";import{defaultTextStyles}from"../components/text/Text.styles";import{defaultToastStyles}from"../components/toast/Toast.styles";export var createDefaultStyles=theme=>({highlightedText:defaultHighlightedTextStyles(),iconBase:defaultIconBaseStyles(theme),icon:defaultIconStyles(theme),actionBase:defaultActionBaseStyles(),stateLayer:defaultStateLayerStyles(theme),stateTint:defaultStateTintStyles(),action:defaultActionStyles(theme),iconActionBase:defaultIconActionBaseStyles(theme),iconAction:defaultIconActionStyles(theme),buttonBase:defaultButtonBaseStyles(theme),button:defaultButtonStyles(theme),iconButtonBase:defaultIconButtonBaseStyles(theme),iconButton:defaultIconButtonStyles(theme),inputBase:defaultInputBaseStyles(theme),inputScaffold:defaultInputScaffoldStyles(theme),inputAction:defaultInputActionStyles(theme),selectionInput:defaultSelectionInputStyles(theme),ratingInput:null,swipeAction:defaultSwipeActionStyles(theme),floatingContainer:defaultFloatingContainerStyles(theme),menu:defaultMenuStyles(theme),menuItem:defaultMenuItemStyles(theme),rating:defaultRatingStyles(theme),alertIndicator:defaultAlertIndicatorStyles(theme),tag:defaultTagStyles(theme),common:{action:{fontSize:{...theme.font.size}}},text:defaultTextStyles(theme),dropdownInput:defaultDropdownInputStyles(theme),toggleInput:defaultToggleInputStyles(theme),listItem:defaultListItemStyles(theme),avatar:defaultAvatarStyles(theme),toast:defaultToastStyles(theme)});export var MergeStyles=(styles,overrides={})=>merge({},styles,overrides);export var createStyles=(theme,overrides)=>MergeStyles(createDefaultStyles(theme),overrides);export var MergeStyleSlice=(base,override)=>override===undefined?base:merge({},base,override);
|
package/lib/theme/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Platform}from"react-native";export var DefaultTheme={font:{family:{sans:Platform.select({ios:"System",android:"sans-serif",default:"system-ui"}),mono:Platform.select({ios:"Menlo",android:"monospace",default:"monospace"})},size:{tiny:10,small:12,regular:14,large:16,xLarge:20,xxLarge:28}},color:
|
|
1
|
+
import{Platform}from"react-native";import merge from"lodash.merge";import{lightPalette}from"./palette";export var DefaultTheme={font:{family:{sans:Platform.select({ios:"System",android:"sans-serif",default:"system-ui"}),mono:Platform.select({ios:"Menlo",android:"monospace",default:"monospace"})},size:{tiny:10,small:12,regular:14,large:16,xLarge:20,xxLarge:28}},color:lightPalette,spacing:{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)=>merge({},DefaultTheme,first??{},second??{});export var createTheme=(overrides,createExtras)=>{var base=MergeTheme(overrides);return createExtras?merge({},base,createExtras(base)):base;};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
|
+
import type { ColorValue } from "react-native";
|
|
2
3
|
import type { DeepPartial } from "@reillymc/es-utils";
|
|
3
|
-
import { type InteractiveTextStyles } from "../text";
|
|
4
4
|
import { type ActionBaseProps } from "./ActionBase";
|
|
5
5
|
export type ActionVariant = "primary" | "secondary" | "destructive";
|
|
6
6
|
export type ActionStyles = {
|
|
7
7
|
label: {
|
|
8
|
-
color: Record<ActionVariant,
|
|
8
|
+
color: Record<ActionVariant, ColorValue>;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
export interface ActionProps extends Pick<ActionBaseProps, "containerStyle" | "disabled" | "onPress"> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../src/components/action/Action.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../src/components/action/Action.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAItD,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAGhE,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;AAEpE,MAAM,MAAM,YAAY,GAAG;IACvB,KAAK,EAAE;QACH,KAAK,EAAE,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;KAC5C,CAAC;CACL,CAAC;AAEF,MAAM,WAAW,WACb,SAAQ,IAAI,CAAC,eAAe,EAAE,gBAAgB,GAAG,UAAU,GAAG,SAAS,CAAC;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;CACrC;AAED,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CA6BlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/action/Action.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,mBAAmB,GAAI,WAAW,KAAK,KAAG,
|
|
1
|
+
{"version":3,"file":"Action.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/action/Action.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,mBAAmB,GAAI,WAAW,KAAK,KAAG,YAQrD,CAAC"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import type { FC } from "react";
|
|
2
|
-
import { type PressableProps } from "react-native";
|
|
3
|
-
export
|
|
4
|
-
|
|
1
|
+
import type { FC, ReactNode } from "react";
|
|
2
|
+
import { type PressableProps, type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
export type ActionState = {
|
|
4
|
+
pressed: boolean;
|
|
5
|
+
hovered?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type ActionBaseStyles = {
|
|
8
|
+
disabledOpacity: number;
|
|
9
|
+
};
|
|
10
|
+
export interface ActionBaseProps extends Pick<PressableProps, "hitSlop"> {
|
|
11
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
5
12
|
disabled?: boolean;
|
|
6
13
|
onPress?: () => void;
|
|
14
|
+
children?: ReactNode | ((state: ActionState) => ReactNode);
|
|
7
15
|
}
|
|
8
16
|
export declare const ActionBase: FC<ActionBaseProps>;
|
|
9
17
|
//# sourceMappingURL=ActionBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBase.d.ts","sourceRoot":"","sources":["../../../../src/components/action/ActionBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionBase.d.ts","sourceRoot":"","sources":["../../../../src/components/action/ActionBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAEH,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACjB,MAAM,cAAc,CAAC;AAItB,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,eAAe,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC;IACpE,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,WAAW,KAAK,SAAS,CAAC,CAAC;CAC9D;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA2B1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionBase.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/action/ActionBase.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,uBAAuB,QAAO,gBAEzC,CAAC"}
|
|
@@ -1,19 +1,10 @@
|
|
|
1
|
+
import type { ColorValue } from "react-native";
|
|
1
2
|
import type { DeepPartial } from "@reillymc/es-utils";
|
|
2
|
-
import type { IconComponentProps
|
|
3
|
-
import type { InteractiveTextStyles } from "../text";
|
|
3
|
+
import type { IconComponentProps } from "../icon";
|
|
4
4
|
import { type IconActionBaseProps } from "./IconActionBase";
|
|
5
5
|
export type IconActionVariant = "primary" | "secondary" | "destructive";
|
|
6
6
|
export type IconActionStyles = {
|
|
7
|
-
|
|
8
|
-
color: {
|
|
9
|
-
[Variant in IconActionVariant]: InteractiveTextStyles["color"];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
icon: {
|
|
13
|
-
color: {
|
|
14
|
-
[Variant in IconActionVariant]: InteractiveIconStyles["color"];
|
|
15
|
-
};
|
|
16
|
-
};
|
|
7
|
+
color: Record<IconActionVariant, ColorValue>;
|
|
17
8
|
};
|
|
18
9
|
export interface IconActionProps extends Omit<IconActionBaseProps, "style"> {
|
|
19
10
|
variant?: IconActionVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconAction.d.ts","sourceRoot":"","sources":["../../../../src/components/action/IconAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"IconAction.d.ts","sourceRoot":"","sources":["../../../../src/components/action/IconAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5E,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;AAExE,MAAM,MAAM,gBAAgB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACvE,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,8BAI1C,eAAe,GAAG,kBAAkB,CAAC,CAAC,CAAC,gCASzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconAction.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/action/IconAction.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,uBAAuB,GAAI,OAAO,KAAK,KAAG,
|
|
1
|
+
{"version":3,"file":"IconAction.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/action/IconAction.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,uBAAuB,GAAI,OAAO,KAAK,KAAG,gBAMtD,CAAC"}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
+
import { type ColorValue } from "react-native";
|
|
1
2
|
import type { DeepPartial } from "@reillymc/es-utils";
|
|
2
|
-
import { type IconComponentProps
|
|
3
|
-
import {
|
|
4
|
-
import type { ActionProps } from "./Action";
|
|
3
|
+
import { type IconComponentProps } from "../icon";
|
|
4
|
+
import type { ActionBaseProps } from "./ActionBase";
|
|
5
5
|
export type IconActionBaseStyles = {
|
|
6
6
|
gap: number;
|
|
7
|
-
|
|
8
|
-
color: InteractiveTextStyles["color"];
|
|
9
|
-
};
|
|
10
|
-
icon: {
|
|
11
|
-
color: InteractiveIconStyles["color"];
|
|
12
|
-
};
|
|
7
|
+
color: ColorValue;
|
|
13
8
|
};
|
|
14
|
-
export interface IconActionBaseProps extends Pick<
|
|
9
|
+
export interface IconActionBaseProps extends Pick<ActionBaseProps, "onPress" | "disabled" | "containerStyle"> {
|
|
15
10
|
label?: string;
|
|
16
11
|
iconPosition?: "start" | "end";
|
|
17
12
|
style?: DeepPartial<IconActionBaseStyles>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconActionBase.d.ts","sourceRoot":"","sources":["../../../../src/components/action/IconActionBase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconActionBase.d.ts","sourceRoot":"","sources":["../../../../src/components/action/IconActionBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAY,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,MAAM,oBAAoB,GAAG;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,mBACb,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,UAAU,GAAG,gBAAgB,CAAC;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC/B,KAAK,CAAC,EAAE,WAAW,CAAC,oBAAoB,CAAC,CAAC;CAC7C;AAED,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,EAAE,+GAQ9C,mBAAmB,GAAG,kBAAkB,CAAC,CAAC,CAAC,gCA8B7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconActionBase.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/action/IconActionBase.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"IconActionBase.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/action/IconActionBase.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,eAAO,MAAM,2BAA2B,GACpC,OAAO,KAAK,KACb,oBAGD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FC, ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
import type { ActionState } from "./ActionBase";
|
|
4
|
+
export type StateTintStyles = {
|
|
5
|
+
hoverOpacity: number;
|
|
6
|
+
pressedOpacity: number;
|
|
7
|
+
};
|
|
8
|
+
export interface StateTintProps extends ActionState {
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const StateTint: FC<StateTintProps>;
|
|
13
|
+
//# sourceMappingURL=StateTint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateTint.d.ts","sourceRoot":"","sources":["../../../../src/components/action/StateTint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,MAAM,eAAe,GAAG;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,WAAW;IAC/C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAsBxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateTint.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/action/StateTint.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,sBAAsB,QAAO,eAGxC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Action, type ActionProps, type ActionStyles } from "./Action";
|
|
2
|
-
export { ActionBase, type ActionBaseProps } from "./ActionBase";
|
|
2
|
+
export { ActionBase, type ActionBaseProps, type ActionBaseStyles, type ActionState, } from "./ActionBase";
|
|
3
3
|
export { IconAction, type IconActionProps, type IconActionStyles, } from "./IconAction";
|
|
4
4
|
export { IconActionBase, type IconActionBaseProps, type IconActionBaseStyles, } from "./IconActionBase";
|
|
5
|
+
export { StateTint, type StateTintProps, type StateTintStyles, } from "./StateTint";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/action/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/action/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EACH,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EACH,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACH,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACH,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,eAAe,GACvB,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EACH,KAAK,UAAU,EAEf,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EACjB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EACH,KAAK,UAAU,EAEf,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EACjB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAoBtD,KAAK,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG;IACvB,IAAI,EAAE;SAAG,GAAG,IAAI,UAAU,GAAG,MAAM;KAAE,CAAC;IACtC,QAAQ,EAAE;QACN,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;QACpC,QAAQ,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;KACxC,CAAC;IACF,KAAK,EAAE;QACH,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;QACpC,QAAQ,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,EAAE,KAAK,CAAC;QAAE,UAAU,EAAE,UAAU,CAAC;QAAC,UAAU,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC;CACrE,CAAC;AAEF,MAAM,WAAW,WAAW;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IAEH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,KAAK,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;IAElC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAoClC,CAAC"}
|
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
|
+
import type { ColorValue } from "react-native";
|
|
2
3
|
import type { DeepPartial } from "@reillymc/es-utils";
|
|
3
|
-
import { type InteractiveTextStyles } from "../text";
|
|
4
4
|
import { type ButtonBaseProps, type ButtonBaseStyles } from "./ButtonBase";
|
|
5
5
|
export type ButtonSize = "medium" | "large";
|
|
6
|
-
export type ButtonVariant = "primary" | "
|
|
6
|
+
export type ButtonVariant = "primary" | "destructive";
|
|
7
|
+
export type ButtonAppearance = "prominent" | "subtle";
|
|
8
|
+
export type ButtonAppearanceStyles = {
|
|
9
|
+
prominent: {
|
|
10
|
+
container: Record<ButtonVariant, ColorValue>;
|
|
11
|
+
content: Record<ButtonVariant, ColorValue>;
|
|
12
|
+
};
|
|
13
|
+
subtle: {
|
|
14
|
+
container: ColorValue;
|
|
15
|
+
content: Record<ButtonVariant, ColorValue>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
7
18
|
export type ButtonStyles = {
|
|
8
19
|
container: {
|
|
9
20
|
borderRadius: ButtonBaseStyles["borderRadius"];
|
|
10
|
-
color: Record<ButtonVariant, ButtonBaseStyles["backgroundColor"]>;
|
|
11
|
-
};
|
|
12
|
-
label: {
|
|
13
|
-
color: Record<ButtonVariant, InteractiveTextStyles["color"]>;
|
|
14
21
|
};
|
|
22
|
+
appearance: ButtonAppearanceStyles;
|
|
15
23
|
};
|
|
16
24
|
export interface ButtonProps extends Pick<ButtonBaseProps, "onPress" | "disabled" | "width" | "containerStyle"> {
|
|
17
25
|
variant?: ButtonVariant;
|
|
26
|
+
appearance?: ButtonAppearance;
|
|
18
27
|
label: string;
|
|
19
28
|
style?: DeepPartial<ButtonStyles>;
|
|
20
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAItD,OAAO,EAEH,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACxB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC5C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,aAAa,CAAC;AACtD,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEtD,MAAM,MAAM,sBAAsB,GAAG;IACjC,SAAS,EAAE;QACP,SAAS,EAAE,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;QAC7C,OAAO,EAAE,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;KAC9C,CAAC;IACF,MAAM,EAAE;QACJ,SAAS,EAAE,UAAU,CAAC;QACtB,OAAO,EAAE,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;KAC9C,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACvB,SAAS,EAAE;QACP,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;KAClD,CAAC;IACF,UAAU,EAAE,sBAAsB,CAAC;CACtC,CAAC;AAEF,MAAM,WAAW,WACb,SAAQ,IAAI,CACR,eAAe,EACf,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,gBAAgB,CACtD;IACD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;CACrC;AAED,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAoClC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,eAAO,MAAM,mBAAmB,GAAI,OAAO,KAAK,KAAG,
|
|
1
|
+
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,eAAO,MAAM,mBAAmB,GAAI,OAAO,KAAK,KAAG,YA4BlD,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { FC } from "react";
|
|
2
2
|
import { type ColorValue, type DimensionValue } from "react-native";
|
|
3
3
|
import type { DeepPartial } from "@reillymc/es-utils";
|
|
4
|
-
import { type
|
|
5
|
-
export type ButtonState = "enabled" | "disabled" | "pressed";
|
|
4
|
+
import { type InteractionSurfaceProps } from "../surface";
|
|
6
5
|
export type ButtonBaseStyles = {
|
|
7
6
|
height: DimensionValue;
|
|
8
7
|
width: {
|
|
@@ -11,9 +10,9 @@ export type ButtonBaseStyles = {
|
|
|
11
10
|
paddingHorizontal: number;
|
|
12
11
|
paddingVertical: number;
|
|
13
12
|
borderRadius: number | `${number}%`;
|
|
14
|
-
backgroundColor:
|
|
13
|
+
backgroundColor: ColorValue;
|
|
15
14
|
};
|
|
16
|
-
export interface ButtonBaseProps extends Pick<
|
|
15
|
+
export interface ButtonBaseProps extends Pick<InteractionSurfaceProps, "children" | "disabled" | "onPress" | "containerStyle"> {
|
|
17
16
|
width?: "auto" | "medium";
|
|
18
17
|
style?: DeepPartial<ButtonBaseStyles>;
|
|
19
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../../../src/components/button/ButtonBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EACH,KAAK,UAAU,EACf,KAAK,cAAc,EAGtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,
|
|
1
|
+
{"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../../../src/components/button/ButtonBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EACH,KAAK,UAAU,EACf,KAAK,cAAc,EAGtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAsB,KAAK,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE9E,MAAM,MAAM,gBAAgB,GAAG;IAC3B,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE;QACH,MAAM,EAAE,cAAc,CAAC;KAC1B,CAAC;IACF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC;IACpC,eAAe,EAAE,UAAU,CAAC;CAC/B,CAAC;AAEF,MAAM,WAAW,eACb,SAAQ,IAAI,CACR,uBAAuB,EACvB,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,gBAAgB,CACzD;IACD,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC1B,KAAK,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAwB1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/button/ButtonBase.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,uBAAuB,GAAI,6BAIrC,KAAK,KAAG,
|
|
1
|
+
{"version":3,"file":"ButtonBase.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/button/ButtonBase.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,uBAAuB,GAAI,6BAIrC,KAAK,KAAG,gBAST,CAAC"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import type { DeepPartial } from "@reillymc/es-utils";
|
|
2
|
-
import type { IconComponentProps
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import type { IconComponentProps } from "../icon";
|
|
3
|
+
import type { ButtonAppearance, ButtonAppearanceStyles, ButtonVariant } from "./Button";
|
|
4
|
+
import { type IconButtonBaseProps } from "./IconButtonBase";
|
|
5
|
+
export type IconButtonVariant = ButtonVariant;
|
|
5
6
|
export type IconButtonStyles = {
|
|
6
7
|
container: {
|
|
7
8
|
size: number;
|
|
8
|
-
backgroundColor: Record<IconButtonVariant, IconButtonBaseStyles["container"]["backgroundColor"]>;
|
|
9
|
-
};
|
|
10
|
-
icon: {
|
|
11
|
-
color: Record<IconButtonVariant, InteractiveIconStyles["color"]>;
|
|
12
9
|
};
|
|
10
|
+
appearance: ButtonAppearanceStyles;
|
|
13
11
|
};
|
|
14
12
|
export interface IconButtonProps extends Pick<IconButtonBaseProps, "onPress" | "disabled" | "containerStyle"> {
|
|
15
13
|
variant?: IconButtonVariant;
|
|
14
|
+
appearance?: ButtonAppearance;
|
|
16
15
|
style?: DeepPartial<IconButtonStyles>;
|
|
17
16
|
onPress?: () => void;
|
|
18
17
|
}
|
|
19
|
-
export declare const IconButton: <G extends string>({ variant, style, ...props }: IconButtonProps & IconComponentProps<G>) => import("react").JSX.Element;
|
|
18
|
+
export declare const IconButton: <G extends string>({ variant, appearance, style, ...props }: IconButtonProps & IconComponentProps<G>) => import("react").JSX.Element;
|
|
20
19
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/button/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/button/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EACR,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5E,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG;IAC3B,SAAS,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,UAAU,EAAE,sBAAsB,CAAC;CACtC,CAAC;AAEF,MAAM,WAAW,eACb,SAAQ,IAAI,CACR,mBAAmB,EACnB,SAAS,GAAG,UAAU,GAAG,gBAAgB,CAC5C;IACD,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,KAAK,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,0CAK1C,eAAe,GAAG,kBAAkB,CAAC,CAAC,CAAC,gCAyBzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/button/IconButton.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"IconButton.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/button/IconButton.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,uBAAuB,GAAI,OAAO,KAAK,KAAG,gBA4BtD,CAAC"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { type DimensionValue } from "react-native";
|
|
1
|
+
import { type ColorValue, type DimensionValue } from "react-native";
|
|
2
2
|
import type { DeepPartial } from "@reillymc/es-utils";
|
|
3
|
-
import { type IconComponentProps
|
|
3
|
+
import { type IconComponentProps } from "../icon";
|
|
4
4
|
import type { ButtonBaseProps, ButtonBaseStyles } from "./ButtonBase";
|
|
5
5
|
export type IconButtonBaseStyles = {
|
|
6
6
|
container: {
|
|
7
7
|
size: DimensionValue;
|
|
8
8
|
padding: number;
|
|
9
9
|
borderRadius: ButtonBaseStyles["borderRadius"];
|
|
10
|
-
backgroundColor:
|
|
10
|
+
backgroundColor: ColorValue;
|
|
11
|
+
};
|
|
12
|
+
icon: {
|
|
13
|
+
size: number;
|
|
14
|
+
color: ColorValue;
|
|
11
15
|
};
|
|
12
|
-
icon: InteractiveIconStyles;
|
|
13
16
|
};
|
|
14
17
|
export interface IconButtonBaseProps extends Pick<ButtonBaseProps, "onPress" | "disabled" | "containerStyle"> {
|
|
15
18
|
style?: DeepPartial<IconButtonBaseStyles>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButtonBase.d.ts","sourceRoot":"","sources":["../../../../src/components/button/IconButtonBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAc,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"IconButtonBase.d.ts","sourceRoot":"","sources":["../../../../src/components/button/IconButtonBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAc,MAAM,cAAc,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAY,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEtE,MAAM,MAAM,oBAAoB,GAAG;IAC/B,SAAS,EAAE;QACP,IAAI,EAAE,cAAc,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;QAC/C,eAAe,EAAE,UAAU,CAAC;KAC/B,CAAC;IACF,IAAI,EAAE;QACF,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,UAAU,CAAC;KACrB,CAAC;CACL,CAAC;AAEF,MAAM,WAAW,mBACb,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,UAAU,GAAG,gBAAgB,CAAC;IACxE,KAAK,CAAC,EAAE,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,EAAE,0FAM9C,mBAAmB,GAAG,kBAAkB,CAAC,CAAC,CAAC,gCAwB7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButtonBase.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/button/IconButtonBase.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,eAAO,MAAM,2BAA2B,GACpC,OAAO,KAAK,KACb,
|
|
1
|
+
{"version":3,"file":"IconButtonBase.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/button/IconButtonBase.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,eAAO,MAAM,2BAA2B,GACpC,OAAO,KAAK,KACb,oBAWD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Button, type ButtonProps, type ButtonStyles } from "./Button";
|
|
1
|
+
export { Button, type ButtonAppearance, type ButtonAppearanceStyles, type ButtonProps, type ButtonStyles, } from "./Button";
|
|
2
2
|
export { ButtonBase, type ButtonBaseProps, type ButtonBaseStyles, } from "./ButtonBase";
|
|
3
3
|
export { IconButton, type IconButtonProps, type IconButtonStyles, } from "./IconButton";
|
|
4
4
|
export { IconButtonBase, type IconButtonBaseProps, type IconButtonBaseStyles, } from "./IconButtonBase";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,MAAM,EACN,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,YAAY,GACpB,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACH,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACH,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC5B,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { Icon, type IconProps, type IconStyles } from "./Icon";
|
|
2
2
|
export { IconBase, type IconBaseProps, type IconBaseStyles } from "./IconBase";
|
|
3
3
|
export type { IconComponentProps } from "./IconComponentProps";
|
|
4
|
-
export { InteractiveIcon, type InteractiveIconProps, type InteractiveIconStyles, } from "./InteractiveIcon";
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC/E,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC/E,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export type { ActionBaseProps, ActionProps, ActionStyles, IconActionBaseProps, IconActionBaseStyles, IconActionProps, IconActionStyles, } from "./action";
|
|
2
|
-
export { Action, ActionBase, IconAction, IconActionBase
|
|
1
|
+
export type { ActionBaseProps, ActionBaseStyles, ActionProps, ActionStyles, IconActionBaseProps, IconActionBaseStyles, IconActionProps, IconActionStyles, StateTintStyles, } from "./action";
|
|
2
|
+
export { Action, ActionBase, IconAction, IconActionBase } from "./action";
|
|
3
3
|
export { AlertIndicator, type AlertIndicatorProps, type AlertIndicatorStyles, } from "./alert";
|
|
4
4
|
export { Avatar, type AvatarProps, type AvatarStyles } from "./avatar";
|
|
5
|
-
export type { ButtonBaseProps, ButtonBaseStyles, ButtonProps, ButtonStyles, IconButtonBaseProps, IconButtonBaseStyles, IconButtonProps, IconButtonStyles, } from "./button";
|
|
5
|
+
export type { ButtonAppearance, ButtonAppearanceStyles, ButtonBaseProps, ButtonBaseStyles, ButtonProps, ButtonStyles, IconButtonBaseProps, IconButtonBaseStyles, IconButtonProps, IconButtonStyles, } from "./button";
|
|
6
6
|
export { Button, ButtonBase, IconButton, IconButtonBase, } from "./button";
|
|
7
7
|
export type { FloatingContainerProps, FloatingContainerStyles, FormContainerProps, FormRowProps, PanelProps, } from "./container";
|
|
8
8
|
export { FloatingContainer, FormContainer, FormRow, Panel, } from "./container";
|
|
9
|
-
export type { IconBaseProps, IconBaseStyles, IconComponentProps, IconProps, IconStyles,
|
|
9
|
+
export type { IconBaseProps, IconBaseStyles, IconComponentProps, IconProps, IconStyles, } from "./icon";
|
|
10
10
|
export { Icon, IconBase } from "./icon";
|
|
11
11
|
export type { CounterInputIcons, CounterInputProps, DropdownInputProps, DropdownInputStyles, FractionValue, InputActionProps, InputActionStyles, InputBaseProps, InputBaseStyles, InputRowContainerProps, InputScaffoldIcons, InputScaffoldProps, InputScaffoldStyles, NumberInputIcons, NumberInputProps, NumberInputValue, NumberValue, RangeValue, RatingInputIcons, RatingInputProps, RatingInputStyles, SelectionInputIcons, SelectionInputProps, SelectionInputStyles, TextInputProps, TextInputStyles, TimeInputIcons, TimeInputProps, TimeInputValue, ToggleInputIcons, ToggleInputProps, ToggleInputStyles, } from "./input";
|
|
12
12
|
export { CounterInput, DropdownInput, DropdownInputBase, InputAction, InputBase, InputRowContainer, InputScaffold, NumberInput, RatingInput, SelectionInput, TextInput, TimeInput, ToggleInput, } from "./input";
|
|
@@ -14,9 +14,11 @@ 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 { getRatingIcons, Rating, type RatingIcons, type RatingProps, type RatingStyles, ratingToValue, valueToRating, } from "./rating";
|
|
17
|
+
export type { InteractionSurfaceProps, StateLayerStyles, } from "./surface";
|
|
18
|
+
export { InteractionSurface } from "./surface";
|
|
17
19
|
export { SwipeAction, type SwipeActionProps, type SwipeActionStyles, SwipeableContainer, type SwipeableContainerProps, } from "./swipe";
|
|
18
20
|
export { Tag, TagIcon, type TagProps, type TagStyles } from "./tag";
|
|
19
|
-
export type { HighlightedTextProps, HighlightedTextStyles,
|
|
21
|
+
export type { HighlightedTextProps, HighlightedTextStyles, TextProps, TextStyles, } from "./text";
|
|
20
22
|
export { HighlightedText, Text, } from "./text";
|
|
21
23
|
export { Toast, type ToastProps, type ToastStyles } from "./toast";
|
|
22
24
|
//# sourceMappingURL=index.d.ts.map
|