@os-design-mobile/menu 1.0.102 → 1.0.103

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,9 @@
1
+ import React from 'react';
1
2
  import { View, type ViewProps } from 'react-native';
2
3
  export type MenuDividerProps = ViewProps;
3
4
  /**
4
5
  * The divider of menu items.
5
6
  */
6
- declare const MenuDivider: import("react").ForwardRefExoticComponent<ViewProps & import("react").RefAttributes<View>>;
7
+ declare const MenuDivider: React.ForwardRefExoticComponent<ViewProps & React.RefAttributes<View>>;
7
8
  export default MenuDivider;
8
9
  //# sourceMappingURL=MenuDivider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuDivider.d.ts","sourceRoot":"","sources":["../src/MenuDivider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC;AASzC;;GAEG;AACH,QAAA,MAAM,WAAW,4FAEf,CAAC;AAIH,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"MenuDivider.d.ts","sourceRoot":"","sources":["../src/MenuDivider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC;AASzC;;GAEG;AACH,QAAA,MAAM,WAAW,wEAEf,CAAC;AAIH,eAAe,WAAW,CAAC"}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=require("react");var _native=_interopRequireDefault(require("@emotion/native"));var _theming=require("@os-design-mobile/theming");var _jsxRuntime=require("react/jsx-runtime");var StyledView=_native.default.View(function(p){return{paddingTop:p.theme.menuDividerIndent*p.theme.fontSize,borderBottomWidth:1,borderBottomColor:(0,_theming.clr)(p.theme.menuDividerColor),marginBottom:p.theme.menuDividerIndent*p.theme.fontSize};});var MenuDivider=(0,_react.forwardRef)(function(props,ref){return(0,_jsxRuntime.jsx)(StyledView,Object.assign({},props,{ref:ref}));});MenuDivider.displayName='MenuDivider';var _default=exports.default=MenuDivider;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _native=_interopRequireDefault(require("@emotion/native"));var _theming=require("@os-design-mobile/theming");var _jsxRuntime=require("react/jsx-runtime");function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var StyledView=_native.default.View(function(p){return{paddingTop:p.theme.menuDividerIndent*p.theme.fontSize,borderBottomWidth:1,borderBottomColor:(0,_theming.clr)(p.theme.menuDividerColor),marginBottom:p.theme.menuDividerIndent*p.theme.fontSize};});var MenuDivider=(0,_react.forwardRef)(function(props,ref){return(0,_jsxRuntime.jsx)(StyledView,Object.assign({},props,{ref:ref}));});MenuDivider.displayName='MenuDivider';var _default=exports.default=MenuDivider;
2
2
  //# sourceMappingURL=MenuDivider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuDivider.js","names":["_react","require","_native","_interopRequireDefault","_theming","_jsxRuntime","StyledView","styled","View","p","paddingTop","theme","menuDividerIndent","fontSize","borderBottomWidth","borderBottomColor","clr","menuDividerColor","marginBottom","MenuDivider","forwardRef","props","ref","jsx","Object","assign","displayName","_default","exports","default"],"sources":["../src/MenuDivider.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { View, type ViewProps } from 'react-native';\nimport styled from '@emotion/native';\nimport { clr } from '@os-design-mobile/theming';\n\nexport type MenuDividerProps = ViewProps;\n\nconst StyledView = styled.View((p) => ({\n paddingTop: p.theme.menuDividerIndent * p.theme.fontSize,\n borderBottomWidth: 1,\n borderBottomColor: clr(p.theme.menuDividerColor),\n marginBottom: p.theme.menuDividerIndent * p.theme.fontSize,\n}));\n\n/**\n * The divider of menu items.\n */\nconst MenuDivider = forwardRef<View, MenuDividerProps>((props, ref) => (\n <StyledView {...props} ref={ref} />\n));\n\nMenuDivider.displayName = 'MenuDivider';\n\nexport default MenuDivider;\n"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,OAAA,UAEA,IAAAC,OAAA,CAAAC,sBAAA,CAAAF,OAAA,qBACA,IAAAG,QAAA,CAAAH,OAAA,8BAAgD,IAAAI,WAAA,CAAAJ,OAAA,sBAIhD,GAAM,CAAAK,UAAU,CAAGC,eAAM,CAACC,IAAI,CAAC,SAACC,CAAC,QAAM,CACrCC,UAAU,CAAED,CAAC,CAACE,KAAK,CAACC,iBAAiB,CAAGH,CAAC,CAACE,KAAK,CAACE,QAAQ,CACxDC,iBAAiB,CAAE,CAAC,CACpBC,iBAAiB,CAAE,GAAAC,YAAG,EAACP,CAAC,CAACE,KAAK,CAACM,gBAAgB,CAAC,CAChDC,YAAY,CAAET,CAAC,CAACE,KAAK,CAACC,iBAAiB,CAAGH,CAAC,CAACE,KAAK,CAACE,QACpD,CAAC,EAAC,CAAC,CAKH,GAAM,CAAAM,WAAW,CAAG,GAAAC,iBAAU,EAAyB,SAACC,KAAK,CAAEC,GAAG,QAChE,GAAAjB,WAAA,CAAAkB,GAAA,EAACjB,UAAU,CAAAkB,MAAA,CAAAC,MAAA,IAAKJ,KAAK,EAAEC,GAAG,CAAEA,GAAI,EAAE,CAAC,EACpC,CAAC,CAEFH,WAAW,CAACO,WAAW,CAAG,aAAa,CAAC,IAAAC,QAAA,CAAAC,OAAA,CAAAC,OAAA,CAEzBV,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"MenuDivider.js","names":["_react","_interopRequireWildcard","require","_native","_interopRequireDefault","_theming","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","StyledView","styled","View","p","paddingTop","theme","menuDividerIndent","fontSize","borderBottomWidth","borderBottomColor","clr","menuDividerColor","marginBottom","MenuDivider","forwardRef","props","ref","jsx","assign","displayName","_default","exports"],"sources":["../src/MenuDivider.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { View, type ViewProps } from 'react-native';\nimport styled from '@emotion/native';\nimport { clr } from '@os-design-mobile/theming';\n\nexport type MenuDividerProps = ViewProps;\n\nconst StyledView = styled.View((p) => ({\n paddingTop: p.theme.menuDividerIndent * p.theme.fontSize,\n borderBottomWidth: 1,\n borderBottomColor: clr(p.theme.menuDividerColor),\n marginBottom: p.theme.menuDividerIndent * p.theme.fontSize,\n}));\n\n/**\n * The divider of menu items.\n */\nconst MenuDivider = forwardRef<View, MenuDividerProps>((props, ref) => (\n <StyledView {...props} ref={ref} />\n));\n\nMenuDivider.displayName = 'MenuDivider';\n\nexport default MenuDivider;\n"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAEA,IAAAC,OAAA,CAAAC,sBAAA,CAAAF,OAAA,qBACA,IAAAG,QAAA,CAAAH,OAAA,8BAAgD,IAAAI,WAAA,CAAAJ,OAAA,+BAAAK,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAA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ACC,iBAAiB,CAAGH,CAAC,CAACE,KAAK,CAACE,QACpD,CAAC,EAAC,CAAC,CAKH,GAAM,CAAAM,WAAW,CAAG,GAAAC,iBAAU,EAAyB,SAACC,KAAK,CAAEC,GAAG,QAChE,GAAArC,WAAA,CAAAsC,GAAA,EAACjB,UAAU,CAAAR,MAAA,CAAA0B,MAAA,IAAKH,KAAK,EAAEC,GAAG,CAAEA,GAAI,EAAE,CAAC,EACpC,CAAC,CAEFH,WAAW,CAACM,WAAW,CAAG,aAAa,CAAC,IAAAC,QAAA,CAAAC,OAAA,CAAAnC,OAAA,CAEzB2B,WAAW","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { type PropsWithChildren } from 'react';
1
+ import React, { type PropsWithChildren } from 'react';
2
2
  import { type ButtonProps } from '@os-design-mobile/button';
3
3
  export interface MenuItemProps extends PropsWithChildren<Omit<ButtonProps, 'type' | 'size'>> {
4
4
  /**
@@ -15,6 +15,6 @@ export interface MenuItemProps extends PropsWithChildren<Omit<ButtonProps, 'type
15
15
  /**
16
16
  * The base menu item.
17
17
  */
18
- declare const MenuItem: import("react").ForwardRefExoticComponent<MenuItemProps & import("react").RefAttributes<import("react").ForwardRefExoticComponent<Omit<import("react-native-gesture-handler").RectButtonProps, "innerRef"> & import("react").RefAttributes<any>>>>;
18
+ declare const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<React.ForwardRefExoticComponent<Omit<import("react-native-gesture-handler").RectButtonProps, "innerRef"> & React.RefAttributes<any>>>>;
19
19
  export default MenuItem;
20
20
  //# sourceMappingURL=MenuItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../src/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AAGf,OAAe,EAAE,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAMpE,MAAM,WAAW,aACf,SAAQ,iBAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC7D;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAYD;;GAEG;AACH,QAAA,MAAM,QAAQ,oPAiFb,CAAC;AAIF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../src/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEZ,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AAGf,OAAe,EAAE,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAMpE,MAAM,WAAW,aACf,SAAQ,iBAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC7D;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAYD;;GAEG;AACH,QAAA,MAAM,QAAQ,4MAiFb,CAAC;AAIF,eAAe,QAAQ,CAAC"}
package/dist/MenuItem.js CHANGED
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=require("react");var _theming=require("@os-design-mobile/theming");var _icons=require("@os-design-mobile/icons");var _button=_interopRequireDefault(require("@os-design-mobile/button"));var _native=_interopRequireDefault(require("@emotion/native"));var _menuUtils=require("@os-design/menu-utils");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["selected","value","right","viewProps","textProps","onPress"];var selectedStyles=function selectedStyles(p){return p.selected?{backgroundColor:(0,_theming.clr)(p.theme.menuItemSelectedColorBg)}:{};};var StyledButton=(0,_native.default)(_button.default)(selectedStyles);var MenuItem=(0,_react.forwardRef)(function(_ref,ref){var _ref$selected=_ref.selected,selected=_ref$selected===void 0?false:_ref$selected,value=_ref.value,right=_ref.right,_ref$viewProps=_ref.viewProps,viewProps=_ref$viewProps===void 0?{}:_ref$viewProps,_ref$textProps=_ref.textProps,textProps=_ref$textProps===void 0?{}:_ref$textProps,_ref$onPress=_ref.onPress,onPress=_ref$onPress===void 0?function(){}:_ref$onPress,rest=(0,_objectWithoutProperties2.default)(_ref,_excluded);var _useContext=(0,_react.useContext)(_menuUtils.MenuContext),closeOnSelect=_useContext.closeOnSelect,onClose=_useContext.onClose;var onPressRef=(0,_react.useRef)();var _useTheme=(0,_theming.useTheme)(),theme=_useTheme.theme;var safeAreaInsets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();(0,_react.useEffect)(function(){onPressRef.current=onPress;},[onPress]);var clickHandler=(0,_react.useCallback)(function(e){if(onPressRef.current)onPressRef.current(e);if(closeOnSelect)onClose();},[closeOnSelect,onClose]);return(0,_jsxRuntime.jsx)(_theming.ThemeOverrider,{overrides:function overrides(t){return{buttonGhostColorText:t.colorText,borderRadius:0,buttonHeight:theme.menuItemHeight,buttonPaddingHorizontal:theme.menuItemPaddingHorizontal};},children:(0,_jsxRuntime.jsx)(StyledButton,Object.assign({selected:selected,right:selected?(0,_jsxRuntime.jsx)(_theming.ThemeOverrider,{overrides:function overrides(t){return{colorText:t.menuItemSelectedColorIcon};},children:(0,_jsxRuntime.jsx)(_icons.Check,{})}):right,type:"ghost",onPress:clickHandler,viewProps:Object.assign({},viewProps,{style:Object.assign({},safeAreaInsets.left>0?{paddingLeft:safeAreaInsets.left}:{},safeAreaInsets.right>0?{paddingRight:safeAreaInsets.right}:{},typeof(viewProps==null?void 0:viewProps.style)==='object'?viewProps.style:{})}),textProps:Object.assign({},textProps,{style:Object.assign({flex:1,textAlign:'left',fontWeight:'normal'},typeof(textProps==null?void 0:textProps.style)==='object'?textProps.style:{})})},rest,{ref:ref}))});});MenuItem.displayName='MenuItem';var _default=exports.default=MenuItem;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _theming=require("@os-design-mobile/theming");var _icons=require("@os-design-mobile/icons");var _button=_interopRequireDefault(require("@os-design-mobile/button"));var _native=_interopRequireDefault(require("@emotion/native"));var _menuUtils=require("@os-design/menu-utils");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["selected","value","right","viewProps","textProps","onPress"];function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var selectedStyles=function selectedStyles(p){return p.selected?{backgroundColor:(0,_theming.clr)(p.theme.menuItemSelectedColorBg)}:{};};var StyledButton=(0,_native.default)(_button.default)(selectedStyles);var MenuItem=(0,_react.forwardRef)(function(_ref,ref){var _ref$selected=_ref.selected,selected=_ref$selected===void 0?false:_ref$selected,value=_ref.value,right=_ref.right,_ref$viewProps=_ref.viewProps,viewProps=_ref$viewProps===void 0?{}:_ref$viewProps,_ref$textProps=_ref.textProps,textProps=_ref$textProps===void 0?{}:_ref$textProps,_ref$onPress=_ref.onPress,onPress=_ref$onPress===void 0?function(){}:_ref$onPress,rest=(0,_objectWithoutProperties2.default)(_ref,_excluded);var _useContext=(0,_react.useContext)(_menuUtils.MenuContext),closeOnSelect=_useContext.closeOnSelect,onClose=_useContext.onClose;var onPressRef=(0,_react.useRef)();var _useTheme=(0,_theming.useTheme)(),theme=_useTheme.theme;var safeAreaInsets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();(0,_react.useEffect)(function(){onPressRef.current=onPress;},[onPress]);var clickHandler=(0,_react.useCallback)(function(e){if(onPressRef.current)onPressRef.current(e);if(closeOnSelect)onClose();},[closeOnSelect,onClose]);return(0,_jsxRuntime.jsx)(_theming.ThemeOverrider,{overrides:function overrides(t){return{buttonGhostColorText:t.colorText,borderRadius:0,buttonHeight:theme.menuItemHeight,buttonPaddingHorizontal:theme.menuItemPaddingHorizontal};},children:(0,_jsxRuntime.jsx)(StyledButton,Object.assign({selected:selected,right:selected?(0,_jsxRuntime.jsx)(_theming.ThemeOverrider,{overrides:function overrides(t){return{colorText:t.menuItemSelectedColorIcon};},children:(0,_jsxRuntime.jsx)(_icons.Check,{})}):right,type:"ghost",onPress:clickHandler,viewProps:Object.assign({},viewProps,{style:Object.assign({},safeAreaInsets.left>0?{paddingLeft:safeAreaInsets.left}:{},safeAreaInsets.right>0?{paddingRight:safeAreaInsets.right}:{},typeof(viewProps==null?void 0:viewProps.style)==='object'?viewProps.style:{})}),textProps:Object.assign({},textProps,{style:Object.assign({flex:1,textAlign:'left',fontWeight:'normal'},typeof(textProps==null?void 0:textProps.style)==='object'?textProps.style:{})})},rest,{ref:ref}))});});MenuItem.displayName='MenuItem';var _default=exports.default=MenuItem;
2
2
  //# sourceMappingURL=MenuItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.js","names":["_react","require","_theming","_icons","_button","_interopRequireDefault","_native","_menuUtils","_reactNativeSafeAreaContext","_jsxRuntime","_excluded","selectedStyles","p","selected","backgroundColor","clr","theme","menuItemSelectedColorBg","StyledButton","styled","Button","MenuItem","forwardRef","_ref","ref","_ref$selected","value","right","_ref$viewProps","viewProps","_ref$textProps","textProps","_ref$onPress","onPress","rest","_objectWithoutProperties2","default","_useContext","useContext","MenuContext","closeOnSelect","onClose","onPressRef","useRef","_useTheme","useTheme","safeAreaInsets","useSafeAreaInsets","useEffect","current","clickHandler","useCallback","e","jsx","ThemeOverrider","overrides","t","buttonGhostColorText","colorText","borderRadius","buttonHeight","menuItemHeight","buttonPaddingHorizontal","menuItemPaddingHorizontal","children","Object","assign","menuItemSelectedColorIcon","Check","type","style","left","paddingLeft","paddingRight","flex","textAlign","fontWeight","displayName","_default","exports"],"sources":["../src/MenuItem.tsx"],"sourcesContent":["import {\n forwardRef,\n type PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from 'react';\nimport { clr, ThemeOverrider, useTheme } from '@os-design-mobile/theming';\nimport { Check } from '@os-design-mobile/icons';\nimport Button, { type ButtonProps } from '@os-design-mobile/button';\nimport { RectButton } from 'react-native-gesture-handler';\nimport styled from '@emotion/native';\nimport { MenuContext } from '@os-design/menu-utils';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nexport interface MenuItemProps\n extends PropsWithChildren<Omit<ButtonProps, 'type' | 'size'>> {\n /**\n * Whether the menu item is selected.\n * @default false\n */\n selected?: boolean;\n /**\n * The value of the menu item.\n * @default undefined\n */\n value?: string;\n}\n\nconst selectedStyles = (p) =>\n p.selected\n ? {\n backgroundColor: clr(p.theme.menuItemSelectedColorBg),\n }\n : {};\n\ntype StyledButtonProps = Required<Pick<MenuItemProps, 'selected'>>;\nconst StyledButton = styled(Button)<StyledButtonProps>(selectedStyles);\n\n/**\n * The base menu item.\n */\nconst MenuItem = forwardRef<typeof RectButton, MenuItemProps>(\n (\n {\n selected = false,\n value,\n right,\n viewProps = {},\n textProps = {},\n onPress = () => {},\n ...rest\n },\n ref\n ) => {\n const { closeOnSelect, onClose } = useContext(MenuContext);\n const onPressRef = useRef<MenuItemProps['onPress']>();\n const { theme } = useTheme();\n const safeAreaInsets = useSafeAreaInsets();\n\n useEffect(() => {\n onPressRef.current = onPress;\n }, [onPress]);\n\n const clickHandler = useCallback(\n (e) => {\n if (onPressRef.current) onPressRef.current(e);\n if (closeOnSelect) onClose();\n },\n [closeOnSelect, onClose]\n );\n\n return (\n <ThemeOverrider\n overrides={(t) => ({\n buttonGhostColorText: t.colorText,\n borderRadius: 0,\n buttonHeight: theme.menuItemHeight,\n buttonPaddingHorizontal: theme.menuItemPaddingHorizontal,\n })}\n >\n <StyledButton\n selected={selected}\n right={\n selected ? (\n <ThemeOverrider\n overrides={(t) => ({ colorText: t.menuItemSelectedColorIcon })}\n >\n <Check />\n </ThemeOverrider>\n ) : (\n right\n )\n }\n type='ghost'\n onPress={clickHandler}\n viewProps={{\n ...viewProps,\n style: {\n ...(safeAreaInsets.left > 0\n ? { paddingLeft: safeAreaInsets.left }\n : {}),\n ...(safeAreaInsets.right > 0\n ? { paddingRight: safeAreaInsets.right }\n : {}),\n ...(typeof viewProps?.style === 'object' ? viewProps.style : {}),\n },\n }}\n textProps={{\n ...textProps,\n style: {\n flex: 1,\n textAlign: 'left',\n fontWeight: 'normal',\n ...(typeof textProps?.style === 'object' ? textProps.style : {}),\n },\n }}\n {...rest}\n ref={ref}\n />\n </ThemeOverrider>\n );\n }\n);\n\nMenuItem.displayName = 'MenuItem';\n\nexport default MenuItem;\n"],"mappings":"mRAAA,IAAAA,MAAA,CAAAC,OAAA,UAQA,IAAAC,QAAA,CAAAD,OAAA,8BACA,IAAAE,MAAA,CAAAF,OAAA,4BACA,IAAAG,OAAA,CAAAC,sBAAA,CAAAJ,OAAA,8BAEA,IAAAK,OAAA,CAAAD,sBAAA,CAAAJ,OAAA,qBACA,IAAAM,UAAA,CAAAN,OAAA,0BACA,IAAAO,2BAAA,CAAAP,OAAA,mCAAmE,IAAAQ,WAAA,CAAAR,OAAA,0BAAAS,SAAA,gEAgBnE,GAAM,CAAAC,cAAc,CAA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AAc,CAACyB,IAAI,CAAG,CAAC,CACvB,CAAEC,WAAW,CAAE1B,cAAc,CAACyB,IAAK,CAAC,CACpC,CAAC,CAAC,CACFzB,cAAc,CAACnB,KAAK,CAAG,CAAC,CACxB,CAAE8C,YAAY,CAAE3B,cAAc,CAACnB,KAAM,CAAC,CACtC,CAAC,CAAC,CACF,OAAOE,SAAS,cAATA,SAAS,CAAEyC,KAAK,IAAK,QAAQ,CAAGzC,SAAS,CAACyC,KAAK,CAAG,CAAC,CAAC,CAChE,EACD,CACFvC,SAAS,CAAAkC,MAAA,CAAAC,MAAA,IACJnC,SAAS,EACZuC,KAAK,CAAAL,MAAA,CAAAC,MAAA,EACHQ,IAAI,CAAE,CAAC,CACPC,SAAS,CAAE,MAAM,CACjBC,UAAU,CAAE,QAAQ,EAChB,OAAO7C,SAAS,cAATA,SAAS,CAAEuC,KAAK,IAAK,QAAQ,CAAGvC,SAAS,CAACuC,KAAK,CAAG,CAAC,CAAC,CAChE,EACD,EACEpC,IAAI,EACRV,GAAG,CAAEA,GAAI,EACV,CAAC,CACY,CAAC,CAErB,CACF,CAAC,CAEDH,QAAQ,CAACwD,WAAW,CAAG,UAAU,CAAC,IAAAC,QAAA,CAAAC,OAAA,CAAA3C,OAAA,CAEnBf,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"MenuItem.js","names":["_react","_interopRequireWildcard","require","_theming","_icons","_button","_interopRequireDefault","_native","_menuUtils","_reactNativeSafeAreaContext","_jsxRuntime","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","selectedStyles","p","selected","backgroundColor","clr","theme","menuItemSelectedColorBg","StyledButton","styled","Button","MenuItem","forwardRef","_ref","ref","_ref$selected","value","right","_ref$viewProps","viewProps","_ref$textProps","textProps","_ref$onPress","onPress","rest","_objectWithoutProperties2","_useContext","useContext","MenuContext","closeOnSelect","onClose","onPressRef","useRef","_useTheme","useTheme","safeAreaInsets","useSafeAreaInsets","useEffect","current","clickHandler","useCallback","jsx","ThemeOverrider","overrides","buttonGhostColorText","colorText","borderRadius","buttonHeight","menuItemHeight","buttonPaddingHorizontal","menuItemPaddingHorizontal","children","assign","menuItemSelectedColorIcon","Check","type","style","left","paddingLeft","paddingRight","flex","textAlign","fontWeight","displayName","_default","exports"],"sources":["../src/MenuItem.tsx"],"sourcesContent":["import React, {\n forwardRef,\n type PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from 'react';\nimport { clr, ThemeOverrider, useTheme } from '@os-design-mobile/theming';\nimport { Check } from '@os-design-mobile/icons';\nimport Button, { type ButtonProps } from '@os-design-mobile/button';\nimport { RectButton } from 'react-native-gesture-handler';\nimport styled from '@emotion/native';\nimport { MenuContext } from '@os-design/menu-utils';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nexport interface MenuItemProps\n extends PropsWithChildren<Omit<ButtonProps, 'type' | 'size'>> {\n /**\n * Whether the menu item is selected.\n * @default false\n */\n selected?: boolean;\n /**\n * The value of the menu item.\n * @default undefined\n */\n value?: string;\n}\n\nconst selectedStyles = (p) =>\n p.selected\n ? {\n backgroundColor: clr(p.theme.menuItemSelectedColorBg),\n }\n : {};\n\ntype StyledButtonProps = Required<Pick<MenuItemProps, 'selected'>>;\nconst StyledButton = styled(Button)<StyledButtonProps>(selectedStyles);\n\n/**\n * The base menu item.\n */\nconst MenuItem = forwardRef<typeof RectButton, MenuItemProps>(\n (\n {\n selected = false,\n value,\n right,\n viewProps = {},\n textProps = {},\n onPress = () => {},\n ...rest\n },\n ref\n ) => {\n const { closeOnSelect, onClose } = useContext(MenuContext);\n const onPressRef = useRef<MenuItemProps['onPress']>();\n const { theme } = useTheme();\n const safeAreaInsets = useSafeAreaInsets();\n\n useEffect(() => {\n onPressRef.current = onPress;\n }, [onPress]);\n\n const clickHandler = useCallback(\n (e) => {\n if (onPressRef.current) onPressRef.current(e);\n if (closeOnSelect) onClose();\n },\n [closeOnSelect, onClose]\n );\n\n return (\n <ThemeOverrider\n overrides={(t) => ({\n buttonGhostColorText: t.colorText,\n borderRadius: 0,\n buttonHeight: theme.menuItemHeight,\n buttonPaddingHorizontal: theme.menuItemPaddingHorizontal,\n })}\n >\n <StyledButton\n selected={selected}\n right={\n selected ? (\n <ThemeOverrider\n overrides={(t) => ({ colorText: t.menuItemSelectedColorIcon })}\n >\n <Check />\n </ThemeOverrider>\n ) : (\n right\n )\n }\n type='ghost'\n onPress={clickHandler}\n viewProps={{\n ...viewProps,\n style: {\n ...(safeAreaInsets.left > 0\n ? { paddingLeft: safeAreaInsets.left }\n : {}),\n ...(safeAreaInsets.right > 0\n ? { paddingRight: safeAreaInsets.right }\n : {}),\n ...(typeof viewProps?.style === 'object' ? viewProps.style : {}),\n },\n }}\n textProps={{\n ...textProps,\n style: {\n flex: 1,\n textAlign: 'left',\n fontWeight: 'normal',\n ...(typeof textProps?.style === 'object' ? textProps.style : {}),\n },\n }}\n {...rest}\n ref={ref}\n />\n </ThemeOverrider>\n );\n }\n);\n\nMenuItem.displayName = 'MenuItem';\n\nexport default MenuItem;\n"],"mappings":"mRAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAQA,IAAAC,QAAA,CAAAD,OAAA,8BACA,IAAAE,MAAA,CAAAF,OAAA,4BACA,IAAAG,OAAA,CAAAC,sBAAA,CAAAJ,OAAA,8BAEA,IAAAK,OAAA,CAAAD,sBAAA,CAAAJ,OAAA,qBACA,IAAAM,UAAA,CAAAN,OAAA,0BACA,IAAAO,2BAAA,CAAAP,OAAA,mCAAmE,IAAAQ,WAAA,CAAAR,OAAA,0BAAAS,SAAA,yEAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAZ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G,CAAC,CAAC,CAChE,EACD,CACFnC,SAAS,CAAA5B,MAAA,CAAA2D,MAAA,IACJ/B,SAAS,EACZmC,KAAK,CAAA/D,MAAA,CAAA2D,MAAA,EACHQ,IAAI,CAAE,CAAC,CACPC,SAAS,CAAE,MAAM,CACjBC,UAAU,CAAE,QAAQ,EAChB,OAAOzC,SAAS,cAATA,SAAS,CAAEmC,KAAK,IAAK,QAAQ,CAAGnC,SAAS,CAACmC,KAAK,CAAG,CAAC,CAAC,CAChE,EACD,EACEhC,IAAI,EACRV,GAAG,CAAEA,GAAI,EACV,CAAC,CACY,CAAC,CAErB,CACF,CAAC,CAEDH,QAAQ,CAACoD,WAAW,CAAG,UAAU,CAAC,IAAAC,QAAA,CAAAC,OAAA,CAAA9E,OAAA,CAEnBwB,QAAQ","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@os-design-mobile/menu",
3
- "version": "1.0.102",
3
+ "version": "1.0.103",
4
4
  "license": "UNLICENSED",
5
5
  "repository": "git@gitlab.com:os-team/libs/os-design-mobile.git",
6
6
  "type": "module",
@@ -29,15 +29,15 @@
29
29
  "access": "public"
30
30
  },
31
31
  "dependencies": {
32
- "@os-design-mobile/button": "^1.0.70",
33
- "@os-design-mobile/icons": "^1.0.66",
34
- "@os-design-mobile/modal": "^1.0.106",
35
- "@os-design-mobile/theming": "^1.0.48",
36
- "@os-design/menu-utils": "^1.0.25",
37
- "@os-design/use-forwarded-state": "^1.0.27"
32
+ "@os-design-mobile/button": "^1.0.71",
33
+ "@os-design-mobile/icons": "^1.0.67",
34
+ "@os-design-mobile/modal": "^1.0.107",
35
+ "@os-design-mobile/theming": "^1.0.49",
36
+ "@os-design/menu-utils": "^1.0.26",
37
+ "@os-design/use-forwarded-state": "^1.0.28"
38
38
  },
39
39
  "devDependencies": {
40
- "@os-design-mobile/text": "^1.0.64"
40
+ "@os-design-mobile/text": "^1.0.65"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@emotion/native": ">=11",
@@ -49,5 +49,5 @@
49
49
  "react-native-safe-area-context": ">=3",
50
50
  "react-native-svg": ">=12"
51
51
  },
52
- "gitHead": "1de2f821ec10cf3084e3d92df85e74d5632ab005"
52
+ "gitHead": "47dde6916b834182f7672f43ac889c7ed308db8f"
53
53
  }
@@ -1,4 +1,4 @@
1
- import { forwardRef } from 'react';
1
+ import React, { forwardRef } from 'react';
2
2
  import { View, type ViewProps } from 'react-native';
3
3
  import styled from '@emotion/native';
4
4
  import { clr } from '@os-design-mobile/theming';
package/src/MenuItem.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import {
1
+ import React, {
2
2
  forwardRef,
3
3
  type PropsWithChildren,
4
4
  useCallback,