@webority/mobile-ui 0.177.0 → 0.178.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas-kit/kit.js +9 -9
- package/dist/canvas-kit/manifest.json +1 -1
- package/dist/canvas-kit/release.json +5 -5
- package/lib/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +1 -1
- package/lib/commonjs/components/Screen/Screen.js +1 -1
- package/lib/commonjs/utils/contentPadding.js +1 -0
- package/lib/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +1 -1
- package/lib/module/components/Screen/Screen.js +1 -1
- package/lib/module/utils/contentPadding.js +1 -0
- package/lib/typescript/commonjs/utils/contentPadding.d.ts +4 -0
- package/lib/typescript/module/utils/contentPadding.d.ts +4 -0
- package/package.json +7 -7
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webority-phone",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.178.1",
|
|
4
4
|
"platform": "Phone",
|
|
5
5
|
"kitModuleVersion": 2,
|
|
6
6
|
"rendererProtocolVersion": 14,
|
|
7
7
|
"library": {
|
|
8
8
|
"name": "@webority/mobile-ui",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.178.1"
|
|
10
10
|
},
|
|
11
11
|
"files": {
|
|
12
12
|
"manifest.json": {
|
|
13
|
-
"sha256": "
|
|
13
|
+
"sha256": "833b20900f097cc6828985c5c94fbd1abad6432780f21483fe9c335d560b2cd3",
|
|
14
14
|
"bytes": 673973
|
|
15
15
|
},
|
|
16
16
|
"kit.js": {
|
|
17
|
-
"sha256": "
|
|
18
|
-
"bytes":
|
|
17
|
+
"sha256": "b0a5b1fde500f031a5bad9be26662c928f86dab3292f7138c27204e138b94bf7",
|
|
18
|
+
"bytes": 5706179
|
|
19
19
|
},
|
|
20
20
|
"kit.css": {
|
|
21
21
|
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.KeyboardAwareScrollView=KeyboardAwareScrollView,exports.default=void 0;var _reactNative=require("react-native"),_reactNativeKeyboardController=require("react-native-keyboard-controller"),_reactNativeSafeAreaContext=require("react-native-safe-area-context"),_index=require("../../theme/index.js"),_jsxRuntime=require("react/jsx-runtime");const tapAreaStyle={flexGrow:1},CHILD_LAYOUT_KEYS=["gap","rowGap","columnGap","flexDirection","flexWrap","alignItems","alignContent","justifyContent"],childLayout=e=>{const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.KeyboardAwareScrollView=KeyboardAwareScrollView,exports.default=void 0;var _reactNative=require("react-native"),_reactNativeKeyboardController=require("react-native-keyboard-controller"),_reactNativeSafeAreaContext=require("react-native-safe-area-context"),_index=require("../../theme/index.js"),_contentPadding=require("../../utils/contentPadding.js"),_jsxRuntime=require("react/jsx-runtime");const tapAreaStyle={flexGrow:1},CHILD_LAYOUT_KEYS=["gap","rowGap","columnGap","flexDirection","flexWrap","alignItems","alignContent","justifyContent"],childLayout=e=>{const t=_reactNative.StyleSheet.flatten(e),r={};for(const e of CHILD_LAYOUT_KEYS)void 0!==t?.[e]&&Object.assign(r,{[e]:t[e]});return r};function KeyboardAwareScrollView({ref:e,...t}){const{children:r,bottomOffset:o=24,extraKeyboardSpace:a=0,safeAreaEdges:n=["bottom"],refreshing:i=!1,onRefresh:s,dismissOnTapOutside:l=!0,contentContainerStyle:d,refreshControl:c,...u}=t,f=(0,_index.useTheme)(),b=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)(),y=n.includes("bottom"),p={paddingBottom:(0,_contentPadding.bottomPaddingOf)(d)+(y?b.bottom:0),...n.includes("top")?{paddingTop:b.top}:null,...n.includes("left")?{paddingLeft:b.left}:null,...n.includes("right")?{paddingRight:b.right}:null},x=c??(s?(0,_jsxRuntime.jsx)(_reactNative.RefreshControl,{refreshing:i,onRefresh:s,tintColor:f.colors.primary,colors:[f.colors.primary],progressBackgroundColor:f.colors.surface,titleColor:f.colors["text-muted"]}):void 0);return(0,_jsxRuntime.jsx)(_reactNativeKeyboardController.KeyboardAwareScrollView,{ref:e,bottomOffset:o,extraKeyboardSpace:a-(y?b.bottom:0),disableScrollOnKeyboardHide:!0,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"none",contentContainerStyle:[d,p],refreshControl:x,...u,children:l?(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessible:!1,onPress:_reactNative.Keyboard.dismiss,style:[tapAreaStyle,childLayout(d)],children:r}):r})}var _default=exports.default=KeyboardAwareScrollView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Screen=Screen;var _react=require("react"),_reactNative=require("react-native"),_reactNativeKeyboardController=require("react-native-keyboard-controller"),_reactNativeReanimated=require("react-native-reanimated"),_reactNativeSafeAreaContext=require("react-native-safe-area-context"),_useRefreshControl=require("../../hooks/useRefreshControl.js"),_index=require("../../theme/index.js"),_index2=require("../AppBar/index.js"),_index3=require("../KeyboardAwareScrollView/index.js"),_index4=require("../KeyboardToolbar/index.js"),_index5=require("../PagedList/index.js"),_ScrollHost=require("./ScrollHost.js"),_jsxRuntime=require("react/jsx-runtime");const DEFAULT_EDGES=["top","bottom"],SCROLL_EVENT_THROTTLE=16,noop=()=>{},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Screen=Screen;var _react=require("react"),_reactNative=require("react-native"),_reactNativeKeyboardController=require("react-native-keyboard-controller"),_reactNativeReanimated=require("react-native-reanimated"),_reactNativeSafeAreaContext=require("react-native-safe-area-context"),_useRefreshControl=require("../../hooks/useRefreshControl.js"),_index=require("../../theme/index.js"),_contentPadding=require("../../utils/contentPadding.js"),_index2=require("../AppBar/index.js"),_index3=require("../KeyboardAwareScrollView/index.js"),_index4=require("../KeyboardToolbar/index.js"),_index5=require("../PagedList/index.js"),_ScrollHost=require("./ScrollHost.js"),_jsxRuntime=require("react/jsx-runtime");const DEFAULT_EDGES=["top","bottom"],SCROLL_EVENT_THROTTLE=16,noop=()=>{},buildStyles=e=>_reactNative.StyleSheet.create({flex:{flex:1},root:{flex:1,backgroundColor:e.colors.bg},overlay:{position:"absolute",top:0,left:0,right:0},headerRaised:{zIndex:1},footer:{backgroundColor:e.colors.bg,borderTopWidth:_reactNative.StyleSheet.hairlineWidth,borderTopColor:e.colors.border}});function Screen(e){const{title:t,subtitle:o,largeTitle:r=!0,headerShadowOnScroll:n,onBack:a,rightActions:i,leading:l,trailing:s,children:c,onRefresh:d,refreshing:u=!1,footer:f,scroll:_=!0,list:g,edges:v=DEFAULT_EDGES,keyboardToolbar:h=!0,bottomInset:p=0,gutter:x,floatingAction:m,scrollRef:S,onScroll:b,contentContainerStyle:R,testID:y}=e,C=(0,_index.useTheme)(),j=x??void 0===g,T=C.space[C.components.screen.gutter],E=j?T:0,N=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)(),L=(0,_react.useMemo)(()=>buildStyles(C),[C]),[O]=(0,_react.useState)(()=>new _reactNative.Animated.Value(0)),[V,k]=(0,_react.useState)(0),[w,A]=(0,_react.useState)(0),q=void 0!==a,P=(0,_react.useRef)(a);P.current=a;const B=Boolean(t||o||a||l||s||i?.length),H=r&&void 0!==t,D=H&&(void 0!==g||_),M=D?V:0,z=B&&!D&&(n??C.settings.components.screen?.headerShadowOnScroll??!0),[I,K]=(0,_react.useState)(!1),F=(0,_react.useRef)(z);F.current=z;const headerGap=e=>e>0?e:B?C.space.lg:0,W=void 0!==f,{refreshControl:G}=(0,_useRefreshControl.useRefreshControl)({onRefresh:d??noop,refreshing:u}),U=d?(0,_react.cloneElement)(G,{progressViewOffset:M}):void 0,Y=(0,_reactNativeReanimated.useSharedValue)(0),$=(0,_reactNativeReanimated.useSharedValue)(0),J=(0,_reactNativeReanimated.useSharedValue)(0),Q=(0,_reactNativeReanimated.useSharedValue)(0),X=(0,_react.useRef)(null),Z=(0,_react.useRef)(0),ee=(0,_react.useRef)(0),te=(0,_react.useMemo)(()=>({top:Y,bottom:$,offset:J,maxOffset:Q,scrollTo:e=>{const t=X.current;t instanceof _reactNative.FlatList?t.scrollToOffset({offset:e,animated:!1}):t?.scrollTo({y:e,animated:!1})}}),[Y,$,J,Q]),oe=(0,_react.useCallback)(e=>{X.current=e,"function"==typeof S?S(e):S&&(S.current=e)},[S]),re=(0,_react.useCallback)(()=>{Q.value=Math.max(0,Z.current-ee.current)},[Q]),ne=(0,_react.useRef)(b);ne.current=b;const ae=(0,_react.useMemo)(()=>_reactNative.Animated.event([{nativeEvent:{contentOffset:{y:O}}}],{useNativeDriver:!1,listener:e=>{if(J.value=e.nativeEvent.contentOffset.y,F.current){const t=e.nativeEvent.contentOffset.y>0;K(e=>e===t?e:t)}ne.current?.(e)}}),[O,J]),ie=(0,_react.useCallback)(e=>{const{height:t}=e.nativeEvent.layout;k(e=>Math.max(e,t))},[]),le=(0,_react.useCallback)(e=>{A(e.nativeEvent.layout.height)},[]);(0,_react.useEffect)(()=>{if(!q)return;const e=_reactNative.BackHandler.addEventListener("hardwareBackPress",()=>(P.current?.(),!0));return()=>e.remove()},[q]);const se=v.includes("left")?N.left:0,ce=v.includes("right")?N.right:0,de=v.includes("bottom")?N.bottom:0,ue=v.includes("top")&&!B?N.top:0,fe=C.space[C.components["floating-action-button"]["bottom-offset"]],ge=m?.props.bottomOffset??fe,ve=m?(0,_index.resolveFloatingActionButtonSize)(C,m.props.size??"md").diameter+ge+C.space.lg:0,he=W?Math.max(0,w-N.bottom):p,pe=m?(0,_react.cloneElement)(m,{bottomOffset:ge+he,position:m.props.position??"bottomRight"}):null,xe=W?ve:Math.max(de,m?ve+N.bottom:0),me=p+xe-(W?0:de),Se=v.filter(e=>"top"!==e&&!("bottom"===e&&W)),be=B?(0,_jsxRuntime.jsx)(_reactNative.View,{style:D?L.overlay:z?L.headerRaised:void 0,onLayout:D?ie:void 0,children:(0,_jsxRuntime.jsx)(_index2.AppBar,{title:t,subtitle:o,variant:H?"large":"default",scrollY:D?O:void 0,elevated:z&&I,onBack:a,rightActions:i,leading:l,trailing:s,gutter:T,testID:y?`${y}-app-bar`:void 0})}):null,Re=(0,_react.useCallback)(()=>{const e=X.current?.getNativeScrollRef();e&&e.measureInWindow((e,t,o,r)=>{ee.current=r,Y.value=t+M,$.value=t+r,re()})},[M,Y,$,re]);(0,_react.useEffect)(()=>{Re()},[Re]);const ye=(0,_react.useCallback)((e,t)=>{Z.current=t,re()},[re]);let Ce;if(void 0!==g){const e=(0,_contentPadding.topPaddingOf)([g.contentContainerStyle,R]);Ce=(0,_jsxRuntime.jsx)(_ScrollHost.ScrollHostContext,{value:te,children:(0,_jsxRuntime.jsx)(_index5.PagedList,{...g,ref:oe,onRefresh:g.state?void 0:d,refreshing:g.state?void 0:u,progressViewOffset:M,placeholderStyle:[L.flex,{paddingTop:M+headerGap(e)}],onScroll:ae,onLayout:e=>{Re(),g.onLayout?.(e)},onContentSizeChange:(e,t)=>{ye(e,t),g.onContentSizeChange?.(e,t)},scrollEventThrottle:SCROLL_EVENT_THROTTLE,style:L.flex,contentContainerStyle:[{paddingTop:M,paddingLeft:se+E,paddingRight:ce+E},g.contentContainerStyle,R,{paddingTop:M+headerGap(e),paddingBottom:(0,_contentPadding.bottomPaddingOf)([g.contentContainerStyle,R])+p+xe}]})})}else Ce=_?(0,_jsxRuntime.jsx)(_ScrollHost.ScrollHostContext,{value:te,children:(0,_jsxRuntime.jsxs)(_index3.KeyboardAwareScrollView,{ref:oe,refreshControl:U,onScroll:ae,scrollEventThrottle:SCROLL_EVENT_THROTTLE,onLayout:Re,onContentSizeChange:ye,safeAreaEdges:Se,style:L.flex,contentContainerStyle:[{paddingHorizontal:E},R,{paddingTop:M+headerGap((0,_contentPadding.topPaddingOf)(R))}],children:[c,me>0?(0,_jsxRuntime.jsx)(_reactNative.View,{style:{height:me}}):null]})}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:[L.flex,{paddingLeft:se+E,paddingRight:ce+E},R,{paddingBottom:(0,_contentPadding.bottomPaddingOf)(R)+p+xe}],children:c});const je=W?(0,_jsxRuntime.jsx)(_reactNativeKeyboardController.KeyboardStickyView,{onLayout:le,style:[L.footer,{paddingLeft:se+T,paddingRight:ce+T,paddingBottom:de+p}],children:f}):null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{testID:y,style:[L.root,{paddingTop:ue}],children:[D?null:be,Ce,je,pe,void 0!==g?c:null,D?be:null,h?(0,_jsxRuntime.jsx)(_index4.KeyboardToolbar,{}):null]})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.topPaddingOf=exports.bottomPaddingOf=void 0;var _reactNative=require("react-native");const edgePaddingOf=(t,d)=>{const e=_reactNative.StyleSheet.flatten(t),o=e?.[d]??e?.paddingVertical??e?.padding;return"number"==typeof o?o:0},topPaddingOf=t=>edgePaddingOf(t,"paddingTop");exports.topPaddingOf=topPaddingOf;const bottomPaddingOf=t=>edgePaddingOf(t,"paddingBottom");exports.bottomPaddingOf=bottomPaddingOf;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Keyboard,Pressable,RefreshControl,StyleSheet}from"react-native";import{KeyboardAwareScrollView as ControllerScrollView}from"react-native-keyboard-controller";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useTheme}from"../../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";const tapAreaStyle={flexGrow:1},CHILD_LAYOUT_KEYS=["gap","rowGap","columnGap","flexDirection","flexWrap","alignItems","alignContent","justifyContent"],childLayout=e=>{const
|
|
1
|
+
"use strict";import{Keyboard,Pressable,RefreshControl,StyleSheet}from"react-native";import{KeyboardAwareScrollView as ControllerScrollView}from"react-native-keyboard-controller";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useTheme}from"../../theme/index.js";import{bottomPaddingOf}from"../../utils/contentPadding.js";import{jsx as _jsx}from"react/jsx-runtime";const tapAreaStyle={flexGrow:1},CHILD_LAYOUT_KEYS=["gap","rowGap","columnGap","flexDirection","flexWrap","alignItems","alignContent","justifyContent"],childLayout=e=>{const o=StyleSheet.flatten(e),r={};for(const e of CHILD_LAYOUT_KEYS)void 0!==o?.[e]&&Object.assign(r,{[e]:o[e]});return r};function KeyboardAwareScrollView({ref:e,...o}){const{children:r,bottomOffset:t=24,extraKeyboardSpace:s=0,safeAreaEdges:a=["bottom"],refreshing:l=!1,onRefresh:n,dismissOnTapOutside:i=!0,contentContainerStyle:d,refreshControl:c,...f}=o,m=useTheme(),p=useSafeAreaInsets(),u=a.includes("bottom"),b={paddingBottom:bottomPaddingOf(d)+(u?p.bottom:0),...a.includes("top")?{paddingTop:p.top}:null,...a.includes("left")?{paddingLeft:p.left}:null,...a.includes("right")?{paddingRight:p.right}:null},y=c??(n?_jsx(RefreshControl,{refreshing:l,onRefresh:n,tintColor:m.colors.primary,colors:[m.colors.primary],progressBackgroundColor:m.colors.surface,titleColor:m.colors["text-muted"]}):void 0);return _jsx(ControllerScrollView,{ref:e,bottomOffset:t,extraKeyboardSpace:s-(u?p.bottom:0),disableScrollOnKeyboardHide:!0,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"none",contentContainerStyle:[d,b],refreshControl:y,...f,children:i?_jsx(Pressable,{accessible:!1,onPress:Keyboard.dismiss,style:[tapAreaStyle,childLayout(d)],children:r}):r})}export{KeyboardAwareScrollView};export default KeyboardAwareScrollView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{cloneElement,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,BackHandler,FlatList,StyleSheet,View}from"react-native";import{KeyboardStickyView}from"react-native-keyboard-controller";import{useSharedValue}from"react-native-reanimated";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useRefreshControl}from"../../hooks/useRefreshControl.js";import{resolveFloatingActionButtonSize,useTheme}from"../../theme/index.js";import{AppBar}from"../AppBar/index.js";import{KeyboardAwareScrollView}from"../KeyboardAwareScrollView/index.js";import{KeyboardToolbar}from"../KeyboardToolbar/index.js";import{PagedList}from"../PagedList/index.js";import{ScrollHostContext}from"./ScrollHost.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const DEFAULT_EDGES=["top","bottom"],SCROLL_EVENT_THROTTLE=16,noop=()=>{},
|
|
1
|
+
"use strict";import{cloneElement,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,BackHandler,FlatList,StyleSheet,View}from"react-native";import{KeyboardStickyView}from"react-native-keyboard-controller";import{useSharedValue}from"react-native-reanimated";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useRefreshControl}from"../../hooks/useRefreshControl.js";import{resolveFloatingActionButtonSize,useTheme}from"../../theme/index.js";import{bottomPaddingOf,topPaddingOf}from"../../utils/contentPadding.js";import{AppBar}from"../AppBar/index.js";import{KeyboardAwareScrollView}from"../KeyboardAwareScrollView/index.js";import{KeyboardToolbar}from"../KeyboardToolbar/index.js";import{PagedList}from"../PagedList/index.js";import{ScrollHostContext}from"./ScrollHost.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const DEFAULT_EDGES=["top","bottom"],SCROLL_EVENT_THROTTLE=16,noop=()=>{},buildStyles=e=>StyleSheet.create({flex:{flex:1},root:{flex:1,backgroundColor:e.colors.bg},overlay:{position:"absolute",top:0,left:0,right:0},headerRaised:{zIndex:1},footer:{backgroundColor:e.colors.bg,borderTopWidth:StyleSheet.hairlineWidth,borderTopColor:e.colors.border}});export function Screen(e){const{title:t,subtitle:o,largeTitle:n=!0,headerShadowOnScroll:r,onBack:a,rightActions:l,leading:s,trailing:i,children:d,onRefresh:c,refreshing:u=!1,footer:f,scroll:p=!0,list:m,edges:g=DEFAULT_EDGES,keyboardToolbar:h=!0,bottomInset:S=0,gutter:b,floatingAction:v,scrollRef:y,onScroll:x,contentContainerStyle:C,testID:T}=e,j=useTheme(),E=b??void 0===m,R=j.space[j.components.screen.gutter],w=E?R:0,k=useSafeAreaInsets(),A=useMemo(()=>buildStyles(j),[j]),[L]=useState(()=>new Animated.Value(0)),[O,V]=useState(0),[_,B]=useState(0),P=void 0!==a,z=useRef(a);z.current=a;const D=Boolean(t||o||a||s||i||l?.length),H=n&&void 0!==t,I=H&&(void 0!==m||p),K=I?O:0,M=D&&!I&&(r??j.settings.components.screen?.headerShadowOnScroll??!0),[F,N]=useState(!1),W=useRef(M);W.current=M;const headerGap=e=>e>0?e:D?j.space.lg:0,G=void 0!==f,{refreshControl:U}=useRefreshControl({onRefresh:c??noop,refreshing:u}),Y=c?cloneElement(U,{progressViewOffset:K}):void 0,$=useSharedValue(0),q=useSharedValue(0),J=useSharedValue(0),Q=useSharedValue(0),X=useRef(null),Z=useRef(0),ee=useRef(0),te=useMemo(()=>({top:$,bottom:q,offset:J,maxOffset:Q,scrollTo:e=>{const t=X.current;t instanceof FlatList?t.scrollToOffset({offset:e,animated:!1}):t?.scrollTo({y:e,animated:!1})}}),[$,q,J,Q]),oe=useCallback(e=>{X.current=e,"function"==typeof y?y(e):y&&(y.current=e)},[y]),ne=useCallback(()=>{Q.value=Math.max(0,Z.current-ee.current)},[Q]),re=useRef(x);re.current=x;const ae=useMemo(()=>Animated.event([{nativeEvent:{contentOffset:{y:L}}}],{useNativeDriver:!1,listener:e=>{if(J.value=e.nativeEvent.contentOffset.y,W.current){const t=e.nativeEvent.contentOffset.y>0;N(e=>e===t?e:t)}re.current?.(e)}}),[L,J]),le=useCallback(e=>{const{height:t}=e.nativeEvent.layout;V(e=>Math.max(e,t))},[]),se=useCallback(e=>{B(e.nativeEvent.layout.height)},[]);useEffect(()=>{if(!P)return;const e=BackHandler.addEventListener("hardwareBackPress",()=>(z.current?.(),!0));return()=>e.remove()},[P]);const ie=g.includes("left")?k.left:0,de=g.includes("right")?k.right:0,ce=g.includes("bottom")?k.bottom:0,ue=g.includes("top")&&!D?k.top:0,fe=j.space[j.components["floating-action-button"]["bottom-offset"]],pe=v?.props.bottomOffset??fe,me=v?resolveFloatingActionButtonSize(j,v.props.size??"md").diameter+pe+j.space.lg:0,ge=G?Math.max(0,_-k.bottom):S,he=v?cloneElement(v,{bottomOffset:pe+ge,position:v.props.position??"bottomRight"}):null,Se=G?me:Math.max(ce,v?me+k.bottom:0),be=S+Se-(G?0:ce),ve=g.filter(e=>"top"!==e&&!("bottom"===e&&G)),ye=D?_jsx(View,{style:I?A.overlay:M?A.headerRaised:void 0,onLayout:I?le:void 0,children:_jsx(AppBar,{title:t,subtitle:o,variant:H?"large":"default",scrollY:I?L:void 0,elevated:M&&F,onBack:a,rightActions:l,leading:s,trailing:i,gutter:R,testID:T?`${T}-app-bar`:void 0})}):null,xe=useCallback(()=>{const e=X.current?.getNativeScrollRef();e&&e.measureInWindow((e,t,o,n)=>{ee.current=n,$.value=t+K,q.value=t+n,ne()})},[K,$,q,ne]);useEffect(()=>{xe()},[xe]);const Ce=useCallback((e,t)=>{Z.current=t,ne()},[ne]);let Te;if(void 0!==m){const e=topPaddingOf([m.contentContainerStyle,C]);Te=_jsx(ScrollHostContext,{value:te,children:_jsx(PagedList,{...m,ref:oe,onRefresh:m.state?void 0:c,refreshing:m.state?void 0:u,progressViewOffset:K,placeholderStyle:[A.flex,{paddingTop:K+headerGap(e)}],onScroll:ae,onLayout:e=>{xe(),m.onLayout?.(e)},onContentSizeChange:(e,t)=>{Ce(e,t),m.onContentSizeChange?.(e,t)},scrollEventThrottle:16,style:A.flex,contentContainerStyle:[{paddingTop:K,paddingLeft:ie+w,paddingRight:de+w},m.contentContainerStyle,C,{paddingTop:K+headerGap(e),paddingBottom:bottomPaddingOf([m.contentContainerStyle,C])+S+Se}]})})}else Te=p?_jsx(ScrollHostContext,{value:te,children:_jsxs(KeyboardAwareScrollView,{ref:oe,refreshControl:Y,onScroll:ae,scrollEventThrottle:16,onLayout:xe,onContentSizeChange:Ce,safeAreaEdges:ve,style:A.flex,contentContainerStyle:[{paddingHorizontal:w},C,{paddingTop:K+headerGap(topPaddingOf(C))}],children:[d,be>0?_jsx(View,{style:{height:be}}):null]})}):_jsx(View,{style:[A.flex,{paddingLeft:ie+w,paddingRight:de+w},C,{paddingBottom:bottomPaddingOf(C)+S+Se}],children:d});const je=G?_jsx(KeyboardStickyView,{onLayout:se,style:[A.footer,{paddingLeft:ie+R,paddingRight:de+R,paddingBottom:ce+S}],children:f}):null;return _jsxs(View,{testID:T,style:[A.root,{paddingTop:ue}],children:[I?null:ye,Te,je,he,void 0!==m?d:null,I?ye:null,h?_jsx(KeyboardToolbar,{}):null]})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{StyleSheet}from"react-native";const edgePaddingOf=(t,e)=>{const d=StyleSheet.flatten(t),n=d?.[e]??d?.paddingVertical??d?.padding;return"number"==typeof n?n:0};export const topPaddingOf=t=>edgePaddingOf(t,"paddingTop");export const bottomPaddingOf=t=>edgePaddingOf(t,"paddingBottom");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/mobile-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.178.1",
|
|
4
4
|
"description": "Beautiful, animated, accessible React Native components, theme and form engine for Webority projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -126,13 +126,13 @@
|
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
128
|
"dependencies": {
|
|
129
|
-
"@webority/markdown-core": "0.
|
|
129
|
+
"@webority/markdown-core": "0.178.1"
|
|
130
130
|
},
|
|
131
131
|
"peerDependencies": {
|
|
132
132
|
"@react-navigation/bottom-tabs": ">=7.0.0",
|
|
133
133
|
"@react-navigation/native": ">=7.0.0",
|
|
134
|
-
"@webority/canvas-kit": "0.
|
|
135
|
-
"@webority/mobile-core": "0.
|
|
134
|
+
"@webority/canvas-kit": "0.178.1",
|
|
135
|
+
"@webority/mobile-core": "0.178.1",
|
|
136
136
|
"expo": ">=58.0.0",
|
|
137
137
|
"expo-file-system": ">=58.0.0",
|
|
138
138
|
"expo-haptics": ">=58.0.0",
|
|
@@ -196,10 +196,10 @@
|
|
|
196
196
|
"@types/jest": "29.5.14",
|
|
197
197
|
"@types/node": "25.6.0",
|
|
198
198
|
"@types/react": "19.3.0",
|
|
199
|
-
"@webority/canvas-kit": "0.
|
|
200
|
-
"@webority/mobile-core": "0.
|
|
199
|
+
"@webority/canvas-kit": "0.178.1",
|
|
200
|
+
"@webority/mobile-core": "0.178.1",
|
|
201
201
|
"@webority/mobile-dev": "0.0.0",
|
|
202
|
-
"@webority/tokens": "0.
|
|
202
|
+
"@webority/tokens": "0.178.1",
|
|
203
203
|
"expo": "58.0.23",
|
|
204
204
|
"expo-file-system": "58.0.13",
|
|
205
205
|
"expo-haptics": "58.0.7",
|