@ornikar/kitt-universal 9.12.2 → 9.13.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/BottomSheet/BottomSheet.d.ts +16 -0
- package/dist/definitions/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/dist/definitions/BottomSheet/BottomSheet.web.d.ts +7 -0
- package/dist/definitions/BottomSheet/BottomSheet.web.d.ts.map +1 -0
- package/dist/definitions/BottomSheet/useBottomSheet.d.ts +4 -0
- package/dist/definitions/BottomSheet/useBottomSheet.d.ts.map +1 -0
- package/dist/definitions/BottomSheet/useStaticBottomSheet.d.ts +15 -0
- package/dist/definitions/BottomSheet/useStaticBottomSheet.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/themes/default.d.ts +1 -0
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/bottomSheet.d.ts +10 -0
- package/dist/definitions/themes/late-ocean/bottomSheet.d.ts.map +1 -0
- package/dist/index-browser-all.es.android.js +106 -6
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +106 -6
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +106 -6
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +46 -4
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +94 -3
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +45 -2
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +12 -2
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +12 -2
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +12 -2
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +12 -2
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +12 -2
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +12 -2
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +8 -2
|
@@ -2,8 +2,8 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import { Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, Text as Text$1, View as View$1, ScrollView as ScrollView$1, Pressable as Pressable$1, Image as Image$1, Input, NativeBaseProvider, extendTheme } from 'native-base';
|
|
4
4
|
import _extends from '@babel/runtime/helpers/extends';
|
|
5
|
-
import React, { forwardRef, useContext, createContext, cloneElement, useRef, useEffect, useState,
|
|
6
|
-
import { Platform, Animated as Animated$1, Easing, useWindowDimensions, Image,
|
|
5
|
+
import React, { forwardRef, useContext, createContext, cloneElement, useRef, useEffect, useState, useMemo, Children, Fragment as Fragment$1 } from 'react';
|
|
6
|
+
import { Platform, Animated as Animated$1, Easing, useWindowDimensions, Image, View as View$2, StyleSheet, ScrollView as ScrollView$2, Pressable as Pressable$2, Modal as Modal$1, Linking, Text as Text$2 } from 'react-native';
|
|
7
7
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
8
8
|
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, useDerivedValue, withTiming, Easing as Easing$1, runOnJS, useAnimatedProps, withDelay, withRepeat, interpolate } from 'react-native-reanimated';
|
|
9
9
|
import styled, { useTheme, css, ThemeProvider } from 'styled-components/native';
|
|
@@ -13,12 +13,13 @@ import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
|
13
13
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
14
14
|
import { ArcIcon, UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
15
15
|
export * from '@ornikar/kitt-icons';
|
|
16
|
+
import { BottomSheetScrollView, BottomSheetView, useBottomSheetDynamicSnapPoints, BottomSheetModal, BottomSheetHandle, BottomSheetBackdrop } from '@gorhom/bottom-sheet';
|
|
17
|
+
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
16
18
|
import { parse } from 'twemoji-parser';
|
|
17
19
|
import { openBrowserAsync } from 'expo-web-browser';
|
|
18
20
|
import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/datetimepicker';
|
|
19
21
|
import { FormattedMessage } from 'react-intl';
|
|
20
22
|
import { styled as styled$1 } from '@linaria/react';
|
|
21
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
22
23
|
import Svg, { Circle as Circle$1 } from 'react-native-svg';
|
|
23
24
|
import { Picker as Picker$1 } from '@react-native-picker/picker';
|
|
24
25
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
@@ -1045,6 +1046,95 @@ function Avatar(_ref6) {
|
|
|
1045
1046
|
});
|
|
1046
1047
|
}
|
|
1047
1048
|
|
|
1049
|
+
var BottomSheetContainerView = /*#__PURE__*/styled(View$2).withConfig({
|
|
1050
|
+
displayName: "BottomSheet__BottomSheetContainerView"
|
|
1051
|
+
})(["padding:", ";"], function (_ref) {
|
|
1052
|
+
var theme = _ref.theme;
|
|
1053
|
+
return "".concat(theme.kitt.bottomSheet.container.padding, "px");
|
|
1054
|
+
});
|
|
1055
|
+
|
|
1056
|
+
function BottomSheetComp(_ref2, ref) {
|
|
1057
|
+
var Content = _ref2.children,
|
|
1058
|
+
_ref2$hasScrollView = _ref2.hasScrollView,
|
|
1059
|
+
hasScrollView = _ref2$hasScrollView === void 0 ? false : _ref2$hasScrollView,
|
|
1060
|
+
_ref2$hasBackdrop = _ref2.hasBackdrop,
|
|
1061
|
+
hasBackdrop = _ref2$hasBackdrop === void 0 ? true : _ref2$hasBackdrop,
|
|
1062
|
+
_ref2$hasHandle = _ref2.hasHandle,
|
|
1063
|
+
hasHandle = _ref2$hasHandle === void 0 ? true : _ref2$hasHandle;
|
|
1064
|
+
var Wrapper = useMemo(function () {
|
|
1065
|
+
return hasScrollView ? BottomSheetScrollView : BottomSheetView;
|
|
1066
|
+
}, [hasScrollView]);
|
|
1067
|
+
var theme = /*#__PURE__*/useTheme();
|
|
1068
|
+
var initialSnapPoints = useMemo(function () {
|
|
1069
|
+
return ['CONTENT_HEIGHT'];
|
|
1070
|
+
}, []);
|
|
1071
|
+
|
|
1072
|
+
var _useBottomSheetDynami = useBottomSheetDynamicSnapPoints(initialSnapPoints),
|
|
1073
|
+
animatedHandleHeight = _useBottomSheetDynami.animatedHandleHeight,
|
|
1074
|
+
animatedSnapPoints = _useBottomSheetDynami.animatedSnapPoints,
|
|
1075
|
+
animatedContentHeight = _useBottomSheetDynami.animatedContentHeight,
|
|
1076
|
+
handleContentLayout = _useBottomSheetDynami.handleContentLayout;
|
|
1077
|
+
|
|
1078
|
+
return /*#__PURE__*/jsx(BottomSheetModal, {
|
|
1079
|
+
ref: ref,
|
|
1080
|
+
enablePanDownToClose: true,
|
|
1081
|
+
snapPoints: animatedSnapPoints,
|
|
1082
|
+
index: 0,
|
|
1083
|
+
handleHeight: animatedHandleHeight,
|
|
1084
|
+
handleIndicatorStyle: {
|
|
1085
|
+
width: 40,
|
|
1086
|
+
height: 4,
|
|
1087
|
+
borderRadius: 4,
|
|
1088
|
+
backgroundColor: theme.kitt.bottomSheet.handle.backgroundColor
|
|
1089
|
+
},
|
|
1090
|
+
handleComponent: function handleComponent(props) {
|
|
1091
|
+
return hasHandle ? /*#__PURE__*/jsx(BottomSheetHandle, _objectSpread({}, props)) : null;
|
|
1092
|
+
},
|
|
1093
|
+
backdropComponent: function backdropComponent(props) {
|
|
1094
|
+
return hasBackdrop ? /*#__PURE__*/jsx(BottomSheetBackdrop, _objectSpread(_objectSpread({}, props), {}, {
|
|
1095
|
+
opacity: 0.25,
|
|
1096
|
+
appearsOnIndex: 0,
|
|
1097
|
+
disappearsOnIndex: -1
|
|
1098
|
+
})) : null;
|
|
1099
|
+
},
|
|
1100
|
+
contentHeight: animatedContentHeight,
|
|
1101
|
+
children: function children(_ref3) {
|
|
1102
|
+
var data = _ref3.data;
|
|
1103
|
+
return /*#__PURE__*/jsx(SafeAreaView, {
|
|
1104
|
+
edges: ['bottom'],
|
|
1105
|
+
onLayout: handleContentLayout,
|
|
1106
|
+
children: /*#__PURE__*/jsx(Wrapper, {
|
|
1107
|
+
children: typeof Content === 'function' ? /*#__PURE__*/jsx(Content, _objectSpread({}, data)) : Content
|
|
1108
|
+
})
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
var BottomSheet = /*#__PURE__*/forwardRef(BottomSheetComp);
|
|
1115
|
+
BottomSheet.View = BottomSheetContainerView;
|
|
1116
|
+
|
|
1117
|
+
function useBottomSheet() {
|
|
1118
|
+
var ref = useRef(null);
|
|
1119
|
+
return ref;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
function useStaticBottomSheet(Content) {
|
|
1123
|
+
var bottomSheetRef = useRef(null);
|
|
1124
|
+
var BottomSheetMemoized = useMemo(function () {
|
|
1125
|
+
return function (props) {
|
|
1126
|
+
return /*#__PURE__*/jsx(BottomSheet, _objectSpread(_objectSpread({}, props), {}, {
|
|
1127
|
+
ref: bottomSheetRef,
|
|
1128
|
+
children: Content
|
|
1129
|
+
}));
|
|
1130
|
+
};
|
|
1131
|
+
}, [Content]);
|
|
1132
|
+
return {
|
|
1133
|
+
bottomSheetRef: bottomSheetRef,
|
|
1134
|
+
BottomSheet: BottomSheetMemoized
|
|
1135
|
+
};
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1048
1138
|
var Container$5 = /*#__PURE__*/styled.View.withConfig({
|
|
1049
1139
|
displayName: "Card__Container"
|
|
1050
1140
|
})(["background-color:", ";padding:", "px;border-radius:", "px;border-width:", "px;border-color:", ";"], function (_ref) {
|
|
@@ -2082,6 +2172,17 @@ var avatar = {
|
|
|
2082
2172
|
}
|
|
2083
2173
|
};
|
|
2084
2174
|
|
|
2175
|
+
var spacing = 4;
|
|
2176
|
+
|
|
2177
|
+
var bottomSheet = {
|
|
2178
|
+
container: {
|
|
2179
|
+
padding: spacing * 4
|
|
2180
|
+
},
|
|
2181
|
+
handle: {
|
|
2182
|
+
backgroundColor: lateOceanColorPalette.black200
|
|
2183
|
+
}
|
|
2184
|
+
};
|
|
2185
|
+
|
|
2085
2186
|
var button = {
|
|
2086
2187
|
borderRadius: 30,
|
|
2087
2188
|
borderWidth: {
|
|
@@ -2511,8 +2612,6 @@ var fullScreenModal = {
|
|
|
2511
2612
|
}
|
|
2512
2613
|
};
|
|
2513
2614
|
|
|
2514
|
-
var spacing = 4;
|
|
2515
|
-
|
|
2516
2615
|
var highlight = {
|
|
2517
2616
|
borderRadius: {
|
|
2518
2617
|
base: spacing * 5
|
|
@@ -2722,6 +2821,7 @@ var theme = {
|
|
|
2722
2821
|
avatar: avatar,
|
|
2723
2822
|
breakpoints: breakpoints,
|
|
2724
2823
|
button: button,
|
|
2824
|
+
bottomSheet: bottomSheet,
|
|
2725
2825
|
card: card,
|
|
2726
2826
|
choices: choices,
|
|
2727
2827
|
dialogModal: dialogModal,
|
|
@@ -6511,5 +6611,5 @@ function MatchWindowSize(_ref) {
|
|
|
6511
6611
|
return children;
|
|
6512
6612
|
}
|
|
6513
6613
|
|
|
6514
|
-
export { Actions, Avatar, Button, Card, Checkbox, ChoicesElements, DatePicker, DialogModal, Emoji, ExternalAppLink, ExternalLink, Flex, FullScreenModal, HStack, Highlight, 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, createChoicesComponent, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
6614
|
+
export { Actions, Avatar, BottomSheet, Button, Card, Checkbox, ChoicesElements, DatePicker, DialogModal, Emoji, ExternalAppLink, ExternalLink, Flex, FullScreenModal, HStack, Highlight, 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, createChoicesComponent, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useBottomSheet, useKittTheme, useMatchWindowSize, useStaticBottomSheet, useStoryBlockColor, withTheme };
|
|
6515
6615
|
//# sourceMappingURL=index-browser-all.es.js.map
|