@ornikar/kitt-universal 9.12.2 → 9.14.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/Tag/Tag.d.ts +1 -1
- package/dist/definitions/Tag/Tag.d.ts.map +1 -1
- 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 -0
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +2 -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/definitions/themes/late-ocean/tag.d.ts +1 -0
- package/dist/definitions/themes/late-ocean/tag.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/typography.d.ts +1 -0
- package/dist/definitions/themes/late-ocean/typography.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +1 -1
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +125 -7
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +125 -7
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +125 -7
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +65 -5
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +113 -4
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +64 -3
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +26 -3
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +26 -3
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +26 -3
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +26 -3
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +26 -3
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +26 -3
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +8 -2
|
@@ -9,12 +9,13 @@ const Animated = require('react-native-reanimated');
|
|
|
9
9
|
const styled = require('styled-components/native');
|
|
10
10
|
const jsxRuntime = require('react/jsx-runtime');
|
|
11
11
|
const kittIcons = require('@ornikar/kitt-icons');
|
|
12
|
+
const bottomSheet$1 = require('@gorhom/bottom-sheet');
|
|
13
|
+
const reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
12
14
|
const twemojiParser = require('twemoji-parser');
|
|
13
15
|
const WebBrowser = require('expo-web-browser');
|
|
14
16
|
const DateTimePicker = require('@react-native-community/datetimepicker');
|
|
15
17
|
const reactIntl = require('react-intl');
|
|
16
18
|
const react = require('@linaria/react');
|
|
17
|
-
const reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
18
19
|
const Svg = require('react-native-svg');
|
|
19
20
|
const picker$1 = require('@react-native-picker/picker');
|
|
20
21
|
const expoLinearGradient = require('expo-linear-gradient');
|
|
@@ -1005,6 +1006,83 @@ function Avatar({
|
|
|
1005
1006
|
});
|
|
1006
1007
|
}
|
|
1007
1008
|
|
|
1009
|
+
const BottomSheetContainerView = /*#__PURE__*/styled__default(reactNative.View).withConfig({
|
|
1010
|
+
displayName: "BottomSheet__BottomSheetContainerView",
|
|
1011
|
+
componentId: "kitt-universal__sc-12w4qg8-0"
|
|
1012
|
+
})(["padding:", ";"], ({
|
|
1013
|
+
theme
|
|
1014
|
+
}) => `${theme.kitt.bottomSheet.container.padding}px`);
|
|
1015
|
+
|
|
1016
|
+
function BottomSheetComp({
|
|
1017
|
+
children: Content,
|
|
1018
|
+
hasScrollView = false,
|
|
1019
|
+
hasBackdrop = true,
|
|
1020
|
+
hasHandle = true
|
|
1021
|
+
}, ref) {
|
|
1022
|
+
const Wrapper = React.useMemo(() => hasScrollView ? bottomSheet$1.BottomSheetScrollView : bottomSheet$1.BottomSheetView, [hasScrollView]);
|
|
1023
|
+
const theme = /*#__PURE__*/styled.useTheme();
|
|
1024
|
+
const initialSnapPoints = React.useMemo(() => ['CONTENT_HEIGHT'], []);
|
|
1025
|
+
const {
|
|
1026
|
+
animatedHandleHeight,
|
|
1027
|
+
animatedSnapPoints,
|
|
1028
|
+
animatedContentHeight,
|
|
1029
|
+
handleContentLayout
|
|
1030
|
+
} = bottomSheet$1.useBottomSheetDynamicSnapPoints(initialSnapPoints);
|
|
1031
|
+
return /*#__PURE__*/jsxRuntime.jsx(bottomSheet$1.BottomSheetModal, {
|
|
1032
|
+
ref: ref,
|
|
1033
|
+
enablePanDownToClose: true,
|
|
1034
|
+
snapPoints: animatedSnapPoints,
|
|
1035
|
+
index: 0,
|
|
1036
|
+
handleHeight: animatedHandleHeight,
|
|
1037
|
+
handleIndicatorStyle: {
|
|
1038
|
+
width: 40,
|
|
1039
|
+
height: 4,
|
|
1040
|
+
borderRadius: 4,
|
|
1041
|
+
backgroundColor: theme.kitt.bottomSheet.handle.backgroundColor
|
|
1042
|
+
},
|
|
1043
|
+
handleComponent: props => hasHandle ? /*#__PURE__*/jsxRuntime.jsx(bottomSheet$1.BottomSheetHandle, { ...props
|
|
1044
|
+
}) : null,
|
|
1045
|
+
backdropComponent: props => hasBackdrop ? /*#__PURE__*/jsxRuntime.jsx(bottomSheet$1.BottomSheetBackdrop, { ...props,
|
|
1046
|
+
opacity: 0.25,
|
|
1047
|
+
appearsOnIndex: 0,
|
|
1048
|
+
disappearsOnIndex: -1
|
|
1049
|
+
}) : null,
|
|
1050
|
+
contentHeight: animatedContentHeight,
|
|
1051
|
+
children: ({
|
|
1052
|
+
data
|
|
1053
|
+
}) => /*#__PURE__*/jsxRuntime.jsx(reactNativeSafeAreaContext.SafeAreaView, {
|
|
1054
|
+
edges: ['bottom'],
|
|
1055
|
+
onLayout: handleContentLayout,
|
|
1056
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Wrapper, {
|
|
1057
|
+
children: typeof Content === 'function' ? /*#__PURE__*/jsxRuntime.jsx(Content, { ...data
|
|
1058
|
+
}) : Content
|
|
1059
|
+
})
|
|
1060
|
+
})
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
const BottomSheet = /*#__PURE__*/React.forwardRef(BottomSheetComp);
|
|
1065
|
+
BottomSheet.View = BottomSheetContainerView;
|
|
1066
|
+
|
|
1067
|
+
function useBottomSheet() {
|
|
1068
|
+
const ref = React.useRef(null);
|
|
1069
|
+
return ref;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
function useStaticBottomSheet(Content) {
|
|
1073
|
+
const bottomSheetRef = React.useRef(null);
|
|
1074
|
+
const BottomSheetMemoized = React.useMemo(() => function (props) {
|
|
1075
|
+
return /*#__PURE__*/jsxRuntime.jsx(BottomSheet, { ...props,
|
|
1076
|
+
ref: bottomSheetRef,
|
|
1077
|
+
children: Content
|
|
1078
|
+
});
|
|
1079
|
+
}, [Content]);
|
|
1080
|
+
return {
|
|
1081
|
+
bottomSheetRef,
|
|
1082
|
+
BottomSheet: BottomSheetMemoized
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1008
1086
|
const Container$5 = /*#__PURE__*/styled__default.View.withConfig({
|
|
1009
1087
|
displayName: "Card__Container",
|
|
1010
1088
|
componentId: "kitt-universal__sc-1n9psug-0"
|
|
@@ -1977,6 +2055,17 @@ const avatar = {
|
|
|
1977
2055
|
}
|
|
1978
2056
|
};
|
|
1979
2057
|
|
|
2058
|
+
const spacing = 4;
|
|
2059
|
+
|
|
2060
|
+
const bottomSheet = {
|
|
2061
|
+
container: {
|
|
2062
|
+
padding: spacing * 4
|
|
2063
|
+
},
|
|
2064
|
+
handle: {
|
|
2065
|
+
backgroundColor: lateOceanColorPalette.black200
|
|
2066
|
+
}
|
|
2067
|
+
};
|
|
2068
|
+
|
|
1980
2069
|
const button = {
|
|
1981
2070
|
borderRadius: 30,
|
|
1982
2071
|
borderWidth: {
|
|
@@ -2223,7 +2312,8 @@ const typography = {
|
|
|
2223
2312
|
'primary-light': colors.primaryLight,
|
|
2224
2313
|
accent: colors.accent,
|
|
2225
2314
|
success: colors.success,
|
|
2226
|
-
danger: colors.danger
|
|
2315
|
+
danger: colors.danger,
|
|
2316
|
+
warning: colors.warning
|
|
2227
2317
|
},
|
|
2228
2318
|
types: {
|
|
2229
2319
|
headers: {
|
|
@@ -2402,8 +2492,6 @@ const fullScreenModal = {
|
|
|
2402
2492
|
}
|
|
2403
2493
|
};
|
|
2404
2494
|
|
|
2405
|
-
const spacing = 4;
|
|
2406
|
-
|
|
2407
2495
|
const highlight = {
|
|
2408
2496
|
borderRadius: {
|
|
2409
2497
|
base: spacing * 5
|
|
@@ -2569,6 +2657,18 @@ const tag = {
|
|
|
2569
2657
|
borderWidth: 1,
|
|
2570
2658
|
borderColor: colors.danger
|
|
2571
2659
|
}
|
|
2660
|
+
},
|
|
2661
|
+
warn: {
|
|
2662
|
+
fill: {
|
|
2663
|
+
backgroundColor: colors.warning,
|
|
2664
|
+
borderWidth: 0,
|
|
2665
|
+
borderColor: colors.transparent
|
|
2666
|
+
},
|
|
2667
|
+
outline: {
|
|
2668
|
+
backgroundColor: colors.transparent,
|
|
2669
|
+
borderWidth: 1,
|
|
2670
|
+
borderColor: colors.warning
|
|
2671
|
+
}
|
|
2572
2672
|
}
|
|
2573
2673
|
};
|
|
2574
2674
|
|
|
@@ -2613,6 +2713,7 @@ const theme = {
|
|
|
2613
2713
|
avatar,
|
|
2614
2714
|
breakpoints,
|
|
2615
2715
|
button,
|
|
2716
|
+
bottomSheet,
|
|
2616
2717
|
card,
|
|
2617
2718
|
choices,
|
|
2618
2719
|
dialogModal,
|
|
@@ -5747,6 +5848,11 @@ const getLabelColor = (type, variant) => {
|
|
|
5747
5848
|
return variant === 'outline' ? 'danger' : 'black';
|
|
5748
5849
|
}
|
|
5749
5850
|
|
|
5851
|
+
case 'warn':
|
|
5852
|
+
{
|
|
5853
|
+
return variant === 'outline' ? 'warning' : 'black';
|
|
5854
|
+
}
|
|
5855
|
+
|
|
5750
5856
|
case 'primary':
|
|
5751
5857
|
{
|
|
5752
5858
|
return 'primary';
|
|
@@ -6276,6 +6382,7 @@ function MatchWindowSize({
|
|
|
6276
6382
|
exports.useWindowSize = reactNative.useWindowDimensions;
|
|
6277
6383
|
exports.Actions = Actions;
|
|
6278
6384
|
exports.Avatar = Avatar;
|
|
6385
|
+
exports.BottomSheet = BottomSheet;
|
|
6279
6386
|
exports.Button = Button;
|
|
6280
6387
|
exports.Card = Card;
|
|
6281
6388
|
exports.Checkbox = Checkbox;
|
|
@@ -6348,8 +6455,10 @@ exports.hex2rgba = hex2rgba;
|
|
|
6348
6455
|
exports.matchWindowSize = matchWindowSize;
|
|
6349
6456
|
exports.styledTextInputMixin = styledTextInputMixin;
|
|
6350
6457
|
exports.theme = theme;
|
|
6458
|
+
exports.useBottomSheet = useBottomSheet;
|
|
6351
6459
|
exports.useKittTheme = useKittTheme;
|
|
6352
6460
|
exports.useMatchWindowSize = useMatchWindowSize;
|
|
6461
|
+
exports.useStaticBottomSheet = useStaticBottomSheet;
|
|
6353
6462
|
exports.useStoryBlockColor = useStoryBlockColor;
|
|
6354
6463
|
exports.withTheme = withTheme;
|
|
6355
6464
|
Object.keys(kittIcons).forEach(function (k) {
|