@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
|
@@ -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';
|
|
@@ -673,10 +673,6 @@ const button = {
|
|
|
673
673
|
default: 40,
|
|
674
674
|
medium: 48
|
|
675
675
|
},
|
|
676
|
-
minHeight: {
|
|
677
|
-
default: 40,
|
|
678
|
-
medium: 48
|
|
679
|
-
},
|
|
680
676
|
maxHeight: 48,
|
|
681
677
|
icon: {
|
|
682
678
|
medium: {
|
|
@@ -2130,8 +2126,8 @@ const typography = {
|
|
|
2130
2126
|
allowedFontWeights: ['semibold']
|
|
2131
2127
|
},
|
|
2132
2128
|
'heading-l': {
|
|
2133
|
-
fontSize:
|
|
2134
|
-
lineHeight:
|
|
2129
|
+
fontSize: 40,
|
|
2130
|
+
lineHeight: 48,
|
|
2135
2131
|
allowedFontWeights: ['semibold']
|
|
2136
2132
|
},
|
|
2137
2133
|
'heading-m': {
|
|
@@ -2140,19 +2136,14 @@ const typography = {
|
|
|
2140
2136
|
allowedFontWeights: ['semibold']
|
|
2141
2137
|
},
|
|
2142
2138
|
'heading-s': {
|
|
2143
|
-
fontSize:
|
|
2144
|
-
lineHeight:
|
|
2145
|
-
allowedFontWeights: ['
|
|
2139
|
+
fontSize: 18,
|
|
2140
|
+
lineHeight: 20,
|
|
2141
|
+
allowedFontWeights: ['regular', 'bold']
|
|
2146
2142
|
},
|
|
2147
2143
|
'heading-xs': {
|
|
2148
|
-
fontSize: 20,
|
|
2149
|
-
lineHeight: 24,
|
|
2150
|
-
allowedFontWeights: ['semibold']
|
|
2151
|
-
},
|
|
2152
|
-
'heading-xxs': {
|
|
2153
2144
|
fontSize: 16,
|
|
2154
|
-
lineHeight:
|
|
2155
|
-
allowedFontWeights: ['
|
|
2145
|
+
lineHeight: 18,
|
|
2146
|
+
allowedFontWeights: ['regular', 'bold']
|
|
2156
2147
|
}
|
|
2157
2148
|
}
|
|
2158
2149
|
},
|
|
@@ -2219,17 +2210,17 @@ const typography = {
|
|
|
2219
2210
|
configs: {
|
|
2220
2211
|
'label-large': {
|
|
2221
2212
|
fontSize: 16,
|
|
2222
|
-
lineHeight:
|
|
2213
|
+
lineHeight: 24,
|
|
2223
2214
|
allowedFontWeights: ['semibold']
|
|
2224
2215
|
},
|
|
2225
2216
|
'label-medium': {
|
|
2226
2217
|
fontSize: 14,
|
|
2227
|
-
lineHeight:
|
|
2218
|
+
lineHeight: 20,
|
|
2228
2219
|
allowedFontWeights: ['semibold']
|
|
2229
2220
|
},
|
|
2230
2221
|
'label-small': {
|
|
2231
2222
|
fontSize: 12,
|
|
2232
|
-
lineHeight:
|
|
2223
|
+
lineHeight: 16,
|
|
2233
2224
|
allowedFontWeights: ['semibold']
|
|
2234
2225
|
}
|
|
2235
2226
|
}
|
|
@@ -3135,8 +3126,7 @@ function AnimatedContainer$2({
|
|
|
3135
3126
|
borderRadius: 'kitt.button.borderRadius',
|
|
3136
3127
|
backgroundColor: currentBackgroundColor,
|
|
3137
3128
|
width,
|
|
3138
|
-
height
|
|
3139
|
-
minHeight: size === 'default' ? 'kitt.button.minHeight.default' : 'kitt.button.minHeight.medium'
|
|
3129
|
+
height
|
|
3140
3130
|
});
|
|
3141
3131
|
return /*#__PURE__*/jsx(Animated.View, {
|
|
3142
3132
|
style: disabled ? [styles] : [styles, animatedStyles],
|
|
@@ -3854,7 +3844,6 @@ const Button = /*#__PURE__*/forwardRef(({
|
|
|
3854
3844
|
alignSelf: createResponsiveStyleFromProp(stretch, undefined, 'flex-start'),
|
|
3855
3845
|
minWidth: "kitt.button.minWidth",
|
|
3856
3846
|
maxWidth: createResponsiveStyleFromProp(stretch, '100%', 'kitt.button.maxWidth'),
|
|
3857
|
-
minHeight: size === 'default' ? 'kitt.button.minHeight.default' : 'kitt.button.minHeight.medium',
|
|
3858
3847
|
maxHeight: "kitt.button.maxHeight",
|
|
3859
3848
|
width: createResponsiveStyleFromProp(stretch, '100%', 'auto'),
|
|
3860
3849
|
onPress: onPress,
|
|
@@ -4821,6 +4810,7 @@ function AnimatedChoiceItemView({
|
|
|
4821
4810
|
isDisabled,
|
|
4822
4811
|
isSelected,
|
|
4823
4812
|
hasError,
|
|
4813
|
+
shouldExpand = false,
|
|
4824
4814
|
animatedStyles
|
|
4825
4815
|
}) {
|
|
4826
4816
|
const sx = useSx();
|
|
@@ -4839,7 +4829,9 @@ function AnimatedChoiceItemView({
|
|
|
4839
4829
|
isHovered,
|
|
4840
4830
|
isPressed
|
|
4841
4831
|
}),
|
|
4842
|
-
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
|
|
4843
4835
|
});
|
|
4844
4836
|
return /*#__PURE__*/jsx(Animated.View, {
|
|
4845
4837
|
style: [style, animatedStyles],
|
|
@@ -4903,6 +4895,7 @@ function ChoiceItem({
|
|
|
4903
4895
|
value,
|
|
4904
4896
|
selected,
|
|
4905
4897
|
disabled,
|
|
4898
|
+
shouldExpand = false,
|
|
4906
4899
|
children,
|
|
4907
4900
|
isPressedInternal,
|
|
4908
4901
|
isHoveredInternal,
|
|
@@ -4942,6 +4935,8 @@ function ChoiceItem({
|
|
|
4942
4935
|
checked: selected
|
|
4943
4936
|
},
|
|
4944
4937
|
style: style,
|
|
4938
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4939
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4945
4940
|
onBlur: onBlur,
|
|
4946
4941
|
onFocus: onFocus,
|
|
4947
4942
|
onPress: e => {
|
|
@@ -4961,6 +4956,8 @@ function ChoiceItem({
|
|
|
4961
4956
|
});
|
|
4962
4957
|
return /*#__PURE__*/jsxs(VStack, {
|
|
4963
4958
|
space: "kitt.2",
|
|
4959
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4960
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4964
4961
|
children: [/*#__PURE__*/jsxs(AnimatedChoiceItemView, {
|
|
4965
4962
|
animatedStyles: backgroundStyles,
|
|
4966
4963
|
isHovered: isHovered || isHoveredInternal,
|
|
@@ -4968,10 +4965,13 @@ function ChoiceItem({
|
|
|
4968
4965
|
isSelected: selected,
|
|
4969
4966
|
isPressed: isPressed || isPressedInternal,
|
|
4970
4967
|
hasError: hasError,
|
|
4968
|
+
shouldExpand: shouldExpand,
|
|
4971
4969
|
size: size,
|
|
4972
4970
|
children: [/*#__PURE__*/jsxs(Stack, {
|
|
4973
4971
|
alignItems: "center",
|
|
4974
4972
|
space: "kitt.2",
|
|
4973
|
+
flexGrow: shouldExpand ? 1 : undefined,
|
|
4974
|
+
flexShrink: shouldExpand ? 1 : undefined,
|
|
4975
4975
|
children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
|
|
4976
4976
|
color: textColor,
|
|
4977
4977
|
icon: icon
|
|
@@ -5000,36 +5000,49 @@ function ChoiceItem({
|
|
|
5000
5000
|
function ChoiceItemContainer({
|
|
5001
5001
|
children,
|
|
5002
5002
|
direction,
|
|
5003
|
+
shouldExpand,
|
|
5003
5004
|
isLast
|
|
5004
5005
|
}) {
|
|
5005
5006
|
const currentItemMarginValue = isLast ? undefined : 'kitt.3';
|
|
5006
|
-
const
|
|
5007
|
+
const directionFlexProps = direction === 'row' ? {
|
|
5007
5008
|
flexGrow: 1,
|
|
5008
5009
|
flexShrink: 1,
|
|
5009
5010
|
flexBasis: 0
|
|
5010
5011
|
} : {};
|
|
5012
|
+
const shouldExpandFlexProps = shouldExpand ? {
|
|
5013
|
+
flexGrow: 1,
|
|
5014
|
+
flexShrink: 1
|
|
5015
|
+
} : {};
|
|
5011
5016
|
return /*#__PURE__*/jsx(View, {
|
|
5012
5017
|
marginRight: direction === 'row' ? currentItemMarginValue : undefined,
|
|
5013
5018
|
marginBottom: direction === 'column' ? currentItemMarginValue : undefined,
|
|
5014
|
-
...
|
|
5019
|
+
...directionFlexProps,
|
|
5020
|
+
...shouldExpandFlexProps,
|
|
5015
5021
|
children: children
|
|
5016
5022
|
});
|
|
5017
5023
|
}
|
|
5018
5024
|
|
|
5019
5025
|
function ChoicesContainer({
|
|
5020
5026
|
direction,
|
|
5027
|
+
shouldExpand,
|
|
5021
5028
|
contentContainerStyle,
|
|
5022
5029
|
...props
|
|
5023
5030
|
}) {
|
|
5031
|
+
const shouldExpandFlexProps = shouldExpand ? {
|
|
5032
|
+
flexGrow: 1,
|
|
5033
|
+
flexShrink: 1
|
|
5034
|
+
} : {};
|
|
5024
5035
|
if (direction === 'row') {
|
|
5025
|
-
return /*#__PURE__*/jsx(ScrollView
|
|
5036
|
+
return /*#__PURE__*/jsx(ScrollView, {
|
|
5026
5037
|
horizontal: true,
|
|
5027
|
-
contentContainerStyle: contentContainerStyle,
|
|
5028
|
-
...props
|
|
5038
|
+
contentContainerStyle: shouldExpand ? shouldExpandFlexProps : contentContainerStyle,
|
|
5039
|
+
...props,
|
|
5040
|
+
...shouldExpandFlexProps
|
|
5029
5041
|
});
|
|
5030
5042
|
}
|
|
5031
|
-
return /*#__PURE__*/jsx(View
|
|
5032
|
-
...props
|
|
5043
|
+
return /*#__PURE__*/jsx(View, {
|
|
5044
|
+
...props,
|
|
5045
|
+
...shouldExpandFlexProps
|
|
5033
5046
|
});
|
|
5034
5047
|
}
|
|
5035
5048
|
|
|
@@ -5041,6 +5054,7 @@ function Choices({
|
|
|
5041
5054
|
type,
|
|
5042
5055
|
direction = 'column',
|
|
5043
5056
|
disabled,
|
|
5057
|
+
shouldExpand = false,
|
|
5044
5058
|
children,
|
|
5045
5059
|
value,
|
|
5046
5060
|
onPress,
|
|
@@ -5057,6 +5071,7 @@ function Choices({
|
|
|
5057
5071
|
const sharedProps = {
|
|
5058
5072
|
type,
|
|
5059
5073
|
disabled,
|
|
5074
|
+
shouldExpand,
|
|
5060
5075
|
onPress: !isForm ? onPress : undefined,
|
|
5061
5076
|
onChange: isForm ? newValue => {
|
|
5062
5077
|
setCurrentValue(newValue);
|
|
@@ -5068,6 +5083,7 @@ function Choices({
|
|
|
5068
5083
|
};
|
|
5069
5084
|
return /*#__PURE__*/jsx(ChoicesContainer, {
|
|
5070
5085
|
direction: direction,
|
|
5086
|
+
shouldExpand: shouldExpand,
|
|
5071
5087
|
testID: testID,
|
|
5072
5088
|
id: id,
|
|
5073
5089
|
style: style,
|
|
@@ -5079,6 +5095,7 @@ function Choices({
|
|
|
5079
5095
|
});
|
|
5080
5096
|
return /*#__PURE__*/jsx(ChoiceItemContainer, {
|
|
5081
5097
|
direction: direction,
|
|
5098
|
+
shouldExpand: shouldExpand,
|
|
5082
5099
|
isLast: index === childrenArray.length - 1,
|
|
5083
5100
|
children: element
|
|
5084
5101
|
}, child.key);
|
|
@@ -10610,10 +10627,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10610
10627
|
button: {
|
|
10611
10628
|
minWidth: theme.button.minWidth,
|
|
10612
10629
|
maxWidth: theme.button.maxWidth,
|
|
10613
|
-
minHeight: {
|
|
10614
|
-
default: theme.button.minHeight.default,
|
|
10615
|
-
medium: theme.button.minHeight.medium
|
|
10616
|
-
},
|
|
10617
10630
|
maxHeight: theme.button.maxHeight,
|
|
10618
10631
|
height: {
|
|
10619
10632
|
default: theme.button.height.default,
|
|
@@ -11235,7 +11248,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
11235
11248
|
'heading-m': `${theme.typography.types.headings.configs['heading-m'].fontSize}px`,
|
|
11236
11249
|
'heading-s': `${theme.typography.types.headings.configs['heading-s'].fontSize}px`,
|
|
11237
11250
|
'heading-xs': `${theme.typography.types.headings.configs['heading-xs'].fontSize}px`,
|
|
11238
|
-
'heading-xxs': `${theme.typography.types.headings.configs['heading-xxs'].fontSize}px`,
|
|
11239
11251
|
'body-xl': `${theme.typography.types.bodies.configs['body-xl'].fontSize}px`,
|
|
11240
11252
|
'body-l': `${theme.typography.types.bodies.configs['body-l'].fontSize}px`,
|
|
11241
11253
|
'body-m': `${theme.typography.types.bodies.configs['body-m'].fontSize}px`,
|
|
@@ -11259,7 +11271,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
11259
11271
|
'heading-m': `${theme.typography.types.headings.configs['heading-m'].lineHeight}px`,
|
|
11260
11272
|
'heading-s': `${theme.typography.types.headings.configs['heading-s'].lineHeight}px`,
|
|
11261
11273
|
'heading-xs': `${theme.typography.types.headings.configs['heading-xs'].lineHeight}px`,
|
|
11262
|
-
'heading-xxs': `${theme.typography.types.headings.configs['heading-xxs'].lineHeight}px`,
|
|
11263
11274
|
'body-xl': `${theme.typography.types.bodies.configs['body-xl'].lineHeight}px`,
|
|
11264
11275
|
'body-l': `${theme.typography.types.bodies.configs['body-l'].lineHeight}px`,
|
|
11265
11276
|
'body-m': `${theme.typography.types.bodies.configs['body-m'].lineHeight}px`,
|
|
@@ -13031,7 +13042,7 @@ function StoryTitleLevel4({
|
|
|
13031
13042
|
return /*#__PURE__*/jsx(View, {
|
|
13032
13043
|
marginBottom: 10,
|
|
13033
13044
|
children: /*#__PURE__*/jsx(Typography.Header4, {
|
|
13034
|
-
base: "
|
|
13045
|
+
base: "heading-s",
|
|
13035
13046
|
color: useStoryBlockColor(color),
|
|
13036
13047
|
numberOfLines: numberOfLines,
|
|
13037
13048
|
children: children
|
|
@@ -13639,7 +13650,7 @@ function ToastContent({
|
|
|
13639
13650
|
flexGrow: 1,
|
|
13640
13651
|
flexShrink: 1,
|
|
13641
13652
|
children: [title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
13642
|
-
base: "
|
|
13653
|
+
base: "heading-xs",
|
|
13643
13654
|
color: "white",
|
|
13644
13655
|
children: title
|
|
13645
13656
|
}) : null, description ? /*#__PURE__*/jsx(Typography.Text, {
|
|
@@ -13655,7 +13666,7 @@ function ToastContent({
|
|
|
13655
13666
|
borderColor: "white",
|
|
13656
13667
|
onPress: onPress,
|
|
13657
13668
|
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
13658
|
-
base: "
|
|
13669
|
+
base: "heading-xs",
|
|
13659
13670
|
color: "white",
|
|
13660
13671
|
children: actionLabel
|
|
13661
13672
|
})
|