@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.
Files changed (58) hide show
  1. package/CHANGELOG.md +3 -8
  2. package/dist/definitions/Button/AnimatedContainer.d.ts.map +1 -1
  3. package/dist/definitions/Button/AnimatedContainer.web.d.ts.map +1 -1
  4. package/dist/definitions/Button/Button.d.ts.map +1 -1
  5. package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts +2 -1
  6. package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts.map +1 -1
  7. package/dist/definitions/Choices/AnimatedChoiceItemView.web.d.ts +1 -1
  8. package/dist/definitions/Choices/AnimatedChoiceItemView.web.d.ts.map +1 -1
  9. package/dist/definitions/Choices/ChoiceItem.d.ts +2 -1
  10. package/dist/definitions/Choices/ChoiceItem.d.ts.map +1 -1
  11. package/dist/definitions/Choices/ChoiceItemContainer.d.ts +2 -1
  12. package/dist/definitions/Choices/ChoiceItemContainer.d.ts.map +1 -1
  13. package/dist/definitions/Choices/Choices.d.ts +5 -5
  14. package/dist/definitions/Choices/Choices.d.ts.map +1 -1
  15. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +3 -9
  16. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  17. package/dist/definitions/themes/default.d.ts +0 -5
  18. package/dist/definitions/themes/default.d.ts.map +1 -1
  19. package/dist/definitions/themes/late-ocean/button.d.ts +0 -3
  20. package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
  21. package/dist/definitions/themes/late-ocean/typography.d.ts +0 -5
  22. package/dist/definitions/themes/late-ocean/typography.d.ts.map +1 -1
  23. package/dist/definitions/typography/Typography.d.ts +1 -1
  24. package/dist/definitions/typography/Typography.d.ts.map +1 -1
  25. package/dist/index-metro.es.android.js +49 -41
  26. package/dist/index-metro.es.android.js.map +1 -1
  27. package/dist/index-metro.es.ios.js +49 -41
  28. package/dist/index-metro.es.ios.js.map +1 -1
  29. package/dist/index-node-22.17.cjs.js +50 -39
  30. package/dist/index-node-22.17.cjs.js.map +1 -1
  31. package/dist/index-node-22.17.cjs.web.js +49 -39
  32. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  33. package/dist/index-node-22.17.es.mjs +51 -40
  34. package/dist/index-node-22.17.es.mjs.map +1 -1
  35. package/dist/index-node-22.17.es.web.mjs +50 -40
  36. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  37. package/dist/index.es.js +52 -41
  38. package/dist/index.es.js.map +1 -1
  39. package/dist/index.es.web.js +51 -41
  40. package/dist/index.es.web.js.map +1 -1
  41. package/dist/linaria-themes-metro.es.android.js +10 -19
  42. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  43. package/dist/linaria-themes-metro.es.ios.js +10 -19
  44. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  45. package/dist/linaria-themes-node-22.17.cjs.js +10 -19
  46. package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
  47. package/dist/linaria-themes-node-22.17.cjs.web.js +10 -19
  48. package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
  49. package/dist/linaria-themes-node-22.17.es.mjs +10 -19
  50. package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
  51. package/dist/linaria-themes-node-22.17.es.web.mjs +10 -19
  52. package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
  53. package/dist/linaria-themes.es.js +10 -19
  54. package/dist/linaria-themes.es.js.map +1 -1
  55. package/dist/linaria-themes.es.web.js +10 -19
  56. package/dist/linaria-themes.es.web.js.map +1 -1
  57. package/dist/tsbuildinfo +1 -1
  58. 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 { 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';
6
- import { Animated, Easing, ScrollView as ScrollView$2, View as View$2, StyleSheet, Modal, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
6
+ import { Animated, Easing, StyleSheet, Modal, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
7
7
  export { useWindowDimensions as useWindowSize } from 'react-native';
8
8
  import { createPortal } from 'react-dom';
9
9
  import { CSSTransition } from 'react-transition-group';
@@ -671,10 +671,6 @@ const button = {
671
671
  default: 40,
672
672
  medium: 48
673
673
  },
674
- minHeight: {
675
- default: 40,
676
- medium: 48
677
- },
678
674
  maxHeight: 48,
679
675
  icon: {
680
676
  medium: {
@@ -2128,8 +2124,8 @@ const typography = {
2128
2124
  allowedFontWeights: ['semibold']
2129
2125
  },
2130
2126
  'heading-l': {
2131
- fontSize: 38,
2132
- lineHeight: 44,
2127
+ fontSize: 40,
2128
+ lineHeight: 48,
2133
2129
  allowedFontWeights: ['semibold']
2134
2130
  },
2135
2131
  'heading-m': {
@@ -2138,19 +2134,14 @@ const typography = {
2138
2134
  allowedFontWeights: ['semibold']
2139
2135
  },
2140
2136
  'heading-s': {
2141
- fontSize: 24,
2142
- lineHeight: 28,
2143
- allowedFontWeights: ['semibold']
2137
+ fontSize: 18,
2138
+ lineHeight: 20,
2139
+ allowedFontWeights: ['regular', 'bold']
2144
2140
  },
2145
2141
  'heading-xs': {
2146
- fontSize: 20,
2147
- lineHeight: 24,
2148
- allowedFontWeights: ['semibold']
2149
- },
2150
- 'heading-xxs': {
2151
2142
  fontSize: 16,
2152
- lineHeight: 20,
2153
- allowedFontWeights: ['semibold']
2143
+ lineHeight: 18,
2144
+ allowedFontWeights: ['regular', 'bold']
2154
2145
  }
2155
2146
  }
2156
2147
  },
@@ -2217,17 +2208,17 @@ const typography = {
2217
2208
  configs: {
2218
2209
  'label-large': {
2219
2210
  fontSize: 16,
2220
- lineHeight: 20,
2211
+ lineHeight: 24,
2221
2212
  allowedFontWeights: ['semibold']
2222
2213
  },
2223
2214
  'label-medium': {
2224
2215
  fontSize: 14,
2225
- lineHeight: 18,
2216
+ lineHeight: 20,
2226
2217
  allowedFontWeights: ['semibold']
2227
2218
  },
2228
2219
  'label-small': {
2229
2220
  fontSize: 12,
2230
- lineHeight: 14,
2221
+ lineHeight: 16,
2231
2222
  allowedFontWeights: ['semibold']
2232
2223
  }
2233
2224
  }
@@ -3145,9 +3136,7 @@ function AnimatedContainer$2({
3145
3136
  },
3146
3137
  width: width,
3147
3138
  height: height,
3148
- minHeight: size === 'default' ? 'kitt.button.minHeight.default' : 'kitt.button.minHeight.medium',
3149
3139
  alignSelf: "baseline",
3150
- justifyContent: "center",
3151
3140
  borderRadius: "kitt.button.borderRadius",
3152
3141
  backgroundColor: currentBackgroundColor,
3153
3142
  children: children
@@ -3843,7 +3832,6 @@ const Button = /*#__PURE__*/forwardRef(({
3843
3832
  alignSelf: createResponsiveStyleFromProp(stretch, undefined, 'flex-start'),
3844
3833
  minWidth: "kitt.button.minWidth",
3845
3834
  maxWidth: createResponsiveStyleFromProp(stretch, '100%', 'kitt.button.maxWidth'),
3846
- minHeight: size === 'default' ? 'kitt.button.minHeight.default' : 'kitt.button.minHeight.medium',
3847
3835
  maxHeight: "kitt.button.maxHeight",
3848
3836
  width: createResponsiveStyleFromProp(stretch, '100%', 'auto'),
3849
3837
  onPress: onPress,
@@ -4709,7 +4697,8 @@ function AnimatedChoiceItemView({
4709
4697
  isPressed,
4710
4698
  isDisabled,
4711
4699
  isSelected,
4712
- hasError
4700
+ hasError,
4701
+ shouldExpand = false
4713
4702
  }) {
4714
4703
  const theme = useTheme();
4715
4704
  return /*#__PURE__*/jsx(View, {
@@ -4728,6 +4717,8 @@ function AnimatedChoiceItemView({
4728
4717
  isPressed
4729
4718
  }),
4730
4719
  padding: size === 'small' ? 'kitt.2' : 'kitt.4',
4720
+ flexGrow: shouldExpand ? 1 : undefined,
4721
+ flexShrink: shouldExpand ? 1 : undefined,
4731
4722
  _web: {
4732
4723
  style: {
4733
4724
  transitionProperty: theme.kitt.choices.item.transition.property,
@@ -4763,6 +4754,7 @@ function ChoiceItem({
4763
4754
  value,
4764
4755
  selected,
4765
4756
  disabled,
4757
+ shouldExpand = false,
4766
4758
  children,
4767
4759
  isPressedInternal,
4768
4760
  isHoveredInternal,
@@ -4798,6 +4790,8 @@ function ChoiceItem({
4798
4790
  checked: selected
4799
4791
  },
4800
4792
  style: style,
4793
+ flexGrow: shouldExpand ? 1 : undefined,
4794
+ flexShrink: shouldExpand ? 1 : undefined,
4801
4795
  onBlur: onBlur,
4802
4796
  onFocus: onFocus,
4803
4797
  onPress: e => {
@@ -4817,6 +4811,8 @@ function ChoiceItem({
4817
4811
  });
4818
4812
  return /*#__PURE__*/jsxs(VStack, {
4819
4813
  space: "kitt.2",
4814
+ flexGrow: shouldExpand ? 1 : undefined,
4815
+ flexShrink: shouldExpand ? 1 : undefined,
4820
4816
  children: [/*#__PURE__*/jsxs(AnimatedChoiceItemView, {
4821
4817
  animatedStyles: backgroundStyles,
4822
4818
  isHovered: isHovered || isHoveredInternal,
@@ -4824,10 +4820,13 @@ function ChoiceItem({
4824
4820
  isSelected: selected,
4825
4821
  isPressed: isPressed || isPressedInternal,
4826
4822
  hasError: hasError,
4823
+ shouldExpand: shouldExpand,
4827
4824
  size: size,
4828
4825
  children: [/*#__PURE__*/jsxs(Stack, {
4829
4826
  alignItems: "center",
4830
4827
  space: "kitt.2",
4828
+ flexGrow: shouldExpand ? 1 : undefined,
4829
+ flexShrink: shouldExpand ? 1 : undefined,
4831
4830
  children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
4832
4831
  color: textColor,
4833
4832
  icon: icon
@@ -4856,36 +4855,49 @@ function ChoiceItem({
4856
4855
  function ChoiceItemContainer({
4857
4856
  children,
4858
4857
  direction,
4858
+ shouldExpand,
4859
4859
  isLast
4860
4860
  }) {
4861
4861
  const currentItemMarginValue = isLast ? undefined : 'kitt.3';
4862
- const flexProps = direction === 'row' ? {
4862
+ const directionFlexProps = direction === 'row' ? {
4863
4863
  flexGrow: 1,
4864
4864
  flexShrink: 1,
4865
4865
  flexBasis: 0
4866
4866
  } : {};
4867
+ const shouldExpandFlexProps = shouldExpand ? {
4868
+ flexGrow: 1,
4869
+ flexShrink: 1
4870
+ } : {};
4867
4871
  return /*#__PURE__*/jsx(View, {
4868
4872
  marginRight: direction === 'row' ? currentItemMarginValue : undefined,
4869
4873
  marginBottom: direction === 'column' ? currentItemMarginValue : undefined,
4870
- ...flexProps,
4874
+ ...directionFlexProps,
4875
+ ...shouldExpandFlexProps,
4871
4876
  children: children
4872
4877
  });
4873
4878
  }
4874
4879
 
4875
4880
  function ChoicesContainer({
4876
4881
  direction,
4882
+ shouldExpand,
4877
4883
  contentContainerStyle,
4878
4884
  ...props
4879
4885
  }) {
4886
+ const shouldExpandFlexProps = shouldExpand ? {
4887
+ flexGrow: 1,
4888
+ flexShrink: 1
4889
+ } : {};
4880
4890
  if (direction === 'row') {
4881
- return /*#__PURE__*/jsx(ScrollView$2, {
4891
+ return /*#__PURE__*/jsx(ScrollView, {
4882
4892
  horizontal: true,
4883
- contentContainerStyle: contentContainerStyle,
4884
- ...props
4893
+ contentContainerStyle: shouldExpand ? shouldExpandFlexProps : contentContainerStyle,
4894
+ ...props,
4895
+ ...shouldExpandFlexProps
4885
4896
  });
4886
4897
  }
4887
- return /*#__PURE__*/jsx(View$2, {
4888
- ...props
4898
+ return /*#__PURE__*/jsx(View, {
4899
+ ...props,
4900
+ ...shouldExpandFlexProps
4889
4901
  });
4890
4902
  }
4891
4903
 
@@ -4897,6 +4909,7 @@ function Choices({
4897
4909
  type,
4898
4910
  direction = 'column',
4899
4911
  disabled,
4912
+ shouldExpand = false,
4900
4913
  children,
4901
4914
  value,
4902
4915
  onPress,
@@ -4913,6 +4926,7 @@ function Choices({
4913
4926
  const sharedProps = {
4914
4927
  type,
4915
4928
  disabled,
4929
+ shouldExpand,
4916
4930
  onPress: !isForm ? onPress : undefined,
4917
4931
  onChange: isForm ? newValue => {
4918
4932
  setCurrentValue(newValue);
@@ -4924,6 +4938,7 @@ function Choices({
4924
4938
  };
4925
4939
  return /*#__PURE__*/jsx(ChoicesContainer, {
4926
4940
  direction: direction,
4941
+ shouldExpand: shouldExpand,
4927
4942
  testID: testID,
4928
4943
  id: id,
4929
4944
  style: style,
@@ -4935,6 +4950,7 @@ function Choices({
4935
4950
  });
4936
4951
  return /*#__PURE__*/jsx(ChoiceItemContainer, {
4937
4952
  direction: direction,
4953
+ shouldExpand: shouldExpand,
4938
4954
  isLast: index === childrenArray.length - 1,
4939
4955
  children: element
4940
4956
  }, child.key);
@@ -9924,10 +9940,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
9924
9940
  button: {
9925
9941
  minWidth: theme.button.minWidth,
9926
9942
  maxWidth: theme.button.maxWidth,
9927
- minHeight: {
9928
- default: theme.button.minHeight.default,
9929
- medium: theme.button.minHeight.medium
9930
- },
9931
9943
  maxHeight: theme.button.maxHeight,
9932
9944
  height: {
9933
9945
  default: theme.button.height.default,
@@ -10549,7 +10561,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
10549
10561
  'heading-m': `${theme.typography.types.headings.configs['heading-m'].fontSize}px`,
10550
10562
  'heading-s': `${theme.typography.types.headings.configs['heading-s'].fontSize}px`,
10551
10563
  'heading-xs': `${theme.typography.types.headings.configs['heading-xs'].fontSize}px`,
10552
- 'heading-xxs': `${theme.typography.types.headings.configs['heading-xxs'].fontSize}px`,
10553
10564
  'body-xl': `${theme.typography.types.bodies.configs['body-xl'].fontSize}px`,
10554
10565
  'body-l': `${theme.typography.types.bodies.configs['body-l'].fontSize}px`,
10555
10566
  'body-m': `${theme.typography.types.bodies.configs['body-m'].fontSize}px`,
@@ -10573,7 +10584,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
10573
10584
  'heading-m': `${theme.typography.types.headings.configs['heading-m'].lineHeight}px`,
10574
10585
  'heading-s': `${theme.typography.types.headings.configs['heading-s'].lineHeight}px`,
10575
10586
  'heading-xs': `${theme.typography.types.headings.configs['heading-xs'].lineHeight}px`,
10576
- 'heading-xxs': `${theme.typography.types.headings.configs['heading-xxs'].lineHeight}px`,
10577
10587
  'body-xl': `${theme.typography.types.bodies.configs['body-xl'].lineHeight}px`,
10578
10588
  'body-l': `${theme.typography.types.bodies.configs['body-l'].lineHeight}px`,
10579
10589
  'body-m': `${theme.typography.types.bodies.configs['body-m'].lineHeight}px`,
@@ -12401,7 +12411,7 @@ function StoryTitleLevel4({
12401
12411
  return /*#__PURE__*/jsx(View, {
12402
12412
  marginBottom: 10,
12403
12413
  children: /*#__PURE__*/jsx(Typography.Header4, {
12404
- base: "body-l",
12414
+ base: "heading-s",
12405
12415
  color: useStoryBlockColor(color),
12406
12416
  numberOfLines: numberOfLines,
12407
12417
  children: children
@@ -12950,7 +12960,7 @@ function ToastContent({
12950
12960
  flexGrow: 1,
12951
12961
  flexShrink: 1,
12952
12962
  children: [title ? /*#__PURE__*/jsx(Typography.Text, {
12953
- base: "body-m",
12963
+ base: "heading-xs",
12954
12964
  color: "white",
12955
12965
  children: title
12956
12966
  }) : null, description ? /*#__PURE__*/jsx(Typography.Text, {
@@ -12966,7 +12976,7 @@ function ToastContent({
12966
12976
  borderColor: "white",
12967
12977
  onPress: onPress,
12968
12978
  children: /*#__PURE__*/jsx(Typography.Text, {
12969
- base: "body-m",
12979
+ base: "heading-xs",
12970
12980
  color: "white",
12971
12981
  children: actionLabel
12972
12982
  })