@ornikar/kitt-universal 9.1.3 → 9.2.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/index.d.ts +2 -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/typography/Typography.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +47 -25
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +47 -25
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +47 -25
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +106 -84
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +31 -6
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +31 -6
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -2
|
@@ -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';
|
|
@@ -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,
|
|
@@ -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
|
|
|
@@ -1982,7 +1993,7 @@ function DatePickerAndroid(_ref) {
|
|
|
1982
1993
|
}
|
|
1983
1994
|
|
|
1984
1995
|
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
1985
|
-
var OverlayPressable = /*#__PURE__*/styled(Pressable).withConfig({
|
|
1996
|
+
var OverlayPressable = /*#__PURE__*/styled(Pressable$1).withConfig({
|
|
1986
1997
|
displayName: "Overlay__OverlayPressable"
|
|
1987
1998
|
})(function (_ref) {
|
|
1988
1999
|
var theme = _ref.theme;
|
|
@@ -2009,7 +2020,7 @@ var BodyView = /*#__PURE__*/styled.View.withConfig({
|
|
|
2009
2020
|
});
|
|
2010
2021
|
function ModalBody(_ref3) {
|
|
2011
2022
|
var children = _ref3.children;
|
|
2012
|
-
return /*#__PURE__*/jsx(ScrollView, {
|
|
2023
|
+
return /*#__PURE__*/jsx(ScrollView$1, {
|
|
2013
2024
|
children: /*#__PURE__*/jsx(BodyView, {
|
|
2014
2025
|
children: children
|
|
2015
2026
|
})
|
|
@@ -2783,7 +2794,7 @@ function InputIcon(_ref) {
|
|
|
2783
2794
|
function InputPressable(_ref) {
|
|
2784
2795
|
var props = _extends({}, _ref);
|
|
2785
2796
|
|
|
2786
|
-
return /*#__PURE__*/jsx(Pressable, _objectSpread({}, props));
|
|
2797
|
+
return /*#__PURE__*/jsx(Pressable$1, _objectSpread({}, props));
|
|
2787
2798
|
}
|
|
2788
2799
|
|
|
2789
2800
|
var _excluded$6 = ["isPasswordDefaultVisible", "right"];
|
|
@@ -2829,7 +2840,7 @@ var getTypographyColor = function (type) {
|
|
|
2829
2840
|
return type ? 'white' : 'black';
|
|
2830
2841
|
};
|
|
2831
2842
|
|
|
2832
|
-
var InputTagContainer = /*#__PURE__*/styled(View).withConfig({
|
|
2843
|
+
var InputTagContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2833
2844
|
displayName: "InputTag__InputTagContainer"
|
|
2834
2845
|
})(["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
2846
|
var theme = _ref.theme;
|
|
@@ -2851,7 +2862,7 @@ var InputTagContainer = /*#__PURE__*/styled(View).withConfig({
|
|
|
2851
2862
|
var theme = _ref3.theme;
|
|
2852
2863
|
return theme.kitt.forms.inputTag.borderRadius;
|
|
2853
2864
|
});
|
|
2854
|
-
var IconContainer = /*#__PURE__*/styled(View).withConfig({
|
|
2865
|
+
var IconContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2855
2866
|
displayName: "InputTag__IconContainer"
|
|
2856
2867
|
})(["margin-right:", "px;"], function (_ref4) {
|
|
2857
2868
|
var theme = _ref4.theme;
|
|
@@ -3291,7 +3302,7 @@ function ListItem(_ref5) {
|
|
|
3291
3302
|
onPress = _ref5.onPress,
|
|
3292
3303
|
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
3293
3304
|
|
|
3294
|
-
var Wrapper = onPress ? Pressable : Fragment$1;
|
|
3305
|
+
var Wrapper = onPress ? Pressable$1 : Fragment$1;
|
|
3295
3306
|
var wrapperProps = onPress ? _objectSpread({
|
|
3296
3307
|
accessibilityRole: 'button',
|
|
3297
3308
|
onPress: onPress
|
|
@@ -3490,7 +3501,7 @@ var createKittSpaces = function (spacing) {
|
|
|
3490
3501
|
|
|
3491
3502
|
var createKittNativeBaseCustomTheme = function (theme) {
|
|
3492
3503
|
var spaces = createKittSpaces(theme.spacing);
|
|
3493
|
-
|
|
3504
|
+
var extendedTheme = extendTheme({
|
|
3494
3505
|
colors: {
|
|
3495
3506
|
kitt: _objectSpread(_objectSpread({}, theme.colors), {}, {
|
|
3496
3507
|
typography: theme.typography.colors
|
|
@@ -3598,6 +3609,9 @@ var createKittNativeBaseCustomTheme = function (theme) {
|
|
|
3598
3609
|
}
|
|
3599
3610
|
}
|
|
3600
3611
|
});
|
|
3612
|
+
return _objectSpread(_objectSpread({}, extendedTheme), {}, {
|
|
3613
|
+
space: extendedTheme.space
|
|
3614
|
+
});
|
|
3601
3615
|
};
|
|
3602
3616
|
function KittNativeBaseProvider(_ref) {
|
|
3603
3617
|
var theme = _ref.theme,
|
|
@@ -3614,6 +3628,14 @@ function KittNativeBaseProvider(_ref) {
|
|
|
3614
3628
|
});
|
|
3615
3629
|
}
|
|
3616
3630
|
|
|
3631
|
+
var Stack = Stack$1;
|
|
3632
|
+
var VStack = VStack$1;
|
|
3633
|
+
var HStack = HStack$1;
|
|
3634
|
+
|
|
3635
|
+
var View = View$2;
|
|
3636
|
+
var ScrollView = ScrollView$2;
|
|
3637
|
+
var Pressable = Pressable$2;
|
|
3638
|
+
|
|
3617
3639
|
function Notification(_ref) {
|
|
3618
3640
|
var type = _ref.type,
|
|
3619
3641
|
children = _ref.children,
|
|
@@ -3878,7 +3900,7 @@ function Picker(_ref) {
|
|
|
3878
3900
|
color: item.props.value === value ? theme.picker.ios.selected.color : undefined
|
|
3879
3901
|
});
|
|
3880
3902
|
})
|
|
3881
|
-
}) : /*#__PURE__*/jsx(ScrollView, {
|
|
3903
|
+
}) : /*#__PURE__*/jsx(ScrollView$1, {
|
|
3882
3904
|
testID: testID,
|
|
3883
3905
|
children: React.Children.map(children, function (child) {
|
|
3884
3906
|
var item = child;
|
|
@@ -3966,7 +3988,7 @@ function SkeletonContent(_ref3) {
|
|
|
3966
3988
|
});
|
|
3967
3989
|
}
|
|
3968
3990
|
|
|
3969
|
-
var SkeletonContainer = /*#__PURE__*/styled(View).withConfig({
|
|
3991
|
+
var SkeletonContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
3970
3992
|
displayName: "Skeleton__SkeletonContainer"
|
|
3971
3993
|
})(["overflow:hidden;"]);
|
|
3972
3994
|
function Skeleton(_ref) {
|
|
@@ -4616,7 +4638,7 @@ var StyledTooltipContent = /*#__PURE__*/styled.View.withConfig({
|
|
|
4616
4638
|
|
|
4617
4639
|
function ArrowView(props) {
|
|
4618
4640
|
var theme = /*#__PURE__*/useTheme();
|
|
4619
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4641
|
+
return /*#__PURE__*/jsx(View$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
4620
4642
|
children: /*#__PURE__*/jsx(TooltipArrowIcon, {
|
|
4621
4643
|
color: theme.kitt.tooltip.backgroundColor
|
|
4622
4644
|
})
|
|
@@ -4722,16 +4744,16 @@ function Tooltip(_ref) {
|
|
|
4722
4744
|
});
|
|
4723
4745
|
}, [x, y, reference, floating, update, refs, middlewareData, onUpdate]);
|
|
4724
4746
|
return /*#__PURE__*/jsxs(TooltipContainer, {
|
|
4725
|
-
children: [/*#__PURE__*/jsx(View, {
|
|
4747
|
+
children: [/*#__PURE__*/jsx(View$1, {
|
|
4726
4748
|
ref: reference,
|
|
4727
|
-
children: /*#__PURE__*/jsx(Pressable, {
|
|
4749
|
+
children: /*#__PURE__*/jsx(Pressable$1, {
|
|
4728
4750
|
accessibilityRole: "button",
|
|
4729
4751
|
onPress: function handlePress() {
|
|
4730
4752
|
pressed.value = !pressed.value;
|
|
4731
4753
|
},
|
|
4732
4754
|
children: children
|
|
4733
4755
|
})
|
|
4734
|
-
}), /*#__PURE__*/jsx(View, {
|
|
4756
|
+
}), /*#__PURE__*/jsx(View$1, {
|
|
4735
4757
|
ref: floating,
|
|
4736
4758
|
accessibilityElementsHidden: !pressed.value,
|
|
4737
4759
|
importantForAccessibility: pressed.value === true ? 'auto' : 'no-hide-descendants',
|
|
@@ -4955,5 +4977,5 @@ function MatchWindowSize(_ref) {
|
|
|
4955
4977
|
return children;
|
|
4956
4978
|
}
|
|
4957
4979
|
|
|
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 };
|
|
4980
|
+
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, 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
4981
|
//# sourceMappingURL=index-browser-all.es.js.map
|