@ornikar/kitt-universal 9.1.3 → 9.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.
@@ -170,6 +170,14 @@ function Typography({
170
170
  base: baseOrDefaultToBody
171
171
  });
172
172
 
173
+ if (process.env.NODE_ENV !== 'production') {
174
+ Object.entries(type).forEach(([key, value]) => {
175
+ if (value && isTypeHeader(value) !== isHeader) {
176
+ throw new Error(`Invalid value for "${key}": "${value}" is ${isHeader ? 'not' : ''} an header. Don't mix headers and bodies.`);
177
+ }
178
+ });
179
+ }
180
+
173
181
  const text = /*#__PURE__*/jsxRuntime.jsx(nativeBase.Text, {
174
182
  accessibilityRole: accessibilityRole || undefined,
175
183
  fontSize: fontSizeForNativeBase,
@@ -878,15 +886,15 @@ function ExternalAppLink({
878
886
  const canOpen = await BabelPluginStyledComponentsReactNative.Linking.canOpenURL(href);
879
887
 
880
888
  if (canOpen) {
881
- BabelPluginStyledComponentsReactNative.Linking.openURL(href).catch(err => {
882
- console.error(`An error occurred while opening ${href}`, err);
883
- onOpenAppError?.(`An error occurred while opening ${href}`);
884
- });
885
-
886
889
  if (onPress) {
887
890
  onPress(e);
888
891
  if (e?.defaultPrevented) return;
889
892
  }
893
+
894
+ BabelPluginStyledComponentsReactNative.Linking.openURL(href).catch(err => {
895
+ console.error(`An error occurred while opening ${href}`, err);
896
+ onOpenAppError?.(`An error occurred while opening ${href}`);
897
+ });
890
898
  } else {
891
899
  onOpenAppError?.(`Cannot open url: ${href}`);
892
900
  }
@@ -3039,7 +3047,7 @@ const createKittSpaces = spacing => {
3039
3047
 
3040
3048
  const createKittNativeBaseCustomTheme = theme => {
3041
3049
  const spaces = createKittSpaces(theme.spacing);
3042
- return nativeBase.extendTheme({
3050
+ const extendedTheme = nativeBase.extendTheme({
3043
3051
  colors: {
3044
3052
  kitt: { ...theme.colors,
3045
3053
  typography: theme.typography.colors
@@ -3149,6 +3157,9 @@ const createKittNativeBaseCustomTheme = theme => {
3149
3157
  }
3150
3158
  }
3151
3159
  });
3160
+ return { ...extendedTheme,
3161
+ space: extendedTheme.space
3162
+ };
3152
3163
  };
3153
3164
  function KittNativeBaseProvider({
3154
3165
  theme,
@@ -3164,6 +3175,14 @@ function KittNativeBaseProvider({
3164
3175
  });
3165
3176
  }
3166
3177
 
3178
+ const Stack = nativeBase.Stack;
3179
+ const VStack = nativeBase.VStack;
3180
+ const HStack = nativeBase.HStack;
3181
+
3182
+ const View = nativeBase.View;
3183
+ const ScrollView = nativeBase.ScrollView;
3184
+ const Pressable = nativeBase.Pressable;
3185
+
3167
3186
  function Notification({
3168
3187
  type,
3169
3188
  children,
@@ -4149,6 +4168,7 @@ exports.ExternalAppLink = ExternalAppLink;
4149
4168
  exports.ExternalLink = ExternalLink;
4150
4169
  exports.Flex = Flex;
4151
4170
  exports.FullScreenModal = FullScreenModal;
4171
+ exports.HStack = HStack;
4152
4172
  exports.Icon = Icon;
4153
4173
  exports.IconButton = IconButton;
4154
4174
  exports.InputEmail = InputEmail;
@@ -4175,10 +4195,13 @@ exports.Notification = Notification;
4175
4195
  exports.Overlay = Overlay;
4176
4196
  exports.PageLoader = PageLoader;
4177
4197
  exports.Picker = Picker;
4198
+ exports.Pressable = Pressable;
4178
4199
  exports.Radio = Radio;
4200
+ exports.ScrollView = ScrollView;
4179
4201
  exports.Section = DeprecatedSection;
4180
4202
  exports.Skeleton = Skeleton;
4181
4203
  exports.SpinningIcon = SpinningIcon;
4204
+ exports.Stack = Stack;
4182
4205
  exports.Story = Story;
4183
4206
  exports.StoryBlock = StoryBlock;
4184
4207
  exports.StoryContainer = StoryContainer;
@@ -4195,6 +4218,8 @@ exports.Typography = Typography;
4195
4218
  exports.TypographyEmoji = TypographyEmoji;
4196
4219
  exports.TypographyIcon = TypographyIcon;
4197
4220
  exports.TypographyLink = TypographyLink;
4221
+ exports.VStack = VStack;
4222
+ exports.View = View;
4198
4223
  exports.createWindowSizeHelper = createWindowSizeHelper;
4199
4224
  exports.hex2rgba = hex2rgba;
4200
4225
  exports.matchWindowSize = matchWindowSize;