@ornikar/kitt-universal 32.3.0 → 32.3.1-canary.e5e3462569f2f32f91e8d06437eb0642c84cb55f.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 +9 -0
- 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/index-metro.es.android.js +35 -10
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +35 -10
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +36 -8
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +36 -8
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +37 -9
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +37 -9
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +38 -10
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +38 -10
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { View as View$1, ScrollView as ScrollView$1, Pressable as Pressable$1, I
|
|
|
3
3
|
export { useClipboard, useContrastText, useMediaQuery, useSx, useToken } from 'native-base';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate, ReducedMotionConfig, ReduceMotion } from 'react-native-reanimated';
|
|
6
|
-
import { Platform, Animated as Animated$1, Easing, StyleSheet, Modal,
|
|
6
|
+
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';
|
|
7
7
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
8
8
|
import { SpinnerGapRegularIcon, UserRegularIcon, XRegularIcon, ArrowLeftRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
|
|
9
9
|
import { BottomSheetView, BottomSheetScrollView, BottomSheetSectionList, BottomSheetFlatList, BottomSheetHandle, BottomSheetBackdrop, BottomSheetFooter, BottomSheetTextInput, BottomSheetModal, useBottomSheetModal } from '@gorhom/bottom-sheet';
|
|
@@ -4810,6 +4810,7 @@ function AnimatedChoiceItemView({
|
|
|
4810
4810
|
isDisabled,
|
|
4811
4811
|
isSelected,
|
|
4812
4812
|
hasError,
|
|
4813
|
+
shouldExpand = false,
|
|
4813
4814
|
animatedStyles
|
|
4814
4815
|
}) {
|
|
4815
4816
|
const sx = useSx();
|
|
@@ -4828,7 +4829,9 @@ function AnimatedChoiceItemView({
|
|
|
4828
4829
|
isHovered,
|
|
4829
4830
|
isPressed
|
|
4830
4831
|
}),
|
|
4831
|
-
padding: size === 'small' ? 'kitt.2' : 'kitt.4'
|
|
4832
|
+
padding: size === 'small' ? 'kitt.2' : 'kitt.4',
|
|
4833
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4834
|
+
flexShrink: shouldExpand ? 1 : undefined
|
|
4832
4835
|
});
|
|
4833
4836
|
return /*#__PURE__*/jsx(Animated.View, {
|
|
4834
4837
|
style: [style, animatedStyles],
|
|
@@ -4892,6 +4895,7 @@ function ChoiceItem({
|
|
|
4892
4895
|
value,
|
|
4893
4896
|
selected,
|
|
4894
4897
|
disabled,
|
|
4898
|
+
shouldExpand = false,
|
|
4895
4899
|
children,
|
|
4896
4900
|
isPressedInternal,
|
|
4897
4901
|
isHoveredInternal,
|
|
@@ -4931,6 +4935,8 @@ function ChoiceItem({
|
|
|
4931
4935
|
checked: selected
|
|
4932
4936
|
},
|
|
4933
4937
|
style: style,
|
|
4938
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4939
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4934
4940
|
onBlur: onBlur,
|
|
4935
4941
|
onFocus: onFocus,
|
|
4936
4942
|
onPress: e => {
|
|
@@ -4950,6 +4956,8 @@ function ChoiceItem({
|
|
|
4950
4956
|
});
|
|
4951
4957
|
return /*#__PURE__*/jsxs(VStack, {
|
|
4952
4958
|
space: "kitt.2",
|
|
4959
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4960
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4953
4961
|
children: [/*#__PURE__*/jsxs(AnimatedChoiceItemView, {
|
|
4954
4962
|
animatedStyles: backgroundStyles,
|
|
4955
4963
|
isHovered: isHovered || isHoveredInternal,
|
|
@@ -4957,10 +4965,13 @@ function ChoiceItem({
|
|
|
4957
4965
|
isSelected: selected,
|
|
4958
4966
|
isPressed: isPressed || isPressedInternal,
|
|
4959
4967
|
hasError: hasError,
|
|
4968
|
+
shouldExpand: shouldExpand,
|
|
4960
4969
|
size: size,
|
|
4961
4970
|
children: [/*#__PURE__*/jsxs(Stack, {
|
|
4962
4971
|
alignItems: "center",
|
|
4963
4972
|
space: "kitt.2",
|
|
4973
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4974
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4964
4975
|
children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
|
|
4965
4976
|
color: textColor,
|
|
4966
4977
|
icon: icon
|
|
@@ -4989,36 +5000,49 @@ function ChoiceItem({
|
|
|
4989
5000
|
function ChoiceItemContainer({
|
|
4990
5001
|
children,
|
|
4991
5002
|
direction,
|
|
5003
|
+
shouldExpand,
|
|
4992
5004
|
isLast
|
|
4993
5005
|
}) {
|
|
4994
5006
|
const currentItemMarginValue = isLast ? undefined : 'kitt.3';
|
|
4995
|
-
const
|
|
5007
|
+
const directionFlexProps = direction === 'row' ? {
|
|
4996
5008
|
flexGrow: 1,
|
|
4997
5009
|
flexShrink: 1,
|
|
4998
5010
|
flexBasis: 0
|
|
4999
5011
|
} : {};
|
|
5012
|
+
const shouldExpandFlexProps = shouldExpand ? {
|
|
5013
|
+
flexGrow: 1,
|
|
5014
|
+
flexShrink: 1
|
|
5015
|
+
} : {};
|
|
5000
5016
|
return /*#__PURE__*/jsx(View, {
|
|
5001
5017
|
marginRight: direction === 'row' ? currentItemMarginValue : undefined,
|
|
5002
5018
|
marginBottom: direction === 'column' ? currentItemMarginValue : undefined,
|
|
5003
|
-
...
|
|
5019
|
+
...directionFlexProps,
|
|
5020
|
+
...shouldExpandFlexProps,
|
|
5004
5021
|
children: children
|
|
5005
5022
|
});
|
|
5006
5023
|
}
|
|
5007
5024
|
|
|
5008
5025
|
function ChoicesContainer({
|
|
5009
5026
|
direction,
|
|
5027
|
+
shouldExpand,
|
|
5010
5028
|
contentContainerStyle,
|
|
5011
5029
|
...props
|
|
5012
5030
|
}) {
|
|
5031
|
+
const shouldExpandFlexProps = shouldExpand ? {
|
|
5032
|
+
flexGrow: 1,
|
|
5033
|
+
flexShrink: 1
|
|
5034
|
+
} : {};
|
|
5013
5035
|
if (direction === 'row') {
|
|
5014
|
-
return /*#__PURE__*/jsx(ScrollView
|
|
5036
|
+
return /*#__PURE__*/jsx(ScrollView, {
|
|
5015
5037
|
horizontal: true,
|
|
5016
|
-
contentContainerStyle: contentContainerStyle,
|
|
5017
|
-
...props
|
|
5038
|
+
contentContainerStyle: shouldExpand ? shouldExpandFlexProps : contentContainerStyle,
|
|
5039
|
+
...props,
|
|
5040
|
+
...shouldExpandFlexProps
|
|
5018
5041
|
});
|
|
5019
5042
|
}
|
|
5020
|
-
return /*#__PURE__*/jsx(View
|
|
5021
|
-
...props
|
|
5043
|
+
return /*#__PURE__*/jsx(View, {
|
|
5044
|
+
...props,
|
|
5045
|
+
...shouldExpandFlexProps
|
|
5022
5046
|
});
|
|
5023
5047
|
}
|
|
5024
5048
|
|
|
@@ -5030,6 +5054,7 @@ function Choices({
|
|
|
5030
5054
|
type,
|
|
5031
5055
|
direction = 'column',
|
|
5032
5056
|
disabled,
|
|
5057
|
+
shouldExpand = false,
|
|
5033
5058
|
children,
|
|
5034
5059
|
value,
|
|
5035
5060
|
onPress,
|
|
@@ -5046,6 +5071,7 @@ function Choices({
|
|
|
5046
5071
|
const sharedProps = {
|
|
5047
5072
|
type,
|
|
5048
5073
|
disabled,
|
|
5074
|
+
shouldExpand,
|
|
5049
5075
|
onPress: !isForm ? onPress : undefined,
|
|
5050
5076
|
onChange: isForm ? newValue => {
|
|
5051
5077
|
setCurrentValue(newValue);
|
|
@@ -5057,6 +5083,7 @@ function Choices({
|
|
|
5057
5083
|
};
|
|
5058
5084
|
return /*#__PURE__*/jsx(ChoicesContainer, {
|
|
5059
5085
|
direction: direction,
|
|
5086
|
+
shouldExpand: shouldExpand,
|
|
5060
5087
|
testID: testID,
|
|
5061
5088
|
id: id,
|
|
5062
5089
|
style: style,
|
|
@@ -5068,6 +5095,7 @@ function Choices({
|
|
|
5068
5095
|
});
|
|
5069
5096
|
return /*#__PURE__*/jsx(ChoiceItemContainer, {
|
|
5070
5097
|
direction: direction,
|
|
5098
|
+
shouldExpand: shouldExpand,
|
|
5071
5099
|
isLast: index === childrenArray.length - 1,
|
|
5072
5100
|
children: element
|
|
5073
5101
|
}, child.key);
|