@ornikar/kitt-universal 32.1.1-canary.28d1f9f68cb643b8c67559f72df59006a88da1e9.0 → 32.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/CHANGELOG.md +1 -2
- package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts +1 -2
- 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 +1 -2
- package/dist/definitions/Choices/ChoiceItem.d.ts.map +1 -1
- package/dist/definitions/Choices/ChoiceItemContainer.d.ts +1 -2
- 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 +10 -35
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +10 -35
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +8 -36
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +8 -36
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +9 -37
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +9 -37
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +10 -38
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +10 -38
- 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 { 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';
|
|
6
|
-
import { Animated, Easing, StyleSheet, Modal, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
|
|
6
|
+
import { Animated, Easing, ScrollView as ScrollView$2, View as View$2, StyleSheet, Modal, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
|
|
7
7
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
9
|
import { CSSTransition } from 'react-transition-group';
|
|
@@ -4701,8 +4701,7 @@ function AnimatedChoiceItemView({
|
|
|
4701
4701
|
isPressed,
|
|
4702
4702
|
isDisabled,
|
|
4703
4703
|
isSelected,
|
|
4704
|
-
hasError
|
|
4705
|
-
shouldExpand = false
|
|
4704
|
+
hasError
|
|
4706
4705
|
}) {
|
|
4707
4706
|
const theme = useTheme();
|
|
4708
4707
|
return /*#__PURE__*/jsx(View, {
|
|
@@ -4721,8 +4720,6 @@ function AnimatedChoiceItemView({
|
|
|
4721
4720
|
isPressed
|
|
4722
4721
|
}),
|
|
4723
4722
|
padding: size === 'small' ? 'kitt.2' : 'kitt.4',
|
|
4724
|
-
flexGrow: shouldExpand ? 1 : undefined,
|
|
4725
|
-
flexShrink: shouldExpand ? 1 : undefined,
|
|
4726
4723
|
_web: {
|
|
4727
4724
|
style: {
|
|
4728
4725
|
transitionProperty: theme.kitt.choices.item.transition.property,
|
|
@@ -4758,7 +4755,6 @@ function ChoiceItem({
|
|
|
4758
4755
|
value,
|
|
4759
4756
|
selected,
|
|
4760
4757
|
disabled,
|
|
4761
|
-
shouldExpand = false,
|
|
4762
4758
|
children,
|
|
4763
4759
|
isPressedInternal,
|
|
4764
4760
|
isHoveredInternal,
|
|
@@ -4794,8 +4790,6 @@ function ChoiceItem({
|
|
|
4794
4790
|
checked: selected
|
|
4795
4791
|
},
|
|
4796
4792
|
style: style,
|
|
4797
|
-
flexGrow: shouldExpand ? 1 : undefined,
|
|
4798
|
-
flexShrink: shouldExpand ? 1 : undefined,
|
|
4799
4793
|
onBlur: onBlur,
|
|
4800
4794
|
onFocus: onFocus,
|
|
4801
4795
|
onPress: e => {
|
|
@@ -4815,8 +4809,6 @@ function ChoiceItem({
|
|
|
4815
4809
|
});
|
|
4816
4810
|
return /*#__PURE__*/jsxs(VStack, {
|
|
4817
4811
|
space: "kitt.2",
|
|
4818
|
-
flexGrow: shouldExpand ? 1 : undefined,
|
|
4819
|
-
flexShrink: shouldExpand ? 1 : undefined,
|
|
4820
4812
|
children: [/*#__PURE__*/jsxs(AnimatedChoiceItemView, {
|
|
4821
4813
|
animatedStyles: backgroundStyles,
|
|
4822
4814
|
isHovered: isHovered || isHoveredInternal,
|
|
@@ -4824,13 +4816,10 @@ function ChoiceItem({
|
|
|
4824
4816
|
isSelected: selected,
|
|
4825
4817
|
isPressed: isPressed || isPressedInternal,
|
|
4826
4818
|
hasError: hasError,
|
|
4827
|
-
shouldExpand: shouldExpand,
|
|
4828
4819
|
size: size,
|
|
4829
4820
|
children: [/*#__PURE__*/jsxs(Stack, {
|
|
4830
4821
|
alignItems: "center",
|
|
4831
4822
|
space: "kitt.2",
|
|
4832
|
-
flexGrow: shouldExpand ? 1 : undefined,
|
|
4833
|
-
flexShrink: shouldExpand ? 1 : undefined,
|
|
4834
4823
|
children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
|
|
4835
4824
|
color: textColor,
|
|
4836
4825
|
icon: icon
|
|
@@ -4859,49 +4848,36 @@ function ChoiceItem({
|
|
|
4859
4848
|
function ChoiceItemContainer({
|
|
4860
4849
|
children,
|
|
4861
4850
|
direction,
|
|
4862
|
-
shouldExpand,
|
|
4863
4851
|
isLast
|
|
4864
4852
|
}) {
|
|
4865
4853
|
const currentItemMarginValue = isLast ? undefined : 'kitt.3';
|
|
4866
|
-
const
|
|
4854
|
+
const flexProps = direction === 'row' ? {
|
|
4867
4855
|
flexGrow: 1,
|
|
4868
4856
|
flexShrink: 1,
|
|
4869
4857
|
flexBasis: 0
|
|
4870
4858
|
} : {};
|
|
4871
|
-
const shouldExpandFlexProps = shouldExpand ? {
|
|
4872
|
-
flexGrow: 1,
|
|
4873
|
-
flexShrink: 1
|
|
4874
|
-
} : {};
|
|
4875
4859
|
return /*#__PURE__*/jsx(View, {
|
|
4876
4860
|
marginRight: direction === 'row' ? currentItemMarginValue : undefined,
|
|
4877
4861
|
marginBottom: direction === 'column' ? currentItemMarginValue : undefined,
|
|
4878
|
-
...
|
|
4879
|
-
...shouldExpandFlexProps,
|
|
4862
|
+
...flexProps,
|
|
4880
4863
|
children: children
|
|
4881
4864
|
});
|
|
4882
4865
|
}
|
|
4883
4866
|
|
|
4884
4867
|
function ChoicesContainer({
|
|
4885
4868
|
direction,
|
|
4886
|
-
shouldExpand,
|
|
4887
4869
|
contentContainerStyle,
|
|
4888
4870
|
...props
|
|
4889
4871
|
}) {
|
|
4890
|
-
const shouldExpandFlexProps = shouldExpand ? {
|
|
4891
|
-
flexGrow: 1,
|
|
4892
|
-
flexShrink: 1
|
|
4893
|
-
} : {};
|
|
4894
4872
|
if (direction === 'row') {
|
|
4895
|
-
return /*#__PURE__*/jsx(ScrollView, {
|
|
4873
|
+
return /*#__PURE__*/jsx(ScrollView$2, {
|
|
4896
4874
|
horizontal: true,
|
|
4897
|
-
contentContainerStyle:
|
|
4898
|
-
...props
|
|
4899
|
-
...shouldExpandFlexProps
|
|
4875
|
+
contentContainerStyle: contentContainerStyle,
|
|
4876
|
+
...props
|
|
4900
4877
|
});
|
|
4901
4878
|
}
|
|
4902
|
-
return /*#__PURE__*/jsx(View, {
|
|
4903
|
-
...props
|
|
4904
|
-
...shouldExpandFlexProps
|
|
4879
|
+
return /*#__PURE__*/jsx(View$2, {
|
|
4880
|
+
...props
|
|
4905
4881
|
});
|
|
4906
4882
|
}
|
|
4907
4883
|
|
|
@@ -4913,7 +4889,6 @@ function Choices({
|
|
|
4913
4889
|
type,
|
|
4914
4890
|
direction = 'column',
|
|
4915
4891
|
disabled,
|
|
4916
|
-
shouldExpand = false,
|
|
4917
4892
|
children,
|
|
4918
4893
|
value,
|
|
4919
4894
|
onPress,
|
|
@@ -4930,7 +4905,6 @@ function Choices({
|
|
|
4930
4905
|
const sharedProps = {
|
|
4931
4906
|
type,
|
|
4932
4907
|
disabled,
|
|
4933
|
-
shouldExpand,
|
|
4934
4908
|
onPress: !isForm ? onPress : undefined,
|
|
4935
4909
|
onChange: isForm ? newValue => {
|
|
4936
4910
|
setCurrentValue(newValue);
|
|
@@ -4942,7 +4916,6 @@ function Choices({
|
|
|
4942
4916
|
};
|
|
4943
4917
|
return /*#__PURE__*/jsx(ChoicesContainer, {
|
|
4944
4918
|
direction: direction,
|
|
4945
|
-
shouldExpand: shouldExpand,
|
|
4946
4919
|
testID: testID,
|
|
4947
4920
|
id: id,
|
|
4948
4921
|
style: style,
|
|
@@ -4954,7 +4927,6 @@ function Choices({
|
|
|
4954
4927
|
});
|
|
4955
4928
|
return /*#__PURE__*/jsx(ChoiceItemContainer, {
|
|
4956
4929
|
direction: direction,
|
|
4957
|
-
shouldExpand: shouldExpand,
|
|
4958
4930
|
isLast: index === childrenArray.length - 1,
|
|
4959
4931
|
children: element
|
|
4960
4932
|
}, child.key);
|