@ornikar/kitt-universal 9.2.0 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definitions/ModalBehaviour/ModalBehaviour.d.ts +18 -0
- package/dist/definitions/ModalBehaviour/ModalBehaviour.d.ts.map +1 -0
- package/dist/definitions/ModalBehaviour/ModalBehaviourPortal.d.ts +7 -0
- package/dist/definitions/ModalBehaviour/ModalBehaviourPortal.d.ts.map +1 -0
- package/dist/definitions/ModalBehaviour/ModalBehaviourPortal.web.d.ts +4 -0
- package/dist/definitions/ModalBehaviour/ModalBehaviourPortal.web.d.ts.map +1 -0
- package/dist/definitions/ModalBehaviour/OnCloseContext.d.ts +11 -0
- package/dist/definitions/ModalBehaviour/OnCloseContext.d.ts.map +1 -0
- package/dist/definitions/NavigationModal/Body.d.ts +9 -0
- package/dist/definitions/NavigationModal/Body.d.ts.map +1 -0
- package/dist/definitions/NavigationModal/ContentPadding.d.ts +7 -0
- package/dist/definitions/NavigationModal/ContentPadding.d.ts.map +1 -0
- package/dist/definitions/NavigationModal/Footer.d.ts +11 -0
- package/dist/definitions/NavigationModal/Footer.d.ts.map +1 -0
- package/dist/definitions/NavigationModal/Header.d.ts +31 -0
- package/dist/definitions/NavigationModal/Header.d.ts.map +1 -0
- package/dist/definitions/NavigationModal/NavigationModal.d.ts +17 -0
- package/dist/definitions/NavigationModal/NavigationModal.d.ts.map +1 -0
- package/dist/definitions/NavigationModal/NavigationModalContainer.d.ts +8 -0
- package/dist/definitions/NavigationModal/NavigationModalContainer.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +4 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +1 -1
- package/dist/definitions/themes/default.d.ts +1 -0
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/navigationModal.d.ts +6 -0
- package/dist/definitions/themes/late-ocean/navigationModal.d.ts.map +1 -0
- package/dist/index-browser-all.es.android.js +324 -41
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +324 -41
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +324 -41
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +346 -40
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +298 -8
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.css +1 -0
- package/dist/index-node-14.17.cjs.web.js +310 -8
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +7 -1
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +7 -1
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +7 -1
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +7 -1
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +7 -1
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +7 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/styles.css +1 -0
- package/dist/tsbuildinfo +1 -1
- package/package.json +4 -2
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
.kitt-u_InputTextContainer_i1encr9g{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;}.kitt-u_InputTextContainer_i1encr9g > [data-focusvisible-polyfill]{outline:none;}.kitt-u_InputTextContainer_i1encr9g > *::-ms-clear,.kitt-u_InputTextContainer_i1encr9g > *::-ms-reveal{display:none;}.kitt-u_InputTextContainer_i1encr9g,.kitt-u_InputTextContainer_i1encr9g > *{cursor:var(--i1encr9g-0);}.kitt-u_InputTextContainer_i1encr9g > *{-webkit-transition:var(--i1encr9g-1);transition:var(--i1encr9g-1);}.kitt-u_InputTextContainer_i1encr9g:hover > *,.kitt-hover .kitt-u_InputTextContainer_i1encr9g > *{border-color:var(--i1encr9g-2);}.kitt-u_InputTextContainer_i1encr9g:focus > *,.kitt-u_InputTextContainer_i1encr9g > *:focus,.kitt-focus .kitt-u_InputTextContainer_i1encr9g > *{border-color:var(--i1encr9g-3);}
|
|
3
3
|
.kitt-u_StyledSpinningIconContainer_ssn8o83{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}.kitt-u_StyledSpinningIconContainer_ssn8o83 > svg{-webkit-animation:spin-kitt-u_StyledSpinningIconContainer_ssn8o83 1.1s infinite linear;animation:spin-kitt-u_StyledSpinningIconContainer_ssn8o83 1.1s infinite linear;}@-webkit-keyframes spin-kitt-u_StyledSpinningIconContainer_ssn8o83{0%{-webkit-transform:rotate(-1deg);-ms-transform:rotate(-1deg);transform:rotate(-1deg);}100%{-webkit-transform:rotate(359deg);-ms-transform:rotate(359deg);transform:rotate(359deg);}}@keyframes spin-kitt-u_StyledSpinningIconContainer_ssn8o83{0%{-webkit-transform:rotate(-1deg);-ms-transform:rotate(-1deg);transform:rotate(-1deg);}100%{-webkit-transform:rotate(359deg);-ms-transform:rotate(359deg);transform:rotate(359deg);}}
|
|
4
4
|
@media (hover:none) and (pointer:coarse){.kitt-u_PressableIconButtonWebWrapper_p1nlccvg > *:hover,.kitt-hover .kitt-u_PressableIconButtonWebWrapper_p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-0));-ms-transform:scale(var(--p1nlccvg-0));transform:scale(var(--p1nlccvg-0));}}@media (min-width:768px){.kitt-u_PressableIconButtonWebWrapper_p1nlccvg > *:hover,.kitt-hover .kitt-u_PressableIconButtonWebWrapper_p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-2));-ms-transform:scale(var(--p1nlccvg-2));transform:scale(var(--p1nlccvg-2));}}.kitt-u_PressableIconButtonWebWrapper_p1nlccvg > *:active,.kitt-active .kitt-u_PressableIconButtonWebWrapper_p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-3));-ms-transform:scale(var(--p1nlccvg-3));transform:scale(var(--p1nlccvg-3));}.kitt-u_PressableIconButtonWebWrapper_p1nlccvg,.kitt-u_PressableIconButtonWebWrapper_p1nlccvg > [data-focusvisible-polyfill]{outline:none;}.kitt-u_PressableIconButtonWebWrapper_p1nlccvg > *:hover,.kitt-hover .kitt-u_PressableIconButtonWebWrapper_p1nlccvg > *,.kitt-u_PressableIconButtonWebWrapper_p1nlccvg > *:focus,.kitt-focus .kitt-u_PressableIconButtonWebWrapper_p1nlccvg > *,.kitt-u_PressableIconButtonWebWrapper_p1nlccvg > [data-focusvisible-polyfill],.kitt-u_PressableIconButtonWebWrapper_p1nlccvg > *:active,.kitt-active .kitt-u_PressableIconButtonWebWrapper_p1nlccvg > *{background-color:var(--p1nlccvg-4);}
|
|
5
|
+
.kitt-u_overflowHidden_otm3u3{overflow:hidden;}
|
|
5
6
|
.kitt-u_PageLoaderContainer_ptkwz2j{width:var(--ptkwz2j-3);height:var(--ptkwz2j-3);-webkit-transform:scale(-1) rotate(90deg);-ms-transform:scale(-1) rotate(90deg);transform:scale(-1) rotate(90deg);}@-webkit-keyframes PageLoaderInit-kitt-u_PageLoaderContainer_ptkwz2j{0%{stroke-dashoffset:var(--ptkwz2j-0);}100%{stroke-dashoffset:0;}}@keyframes PageLoaderInit-kitt-u_PageLoaderContainer_ptkwz2j{0%{stroke-dashoffset:var(--ptkwz2j-0);}100%{stroke-dashoffset:0;}}@-webkit-keyframes PageLoaderOffset-kitt-u_PageLoaderContainer_ptkwz2j{0%{stroke-dashoffset:var(--ptkwz2j-0);}100%{stroke-dashoffset:var(--ptkwz2j-2);}}@keyframes PageLoaderOffset-kitt-u_PageLoaderContainer_ptkwz2j{0%{stroke-dashoffset:var(--ptkwz2j-0);}100%{stroke-dashoffset:var(--ptkwz2j-2);}}@-webkit-keyframes PageLoaderRotation-kitt-u_PageLoaderContainer_ptkwz2j{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}@keyframes PageLoaderRotation-kitt-u_PageLoaderContainer_ptkwz2j{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}.kitt-u_PageLoaderContainer_ptkwz2j circle,.kitt-u_PageLoaderContainer_ptkwz2j g{-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;}.kitt-u_PageLoaderContainer_ptkwz2j circle{stroke-width:var(--ptkwz2j-5);stroke-dasharray:var(--ptkwz2j-0);stroke-dashoffset:var(--ptkwz2j-0);stroke-linecap:round;}.kitt-u_PageLoaderContainer_ptkwz2j g[data-large-loader='base'] circle{stroke:var(--ptkwz2j-8);-webkit-animation:var(--ptkwz2j-9);animation:var(--ptkwz2j-9);-webkit-animation-name:PageLoaderInit-kitt-u_PageLoaderContainer_ptkwz2j;animation-name:PageLoaderInit-kitt-u_PageLoaderContainer_ptkwz2j;}.kitt-u_PageLoaderContainer_ptkwz2j g[data-large-loader='fill']{-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;-webkit-animation:var(--ptkwz2j-10);animation:var(--ptkwz2j-10);-webkit-animation-name:PageLoaderRotation-kitt-u_PageLoaderContainer_ptkwz2j;animation-name:PageLoaderRotation-kitt-u_PageLoaderContainer_ptkwz2j;}.kitt-u_PageLoaderContainer_ptkwz2j g[data-large-loader='fill'] circle{stroke:var(--ptkwz2j-11);-webkit-animation:var(--ptkwz2j-12);animation:var(--ptkwz2j-12);-webkit-animation-name:PageLoaderOffset-kitt-u_PageLoaderContainer_ptkwz2j,PageLoaderRotation-kitt-u_PageLoaderContainer_ptkwz2j;animation-name:PageLoaderOffset-kitt-u_PageLoaderContainer_ptkwz2j,PageLoaderRotation-kitt-u_PageLoaderContainer_ptkwz2j;}
|
|
6
7
|
.kitt-u_StyledSkeleton_sc3upcl{background-color:var(--sc3upcl-0);position:relative;overflow:hidden;height:100%;width:100%;}@-webkit-keyframes flareTranslate-kitt-u_StyledSkeleton_sc3upcl{from{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);}to{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);}}@keyframes flareTranslate-kitt-u_StyledSkeleton_sc3upcl{from{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);}to{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);}}.kitt-u_StyledSkeleton_sc3upcl::after{content:'';position:absolute;width:100%;height:100%;top:0;left:0;background-image:var(--sc3upcl-1);-webkit-animation:var(--sc3upcl-2);animation:var(--sc3upcl-2);-webkit-animation-name:flareTranslate-kitt-u_StyledSkeleton_sc3upcl;animation-name:flareTranslate-kitt-u_StyledSkeleton_sc3upcl;}
|
|
7
8
|
.kitt-u_EmojiWebWrapper_ej7a4r3 > *{-webkit-transform:translateY(20%);-ms-transform:translateY(20%);transform:translateY(20%);}
|
|
@@ -11,6 +11,7 @@ const nativeBase = require('native-base');
|
|
|
11
11
|
const react$1 = require('@linaria/react');
|
|
12
12
|
const twemojiParser = require('twemoji-parser');
|
|
13
13
|
const reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
14
|
+
const reactPortal = require('react-portal');
|
|
14
15
|
const reactDom = require('@floating-ui/react-dom');
|
|
15
16
|
const addons = require('@storybook/addons');
|
|
16
17
|
|
|
@@ -1421,6 +1422,11 @@ const listItem = {
|
|
|
1421
1422
|
innerMargin: 8
|
|
1422
1423
|
};
|
|
1423
1424
|
|
|
1425
|
+
const navigationModal = {
|
|
1426
|
+
height: 56,
|
|
1427
|
+
padding: 16
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1424
1430
|
const pageLoader = {
|
|
1425
1431
|
size: 60,
|
|
1426
1432
|
strokeWidth: 3,
|
|
@@ -1566,7 +1572,8 @@ const theme = {
|
|
|
1566
1572
|
skeleton,
|
|
1567
1573
|
tag,
|
|
1568
1574
|
tooltip,
|
|
1569
|
-
typography
|
|
1575
|
+
typography,
|
|
1576
|
+
navigationModal
|
|
1570
1577
|
};
|
|
1571
1578
|
|
|
1572
1579
|
function matchWindowSize({
|
|
@@ -2272,7 +2279,7 @@ function TextArea({ ...props
|
|
|
2272
2279
|
});
|
|
2273
2280
|
}
|
|
2274
2281
|
|
|
2275
|
-
const Body = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
2282
|
+
const Body$1 = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
2276
2283
|
displayName: "Body",
|
|
2277
2284
|
componentId: "kitt-universal__sc-1ofncfn-0"
|
|
2278
2285
|
})(["", " background-color:", ";flex:1;"], ({
|
|
@@ -2287,7 +2294,7 @@ const Body = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative
|
|
|
2287
2294
|
function FullScreenModalBody({
|
|
2288
2295
|
children
|
|
2289
2296
|
}) {
|
|
2290
|
-
return /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
2297
|
+
return /*#__PURE__*/jsxRuntime.jsx(Body$1, {
|
|
2291
2298
|
children: children
|
|
2292
2299
|
});
|
|
2293
2300
|
}
|
|
@@ -2312,7 +2319,7 @@ function getHeaderHorizontalMediumPadding(spacing) {
|
|
|
2312
2319
|
return spacing * 6;
|
|
2313
2320
|
}
|
|
2314
2321
|
|
|
2315
|
-
const Header = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
2322
|
+
const Header$1 = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
2316
2323
|
displayName: "Header",
|
|
2317
2324
|
componentId: "kitt-universal__sc-dfmxi1-1"
|
|
2318
2325
|
})(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], ({
|
|
@@ -2389,7 +2396,7 @@ function FullScreenModalHeader({
|
|
|
2389
2396
|
setRightWidth(event.nativeEvent.layout.width);
|
|
2390
2397
|
};
|
|
2391
2398
|
|
|
2392
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Header, {
|
|
2399
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Header$1, {
|
|
2393
2400
|
insetTop: top,
|
|
2394
2401
|
children: [left ? /*#__PURE__*/jsxRuntime.jsx(SideContainer, {
|
|
2395
2402
|
onLayout: e => handleLayoutChange(e, 'left'),
|
|
@@ -2937,7 +2944,7 @@ function ModalFooter({
|
|
|
2937
2944
|
});
|
|
2938
2945
|
}
|
|
2939
2946
|
|
|
2940
|
-
const OnCloseContext = /*#__PURE__*/react.createContext(() => {});
|
|
2947
|
+
const OnCloseContext$1 = /*#__PURE__*/react.createContext(() => {});
|
|
2941
2948
|
|
|
2942
2949
|
const HeaderView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
2943
2950
|
displayName: "Header__HeaderView",
|
|
@@ -2971,7 +2978,7 @@ function ModalHeader({
|
|
|
2971
2978
|
right,
|
|
2972
2979
|
children
|
|
2973
2980
|
}) {
|
|
2974
|
-
const onClose = react.useContext(OnCloseContext);
|
|
2981
|
+
const onClose = react.useContext(OnCloseContext$1);
|
|
2975
2982
|
const isIconLeft = !!left;
|
|
2976
2983
|
return /*#__PURE__*/jsxRuntime.jsxs(HeaderView, {
|
|
2977
2984
|
children: [isIconLeft && /*#__PURE__*/jsxRuntime.jsx(LeftIconView, {
|
|
@@ -3011,7 +3018,7 @@ function Modal({
|
|
|
3011
3018
|
onEntered,
|
|
3012
3019
|
onExited
|
|
3013
3020
|
}) {
|
|
3014
|
-
return /*#__PURE__*/jsxRuntime.jsx(OnCloseContext.Provider, {
|
|
3021
|
+
return /*#__PURE__*/jsxRuntime.jsx(OnCloseContext$1.Provider, {
|
|
3015
3022
|
value: onClose,
|
|
3016
3023
|
children: /*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.Modal, {
|
|
3017
3024
|
transparent: true,
|
|
@@ -3034,6 +3041,81 @@ Modal.Header = ModalHeader;
|
|
|
3034
3041
|
Modal.Body = ModalBody;
|
|
3035
3042
|
Modal.Footer = ModalFooter;
|
|
3036
3043
|
|
|
3044
|
+
const overflowHidden = "kitt-u_overflowHidden_otm3u3";
|
|
3045
|
+
|
|
3046
|
+
function useBlockBodyScroll(isScrollBlocked) {
|
|
3047
|
+
react.useEffect(() => {
|
|
3048
|
+
if (isScrollBlocked) {
|
|
3049
|
+
document.body.classList.add(overflowHidden);
|
|
3050
|
+
} else {
|
|
3051
|
+
document.body.classList.remove(overflowHidden);
|
|
3052
|
+
}
|
|
3053
|
+
}, [isScrollBlocked]);
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3056
|
+
function ModalBehaviourPortal({
|
|
3057
|
+
visible,
|
|
3058
|
+
children
|
|
3059
|
+
}) {
|
|
3060
|
+
useBlockBodyScroll(Boolean(visible));
|
|
3061
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactPortal.Portal, {
|
|
3062
|
+
children: children
|
|
3063
|
+
});
|
|
3064
|
+
}
|
|
3065
|
+
|
|
3066
|
+
const OnCloseContext = /*#__PURE__*/react.createContext(() => {});
|
|
3067
|
+
function OnCloseProvider({
|
|
3068
|
+
children,
|
|
3069
|
+
onClose
|
|
3070
|
+
}) {
|
|
3071
|
+
return /*#__PURE__*/jsxRuntime.jsx(OnCloseContext.Provider, {
|
|
3072
|
+
value: onClose,
|
|
3073
|
+
children: children
|
|
3074
|
+
});
|
|
3075
|
+
}
|
|
3076
|
+
function useOnCloseModalBehaviour() {
|
|
3077
|
+
const onClose = react.useContext(OnCloseContext);
|
|
3078
|
+
return onClose;
|
|
3079
|
+
}
|
|
3080
|
+
|
|
3081
|
+
function CloseButton({
|
|
3082
|
+
children,
|
|
3083
|
+
onPress
|
|
3084
|
+
}) {
|
|
3085
|
+
const onCloseContextCallback = useOnCloseModalBehaviour();
|
|
3086
|
+
return /*#__PURE__*/react.cloneElement(children, {
|
|
3087
|
+
onPress: () => {
|
|
3088
|
+
if (onPress) onPress();
|
|
3089
|
+
onCloseContextCallback();
|
|
3090
|
+
}
|
|
3091
|
+
});
|
|
3092
|
+
}
|
|
3093
|
+
|
|
3094
|
+
const ModalBehaviourContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
3095
|
+
displayName: "ModalBehaviour__ModalBehaviourContainer",
|
|
3096
|
+
componentId: "kitt-universal__sc-tj3606-0"
|
|
3097
|
+
})(["", ""], () => {
|
|
3098
|
+
return styled.css(["position:fixed;top:0;left:0;width:100%;"]);
|
|
3099
|
+
});
|
|
3100
|
+
function ModalBehaviour({
|
|
3101
|
+
children,
|
|
3102
|
+
visible,
|
|
3103
|
+
style,
|
|
3104
|
+
onClose
|
|
3105
|
+
}) {
|
|
3106
|
+
return /*#__PURE__*/jsxRuntime.jsx(OnCloseProvider, {
|
|
3107
|
+
onClose: onClose,
|
|
3108
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ModalBehaviourPortal, {
|
|
3109
|
+
visible: visible,
|
|
3110
|
+
children: visible ? /*#__PURE__*/jsxRuntime.jsx(ModalBehaviourContainer, {
|
|
3111
|
+
style: style,
|
|
3112
|
+
children: children
|
|
3113
|
+
}) : null
|
|
3114
|
+
})
|
|
3115
|
+
});
|
|
3116
|
+
}
|
|
3117
|
+
ModalBehaviour.CloseButton = CloseButton;
|
|
3118
|
+
|
|
3037
3119
|
const createKittSpaces = spacing => {
|
|
3038
3120
|
const sizes = {};
|
|
3039
3121
|
|
|
@@ -3183,6 +3265,224 @@ const View = nativeBase.View;
|
|
|
3183
3265
|
const ScrollView = nativeBase.ScrollView;
|
|
3184
3266
|
const Pressable = nativeBase.Pressable;
|
|
3185
3267
|
|
|
3268
|
+
const ViewWithPadding = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
3269
|
+
displayName: "ContentPadding__ViewWithPadding",
|
|
3270
|
+
componentId: "kitt-universal__sc-1rprqcv-0"
|
|
3271
|
+
})(["padding:", ";"], ({
|
|
3272
|
+
theme
|
|
3273
|
+
}) => `0 ${theme.kitt.navigationModal.padding}px`);
|
|
3274
|
+
function ContentPadding({
|
|
3275
|
+
children,
|
|
3276
|
+
...props
|
|
3277
|
+
}) {
|
|
3278
|
+
return /*#__PURE__*/jsxRuntime.jsx(ViewWithPadding, { ...props,
|
|
3279
|
+
children: children
|
|
3280
|
+
});
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3283
|
+
const StyledViewWithPadding = /*#__PURE__*/styled__default(ContentPadding).withConfig({
|
|
3284
|
+
displayName: "Body__StyledViewWithPadding",
|
|
3285
|
+
componentId: "kitt-universal__sc-oc39vn-0"
|
|
3286
|
+
})(["padding-top:", "px;padding-bottom:", "px;"], ({
|
|
3287
|
+
theme
|
|
3288
|
+
}) => theme.kitt.spacing * 6, ({
|
|
3289
|
+
theme,
|
|
3290
|
+
$insetBottom
|
|
3291
|
+
}) => Math.max(theme.kitt.spacing * 4, $insetBottom));
|
|
3292
|
+
function Body({
|
|
3293
|
+
children,
|
|
3294
|
+
shouldHandleBottomNotch,
|
|
3295
|
+
style,
|
|
3296
|
+
...props
|
|
3297
|
+
}) {
|
|
3298
|
+
const {
|
|
3299
|
+
bottom
|
|
3300
|
+
} = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
3301
|
+
const insetBottom = shouldHandleBottomNotch ? bottom : 0;
|
|
3302
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledViewWithPadding, { ...props,
|
|
3303
|
+
$insetBottom: insetBottom,
|
|
3304
|
+
style: style,
|
|
3305
|
+
children: children
|
|
3306
|
+
});
|
|
3307
|
+
}
|
|
3308
|
+
|
|
3309
|
+
const FooterContainer = /*#__PURE__*/styled__default(ContentPadding).withConfig({
|
|
3310
|
+
displayName: "Footer__FooterContainer",
|
|
3311
|
+
componentId: "kitt-universal__sc-1yjprfg-0"
|
|
3312
|
+
})(["padding-top:", "px;padding-bottom:", "px;", ";"], ({
|
|
3313
|
+
theme
|
|
3314
|
+
}) => theme.kitt.spacing * 3, ({
|
|
3315
|
+
theme,
|
|
3316
|
+
$insetBottom
|
|
3317
|
+
}) => Math.max(theme.kitt.spacing * 3, $insetBottom), ({
|
|
3318
|
+
$hasSeparator
|
|
3319
|
+
}) => {
|
|
3320
|
+
if (!$hasSeparator) return undefined;
|
|
3321
|
+
return styled.css(["border-top-width:1px;border-top-color:", ";"], ({
|
|
3322
|
+
theme
|
|
3323
|
+
}) => theme.kitt.colors.separator);
|
|
3324
|
+
});
|
|
3325
|
+
function Footer({
|
|
3326
|
+
shouldHandleBottomNotch = true,
|
|
3327
|
+
hasSeparator = true,
|
|
3328
|
+
children,
|
|
3329
|
+
style
|
|
3330
|
+
}) {
|
|
3331
|
+
const {
|
|
3332
|
+
bottom
|
|
3333
|
+
} = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
3334
|
+
const insetBottom = shouldHandleBottomNotch ? bottom : 0;
|
|
3335
|
+
return /*#__PURE__*/jsxRuntime.jsx(FooterContainer, {
|
|
3336
|
+
$insetBottom: insetBottom,
|
|
3337
|
+
$hasSeparator: hasSeparator,
|
|
3338
|
+
style: style,
|
|
3339
|
+
children: children
|
|
3340
|
+
});
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3343
|
+
const HeaderContainer = /*#__PURE__*/styled__default(ContentPadding).withConfig({
|
|
3344
|
+
displayName: "Header__HeaderContainer",
|
|
3345
|
+
componentId: "kitt-universal__sc-1g7sbq-0"
|
|
3346
|
+
})(["height:", "px;width:100%;justify-content:center;background-color:", ";padding-right:", "px;padding-left:", "px;", ";"], ({
|
|
3347
|
+
theme
|
|
3348
|
+
}) => theme.kitt.navigationModal.height, ({
|
|
3349
|
+
theme,
|
|
3350
|
+
$isTransparent
|
|
3351
|
+
}) => {
|
|
3352
|
+
if ($isTransparent) return 'transparent';
|
|
3353
|
+
return theme.kitt.colors.uiBackgroundLight;
|
|
3354
|
+
}, ({
|
|
3355
|
+
theme,
|
|
3356
|
+
$hasRight
|
|
3357
|
+
}) => $hasRight ? theme.kitt.spacing * 2 : theme.kitt.navigationModal.padding, ({
|
|
3358
|
+
theme,
|
|
3359
|
+
$hasLeft
|
|
3360
|
+
}) => $hasLeft ? theme.kitt.spacing * 2 : theme.kitt.navigationModal.padding, ({
|
|
3361
|
+
$hasSeparator
|
|
3362
|
+
}) => {
|
|
3363
|
+
if (!$hasSeparator) return undefined;
|
|
3364
|
+
return styled.css(["border-bottom-width:1px;border-bottom-color:", ";"], ({
|
|
3365
|
+
theme
|
|
3366
|
+
}) => theme.kitt.colors.separator);
|
|
3367
|
+
});
|
|
3368
|
+
const Row = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
3369
|
+
displayName: "Header__Row",
|
|
3370
|
+
componentId: "kitt-universal__sc-1g7sbq-1"
|
|
3371
|
+
})(["flex-direction:row;justify-content:", ";align-items:center;"], ({
|
|
3372
|
+
$hasContent,
|
|
3373
|
+
$hasLeft
|
|
3374
|
+
}) => !$hasContent && !$hasLeft ? 'flex-end' : 'space-between');
|
|
3375
|
+
const ButtonContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
3376
|
+
displayName: "Header__ButtonContainer",
|
|
3377
|
+
componentId: "kitt-universal__sc-1g7sbq-2"
|
|
3378
|
+
})(["width:", "px;"], ({
|
|
3379
|
+
theme
|
|
3380
|
+
}) => theme.kitt.iconButton.width);
|
|
3381
|
+
const ChildrenComponent = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
3382
|
+
displayName: "Header__ChildrenComponent",
|
|
3383
|
+
componentId: "kitt-universal__sc-1g7sbq-3"
|
|
3384
|
+
})(["flex:1;align-items:center;", ";"], ({
|
|
3385
|
+
theme,
|
|
3386
|
+
$hasLeft,
|
|
3387
|
+
$hasRight
|
|
3388
|
+
}) => {
|
|
3389
|
+
const paddingHorizontal = theme.kitt.spacing * 2;
|
|
3390
|
+
return styled.css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
|
|
3391
|
+
});
|
|
3392
|
+
const HeaderTitle = /*#__PURE__*/styled__default(Typography.Text).withConfig({
|
|
3393
|
+
displayName: "Header__HeaderTitle",
|
|
3394
|
+
componentId: "kitt-universal__sc-1g7sbq-4"
|
|
3395
|
+
})(["flex:1;text-align:", ";", ";"], ({
|
|
3396
|
+
$hasLeft,
|
|
3397
|
+
$hasRight
|
|
3398
|
+
}) => {
|
|
3399
|
+
if (!$hasLeft && $hasRight) return 'left';
|
|
3400
|
+
return 'center';
|
|
3401
|
+
}, ({
|
|
3402
|
+
theme,
|
|
3403
|
+
$hasLeft,
|
|
3404
|
+
$hasRight
|
|
3405
|
+
}) => {
|
|
3406
|
+
const paddingHorizontal = theme.kitt.spacing * 2;
|
|
3407
|
+
return styled.css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
|
|
3408
|
+
});
|
|
3409
|
+
function Header({
|
|
3410
|
+
hasSeparator = true,
|
|
3411
|
+
isTransparent,
|
|
3412
|
+
title,
|
|
3413
|
+
children,
|
|
3414
|
+
right,
|
|
3415
|
+
left,
|
|
3416
|
+
style
|
|
3417
|
+
}) {
|
|
3418
|
+
const sharedProps = {
|
|
3419
|
+
$hasLeft: Boolean(left),
|
|
3420
|
+
$hasRight: Boolean(right)
|
|
3421
|
+
};
|
|
3422
|
+
return /*#__PURE__*/jsxRuntime.jsx(HeaderContainer, {
|
|
3423
|
+
$isTransparent: isTransparent,
|
|
3424
|
+
$hasSeparator: hasSeparator,
|
|
3425
|
+
$hasLeft: Boolean(left),
|
|
3426
|
+
$hasRight: Boolean(right),
|
|
3427
|
+
style: style,
|
|
3428
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Row, {
|
|
3429
|
+
$hasContent: Boolean(title || children),
|
|
3430
|
+
...sharedProps,
|
|
3431
|
+
children: [left ? /*#__PURE__*/jsxRuntime.jsx(ButtonContainer, {
|
|
3432
|
+
children: left
|
|
3433
|
+
}) : null, title ? /*#__PURE__*/jsxRuntime.jsx(HeaderTitle, { ...sharedProps,
|
|
3434
|
+
variant: "bold",
|
|
3435
|
+
children: title
|
|
3436
|
+
}) : null, children ? /*#__PURE__*/jsxRuntime.jsx(ChildrenComponent, { ...sharedProps,
|
|
3437
|
+
children: children
|
|
3438
|
+
}) : null, right || left ? /*#__PURE__*/jsxRuntime.jsx(ButtonContainer, {
|
|
3439
|
+
children: right
|
|
3440
|
+
}) : null]
|
|
3441
|
+
})
|
|
3442
|
+
});
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
const NavigationModalContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
3446
|
+
displayName: "NavigationModalContainer",
|
|
3447
|
+
componentId: "kitt-universal__sc-n0bwvk-0"
|
|
3448
|
+
})(["position:relative;background-color:", ";flex:1;", ""], ({
|
|
3449
|
+
theme,
|
|
3450
|
+
$backgroundColor
|
|
3451
|
+
}) => $backgroundColor || theme.kitt.colors.uiBackgroundLight, () => {
|
|
3452
|
+
return styled.css(["min-height:100vh;"]);
|
|
3453
|
+
});
|
|
3454
|
+
|
|
3455
|
+
const ContainerWithoutHeader = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
3456
|
+
displayName: "NavigationModal__ContainerWithoutHeader",
|
|
3457
|
+
componentId: "kitt-universal__sc-ls8t24-0"
|
|
3458
|
+
})(["justify-content:space-between;flex:1;"]);
|
|
3459
|
+
function NavigationModal({
|
|
3460
|
+
body,
|
|
3461
|
+
header,
|
|
3462
|
+
footer,
|
|
3463
|
+
backgroundColor
|
|
3464
|
+
}) {
|
|
3465
|
+
return /*#__PURE__*/jsxRuntime.jsxs(NavigationModalContainer, {
|
|
3466
|
+
$backgroundColor: backgroundColor,
|
|
3467
|
+
children: [header ? /*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.View, {
|
|
3468
|
+
children: header
|
|
3469
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsxs(ContainerWithoutHeader, {
|
|
3470
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.ScrollView, {
|
|
3471
|
+
bounces: false,
|
|
3472
|
+
contentContainerStyle: {
|
|
3473
|
+
flexGrow: 1,
|
|
3474
|
+
position: 'relative'
|
|
3475
|
+
},
|
|
3476
|
+
children: body
|
|
3477
|
+
}), footer || null]
|
|
3478
|
+
})]
|
|
3479
|
+
});
|
|
3480
|
+
}
|
|
3481
|
+
NavigationModal.Header = Header;
|
|
3482
|
+
NavigationModal.Footer = Footer;
|
|
3483
|
+
NavigationModal.Body = Body;
|
|
3484
|
+
NavigationModal.Padding = ContentPadding;
|
|
3485
|
+
|
|
3186
3486
|
function Notification({
|
|
3187
3487
|
type,
|
|
3188
3488
|
children,
|
|
@@ -4191,6 +4491,8 @@ exports.LoaderIcon = LoaderIcon;
|
|
|
4191
4491
|
exports.MatchWindowSize = MatchWindowSize;
|
|
4192
4492
|
exports.Message = Message;
|
|
4193
4493
|
exports.Modal = Modal;
|
|
4494
|
+
exports.ModalBehaviour = ModalBehaviour;
|
|
4495
|
+
exports.NavigationModal = NavigationModal;
|
|
4194
4496
|
exports.Notification = Notification;
|
|
4195
4497
|
exports.Overlay = Overlay;
|
|
4196
4498
|
exports.PageLoader = PageLoader;
|