@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
|
@@ -7,7 +7,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
7
7
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
8
8
|
import _extends from '@babel/runtime/helpers/extends';
|
|
9
9
|
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate, ReducedMotionConfig, ReduceMotion } from 'react-native-reanimated';
|
|
10
|
-
import { Platform, Animated as Animated$1, Easing, StyleSheet, Modal,
|
|
10
|
+
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';
|
|
11
11
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
12
12
|
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';
|
|
13
13
|
import { BottomSheetView, BottomSheetScrollView, BottomSheetSectionList, BottomSheetFlatList, BottomSheetHandle, BottomSheetBackdrop, BottomSheetFooter, BottomSheetTextInput, BottomSheetModal, useBottomSheetModal } from '@gorhom/bottom-sheet';
|
|
@@ -676,10 +676,6 @@ const button = {
|
|
|
676
676
|
default: 40,
|
|
677
677
|
medium: 48
|
|
678
678
|
},
|
|
679
|
-
minHeight: {
|
|
680
|
-
default: 40,
|
|
681
|
-
medium: 48
|
|
682
|
-
},
|
|
683
679
|
maxHeight: 48,
|
|
684
680
|
icon: {
|
|
685
681
|
medium: {
|
|
@@ -2133,8 +2129,8 @@ const typography = {
|
|
|
2133
2129
|
allowedFontWeights: ['semibold']
|
|
2134
2130
|
},
|
|
2135
2131
|
'heading-l': {
|
|
2136
|
-
fontSize:
|
|
2137
|
-
lineHeight:
|
|
2132
|
+
fontSize: 40,
|
|
2133
|
+
lineHeight: 48,
|
|
2138
2134
|
allowedFontWeights: ['semibold']
|
|
2139
2135
|
},
|
|
2140
2136
|
'heading-m': {
|
|
@@ -2143,19 +2139,14 @@ const typography = {
|
|
|
2143
2139
|
allowedFontWeights: ['semibold']
|
|
2144
2140
|
},
|
|
2145
2141
|
'heading-s': {
|
|
2146
|
-
fontSize:
|
|
2147
|
-
lineHeight:
|
|
2148
|
-
allowedFontWeights: ['
|
|
2142
|
+
fontSize: 18,
|
|
2143
|
+
lineHeight: 20,
|
|
2144
|
+
allowedFontWeights: ['regular', 'bold']
|
|
2149
2145
|
},
|
|
2150
2146
|
'heading-xs': {
|
|
2151
|
-
fontSize: 20,
|
|
2152
|
-
lineHeight: 24,
|
|
2153
|
-
allowedFontWeights: ['semibold']
|
|
2154
|
-
},
|
|
2155
|
-
'heading-xxs': {
|
|
2156
2147
|
fontSize: 16,
|
|
2157
|
-
lineHeight:
|
|
2158
|
-
allowedFontWeights: ['
|
|
2148
|
+
lineHeight: 18,
|
|
2149
|
+
allowedFontWeights: ['regular', 'bold']
|
|
2159
2150
|
}
|
|
2160
2151
|
}
|
|
2161
2152
|
},
|
|
@@ -2222,17 +2213,17 @@ const typography = {
|
|
|
2222
2213
|
configs: {
|
|
2223
2214
|
'label-large': {
|
|
2224
2215
|
fontSize: 16,
|
|
2225
|
-
lineHeight:
|
|
2216
|
+
lineHeight: 24,
|
|
2226
2217
|
allowedFontWeights: ['semibold']
|
|
2227
2218
|
},
|
|
2228
2219
|
'label-medium': {
|
|
2229
2220
|
fontSize: 14,
|
|
2230
|
-
lineHeight:
|
|
2221
|
+
lineHeight: 20,
|
|
2231
2222
|
allowedFontWeights: ['semibold']
|
|
2232
2223
|
},
|
|
2233
2224
|
'label-small': {
|
|
2234
2225
|
fontSize: 12,
|
|
2235
|
-
lineHeight:
|
|
2226
|
+
lineHeight: 16,
|
|
2236
2227
|
allowedFontWeights: ['semibold']
|
|
2237
2228
|
}
|
|
2238
2229
|
}
|
|
@@ -3140,8 +3131,7 @@ function AnimatedContainer$2({
|
|
|
3140
3131
|
borderRadius: 'kitt.button.borderRadius',
|
|
3141
3132
|
backgroundColor: currentBackgroundColor,
|
|
3142
3133
|
width,
|
|
3143
|
-
height
|
|
3144
|
-
minHeight: size === 'default' ? 'kitt.button.minHeight.default' : 'kitt.button.minHeight.medium'
|
|
3134
|
+
height
|
|
3145
3135
|
});
|
|
3146
3136
|
return /*#__PURE__*/jsx(Animated.View, {
|
|
3147
3137
|
style: disabled ? [styles] : [styles, animatedStyles],
|
|
@@ -3855,7 +3845,6 @@ const Button = /*#__PURE__*/forwardRef(({
|
|
|
3855
3845
|
alignSelf: createResponsiveStyleFromProp(stretch, undefined, 'flex-start'),
|
|
3856
3846
|
minWidth: "kitt.button.minWidth",
|
|
3857
3847
|
maxWidth: createResponsiveStyleFromProp(stretch, '100%', 'kitt.button.maxWidth'),
|
|
3858
|
-
minHeight: _size === 'default' ? 'kitt.button.minHeight.default' : 'kitt.button.minHeight.medium',
|
|
3859
3848
|
maxHeight: "kitt.button.maxHeight",
|
|
3860
3849
|
width: createResponsiveStyleFromProp(stretch, '100%', 'auto'),
|
|
3861
3850
|
onPress: onPress,
|
|
@@ -4818,6 +4807,7 @@ function AnimatedChoiceItemView({
|
|
|
4818
4807
|
isDisabled,
|
|
4819
4808
|
isSelected,
|
|
4820
4809
|
hasError,
|
|
4810
|
+
shouldExpand = false,
|
|
4821
4811
|
animatedStyles
|
|
4822
4812
|
}) {
|
|
4823
4813
|
const sx = useSx();
|
|
@@ -4836,7 +4826,9 @@ function AnimatedChoiceItemView({
|
|
|
4836
4826
|
isHovered,
|
|
4837
4827
|
isPressed
|
|
4838
4828
|
}),
|
|
4839
|
-
padding: size === 'small' ? 'kitt.2' : 'kitt.4'
|
|
4829
|
+
padding: size === 'small' ? 'kitt.2' : 'kitt.4',
|
|
4830
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4831
|
+
flexShrink: shouldExpand ? 1 : undefined
|
|
4840
4832
|
});
|
|
4841
4833
|
return /*#__PURE__*/jsx(Animated.View, {
|
|
4842
4834
|
style: [style, animatedStyles],
|
|
@@ -4900,6 +4892,7 @@ function ChoiceItem({
|
|
|
4900
4892
|
value,
|
|
4901
4893
|
selected,
|
|
4902
4894
|
disabled,
|
|
4895
|
+
shouldExpand = false,
|
|
4903
4896
|
children,
|
|
4904
4897
|
isPressedInternal,
|
|
4905
4898
|
isHoveredInternal,
|
|
@@ -4939,6 +4932,8 @@ function ChoiceItem({
|
|
|
4939
4932
|
checked: selected
|
|
4940
4933
|
},
|
|
4941
4934
|
style: style,
|
|
4935
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4936
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4942
4937
|
onBlur: onBlur,
|
|
4943
4938
|
onFocus: onFocus,
|
|
4944
4939
|
onPress: e => {
|
|
@@ -4958,6 +4953,8 @@ function ChoiceItem({
|
|
|
4958
4953
|
});
|
|
4959
4954
|
return /*#__PURE__*/jsxs(VStack, {
|
|
4960
4955
|
space: "kitt.2",
|
|
4956
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4957
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4961
4958
|
children: [/*#__PURE__*/jsxs(AnimatedChoiceItemView, {
|
|
4962
4959
|
animatedStyles: backgroundStyles,
|
|
4963
4960
|
isHovered: isHovered || isHoveredInternal,
|
|
@@ -4965,10 +4962,13 @@ function ChoiceItem({
|
|
|
4965
4962
|
isSelected: selected,
|
|
4966
4963
|
isPressed: isPressed || isPressedInternal,
|
|
4967
4964
|
hasError: hasError,
|
|
4965
|
+
shouldExpand: shouldExpand,
|
|
4968
4966
|
size: size,
|
|
4969
4967
|
children: [/*#__PURE__*/jsxs(Stack, {
|
|
4970
4968
|
alignItems: "center",
|
|
4971
4969
|
space: "kitt.2",
|
|
4970
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4971
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4972
4972
|
children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
|
|
4973
4973
|
color: textColor,
|
|
4974
4974
|
icon: icon
|
|
@@ -4997,36 +4997,46 @@ function ChoiceItem({
|
|
|
4997
4997
|
function ChoiceItemContainer({
|
|
4998
4998
|
children,
|
|
4999
4999
|
direction,
|
|
5000
|
+
shouldExpand,
|
|
5000
5001
|
isLast
|
|
5001
5002
|
}) {
|
|
5002
5003
|
const currentItemMarginValue = isLast ? undefined : 'kitt.3';
|
|
5003
|
-
const
|
|
5004
|
+
const directionFlexProps = direction === 'row' ? {
|
|
5004
5005
|
flexGrow: 1,
|
|
5005
5006
|
flexShrink: 1,
|
|
5006
5007
|
flexBasis: 0
|
|
5007
5008
|
} : {};
|
|
5008
|
-
|
|
5009
|
+
const shouldExpandFlexProps = shouldExpand ? {
|
|
5010
|
+
flexGrow: 1,
|
|
5011
|
+
flexShrink: 1
|
|
5012
|
+
} : {};
|
|
5013
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread(_objectSpread({
|
|
5009
5014
|
marginRight: direction === 'row' ? currentItemMarginValue : undefined,
|
|
5010
5015
|
marginBottom: direction === 'column' ? currentItemMarginValue : undefined
|
|
5011
|
-
},
|
|
5016
|
+
}, directionFlexProps), shouldExpandFlexProps), {}, {
|
|
5012
5017
|
children: children
|
|
5013
5018
|
}));
|
|
5014
5019
|
}
|
|
5015
5020
|
|
|
5016
|
-
const _excluded$G = ["direction", "contentContainerStyle"];
|
|
5021
|
+
const _excluded$G = ["direction", "shouldExpand", "contentContainerStyle"];
|
|
5017
5022
|
function ChoicesContainer(_ref) {
|
|
5018
5023
|
let {
|
|
5019
5024
|
direction,
|
|
5025
|
+
shouldExpand,
|
|
5020
5026
|
contentContainerStyle
|
|
5021
5027
|
} = _ref,
|
|
5022
5028
|
props = _objectWithoutProperties(_ref, _excluded$G);
|
|
5029
|
+
const shouldExpandFlexProps = shouldExpand ? {
|
|
5030
|
+
flexGrow: 1,
|
|
5031
|
+
flexShrink: 1
|
|
5032
|
+
} : {};
|
|
5023
5033
|
if (direction === 'row') {
|
|
5024
|
-
return /*#__PURE__*/jsx(ScrollView
|
|
5034
|
+
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
5025
5035
|
horizontal: true,
|
|
5026
|
-
contentContainerStyle: contentContainerStyle
|
|
5027
|
-
}, props));
|
|
5036
|
+
contentContainerStyle: shouldExpand ? shouldExpandFlexProps : contentContainerStyle
|
|
5037
|
+
}, props), shouldExpandFlexProps));
|
|
5028
5038
|
}
|
|
5029
|
-
return /*#__PURE__*/jsx(View
|
|
5039
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), shouldExpandFlexProps));
|
|
5030
5040
|
}
|
|
5031
5041
|
|
|
5032
5042
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -5037,6 +5047,7 @@ function Choices({
|
|
|
5037
5047
|
type,
|
|
5038
5048
|
direction = 'column',
|
|
5039
5049
|
disabled,
|
|
5050
|
+
shouldExpand = false,
|
|
5040
5051
|
children,
|
|
5041
5052
|
value,
|
|
5042
5053
|
onPress,
|
|
@@ -5053,6 +5064,7 @@ function Choices({
|
|
|
5053
5064
|
const sharedProps = {
|
|
5054
5065
|
type,
|
|
5055
5066
|
disabled,
|
|
5067
|
+
shouldExpand,
|
|
5056
5068
|
onPress: !isForm ? onPress : undefined,
|
|
5057
5069
|
onChange: isForm ? newValue => {
|
|
5058
5070
|
setCurrentValue(newValue);
|
|
@@ -5064,6 +5076,7 @@ function Choices({
|
|
|
5064
5076
|
};
|
|
5065
5077
|
return /*#__PURE__*/jsx(ChoicesContainer, {
|
|
5066
5078
|
direction: direction,
|
|
5079
|
+
shouldExpand: shouldExpand,
|
|
5067
5080
|
testID: testID,
|
|
5068
5081
|
id: id,
|
|
5069
5082
|
style: style,
|
|
@@ -5074,6 +5087,7 @@ function Choices({
|
|
|
5074
5087
|
}, sharedProps));
|
|
5075
5088
|
return /*#__PURE__*/jsx(ChoiceItemContainer, {
|
|
5076
5089
|
direction: direction,
|
|
5090
|
+
shouldExpand: shouldExpand,
|
|
5077
5091
|
isLast: index === childrenArray.length - 1,
|
|
5078
5092
|
children: element
|
|
5079
5093
|
}, child.key);
|
|
@@ -10629,10 +10643,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10629
10643
|
button: {
|
|
10630
10644
|
minWidth: theme.button.minWidth,
|
|
10631
10645
|
maxWidth: theme.button.maxWidth,
|
|
10632
|
-
minHeight: {
|
|
10633
|
-
default: theme.button.minHeight.default,
|
|
10634
|
-
medium: theme.button.minHeight.medium
|
|
10635
|
-
},
|
|
10636
10646
|
maxHeight: theme.button.maxHeight,
|
|
10637
10647
|
height: {
|
|
10638
10648
|
default: theme.button.height.default,
|
|
@@ -11249,7 +11259,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
11249
11259
|
'heading-m': `${theme.typography.types.headings.configs['heading-m'].fontSize}px`,
|
|
11250
11260
|
'heading-s': `${theme.typography.types.headings.configs['heading-s'].fontSize}px`,
|
|
11251
11261
|
'heading-xs': `${theme.typography.types.headings.configs['heading-xs'].fontSize}px`,
|
|
11252
|
-
'heading-xxs': `${theme.typography.types.headings.configs['heading-xxs'].fontSize}px`,
|
|
11253
11262
|
'body-xl': `${theme.typography.types.bodies.configs['body-xl'].fontSize}px`,
|
|
11254
11263
|
'body-l': `${theme.typography.types.bodies.configs['body-l'].fontSize}px`,
|
|
11255
11264
|
'body-m': `${theme.typography.types.bodies.configs['body-m'].fontSize}px`,
|
|
@@ -11273,7 +11282,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
11273
11282
|
'heading-m': `${theme.typography.types.headings.configs['heading-m'].lineHeight}px`,
|
|
11274
11283
|
'heading-s': `${theme.typography.types.headings.configs['heading-s'].lineHeight}px`,
|
|
11275
11284
|
'heading-xs': `${theme.typography.types.headings.configs['heading-xs'].lineHeight}px`,
|
|
11276
|
-
'heading-xxs': `${theme.typography.types.headings.configs['heading-xxs'].lineHeight}px`,
|
|
11277
11285
|
'body-xl': `${theme.typography.types.bodies.configs['body-xl'].lineHeight}px`,
|
|
11278
11286
|
'body-l': `${theme.typography.types.bodies.configs['body-l'].lineHeight}px`,
|
|
11279
11287
|
'body-m': `${theme.typography.types.bodies.configs['body-m'].lineHeight}px`,
|
|
@@ -13040,7 +13048,7 @@ function StoryTitleLevel4({
|
|
|
13040
13048
|
return /*#__PURE__*/jsx(View, {
|
|
13041
13049
|
marginBottom: 10,
|
|
13042
13050
|
children: /*#__PURE__*/jsx(Typography.Header4, {
|
|
13043
|
-
base: "
|
|
13051
|
+
base: "heading-s",
|
|
13044
13052
|
color: useStoryBlockColor(color),
|
|
13045
13053
|
numberOfLines: numberOfLines,
|
|
13046
13054
|
children: children
|
|
@@ -13656,7 +13664,7 @@ function ToastContent({
|
|
|
13656
13664
|
flexGrow: 1,
|
|
13657
13665
|
flexShrink: 1,
|
|
13658
13666
|
children: [title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
13659
|
-
base: "
|
|
13667
|
+
base: "heading-xs",
|
|
13660
13668
|
color: "white",
|
|
13661
13669
|
children: title
|
|
13662
13670
|
}) : null, description ? /*#__PURE__*/jsx(Typography.Text, {
|
|
@@ -13672,7 +13680,7 @@ function ToastContent({
|
|
|
13672
13680
|
borderColor: "white",
|
|
13673
13681
|
onPress: onPress,
|
|
13674
13682
|
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
13675
|
-
base: "
|
|
13683
|
+
base: "heading-xs",
|
|
13676
13684
|
color: "white",
|
|
13677
13685
|
children: actionLabel
|
|
13678
13686
|
})
|