@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
package/dist/index.es.web.js
CHANGED
|
@@ -11,7 +11,7 @@ import _typeof from '@babel/runtime/helpers/typeof';
|
|
|
11
11
|
import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
|
|
12
12
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
13
13
|
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';
|
|
14
|
-
import { Animated, Easing, StyleSheet, Modal, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
|
|
14
|
+
import { Animated, Easing, ScrollView as ScrollView$2, View as View$2, StyleSheet, Modal, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
|
|
15
15
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
16
16
|
import { createPortal } from 'react-dom';
|
|
17
17
|
import { CSSTransition } from 'react-transition-group';
|
|
@@ -4742,9 +4742,7 @@ function AnimatedChoiceItemView(_ref) {
|
|
|
4742
4742
|
isPressed = _ref.isPressed,
|
|
4743
4743
|
isDisabled = _ref.isDisabled,
|
|
4744
4744
|
isSelected = _ref.isSelected,
|
|
4745
|
-
hasError = _ref.hasError
|
|
4746
|
-
_ref$shouldExpand = _ref.shouldExpand,
|
|
4747
|
-
shouldExpand = _ref$shouldExpand === void 0 ? false : _ref$shouldExpand;
|
|
4745
|
+
hasError = _ref.hasError;
|
|
4748
4746
|
var theme = useTheme();
|
|
4749
4747
|
return /*#__PURE__*/jsx(View, {
|
|
4750
4748
|
position: "relative",
|
|
@@ -4762,8 +4760,6 @@ function AnimatedChoiceItemView(_ref) {
|
|
|
4762
4760
|
isPressed: isPressed
|
|
4763
4761
|
}),
|
|
4764
4762
|
padding: size === 'small' ? 'kitt.2' : 'kitt.4',
|
|
4765
|
-
flexGrow: shouldExpand ? 1 : undefined,
|
|
4766
|
-
flexShrink: shouldExpand ? 1 : undefined,
|
|
4767
4763
|
_web: {
|
|
4768
4764
|
style: {
|
|
4769
4765
|
transitionProperty: theme.kitt.choices.item.transition.property,
|
|
@@ -4800,8 +4796,6 @@ function ChoiceItem(_ref) {
|
|
|
4800
4796
|
value = _ref.value,
|
|
4801
4797
|
selected = _ref.selected,
|
|
4802
4798
|
disabled = _ref.disabled,
|
|
4803
|
-
_ref$shouldExpand = _ref.shouldExpand,
|
|
4804
|
-
shouldExpand = _ref$shouldExpand === void 0 ? false : _ref$shouldExpand,
|
|
4805
4799
|
_children = _ref.children,
|
|
4806
4800
|
isPressedInternal = _ref.isPressedInternal,
|
|
4807
4801
|
isHoveredInternal = _ref.isHoveredInternal,
|
|
@@ -4835,8 +4829,6 @@ function ChoiceItem(_ref) {
|
|
|
4835
4829
|
checked: selected
|
|
4836
4830
|
},
|
|
4837
4831
|
style: style,
|
|
4838
|
-
flexGrow: shouldExpand ? 1 : undefined,
|
|
4839
|
-
flexShrink: shouldExpand ? 1 : undefined,
|
|
4840
4832
|
onBlur: onBlur,
|
|
4841
4833
|
onFocus: onFocus,
|
|
4842
4834
|
onPress: function (e) {
|
|
@@ -4855,8 +4847,6 @@ function ChoiceItem(_ref) {
|
|
|
4855
4847
|
});
|
|
4856
4848
|
return /*#__PURE__*/jsxs(VStack, {
|
|
4857
4849
|
space: "kitt.2",
|
|
4858
|
-
flexGrow: shouldExpand ? 1 : undefined,
|
|
4859
|
-
flexShrink: shouldExpand ? 1 : undefined,
|
|
4860
4850
|
children: [/*#__PURE__*/jsxs(AnimatedChoiceItemView, {
|
|
4861
4851
|
animatedStyles: backgroundStyles,
|
|
4862
4852
|
isHovered: isHovered || isHoveredInternal,
|
|
@@ -4864,13 +4854,10 @@ function ChoiceItem(_ref) {
|
|
|
4864
4854
|
isSelected: selected,
|
|
4865
4855
|
isPressed: isPressed || isPressedInternal,
|
|
4866
4856
|
hasError: hasError,
|
|
4867
|
-
shouldExpand: shouldExpand,
|
|
4868
4857
|
size: size,
|
|
4869
4858
|
children: [/*#__PURE__*/jsxs(Stack, {
|
|
4870
4859
|
alignItems: "center",
|
|
4871
4860
|
space: "kitt.2",
|
|
4872
|
-
flexGrow: shouldExpand ? 1 : undefined,
|
|
4873
|
-
flexShrink: shouldExpand ? 1 : undefined,
|
|
4874
4861
|
children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
|
|
4875
4862
|
color: textColor,
|
|
4876
4863
|
icon: icon
|
|
@@ -4899,43 +4886,33 @@ function ChoiceItem(_ref) {
|
|
|
4899
4886
|
function ChoiceItemContainer(_ref) {
|
|
4900
4887
|
var children = _ref.children,
|
|
4901
4888
|
direction = _ref.direction,
|
|
4902
|
-
shouldExpand = _ref.shouldExpand,
|
|
4903
4889
|
isLast = _ref.isLast;
|
|
4904
4890
|
var currentItemMarginValue = isLast ? undefined : 'kitt.3';
|
|
4905
|
-
var
|
|
4891
|
+
var flexProps = direction === 'row' ? {
|
|
4906
4892
|
flexGrow: 1,
|
|
4907
4893
|
flexShrink: 1,
|
|
4908
4894
|
flexBasis: 0
|
|
4909
4895
|
} : {};
|
|
4910
|
-
|
|
4911
|
-
flexGrow: 1,
|
|
4912
|
-
flexShrink: 1
|
|
4913
|
-
} : {};
|
|
4914
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread(_objectSpread({
|
|
4896
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
4915
4897
|
marginRight: direction === 'row' ? currentItemMarginValue : undefined,
|
|
4916
4898
|
marginBottom: direction === 'column' ? currentItemMarginValue : undefined
|
|
4917
|
-
},
|
|
4899
|
+
}, flexProps), {}, {
|
|
4918
4900
|
children: children
|
|
4919
4901
|
}));
|
|
4920
4902
|
}
|
|
4921
4903
|
|
|
4922
|
-
var _excluded$D = ["direction", "
|
|
4904
|
+
var _excluded$D = ["direction", "contentContainerStyle"];
|
|
4923
4905
|
function ChoicesContainer(_ref) {
|
|
4924
4906
|
var direction = _ref.direction,
|
|
4925
|
-
shouldExpand = _ref.shouldExpand,
|
|
4926
4907
|
contentContainerStyle = _ref.contentContainerStyle,
|
|
4927
4908
|
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
4928
|
-
var shouldExpandFlexProps = shouldExpand ? {
|
|
4929
|
-
flexGrow: 1,
|
|
4930
|
-
flexShrink: 1
|
|
4931
|
-
} : {};
|
|
4932
4909
|
if (direction === 'row') {
|
|
4933
|
-
return /*#__PURE__*/jsx(ScrollView, _objectSpread(
|
|
4910
|
+
return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
|
|
4934
4911
|
horizontal: true,
|
|
4935
|
-
contentContainerStyle:
|
|
4936
|
-
}, props)
|
|
4912
|
+
contentContainerStyle: contentContainerStyle
|
|
4913
|
+
}, props));
|
|
4937
4914
|
}
|
|
4938
|
-
return /*#__PURE__*/jsx(View, _objectSpread(
|
|
4915
|
+
return /*#__PURE__*/jsx(View$2, _objectSpread({}, props));
|
|
4939
4916
|
}
|
|
4940
4917
|
|
|
4941
4918
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -4947,8 +4924,6 @@ function Choices(_ref2) {
|
|
|
4947
4924
|
_ref2$direction = _ref2.direction,
|
|
4948
4925
|
direction = _ref2$direction === void 0 ? 'column' : _ref2$direction,
|
|
4949
4926
|
disabled = _ref2.disabled,
|
|
4950
|
-
_ref2$shouldExpand = _ref2.shouldExpand,
|
|
4951
|
-
shouldExpand = _ref2$shouldExpand === void 0 ? false : _ref2$shouldExpand,
|
|
4952
4927
|
children = _ref2.children,
|
|
4953
4928
|
value = _ref2.value,
|
|
4954
4929
|
onPress = _ref2.onPress,
|
|
@@ -4967,7 +4942,6 @@ function Choices(_ref2) {
|
|
|
4967
4942
|
var sharedProps = {
|
|
4968
4943
|
type: type,
|
|
4969
4944
|
disabled: disabled,
|
|
4970
|
-
shouldExpand: shouldExpand,
|
|
4971
4945
|
onPress: !isForm ? onPress : undefined,
|
|
4972
4946
|
onChange: isForm ? function (newValue) {
|
|
4973
4947
|
setCurrentValue(newValue);
|
|
@@ -4979,7 +4953,6 @@ function Choices(_ref2) {
|
|
|
4979
4953
|
};
|
|
4980
4954
|
return /*#__PURE__*/jsx(ChoicesContainer, {
|
|
4981
4955
|
direction: direction,
|
|
4982
|
-
shouldExpand: shouldExpand,
|
|
4983
4956
|
testID: testID,
|
|
4984
4957
|
id: id,
|
|
4985
4958
|
style: style,
|
|
@@ -4990,7 +4963,6 @@ function Choices(_ref2) {
|
|
|
4990
4963
|
}, sharedProps));
|
|
4991
4964
|
return /*#__PURE__*/jsx(ChoiceItemContainer, {
|
|
4992
4965
|
direction: direction,
|
|
4993
|
-
shouldExpand: shouldExpand,
|
|
4994
4966
|
isLast: index === childrenArray.length - 1,
|
|
4995
4967
|
children: element
|
|
4996
4968
|
}, child.key);
|