@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';
|
|
@@ -187,6 +187,18 @@ function Typography(_ref) {
|
|
|
187
187
|
base: baseOrDefaultToBody
|
|
188
188
|
}));
|
|
189
189
|
|
|
190
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
191
|
+
Object.entries(type).forEach(function (_ref2) {
|
|
192
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
193
|
+
key = _ref3[0],
|
|
194
|
+
value = _ref3[1];
|
|
195
|
+
|
|
196
|
+
if (value && isTypeHeader(value) !== isHeader) {
|
|
197
|
+
throw new Error("Invalid value for \"".concat(key, "\": \"").concat(value, "\" is ").concat(isHeader ? 'not' : '', " an header. Don't mix headers and bodies."));
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
|
|
190
202
|
var text = /*#__PURE__*/jsx(Text$1, _objectSpread({
|
|
191
203
|
accessibilityRole: accessibilityRole || undefined,
|
|
192
204
|
fontSize: fontSizeForNativeBase,
|
|
@@ -887,26 +899,25 @@ function ExternalAppLink(_ref) {
|
|
|
887
899
|
break;
|
|
888
900
|
}
|
|
889
901
|
|
|
890
|
-
Linking.openURL(href)["catch"](function (err) {
|
|
891
|
-
console.error("An error occurred while opening ".concat(href), err);
|
|
892
|
-
onOpenAppError === null || onOpenAppError === void 0 ? void 0 : onOpenAppError("An error occurred while opening ".concat(href));
|
|
893
|
-
});
|
|
894
|
-
|
|
895
902
|
if (!onPress) {
|
|
896
|
-
_context.next =
|
|
903
|
+
_context.next = 9;
|
|
897
904
|
break;
|
|
898
905
|
}
|
|
899
906
|
|
|
900
907
|
onPress(e);
|
|
901
908
|
|
|
902
909
|
if (!(e !== null && e !== void 0 && e.defaultPrevented)) {
|
|
903
|
-
_context.next =
|
|
910
|
+
_context.next = 9;
|
|
904
911
|
break;
|
|
905
912
|
}
|
|
906
913
|
|
|
907
914
|
return _context.abrupt("return");
|
|
908
915
|
|
|
909
|
-
case
|
|
916
|
+
case 9:
|
|
917
|
+
Linking.openURL(href)["catch"](function (err) {
|
|
918
|
+
console.error("An error occurred while opening ".concat(href), err);
|
|
919
|
+
onOpenAppError === null || onOpenAppError === void 0 ? void 0 : onOpenAppError("An error occurred while opening ".concat(href));
|
|
920
|
+
});
|
|
910
921
|
_context.next = 13;
|
|
911
922
|
break;
|
|
912
923
|
|
|
@@ -1981,7 +1992,7 @@ function DatePickerAndroid(_ref) {
|
|
|
1981
1992
|
}
|
|
1982
1993
|
|
|
1983
1994
|
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
1984
|
-
var OverlayPressable = /*#__PURE__*/styled(Pressable).withConfig({
|
|
1995
|
+
var OverlayPressable = /*#__PURE__*/styled(Pressable$1).withConfig({
|
|
1985
1996
|
displayName: "Overlay__OverlayPressable"
|
|
1986
1997
|
})(function (_ref) {
|
|
1987
1998
|
var theme = _ref.theme;
|
|
@@ -2008,7 +2019,7 @@ var BodyView = /*#__PURE__*/styled.View.withConfig({
|
|
|
2008
2019
|
});
|
|
2009
2020
|
function ModalBody(_ref3) {
|
|
2010
2021
|
var children = _ref3.children;
|
|
2011
|
-
return /*#__PURE__*/jsx(ScrollView, {
|
|
2022
|
+
return /*#__PURE__*/jsx(ScrollView$1, {
|
|
2012
2023
|
children: /*#__PURE__*/jsx(BodyView, {
|
|
2013
2024
|
children: children
|
|
2014
2025
|
})
|
|
@@ -2730,7 +2741,7 @@ function InputIcon(_ref) {
|
|
|
2730
2741
|
function InputPressable(_ref) {
|
|
2731
2742
|
var props = _extends({}, _ref);
|
|
2732
2743
|
|
|
2733
|
-
return /*#__PURE__*/jsx(Pressable, _objectSpread({}, props));
|
|
2744
|
+
return /*#__PURE__*/jsx(Pressable$1, _objectSpread({}, props));
|
|
2734
2745
|
}
|
|
2735
2746
|
|
|
2736
2747
|
var _excluded$6 = ["isPasswordDefaultVisible", "right"];
|
|
@@ -2776,7 +2787,7 @@ var getTypographyColor = function (type) {
|
|
|
2776
2787
|
return type ? 'white' : 'black';
|
|
2777
2788
|
};
|
|
2778
2789
|
|
|
2779
|
-
var InputTagContainer = /*#__PURE__*/styled(View).withConfig({
|
|
2790
|
+
var InputTagContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2780
2791
|
displayName: "InputTag__InputTagContainer"
|
|
2781
2792
|
})(["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) {
|
|
2782
2793
|
var theme = _ref.theme;
|
|
@@ -2798,7 +2809,7 @@ var InputTagContainer = /*#__PURE__*/styled(View).withConfig({
|
|
|
2798
2809
|
var theme = _ref3.theme;
|
|
2799
2810
|
return theme.kitt.forms.inputTag.borderRadius;
|
|
2800
2811
|
});
|
|
2801
|
-
var IconContainer = /*#__PURE__*/styled(View).withConfig({
|
|
2812
|
+
var IconContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2802
2813
|
displayName: "InputTag__IconContainer"
|
|
2803
2814
|
})(["margin-right:", "px;"], function (_ref4) {
|
|
2804
2815
|
var theme = _ref4.theme;
|
|
@@ -3238,7 +3249,7 @@ function ListItem(_ref5) {
|
|
|
3238
3249
|
onPress = _ref5.onPress,
|
|
3239
3250
|
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
3240
3251
|
|
|
3241
|
-
var Wrapper = onPress ? Pressable : Fragment$1;
|
|
3252
|
+
var Wrapper = onPress ? Pressable$1 : Fragment$1;
|
|
3242
3253
|
var wrapperProps = onPress ? _objectSpread({
|
|
3243
3254
|
accessibilityRole: 'button',
|
|
3244
3255
|
onPress: onPress
|
|
@@ -3437,7 +3448,7 @@ var createKittSpaces = function (spacing) {
|
|
|
3437
3448
|
|
|
3438
3449
|
var createKittNativeBaseCustomTheme = function (theme) {
|
|
3439
3450
|
var spaces = createKittSpaces(theme.spacing);
|
|
3440
|
-
|
|
3451
|
+
var extendedTheme = extendTheme({
|
|
3441
3452
|
colors: {
|
|
3442
3453
|
kitt: _objectSpread(_objectSpread({}, theme.colors), {}, {
|
|
3443
3454
|
typography: theme.typography.colors
|
|
@@ -3545,6 +3556,9 @@ var createKittNativeBaseCustomTheme = function (theme) {
|
|
|
3545
3556
|
}
|
|
3546
3557
|
}
|
|
3547
3558
|
});
|
|
3559
|
+
return _objectSpread(_objectSpread({}, extendedTheme), {}, {
|
|
3560
|
+
space: extendedTheme.space
|
|
3561
|
+
});
|
|
3548
3562
|
};
|
|
3549
3563
|
function KittNativeBaseProvider(_ref) {
|
|
3550
3564
|
var theme = _ref.theme,
|
|
@@ -3561,6 +3575,14 @@ function KittNativeBaseProvider(_ref) {
|
|
|
3561
3575
|
});
|
|
3562
3576
|
}
|
|
3563
3577
|
|
|
3578
|
+
var Stack = Stack$1;
|
|
3579
|
+
var VStack = VStack$1;
|
|
3580
|
+
var HStack = HStack$1;
|
|
3581
|
+
|
|
3582
|
+
var View = View$2;
|
|
3583
|
+
var ScrollView = ScrollView$2;
|
|
3584
|
+
var Pressable = Pressable$2;
|
|
3585
|
+
|
|
3564
3586
|
function Notification(_ref) {
|
|
3565
3587
|
var type = _ref.type,
|
|
3566
3588
|
children = _ref.children,
|
|
@@ -3825,7 +3847,7 @@ function Picker(_ref) {
|
|
|
3825
3847
|
color: item.props.value === value ? theme.picker.ios.selected.color : undefined
|
|
3826
3848
|
});
|
|
3827
3849
|
})
|
|
3828
|
-
}) : /*#__PURE__*/jsx(ScrollView, {
|
|
3850
|
+
}) : /*#__PURE__*/jsx(ScrollView$1, {
|
|
3829
3851
|
testID: testID,
|
|
3830
3852
|
children: React.Children.map(children, function (child) {
|
|
3831
3853
|
var item = child;
|
|
@@ -3913,7 +3935,7 @@ function SkeletonContent(_ref3) {
|
|
|
3913
3935
|
});
|
|
3914
3936
|
}
|
|
3915
3937
|
|
|
3916
|
-
var SkeletonContainer = /*#__PURE__*/styled(View).withConfig({
|
|
3938
|
+
var SkeletonContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
3917
3939
|
displayName: "Skeleton__SkeletonContainer"
|
|
3918
3940
|
})(["overflow:hidden;"]);
|
|
3919
3941
|
function Skeleton(_ref) {
|
|
@@ -4563,7 +4585,7 @@ var StyledTooltipContent = /*#__PURE__*/styled.View.withConfig({
|
|
|
4563
4585
|
|
|
4564
4586
|
function ArrowView(props) {
|
|
4565
4587
|
var theme = /*#__PURE__*/useTheme();
|
|
4566
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4588
|
+
return /*#__PURE__*/jsx(View$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
4567
4589
|
children: /*#__PURE__*/jsx(TooltipArrowIcon, {
|
|
4568
4590
|
color: theme.kitt.tooltip.backgroundColor
|
|
4569
4591
|
})
|
|
@@ -4669,16 +4691,16 @@ function Tooltip(_ref) {
|
|
|
4669
4691
|
});
|
|
4670
4692
|
}, [x, y, reference, floating, update, refs, middlewareData, onUpdate]);
|
|
4671
4693
|
return /*#__PURE__*/jsxs(TooltipContainer, {
|
|
4672
|
-
children: [/*#__PURE__*/jsx(View, {
|
|
4694
|
+
children: [/*#__PURE__*/jsx(View$1, {
|
|
4673
4695
|
ref: reference,
|
|
4674
|
-
children: /*#__PURE__*/jsx(Pressable, {
|
|
4696
|
+
children: /*#__PURE__*/jsx(Pressable$1, {
|
|
4675
4697
|
accessibilityRole: "button",
|
|
4676
4698
|
onPress: function handlePress() {
|
|
4677
4699
|
pressed.value = !pressed.value;
|
|
4678
4700
|
},
|
|
4679
4701
|
children: children
|
|
4680
4702
|
})
|
|
4681
|
-
}), /*#__PURE__*/jsx(View, {
|
|
4703
|
+
}), /*#__PURE__*/jsx(View$1, {
|
|
4682
4704
|
ref: floating,
|
|
4683
4705
|
accessibilityElementsHidden: !pressed.value,
|
|
4684
4706
|
importantForAccessibility: pressed.value === true ? 'auto' : 'no-hide-descendants',
|
|
@@ -4911,5 +4933,5 @@ function withTheme(WrappedComponent) {
|
|
|
4911
4933
|
});
|
|
4912
4934
|
}
|
|
4913
4935
|
|
|
4914
|
-
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 };
|
|
4936
|
+
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 };
|
|
4915
4937
|
//# sourceMappingURL=index-browser-all.es.ios.js.map
|