@neko-os/ui 0.0.6 → 0.0.8

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.
Files changed (217) hide show
  1. package/dist/NekoUI.js +1 -1
  2. package/dist/abstractions/AnimatedView.js +1 -1
  3. package/dist/abstractions/BlurView.js +1 -0
  4. package/dist/abstractions/BlurView.native.js +1 -0
  5. package/dist/abstractions/GradientView.js +1 -0
  6. package/dist/abstractions/GradientView.native.js +1 -0
  7. package/dist/abstractions/Icon.native.js +1 -1
  8. package/dist/abstractions/ImageBackground.js +1 -0
  9. package/dist/abstractions/ImageBackground.native.js +1 -0
  10. package/dist/abstractions/ImageBackground.web.js +1 -0
  11. package/dist/abstractions/Pressable.js +1 -0
  12. package/dist/abstractions/Pressable.native.js +1 -0
  13. package/dist/abstractions/Pressable.web.js +1 -0
  14. package/dist/abstractions/ScrollView.js +1 -0
  15. package/dist/abstractions/ScrollView.native.js +1 -0
  16. package/dist/abstractions/TextInput.js +1 -1
  17. package/dist/components/actions/Button.js +1 -1
  18. package/dist/components/actions/Dropdown.js +1 -1
  19. package/dist/components/actions/Link.js +1 -1
  20. package/dist/components/actions/Pressable.js +1 -0
  21. package/dist/components/actions/index.js +1 -1
  22. package/dist/components/actions/menu/HorizontalMenu.js +1 -1
  23. package/dist/components/actions/menu/VerticalMenu.js +1 -1
  24. package/dist/components/animations/ReanimatedView.js +1 -0
  25. package/dist/components/calendar/CalendarNav.js +1 -0
  26. package/dist/components/calendar/WeekDaysBar.js +1 -0
  27. package/dist/components/calendar/_helpers/calendarDays.js +1 -1
  28. package/dist/components/calendar/_helpers/dateDisabled.js +1 -0
  29. package/dist/components/calendar/index.js +0 -1
  30. package/dist/components/feedback/alerter.js +1 -0
  31. package/dist/components/feedback/confirmer.js +1 -0
  32. package/dist/components/feedback/index.js +1 -1
  33. package/dist/components/feedback/notifications/Notification.js +1 -1
  34. package/dist/components/feedback/notifications/NotificationsHandler.js +1 -1
  35. package/dist/components/index.js +1 -1
  36. package/dist/components/inputs/DateInput.js +1 -0
  37. package/dist/components/inputs/InputWrapper.js +1 -1
  38. package/dist/components/inputs/LinkInput.js +1 -0
  39. package/dist/components/inputs/MaskInput.js +1 -0
  40. package/dist/components/inputs/TextInput.js +1 -1
  41. package/dist/components/inputs/_DateInput.native.js +1 -0
  42. package/dist/components/inputs/datePicker/DatePicker.js +1 -0
  43. package/dist/components/inputs/datePicker/DayPicker.js +1 -0
  44. package/dist/components/inputs/datePicker/MonthPicker.js +1 -0
  45. package/dist/components/inputs/datePicker/QuarterPicker.js +1 -0
  46. package/dist/components/inputs/datePicker/WeekPicker.js +1 -0
  47. package/dist/components/inputs/datePicker/YearPicker.js +1 -0
  48. package/dist/components/inputs/index.js +1 -1
  49. package/dist/components/list/ScrollView.js +1 -0
  50. package/dist/components/list/index.js +1 -0
  51. package/dist/components/presentation/ImageBackground.js +1 -0
  52. package/dist/components/presentation/Result.js +1 -1
  53. package/dist/components/presentation/index.js +1 -1
  54. package/dist/components/structure/Accordion.js +1 -1
  55. package/dist/components/structure/BlurView.js +1 -0
  56. package/dist/components/structure/GradientView.js +1 -0
  57. package/dist/components/structure/bottomDrawer/index.js +1 -0
  58. package/dist/components/structure/bottomDrawer/index.native.js +1 -0
  59. package/dist/components/structure/bottomDrawer/index.web.js +1 -0
  60. package/dist/components/structure/bottomDrawer/native/BottomDrawer.js +1 -0
  61. package/dist/components/structure/bottomDrawer/native/DrawerContext.js +1 -0
  62. package/dist/components/structure/bottomDrawer/native/DrawerHandle.js +1 -0
  63. package/dist/components/structure/bottomDrawer/native/DrawerScrollView.js +1 -0
  64. package/dist/components/structure/bottomDrawer/native/utils.js +1 -0
  65. package/dist/components/structure/bottomDrawer/web/BottomDrawer.js +1 -0
  66. package/dist/components/structure/drawer/Drawer.js +1 -0
  67. package/dist/components/structure/drawer/Drawer.native.js +1 -0
  68. package/dist/components/structure/drawer/index.js +1 -0
  69. package/dist/components/structure/index.js +1 -1
  70. package/dist/components/structure/modal/Modal.js +1 -0
  71. package/dist/components/structure/modal/Modal.native.js +1 -0
  72. package/dist/components/structure/modal/ModalBackdrop.js +1 -0
  73. package/dist/components/structure/modal/ModalContent.js +1 -0
  74. package/dist/components/structure/modal/ModalFooter.js +1 -0
  75. package/dist/components/structure/modal/ModalHeader.js +1 -0
  76. package/dist/components/structure/modal/handler/ModalsHandler.js +1 -0
  77. package/dist/components/structure/modal/index.js +1 -0
  78. package/dist/components/structure/overlay/OverlayWrapper.js +1 -1
  79. package/dist/components/structure/popover/Popover.js +1 -1
  80. package/dist/components/structure/popover/Popover.native.js +1 -1
  81. package/dist/modifiers/animations/animatedEffects.js +1 -1
  82. package/dist/modifiers/animations/animatedEffects.native.js +1 -1
  83. package/dist/modifiers/animations/fadeEffect.js +1 -1
  84. package/dist/modifiers/animations/scaleEffect.js +1 -0
  85. package/dist/modifiers/animations/scaleEffect.native.js +1 -0
  86. package/dist/modifiers/animations/slideEffect.js +1 -1
  87. package/dist/modifiers/background.js +1 -1
  88. package/dist/modifiers/cursor.js +1 -0
  89. package/dist/modifiers/display.js +1 -1
  90. package/dist/modifiers/hover.js +1 -0
  91. package/dist/modifiers/position.js +1 -1
  92. package/dist/modifiers/size.js +1 -1
  93. package/dist/modifiers/state.js +1 -1
  94. package/dist/responsive/responsiveHooks.js +1 -1
  95. package/dist/theme/default/blackTheme.js +1 -0
  96. package/dist/theme/default/cyberpunkTheme.js +1 -1
  97. package/dist/theme/default/darkTheme.js +1 -1
  98. package/dist/theme/default/deepWoodsTheme.js +1 -1
  99. package/dist/theme/default/forestTheme.js +1 -1
  100. package/dist/theme/default/hackerTheme.js +1 -1
  101. package/dist/theme/default/lightTheme.js +1 -1
  102. package/dist/theme/default/midnightTheme.js +1 -1
  103. package/dist/theme/default/msdosTheme.js +1 -1
  104. package/dist/theme/default/oceanTheme.js +1 -1
  105. package/dist/theme/default/pastelTheme.js +1 -1
  106. package/dist/theme/default/sunsetTheme.js +1 -1
  107. package/dist/theme/default/themes.js +1 -1
  108. package/package.json +11 -5
  109. package/src/NekoUI.js +6 -3
  110. package/src/abstractions/AnimatedView.js +3 -3
  111. package/src/abstractions/BlurView.js +43 -0
  112. package/src/abstractions/BlurView.native.js +39 -0
  113. package/src/abstractions/GradientView.js +5 -0
  114. package/src/abstractions/GradientView.native.js +32 -0
  115. package/src/abstractions/Icon.native.js +4 -2
  116. package/src/abstractions/ImageBackground.js +17 -0
  117. package/src/abstractions/ImageBackground.native.js +27 -0
  118. package/src/abstractions/ImageBackground.web.js +7 -0
  119. package/src/abstractions/Pressable.js +4 -0
  120. package/src/abstractions/Pressable.native.js +3 -0
  121. package/src/abstractions/Pressable.web.js +3 -0
  122. package/src/abstractions/ScrollView.js +3 -0
  123. package/src/abstractions/ScrollView.native.js +5 -0
  124. package/src/abstractions/TextInput.js +2 -2
  125. package/src/components/actions/Button.js +7 -0
  126. package/src/components/actions/Dropdown.js +2 -1
  127. package/src/components/actions/Link.js +16 -2
  128. package/src/components/actions/Pressable.js +38 -0
  129. package/src/components/actions/index.js +1 -0
  130. package/src/components/actions/menu/HorizontalMenu.js +2 -1
  131. package/src/components/actions/menu/VerticalMenu.js +4 -3
  132. package/src/components/animations/ReanimatedView.js +40 -0
  133. package/src/components/calendar/CalendarNav.js +67 -0
  134. package/src/components/calendar/WeekDaysBar.js +18 -0
  135. package/src/components/calendar/_helpers/calendarDays.js +1 -3
  136. package/src/components/calendar/_helpers/dateDisabled.js +24 -0
  137. package/src/components/calendar/index.js +1 -1
  138. package/src/components/feedback/alerter.js +31 -0
  139. package/src/components/feedback/confirmer.js +70 -0
  140. package/src/components/feedback/index.js +2 -0
  141. package/src/components/feedback/notifications/Notification.js +1 -1
  142. package/src/components/feedback/notifications/NotificationsHandler.js +3 -3
  143. package/src/components/index.js +1 -0
  144. package/src/components/inputs/DateInput.js +111 -0
  145. package/src/components/inputs/InputWrapper.js +18 -6
  146. package/src/components/inputs/LinkInput.js +17 -0
  147. package/src/components/inputs/MaskInput.js +67 -0
  148. package/src/components/inputs/TextInput.js +2 -2
  149. package/src/components/inputs/_DateInput.native.js +89 -0
  150. package/src/components/inputs/datePicker/DatePicker.js +24 -0
  151. package/src/components/inputs/datePicker/DayPicker.js +65 -0
  152. package/src/components/inputs/datePicker/MonthPicker.js +62 -0
  153. package/src/components/inputs/datePicker/QuarterPicker.js +65 -0
  154. package/src/components/inputs/datePicker/WeekPicker.js +74 -0
  155. package/src/components/inputs/datePicker/YearPicker.js +67 -0
  156. package/src/components/inputs/index.js +4 -0
  157. package/src/components/list/ScrollView.js +58 -0
  158. package/src/components/list/index.js +1 -0
  159. package/src/components/presentation/ImageBackground.js +38 -0
  160. package/src/components/presentation/Result.js +2 -2
  161. package/src/components/presentation/index.js +1 -0
  162. package/src/components/structure/Accordion.js +1 -1
  163. package/src/components/structure/BlurView.js +58 -0
  164. package/src/components/structure/GradientView.js +42 -0
  165. package/src/components/structure/bottomDrawer/index.js +1 -0
  166. package/src/components/structure/bottomDrawer/index.native.js +4 -0
  167. package/src/components/structure/bottomDrawer/index.web.js +4 -0
  168. package/src/components/structure/bottomDrawer/native/BottomDrawer.js +229 -0
  169. package/src/components/structure/bottomDrawer/native/DrawerContext.js +21 -0
  170. package/src/components/structure/bottomDrawer/native/DrawerHandle.js +12 -0
  171. package/src/components/structure/bottomDrawer/native/DrawerScrollView.js +83 -0
  172. package/src/components/structure/bottomDrawer/native/utils.js +58 -0
  173. package/src/components/structure/bottomDrawer/web/BottomDrawer.js +3 -0
  174. package/src/components/structure/drawer/Drawer.js +5 -0
  175. package/src/components/structure/drawer/Drawer.native.js +3 -0
  176. package/src/components/structure/drawer/index.js +1 -0
  177. package/src/components/structure/index.js +5 -0
  178. package/src/components/structure/modal/Modal.js +84 -0
  179. package/src/components/structure/modal/Modal.native.js +83 -0
  180. package/src/components/structure/modal/ModalBackdrop.js +58 -0
  181. package/src/components/structure/modal/ModalContent.js +28 -0
  182. package/src/components/structure/modal/ModalFooter.js +31 -0
  183. package/src/components/structure/modal/ModalHeader.js +50 -0
  184. package/src/components/structure/modal/handler/ModalsHandler.js +61 -0
  185. package/src/components/structure/modal/index.js +6 -0
  186. package/src/components/structure/overlay/OverlayWrapper.js +1 -1
  187. package/src/components/structure/popover/Popover.js +28 -2
  188. package/src/components/structure/popover/Popover.native.js +44 -15
  189. package/src/modifiers/animations/animatedEffects.js +2 -0
  190. package/src/modifiers/animations/animatedEffects.native.js +3 -1
  191. package/src/modifiers/animations/fadeEffect.js +4 -2
  192. package/src/modifiers/animations/scaleEffect.js +45 -0
  193. package/src/modifiers/animations/scaleEffect.native.js +33 -0
  194. package/src/modifiers/animations/slideEffect.js +3 -1
  195. package/src/modifiers/background.js +16 -4
  196. package/src/modifiers/cursor.js +21 -0
  197. package/src/modifiers/display.js +2 -2
  198. package/src/modifiers/hover.js +28 -0
  199. package/src/modifiers/position.js +24 -3
  200. package/src/modifiers/size.js +2 -1
  201. package/src/modifiers/state.js +1 -1
  202. package/src/responsive/responsiveHooks.js +7 -0
  203. package/src/theme/default/blackTheme.js +32 -0
  204. package/src/theme/default/cyberpunkTheme.js +1 -0
  205. package/src/theme/default/darkTheme.js +1 -0
  206. package/src/theme/default/deepWoodsTheme.js +1 -0
  207. package/src/theme/default/forestTheme.js +1 -0
  208. package/src/theme/default/hackerTheme.js +1 -0
  209. package/src/theme/default/lightTheme.js +1 -0
  210. package/src/theme/default/midnightTheme.js +1 -0
  211. package/src/theme/default/msdosTheme.js +1 -0
  212. package/src/theme/default/oceanTheme.js +1 -0
  213. package/src/theme/default/pastelTheme.js +2 -1
  214. package/src/theme/default/sunsetTheme.js +2 -1
  215. package/src/theme/default/themes.js +2 -0
  216. package/dist/components/calendar/DayPicker.js +0 -1
  217. package/src/components/calendar/DayPicker.js +0 -91
package/dist/NekoUI.js CHANGED
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/NekoUI.js";var _excluded=["children"];import{NotificationsHandler}from"./components/feedback/notifications/NotificationsHandler";import{OverlayHandler}from"./components/structure/overlay/OverlayHandler";import{PortalHandler}from"./components/helpers/PortalHandler";import{ResponsiveHandler}from"./responsive/ResponsiveHandler";import{ThemeHandler}from"./theme/ThemeHandler";import{jsx as _jsx}from"react/jsx-runtime";export function NekoUI(_ref){var children=_ref.children,props=_objectWithoutProperties(_ref,_excluded);return _jsx(ThemeHandler,Object.assign({},props,{children:_jsx(ResponsiveHandler,{children:_jsx(PortalHandler,{children:_jsx(NotificationsHandler,{children:_jsx(OverlayHandler,{children:children})})})})}));}
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/NekoUI.js";var _excluded=["children"];import{ModalsHandler}from"./components/structure/modal/handler/ModalsHandler";import{NotificationsHandler}from"./components/feedback/notifications/NotificationsHandler";import{OverlayHandler}from"./components/structure/overlay/OverlayHandler";import{PortalHandler}from"./components/helpers/PortalHandler";import{ResponsiveHandler}from"./responsive/ResponsiveHandler";import{ThemeHandler}from"./theme/ThemeHandler";import{jsx as _jsx}from"react/jsx-runtime";export function NekoUI(_ref){var children=_ref.children,props=_objectWithoutProperties(_ref,_excluded);return _jsx(ThemeHandler,Object.assign({},props,{children:_jsx(ResponsiveHandler,{children:_jsx(PortalHandler,{children:_jsx(ModalsHandler,{children:_jsx(NotificationsHandler,{children:_jsx(OverlayHandler,{children:children})})})})})}));}
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/AnimatedView.js";var _excluded=["children","style"];import{jsx as _jsx}from"react/jsx-runtime";export function AbsAnimatedView(_ref){var children=_ref.children,style=_ref.style,props=_objectWithoutProperties(_ref,_excluded);return _jsx("div",{style:style,children:children});}
1
+ import{AbsView}from"./View";export var AbsAnimatedView=AbsView;
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["tint","intensity","style"];var _this=this,_jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/BlurView.js";import{AbsView}from"./View";import{jsx as _jsx}from"react/jsx-runtime";var tintMap={light:'rgba(255,255,255,0.3)',dark:'rgba(0,0,0,0.3)',default:'rgba(255,255,255,0.2)',extraLight:'rgba(255,255,255,0.5)',regular:'rgba(255,255,255,0.3)',prominent:'rgba(255,255,255,0.7)',systemUltraThinMaterial:'rgba(255,255,255,0.1)',systemThinMaterial:'rgba(255,255,255,0.2)',systemMaterial:'rgba(255,255,255,0.3)',systemThickMaterial:'rgba(255,255,255,0.4)',systemChromeMaterial:'rgba(255,255,255,0.5)',systemUltraThinMaterialLight:'rgba(255,255,255,0.1)',systemThinMaterialLight:'rgba(255,255,255,0.2)',systemMaterialLight:'rgba(255,255,255,0.3)',systemThickMaterialLight:'rgba(255,255,255,0.4)',systemChromeMaterialLight:'rgba(255,255,255,0.5)',systemUltraThinMaterialDark:'rgba(0,0,0,0.1)',systemThinMaterialDark:'rgba(0,0,0,0.2)',systemMaterialDark:'rgba(0,0,0,0.3)',systemThickMaterialDark:'rgba(0,0,0,0.4)',systemChromeMaterialDark:'rgba(0,0,0,0.5)'};export var AbsBlurView=function AbsBlurView(_ref){var tint=_ref.tint,intensity=_ref.intensity,style=_ref.style,props=_objectWithoutProperties(_ref,_excluded);var blurPx=Math.round(intensity/100*25);var backgroundColor=tintMap[tint]||tintMap.default;return _jsx(AbsView,Object.assign({},props,{style:Object.assign({width:'100%',backgroundColor:backgroundColor},style,{backdropFilter:`blur(${blurPx}px)`,WebkitBackdropFilter:`blur(${blurPx}px)`})}));};
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["intensity","tint","disabledForAndroid","style","children"];var _this=this,_jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/BlurView.native.js";import{AbsView}from"./View";import{jsx as _jsx}from"react/jsx-runtime";var AbsBlurView;try{var _ref=require('expo-blur')||{},BlurView=_ref.BlurView;AbsBlurView=function AbsBlurView(_ref2){var intensity=_ref2.intensity,tint=_ref2.tint,disabledForAndroid=_ref2.disabledForAndroid,style=_ref2.style,children=_ref2.children,props=_objectWithoutProperties(_ref2,_excluded);return _jsx(BlurView,{intensity:intensity,tint:tint,style:[style,{overflow:'hidden'}],experimentalBlurMethod:disabledForAndroid?'none':'dimezisBlurView',children:children});};}catch(_unused){AbsBlurView=function AbsBlurView(props){console.warn('expo-blur not instaled.');return _jsx(AbsView,Object.assign({},props));};}export{AbsBlurView};
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["colors","style"];var _this=this,_jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/GradientView.js";import{AbsView}from"./View";import{jsx as _jsx}from"react/jsx-runtime";export var AbsGradientView=function AbsGradientView(_ref){var colors=_ref.colors,style=_ref.style,props=_objectWithoutProperties(_ref,_excluded);return _jsx(AbsView,Object.assign({},props,{style:Object.assign({},style)}));};
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["angle","colors"];var _this=this,_jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/GradientView.native.js";import{AbsView}from"./View";import{jsx as _jsx}from"react/jsx-runtime";function angleToPoints(angle){var a=angle%360*(Math.PI/180);var x=Math.cos(a);var y=Math.sin(a);return{start:{x:0.5-x/2,y:0.5-y/2},end:{x:0.5+x/2,y:0.5+y/2}};}var AbsGradientView;try{var _ref=require('expo-linear-gradient')||{},LinearGradient=_ref.LinearGradient;AbsGradientView=function AbsGradientView(_ref2){var _ref2$angle=_ref2.angle,angle=_ref2$angle===void 0?45:_ref2$angle,colors=_ref2.colors,props=_objectWithoutProperties(_ref2,_excluded);var _angleToPoints=angleToPoints(angle),start=_angleToPoints.start,end=_angleToPoints.end;if(!(colors!=null&&colors.length))return _jsx(AbsView,Object.assign({},props));return _jsx(LinearGradient,Object.assign({start:start,end:end,colors:colors},props));};}catch(_unused){AbsGradientView=function AbsGradientView(props){console.warn('expo-linear-gradient not instaled.');return _jsx(AbsView,Object.assign({},props));};}export{AbsGradientView};
@@ -1 +1 @@
1
- var _this=this,_jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/Icon.native.js";import{jsx as _jsx}from"react/jsx-runtime";var AbsIcon;try{var _require;var RmIcon=(_require=require('react-native-remix-icon'))==null?void 0:_require.default;console.log(RmIcon);AbsIcon=function AbsIcon(props){return _jsx(RmIcon,Object.assign({},props));};}catch(_unused){AbsIcon=function AbsIcon(){return false;};}export{AbsIcon};
1
+ var _this=this,_jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/Icon.native.js";import{jsx as _jsx}from"react/jsx-runtime";var AbsIcon;try{var _require;var RmIcon=(_require=require('react-native-remix-icon'))==null?void 0:_require.default;AbsIcon=function AbsIcon(props){return _jsx(RmIcon,Object.assign({},props));};}catch(_unused){AbsIcon=function AbsIcon(){console.warn('react-native-remix-icon not instaled.');return false;};}export{AbsIcon};
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/ImageBackground.js";var _excluded=["src","resizeMode","style"];import{jsx as _jsx}from"react/jsx-runtime";export function AbsImageBackground(_ref){var src=_ref.src,_ref$resizeMode=_ref.resizeMode,resizeMode=_ref$resizeMode===void 0?'cover':_ref$resizeMode,style=_ref.style,props=_objectWithoutProperties(_ref,_excluded);var objectFitMap={cover:'cover',contain:'contain',stretch:'fill',center:'none'};var objectFit=objectFitMap[resizeMode]||'cover';return _jsx("div",Object.assign({style:Object.assign({backgroundSize:objectFit,backgroundPosition:'center',backgroundImage:`url(${src})`},style)},props));}
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/ImageBackground.native.js";var _excluded=["src","source","resizeMode","style","children"];import{pick}from'ramda';import{ImageBackground as RNImageBackground}from"react-native-web";import{AbsView}from"./View";import{jsx as _jsx}from"react/jsx-runtime";var allBorderRadiusProps=['borderRadius','borderTopLeftRadius','borderTopRightRadius','borderBottomLeftRadius','borderBottomRightRadius','borderTopStartRadius','borderTopEndRadius','borderBottomStartRadius','borderBottomEndRadius'];export function AbsImageBackground(_ref){var src=_ref.src,source=_ref.source,_ref$resizeMode=_ref.resizeMode,resizeMode=_ref$resizeMode===void 0?'cover':_ref$resizeMode,style=_ref.style,children=_ref.children,props=_objectWithoutProperties(_ref,_excluded);if(!source&&!!src)source={uri:src};var imageStyle=pick(allBorderRadiusProps,style);return _jsx(RNImageBackground,Object.assign({source:source,resizeMode:resizeMode,style:style,imageStyle:imageStyle},props,{children:children}));}
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/ImageBackground.web.js";var _excluded=["src","source","resizeMode"];import{ImageBackground as RNImageBackground}from"react-native-web";import{jsx as _jsx}from"react/jsx-runtime";export function AbsImageBackground(_ref){var src=_ref.src,source=_ref.source,_ref$resizeMode=_ref.resizeMode,resizeMode=_ref$resizeMode===void 0?'cover':_ref$resizeMode,props=_objectWithoutProperties(_ref,_excluded);if(!source&&!!src)source={uri:src};return _jsx(RNImageBackground,Object.assign({source:source,resizeMode:resizeMode},props));}
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/Pressable.js";var _excluded=["link","onPress","onClick"];import{jsx as _jsx}from"react/jsx-runtime";export function AbsPressable(_ref){var link=_ref.link,onPress=_ref.onPress,onClick=_ref.onClick,props=_objectWithoutProperties(_ref,_excluded);var Component=link?'a':'button';return _jsx(Component,Object.assign({onClick:onClick||onPress},props));}
@@ -0,0 +1 @@
1
+ import{Pressable as RNPressable}from"react-native-web";export var AbsPressable=RNPressable;
@@ -0,0 +1 @@
1
+ import{Pressable as RNPressable}from"react-native-web";export var AbsPressable=RNPressable;
@@ -0,0 +1 @@
1
+ import{AbsView}from"./View";export var AbsScrollView=AbsView;
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["height","width"],_excluded2=["style"];var _this=this,_jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/ScrollView.native.js";import{ScrollView}from"react-native-web";import{jsx as _jsx}from"react/jsx-runtime";export var AbsScrollView=function AbsScrollView(_ref){var _ref$style=_ref.style,height=_ref$style.height,width=_ref$style.width,style=_objectWithoutProperties(_ref$style,_excluded),props=_objectWithoutProperties(_ref,_excluded2);return _jsx(ScrollView,Object.assign({height:height,width:width},props,{contentContainerStyle:style}));};
@@ -1 +1 @@
1
- var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/TextInput.js";import{jsx as _jsx}from"react/jsx-runtime";export function AbsTextInput(props){return _jsx("input",Object.assign({type:"text"},props));}
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/TextInput.js";var _excluded=["onChange"];import{jsx as _jsx}from"react/jsx-runtime";export function AbsTextInput(_ref){var _onChange=_ref.onChange,props=_objectWithoutProperties(_ref,_excluded);return _jsx("input",Object.assign({type:"text",onChange:function onChange(e){var _e$target;return _onChange==null?void 0:_onChange(e==null?void 0:(_e$target=e.target)==null?void 0:_e$target.value,e);}},props));}
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/Button.js";var _excluded=["label","icon","textProps","iconProps","gap","invert","size"];import{pipe}from'ramda';import{AbsTouchableOpacity}from"../../abstractions/TouchableOpacity";import{IconLabel}from"../presentation/IconLabel";import{useBackgroundModifier}from"../../modifiers/background";import{useBorderModifier}from"../../modifiers/border";import{useColorConverter}from"../../modifiers/colorConverter";import{useDefaultModifier}from"../../modifiers/default";import{useDisplayModifier}from"../../modifiers/display";import{useFlexModifier}from"../../modifiers/flex";import{useFlexWrapperModifier}from"../../modifiers/flexWrapper";import{useFullColorModifier}from"../../modifiers/fullColor";import{useMarginModifier}from"../../modifiers/margin";import{usePaddingModifier}from"../../modifiers/padding";import{usePositionModifier}from"../../modifiers/position";import{useSizeConverter}from"../../modifiers/sizeConverter";import{useSizeModifier}from"../../modifiers/size";import{useStateModifier}from"../../modifiers/state";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";var DEFAULT_PROPS=function DEFAULT_PROPS(_ref){var _ref2=_slicedToArray(_ref,1),sizeCode=_ref2[0].sizeCode;return{paddingH:sizeCode,paddingV:2,height:sizeCode,br:sizeCode,border:1,center:true};};export function Button(rootProps){var _pipe=pipe(useColorConverter('primary'),useSizeConverter('elementHeights','md'),useThemeComponentModifier('Button'),useDefaultModifier(DEFAULT_PROPS),useFullColorModifier,useDisplayModifier,useStateModifier,useSizeModifier,usePositionModifier,usePaddingModifier,useMarginModifier,useFlexModifier,useFlexWrapperModifier,useBackgroundModifier,useBorderModifier)([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_pipe2$=_pipe2[0],loading=_pipe2$.loading,fontColor=_pipe2$.fontColor,sizeCode=_pipe2$.sizeCode,formattedProps=_pipe2[1];var label=formattedProps.label,icon=formattedProps.icon,textProps=formattedProps.textProps,iconProps=formattedProps.iconProps,gap=formattedProps.gap,invert=formattedProps.invert,size=formattedProps.size,props=_objectWithoutProperties(formattedProps,_excluded);return _jsx(AbsTouchableOpacity,Object.assign({className:"neko-button neko-wave-click-effect",type:"button"},props,{children:_jsx(IconLabel,{center:true,color:fontColor,size:sizeCode,label:label,icon:icon,gap:gap,invert:invert,textProps:Object.assign({strong:true},textProps),iconProps:iconProps,loading:loading})}));}
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/Button.js";var _excluded=["label","icon","textProps","iconProps","gap","invert","size"];import{pipe}from'ramda';import{AbsTouchableOpacity}from"../../abstractions/TouchableOpacity";import{IconLabel}from"../presentation/IconLabel";import{useBackgroundModifier}from"../../modifiers/background";import{useBorderModifier}from"../../modifiers/border";import{useColorConverter}from"../../modifiers/colorConverter";import{useCursorModifier}from"../../modifiers/cursor";import{useDefaultModifier}from"../../modifiers/default";import{useDisplayModifier}from"../../modifiers/display";import{useFlexModifier}from"../../modifiers/flex";import{useFlexWrapperModifier}from"../../modifiers/flexWrapper";import{useFullColorModifier}from"../../modifiers/fullColor";import{useHoverConverter}from"../../modifiers/hover";import{useMarginModifier}from"../../modifiers/margin";import{usePaddingModifier}from"../../modifiers/padding";import{usePositionModifier}from"../../modifiers/position";import{useSizeConverter}from"../../modifiers/sizeConverter";import{useSizeModifier}from"../../modifiers/size";import{useStateModifier}from"../../modifiers/state";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";var DEFAULT_PROPS=function DEFAULT_PROPS(_ref){var _ref2=_slicedToArray(_ref,1),sizeCode=_ref2[0].sizeCode;return{paddingH:sizeCode,paddingV:2,height:sizeCode,br:sizeCode,border:1,center:true,hover:{opacity:0.7}};};export function Button(rootProps){var _pipe=pipe(useColorConverter('primary'),useSizeConverter('elementHeights','md'),useThemeComponentModifier('Button'),useDefaultModifier(DEFAULT_PROPS),useHoverConverter,useCursorModifier,useFullColorModifier,useDisplayModifier,useStateModifier,useSizeModifier,usePositionModifier,usePaddingModifier,useMarginModifier,useFlexModifier,useFlexWrapperModifier,useBackgroundModifier,useBorderModifier)([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_pipe2$=_pipe2[0],loading=_pipe2$.loading,fontColor=_pipe2$.fontColor,sizeCode=_pipe2$.sizeCode,formattedProps=_pipe2[1];var label=formattedProps.label,icon=formattedProps.icon,textProps=formattedProps.textProps,iconProps=formattedProps.iconProps,gap=formattedProps.gap,invert=formattedProps.invert,size=formattedProps.size,props=_objectWithoutProperties(formattedProps,_excluded);return _jsx(AbsTouchableOpacity,Object.assign({className:"neko-button neko-wave-click-effect",type:"button"},props,{children:_jsx(IconLabel,{center:true,color:fontColor,size:sizeCode,label:label,icon:icon,gap:gap,invert:invert,textProps:Object.assign({strong:true},textProps),iconProps:iconProps,loading:loading})}));}
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/Dropdown.js";var _excluded=["items"],_excluded2=["onChange","label","trigger","icon","strong","color","popoverProps","iconLabelProps","children"];import{pipe}from'ramda';import{IconLabel}from"../presentation/IconLabel";import{Link}from"./Link";import{Menu}from"./menu/Menu";import{Popover}from"../structure/popover/Popover";import{View}from"../structure/View";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";export function Dropdown(_ref){var _this=this;var items=_ref.items,rootProps=_objectWithoutProperties(_ref,_excluded);var _pipe=pipe(useThemeComponentModifier('Dropdown'))([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_=_pipe2[0],formattedProps=_pipe2[1];var onChange=formattedProps.onChange,label=formattedProps.label,_formattedProps$trigg=formattedProps.trigger,trigger=_formattedProps$trigg===void 0?'click':_formattedProps$trigg,icon=formattedProps.icon,strong=formattedProps.strong,color=formattedProps.color,popoverProps=formattedProps.popoverProps,iconLabelProps=formattedProps.iconLabelProps,children=formattedProps.children,props=_objectWithoutProperties(formattedProps,_excluded2);return _jsx(View,Object.assign({className:"neko-dropdown"},props,{children:_jsx(Popover,Object.assign({useParentMinWidth:true,placement:"bottomLeft",trigger:trigger,padding:"xs"},popoverProps,{renderContent:function renderContent(_ref2){var onClose=_ref2.onClose;var handleChange=function handleChange(){if(onChange)onChange.apply(void 0,arguments);onClose();};return _jsx(Menu,{vertical:true,items:items,gap:0,onChange:handleChange,linkPaddingH:"xs"});},children:children||_jsx(Link,{children:_jsx(IconLabel,Object.assign({label:label||'---',icon:icon||'arrow-down-s-fill',strong:strong,color:color,invert:true},iconLabelProps))})}))}));}
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/Dropdown.js";var _excluded=["items"],_excluded2=["onChange","label","trigger","icon","strong","color","popoverProps","iconLabelProps","children"];import{pipe}from'ramda';import{IconLabel}from"../presentation/IconLabel";import{Link}from"./Link";import{Menu}from"./menu/Menu";import{Popover}from"../structure/popover/Popover";import{View}from"../structure/View";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";export function Dropdown(_ref){var _this=this;var items=_ref.items,rootProps=_objectWithoutProperties(_ref,_excluded);var _pipe=pipe(useThemeComponentModifier('Dropdown'))([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_=_pipe2[0],formattedProps=_pipe2[1];var onChange=formattedProps.onChange,label=formattedProps.label,_formattedProps$trigg=formattedProps.trigger,trigger=_formattedProps$trigg===void 0?'click':_formattedProps$trigg,icon=formattedProps.icon,strong=formattedProps.strong,color=formattedProps.color,popoverProps=formattedProps.popoverProps,iconLabelProps=formattedProps.iconLabelProps,children=formattedProps.children,props=_objectWithoutProperties(formattedProps,_excluded2);return _jsx(View,Object.assign({className:"neko-dropdown"},props,{children:_jsx(Popover,Object.assign({useParentMinWidth:true,placement:"bottomLeft",trigger:trigger,padding:"xs",useBottomDrawer:{native:true,sm:true,md:true}},popoverProps,{renderContent:function renderContent(_ref2){var onClose=_ref2.onClose;var handleChange=function handleChange(){if(onChange)onChange.apply(void 0,arguments);onClose();};return _jsx(Menu,{vertical:true,items:items,onChange:handleChange,linkPaddingH:"xs"});},children:children||_jsx(Link,{children:_jsx(IconLabel,Object.assign({label:label||'---',icon:icon||'arrow-down-s-fill',strong:strong,color:color,invert:true},iconLabelProps))})}))}));}
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/Link.js";var _excluded=["label","children","href","target"];import{pipe,is}from'ramda';import{AbsTouchableOpacity}from"../../abstractions/TouchableOpacity";import{LoadingView}from"../state/LoadingView";import{Text}from"../text/Text";import{useAnimationModifier}from"../../modifiers/animation";import{useBackgroundModifier}from"../../modifiers/background";import{useBorderModifier}from"../../modifiers/border";import{useColorConverter}from"../../modifiers/colorConverter";import{useDisplayModifier}from"../../modifiers/display";import{useFlexModifier}from"../../modifiers/flex";import{useFlexWrapperModifier}from"../../modifiers/flexWrapper";import{useMarginModifier}from"../../modifiers/margin";import{usePaddingModifier}from"../../modifiers/padding";import{usePositionModifier}from"../../modifiers/position";import{useSizeModifier}from"../../modifiers/size";import{useStateModifier}from"../../modifiers/state";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";export function Link(_ref){var label=_ref.label,children=_ref.children,href=_ref.href,target=_ref.target,rootProps=_objectWithoutProperties(_ref,_excluded);var _pipe=pipe(useThemeComponentModifier('Link'),useBackgroundModifier,useColorConverter('primary'),useAnimationModifier,useSizeModifier,useFlexWrapperModifier,useDisplayModifier,useStateModifier,useBorderModifier,usePositionModifier,usePaddingModifier,useMarginModifier,useFlexModifier)([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_pipe2$=_pipe2[0],loading=_pipe2$.loading,color=_pipe2$.color,props=_pipe2[1];if(!!label||is(String,children)){children=_jsx(Text,Object.assign({color:color},props,{children:label||children}));}return _jsx(LoadingView,{active:loading,noWrapper:true,replaceChildren:true,children:_jsx(AbsTouchableOpacity,Object.assign({className:"neko-link",link:true,target:target,href:!props.disabled&&href},props,{children:children}))});}
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/Link.js";var _excluded=["label","children","href","target"];import{pipe,is}from'ramda';import{AbsTouchableOpacity}from"../../abstractions/TouchableOpacity";import{LoadingView}from"../state/LoadingView";import{Text}from"../text/Text";import{useAnimationModifier}from"../../modifiers/animation";import{useBackgroundModifier}from"../../modifiers/background";import{useBorderModifier}from"../../modifiers/border";import{useColorConverter}from"../../modifiers/colorConverter";import{useCursorModifier}from"../../modifiers/cursor";import{useDefaultModifier}from"../../modifiers/default";import{useDisplayModifier}from"../../modifiers/display";import{useFlexModifier}from"../../modifiers/flex";import{useFlexWrapperModifier}from"../../modifiers/flexWrapper";import{useHoverConverter}from"../../modifiers/hover";import{useMarginModifier}from"../../modifiers/margin";import{usePaddingModifier}from"../../modifiers/padding";import{usePositionModifier}from"../../modifiers/position";import{useSizeModifier}from"../../modifiers/size";import{useStateModifier}from"../../modifiers/state";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";var DEFAULT_PROPS={pointer:true,hover:{br:'md',bg:'text4_op10'}};export function Link(_ref){var label=_ref.label,children=_ref.children,href=_ref.href,target=_ref.target,rootProps=_objectWithoutProperties(_ref,_excluded);var _pipe=pipe(useDefaultModifier(DEFAULT_PROPS),useHoverConverter,useBackgroundModifier,useColorConverter('primary'),useThemeComponentModifier('Link'),useCursorModifier,useAnimationModifier,useSizeModifier,useFlexWrapperModifier,useDisplayModifier,useStateModifier,useBorderModifier,usePositionModifier,usePaddingModifier,useMarginModifier,useFlexModifier)([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_pipe2$=_pipe2[0],isHover=_pipe2$.isHover,loading=_pipe2$.loading,color=_pipe2$.color,props=_pipe2[1];if(!!label||is(String,children)){children=_jsx(Text,Object.assign({color:color},props,{children:label||children}));}return _jsx(LoadingView,{active:loading,noWrapper:true,replaceChildren:true,children:_jsx(AbsTouchableOpacity,Object.assign({className:"neko-link",link:true,target:target,href:!props.disabled&&href},props,{children:children}))});}
@@ -0,0 +1 @@
1
+ import _objectDestructuringEmpty from"@babel/runtime/helpers/objectDestructuringEmpty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/Pressable.js";var _excluded=["children","href","target"];import{pipe}from'ramda';import{AbsPressable}from"../../abstractions/Pressable";import{useAnimationModifier}from"../../modifiers/animation";import{useBackgroundModifier}from"../../modifiers/background";import{useBorderModifier}from"../../modifiers/border";import{useDisplayModifier}from"../../modifiers/display";import{useFlexModifier}from"../../modifiers/flex";import{useFlexWrapperModifier}from"../../modifiers/flexWrapper";import{useMarginModifier}from"../../modifiers/margin";import{usePaddingModifier}from"../../modifiers/padding";import{usePositionModifier}from"../../modifiers/position";import{useSizeModifier}from"../../modifiers/size";import{useStateModifier}from"../../modifiers/state";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";export function Pressable(_ref){var children=_ref.children,href=_ref.href,target=_ref.target,rootProps=_objectWithoutProperties(_ref,_excluded);var _pipe=pipe(useThemeComponentModifier('Pressable'),useBackgroundModifier,useAnimationModifier,useSizeModifier,useFlexWrapperModifier,useDisplayModifier,useStateModifier,useBorderModifier,usePositionModifier,usePaddingModifier,useMarginModifier,useFlexModifier)([{},rootProps]),_pipe2=_slicedToArray(_pipe,2);_objectDestructuringEmpty(_pipe2[0]);var props=_pipe2[1];return _jsx(AbsPressable,Object.assign({className:"neko-pressable",link:true,target:target,href:!props.disabled&&href},props,{children:children}));}
@@ -1 +1 @@
1
- export*from"./Button";export*from"./Link";export*from"./Dropdown";export*from"./Breadcrumb";export*from"./menu/Menu";
1
+ export*from"./Button";export*from"./Link";export*from"./Pressable";export*from"./Dropdown";export*from"./Breadcrumb";export*from"./menu/Menu";
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/menu/HorizontalMenu.js";var _excluded=["item","linkPaddingH","handlePress","linkProps","activeIndex","activeKey","activeColor","color","sizeCode","index"],_excluded2=["active","key"],_excluded3=["gap","height","items","onChange","onChangeIndex"];import{omit,pipe}from'ramda';import React from'react';import{IconText}from"../../presentation/IconLabel";import{Link}from"../Link";import{SubmenuWrapper}from"./SubmenuWrapper";import{View}from"../../structure/View";import{useColorConverter}from"../../../modifiers/colorConverter";import{useSizeConverter}from"../../../modifiers/sizeConverter";import{useThemeComponentModifier}from"../../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";function Item(_ref){var item=_ref.item,_ref$linkPaddingH=_ref.linkPaddingH,linkPaddingH=_ref$linkPaddingH===void 0?'md':_ref$linkPaddingH,handlePress=_ref.handlePress,linkProps=_ref.linkProps,activeIndex=_ref.activeIndex,activeKey=_ref.activeKey,_ref$activeColor=_ref.activeColor,activeColor=_ref$activeColor===void 0?'primary':_ref$activeColor,color=_ref.color,sizeCode=_ref.sizeCode,index=_ref.index,props=_objectWithoutProperties(_ref,_excluded);activeColor=activeColor||'primary';var _omit=omit(['onClick','onPress'],item),active=_omit.active,key=_omit.key,childProps=_objectWithoutProperties(_omit,_excluded2);if(!active&&activeIndex>=0)active=activeIndex===index;if(!active&&activeKey!==undefined)active=activeKey===item.key;return _jsx(SubmenuWrapper,{item:item,onChange:handlePress,activeKey:activeKey,color:color,placement:"bottomRight",hideIcon:true,children:_jsx(Link,Object.assign({fullH:true,center:true,paddingH:linkPaddingH},linkProps,{onPress:function onPress(){return handlePress(item,index);},children:_jsx(IconText,Object.assign({color:active?activeColor:color,fullH:true,marginT:3,borderB:3,borderColor:active?activeColor:'transparent',transition:"border-color 0.6s ease",size:sizeCode},childProps))}),key||index)});}export function HorizontalMenu(rootProps){var _this=this;var _pipe=pipe(useColorConverter(),useSizeConverter('icons','md'),useThemeComponentModifier('HorizontalMenu'))([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_pipe2$=_pipe2[0],sizeCode=_pipe2$.sizeCode,color=_pipe2$.color,formattedProps=_pipe2[1];var _formattedProps$gap=formattedProps.gap,gap=_formattedProps$gap===void 0?'sm':_formattedProps$gap,_formattedProps$heigh=formattedProps.height,height=_formattedProps$heigh===void 0?50:_formattedProps$heigh,items=formattedProps.items,onChange=formattedProps.onChange,onChangeIndex=formattedProps.onChangeIndex,props=_objectWithoutProperties(formattedProps,_excluded3);var handlePress=React.useCallback(function(item,index){if(!!onChange)onChange(item,index);if(!!onChangeIndex)onChangeIndex(index);if(!!item.onPress)item.onPress();if(!!item.onClick)item.onClick();},[onChange,onChangeIndex]);return _jsx(View,Object.assign({className:"neko-horizontal-menu",row:true,gap:gap,height:height,centerV:true},props,{children:items.map(function(item,index){return _jsx(Item,Object.assign({item:item,handlePress:handlePress,color:color,sizeCode:sizeCode,index:index},props),item.key||index);})}));}
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/menu/HorizontalMenu.js";var _excluded=["item","linkPaddingH","handlePress","linkProps","activeIndex","activeKey","activeColor","color","sizeCode","index"],_excluded2=["active","key"],_excluded3=["gap","height","items","onChange","onChangeIndex","activeIndex"];import{omit,pipe}from'ramda';import React from'react';import{IconText}from"../../presentation/IconLabel";import{Link}from"../Link";import{SubmenuWrapper}from"./SubmenuWrapper";import{View}from"../../structure/View";import{useColorConverter}from"../../../modifiers/colorConverter";import{useSizeConverter}from"../../../modifiers/sizeConverter";import{useThemeComponentModifier}from"../../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";function Item(_ref){var item=_ref.item,_ref$linkPaddingH=_ref.linkPaddingH,linkPaddingH=_ref$linkPaddingH===void 0?'md':_ref$linkPaddingH,handlePress=_ref.handlePress,linkProps=_ref.linkProps,activeIndex=_ref.activeIndex,activeKey=_ref.activeKey,_ref$activeColor=_ref.activeColor,activeColor=_ref$activeColor===void 0?'primary':_ref$activeColor,color=_ref.color,sizeCode=_ref.sizeCode,index=_ref.index,props=_objectWithoutProperties(_ref,_excluded);activeColor=activeColor||'primary';var _omit=omit(['onClick','onPress'],item),active=_omit.active,key=_omit.key,childProps=_objectWithoutProperties(_omit,_excluded2);if(!active&&activeIndex>=0)active=activeIndex===index;if(!active&&activeKey!==undefined)active=activeKey===item.key;return _jsx(SubmenuWrapper,{item:item,onChange:handlePress,activeKey:activeKey,color:color,placement:"bottomRight",hideIcon:true,children:_jsx(Link,Object.assign({fullH:true,center:true,paddingH:linkPaddingH},linkProps,{onPress:function onPress(){return handlePress(item,index);},children:_jsx(IconText,Object.assign({color:active?activeColor:color,fullH:true,marginT:3,borderB:3,borderColor:active?activeColor:'transparent',transition:"border-color 0.6s ease",size:sizeCode},childProps))}),key||index)});}export function HorizontalMenu(rootProps){var _this=this;var _pipe=pipe(useColorConverter(),useSizeConverter('icons','md'),useThemeComponentModifier('HorizontalMenu'))([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_pipe2$=_pipe2[0],sizeCode=_pipe2$.sizeCode,color=_pipe2$.color,formattedProps=_pipe2[1];var _formattedProps$gap=formattedProps.gap,gap=_formattedProps$gap===void 0?'sm':_formattedProps$gap,_formattedProps$heigh=formattedProps.height,height=_formattedProps$heigh===void 0?50:_formattedProps$heigh,items=formattedProps.items,onChange=formattedProps.onChange,onChangeIndex=formattedProps.onChangeIndex,activeIndex=formattedProps.activeIndex,props=_objectWithoutProperties(formattedProps,_excluded3);var handlePress=React.useCallback(function(item,index){if(!!onChange)onChange(item,index);if(!!onChangeIndex)onChangeIndex(index);if(!!item.onPress)item.onPress();if(!!item.onClick)item.onClick();},[onChange,onChangeIndex]);return _jsx(View,Object.assign({className:"neko-horizontal-menu",row:true,gap:gap,height:height,centerV:true},props,{children:items.map(function(item,index){return _jsx(Item,Object.assign({item:item,handlePress:handlePress,color:color,sizeCode:sizeCode,index:index,activeIndex:activeIndex},props),item.key||index);})}));}
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/menu/VerticalMenu.js";var _excluded=["item","linkPaddingH","linkPaddingV","handlePress","linkProps","activeIndex","activeKey","activeColor","color","sizeCode","index"],_excluded2=["active","key"],_excluded3=["item"],_excluded4=["gap","items","onChange","onChangeIndex"];import{omit,pipe}from'ramda';import React from'react';import tinycolor from'tinycolor2';import{Divider}from"../../helpers/Separator";import{IconText}from"../../presentation/IconLabel";import{Link}from"../Link";import{SubmenuWrapper}from"./SubmenuWrapper";import{Text}from"../../text/Text";import{View}from"../../structure/View";import{useColorConverter}from"../../../modifiers/colorConverter";import{useSizeConverter}from"../../../modifiers/sizeConverter";import{useThemeComponentModifier}from"../../../modifiers/themeComponent";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";function LinkItem(_ref){var item=_ref.item,_ref$linkPaddingH=_ref.linkPaddingH,linkPaddingH=_ref$linkPaddingH===void 0?'md':_ref$linkPaddingH,_ref$linkPaddingV=_ref.linkPaddingV,linkPaddingV=_ref$linkPaddingV===void 0?'xs':_ref$linkPaddingV,handlePress=_ref.handlePress,linkProps=_ref.linkProps,activeIndex=_ref.activeIndex,activeKey=_ref.activeKey,_ref$activeColor=_ref.activeColor,activeColor=_ref$activeColor===void 0?'primary':_ref$activeColor,color=_ref.color,sizeCode=_ref.sizeCode,index=_ref.index,props=_objectWithoutProperties(_ref,_excluded);activeColor=activeColor||'primary';var _omit=omit(['onClick','onPress'],item),active=_omit.active,key=_omit.key,childProps=_objectWithoutProperties(_omit,_excluded2);if(!active&&activeIndex>=0)active=activeIndex===index;if(!active&&activeKey!==undefined)active=activeKey===item.key;var bg=active&&tinycolor(color).setAlpha(0.03).toString();return _jsx(SubmenuWrapper,{item:item,onChange:handlePress,activeKey:activeKey,color:color,children:_jsx(Link,Object.assign({fullW:true,center:true,paddingH:linkPaddingH,paddingV:linkPaddingV,marginR:3,borderL:3,marginV:!!active&&-4,borderColor:active?activeColor:'transparent',bg:bg,transition:"border-color 0.5s ease, background 0.3s ease"},linkProps,{onPress:function onPress(){return handlePress(item,index);},children:_jsx(IconText,Object.assign({paddingV:active&&4,color:active?activeColor:color,fullW:true,size:sizeCode},childProps))}))});}function DividerItem(_ref2){var _ref2$linkPaddingH=_ref2.linkPaddingH,linkPaddingH=_ref2$linkPaddingH===void 0?'md':_ref2$linkPaddingH,item=_ref2.item;var content=_jsx(Divider,Object.assign({height:"xxs",line:true},item));if(!item.label)return content;return _jsxs(_Fragment,{children:[content,_jsx(Text,Object.assign({size:"xs",color:"text4",paddingH:linkPaddingH||'md',strong:true},item))]});}function Item(_ref3){var item=_ref3.item,props=_objectWithoutProperties(_ref3,_excluded3);if(item.type==='divider')return _jsx(DividerItem,Object.assign({item:item},props));return _jsx(LinkItem,Object.assign({item:item},props));}export function VerticalMenu(rootProps){var _this=this;var _pipe=pipe(useColorConverter('text'),useSizeConverter('icons','md'),useThemeComponentModifier('VerticalMenu'))([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_pipe2$=_pipe2[0],sizeCode=_pipe2$.sizeCode,color=_pipe2$.color,formattedProps=_pipe2[1];var _formattedProps$gap=formattedProps.gap,gap=_formattedProps$gap===void 0?'sm':_formattedProps$gap,items=formattedProps.items,onChange=formattedProps.onChange,onChangeIndex=formattedProps.onChangeIndex,props=_objectWithoutProperties(formattedProps,_excluded4);var handlePress=React.useCallback(function(item,index){if(!!onChange)onChange(item,index);if(!!onChangeIndex)onChangeIndex(index);if(!!item.onPress)item.onPress();if(!!item.onClick)item.onClick();},[onChange,onChangeIndex]);return _jsx(View,Object.assign({className:"neko-vertical-menu",gap:gap,width:"100%"},props,{children:items.map(function(item,index){return _jsx(Item,Object.assign({item:item,handlePress:handlePress,color:color,sizeCode:sizeCode,index:index},props),item.key||index);})}));}
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/actions/menu/VerticalMenu.js";var _excluded=["item","linkPaddingH","linkPaddingV","handlePress","linkProps","activeIndex","activeKey","activeColor","color","sizeCode","index"],_excluded2=["active","key"],_excluded3=["item"],_excluded4=["gap","items","onChange","onChangeIndex"];import{omit,pipe}from'ramda';import React from'react';import tinycolor from'tinycolor2';import{Divider}from"../../helpers/Separator";import{IconText}from"../../presentation/IconLabel";import{Link}from"../Link";import{SubmenuWrapper}from"./SubmenuWrapper";import{Text}from"../../text/Text";import{View}from"../../structure/View";import{useColorConverter}from"../../../modifiers/colorConverter";import{useSizeConverter}from"../../../modifiers/sizeConverter";import{useThemeComponentModifier}from"../../../modifiers/themeComponent";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";function LinkItem(_ref){var item=_ref.item,_ref$linkPaddingH=_ref.linkPaddingH,linkPaddingH=_ref$linkPaddingH===void 0?'md':_ref$linkPaddingH,_ref$linkPaddingV=_ref.linkPaddingV,linkPaddingV=_ref$linkPaddingV===void 0?'sm':_ref$linkPaddingV,handlePress=_ref.handlePress,linkProps=_ref.linkProps,activeIndex=_ref.activeIndex,activeKey=_ref.activeKey,_ref$activeColor=_ref.activeColor,activeColor=_ref$activeColor===void 0?'primary':_ref$activeColor,color=_ref.color,sizeCode=_ref.sizeCode,index=_ref.index,props=_objectWithoutProperties(_ref,_excluded);activeColor=activeColor||'primary';var _omit=omit(['onClick','onPress'],item),active=_omit.active,key=_omit.key,childProps=_objectWithoutProperties(_omit,_excluded2);if(!active&&activeIndex>=0)active=activeIndex===index;if(!active&&activeKey!==undefined)active=activeKey===item.key;var bg=active&&tinycolor(color).setAlpha(0.03).toString();return _jsx(SubmenuWrapper,{item:item,onChange:handlePress,activeKey:activeKey,color:color,children:_jsx(Link,Object.assign({fullW:true,center:true,paddingH:linkPaddingH,paddingV:linkPaddingV,marginR:3,borderL:3,marginV:-4,borderColor:active?activeColor:'transparent',bg:bg,transition:"border-color 0.5s ease, background 0.3s ease",hover:{br:0}},linkProps,{onPress:function onPress(){return handlePress(item,index);},children:_jsx(IconText,Object.assign({addingV:active&&4,color:active?activeColor:color,fullW:true,size:sizeCode},childProps))}))});}function DividerItem(_ref2){var _ref2$linkPaddingH=_ref2.linkPaddingH,linkPaddingH=_ref2$linkPaddingH===void 0?'md':_ref2$linkPaddingH,item=_ref2.item;var content=_jsx(Divider,Object.assign({height:"xxs",line:true},item));if(!item.label)return content;return _jsxs(_Fragment,{children:[content,_jsx(Text,Object.assign({size:"xs",color:"text4",paddingH:linkPaddingH||'md',strong:true},item))]});}function Item(_ref3){var item=_ref3.item,props=_objectWithoutProperties(_ref3,_excluded3);if(item.type==='divider')return _jsx(DividerItem,Object.assign({item:item},props));return _jsx(LinkItem,Object.assign({item:item},props));}export function VerticalMenu(rootProps){var _this=this;var _pipe=pipe(useColorConverter('text'),useSizeConverter('icons','md'),useThemeComponentModifier('VerticalMenu'))([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_pipe2$=_pipe2[0],sizeCode=_pipe2$.sizeCode,color=_pipe2$.color,formattedProps=_pipe2[1];var _formattedProps$gap=formattedProps.gap,gap=_formattedProps$gap===void 0?'sm':_formattedProps$gap,items=formattedProps.items,onChange=formattedProps.onChange,onChangeIndex=formattedProps.onChangeIndex,props=_objectWithoutProperties(formattedProps,_excluded4);var handlePress=React.useCallback(function(item,index){if(!!onChange)onChange(item,index);if(!!onChangeIndex)onChangeIndex(index);if(!!item.onPress)item.onPress();if(!!item.onClick)item.onClick();},[onChange,onChangeIndex]);return _jsx(View,Object.assign({className:"neko-vertical-menu",gap:gap,width:"100%"},props,{children:items.map(function(item,index){return _jsx(Item,Object.assign({item:item,handlePress:handlePress,color:color,sizeCode:sizeCode,index:index},props),item.key||index);})}));}
@@ -0,0 +1 @@
1
+ import _objectDestructuringEmpty from"@babel/runtime/helpers/objectDestructuringEmpty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/animations/ReanimatedView.js";var _excluded=["children"];import{pipe}from'ramda';import{AbsAnimatedView}from"../../abstractions/AnimatedView";import{useBackgroundModifier}from"../../modifiers/background";import{useBorderModifier}from"../../modifiers/border";import{useDisplayModifier}from"../../modifiers/display";import{useFlexModifier}from"../../modifiers/flex";import{useFlexWrapperModifier}from"../../modifiers/flexWrapper";import{useMarginModifier}from"../../modifiers/margin";import{useOverflowModifier}from"../../modifiers/overflow";import{usePaddingModifier}from"../../modifiers/padding";import{usePositionModifier}from"../../modifiers/position";import{useShadowModifier}from"../../modifiers/shadow";import{useSizeModifier}from"../../modifiers/size";import{useStateModifier}from"../../modifiers/state";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";export function ReanimatedView(_ref){var children=_ref.children,rootProps=_objectWithoutProperties(_ref,_excluded);var _pipe=pipe(useThemeComponentModifier('ReanimatedView'),useFlexWrapperModifier,useDisplayModifier,useStateModifier,useSizeModifier,usePositionModifier,useOverflowModifier,usePaddingModifier,useMarginModifier,useFlexModifier,useBackgroundModifier,useBorderModifier,useShadowModifier)([{},rootProps]),_pipe2=_slicedToArray(_pipe,2);_objectDestructuringEmpty(_pipe2[0]);var props=_pipe2[1];return _jsx(AbsAnimatedView,Object.assign({className:"neko-reanimated-view"},props,{children:children}));}
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/calendar/CalendarNav.js";var _excluded=["value","onChange","level"];import{Icon}from"../presentation/Icon";import{Link}from"../actions/Link";import{Text}from"../text/Text";import{View}from"../structure/View";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export function CalendarNav(_ref){var value=_ref.value,onChange=_ref.onChange,level=_ref.level,props=_objectWithoutProperties(_ref,_excluded);var prevMonth=function prevMonth(){return onChange(function(m){return m.subtract(1,'month');});};var nextMonth=function nextMonth(){return onChange(function(m){return m.add(1,'month');});};var prevYear=function prevYear(){return onChange(function(m){return m.subtract(1,'year');});};var nextYear=function nextYear(){return onChange(function(m){return m.add(1,'year');});};var prevDecade=function prevDecade(){return onChange(function(m){return m.subtract(10,'year');});};var nextDecade=function nextDecade(){return onChange(function(m){return m.add(10,'year');});};var showMonth=level!=='year';if(level==='decade'){var year=value.year();return _jsxs(View,Object.assign({className:"neko-calendar-nav",row:true,centerV:true,gap:"xxs",height:30},props,{children:[_jsx(Link,{onPress:prevDecade,"aria-label":"Previous decade",padding:"xxs",paddingL:0,children:_jsx(Icon,{name:"arrow-left-double-line"})}),_jsxs(Text,{center:true,flex:true,children:[year,"-",year+9]}),_jsx(Link,{onPress:nextDecade,"aria-label":"Next decade",padding:"xxs",paddingR:0,children:_jsx(Icon,{name:"arrow-right-double-line"})})]}));}return _jsxs(View,Object.assign({className:"neko-calendar-nav",row:true,centerV:true,gap:"xxs",height:30},props,{children:[_jsx(Link,{onPress:prevYear,"aria-label":"Previous year",padding:"xxs",paddingL:0,children:_jsx(Icon,{name:"arrow-left-double-line"})}),showMonth&&_jsx(Link,{onPress:prevMonth,"aria-label":"Previous month",padding:"xxs",children:_jsx(Icon,{name:"arrow-left-s-line"})}),_jsxs(View,{center:true,flex:true,gap:"xxs",row:true,children:[showMonth&&_jsx(Text,{center:true,children:value.format==null?void 0:value.format('MMM')}),_jsx(Text,{center:true,children:value.format==null?void 0:value.format('YYYY')})]}),showMonth&&_jsx(Link,{onPress:nextMonth,"aria-label":"Next month",padding:"xxs",children:_jsx(Icon,{name:"arrow-right-s-line"})}),_jsx(Link,{onPress:nextYear,"aria-label":"Next year",padding:"xxs",paddingR:0,children:_jsx(Icon,{name:"arrow-right-double-line"})})]}));}
@@ -0,0 +1 @@
1
+ var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/calendar/WeekDaysBar.js";import{Text}from"../text/Text";import{View}from"../structure/View";import{jsx as _jsx}from"react/jsx-runtime";var weekdayLabels=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];export function WeekDaysBar(){var _this=this;return _jsx(View,{className:"neko-week-days-bar",row:true,center:true,gap:"sm",children:weekdayLabels.map(function(w){return _jsx(View,{flex:true,height:30,center:true,children:_jsx(Text,{center:true,sm:true,text4:true,children:w})},w);})});}
@@ -1 +1 @@
1
- import React from'react';export function useCalendarDays(currentMonth){return React.useMemo(function(){var startWeekday=currentMonth.startOf('month').day();var daysInMonth=currentMonth.daysInMonth();var blanks=Array.from({length:startWeekday},function(){return null;});var days=Array.from({length:daysInMonth},function(_,i){return i+1;});var cells=[].concat(blanks,days);var weekdayLabels=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];return{weekdayLabels:weekdayLabels,cells:cells};},[currentMonth.month(),currentMonth.year()]);}
1
+ import React from'react';export function useCalendarDays(currentMonth){return React.useMemo(function(){var startWeekday=currentMonth.startOf('month').day();var daysInMonth=currentMonth.daysInMonth();var blanks=Array.from({length:startWeekday},function(){return null;});var days=Array.from({length:daysInMonth},function(_,i){return i+1;});var cells=[].concat(blanks,days);return{cells:cells};},[currentMonth.month(),currentMonth.year()]);}
@@ -0,0 +1 @@
1
+ import{is}from'ramda';import dayjs from'dayjs';export function isDateDisabled(date){var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},min=_ref.min,max=_ref.max,onCheckDisabled=_ref.onCheckDisabled;var dateVal=!!date&&dayjs(date);if(!dateVal||!dateVal.isValid())return true;if(!!min&&dateVal.isBefore(min))return true;if(!!max&&dateVal.isAfter(max))return true;return(onCheckDisabled==null?void 0:onCheckDisabled(dateVal))||false;}export function isValidDate(v,format){var validations=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(v===null||v==='')return true;var dateVal=dayjs(v);if(is(String,v)){if(v.length!==format.length)return false;dateVal=dayjs(v,format,true);if(!dateVal.isValid())return false;}return!isDateDisabled(v,validations);}
@@ -1 +0,0 @@
1
- export*from"./DayPicker";
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/feedback/alerter.js";var _excluded=["width","closeLabel","hideClose"];import{is}from'ramda';import{Button}from"../actions";import{Result}from"../presentation";import{useModalOpener}from"../structure/modal";import{jsx as _jsx}from"react/jsx-runtime";export function useAlerter(){var _this=this;var _useModalOpener=useModalOpener(),open=_useModalOpener.open;var alert=function alert(data,type){if(is(String,data))data={title:data};var _ref=data||{},width=_ref.width,closeLabel=_ref.closeLabel,hideClose=_ref.hideClose,resultProps=_objectWithoutProperties(_ref,_excluded);open(function(_ref2){var onClose=_ref2.onClose;return{content:_jsx(Result,Object.assign({},resultProps,{type:type,padding:0,paddingT:"lg",paddingB:"sm"})),footer:!hideClose&&_jsx(Button,{sm:true,label:closeLabel||'Close',outline:true,color:"text_op40",onPress:onClose,fullW:true}),footerProps:{borderT:false},width:width||350};});};return{alert:alert,info:function info(data){return alert(data,'info');},error:function error(data){return alert(data,'error');},warning:function warning(data){return alert(data,'warning');},success:function success(data){return alert(data,'success');}};}
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _excluded=["width","cancelLabel","confirmLabel","onConfirm"];var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/feedback/confirmer.js";import{is}from'ramda';import React from'react';import{Button}from"../actions";import{RESULT_TYPES}from"../presentation/Result";import{Result}from"../presentation";import{View}from"../structure/View";import{useModalOpener}from"../structure/modal";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";function Footer(_ref){var _RESULT_TYPES$type;var cancelLabel=_ref.cancelLabel,confirmLabel=_ref.confirmLabel,onConfirm=_ref.onConfirm,type=_ref.type,onClose=_ref.onClose;var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),loading=_React$useState2[0],setLoading=_React$useState2[1];var color=((_RESULT_TYPES$type=RESULT_TYPES[type])==null?void 0:_RESULT_TYPES$type.color)||'primary';return _jsxs(View,{row:true,gap:"sm",centerV:true,children:[_jsx(Button,{sm:true,label:cancelLabel||'Cancel',outline:true,color:"text_op40",onPress:onClose,flex:true,disabled:loading}),_jsx(Button,{disabled:loading,loading:loading,sm:true,label:confirmLabel||'Confirm',color:color,onPress:function onPress(){setLoading(true);Promise.resolve(onConfirm==null?void 0:onConfirm()).then(function(result){if(result!==false){onClose();}}).finally(function(){setLoading(false);});},flex:true})]});}export function useConfirmer(){var _this=this;var _useModalOpener=useModalOpener(),open=_useModalOpener.open;var confirm=function confirm(data,type){var _ref2=data||{},width=_ref2.width,cancelLabel=_ref2.cancelLabel,confirmLabel=_ref2.confirmLabel,onConfirm=_ref2.onConfirm,resultProps=_objectWithoutProperties(_ref2,_excluded);open(function(_ref3){var onClose=_ref3.onClose;return{content:_jsx(Result,Object.assign({},resultProps,{type:type,padding:0,paddingT:"lg",paddingB:"sm"})),footer:_jsx(Footer,{cancelLabel:cancelLabel,confirmLabel:confirmLabel,onConfirm:onConfirm,type:type,onClose:onClose}),footerProps:{borderT:false},width:width||350};});};return{confirm:confirm,info:function info(data){return confirm(data,'info');},error:function error(data){return confirm(data,'error');},warning:function warning(data){return confirm(data,'warning');},success:function success(data){return confirm(data,'success');}};}
@@ -1 +1 @@
1
- export*from"./notifications/NotificationsHandler";
1
+ export*from"./notifications/NotificationsHandler";export*from"./alerter";export*from"./confirmer";
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/feedback/notifications/Notification.js";var _excluded=["time"];import React from'react';import{AnimatedView}from"../../animations/AnimatedView";import{Icon}from"../../presentation/Icon";import{Link}from"../../actions/Link";import{ResultBar}from"../../presentation/ResultBar";import{jsx as _jsx}from"react/jsx-runtime";export function Notification(_ref){var time=_ref.time,props=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(true),_React$useState2=_slicedToArray(_React$useState,2),open=_React$useState2[0],setOpen=_React$useState2[1];React.useEffect(function(){setTimeout(function(){return setOpen(false);},time-500);},[]);return _jsx(AnimatedView,{open:open,className:"neko-notification",slide:{from:'right'},fade:true,zIndex:120,maxWidth:"100%",bg:"overlayBG",br:"sm",unmountOnClose:true,children:_jsx(ResultBar,Object.assign({},props,{rightContent:_jsx(Link,{onPress:function onPress(){return setOpen(false);},children:_jsx(Icon,{name:"close-line",text4:true})})}))});}
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/feedback/notifications/Notification.js";var _excluded=["time"];import React from'react';import{AnimatedView}from"../../animations/AnimatedView";import{Icon}from"../../presentation/Icon";import{Link}from"../../actions/Link";import{ResultBar}from"../../presentation/ResultBar";import{jsx as _jsx}from"react/jsx-runtime";export function Notification(_ref){var time=_ref.time,props=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(true),_React$useState2=_slicedToArray(_React$useState,2),open=_React$useState2[0],setOpen=_React$useState2[1];React.useEffect(function(){setTimeout(function(){return setOpen(false);},time-500);},[]);return _jsx(AnimatedView,{open:open,className:"neko-notification",slide:{from:'right'},fade:true,zIndex:520,maxWidth:"100%",bg:"overlayBG",br:"sm",unmountOnClose:true,children:_jsx(ResultBar,Object.assign({},props,{rightContent:_jsx(Link,{onPress:function onPress(){return setOpen(false);},children:_jsx(Icon,{name:"close-line",text4:true})})}))});}
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _excluded=["key"];var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/feedback/notifications/NotificationsHandler.js";import{is}from'ramda';import React from'react';import{Notification}from"./Notification";import{SafeAreaView}from"../../structure/SafeAreaView";import{View}from"../../structure/View";import{useResponsiveValue}from"../../../responsive/responsiveHooks";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var NotificationsContext=React.createContext(null);export var useNotifications=function useNotifications(){return React.useContext(NotificationsContext)||{};};var idCounter=0;export function useNotifier(){var _useNotifications=useNotifications(),add=_useNotifications.add,remove=_useNotifications.remove;var notify=function notify(data,opts,type){var key=++idCounter;var time=(opts==null?void 0:opts.time)||6000;if(is(String,data))data={title:data};var timerId=setTimeout(function(){return remove(key);},time);add(key,Object.assign({},data,{type:type,opts:opts,timerId:timerId,time:time}));};return{notify:notify,info:function info(data,opts){return notify(data,opts,'info');},error:function error(data,opts){return notify(data,opts,'error');},warning:function warning(data,opts){return notify(data,opts,'warning');},success:function success(data,opts){return notify(data,opts,'success');}};}export function NotificationsHandler(_ref){var _this=this;var children=_ref.children;var width=useResponsiveValue({sm:'100%',df:400});var _React$useState=React.useState([]),_React$useState2=_slicedToArray(_React$useState,2),messages=_React$useState2[0],setMessages=_React$useState2[1];var add=React.useCallback(function(key,data){setMessages(function(prev){return[Object.assign({key:key},data)].concat(_toConsumableArray(prev));});},[]);var remove=React.useCallback(function(key){setMessages(function(prev){return prev.filter(function(p){return p.key!==key;});});},[]);var value=React.useMemo(function(){return{add:add,remove:remove};},[add,remove]);return _jsxs(NotificationsContext.Provider,{value:value,children:[children,!!messages.length&&_jsx(View,{fixed:true,top:0,right:0,padding:"md",width:width,maxWidth:"100%",pointerEvents:"box-none",children:_jsx(SafeAreaView,{gap:"xs",children:messages.map(function(_ref2){var key=_ref2.key,item=_objectWithoutProperties(_ref2,_excluded);return _jsx(Notification,Object.assign({},item),key);})})})]});}
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _excluded=["key"];var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/feedback/notifications/NotificationsHandler.js";import{is}from'ramda';import React from'react';import{Notification}from"./Notification";import{SafeAreaView}from"../../structure/SafeAreaView";import{View}from"../../structure/View";import{useResponsiveValue}from"../../../responsive/responsiveHooks";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var NotificationsContext=React.createContext(null);export var useNotifications=function useNotifications(){return React.useContext(NotificationsContext)||{};};var idCounter=0;export function useNotifier(){var _useNotifications=useNotifications(),add=_useNotifications.add,remove=_useNotifications.remove;var notify=function notify(data,opts,type){var key=++idCounter;var time=(opts==null?void 0:opts.time)||6000;if(is(String,data))data={title:data};var timerId=setTimeout(function(){return remove==null?void 0:remove(key);},time);add==null?void 0:add(key,Object.assign({},data,{type:type,opts:opts,timerId:timerId,time:time}));};return{notify:notify,info:function info(data,opts){return notify(data,opts,'info');},error:function error(data,opts){return notify(data,opts,'error');},warning:function warning(data,opts){return notify(data,opts,'warning');},success:function success(data,opts){return notify(data,opts,'success');}};}export function NotificationsHandler(_ref){var _this=this;var children=_ref.children;var width=useResponsiveValue({sm:'100%',df:400});var _React$useState=React.useState([]),_React$useState2=_slicedToArray(_React$useState,2),messages=_React$useState2[0],setMessages=_React$useState2[1];var add=React.useCallback(function(key,data){setMessages(function(prev){return[Object.assign({key:key},data)].concat(_toConsumableArray(prev));});},[]);var remove=React.useCallback(function(key){setMessages(function(prev){return prev.filter(function(p){return p.key!==key;});});},[]);var value=React.useMemo(function(){return{add:add,remove:remove};},[add,remove]);return _jsxs(NotificationsContext.Provider,{value:value,children:[children,!!messages.length&&_jsx(View,{fixed:true,top:0,right:0,padding:"md",width:width,maxWidth:"100%",pointerEvents:"box-none",zIndex:600,children:_jsx(SafeAreaView,{gap:"xs",children:messages.map(function(_ref2){var key=_ref2.key,item=_objectWithoutProperties(_ref2,_excluded);return _jsx(Notification,Object.assign({},item),key);})})})]});}
@@ -1 +1 @@
1
- export*from"./actions";export*from"./animations";export*from"./form";export*from"./presentation";export*from"./structure";export*from"./text";export*from"./helpers";export*from"./inputs";export*from"./state";export*from"./layout";export*from"./table";export*from"./feedback";export*from"./calendar";
1
+ export*from"./actions";export*from"./animations";export*from"./form";export*from"./presentation";export*from"./structure";export*from"./text";export*from"./helpers";export*from"./inputs";export*from"./state";export*from"./layout";export*from"./table";export*from"./feedback";export*from"./calendar";export*from"./list";
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/DateInput.js";var _excluded=["value","onChange","min","max","onCheckDisabled","placement","type","format","useBottomDrawer"];import React from'react';import advancedFormat from'dayjs/esm/plugin/advancedFormat';import dayjs from'dayjs';import weekOfYear from'dayjs/esm/plugin/weekOfYear';import{LinkInput}from"./LinkInput";import{View}from"../structure/View";import{useResponsiveValue}from"../../responsive";dayjs.extend(advancedFormat);dayjs.extend(weekOfYear);import{DatePicker}from"./datePicker/DatePicker";import{MaskInput}from"./MaskInput";import{Popover}from"../structure/popover/Popover";import{isValidDate}from"../calendar/_helpers/dateDisabled";import{jsx as _jsx}from"react/jsx-runtime";export function getDateInputDefaultFormat(type){switch(type){case'year':return'YYYY';case'quarter':return'YYYY-Q';case'month':return'YYYY-MM';case'week':return'YYYY-ww';default:return'YYYY-MM-DD';}}export function DateInput(_ref){var _this=this;var value=_ref.value,onChange=_ref.onChange,min=_ref.min,max=_ref.max,onCheckDisabled=_ref.onCheckDisabled,placement=_ref.placement,_ref$type=_ref.type,type=_ref$type===void 0?'day':_ref$type,format=_ref.format,_ref$useBottomDrawer=_ref.useBottomDrawer,useBottomDrawer=_ref$useBottomDrawer===void 0?{native:true,sm:true,md:true}:_ref$useBottomDrawer,props=_objectWithoutProperties(_ref,_excluded);useBottomDrawer=useResponsiveValue(useBottomDrawer);format=format||getDateInputDefaultFormat(type);if(value==='')value=undefined;var _React$useState=React.useState(''),_React$useState2=_slicedToArray(_React$useState,2),inputValue=_React$useState2[0],setInputValue=_React$useState2[1];var _React$useState3=React.useState(value),_React$useState4=_slicedToArray(_React$useState3,2),localValue=_React$useState4[0],setLocalValue=_React$useState4[1];value=value||localValue;var validations={min:min,max:max,onCheckDisabled:onCheckDisabled};var handleChange=function handleChange(v){if(!isValidDate(v,format,validations))return;v=!!v?dayjs(v):null;setLocalValue(v);onChange==null?void 0:onChange(v);};var handleChangeInput=function handleChangeInput(v){setInputValue(v);if(!isValidDate(v,format,validations))return;handleChange(v);};var onBlur=function onBlur(){if(isValidDate(inputValue,format,validations))return;handleChange(null);setInputValue('');};React.useEffect(function(){setInputValue(!!value?dayjs(value).format(format):'');},[value]);var Input=useBottomDrawer?LinkInput:MaskInput;return _jsx(Popover,{trigger:"click",placement:placement||'bottomLeft',snapPoints:[350],useBottomDrawer:useBottomDrawer,renderContent:function renderContent(_ref2){var onClose=_ref2.onClose;return _jsx(View,{flex:true,centerH:true,children:_jsx(DatePicker,Object.assign({value:value,onChange:function onChange(v){handleChange(v);onClose();}},validations,{type:type}))});},children:_jsx(Input,Object.assign({value:inputValue,onChange:handleChangeInput,suffixIcon:"calendar-line",suffixIconColor:"text4",onBlur:onBlur,mask:format.replace(/[DMYQwW]/gi,'9')},props))});}
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/InputWrapper.js";var _excluded=["prefix","suffix","prefixIcon","suffixIcon","loading","error","children"];import{pipe,is}from'ramda';import React from'react';import{Icon}from"../presentation/Icon";import{Loading}from"../state/Loading";import{Text}from"../text/Text";import{View}from"../structure/View";import{useDefaultModifier}from"../../modifiers/default";import{useSizeConverter}from"../../modifiers/sizeConverter";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var DEFAULT_PROPS={fullW:'100%',paddingH:'sm',bg:'overlayBG',border:true,br:'md',row:true,gap:'sm'};export function InputWrapper(_ref){var prefix=_ref.prefix,suffix=_ref.suffix,prefixIcon=_ref.prefixIcon,suffixIcon=_ref.suffixIcon,loading=_ref.loading,error=_ref.error,children=_ref.children,rootProps=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),hover=_React$useState2[0],setHover=_React$useState2[1];var inputRef=React.useRef();var _pipe=pipe(useSizeConverter('elementHeights','md'),useThemeComponentModifier('InputWrapper'),useDefaultModifier(DEFAULT_PROPS))([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_pipe2$=_pipe2[0],size=_pipe2$.size,sizeCode=_pipe2$.sizeCode,onChange=_pipe2$.onChange,props=_pipe2[1];var handlePress=function handlePress(){var _inputRef$current;inputRef==null?void 0:(_inputRef$current=inputRef.current)==null?void 0:_inputRef$current.focus==null?void 0:_inputRef$current.focus();};if(!!prefix&&is(String,prefix))prefix=_jsx(Text,{children:prefix});if(!!suffix&&is(String,suffix))suffix=_jsx(Text,{children:suffix});if(!prefix&&!!prefixIcon)prefix=_jsx(Icon,{name:prefixIcon,size:sizeCode});if(!suffix&&!!suffixIcon)suffix=_jsx(Icon,{name:suffixIcon,size:sizeCode});if(!prefix&&!!error)suffix=_jsx(Icon,{name:"close-circle-fill",size:sizeCode,red:true});if(!!loading)suffix=_jsx(Loading,{size:sizeCode});var borderColor=!!hover?'primary_op40':'divider';if(!!error)borderColor='red_op40';var child=React.Children.only(children);var childWithProps=React.cloneElement(child,Object.assign({},child.props,{ref:inputRef,onChange:child.props.onChange||onChange}));return _jsxs(View,Object.assign({className:"neko-input-wrapper",height:size,onPress:handlePress,borderColor:borderColor,onMouseEnter:function onMouseEnter(){return setHover(true);},onMouseLeave:function onMouseLeave(){return setHover(false);}},props,{children:[!!prefix&&_jsx(View,{paddingV:5,fullHeight:true,center:true,children:prefix}),_jsx(View,{flex:true,fullH:true,children:childWithProps}),!!suffix&&_jsx(View,{paddingV:5,fullHeight:true,center:true,children:suffix})]}));}
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/InputWrapper.js";var _excluded=["prefix","suffix","prefixIcon","prefixIconColor","suffixIcon","suffixIconColor","loading","error","children","ref"];import{pipe,is}from'ramda';import React from'react';import{Icon}from"../presentation/Icon";import{Loading}from"../state/Loading";import{Text}from"../text/Text";import{View}from"../structure/View";import{useDefaultModifier}from"../../modifiers/default";import{useSizeConverter}from"../../modifiers/sizeConverter";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var DEFAULT_PROPS={fullW:'100%',paddingH:'sm',bg:'overlayBG',border:true,br:'md',row:true,gap:'sm'};export function InputWrapper(_ref){var prefix=_ref.prefix,suffix=_ref.suffix,prefixIcon=_ref.prefixIcon,prefixIconColor=_ref.prefixIconColor,suffixIcon=_ref.suffixIcon,suffixIconColor=_ref.suffixIconColor,loading=_ref.loading,error=_ref.error,children=_ref.children,ref=_ref.ref,rootProps=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),hover=_React$useState2[0],setHover=_React$useState2[1];var fallbackInputRef=React.useRef();var inputRef=ref||fallbackInputRef;var _pipe=pipe(useSizeConverter('elementHeights','md'),useThemeComponentModifier('InputWrapper'),useDefaultModifier(DEFAULT_PROPS))([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_pipe2$=_pipe2[0],size=_pipe2$.size,sizeCode=_pipe2$.sizeCode,props=_pipe2[1];var handlePress=function handlePress(){var _inputRef$current;inputRef==null?void 0:(_inputRef$current=inputRef.current)==null?void 0:_inputRef$current.focus==null?void 0:_inputRef$current.focus();};if(!!prefix&&is(String,prefix))prefix=_jsx(Text,{children:prefix});if(!!suffix&&is(String,suffix))suffix=_jsx(Text,{children:suffix});if(!prefix&&!!prefixIcon)prefix=_jsx(Icon,{name:prefixIcon,size:sizeCode,color:prefixIconColor});if(!suffix&&!!suffixIcon)suffix=_jsx(Icon,{name:suffixIcon,size:sizeCode,color:suffixIconColor});if(!prefix&&!!error)suffix=_jsx(Icon,{name:"close-circle-fill",size:sizeCode,red:true});if(!!loading)suffix=_jsx(Loading,{size:sizeCode});var borderColor=!!hover?'primary_op40':'divider';if(!!error)borderColor='red_op40';var child=React.Children.only(children);var childWithProps=React.cloneElement(child,Object.assign({},child.props,{ref:inputRef}));return _jsxs(View,Object.assign({className:"neko-input-wrapper",height:size,onPress:handlePress,borderColor:borderColor,onMouseEnter:function onMouseEnter(){return setHover(true);},onMouseLeave:function onMouseLeave(){return setHover(false);}},props,{children:[!!prefix&&_jsx(View,{paddingV:5,fullHeight:true,center:true,children:prefix}),_jsx(View,{flex:true,fullH:true,children:childWithProps}),!!suffix&&_jsx(View,{paddingV:5,fullHeight:true,center:true,children:suffix})]}));}
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/LinkInput.js";var _excluded=["onPress","onClick","placeholder","value","disabled"];import{InputWrapper}from"./InputWrapper";import{Link}from"../actions/Link";import{Text}from"../text/Text";import{View}from"../structure/View";import{useColors}from"../../theme/ThemeHandler";import{jsx as _jsx}from"react/jsx-runtime";export function LinkInput(_ref){var onPress=_ref.onPress,onClick=_ref.onClick,placeholder=_ref.placeholder,value=_ref.value,disabled=_ref.disabled,props=_objectWithoutProperties(_ref,_excluded);return _jsx(Link,{onPress:!props.loading?onPress||onClick:undefined,flex:true,fullW:true,centerV:true,disabled:disabled,children:_jsx(InputWrapper,Object.assign({},props,{children:_jsx(View,{centerV:true,flex:true,fullW:true,children:_jsx(Text,{color:!!value?'text':'text_op30',label:value||placeholder})})}))});}
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/MaskInput.js";var _excluded=["value","onChange","mask","useRawValue"];import React from'react';import{TextInput}from"./TextInput";import{jsx as _jsx}from"react/jsx-runtime";function removeMask(value){var mask=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';var result='';for(var i=0;i<mask.length;i++){var maskChar=mask[i];var valueChar=value[i];if(!valueChar)break;if(maskChar==='A'&&/[A-Za-z]/.test(valueChar)){result+=valueChar;}else if(maskChar==='9'&&/\d/.test(valueChar)){result+=valueChar;}}return result;}function applyMask(value,mask){var clean=value.replace(/[^0-9A-Za-z]/g,'');var result='';var index=0;for(var i=0;i<mask.length;i++){if(index>=clean.length)break;var char=mask[i];if(char==='9'&&/[0-9]/.test(clean[index])){result+=clean[index];index++;}else if(char==='A'&&/[A-Za-z]/.test(clean[index])){result+=clean[index].toUpperCase();index++;}else if(char==='9'||char==='A'){index++;i--;}else{result+=char;}}return result;}export function MaskInput(_ref){var _ref$value=_ref.value,value=_ref$value===void 0?'':_ref$value,onChange=_ref.onChange,_ref$mask=_ref.mask,mask=_ref$mask===void 0?'':_ref$mask,useRawValue=_ref.useRawValue,props=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(applyMask(value,mask)),_React$useState2=_slicedToArray(_React$useState,2),localValue=_React$useState2[0],setLocalValue=_React$useState2[1];var handleChange=React.useCallback(function(text){var masked=applyMask(text,mask);onChange==null?void 0:onChange(useRawValue?removeMask(masked,mask):masked);setLocalValue(masked);},[mask,onChange]);React.useEffect(function(){setLocalValue(applyMask(value,mask));},[value]);return _jsx(TextInput,Object.assign({value:localValue,onChange:handleChange},props));}
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/TextInput.js";var _excluded=["value"];import{AbsTextInput}from"../../abstractions/TextInput";import{InputWrapper}from"./InputWrapper";import{useColors}from"../../theme/ThemeHandler";import{jsx as _jsx}from"react/jsx-runtime";export function TextInput(_ref){var value=_ref.value,props=_objectWithoutProperties(_ref,_excluded);var colors=useColors();var STYLE={width:'100%',height:'100%',borderWidth:0,background:'transparent',outline:'none',color:colors.text};return _jsx(InputWrapper,Object.assign({},props,{children:_jsx(AbsTextInput,Object.assign({style:STYLE,placeholderTextColor:colors.text_op30},props,{value:value}))}));}
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/TextInput.js";var _excluded=["onChange"];import{AbsTextInput}from"../../abstractions/TextInput";import{InputWrapper}from"./InputWrapper";import{useColors}from"../../theme/ThemeHandler";import{jsx as _jsx}from"react/jsx-runtime";export function TextInput(_ref){var onChange=_ref.onChange,props=_objectWithoutProperties(_ref,_excluded);var colors=useColors();var STYLE={width:'100%',height:'100%',borderWidth:0,background:'transparent',outline:'none',color:colors.text};return _jsx(InputWrapper,Object.assign({},props,{children:_jsx(AbsTextInput,Object.assign({style:STYLE,placeholderTextColor:colors.text_op30},props,{onChange:onChange}))}));}
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/_DateInput.native.js";var _excluded=["value","onChange","min","max","onCheckDisabled","placement","type","format"];import React from'react';import advancedFormat from'dayjs/esm/plugin/advancedFormat';import dayjs from'dayjs';import weekOfYear from'dayjs/esm/plugin/weekOfYear';dayjs.extend(advancedFormat);dayjs.extend(weekOfYear);import{DatePicker}from"./datePicker/DatePicker";import{MaskInput}from"./MaskInput";import{Popover}from"../structure/popover/Popover";import{isValidDate}from"../calendar/_helpers/dateDisabled";import{jsx as _jsx}from"react/jsx-runtime";export function getDateInputDefaultFormat(type){switch(type){case'year':return'YYYY';case'quarter':return'YYYY-Q';case'month':return'YYYY-MM';case'week':return'YYYY-ww';default:return'YYYY-MM-DD';}}export function DateInput(_ref){var _this=this;var value=_ref.value,onChange=_ref.onChange,min=_ref.min,max=_ref.max,onCheckDisabled=_ref.onCheckDisabled,placement=_ref.placement,_ref$type=_ref.type,type=_ref$type===void 0?'day':_ref$type,format=_ref.format,props=_objectWithoutProperties(_ref,_excluded);format=format||getDateInputDefaultFormat(type);var _React$useState=React.useState(''),_React$useState2=_slicedToArray(_React$useState,2),inputValue=_React$useState2[0],setInputValue=_React$useState2[1];var _React$useState3=React.useState(value),_React$useState4=_slicedToArray(_React$useState3,2),localValue=_React$useState4[0],setLocalValue=_React$useState4[1];value=value||localValue;var validations={min:min,max:max,onCheckDisabled:onCheckDisabled};var handleChange=function handleChange(v){if(!isValidDate(v,format,validations))return;v=!!v?dayjs(v):null;setLocalValue(v);onChange==null?void 0:onChange(v);};var handleChangeInput=function handleChangeInput(v){setInputValue(v);if(!isValidDate(v,format,validations))return;handleChange(v);};var onBlur=function onBlur(){if(isValidDate(inputValue,format,validations))return;handleChange(null);setInputValue('');};React.useEffect(function(){setInputValue(!!value?dayjs(value).format(format):'');},[value]);return false;return _jsx(Popover,{trigger:"click",placement:placement||'bottomLeft',renderContent:function renderContent(_ref2){var onClose=_ref2.onClose;return _jsx(DatePicker,Object.assign({value:value,onChange:function onChange(v){handleChange(v);onClose();}},validations,{type:type}));},children:_jsx(MaskInput,Object.assign({value:inputValue,onChange:handleChangeInput,suffixIcon:"calendar-line",suffixIconColor:"text4",onBlur:onBlur,mask:format.replace(/[DMYQwW]/gi,'9')},props))});}
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/datePicker/DatePicker.js";var _excluded=["type"];import{DayPicker}from"./DayPicker";import{MonthPicker}from"./MonthPicker";import{QuarterPicker}from"./QuarterPicker";import{WeekPicker}from"./WeekPicker";import{YearPicker}from"./YearPicker";import{jsx as _jsx}from"react/jsx-runtime";export function DatePicker(_ref){var type=_ref.type,props=_objectWithoutProperties(_ref,_excluded);switch(type){case'year':return _jsx(YearPicker,Object.assign({},props));case'quarter':return _jsx(QuarterPicker,Object.assign({},props));case'month':return _jsx(MonthPicker,Object.assign({},props));case'week':return _jsx(WeekPicker,Object.assign({},props));default:return _jsx(DayPicker,Object.assign({},props));}}
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/datePicker/DayPicker.js";var _excluded=["value","onChange","min","max","onCheckDisabled"];import React from'react';import dayjs from'dayjs';import{CalendarNav}from"../../calendar/CalendarNav";import{Col}from"../../structure/Col";import{Grid}from"../../structure/Row";import{Link}from"../../actions/Link";import{Text}from"../../text/Text";import{View}from"../../structure/View";import{WeekDaysBar}from"../../calendar/WeekDaysBar";import{isDateDisabled}from"../../calendar/_helpers/dateDisabled";import{useCalendarDays}from"../../calendar/_helpers/calendarDays";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export function DayPicker(_ref){var _this=this;var value=_ref.value,onChange=_ref.onChange,min=_ref.min,max=_ref.max,onCheckDisabled=_ref.onCheckDisabled,props=_objectWithoutProperties(_ref,_excluded);if(!!value)value=dayjs(value);var _React$useState=React.useState(value),_React$useState2=_slicedToArray(_React$useState,2),localValue=_React$useState2[0],setLocalValue=_React$useState2[1];React.useEffect(function(){setLocalValue(value);},[value]);value=value===undefined?localValue:value;var handleChange=function handleChange(v){setLocalValue(v);onChange==null?void 0:onChange(v);};var _React$useState3=React.useState(function(){return dayjs(value).startOf('month');}),_React$useState4=_slicedToArray(_React$useState3,2),currentMonth=_React$useState4[0],setCurrentMonth=_React$useState4[1];var _useCalendarDays=useCalendarDays(currentMonth),cells=_useCalendarDays.cells;return _jsxs(View,Object.assign({className:"neko-day-picker",width:275},props,{children:[_jsx(CalendarNav,{value:currentMonth,onChange:setCurrentMonth}),_jsx(WeekDaysBar,{}),_jsx(Grid,{className:"neko-day-picker-days",colSpan:24/7,gap:"sm",children:cells.map(function(day,i){var dateVal=currentMonth.date(day);var isActive=!!value&&!!day&&dateVal.isSame(value,'day');var disabled=isDateDisabled(dateVal,{min:min,max:max,onCheckDisabled:onCheckDisabled});return _jsx(Col,{className:"day-cell",center:true,children:_jsx(Link,{ratio:1,fullW:true,center:true,br:"md",onPress:function onPress(){return!!day&&handleChange(dateVal);},bg:isActive&&'primary',disabled:disabled,children:_jsx(Text,{sm:true,text2:true,center:true,strong:isActive,children:day||''})})},day?dateVal.format('YYYYMMDD'):i);})})]}));}
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/datePicker/MonthPicker.js";var _excluded=["value","onChange","min","max","onCheckDisabled"];import React from'react';import dayjs from'dayjs';import{CalendarNav}from"../../calendar/CalendarNav";import{Col}from"../../structure/Col";import{Divider}from"../../helpers";import{Grid}from"../../structure/Row";import{Link}from"../../actions/Link";import{Text}from"../../text/Text";import{View}from"../../structure/View";import{isDateDisabled}from"../../calendar/_helpers/dateDisabled";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var months=[0,1,2,3,4,5,6,7,8,9,10,11];export function MonthPicker(_ref){var _value,_value2,_this=this;var value=_ref.value,onChange=_ref.onChange,min=_ref.min,max=_ref.max,onCheckDisabled=_ref.onCheckDisabled,props=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(value),_React$useState2=_slicedToArray(_React$useState,2),localValue=_React$useState2[0],setLocalValue=_React$useState2[1];value=value===undefined?localValue:value;React.useEffect(function(){setLocalValue(value);},[(_value=value)==null?void 0:_value.month==null?void 0:_value.month(),(_value2=value)==null?void 0:_value2.year==null?void 0:_value2.year()]);var handleChange=function handleChange(v){var newValue=v.startOf('month');setLocalValue(newValue);onChange==null?void 0:onChange(newValue);};var _React$useState3=React.useState(function(){return dayjs(value).startOf('year');}),_React$useState4=_slicedToArray(_React$useState3,2),currentYear=_React$useState4[0],setCurrentYear=_React$useState4[1];return _jsxs(View,Object.assign({className:"neko-day-picker",width:275},props,{children:[_jsx(CalendarNav,{value:currentYear,onChange:setCurrentYear,level:"year"}),_jsx(Divider,{}),_jsx(Grid,{colSpan:8,gap:"xs",children:months.map(function(month){var dateVal=currentYear.month(month);var isActive=!!value&&dateVal.isSame(value,'week');var disabled=isDateDisabled(dateVal,{min:min,max:max,onCheckDisabled:onCheckDisabled});return _jsx(Col,{children:_jsx(Link,{fullW:true,br:"md",padding:"sm",onPress:function onPress(){return handleChange(dateVal);},bg:isActive&&'primary',disabled:disabled,children:_jsx(Text,{text2:!isActive,strong:isActive,center:true,children:dateVal.format('MMM')})})},month);})})]}));}
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/datePicker/QuarterPicker.js";var _excluded=["value","onChange","min","max","onCheckDisabled"];import React from'react';import dayjs from'dayjs';import quarterOfYear from'dayjs/esm/plugin/quarterOfYear';import{CalendarNav}from"../../calendar/CalendarNav";import{Col}from"../../structure/Col";import{Divider}from"../../helpers";import{Grid}from"../../structure/Row";import{Link}from"../../actions/Link";import{Text}from"../../text/Text";import{View}from"../../structure/View";import{isDateDisabled}from"../../calendar/_helpers/dateDisabled";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";dayjs.extend(quarterOfYear);var quarters=[1,2,3,4];export function QuarterPicker(_ref){var _value,_value2,_this=this;var value=_ref.value,onChange=_ref.onChange,min=_ref.min,max=_ref.max,onCheckDisabled=_ref.onCheckDisabled,props=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(value),_React$useState2=_slicedToArray(_React$useState,2),localValue=_React$useState2[0],setLocalValue=_React$useState2[1];value=value===undefined?localValue:value;React.useEffect(function(){setLocalValue(value);},[(_value=value)==null?void 0:_value.quarter==null?void 0:_value.quarter(),(_value2=value)==null?void 0:_value2.year==null?void 0:_value2.year()]);var handleChange=function handleChange(v){var newValue=v.startOf('quarter');setLocalValue(newValue);onChange==null?void 0:onChange(newValue);};var _React$useState3=React.useState(function(){return dayjs(value).startOf('year');}),_React$useState4=_slicedToArray(_React$useState3,2),currentYear=_React$useState4[0],setCurrentYear=_React$useState4[1];return _jsxs(View,Object.assign({className:"neko-day-picker",width:275},props,{children:[_jsx(CalendarNav,{value:currentYear,onChange:setCurrentYear,level:"year"}),_jsx(Divider,{}),_jsx(Grid,{colSpan:6,gap:"xs",children:quarters.map(function(quarter){var dateVal=currentYear.quarter(quarter);var isActive=!!value&&dateVal.isSame(value,'week');var disabled=isDateDisabled(dateVal,{min:min,max:max,onCheckDisabled:onCheckDisabled});return _jsx(Col,{children:_jsx(Link,{fullW:true,br:"md",padding:"sm",onPress:function onPress(){return handleChange(dateVal);},bg:isActive&&'primary',disabled:disabled,children:_jsxs(Text,{text2:!isActive,strong:isActive,center:true,children:["Q",dateVal.quarter()]})})},quarter);})})]}));}
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/datePicker/WeekPicker.js";var _excluded=["value","onChange","min","max","onCheckDisabled"];import{splitEvery,identity}from'ramda';import React from'react';import dayjs from'dayjs';import{CalendarNav}from"../../calendar/CalendarNav";import{Col}from"../../structure/Col";import{Link}from"../../actions/Link";import{Row}from"../../structure/Row";import{Text}from"../../text/Text";import{View}from"../../structure/View";import{WeekDaysBar}from"../../calendar/WeekDaysBar";import{isDateDisabled}from"../../calendar/_helpers/dateDisabled";import{useCalendarDays}from"../../calendar/_helpers/calendarDays";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export function WeekPicker(_ref){var _value,_value2,_value3,_this=this;var value=_ref.value,onChange=_ref.onChange,min=_ref.min,max=_ref.max,onCheckDisabled=_ref.onCheckDisabled,props=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(value),_React$useState2=_slicedToArray(_React$useState,2),localValue=_React$useState2[0],setLocalValue=_React$useState2[1];value=value===undefined?localValue:value;React.useEffect(function(){setLocalValue(value);},[(_value=value)==null?void 0:_value.day==null?void 0:_value.day(),(_value2=value)==null?void 0:_value2.month==null?void 0:_value2.month(),(_value3=value)==null?void 0:_value3.year==null?void 0:_value3.year()]);var handleChange=function handleChange(v){var newValue=v.startOf('week');setLocalValue(newValue);onChange==null?void 0:onChange(newValue);};var _React$useState3=React.useState(function(){return dayjs(value).startOf('month');}),_React$useState4=_slicedToArray(_React$useState3,2),currentMonth=_React$useState4[0],setCurrentMonth=_React$useState4[1];var _useCalendarDays=useCalendarDays(currentMonth),cells=_useCalendarDays.cells;var weeks=splitEvery(7,cells);return _jsxs(View,Object.assign({className:"neko-day-picker",width:275},props,{children:[_jsx(CalendarNav,{value:currentMonth,onChange:setCurrentMonth}),_jsx(WeekDaysBar,{}),_jsx(View,{colSpan:24/7,gap:"sm",children:weeks.map(function(week,wi){var firstDay=week.find(identity);var dateVal=currentMonth.date(firstDay);var isActive=!!value&&!!firstDay&&dateVal.isSame(value,'week');var disabled=isDateDisabled(dateVal,{min:min,max:max,onCheckDisabled:onCheckDisabled});return _jsx(Link,{fullW:true,br:"md",onPress:function onPress(){return!!firstDay&&handleChange(dateVal);},bg:isActive&&'primary',disabled:disabled,children:_jsx(Row,{colSpan:24/7,gap:"sm",children:week.map(function(day,i){var dateVal=currentMonth.date(day);return _jsx(Col,{className:"day-cell",center:true,ratio:1,children:_jsx(Text,{sm:true,text2:true,center:true,strong:isActive,children:day||''})},day?dateVal.format('YYYYMMDD'):i);})})},firstDay?dateVal.format('YYYYMMDD'):wi);})})]}));}
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/datePicker/YearPicker.js";var _excluded=["value","onChange","min","max","onCheckDisabled"];import{range}from'ramda';import React from'react';import dayjs from'dayjs';import{CalendarNav}from"../../calendar/CalendarNav";import{Col}from"../../structure/Col";import{Divider}from"../../helpers";import{Grid}from"../../structure/Row";import{Link}from"../../actions/Link";import{Text}from"../../text/Text";import{View}from"../../structure/View";import{isDateDisabled}from"../../calendar/_helpers/dateDisabled";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export function YearPicker(_ref){var _value,_this=this;var value=_ref.value,onChange=_ref.onChange,min=_ref.min,max=_ref.max,onCheckDisabled=_ref.onCheckDisabled,props=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(value),_React$useState2=_slicedToArray(_React$useState,2),localValue=_React$useState2[0],setLocalValue=_React$useState2[1];value=value===undefined?localValue:value;React.useEffect(function(){setLocalValue(value);},[(_value=value)==null?void 0:_value.year==null?void 0:_value.year()]);var handleChange=function handleChange(v){var newValue=v.startOf('year');setLocalValue(newValue);onChange==null?void 0:onChange(newValue);};var _React$useState3=React.useState(function(){var year=dayjs(value).year();var decadeStartYear=Math.floor(year/10)*10;return dayjs().year(decadeStartYear).startOf('year');}),_React$useState4=_slicedToArray(_React$useState3,2),currentDecade=_React$useState4[0],setCurrentDecade=_React$useState4[1];var years=range(currentDecade.year(),currentDecade.year()+10);return _jsxs(View,Object.assign({className:"neko-day-picker",width:275},props,{children:[_jsx(CalendarNav,{value:currentDecade,onChange:setCurrentDecade,level:"decade"}),_jsx(Divider,{}),_jsx(Grid,{colSpan:12,gap:"xs",children:years.map(function(year){var dateVal=currentDecade.year(year);var isActive=!!value&&dateVal.isSame(value,'week');var disabled=isDateDisabled(dateVal,{min:min,max:max,onCheckDisabled:onCheckDisabled});return _jsx(Col,{children:_jsx(Link,{fullW:true,br:"md",padding:"sm",onPress:function onPress(){return handleChange(dateVal);},bg:isActive&&'primary',disabled:disabled,children:_jsx(Text,{text2:!isActive,strong:isActive,center:true,children:dateVal.year()})})},year);})})]}));}
@@ -1 +1 @@
1
- export*from"./Checkbox";export*from"./Radio";export*from"./Switch";export*from"./InputWrapper";export*from"./TextInput";export*from"./Picker";
1
+ export*from"./Checkbox";export*from"./Radio";export*from"./Switch";export*from"./InputWrapper";export*from"./TextInput";export*from"./LinkInput";export*from"./MaskInput";export*from"./DateInput";export*from"./datePicker/DatePicker";export*from"./Picker";
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/list/ScrollView.js";var _excluded=["children","useNormalView"];import{pipe}from'ramda';import{AbsScrollView}from"../../abstractions/ScrollView";import{View}from"../structure/View";import{useAnimationModifier}from"../../modifiers/animation";import{useBackgroundModifier}from"../../modifiers/background";import{useBorderModifier}from"../../modifiers/border";import{useDefaultModifier}from"../../modifiers/default";import{useDisplayModifier}from"../../modifiers/display";import{useFlexModifier}from"../../modifiers/flex";import{useFlexWrapperModifier}from"../../modifiers/flexWrapper";import{useMarginModifier}from"../../modifiers/margin";import{useOverflowModifier}from"../../modifiers/overflow";import{usePaddingModifier}from"../../modifiers/padding";import{usePositionModifier}from"../../modifiers/position";import{useResponsiveValue}from"../../responsive";import{useShadowModifier}from"../../modifiers/shadow";import{useSizeModifier}from"../../modifiers/size";import{useStateModifier}from"../../modifiers/state";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";var DEFAULT_PROPS=function DEFAULT_PROPS(_ref){var _ref2=_slicedToArray(_ref,2),_=_ref2[0],horizontal=_ref2[1].horizontal;var overflowKey=horizontal?'scrollX':'scrollY';return _defineProperty(_defineProperty({},overflowKey,true),"row",!!horizontal);};export function ScrollView(_ref4){var children=_ref4.children,useNormalView=_ref4.useNormalView,rootProps=_objectWithoutProperties(_ref4,_excluded);var _pipe=pipe(useThemeComponentModifier('ScrollView'),useDefaultModifier(DEFAULT_PROPS),useFlexWrapperModifier,useDisplayModifier,useAnimationModifier,useStateModifier,useSizeModifier,usePositionModifier,useOverflowModifier,usePaddingModifier,useMarginModifier,useFlexModifier,useBackgroundModifier,useBorderModifier,useShadowModifier)([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_=_pipe2[0],props=_pipe2[1];useNormalView=useResponsiveValue(useNormalView);if(useNormalView)return _jsx(View,Object.assign({},rootProps,{children:children}));return _jsx(AbsScrollView,Object.assign({className:"neko-scroll-view"},props,{children:children}));}
@@ -0,0 +1 @@
1
+ export*from"./ScrollView";
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectDestructuringEmpty from"@babel/runtime/helpers/objectDestructuringEmpty";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/presentation/ImageBackground.js";import{pipe}from'ramda';import{AbsImageBackground}from"../../abstractions/ImageBackground";import{useAnimationModifier}from"../../modifiers/animation";import{useBackgroundModifier}from"../../modifiers/background";import{useBorderModifier}from"../../modifiers/border";import{useDisplayModifier}from"../../modifiers/display";import{useFlexModifier}from"../../modifiers/flex";import{useFlexWrapperModifier}from"../../modifiers/flexWrapper";import{useMarginModifier}from"../../modifiers/margin";import{useOverflowModifier}from"../../modifiers/overflow";import{usePaddingModifier}from"../../modifiers/padding";import{usePositionModifier}from"../../modifiers/position";import{useShadowModifier}from"../../modifiers/shadow";import{useSizeModifier}from"../../modifiers/size";import{useStateModifier}from"../../modifiers/state";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";export function ImageBackground(_ref){var rootProps=Object.assign({},(_objectDestructuringEmpty(_ref),_ref));var _pipe=pipe(useThemeComponentModifier('ImageBackground'),useFlexWrapperModifier,useDisplayModifier,useAnimationModifier,useStateModifier,useSizeModifier,usePositionModifier,useOverflowModifier,usePaddingModifier,useMarginModifier,useFlexModifier,useBackgroundModifier,useBorderModifier,useShadowModifier)([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),_=_pipe2[0],props=_pipe2[1];return _jsx(AbsImageBackground,Object.assign({className:"neko-image-background"},props));}
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/presentation/Result.js";var _excluded=["type","icon","iconColor","title","description","footer","titleProps","descriptionProps","textProps","iconProps"];import{Divider}from"../helpers/Separator";import{Icon}from"./Icon";import{Text}from"../text/Text";import{View}from"../structure/View";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var RESULT_TYPES={error:{icon:'close-circle-fill',color:'red'},success:{icon:'checkbox-circle-fill',color:'green'},warning:{icon:'error-warning-fill',color:'yellow'},info:{icon:'information-2-fill',color:'blue'}};export function Result(_ref){var type=_ref.type,icon=_ref.icon,iconColor=_ref.iconColor,title=_ref.title,description=_ref.description,footer=_ref.footer,titleProps=_ref.titleProps,descriptionProps=_ref.descriptionProps,textProps=_ref.textProps,iconProps=_ref.iconProps,props=_objectWithoutProperties(_ref,_excluded);var typeProps=RESULT_TYPES[type]||{};icon=icon||typeProps.icon;iconColor=iconColor||typeProps.color||'primary';return _jsxs(View,Object.assign({className:"neko-result",center:true,padding:"lg"},props,{children:[_jsx(Icon,Object.assign({name:icon,color:iconColor,size:42,primary:true},iconProps)),_jsx(Divider,{height:10}),_jsx(Text,Object.assign({h3:true},textProps,titleProps,{children:title})),!!description&&_jsx(Text,Object.assign({text3:true,sm:true},textProps,descriptionProps,{children:description})),!!footer&&_jsx(View,{marginT:"lg",children:footer})]}));}
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/presentation/Result.js";var _excluded=["type","icon","iconColor","title","description","footer","titleProps","descriptionProps","textProps","iconProps"];import{Divider}from"../helpers/Separator";import{Icon}from"./Icon";import{Text}from"../text/Text";import{View}from"../structure/View";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var RESULT_TYPES={error:{icon:'close-circle-fill',color:'red'},success:{icon:'checkbox-circle-fill',color:'green'},warning:{icon:'error-warning-fill',color:'yellow'},info:{icon:'information-2-fill',color:'blue'}};export function Result(_ref){var type=_ref.type,icon=_ref.icon,iconColor=_ref.iconColor,title=_ref.title,description=_ref.description,footer=_ref.footer,titleProps=_ref.titleProps,descriptionProps=_ref.descriptionProps,textProps=_ref.textProps,iconProps=_ref.iconProps,props=_objectWithoutProperties(_ref,_excluded);var typeProps=RESULT_TYPES[type]||{};icon=icon||typeProps.icon;iconColor=iconColor||typeProps.color||'primary';return _jsxs(View,Object.assign({className:"neko-result",center:true,padding:"lg"},props,{children:[!!icon&&_jsx(Icon,Object.assign({name:icon,color:iconColor,size:42,primary:true},iconProps)),!!icon&&_jsx(Divider,{height:10}),_jsx(Text,Object.assign({h3:true},textProps,titleProps,{children:title})),!!description&&_jsx(Text,Object.assign({text3:true,sm:true},textProps,descriptionProps,{children:description})),!!footer&&_jsx(View,{marginT:"lg",children:footer})]}));}
@@ -1 +1 @@
1
- export*from"./Tag";export*from"./Icon";export*from"./IconLabel";export*from"./Result";export*from"./ResultBar";export*from"./Tooltip";export*from"./Badge";export*from"./Avatar";export*from"./AvatarLabel";export*from"./Image";export*from"./LabelValue";
1
+ export*from"./Tag";export*from"./Icon";export*from"./IconLabel";export*from"./Result";export*from"./ResultBar";export*from"./Tooltip";export*from"./Badge";export*from"./Avatar";export*from"./AvatarLabel";export*from"./Image";export*from"./ImageBackground";export*from"./LabelValue";
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/Accordion.js";var _excluded=["children","title","open","onChange"],_excluded2=["contentProps","titleProps","headerProps","initOpen"];import{pipe}from'ramda';import React from'react';import{AbsView}from"../../abstractions/View";import{Card}from"./Card";import{Icon}from"../presentation/Icon";import{Link}from"../actions/Link";import{Text}from"../text/Text";import{View}from"./View";import{moveScale}from"../../theme/helpers/sizeScale";import{useDefaultModifier}from"../../modifiers/default";import{useSizeConverter}from"../../modifiers/sizeConverter";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var DEFAULT_PROPS={padding:0,br:'xl',bg:'overlayBG',hiddenOverflow:true};export function Accordion(_ref){var children=_ref.children,title=_ref.title,open=_ref.open,onChange=_ref.onChange,rootProps=_objectWithoutProperties(_ref,_excluded);var _pipe=pipe(useSizeConverter('elementHeights','md'),useThemeComponentModifier('Accordion'),useDefaultModifier(DEFAULT_PROPS))([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),sizeCode=_pipe2[0].sizeCode,formattedProps=_pipe2[1];var contentProps=formattedProps.contentProps,titleProps=formattedProps.titleProps,headerProps=formattedProps.headerProps,initOpen=formattedProps.initOpen,props=_objectWithoutProperties(formattedProps,_excluded2);var _React$useState=React.useState(initOpen),_React$useState2=_slicedToArray(_React$useState,2),localOpen=_React$useState2[0],setLocalOpen=_React$useState2[1];open=open===undefined?localOpen:open;var toggle=function toggle(){setLocalOpen(!open);onChange==null?void 0:onChange(!open);};return _jsxs(Card,Object.assign({},props,{children:[_jsxs(Link,Object.assign({padding:sizeCode,row:true,gap:moveScale(sizeCode,-2),borderB:open?props.border||true:open,borderColor:props.borderColor,centerV:true},headerProps,{onPress:toggle,children:[_jsx(Icon,{name:!!open?'arrow-down-s-line':'arrow-right-s-line'}),_jsx(Text,Object.assign({flex:true},titleProps,{children:title}))]})),!!open&&_jsx(View,Object.assign({padding:sizeCode},contentProps,{children:children}))]}));return _jsx(AbsView,Object.assign({className:"neko-accordion"},props,{children:children}));}
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/Accordion.js";var _excluded=["children","title","open","onChange"],_excluded2=["contentProps","titleProps","headerProps","initOpen"];import{pipe}from'ramda';import React from'react';import{AbsView}from"../../abstractions/View";import{Card}from"./Card";import{Icon}from"../presentation/Icon";import{Link}from"../actions/Link";import{Text}from"../text/Text";import{View}from"./View";import{moveScale}from"../../theme/helpers/sizeScale";import{useDefaultModifier}from"../../modifiers/default";import{useSizeConverter}from"../../modifiers/sizeConverter";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var DEFAULT_PROPS={padding:0,br:'xl',bg:'overlayBG',hiddenOverflow:true};export function Accordion(_ref){var children=_ref.children,title=_ref.title,open=_ref.open,onChange=_ref.onChange,rootProps=_objectWithoutProperties(_ref,_excluded);var _pipe=pipe(useSizeConverter('elementHeights','md'),useThemeComponentModifier('Accordion'),useDefaultModifier(DEFAULT_PROPS))([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),sizeCode=_pipe2[0].sizeCode,formattedProps=_pipe2[1];var contentProps=formattedProps.contentProps,titleProps=formattedProps.titleProps,headerProps=formattedProps.headerProps,initOpen=formattedProps.initOpen,props=_objectWithoutProperties(formattedProps,_excluded2);var _React$useState=React.useState(initOpen),_React$useState2=_slicedToArray(_React$useState,2),localOpen=_React$useState2[0],setLocalOpen=_React$useState2[1];open=open===undefined?localOpen:open;var toggle=function toggle(){setLocalOpen(!open);onChange==null?void 0:onChange(!open);};return _jsxs(Card,Object.assign({},props,{children:[_jsxs(Link,Object.assign({padding:sizeCode,row:true,gap:moveScale(sizeCode,-2),borderB:open?props.border||true:open,borderColor:props.borderColor||'bg',centerV:true},headerProps,{onPress:toggle,children:[_jsx(Icon,{name:!!open?'arrow-down-s-line':'arrow-right-s-line'}),_jsx(Text,Object.assign({flex:true},titleProps,{children:title}))]})),!!open&&_jsx(View,Object.assign({padding:sizeCode},contentProps,{children:children}))]}));return _jsx(AbsView,Object.assign({className:"neko-accordion"},props,{children:children}));}
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _objectDestructuringEmpty from"@babel/runtime/helpers/objectDestructuringEmpty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/BlurView.js";var _excluded=["children"];import tinycolor from'tinycolor2';import{pipe}from'ramda';import{AbsBlurView}from"../../abstractions/BlurView";import{useAnimationModifier}from"../../modifiers/animation";import{useBackgroundModifier}from"../../modifiers/background";import{useBorderModifier}from"../../modifiers/border";import{useColors}from"../../theme";import{useDefaultModifier}from"../../modifiers/default";import{useDisplayModifier}from"../../modifiers/display";import{useFlexModifier}from"../../modifiers/flex";import{useFlexWrapperModifier}from"../../modifiers/flexWrapper";import{useMarginModifier}from"../../modifiers/margin";import{useOverflowModifier}from"../../modifiers/overflow";import{usePaddingModifier}from"../../modifiers/padding";import{usePositionModifier}from"../../modifiers/position";import{useShadowModifier}from"../../modifiers/shadow";import{useSizeModifier}from"../../modifiers/size";import{useStateModifier}from"../../modifiers/state";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";var DEFAULT_PROPS=function DEFAULT_PROPS(colors){return function(_ref){var _ref2=_slicedToArray(_ref,2);_objectDestructuringEmpty(_ref2[0]);_objectDestructuringEmpty(_ref2[1]);var isDark=tinycolor((colors==null?void 0:colors.overlayBG)||(colors==null?void 0:colors.bg)).isDark();return{tint:isDark?'dark':'light'};};};export function BlurView(_ref3){var children=_ref3.children,rootProps=_objectWithoutProperties(_ref3,_excluded);var colors=useColors();var _pipe=pipe(useThemeComponentModifier('BlurView'),useDefaultModifier(DEFAULT_PROPS(colors)),useFlexWrapperModifier,useDisplayModifier,useAnimationModifier,useStateModifier,useSizeModifier,usePositionModifier,useOverflowModifier,usePaddingModifier,useMarginModifier,useFlexModifier,useBackgroundModifier,useBorderModifier,useShadowModifier)([{},rootProps]),_pipe2=_slicedToArray(_pipe,2);_objectDestructuringEmpty(_pipe2[0]);var props=_pipe2[1];return _jsx(AbsBlurView,Object.assign({className:"neko-blur-view"},props,{children:children}));}
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/GradientView.js";var _excluded=["children"];import{pipe}from'ramda';import{AbsGradientView}from"../../abstractions/GradientView";import{useAnimationModifier}from"../../modifiers/animation";import{useBackgroundModifier}from"../../modifiers/background";import{useBorderModifier}from"../../modifiers/border";import{useDisplayModifier}from"../../modifiers/display";import{useFlexModifier}from"../../modifiers/flex";import{useFlexWrapperModifier}from"../../modifiers/flexWrapper";import{useMarginModifier}from"../../modifiers/margin";import{useOverflowModifier}from"../../modifiers/overflow";import{usePaddingModifier}from"../../modifiers/padding";import{usePositionModifier}from"../../modifiers/position";import{useShadowModifier}from"../../modifiers/shadow";import{useSizeModifier}from"../../modifiers/size";import{useStateModifier}from"../../modifiers/state";import{useThemeComponentModifier}from"../../modifiers/themeComponent";import{jsx as _jsx}from"react/jsx-runtime";export function GradientView(_ref){var children=_ref.children,rootProps=_objectWithoutProperties(_ref,_excluded);var _pipe=pipe(useThemeComponentModifier('GradientView'),useFlexWrapperModifier,useDisplayModifier,useAnimationModifier,useStateModifier,useSizeModifier,usePositionModifier,useOverflowModifier,usePaddingModifier,useMarginModifier,useFlexModifier,useBackgroundModifier,useBorderModifier,useShadowModifier)([{},rootProps]),_pipe2=_slicedToArray(_pipe,2),gradientColors=_pipe2[0].gradientColors,props=_pipe2[1];return _jsx(AbsGradientView,Object.assign({className:"neko-gradient-view",colors:gradientColors},props,{children:children}));}
@@ -0,0 +1 @@
1
+ export{BottomDrawer}from"./web/BottomDrawer";
@@ -0,0 +1 @@
1
+ export{BottomDrawer}from"./native/BottomDrawer";export{DrawerScrollView}from"./native/DrawerScrollView";export{DrawerHandle}from"./native/DrawerHandle";export{DrawerProvider,useDrawerContext}from"./native/DrawerContext";
@@ -0,0 +1 @@
1
+ export{BottomDrawer}from"./native/BottomDrawer";export{DrawerScrollView}from"./native/DrawerScrollView";export{DrawerHandle}from"./native/DrawerHandle";export{DrawerProvider,useDrawerContext}from"./native/DrawerContext";
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/bottomDrawer/native/BottomDrawer.js";var _excluded=["children","render","setRender","open","onClose","snapPoints","useSafeArea","enableOverScroll","enableHandlePanningGesture","enableContentPanningGesture","animationConfig","hideHandle","contentProps"],_excluded2=["open"];import{GestureDetector,Gesture,GestureHandlerRootView}from'react-native-gesture-handler';import{Modal,Dimensions,StyleSheet,BackHandler,Platform}from"react-native-web";import{useSafeAreaInsets}from'react-native-safe-area-context';import Animated,{useSharedValue,useAnimatedStyle,withSpring,runOnJS,useAnimatedReaction}from'react-native-reanimated';import React from'react';import{DrawerHandle}from"./DrawerHandle";import{DrawerProvider}from"./DrawerContext";import{Pressable}from"../../../actions/Pressable";import{View}from"../../View";import{normalizeSnapPoints,findClosestSnapPoint}from"./utils";import{useColors}from"../../../../theme/ThemeHandler";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";function InnerContent(_ref){var children=_ref.children,render=_ref.render,setRender=_ref.setRender,open=_ref.open,onClose=_ref.onClose,_ref$snapPoints=_ref.snapPoints,snapPoints=_ref$snapPoints===void 0?['50%']:_ref$snapPoints,_ref$useSafeArea=_ref.useSafeArea,useSafeArea=_ref$useSafeArea===void 0?true:_ref$useSafeArea,_ref$enableOverScroll=_ref.enableOverScroll,enableOverScroll=_ref$enableOverScroll===void 0?true:_ref$enableOverScroll,_ref$enableHandlePann=_ref.enableHandlePanningGesture,enableHandlePanningGesture=_ref$enableHandlePann===void 0?true:_ref$enableHandlePann,_ref$enableContentPan=_ref.enableContentPanningGesture,enableContentPanningGesture=_ref$enableContentPan===void 0?true:_ref$enableContentPan,_ref$animationConfig=_ref.animationConfig,animationConfig=_ref$animationConfig===void 0?{damping:50,stiffness:500,mass:0.3,overshootClamping:true,restDisplacementThreshold:10,restSpeedThreshold:10}:_ref$animationConfig,hideHandle=_ref.hideHandle,contentProps=_ref.contentProps,props=_objectWithoutProperties(_ref,_excluded);var _Dimensions$get=Dimensions.get('window'),SCREEN_HEIGHT=_Dimensions$get.height;var insets=useSafeAreaInsets();var bottomInset=useSafeArea?insets.bottom:0;var colors=useColors();var translateY=useSharedValue(SCREEN_HEIGHT);var scrollOffset=useSharedValue(0);var scrollEnabled=useSharedValue(false);var isScrolling=useSharedValue(false);var snapIndex=useSharedValue(0);var velocityY=useSharedValue(0);var normalizedSnapPoints=React.useMemo(function(){return normalizeSnapPoints(snapPoints,SCREEN_HEIGHT);},[snapPoints]);var maxSnapPoint=React.useMemo(function(){return Math.max.apply(Math,_toConsumableArray(normalizedSnapPoints));},[normalizedSnapPoints]);var minSnapPoint=React.useMemo(function(){return Math.min.apply(Math,_toConsumableArray(normalizedSnapPoints));},[normalizedSnapPoints]);React.useEffect(function(){if(open){var targetY=SCREEN_HEIGHT-normalizedSnapPoints[0];translateY.value=withSpring(targetY,animationConfig);snapIndex.value=0;}else{translateY.value=withSpring(SCREEN_HEIGHT,animationConfig,function(){scrollOffset.value=0;scrollEnabled.value=false;runOnJS(setRender)(false);});snapIndex.value=-1;}},[open]);React.useEffect(function(){if(!onClose||!open||Platform.OS!=='android')return;var backHandler=BackHandler.addEventListener('hardwareBackPress',function(){onClose();return true;});return function(){return backHandler.remove();};},[open,onClose]);useAnimatedReaction(function(){return translateY.value;},function(currentY){var atMaxSnapPoint=currentY<=SCREEN_HEIGHT-maxSnapPoint;scrollEnabled.value=atMaxSnapPoint;},[]);var handleClose=React.useCallback(function(){onClose==null?void 0:onClose();},[onClose]);if(!onClose)handleClose=false;var snapTo=React.useCallback(function(index){'worklet';var snapPoint=normalizedSnapPoints[index];if(snapPoint!==undefined){translateY.value=withSpring(SCREEN_HEIGHT-snapPoint,animationConfig);snapIndex.value=index;}},[normalizedSnapPoints]);var gestureStartTranslateY=useSharedValue(0);var panGesture=React.useMemo(function(){return Gesture.Pan().enabled(enableHandlePanningGesture||enableContentPanningGesture).onStart(function(){gestureStartTranslateY.value=translateY.value;}).onUpdate(function(event){var newTranslateY=gestureStartTranslateY.value+event.translationY;var maxPosition=SCREEN_HEIGHT-maxSnapPoint;if(enableOverScroll&&newTranslateY>=maxPosition){translateY.value=newTranslateY;}else{translateY.value=Math.max(maxPosition,Math.min(SCREEN_HEIGHT,newTranslateY));}velocityY.value=event.velocityY;}).onEnd(function(){var currentPosition=SCREEN_HEIGHT-translateY.value;var shouldClose=!!handleClose&&(velocityY.value>2000&&currentPosition<minSnapPoint*0.75||currentPosition<minSnapPoint*0.25);if(shouldClose){runOnJS(handleClose)();}else{var closestSnapIndex=findClosestSnapPoint(currentPosition,normalizedSnapPoints,velocityY.value);var targetSnapPoint=normalizedSnapPoints[closestSnapIndex];translateY.value=withSpring(SCREEN_HEIGHT-targetSnapPoint,animationConfig);snapIndex.value=closestSnapIndex;}});},[enableHandlePanningGesture,enableContentPanningGesture,enableOverScroll,maxSnapPoint,minSnapPoint,normalizedSnapPoints,animationConfig,handleClose]);var animatedSheetStyle=useAnimatedStyle(function(){var currentHeight=SCREEN_HEIGHT-translateY.value;return{transform:[{translateY:translateY.value}],maxHeight:currentHeight};});var contextValue=React.useMemo(function(){return{translateY:translateY,scrollOffset:scrollOffset,scrollEnabled:scrollEnabled,isScrolling:isScrolling,snapIndex:snapIndex,maxSnapPoint:maxSnapPoint,snapTo:snapTo,animationConfig:animationConfig};},[maxSnapPoint]);return _jsxs(GestureHandlerRootView,{style:{flex:1},children:[_jsx(Pressable,{absoluteFill:true,bg:"backdrop_op70",onPress:function onPress(){if(!handleClose)return;runOnJS(handleClose)();}}),_jsx(DrawerProvider,{value:contextValue,children:_jsx(GestureDetector,{gesture:panGesture,children:_jsx(Animated.View,{style:[styles.container,{height:SCREEN_HEIGHT},animatedSheetStyle],children:_jsxs(View,Object.assign({flex:true,bg:"overlayBG",shadow:true,paddingB:useSafeArea&&bottomInset,borderRadiusT:"xxxl"},props,{children:[_jsx(DrawerHandle,{hide:hideHandle}),_jsx(View,Object.assign({flex:true},contentProps,{children:children}))]}))})})})]});}var styles=StyleSheet.create({container:{position:'absolute',left:0,right:0,top:0}});export function BottomDrawer(_ref2){var open=_ref2.open,props=_objectWithoutProperties(_ref2,_excluded2);var _React$useState=React.useState(open),_React$useState2=_slicedToArray(_React$useState,2),render=_React$useState2[0],setRender=_React$useState2[1];React.useEffect(function(){if(open){setRender(true);}},[open]);return _jsx(Modal,{visible:render,transparent:true,statusBarTranslucent:true,navigationBarTranslucent:true,animationType:"none",children:_jsx(InnerContent,Object.assign({},props,{open:open,render:render,setRender:setRender}))});}
@@ -0,0 +1 @@
1
+ var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/bottomDrawer/native/DrawerContext.js";import React from'react';import{jsx as _jsx}from"react/jsx-runtime";var DrawerContext=React.createContext(null);export function DrawerProvider(_ref){var children=_ref.children,value=_ref.value;return _jsx(DrawerContext.Provider,{value:value,children:children});}export function useDrawerContext(){var context=React.useContext(DrawerContext);if(!context){throw new Error('useDrawerContext must be used within a DrawerProvider');}return context;}
@@ -0,0 +1 @@
1
+ var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/bottomDrawer/native/DrawerHandle.js";import{Divider}from"../../../helpers/Separator";import{View}from"../../View";import{jsx as _jsx}from"react/jsx-runtime";export function DrawerHandle(_ref){var hide=_ref.hide;if(!!hide)return false;return _jsx(View,{center:true,padding:"sm",children:_jsx(Divider,{maxWidth:35,line:4,color:"text4_op30",height:4})});}
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["children","onScroll","scrollEventThrottle","showsVerticalScrollIndicator","bounces"];var _this=this,_jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/bottomDrawer/native/DrawerScrollView.js";import React from'react';import{ScrollView}from"react-native-web";import Animated,{useAnimatedScrollHandler,useAnimatedReaction,runOnJS}from'react-native-reanimated';import{useDrawerContext}from"./DrawerContext";import{jsx as _jsx}from"react/jsx-runtime";var AnimatedScrollView=Animated.createAnimatedComponent(ScrollView);export var DrawerScrollView=React.forwardRef(function(props,ref){var children=props.children,_onScroll=props.onScroll,_props$scrollEventThr=props.scrollEventThrottle,scrollEventThrottle=_props$scrollEventThr===void 0?16:_props$scrollEventThr,_props$showsVerticalS=props.showsVerticalScrollIndicator,showsVerticalScrollIndicator=_props$showsVerticalS===void 0?true:_props$showsVerticalS,_props$bounces=props.bounces,bounces=_props$bounces===void 0?true:_props$bounces,scrollViewProps=_objectWithoutProperties(props,_excluded);var _useDrawerContext=useDrawerContext(),scrollOffset=_useDrawerContext.scrollOffset,scrollEnabled=_useDrawerContext.scrollEnabled,isScrolling=_useDrawerContext.isScrolling;var scrollRef=React.useRef(null);var _React$useState=React.useState(true),_React$useState2=_slicedToArray(_React$useState,2),isScrollEnabled=_React$useState2[0],setIsScrollEnabled=_React$useState2[1];React.useImperativeHandle(ref,function(){return scrollRef.current;});useAnimatedReaction(function(){return scrollEnabled.value;},function(enabled){if(!enabled&&scrollOffset.value>0){runOnJS(function(){var _scrollRef$current;(_scrollRef$current=scrollRef.current)==null?void 0:_scrollRef$current.scrollTo({y:0,animated:false});})();scrollOffset.value=0;}runOnJS(setIsScrollEnabled)(enabled);},[]);var handleScrollBeginDrag=React.useCallback(function(){isScrolling.value=true;},[isScrolling]);var handleScrollEndDrag=React.useCallback(function(){isScrolling.value=false;},[isScrolling]);var animatedScrollHandler=useAnimatedScrollHandler({onScroll:function onScroll(event){scrollOffset.value=event.contentOffset.y;if(_onScroll){runOnJS(_onScroll)(event);}},onBeginDrag:function onBeginDrag(){runOnJS(handleScrollBeginDrag)();},onEndDrag:function onEndDrag(){runOnJS(handleScrollEndDrag)();}});return _jsx(AnimatedScrollView,Object.assign({ref:scrollRef,style:{flex:1},scrollEnabled:isScrollEnabled,onScroll:animatedScrollHandler,scrollEventThrottle:scrollEventThrottle,showsVerticalScrollIndicator:showsVerticalScrollIndicator,bounces:bounces},scrollViewProps,{children:children}));});DrawerScrollView.displayName='DrawerScrollView';
@@ -0,0 +1 @@
1
+ export function normalizeSnapPoints(snapPoints,screenHeight){return snapPoints.map(function(point){if(typeof point==='string'&&point.endsWith('%')){var percentage=parseFloat(point)/100;return screenHeight*percentage;}return point;});}export function findClosestSnapPoint(currentPosition,snapPoints){'worklet';var velocity=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var velocityImpact=velocity*0.03;var adjustedPosition=currentPosition+velocityImpact;var closestIndex=0;var minDistance=Math.abs(snapPoints[0]-adjustedPosition);for(var i=1;i<snapPoints.length;i++){var distance=Math.abs(snapPoints[i]-adjustedPosition);if(distance<minDistance){minDistance=distance;closestIndex=i;}}if(velocity<-1500&&closestIndex<snapPoints.length-1){closestIndex++;}else if(velocity>1500&&closestIndex>0){closestIndex--;}if(snapPoints.length>1){var currentSnapDistance=minDistance;var snapPointSpacing=Math.abs(snapPoints[Math.min(closestIndex+1,snapPoints.length-1)]-snapPoints[closestIndex]);if(currentSnapDistance<snapPointSpacing*0.2){return closestIndex;}}return closestIndex;}export function clamp(value,min,max){'worklet';return Math.min(Math.max(value,min),max);}
@@ -0,0 +1 @@
1
+ var _this=this,_jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/bottomDrawer/web/BottomDrawer.js";import{Drawer}from"../../drawer";import{jsx as _jsx}from"react/jsx-runtime";export var BottomDrawer=function BottomDrawer(props){return _jsx(Drawer,Object.assign({height:400},props));};
@@ -0,0 +1 @@
1
+ var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/structure/drawer/Drawer.js";import{Modal}from"../modal/Modal";import{jsx as _jsx}from"react/jsx-runtime";export function Drawer(props){return _jsx(Modal,Object.assign({position:"bottom"},props));}
@@ -0,0 +1 @@
1
+ import{BottomDrawer}from"../bottomDrawer/native/BottomDrawer";export var Drawer=BottomDrawer;