@ornikar/kitt-universal 32.3.1-canary.ddff29bdf3ffa500cf7658e5206d5069b23f4b45.0 → 32.4.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/CHANGELOG.md +3 -8
- package/dist/definitions/Button/AnimatedContainer.d.ts.map +1 -1
- package/dist/definitions/Button/AnimatedContainer.web.d.ts.map +1 -1
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts +2 -1
- package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts.map +1 -1
- package/dist/definitions/Choices/AnimatedChoiceItemView.web.d.ts +1 -1
- package/dist/definitions/Choices/AnimatedChoiceItemView.web.d.ts.map +1 -1
- package/dist/definitions/Choices/ChoiceItem.d.ts +2 -1
- package/dist/definitions/Choices/ChoiceItem.d.ts.map +1 -1
- package/dist/definitions/Choices/ChoiceItemContainer.d.ts +2 -1
- package/dist/definitions/Choices/ChoiceItemContainer.d.ts.map +1 -1
- package/dist/definitions/Choices/Choices.d.ts +5 -5
- package/dist/definitions/Choices/Choices.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +3 -9
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +0 -5
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/button.d.ts +0 -3
- package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/typography.d.ts +0 -5
- 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-metro.es.android.js +49 -41
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +49 -41
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +50 -39
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +49 -39
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +51 -40
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +50 -40
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +52 -41
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +51 -41
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +10 -19
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +10 -19
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +10 -19
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +10 -19
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +10 -19
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +10 -19
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +10 -19
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +10 -19
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -8,7 +8,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
8
8
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
9
9
|
import _extends from '@babel/runtime/helpers/extends';
|
|
10
10
|
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate, ReducedMotionConfig, ReduceMotion } from 'react-native-reanimated';
|
|
11
|
-
import { Platform, Animated as Animated$1, Easing, StyleSheet, Modal,
|
|
11
|
+
import { Platform, Animated as Animated$1, Easing, StyleSheet, Modal, Linking, Pressable as Pressable$2, Keyboard, Text as Text$1, useWindowDimensions, ScrollView as ScrollView$2, PixelRatio } from 'react-native';
|
|
12
12
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
13
13
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
14
14
|
import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
|
|
@@ -691,10 +691,6 @@ var button = {
|
|
|
691
691
|
"default": 40,
|
|
692
692
|
medium: 48
|
|
693
693
|
},
|
|
694
|
-
minHeight: {
|
|
695
|
-
"default": 40,
|
|
696
|
-
medium: 48
|
|
697
|
-
},
|
|
698
694
|
maxHeight: 48,
|
|
699
695
|
icon: {
|
|
700
696
|
medium: {
|
|
@@ -2148,8 +2144,8 @@ var typography = {
|
|
|
2148
2144
|
allowedFontWeights: ['semibold']
|
|
2149
2145
|
},
|
|
2150
2146
|
'heading-l': {
|
|
2151
|
-
fontSize:
|
|
2152
|
-
lineHeight:
|
|
2147
|
+
fontSize: 40,
|
|
2148
|
+
lineHeight: 48,
|
|
2153
2149
|
allowedFontWeights: ['semibold']
|
|
2154
2150
|
},
|
|
2155
2151
|
'heading-m': {
|
|
@@ -2158,19 +2154,14 @@ var typography = {
|
|
|
2158
2154
|
allowedFontWeights: ['semibold']
|
|
2159
2155
|
},
|
|
2160
2156
|
'heading-s': {
|
|
2161
|
-
fontSize:
|
|
2162
|
-
lineHeight:
|
|
2163
|
-
allowedFontWeights: ['
|
|
2157
|
+
fontSize: 18,
|
|
2158
|
+
lineHeight: 20,
|
|
2159
|
+
allowedFontWeights: ['regular', 'bold']
|
|
2164
2160
|
},
|
|
2165
2161
|
'heading-xs': {
|
|
2166
|
-
fontSize: 20,
|
|
2167
|
-
lineHeight: 24,
|
|
2168
|
-
allowedFontWeights: ['semibold']
|
|
2169
|
-
},
|
|
2170
|
-
'heading-xxs': {
|
|
2171
2162
|
fontSize: 16,
|
|
2172
|
-
lineHeight:
|
|
2173
|
-
allowedFontWeights: ['
|
|
2163
|
+
lineHeight: 18,
|
|
2164
|
+
allowedFontWeights: ['regular', 'bold']
|
|
2174
2165
|
}
|
|
2175
2166
|
}
|
|
2176
2167
|
},
|
|
@@ -2237,17 +2228,17 @@ var typography = {
|
|
|
2237
2228
|
configs: {
|
|
2238
2229
|
'label-large': {
|
|
2239
2230
|
fontSize: 16,
|
|
2240
|
-
lineHeight:
|
|
2231
|
+
lineHeight: 24,
|
|
2241
2232
|
allowedFontWeights: ['semibold']
|
|
2242
2233
|
},
|
|
2243
2234
|
'label-medium': {
|
|
2244
2235
|
fontSize: 14,
|
|
2245
|
-
lineHeight:
|
|
2236
|
+
lineHeight: 20,
|
|
2246
2237
|
allowedFontWeights: ['semibold']
|
|
2247
2238
|
},
|
|
2248
2239
|
'label-small': {
|
|
2249
2240
|
fontSize: 12,
|
|
2250
|
-
lineHeight:
|
|
2241
|
+
lineHeight: 16,
|
|
2251
2242
|
allowedFontWeights: ['semibold']
|
|
2252
2243
|
}
|
|
2253
2244
|
}
|
|
@@ -3159,8 +3150,7 @@ function AnimatedContainer$2(_ref) {
|
|
|
3159
3150
|
borderRadius: 'kitt.button.borderRadius',
|
|
3160
3151
|
backgroundColor: currentBackgroundColor,
|
|
3161
3152
|
width: width,
|
|
3162
|
-
height: height
|
|
3163
|
-
minHeight: size === 'default' ? 'kitt.button.minHeight.default' : 'kitt.button.minHeight.medium'
|
|
3153
|
+
height: height
|
|
3164
3154
|
});
|
|
3165
3155
|
return /*#__PURE__*/jsx(Animated.View, {
|
|
3166
3156
|
style: disabled ? [styles] : [styles, animatedStyles],
|
|
@@ -3880,7 +3870,6 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3880
3870
|
alignSelf: createResponsiveStyleFromProp(stretch, undefined, 'flex-start'),
|
|
3881
3871
|
minWidth: "kitt.button.minWidth",
|
|
3882
3872
|
maxWidth: createResponsiveStyleFromProp(stretch, '100%', 'kitt.button.maxWidth'),
|
|
3883
|
-
minHeight: size === 'default' ? 'kitt.button.minHeight.default' : 'kitt.button.minHeight.medium',
|
|
3884
3873
|
maxHeight: "kitt.button.maxHeight",
|
|
3885
3874
|
width: createResponsiveStyleFromProp(stretch, '100%', 'auto'),
|
|
3886
3875
|
onPress: onPress,
|
|
@@ -4868,6 +4857,8 @@ function AnimatedChoiceItemView(_ref) {
|
|
|
4868
4857
|
isDisabled = _ref.isDisabled,
|
|
4869
4858
|
isSelected = _ref.isSelected,
|
|
4870
4859
|
hasError = _ref.hasError,
|
|
4860
|
+
_ref$shouldExpand = _ref.shouldExpand,
|
|
4861
|
+
shouldExpand = _ref$shouldExpand === void 0 ? false : _ref$shouldExpand,
|
|
4871
4862
|
animatedStyles = _ref.animatedStyles;
|
|
4872
4863
|
var sx = useSx();
|
|
4873
4864
|
var style = sx({
|
|
@@ -4885,7 +4876,9 @@ function AnimatedChoiceItemView(_ref) {
|
|
|
4885
4876
|
isHovered: isHovered,
|
|
4886
4877
|
isPressed: isPressed
|
|
4887
4878
|
}),
|
|
4888
|
-
padding: size === 'small' ? 'kitt.2' : 'kitt.4'
|
|
4879
|
+
padding: size === 'small' ? 'kitt.2' : 'kitt.4',
|
|
4880
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4881
|
+
flexShrink: shouldExpand ? 1 : undefined
|
|
4889
4882
|
});
|
|
4890
4883
|
return /*#__PURE__*/jsx(Animated.View, {
|
|
4891
4884
|
style: [style, animatedStyles],
|
|
@@ -4948,6 +4941,8 @@ function ChoiceItem(_ref) {
|
|
|
4948
4941
|
value = _ref.value,
|
|
4949
4942
|
selected = _ref.selected,
|
|
4950
4943
|
disabled = _ref.disabled,
|
|
4944
|
+
_ref$shouldExpand = _ref.shouldExpand,
|
|
4945
|
+
shouldExpand = _ref$shouldExpand === void 0 ? false : _ref$shouldExpand,
|
|
4951
4946
|
_children = _ref.children,
|
|
4952
4947
|
isPressedInternal = _ref.isPressedInternal,
|
|
4953
4948
|
isHoveredInternal = _ref.isHoveredInternal,
|
|
@@ -4985,6 +4980,8 @@ function ChoiceItem(_ref) {
|
|
|
4985
4980
|
checked: selected
|
|
4986
4981
|
},
|
|
4987
4982
|
style: style,
|
|
4983
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4984
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4988
4985
|
onBlur: onBlur,
|
|
4989
4986
|
onFocus: onFocus,
|
|
4990
4987
|
onPress: function (e) {
|
|
@@ -5003,6 +5000,8 @@ function ChoiceItem(_ref) {
|
|
|
5003
5000
|
});
|
|
5004
5001
|
return /*#__PURE__*/jsxs(VStack, {
|
|
5005
5002
|
space: "kitt.2",
|
|
5003
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
5004
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
5006
5005
|
children: [/*#__PURE__*/jsxs(AnimatedChoiceItemView, {
|
|
5007
5006
|
animatedStyles: backgroundStyles,
|
|
5008
5007
|
isHovered: isHovered || isHoveredInternal,
|
|
@@ -5010,10 +5009,13 @@ function ChoiceItem(_ref) {
|
|
|
5010
5009
|
isSelected: selected,
|
|
5011
5010
|
isPressed: isPressed || isPressedInternal,
|
|
5012
5011
|
hasError: hasError,
|
|
5012
|
+
shouldExpand: shouldExpand,
|
|
5013
5013
|
size: size,
|
|
5014
5014
|
children: [/*#__PURE__*/jsxs(Stack, {
|
|
5015
5015
|
alignItems: "center",
|
|
5016
5016
|
space: "kitt.2",
|
|
5017
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
5018
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
5017
5019
|
children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
|
|
5018
5020
|
color: textColor,
|
|
5019
5021
|
icon: icon
|
|
@@ -5042,33 +5044,43 @@ function ChoiceItem(_ref) {
|
|
|
5042
5044
|
function ChoiceItemContainer(_ref) {
|
|
5043
5045
|
var children = _ref.children,
|
|
5044
5046
|
direction = _ref.direction,
|
|
5047
|
+
shouldExpand = _ref.shouldExpand,
|
|
5045
5048
|
isLast = _ref.isLast;
|
|
5046
5049
|
var currentItemMarginValue = isLast ? undefined : 'kitt.3';
|
|
5047
|
-
var
|
|
5050
|
+
var directionFlexProps = direction === 'row' ? {
|
|
5048
5051
|
flexGrow: 1,
|
|
5049
5052
|
flexShrink: 1,
|
|
5050
5053
|
flexBasis: 0
|
|
5051
5054
|
} : {};
|
|
5052
|
-
|
|
5055
|
+
var shouldExpandFlexProps = shouldExpand ? {
|
|
5056
|
+
flexGrow: 1,
|
|
5057
|
+
flexShrink: 1
|
|
5058
|
+
} : {};
|
|
5059
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread(_objectSpread({
|
|
5053
5060
|
marginRight: direction === 'row' ? currentItemMarginValue : undefined,
|
|
5054
5061
|
marginBottom: direction === 'column' ? currentItemMarginValue : undefined
|
|
5055
|
-
},
|
|
5062
|
+
}, directionFlexProps), shouldExpandFlexProps), {}, {
|
|
5056
5063
|
children: children
|
|
5057
5064
|
}));
|
|
5058
5065
|
}
|
|
5059
5066
|
|
|
5060
|
-
var _excluded$G = ["direction", "contentContainerStyle"];
|
|
5067
|
+
var _excluded$G = ["direction", "shouldExpand", "contentContainerStyle"];
|
|
5061
5068
|
function ChoicesContainer(_ref) {
|
|
5062
5069
|
var direction = _ref.direction,
|
|
5070
|
+
shouldExpand = _ref.shouldExpand,
|
|
5063
5071
|
contentContainerStyle = _ref.contentContainerStyle,
|
|
5064
5072
|
props = _objectWithoutProperties(_ref, _excluded$G);
|
|
5073
|
+
var shouldExpandFlexProps = shouldExpand ? {
|
|
5074
|
+
flexGrow: 1,
|
|
5075
|
+
flexShrink: 1
|
|
5076
|
+
} : {};
|
|
5065
5077
|
if (direction === 'row') {
|
|
5066
|
-
return /*#__PURE__*/jsx(ScrollView
|
|
5078
|
+
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
5067
5079
|
horizontal: true,
|
|
5068
|
-
contentContainerStyle: contentContainerStyle
|
|
5069
|
-
}, props));
|
|
5080
|
+
contentContainerStyle: shouldExpand ? shouldExpandFlexProps : contentContainerStyle
|
|
5081
|
+
}, props), shouldExpandFlexProps));
|
|
5070
5082
|
}
|
|
5071
|
-
return /*#__PURE__*/jsx(View
|
|
5083
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), shouldExpandFlexProps));
|
|
5072
5084
|
}
|
|
5073
5085
|
|
|
5074
5086
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -5080,6 +5092,8 @@ function Choices(_ref2) {
|
|
|
5080
5092
|
_ref2$direction = _ref2.direction,
|
|
5081
5093
|
direction = _ref2$direction === void 0 ? 'column' : _ref2$direction,
|
|
5082
5094
|
disabled = _ref2.disabled,
|
|
5095
|
+
_ref2$shouldExpand = _ref2.shouldExpand,
|
|
5096
|
+
shouldExpand = _ref2$shouldExpand === void 0 ? false : _ref2$shouldExpand,
|
|
5083
5097
|
children = _ref2.children,
|
|
5084
5098
|
value = _ref2.value,
|
|
5085
5099
|
onPress = _ref2.onPress,
|
|
@@ -5098,6 +5112,7 @@ function Choices(_ref2) {
|
|
|
5098
5112
|
var sharedProps = {
|
|
5099
5113
|
type: type,
|
|
5100
5114
|
disabled: disabled,
|
|
5115
|
+
shouldExpand: shouldExpand,
|
|
5101
5116
|
onPress: !isForm ? onPress : undefined,
|
|
5102
5117
|
onChange: isForm ? function (newValue) {
|
|
5103
5118
|
setCurrentValue(newValue);
|
|
@@ -5109,6 +5124,7 @@ function Choices(_ref2) {
|
|
|
5109
5124
|
};
|
|
5110
5125
|
return /*#__PURE__*/jsx(ChoicesContainer, {
|
|
5111
5126
|
direction: direction,
|
|
5127
|
+
shouldExpand: shouldExpand,
|
|
5112
5128
|
testID: testID,
|
|
5113
5129
|
id: id,
|
|
5114
5130
|
style: style,
|
|
@@ -5119,6 +5135,7 @@ function Choices(_ref2) {
|
|
|
5119
5135
|
}, sharedProps));
|
|
5120
5136
|
return /*#__PURE__*/jsx(ChoiceItemContainer, {
|
|
5121
5137
|
direction: direction,
|
|
5138
|
+
shouldExpand: shouldExpand,
|
|
5122
5139
|
isLast: index === childrenArray.length - 1,
|
|
5123
5140
|
children: element
|
|
5124
5141
|
}, child.key);
|
|
@@ -10858,10 +10875,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10858
10875
|
button: {
|
|
10859
10876
|
minWidth: theme.button.minWidth,
|
|
10860
10877
|
maxWidth: theme.button.maxWidth,
|
|
10861
|
-
minHeight: {
|
|
10862
|
-
"default": theme.button.minHeight["default"],
|
|
10863
|
-
medium: theme.button.minHeight.medium
|
|
10864
|
-
},
|
|
10865
10878
|
maxHeight: theme.button.maxHeight,
|
|
10866
10879
|
height: {
|
|
10867
10880
|
"default": theme.button.height["default"],
|
|
@@ -11478,7 +11491,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
11478
11491
|
'heading-m': "".concat(theme.typography.types.headings.configs['heading-m'].fontSize, "px"),
|
|
11479
11492
|
'heading-s': "".concat(theme.typography.types.headings.configs['heading-s'].fontSize, "px"),
|
|
11480
11493
|
'heading-xs': "".concat(theme.typography.types.headings.configs['heading-xs'].fontSize, "px"),
|
|
11481
|
-
'heading-xxs': "".concat(theme.typography.types.headings.configs['heading-xxs'].fontSize, "px"),
|
|
11482
11494
|
'body-xl': "".concat(theme.typography.types.bodies.configs['body-xl'].fontSize, "px"),
|
|
11483
11495
|
'body-l': "".concat(theme.typography.types.bodies.configs['body-l'].fontSize, "px"),
|
|
11484
11496
|
'body-m': "".concat(theme.typography.types.bodies.configs['body-m'].fontSize, "px"),
|
|
@@ -11502,7 +11514,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
11502
11514
|
'heading-m': "".concat(theme.typography.types.headings.configs['heading-m'].lineHeight, "px"),
|
|
11503
11515
|
'heading-s': "".concat(theme.typography.types.headings.configs['heading-s'].lineHeight, "px"),
|
|
11504
11516
|
'heading-xs': "".concat(theme.typography.types.headings.configs['heading-xs'].lineHeight, "px"),
|
|
11505
|
-
'heading-xxs': "".concat(theme.typography.types.headings.configs['heading-xxs'].lineHeight, "px"),
|
|
11506
11517
|
'body-xl': "".concat(theme.typography.types.bodies.configs['body-xl'].lineHeight, "px"),
|
|
11507
11518
|
'body-l': "".concat(theme.typography.types.bodies.configs['body-l'].lineHeight, "px"),
|
|
11508
11519
|
'body-m': "".concat(theme.typography.types.bodies.configs['body-m'].lineHeight, "px"),
|
|
@@ -13283,7 +13294,7 @@ function StoryTitleLevel4(_ref4) {
|
|
|
13283
13294
|
return /*#__PURE__*/jsx(View, {
|
|
13284
13295
|
marginBottom: 10,
|
|
13285
13296
|
children: /*#__PURE__*/jsx(Typography.Header4, {
|
|
13286
|
-
base: "
|
|
13297
|
+
base: "heading-s",
|
|
13287
13298
|
color: useStoryBlockColor(color),
|
|
13288
13299
|
numberOfLines: numberOfLines,
|
|
13289
13300
|
children: children
|
|
@@ -13904,7 +13915,7 @@ function ToastContent(_ref) {
|
|
|
13904
13915
|
flexGrow: 1,
|
|
13905
13916
|
flexShrink: 1,
|
|
13906
13917
|
children: [title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
13907
|
-
base: "
|
|
13918
|
+
base: "heading-xs",
|
|
13908
13919
|
color: "white",
|
|
13909
13920
|
children: title
|
|
13910
13921
|
}) : null, description ? /*#__PURE__*/jsx(Typography.Text, {
|
|
@@ -13920,7 +13931,7 @@ function ToastContent(_ref) {
|
|
|
13920
13931
|
borderColor: "white",
|
|
13921
13932
|
onPress: onPress,
|
|
13922
13933
|
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
13923
|
-
base: "
|
|
13934
|
+
base: "heading-xs",
|
|
13924
13935
|
color: "white",
|
|
13925
13936
|
children: actionLabel
|
|
13926
13937
|
})
|