@ornikar/kitt-universal 9.1.3 → 9.3.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/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 +6 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +3498 -3556
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/native-base/acceptable-native-base-props.d.ts +9 -0
- package/dist/definitions/native-base/acceptable-native-base-props.d.ts.map +1 -0
- package/dist/definitions/native-base/layout.d.ts +23 -0
- package/dist/definitions/native-base/layout.d.ts.map +1 -0
- package/dist/definitions/native-base/primitives.d.ts +21 -0
- package/dist/definitions/native-base/primitives.d.ts.map +1 -0
- 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/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +378 -70
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +378 -70
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +378 -70
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +457 -126
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +337 -19
- 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 +349 -19
- 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 +6 -3
|
@@ -2,14 +2,14 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import { UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, ArcIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
4
4
|
export * from '@ornikar/kitt-icons';
|
|
5
|
-
import { Platform, Image, Linking, useWindowDimensions, Pressable, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$2, TextInput, View, Animated as Animated$1, Easing } from 'react-native';
|
|
5
|
+
import { Platform, Image, Linking, useWindowDimensions, Pressable as Pressable$1, StyleSheet, ScrollView as ScrollView$1, Modal as Modal$1, Text as Text$2, TextInput, View as View$1, Animated as Animated$1, Easing } from 'react-native';
|
|
6
6
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
7
7
|
import styled, { useTheme, css, ThemeProvider } from 'styled-components/native';
|
|
8
8
|
import React, { cloneElement, useContext, createContext, forwardRef, useMemo, useEffect, useState, useRef, Fragment as Fragment$1, Children } from 'react';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
|
-
import { Text as Text$1, Image as Image$1, extendTheme, NativeBaseProvider } from 'native-base';
|
|
11
|
-
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, useAnimatedProps, withDelay, withTiming, Easing as Easing$1, withRepeat, interpolate } from 'react-native-reanimated';
|
|
12
10
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
11
|
+
import { Text as Text$1, Image as Image$1, NativeBaseProvider, extendTheme, Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, View as View$2, ScrollView as ScrollView$2, Pressable as Pressable$2 } from 'native-base';
|
|
12
|
+
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, useAnimatedProps, withDelay, withTiming, Easing as Easing$1, withRepeat, interpolate } from 'react-native-reanimated';
|
|
13
13
|
import { parse } from 'twemoji-parser';
|
|
14
14
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
15
15
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
@@ -116,7 +116,7 @@ var KittBreakpointNameEnum;
|
|
|
116
116
|
KittBreakpointNameEnum["WIDE"] = "wide";
|
|
117
117
|
})(KittBreakpointNameEnum || (KittBreakpointNameEnum = {}));
|
|
118
118
|
|
|
119
|
-
var _excluded$
|
|
119
|
+
var _excluded$k = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
|
|
120
120
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
121
121
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
122
122
|
function useTypographyColor() {
|
|
@@ -177,7 +177,7 @@ function Typography(_ref) {
|
|
|
177
177
|
} : _ref$type,
|
|
178
178
|
variant = _ref.variant,
|
|
179
179
|
color = _ref.color,
|
|
180
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
180
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$k);
|
|
181
181
|
|
|
182
182
|
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
183
183
|
var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
|
|
@@ -188,6 +188,18 @@ function Typography(_ref) {
|
|
|
188
188
|
base: baseOrDefaultToBody
|
|
189
189
|
}));
|
|
190
190
|
|
|
191
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
192
|
+
Object.entries(type).forEach(function (_ref2) {
|
|
193
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
194
|
+
key = _ref3[0],
|
|
195
|
+
value = _ref3[1];
|
|
196
|
+
|
|
197
|
+
if (value && isTypeHeader(value) !== isHeader) {
|
|
198
|
+
throw new Error("Invalid value for \"".concat(key, "\": \"").concat(value, "\" is ").concat(isHeader ? 'not' : '', " an header. Don't mix headers and bodies."));
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
191
203
|
var text = /*#__PURE__*/jsx(Text$1, _objectSpread({
|
|
192
204
|
accessibilityRole: accessibilityRole || undefined,
|
|
193
205
|
fontSize: fontSizeForNativeBase,
|
|
@@ -260,7 +272,7 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
260
272
|
|
|
261
273
|
Typography.h5 = createHeading(5, 'header5');
|
|
262
274
|
|
|
263
|
-
var _excluded$
|
|
275
|
+
var _excluded$j = ["size", "round", "light", "sizeVariant"];
|
|
264
276
|
|
|
265
277
|
var getInitials = function (firstname, lastname) {
|
|
266
278
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
@@ -331,7 +343,7 @@ function Avatar(_ref6) {
|
|
|
331
343
|
round = _ref6.round,
|
|
332
344
|
light = _ref6.light,
|
|
333
345
|
sizeVariant = _ref6.sizeVariant,
|
|
334
|
-
props = _objectWithoutProperties(_ref6, _excluded$
|
|
346
|
+
props = _objectWithoutProperties(_ref6, _excluded$j);
|
|
335
347
|
|
|
336
348
|
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
337
349
|
$size: size,
|
|
@@ -510,12 +522,12 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
510
522
|
return defaultPadding;
|
|
511
523
|
});
|
|
512
524
|
|
|
513
|
-
var _excluded$
|
|
525
|
+
var _excluded$i = ["color"],
|
|
514
526
|
_excluded2$3 = ["color"];
|
|
515
527
|
|
|
516
528
|
function TypographyIconSpecifiedColor(_ref) {
|
|
517
529
|
var color = _ref.color,
|
|
518
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
530
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
519
531
|
|
|
520
532
|
var theme = /*#__PURE__*/useTheme();
|
|
521
533
|
return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -547,7 +559,7 @@ function isSubtle(type) {
|
|
|
547
559
|
return type.startsWith('subtle');
|
|
548
560
|
}
|
|
549
561
|
|
|
550
|
-
var _excluded$
|
|
562
|
+
var _excluded$h = ["type", "variant", "isDisabled", "$isStretch", "icon", "children"];
|
|
551
563
|
|
|
552
564
|
var getTextColorByType = function (type, variant) {
|
|
553
565
|
switch (type) {
|
|
@@ -689,7 +701,7 @@ function ButtonContent(_ref7) {
|
|
|
689
701
|
$isStretch = _ref7.$isStretch,
|
|
690
702
|
icon = _ref7.icon,
|
|
691
703
|
children = _ref7.children,
|
|
692
|
-
props = _objectWithoutProperties(_ref7, _excluded$
|
|
704
|
+
props = _objectWithoutProperties(_ref7, _excluded$h);
|
|
693
705
|
|
|
694
706
|
var color = isDisabled ? 'black-light' : getTextColorByType(type, variant);
|
|
695
707
|
return /*#__PURE__*/jsx(ButtonContentContainer, {
|
|
@@ -855,7 +867,7 @@ function Emoji(_ref) {
|
|
|
855
867
|
});
|
|
856
868
|
}
|
|
857
869
|
|
|
858
|
-
var _excluded$
|
|
870
|
+
var _excluded$g = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
|
|
859
871
|
_excluded2$2 = ["phoneNumber", "children"],
|
|
860
872
|
_excluded3$1 = ["phoneNumber", "children"],
|
|
861
873
|
_excluded4 = ["emailAddress", "children"];
|
|
@@ -865,7 +877,7 @@ function ExternalAppLink(_ref) {
|
|
|
865
877
|
appValue = _ref.appValue,
|
|
866
878
|
onPress = _ref.onPress,
|
|
867
879
|
onOpenAppError = _ref.onOpenAppError,
|
|
868
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
880
|
+
rest = _objectWithoutProperties(_ref, _excluded$g);
|
|
869
881
|
|
|
870
882
|
var href = "".concat(appScheme, ":").concat(appValue);
|
|
871
883
|
|
|
@@ -888,26 +900,25 @@ function ExternalAppLink(_ref) {
|
|
|
888
900
|
break;
|
|
889
901
|
}
|
|
890
902
|
|
|
891
|
-
Linking.openURL(href)["catch"](function (err) {
|
|
892
|
-
console.error("An error occurred while opening ".concat(href), err);
|
|
893
|
-
onOpenAppError === null || onOpenAppError === void 0 ? void 0 : onOpenAppError("An error occurred while opening ".concat(href));
|
|
894
|
-
});
|
|
895
|
-
|
|
896
903
|
if (!onPress) {
|
|
897
|
-
_context.next =
|
|
904
|
+
_context.next = 9;
|
|
898
905
|
break;
|
|
899
906
|
}
|
|
900
907
|
|
|
901
908
|
onPress(e);
|
|
902
909
|
|
|
903
910
|
if (!(e !== null && e !== void 0 && e.defaultPrevented)) {
|
|
904
|
-
_context.next =
|
|
911
|
+
_context.next = 9;
|
|
905
912
|
break;
|
|
906
913
|
}
|
|
907
914
|
|
|
908
915
|
return _context.abrupt("return");
|
|
909
916
|
|
|
910
|
-
case
|
|
917
|
+
case 9:
|
|
918
|
+
Linking.openURL(href)["catch"](function (err) {
|
|
919
|
+
console.error("An error occurred while opening ".concat(href), err);
|
|
920
|
+
onOpenAppError === null || onOpenAppError === void 0 ? void 0 : onOpenAppError("An error occurred while opening ".concat(href));
|
|
921
|
+
});
|
|
911
922
|
_context.next = 13;
|
|
912
923
|
break;
|
|
913
924
|
|
|
@@ -984,14 +995,14 @@ var defaultOpenLinkBehavior = {
|
|
|
984
995
|
web: 'targetBlank'
|
|
985
996
|
};
|
|
986
997
|
|
|
987
|
-
var _excluded$
|
|
998
|
+
var _excluded$f = ["as", "href", "openLinkBehavior", "onPress"];
|
|
988
999
|
function ExternalLink(_ref) {
|
|
989
1000
|
var Component = _ref.as,
|
|
990
1001
|
href = _ref.href,
|
|
991
1002
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
992
1003
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
993
1004
|
onPress = _ref.onPress,
|
|
994
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
1005
|
+
rest = _objectWithoutProperties(_ref, _excluded$f);
|
|
995
1006
|
|
|
996
1007
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
997
1008
|
onPress: function handleOnPress(e) {
|
|
@@ -1488,6 +1499,11 @@ var listItem = {
|
|
|
1488
1499
|
innerMargin: 8
|
|
1489
1500
|
};
|
|
1490
1501
|
|
|
1502
|
+
var navigationModal = {
|
|
1503
|
+
height: 56,
|
|
1504
|
+
padding: 16
|
|
1505
|
+
};
|
|
1506
|
+
|
|
1491
1507
|
var pageLoader = {
|
|
1492
1508
|
size: 60,
|
|
1493
1509
|
strokeWidth: 3,
|
|
@@ -1633,7 +1649,8 @@ var theme = {
|
|
|
1633
1649
|
skeleton: skeleton,
|
|
1634
1650
|
tag: tag,
|
|
1635
1651
|
tooltip: tooltip,
|
|
1636
|
-
typography: typography
|
|
1652
|
+
typography: typography,
|
|
1653
|
+
navigationModal: navigationModal
|
|
1637
1654
|
};
|
|
1638
1655
|
|
|
1639
1656
|
function matchWindowSize(_ref, _ref2) {
|
|
@@ -1930,7 +1947,7 @@ function DatePickerInputs(_ref4) {
|
|
|
1930
1947
|
});
|
|
1931
1948
|
}
|
|
1932
1949
|
|
|
1933
|
-
var _excluded$
|
|
1950
|
+
var _excluded$e = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "setIsFocused", "currentValue", "setCurrentValue", "onChange", "isFocused"];
|
|
1934
1951
|
function DatePickerAndroid(_ref) {
|
|
1935
1952
|
var onBlur = _ref.onBlur,
|
|
1936
1953
|
onFocus = _ref.onFocus,
|
|
@@ -1942,7 +1959,7 @@ function DatePickerAndroid(_ref) {
|
|
|
1942
1959
|
setCurrentValue = _ref.setCurrentValue,
|
|
1943
1960
|
_onChange = _ref.onChange,
|
|
1944
1961
|
isFocused = _ref.isFocused,
|
|
1945
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1962
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
1946
1963
|
|
|
1947
1964
|
var handleClose = function () {
|
|
1948
1965
|
if (onBlur) onBlur();
|
|
@@ -1982,7 +1999,7 @@ function DatePickerAndroid(_ref) {
|
|
|
1982
1999
|
}
|
|
1983
2000
|
|
|
1984
2001
|
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
1985
|
-
var OverlayPressable = /*#__PURE__*/styled(Pressable).withConfig({
|
|
2002
|
+
var OverlayPressable = /*#__PURE__*/styled(Pressable$1).withConfig({
|
|
1986
2003
|
displayName: "Overlay__OverlayPressable"
|
|
1987
2004
|
})(function (_ref) {
|
|
1988
2005
|
var theme = _ref.theme;
|
|
@@ -2009,7 +2026,7 @@ var BodyView = /*#__PURE__*/styled.View.withConfig({
|
|
|
2009
2026
|
});
|
|
2010
2027
|
function ModalBody(_ref3) {
|
|
2011
2028
|
var children = _ref3.children;
|
|
2012
|
-
return /*#__PURE__*/jsx(ScrollView, {
|
|
2029
|
+
return /*#__PURE__*/jsx(ScrollView$1, {
|
|
2013
2030
|
children: /*#__PURE__*/jsx(BodyView, {
|
|
2014
2031
|
children: children
|
|
2015
2032
|
})
|
|
@@ -2032,11 +2049,11 @@ function ModalFooter(_ref3) {
|
|
|
2032
2049
|
});
|
|
2033
2050
|
}
|
|
2034
2051
|
|
|
2035
|
-
var _excluded$
|
|
2052
|
+
var _excluded$d = ["as", "children"];
|
|
2036
2053
|
function StyleWebWrapper(_ref) {
|
|
2037
2054
|
var as = _ref.as,
|
|
2038
2055
|
children = _ref.children,
|
|
2039
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2056
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
2040
2057
|
|
|
2041
2058
|
if (Platform.OS !== 'web') return children;
|
|
2042
2059
|
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
@@ -2066,7 +2083,7 @@ function withTheme(WrappedComponent) {
|
|
|
2066
2083
|
});
|
|
2067
2084
|
}
|
|
2068
2085
|
|
|
2069
|
-
var _excluded$
|
|
2086
|
+
var _excluded$c = ["color", "disabled"];
|
|
2070
2087
|
var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
|
|
2071
2088
|
name: "PressableIconButtonWebWrapper",
|
|
2072
2089
|
"class": "kitt-u_PressableIconButtonWebWrapper_p1nlccvg",
|
|
@@ -2130,7 +2147,7 @@ var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
|
|
|
2130
2147
|
function PressableIconButton(_ref9) {
|
|
2131
2148
|
var color = _ref9.color,
|
|
2132
2149
|
disabled = _ref9.disabled,
|
|
2133
|
-
props = _objectWithoutProperties(_ref9, _excluded$
|
|
2150
|
+
props = _objectWithoutProperties(_ref9, _excluded$c);
|
|
2134
2151
|
|
|
2135
2152
|
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
2136
2153
|
as: PressableIconButtonWebWrapper,
|
|
@@ -2311,7 +2328,7 @@ function IconButton(_ref7) {
|
|
|
2311
2328
|
});
|
|
2312
2329
|
}
|
|
2313
2330
|
|
|
2314
|
-
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
2331
|
+
var OnCloseContext$1 = /*#__PURE__*/createContext(function () {});
|
|
2315
2332
|
|
|
2316
2333
|
var HeaderView = /*#__PURE__*/styled.View.withConfig({
|
|
2317
2334
|
displayName: "Header__HeaderView"
|
|
@@ -2345,7 +2362,7 @@ function ModalHeader(_ref6) {
|
|
|
2345
2362
|
var left = _ref6.left,
|
|
2346
2363
|
right = _ref6.right,
|
|
2347
2364
|
children = _ref6.children;
|
|
2348
|
-
var onClose = useContext(OnCloseContext);
|
|
2365
|
+
var onClose = useContext(OnCloseContext$1);
|
|
2349
2366
|
var isIconLeft = !!left;
|
|
2350
2367
|
return /*#__PURE__*/jsxs(HeaderView, {
|
|
2351
2368
|
children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
|
|
@@ -2386,7 +2403,7 @@ function Modal(_ref5) {
|
|
|
2386
2403
|
onClose = _ref5.onClose,
|
|
2387
2404
|
onEntered = _ref5.onEntered,
|
|
2388
2405
|
onExited = _ref5.onExited;
|
|
2389
|
-
return /*#__PURE__*/jsx(OnCloseContext.Provider, {
|
|
2406
|
+
return /*#__PURE__*/jsx(OnCloseContext$1.Provider, {
|
|
2390
2407
|
value: onClose,
|
|
2391
2408
|
children: /*#__PURE__*/jsx(Modal$1, {
|
|
2392
2409
|
transparent: true,
|
|
@@ -2443,7 +2460,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
2443
2460
|
}));
|
|
2444
2461
|
}
|
|
2445
2462
|
|
|
2446
|
-
var _excluded$
|
|
2463
|
+
var _excluded$b = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
2447
2464
|
|
|
2448
2465
|
function ModalTitle(_ref) {
|
|
2449
2466
|
var children = _ref.children;
|
|
@@ -2463,7 +2480,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2463
2480
|
validateButtonLabel = _ref2.validateButtonLabel,
|
|
2464
2481
|
onClose = _ref2.onClose,
|
|
2465
2482
|
onChange = _ref2.onChange,
|
|
2466
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
2483
|
+
props = _objectWithoutProperties(_ref2, _excluded$b);
|
|
2467
2484
|
|
|
2468
2485
|
var _useState = useState(value),
|
|
2469
2486
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2507,7 +2524,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2507
2524
|
});
|
|
2508
2525
|
}
|
|
2509
2526
|
|
|
2510
|
-
var _excluded$
|
|
2527
|
+
var _excluded$a = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "onChange", "onFocus", "onBlur", "pickerDefaultDate"];
|
|
2511
2528
|
function DatePicker(_ref) {
|
|
2512
2529
|
var value = _ref.value,
|
|
2513
2530
|
pickerUITestID = _ref.pickerUITestID,
|
|
@@ -2518,7 +2535,7 @@ function DatePicker(_ref) {
|
|
|
2518
2535
|
onFocus = _ref.onFocus,
|
|
2519
2536
|
onBlur = _ref.onBlur,
|
|
2520
2537
|
pickerDefaultDate = _ref.pickerDefaultDate,
|
|
2521
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2538
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
2522
2539
|
|
|
2523
2540
|
var _useState = useState(isDefaultVisible),
|
|
2524
2541
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2585,7 +2602,7 @@ var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
2585
2602
|
displayName: "InputTextContainer"
|
|
2586
2603
|
})(["position:relative;"]);
|
|
2587
2604
|
|
|
2588
|
-
var _excluded$
|
|
2605
|
+
var _excluded$9 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "keyboardType", "multiline", "onSubmitEditing", "onFocus", "onBlur"];
|
|
2589
2606
|
var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
2590
2607
|
displayName: "InputText__StyledTextInput"
|
|
2591
2608
|
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
@@ -2634,7 +2651,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2634
2651
|
onSubmitEditing = _ref4.onSubmitEditing,
|
|
2635
2652
|
_onFocus = _ref4.onFocus,
|
|
2636
2653
|
_onBlur = _ref4.onBlur,
|
|
2637
|
-
props = _objectWithoutProperties(_ref4, _excluded$
|
|
2654
|
+
props = _objectWithoutProperties(_ref4, _excluded$9);
|
|
2638
2655
|
|
|
2639
2656
|
var theme = /*#__PURE__*/useTheme();
|
|
2640
2657
|
|
|
@@ -2783,14 +2800,14 @@ function InputIcon(_ref) {
|
|
|
2783
2800
|
function InputPressable(_ref) {
|
|
2784
2801
|
var props = _extends({}, _ref);
|
|
2785
2802
|
|
|
2786
|
-
return /*#__PURE__*/jsx(Pressable, _objectSpread({}, props));
|
|
2803
|
+
return /*#__PURE__*/jsx(Pressable$1, _objectSpread({}, props));
|
|
2787
2804
|
}
|
|
2788
2805
|
|
|
2789
|
-
var _excluded$
|
|
2806
|
+
var _excluded$8 = ["isPasswordDefaultVisible", "right"];
|
|
2790
2807
|
function InputPassword(_ref) {
|
|
2791
2808
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
2792
2809
|
right = _ref.right,
|
|
2793
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2810
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
2794
2811
|
|
|
2795
2812
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
2796
2813
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2829,7 +2846,7 @@ var getTypographyColor = function (type) {
|
|
|
2829
2846
|
return type ? 'white' : 'black';
|
|
2830
2847
|
};
|
|
2831
2848
|
|
|
2832
|
-
var InputTagContainer = /*#__PURE__*/styled(View).withConfig({
|
|
2849
|
+
var InputTagContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2833
2850
|
displayName: "InputTag__InputTagContainer"
|
|
2834
2851
|
})(["align-items:center;justify-content:center;flex-direction:row;align-self:flex-start;overflow:hidden;padding-horizontal:", "px;background-color:", ";border-radius:", "px;"], function (_ref) {
|
|
2835
2852
|
var theme = _ref.theme;
|
|
@@ -2851,7 +2868,7 @@ var InputTagContainer = /*#__PURE__*/styled(View).withConfig({
|
|
|
2851
2868
|
var theme = _ref3.theme;
|
|
2852
2869
|
return theme.kitt.forms.inputTag.borderRadius;
|
|
2853
2870
|
});
|
|
2854
|
-
var IconContainer = /*#__PURE__*/styled(View).withConfig({
|
|
2871
|
+
var IconContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2855
2872
|
displayName: "InputTag__IconContainer"
|
|
2856
2873
|
})(["margin-right:", "px;"], function (_ref4) {
|
|
2857
2874
|
var theme = _ref4.theme;
|
|
@@ -2993,7 +3010,7 @@ function TextArea(_ref) {
|
|
|
2993
3010
|
}, props));
|
|
2994
3011
|
}
|
|
2995
3012
|
|
|
2996
|
-
var Body = /*#__PURE__*/styled.View.withConfig({
|
|
3013
|
+
var Body$1 = /*#__PURE__*/styled.View.withConfig({
|
|
2997
3014
|
displayName: "Body"
|
|
2998
3015
|
})(["", " background-color:", ";flex:1;"], function (_ref) {
|
|
2999
3016
|
var theme = _ref.theme;
|
|
@@ -3006,7 +3023,7 @@ var Body = /*#__PURE__*/styled.View.withConfig({
|
|
|
3006
3023
|
});
|
|
3007
3024
|
function FullScreenModalBody(_ref3) {
|
|
3008
3025
|
var children = _ref3.children;
|
|
3009
|
-
return /*#__PURE__*/jsx(Body, {
|
|
3026
|
+
return /*#__PURE__*/jsx(Body$1, {
|
|
3010
3027
|
children: children
|
|
3011
3028
|
});
|
|
3012
3029
|
}
|
|
@@ -3030,7 +3047,7 @@ function getHeaderHorizontalMediumPadding(spacing) {
|
|
|
3030
3047
|
return spacing * 6;
|
|
3031
3048
|
}
|
|
3032
3049
|
|
|
3033
|
-
var Header = /*#__PURE__*/styled.View.withConfig({
|
|
3050
|
+
var Header$1 = /*#__PURE__*/styled.View.withConfig({
|
|
3034
3051
|
displayName: "Header"
|
|
3035
3052
|
})(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], function (_ref2) {
|
|
3036
3053
|
var theme = _ref2.theme,
|
|
@@ -3114,7 +3131,7 @@ function FullScreenModalHeader(_ref6) {
|
|
|
3114
3131
|
setRightWidth(event.nativeEvent.layout.width);
|
|
3115
3132
|
};
|
|
3116
3133
|
|
|
3117
|
-
return /*#__PURE__*/jsxs(Header, {
|
|
3134
|
+
return /*#__PURE__*/jsxs(Header$1, {
|
|
3118
3135
|
insetTop: Platform.OS === 'ios' ? undefined : top,
|
|
3119
3136
|
children: [left ? /*#__PURE__*/jsx(SideContainer, {
|
|
3120
3137
|
onLayout: function onLayout(e) {
|
|
@@ -3192,20 +3209,20 @@ function SpinningIcon(_ref) {
|
|
|
3192
3209
|
});
|
|
3193
3210
|
}
|
|
3194
3211
|
|
|
3195
|
-
var _excluded$
|
|
3212
|
+
var _excluded$7 = ["children"];
|
|
3196
3213
|
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
3197
3214
|
displayName: "ListItemContent__ContentView"
|
|
3198
3215
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
3199
3216
|
function ListItemContent(_ref) {
|
|
3200
3217
|
var children = _ref.children,
|
|
3201
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
3218
|
+
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
3202
3219
|
|
|
3203
3220
|
return /*#__PURE__*/jsx(ContentView, _objectSpread(_objectSpread({}, rest), {}, {
|
|
3204
3221
|
children: children
|
|
3205
3222
|
}));
|
|
3206
3223
|
}
|
|
3207
3224
|
|
|
3208
|
-
var _excluded$
|
|
3225
|
+
var _excluded$6 = ["children", "side"],
|
|
3209
3226
|
_excluded2$1 = ["children", "align"];
|
|
3210
3227
|
var SideContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
3211
3228
|
displayName: "ListItemSideContent__SideContainerView"
|
|
@@ -3223,7 +3240,7 @@ function ListItemSideContainer(_ref3) {
|
|
|
3223
3240
|
var children = _ref3.children,
|
|
3224
3241
|
_ref3$side = _ref3.side,
|
|
3225
3242
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
3226
|
-
rest = _objectWithoutProperties(_ref3, _excluded$
|
|
3243
|
+
rest = _objectWithoutProperties(_ref3, _excluded$6);
|
|
3227
3244
|
|
|
3228
3245
|
return /*#__PURE__*/jsx(SideContainerView, _objectSpread(_objectSpread({
|
|
3229
3246
|
side: side
|
|
@@ -3250,7 +3267,7 @@ function ListItemSideContent(_ref5) {
|
|
|
3250
3267
|
}));
|
|
3251
3268
|
}
|
|
3252
3269
|
|
|
3253
|
-
var _excluded$
|
|
3270
|
+
var _excluded$5 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
3254
3271
|
var ContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
3255
3272
|
displayName: "ListItem__ContainerView"
|
|
3256
3273
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -3289,9 +3306,9 @@ function ListItem(_ref5) {
|
|
|
3289
3306
|
left = _ref5.left,
|
|
3290
3307
|
right = _ref5.right,
|
|
3291
3308
|
onPress = _ref5.onPress,
|
|
3292
|
-
rest = _objectWithoutProperties(_ref5, _excluded$
|
|
3309
|
+
rest = _objectWithoutProperties(_ref5, _excluded$5);
|
|
3293
3310
|
|
|
3294
|
-
var Wrapper = onPress ? Pressable : Fragment$1;
|
|
3311
|
+
var Wrapper = onPress ? Pressable$1 : Fragment$1;
|
|
3295
3312
|
var wrapperProps = onPress ? _objectSpread({
|
|
3296
3313
|
accessibilityRole: 'button',
|
|
3297
3314
|
onPress: onPress
|
|
@@ -3477,6 +3494,64 @@ function Message(_ref) {
|
|
|
3477
3494
|
});
|
|
3478
3495
|
}
|
|
3479
3496
|
|
|
3497
|
+
function ModalBehaviourPortal(_ref) {
|
|
3498
|
+
var children = _ref.children;
|
|
3499
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
3500
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
3501
|
+
children: children
|
|
3502
|
+
});
|
|
3503
|
+
}
|
|
3504
|
+
|
|
3505
|
+
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
3506
|
+
function OnCloseProvider(_ref) {
|
|
3507
|
+
var children = _ref.children,
|
|
3508
|
+
onClose = _ref.onClose;
|
|
3509
|
+
return /*#__PURE__*/jsx(OnCloseContext.Provider, {
|
|
3510
|
+
value: onClose,
|
|
3511
|
+
children: children
|
|
3512
|
+
});
|
|
3513
|
+
}
|
|
3514
|
+
function useOnCloseModalBehaviour() {
|
|
3515
|
+
var onClose = useContext(OnCloseContext);
|
|
3516
|
+
return onClose;
|
|
3517
|
+
}
|
|
3518
|
+
|
|
3519
|
+
function CloseButton(_ref) {
|
|
3520
|
+
var children = _ref.children,
|
|
3521
|
+
onPress = _ref.onPress;
|
|
3522
|
+
var onCloseContextCallback = useOnCloseModalBehaviour();
|
|
3523
|
+
return /*#__PURE__*/cloneElement(children, {
|
|
3524
|
+
onPress: function handleClose() {
|
|
3525
|
+
if (onPress) onPress();
|
|
3526
|
+
onCloseContextCallback();
|
|
3527
|
+
}
|
|
3528
|
+
});
|
|
3529
|
+
}
|
|
3530
|
+
|
|
3531
|
+
var ModalBehaviourContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
3532
|
+
displayName: "ModalBehaviour__ModalBehaviourContainer"
|
|
3533
|
+
})(["", ""], function () {
|
|
3534
|
+
if (Platform.OS !== 'web') return undefined;
|
|
3535
|
+
return css(["position:fixed;top:0;left:0;width:100%;"]);
|
|
3536
|
+
});
|
|
3537
|
+
function ModalBehaviour(_ref2) {
|
|
3538
|
+
var children = _ref2.children,
|
|
3539
|
+
visible = _ref2.visible,
|
|
3540
|
+
style = _ref2.style,
|
|
3541
|
+
onClose = _ref2.onClose;
|
|
3542
|
+
return /*#__PURE__*/jsx(OnCloseProvider, {
|
|
3543
|
+
onClose: onClose,
|
|
3544
|
+
children: /*#__PURE__*/jsx(ModalBehaviourPortal, {
|
|
3545
|
+
visible: visible,
|
|
3546
|
+
children: visible ? /*#__PURE__*/jsx(ModalBehaviourContainer, {
|
|
3547
|
+
style: style,
|
|
3548
|
+
children: children
|
|
3549
|
+
}) : null
|
|
3550
|
+
})
|
|
3551
|
+
});
|
|
3552
|
+
}
|
|
3553
|
+
ModalBehaviour.CloseButton = CloseButton;
|
|
3554
|
+
|
|
3480
3555
|
var createKittSpaces = function (spacing) {
|
|
3481
3556
|
var sizes = {};
|
|
3482
3557
|
|
|
@@ -3485,12 +3560,17 @@ var createKittSpaces = function (spacing) {
|
|
|
3485
3560
|
}
|
|
3486
3561
|
|
|
3487
3562
|
return sizes;
|
|
3488
|
-
}; //
|
|
3563
|
+
}; // reset native-base to be able to set size / space as a number
|
|
3564
|
+
// https://docs.nativebase.io/next/default-theme#h2-size
|
|
3565
|
+
|
|
3489
3566
|
|
|
3567
|
+
var overridenNativeBaseSizeandSpaceScale = Object.fromEntries([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 20, 24, 32, 40, 48, 56, 64, 72, 80, 96, 0.5, 1.5, 2.5, 3.5].map(function (value) {
|
|
3568
|
+
return [value, value];
|
|
3569
|
+
})); // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type -- let typescript infer types
|
|
3490
3570
|
|
|
3491
3571
|
var createKittNativeBaseCustomTheme = function (theme) {
|
|
3492
3572
|
var spaces = createKittSpaces(theme.spacing);
|
|
3493
|
-
|
|
3573
|
+
var extendedTheme = extendTheme({
|
|
3494
3574
|
colors: {
|
|
3495
3575
|
kitt: _objectSpread(_objectSpread({}, theme.colors), {}, {
|
|
3496
3576
|
typography: theme.typography.colors
|
|
@@ -3499,10 +3579,8 @@ var createKittNativeBaseCustomTheme = function (theme) {
|
|
|
3499
3579
|
radii: {
|
|
3500
3580
|
'kitt.borderRadius': theme.card.borderRadius
|
|
3501
3581
|
},
|
|
3502
|
-
sizes: _objectSpread(_objectSpread({}, spaces),
|
|
3503
|
-
|
|
3504
|
-
}))),
|
|
3505
|
-
space: spaces,
|
|
3582
|
+
sizes: _objectSpread(_objectSpread({}, spaces), overridenNativeBaseSizeandSpaceScale),
|
|
3583
|
+
space: _objectSpread(_objectSpread({}, spaces), overridenNativeBaseSizeandSpaceScale),
|
|
3506
3584
|
breakpoints: {
|
|
3507
3585
|
// kitt breakpoints
|
|
3508
3586
|
base: KittBreakpoints.BASE,
|
|
@@ -3598,6 +3676,9 @@ var createKittNativeBaseCustomTheme = function (theme) {
|
|
|
3598
3676
|
}
|
|
3599
3677
|
}
|
|
3600
3678
|
});
|
|
3679
|
+
return _objectSpread(_objectSpread({}, extendedTheme), {}, {
|
|
3680
|
+
space: extendedTheme.space
|
|
3681
|
+
});
|
|
3601
3682
|
};
|
|
3602
3683
|
function KittNativeBaseProvider(_ref) {
|
|
3603
3684
|
var theme = _ref.theme,
|
|
@@ -3614,6 +3695,233 @@ function KittNativeBaseProvider(_ref) {
|
|
|
3614
3695
|
});
|
|
3615
3696
|
}
|
|
3616
3697
|
|
|
3698
|
+
var Stack = Stack$1;
|
|
3699
|
+
var VStack = VStack$1;
|
|
3700
|
+
var HStack = HStack$1;
|
|
3701
|
+
|
|
3702
|
+
var View = View$2;
|
|
3703
|
+
var ScrollView = ScrollView$2;
|
|
3704
|
+
var Pressable = Pressable$2;
|
|
3705
|
+
|
|
3706
|
+
var _excluded$4 = ["children"];
|
|
3707
|
+
var ViewWithPadding = /*#__PURE__*/styled(View$1).withConfig({
|
|
3708
|
+
displayName: "ContentPadding__ViewWithPadding"
|
|
3709
|
+
})(["padding:", ";"], function (_ref) {
|
|
3710
|
+
var theme = _ref.theme;
|
|
3711
|
+
return "0 ".concat(theme.kitt.navigationModal.padding, "px");
|
|
3712
|
+
});
|
|
3713
|
+
function ContentPadding(_ref2) {
|
|
3714
|
+
var children = _ref2.children,
|
|
3715
|
+
props = _objectWithoutProperties(_ref2, _excluded$4);
|
|
3716
|
+
|
|
3717
|
+
return /*#__PURE__*/jsx(ViewWithPadding, _objectSpread(_objectSpread({}, props), {}, {
|
|
3718
|
+
children: children
|
|
3719
|
+
}));
|
|
3720
|
+
}
|
|
3721
|
+
|
|
3722
|
+
var _excluded$3 = ["children", "shouldHandleBottomNotch", "style"];
|
|
3723
|
+
var StyledViewWithPadding = /*#__PURE__*/styled(ContentPadding).withConfig({
|
|
3724
|
+
displayName: "Body__StyledViewWithPadding"
|
|
3725
|
+
})(["padding-top:", "px;padding-bottom:", "px;"], function (_ref) {
|
|
3726
|
+
var theme = _ref.theme;
|
|
3727
|
+
return theme.kitt.spacing * 6;
|
|
3728
|
+
}, function (_ref2) {
|
|
3729
|
+
var theme = _ref2.theme,
|
|
3730
|
+
$insetBottom = _ref2.$insetBottom;
|
|
3731
|
+
return Math.max(theme.kitt.spacing * 4, $insetBottom);
|
|
3732
|
+
});
|
|
3733
|
+
function Body(_ref3) {
|
|
3734
|
+
var children = _ref3.children,
|
|
3735
|
+
shouldHandleBottomNotch = _ref3.shouldHandleBottomNotch,
|
|
3736
|
+
style = _ref3.style,
|
|
3737
|
+
props = _objectWithoutProperties(_ref3, _excluded$3);
|
|
3738
|
+
|
|
3739
|
+
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
3740
|
+
bottom = _useSafeAreaInsets.bottom;
|
|
3741
|
+
|
|
3742
|
+
var insetBottom = shouldHandleBottomNotch ? bottom : 0;
|
|
3743
|
+
return /*#__PURE__*/jsx(StyledViewWithPadding, _objectSpread(_objectSpread({}, props), {}, {
|
|
3744
|
+
$insetBottom: insetBottom,
|
|
3745
|
+
style: style,
|
|
3746
|
+
children: children
|
|
3747
|
+
}));
|
|
3748
|
+
}
|
|
3749
|
+
|
|
3750
|
+
var FooterContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
|
|
3751
|
+
displayName: "Footer__FooterContainer"
|
|
3752
|
+
})(["padding-top:", "px;padding-bottom:", "px;", ";"], function (_ref) {
|
|
3753
|
+
var theme = _ref.theme;
|
|
3754
|
+
return theme.kitt.spacing * 3;
|
|
3755
|
+
}, function (_ref2) {
|
|
3756
|
+
var theme = _ref2.theme,
|
|
3757
|
+
$insetBottom = _ref2.$insetBottom;
|
|
3758
|
+
return Math.max(theme.kitt.spacing * 3, $insetBottom);
|
|
3759
|
+
}, function (_ref3) {
|
|
3760
|
+
var $hasSeparator = _ref3.$hasSeparator;
|
|
3761
|
+
if (!$hasSeparator) return undefined;
|
|
3762
|
+
return css(["border-top-width:1px;border-top-color:", ";"], function (_ref4) {
|
|
3763
|
+
var theme = _ref4.theme;
|
|
3764
|
+
return theme.kitt.colors.separator;
|
|
3765
|
+
});
|
|
3766
|
+
});
|
|
3767
|
+
function Footer(_ref5) {
|
|
3768
|
+
var _ref5$shouldHandleBot = _ref5.shouldHandleBottomNotch,
|
|
3769
|
+
shouldHandleBottomNotch = _ref5$shouldHandleBot === void 0 ? true : _ref5$shouldHandleBot,
|
|
3770
|
+
_ref5$hasSeparator = _ref5.hasSeparator,
|
|
3771
|
+
hasSeparator = _ref5$hasSeparator === void 0 ? true : _ref5$hasSeparator,
|
|
3772
|
+
children = _ref5.children,
|
|
3773
|
+
style = _ref5.style;
|
|
3774
|
+
|
|
3775
|
+
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
3776
|
+
bottom = _useSafeAreaInsets.bottom;
|
|
3777
|
+
|
|
3778
|
+
var insetBottom = shouldHandleBottomNotch ? bottom : 0;
|
|
3779
|
+
return /*#__PURE__*/jsx(FooterContainer, {
|
|
3780
|
+
$insetBottom: insetBottom,
|
|
3781
|
+
$hasSeparator: hasSeparator,
|
|
3782
|
+
style: style,
|
|
3783
|
+
children: children
|
|
3784
|
+
});
|
|
3785
|
+
}
|
|
3786
|
+
|
|
3787
|
+
var HeaderContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
|
|
3788
|
+
displayName: "Header__HeaderContainer"
|
|
3789
|
+
})(["height:", "px;width:100%;justify-content:center;background-color:", ";padding-right:", "px;padding-left:", "px;", ";"], function (_ref) {
|
|
3790
|
+
var theme = _ref.theme;
|
|
3791
|
+
return theme.kitt.navigationModal.height;
|
|
3792
|
+
}, function (_ref2) {
|
|
3793
|
+
var theme = _ref2.theme,
|
|
3794
|
+
$isTransparent = _ref2.$isTransparent;
|
|
3795
|
+
if ($isTransparent) return 'transparent';
|
|
3796
|
+
return theme.kitt.colors.uiBackgroundLight;
|
|
3797
|
+
}, function (_ref3) {
|
|
3798
|
+
var theme = _ref3.theme,
|
|
3799
|
+
$hasRight = _ref3.$hasRight;
|
|
3800
|
+
return $hasRight ? theme.kitt.spacing * 2 : theme.kitt.navigationModal.padding;
|
|
3801
|
+
}, function (_ref4) {
|
|
3802
|
+
var theme = _ref4.theme,
|
|
3803
|
+
$hasLeft = _ref4.$hasLeft;
|
|
3804
|
+
return $hasLeft ? theme.kitt.spacing * 2 : theme.kitt.navigationModal.padding;
|
|
3805
|
+
}, function (_ref5) {
|
|
3806
|
+
var $hasSeparator = _ref5.$hasSeparator;
|
|
3807
|
+
if (!$hasSeparator) return undefined;
|
|
3808
|
+
return css(["border-bottom-width:1px;border-bottom-color:", ";"], function (_ref6) {
|
|
3809
|
+
var theme = _ref6.theme;
|
|
3810
|
+
return theme.kitt.colors.separator;
|
|
3811
|
+
});
|
|
3812
|
+
});
|
|
3813
|
+
var Row = /*#__PURE__*/styled(View$1).withConfig({
|
|
3814
|
+
displayName: "Header__Row"
|
|
3815
|
+
})(["flex-direction:row;justify-content:", ";align-items:center;"], function (_ref7) {
|
|
3816
|
+
var $hasContent = _ref7.$hasContent,
|
|
3817
|
+
$hasLeft = _ref7.$hasLeft;
|
|
3818
|
+
return !$hasContent && !$hasLeft ? 'flex-end' : 'space-between';
|
|
3819
|
+
});
|
|
3820
|
+
var ButtonContainer = /*#__PURE__*/styled.View.withConfig({
|
|
3821
|
+
displayName: "Header__ButtonContainer"
|
|
3822
|
+
})(["width:", "px;"], function (_ref8) {
|
|
3823
|
+
var theme = _ref8.theme;
|
|
3824
|
+
return theme.kitt.iconButton.width;
|
|
3825
|
+
});
|
|
3826
|
+
var ChildrenComponent = /*#__PURE__*/styled(View$1).withConfig({
|
|
3827
|
+
displayName: "Header__ChildrenComponent"
|
|
3828
|
+
})(["flex:1;align-items:center;", ";"], function (_ref9) {
|
|
3829
|
+
var theme = _ref9.theme,
|
|
3830
|
+
$hasLeft = _ref9.$hasLeft,
|
|
3831
|
+
$hasRight = _ref9.$hasRight;
|
|
3832
|
+
var paddingHorizontal = theme.kitt.spacing * 2;
|
|
3833
|
+
return css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
|
|
3834
|
+
});
|
|
3835
|
+
var HeaderTitle = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
3836
|
+
displayName: "Header__HeaderTitle"
|
|
3837
|
+
})(["flex:1;text-align:", ";", ";"], function (_ref10) {
|
|
3838
|
+
var $hasLeft = _ref10.$hasLeft,
|
|
3839
|
+
$hasRight = _ref10.$hasRight;
|
|
3840
|
+
if (!$hasLeft && $hasRight) return 'left';
|
|
3841
|
+
return 'center';
|
|
3842
|
+
}, function (_ref11) {
|
|
3843
|
+
var theme = _ref11.theme,
|
|
3844
|
+
$hasLeft = _ref11.$hasLeft,
|
|
3845
|
+
$hasRight = _ref11.$hasRight;
|
|
3846
|
+
var paddingHorizontal = theme.kitt.spacing * 2;
|
|
3847
|
+
return css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
|
|
3848
|
+
});
|
|
3849
|
+
function Header(_ref12) {
|
|
3850
|
+
var _ref12$hasSeparator = _ref12.hasSeparator,
|
|
3851
|
+
hasSeparator = _ref12$hasSeparator === void 0 ? true : _ref12$hasSeparator,
|
|
3852
|
+
isTransparent = _ref12.isTransparent,
|
|
3853
|
+
title = _ref12.title,
|
|
3854
|
+
children = _ref12.children,
|
|
3855
|
+
right = _ref12.right,
|
|
3856
|
+
left = _ref12.left,
|
|
3857
|
+
style = _ref12.style;
|
|
3858
|
+
var sharedProps = {
|
|
3859
|
+
$hasLeft: Boolean(left),
|
|
3860
|
+
$hasRight: Boolean(right)
|
|
3861
|
+
};
|
|
3862
|
+
return /*#__PURE__*/jsx(HeaderContainer, {
|
|
3863
|
+
$isTransparent: isTransparent,
|
|
3864
|
+
$hasSeparator: hasSeparator,
|
|
3865
|
+
$hasLeft: Boolean(left),
|
|
3866
|
+
$hasRight: Boolean(right),
|
|
3867
|
+
style: style,
|
|
3868
|
+
children: /*#__PURE__*/jsxs(Row, _objectSpread(_objectSpread({
|
|
3869
|
+
$hasContent: Boolean(title || children)
|
|
3870
|
+
}, sharedProps), {}, {
|
|
3871
|
+
children: [left ? /*#__PURE__*/jsx(ButtonContainer, {
|
|
3872
|
+
children: left
|
|
3873
|
+
}) : null, title ? /*#__PURE__*/jsx(HeaderTitle, _objectSpread(_objectSpread({}, sharedProps), {}, {
|
|
3874
|
+
variant: "bold",
|
|
3875
|
+
children: title
|
|
3876
|
+
})) : null, children ? /*#__PURE__*/jsx(ChildrenComponent, _objectSpread(_objectSpread({}, sharedProps), {}, {
|
|
3877
|
+
children: children
|
|
3878
|
+
})) : null, right || left ? /*#__PURE__*/jsx(ButtonContainer, {
|
|
3879
|
+
children: right
|
|
3880
|
+
}) : null]
|
|
3881
|
+
}))
|
|
3882
|
+
});
|
|
3883
|
+
}
|
|
3884
|
+
|
|
3885
|
+
var NavigationModalContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
3886
|
+
displayName: "NavigationModalContainer"
|
|
3887
|
+
})(["position:relative;background-color:", ";flex:1;", ""], function (_ref) {
|
|
3888
|
+
var theme = _ref.theme,
|
|
3889
|
+
$backgroundColor = _ref.$backgroundColor;
|
|
3890
|
+
return $backgroundColor || theme.kitt.colors.uiBackgroundLight;
|
|
3891
|
+
}, function () {
|
|
3892
|
+
if (Platform.OS !== 'web') return undefined;
|
|
3893
|
+
return css(["min-height:100vh;"]);
|
|
3894
|
+
});
|
|
3895
|
+
|
|
3896
|
+
var ContainerWithoutHeader = /*#__PURE__*/styled(View$1).withConfig({
|
|
3897
|
+
displayName: "NavigationModal__ContainerWithoutHeader"
|
|
3898
|
+
})(["justify-content:space-between;flex:1;"]);
|
|
3899
|
+
function NavigationModal(_ref) {
|
|
3900
|
+
var body = _ref.body,
|
|
3901
|
+
header = _ref.header,
|
|
3902
|
+
footer = _ref.footer,
|
|
3903
|
+
backgroundColor = _ref.backgroundColor;
|
|
3904
|
+
return /*#__PURE__*/jsxs(NavigationModalContainer, {
|
|
3905
|
+
$backgroundColor: backgroundColor,
|
|
3906
|
+
children: [header ? /*#__PURE__*/jsx(View$1, {
|
|
3907
|
+
children: header
|
|
3908
|
+
}) : null, /*#__PURE__*/jsxs(ContainerWithoutHeader, {
|
|
3909
|
+
children: [/*#__PURE__*/jsx(ScrollView$1, {
|
|
3910
|
+
bounces: false,
|
|
3911
|
+
contentContainerStyle: {
|
|
3912
|
+
flexGrow: 1,
|
|
3913
|
+
position: 'relative'
|
|
3914
|
+
},
|
|
3915
|
+
children: body
|
|
3916
|
+
}), footer || null]
|
|
3917
|
+
})]
|
|
3918
|
+
});
|
|
3919
|
+
}
|
|
3920
|
+
NavigationModal.Header = Header;
|
|
3921
|
+
NavigationModal.Footer = Footer;
|
|
3922
|
+
NavigationModal.Body = Body;
|
|
3923
|
+
NavigationModal.Padding = ContentPadding;
|
|
3924
|
+
|
|
3617
3925
|
function Notification(_ref) {
|
|
3618
3926
|
var type = _ref.type,
|
|
3619
3927
|
children = _ref.children,
|
|
@@ -3878,7 +4186,7 @@ function Picker(_ref) {
|
|
|
3878
4186
|
color: item.props.value === value ? theme.picker.ios.selected.color : undefined
|
|
3879
4187
|
});
|
|
3880
4188
|
})
|
|
3881
|
-
}) : /*#__PURE__*/jsx(ScrollView, {
|
|
4189
|
+
}) : /*#__PURE__*/jsx(ScrollView$1, {
|
|
3882
4190
|
testID: testID,
|
|
3883
4191
|
children: React.Children.map(children, function (child) {
|
|
3884
4192
|
var item = child;
|
|
@@ -3966,7 +4274,7 @@ function SkeletonContent(_ref3) {
|
|
|
3966
4274
|
});
|
|
3967
4275
|
}
|
|
3968
4276
|
|
|
3969
|
-
var SkeletonContainer = /*#__PURE__*/styled(View).withConfig({
|
|
4277
|
+
var SkeletonContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
3970
4278
|
displayName: "Skeleton__SkeletonContainer"
|
|
3971
4279
|
})(["overflow:hidden;"]);
|
|
3972
4280
|
function Skeleton(_ref) {
|
|
@@ -4616,7 +4924,7 @@ var StyledTooltipContent = /*#__PURE__*/styled.View.withConfig({
|
|
|
4616
4924
|
|
|
4617
4925
|
function ArrowView(props) {
|
|
4618
4926
|
var theme = /*#__PURE__*/useTheme();
|
|
4619
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4927
|
+
return /*#__PURE__*/jsx(View$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
4620
4928
|
children: /*#__PURE__*/jsx(TooltipArrowIcon, {
|
|
4621
4929
|
color: theme.kitt.tooltip.backgroundColor
|
|
4622
4930
|
})
|
|
@@ -4722,16 +5030,16 @@ function Tooltip(_ref) {
|
|
|
4722
5030
|
});
|
|
4723
5031
|
}, [x, y, reference, floating, update, refs, middlewareData, onUpdate]);
|
|
4724
5032
|
return /*#__PURE__*/jsxs(TooltipContainer, {
|
|
4725
|
-
children: [/*#__PURE__*/jsx(View, {
|
|
5033
|
+
children: [/*#__PURE__*/jsx(View$1, {
|
|
4726
5034
|
ref: reference,
|
|
4727
|
-
children: /*#__PURE__*/jsx(Pressable, {
|
|
5035
|
+
children: /*#__PURE__*/jsx(Pressable$1, {
|
|
4728
5036
|
accessibilityRole: "button",
|
|
4729
5037
|
onPress: function handlePress() {
|
|
4730
5038
|
pressed.value = !pressed.value;
|
|
4731
5039
|
},
|
|
4732
5040
|
children: children
|
|
4733
5041
|
})
|
|
4734
|
-
}), /*#__PURE__*/jsx(View, {
|
|
5042
|
+
}), /*#__PURE__*/jsx(View$1, {
|
|
4735
5043
|
ref: floating,
|
|
4736
5044
|
accessibilityElementsHidden: !pressed.value,
|
|
4737
5045
|
importantForAccessibility: pressed.value === true ? 'auto' : 'no-hide-descendants',
|
|
@@ -4955,5 +5263,5 @@ function MatchWindowSize(_ref) {
|
|
|
4955
5263
|
return children;
|
|
4956
5264
|
}
|
|
4957
5265
|
|
|
4958
|
-
export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalAppLink, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MatchWindowSize, Message, Modal, Notification, Overlay, PageLoader, Picker, Radio, DeprecatedSection as Section, Skeleton, SpinningIcon, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
5266
|
+
export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalAppLink, ExternalLink, Flex, FullScreenModal, HStack, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MatchWindowSize, Message, Modal, ModalBehaviour, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, Radio, ScrollView, DeprecatedSection as Section, Skeleton, SpinningIcon, Stack, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, View, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
4959
5267
|
//# sourceMappingURL=index-browser-all.es.js.map
|