@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
|
@@ -4706,7 +4706,8 @@ function AnimatedChoiceItemView({
|
|
|
4706
4706
|
isPressed,
|
|
4707
4707
|
isDisabled,
|
|
4708
4708
|
isSelected,
|
|
4709
|
-
hasError
|
|
4709
|
+
hasError,
|
|
4710
|
+
shouldExpand = false
|
|
4710
4711
|
}) {
|
|
4711
4712
|
const theme = useTheme();
|
|
4712
4713
|
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
@@ -4725,6 +4726,8 @@ function AnimatedChoiceItemView({
|
|
|
4725
4726
|
isPressed
|
|
4726
4727
|
}),
|
|
4727
4728
|
padding: size === 'small' ? 'kitt.2' : 'kitt.4',
|
|
4729
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4730
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4728
4731
|
_web: {
|
|
4729
4732
|
style: {
|
|
4730
4733
|
transitionProperty: theme.kitt.choices.item.transition.property,
|
|
@@ -4760,6 +4763,7 @@ function ChoiceItem({
|
|
|
4760
4763
|
value,
|
|
4761
4764
|
selected,
|
|
4762
4765
|
disabled,
|
|
4766
|
+
shouldExpand = false,
|
|
4763
4767
|
children,
|
|
4764
4768
|
isPressedInternal,
|
|
4765
4769
|
isHoveredInternal,
|
|
@@ -4795,6 +4799,8 @@ function ChoiceItem({
|
|
|
4795
4799
|
checked: selected
|
|
4796
4800
|
},
|
|
4797
4801
|
style: style,
|
|
4802
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4803
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4798
4804
|
onBlur: onBlur,
|
|
4799
4805
|
onFocus: onFocus,
|
|
4800
4806
|
onPress: e => {
|
|
@@ -4814,6 +4820,8 @@ function ChoiceItem({
|
|
|
4814
4820
|
});
|
|
4815
4821
|
return /*#__PURE__*/jsxRuntime.jsxs(VStack, {
|
|
4816
4822
|
space: "kitt.2",
|
|
4823
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4824
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4817
4825
|
children: [/*#__PURE__*/jsxRuntime.jsxs(AnimatedChoiceItemView, {
|
|
4818
4826
|
animatedStyles: backgroundStyles,
|
|
4819
4827
|
isHovered: isHovered || isHoveredInternal,
|
|
@@ -4821,10 +4829,13 @@ function ChoiceItem({
|
|
|
4821
4829
|
isSelected: selected,
|
|
4822
4830
|
isPressed: isPressed || isPressedInternal,
|
|
4823
4831
|
hasError: hasError,
|
|
4832
|
+
shouldExpand: shouldExpand,
|
|
4824
4833
|
size: size,
|
|
4825
4834
|
children: [/*#__PURE__*/jsxRuntime.jsxs(Stack, {
|
|
4826
4835
|
alignItems: "center",
|
|
4827
4836
|
space: "kitt.2",
|
|
4837
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4838
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4828
4839
|
children: [icon ? /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
4829
4840
|
color: textColor,
|
|
4830
4841
|
icon: icon
|
|
@@ -4853,36 +4864,49 @@ function ChoiceItem({
|
|
|
4853
4864
|
function ChoiceItemContainer({
|
|
4854
4865
|
children,
|
|
4855
4866
|
direction,
|
|
4867
|
+
shouldExpand,
|
|
4856
4868
|
isLast
|
|
4857
4869
|
}) {
|
|
4858
4870
|
const currentItemMarginValue = isLast ? undefined : 'kitt.3';
|
|
4859
|
-
const
|
|
4871
|
+
const directionFlexProps = direction === 'row' ? {
|
|
4860
4872
|
flexGrow: 1,
|
|
4861
4873
|
flexShrink: 1,
|
|
4862
4874
|
flexBasis: 0
|
|
4863
4875
|
} : {};
|
|
4876
|
+
const shouldExpandFlexProps = shouldExpand ? {
|
|
4877
|
+
flexGrow: 1,
|
|
4878
|
+
flexShrink: 1
|
|
4879
|
+
} : {};
|
|
4864
4880
|
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4865
4881
|
marginRight: direction === 'row' ? currentItemMarginValue : undefined,
|
|
4866
4882
|
marginBottom: direction === 'column' ? currentItemMarginValue : undefined,
|
|
4867
|
-
...
|
|
4883
|
+
...directionFlexProps,
|
|
4884
|
+
...shouldExpandFlexProps,
|
|
4868
4885
|
children: children
|
|
4869
4886
|
});
|
|
4870
4887
|
}
|
|
4871
4888
|
|
|
4872
4889
|
function ChoicesContainer({
|
|
4873
4890
|
direction,
|
|
4891
|
+
shouldExpand,
|
|
4874
4892
|
contentContainerStyle,
|
|
4875
4893
|
...props
|
|
4876
4894
|
}) {
|
|
4895
|
+
const shouldExpandFlexProps = shouldExpand ? {
|
|
4896
|
+
flexGrow: 1,
|
|
4897
|
+
flexShrink: 1
|
|
4898
|
+
} : {};
|
|
4877
4899
|
if (direction === 'row') {
|
|
4878
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
4900
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
|
|
4879
4901
|
horizontal: true,
|
|
4880
|
-
contentContainerStyle: contentContainerStyle,
|
|
4881
|
-
...props
|
|
4902
|
+
contentContainerStyle: shouldExpand ? shouldExpandFlexProps : contentContainerStyle,
|
|
4903
|
+
...props,
|
|
4904
|
+
...shouldExpandFlexProps
|
|
4882
4905
|
});
|
|
4883
4906
|
}
|
|
4884
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
4885
|
-
...props
|
|
4907
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4908
|
+
...props,
|
|
4909
|
+
...shouldExpandFlexProps
|
|
4886
4910
|
});
|
|
4887
4911
|
}
|
|
4888
4912
|
|
|
@@ -4894,6 +4918,7 @@ function Choices({
|
|
|
4894
4918
|
type,
|
|
4895
4919
|
direction = 'column',
|
|
4896
4920
|
disabled,
|
|
4921
|
+
shouldExpand = false,
|
|
4897
4922
|
children,
|
|
4898
4923
|
value,
|
|
4899
4924
|
onPress,
|
|
@@ -4910,6 +4935,7 @@ function Choices({
|
|
|
4910
4935
|
const sharedProps = {
|
|
4911
4936
|
type,
|
|
4912
4937
|
disabled,
|
|
4938
|
+
shouldExpand,
|
|
4913
4939
|
onPress: !isForm ? onPress : undefined,
|
|
4914
4940
|
onChange: isForm ? newValue => {
|
|
4915
4941
|
setCurrentValue(newValue);
|
|
@@ -4921,6 +4947,7 @@ function Choices({
|
|
|
4921
4947
|
};
|
|
4922
4948
|
return /*#__PURE__*/jsxRuntime.jsx(ChoicesContainer, {
|
|
4923
4949
|
direction: direction,
|
|
4950
|
+
shouldExpand: shouldExpand,
|
|
4924
4951
|
testID: testID,
|
|
4925
4952
|
id: id,
|
|
4926
4953
|
style: style,
|
|
@@ -4932,6 +4959,7 @@ function Choices({
|
|
|
4932
4959
|
});
|
|
4933
4960
|
return /*#__PURE__*/jsxRuntime.jsx(ChoiceItemContainer, {
|
|
4934
4961
|
direction: direction,
|
|
4962
|
+
shouldExpand: shouldExpand,
|
|
4935
4963
|
isLast: index === childrenArray.length - 1,
|
|
4936
4964
|
children: element
|
|
4937
4965
|
}, child.key);
|