@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
@@ -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, ScrollView as ScrollView$2, View as View$2, StyleSheet, Modal, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
14
+ import { Animated, Easing, 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';
@@ -689,10 +689,6 @@ var button = {
689
689
  "default": 40,
690
690
  medium: 48
691
691
  },
692
- minHeight: {
693
- "default": 40,
694
- medium: 48
695
- },
696
692
  maxHeight: 48,
697
693
  icon: {
698
694
  medium: {
@@ -2146,8 +2142,8 @@ var typography = {
2146
2142
  allowedFontWeights: ['semibold']
2147
2143
  },
2148
2144
  'heading-l': {
2149
- fontSize: 38,
2150
- lineHeight: 44,
2145
+ fontSize: 40,
2146
+ lineHeight: 48,
2151
2147
  allowedFontWeights: ['semibold']
2152
2148
  },
2153
2149
  'heading-m': {
@@ -2156,19 +2152,14 @@ var typography = {
2156
2152
  allowedFontWeights: ['semibold']
2157
2153
  },
2158
2154
  'heading-s': {
2159
- fontSize: 24,
2160
- lineHeight: 28,
2161
- allowedFontWeights: ['semibold']
2155
+ fontSize: 18,
2156
+ lineHeight: 20,
2157
+ allowedFontWeights: ['regular', 'bold']
2162
2158
  },
2163
2159
  'heading-xs': {
2164
- fontSize: 20,
2165
- lineHeight: 24,
2166
- allowedFontWeights: ['semibold']
2167
- },
2168
- 'heading-xxs': {
2169
2160
  fontSize: 16,
2170
- lineHeight: 20,
2171
- allowedFontWeights: ['semibold']
2161
+ lineHeight: 18,
2162
+ allowedFontWeights: ['regular', 'bold']
2172
2163
  }
2173
2164
  }
2174
2165
  },
@@ -2235,17 +2226,17 @@ var typography = {
2235
2226
  configs: {
2236
2227
  'label-large': {
2237
2228
  fontSize: 16,
2238
- lineHeight: 20,
2229
+ lineHeight: 24,
2239
2230
  allowedFontWeights: ['semibold']
2240
2231
  },
2241
2232
  'label-medium': {
2242
2233
  fontSize: 14,
2243
- lineHeight: 18,
2234
+ lineHeight: 20,
2244
2235
  allowedFontWeights: ['semibold']
2245
2236
  },
2246
2237
  'label-small': {
2247
2238
  fontSize: 12,
2248
- lineHeight: 14,
2239
+ lineHeight: 16,
2249
2240
  allowedFontWeights: ['semibold']
2250
2241
  }
2251
2242
  }
@@ -3166,9 +3157,7 @@ function AnimatedContainer$2(_ref) {
3166
3157
  },
3167
3158
  width: width,
3168
3159
  height: height,
3169
- minHeight: size === 'default' ? 'kitt.button.minHeight.default' : 'kitt.button.minHeight.medium',
3170
3160
  alignSelf: "baseline",
3171
- justifyContent: "center",
3172
3161
  borderRadius: "kitt.button.borderRadius",
3173
3162
  backgroundColor: currentBackgroundColor,
3174
3163
  children: children
@@ -3867,7 +3856,6 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
3867
3856
  alignSelf: createResponsiveStyleFromProp(stretch, undefined, 'flex-start'),
3868
3857
  minWidth: "kitt.button.minWidth",
3869
3858
  maxWidth: createResponsiveStyleFromProp(stretch, '100%', 'kitt.button.maxWidth'),
3870
- minHeight: size === 'default' ? 'kitt.button.minHeight.default' : 'kitt.button.minHeight.medium',
3871
3859
  maxHeight: "kitt.button.maxHeight",
3872
3860
  width: createResponsiveStyleFromProp(stretch, '100%', 'auto'),
3873
3861
  onPress: onPress,
@@ -4750,7 +4738,9 @@ function AnimatedChoiceItemView(_ref) {
4750
4738
  isPressed = _ref.isPressed,
4751
4739
  isDisabled = _ref.isDisabled,
4752
4740
  isSelected = _ref.isSelected,
4753
- hasError = _ref.hasError;
4741
+ hasError = _ref.hasError,
4742
+ _ref$shouldExpand = _ref.shouldExpand,
4743
+ shouldExpand = _ref$shouldExpand === void 0 ? false : _ref$shouldExpand;
4754
4744
  var theme = useTheme();
4755
4745
  return /*#__PURE__*/jsx(View, {
4756
4746
  position: "relative",
@@ -4768,6 +4758,8 @@ function AnimatedChoiceItemView(_ref) {
4768
4758
  isPressed: isPressed
4769
4759
  }),
4770
4760
  padding: size === 'small' ? 'kitt.2' : 'kitt.4',
4761
+ flexGrow: shouldExpand ? 1 : undefined,
4762
+ flexShrink: shouldExpand ? 1 : undefined,
4771
4763
  _web: {
4772
4764
  style: {
4773
4765
  transitionProperty: theme.kitt.choices.item.transition.property,
@@ -4804,6 +4796,8 @@ function ChoiceItem(_ref) {
4804
4796
  value = _ref.value,
4805
4797
  selected = _ref.selected,
4806
4798
  disabled = _ref.disabled,
4799
+ _ref$shouldExpand = _ref.shouldExpand,
4800
+ shouldExpand = _ref$shouldExpand === void 0 ? false : _ref$shouldExpand,
4807
4801
  _children = _ref.children,
4808
4802
  isPressedInternal = _ref.isPressedInternal,
4809
4803
  isHoveredInternal = _ref.isHoveredInternal,
@@ -4837,6 +4831,8 @@ function ChoiceItem(_ref) {
4837
4831
  checked: selected
4838
4832
  },
4839
4833
  style: style,
4834
+ flexGrow: shouldExpand ? 1 : undefined,
4835
+ flexShrink: shouldExpand ? 1 : undefined,
4840
4836
  onBlur: onBlur,
4841
4837
  onFocus: onFocus,
4842
4838
  onPress: function (e) {
@@ -4855,6 +4851,8 @@ function ChoiceItem(_ref) {
4855
4851
  });
4856
4852
  return /*#__PURE__*/jsxs(VStack, {
4857
4853
  space: "kitt.2",
4854
+ flexGrow: shouldExpand ? 1 : undefined,
4855
+ flexShrink: shouldExpand ? 1 : undefined,
4858
4856
  children: [/*#__PURE__*/jsxs(AnimatedChoiceItemView, {
4859
4857
  animatedStyles: backgroundStyles,
4860
4858
  isHovered: isHovered || isHoveredInternal,
@@ -4862,10 +4860,13 @@ function ChoiceItem(_ref) {
4862
4860
  isSelected: selected,
4863
4861
  isPressed: isPressed || isPressedInternal,
4864
4862
  hasError: hasError,
4863
+ shouldExpand: shouldExpand,
4865
4864
  size: size,
4866
4865
  children: [/*#__PURE__*/jsxs(Stack, {
4867
4866
  alignItems: "center",
4868
4867
  space: "kitt.2",
4868
+ flexGrow: shouldExpand ? 1 : undefined,
4869
+ flexShrink: shouldExpand ? 1 : undefined,
4869
4870
  children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
4870
4871
  color: textColor,
4871
4872
  icon: icon
@@ -4894,33 +4895,43 @@ function ChoiceItem(_ref) {
4894
4895
  function ChoiceItemContainer(_ref) {
4895
4896
  var children = _ref.children,
4896
4897
  direction = _ref.direction,
4898
+ shouldExpand = _ref.shouldExpand,
4897
4899
  isLast = _ref.isLast;
4898
4900
  var currentItemMarginValue = isLast ? undefined : 'kitt.3';
4899
- var flexProps = direction === 'row' ? {
4901
+ var directionFlexProps = direction === 'row' ? {
4900
4902
  flexGrow: 1,
4901
4903
  flexShrink: 1,
4902
4904
  flexBasis: 0
4903
4905
  } : {};
4904
- return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
4906
+ var shouldExpandFlexProps = shouldExpand ? {
4907
+ flexGrow: 1,
4908
+ flexShrink: 1
4909
+ } : {};
4910
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread(_objectSpread({
4905
4911
  marginRight: direction === 'row' ? currentItemMarginValue : undefined,
4906
4912
  marginBottom: direction === 'column' ? currentItemMarginValue : undefined
4907
- }, flexProps), {}, {
4913
+ }, directionFlexProps), shouldExpandFlexProps), {}, {
4908
4914
  children: children
4909
4915
  }));
4910
4916
  }
4911
4917
 
4912
- var _excluded$D = ["direction", "contentContainerStyle"];
4918
+ var _excluded$D = ["direction", "shouldExpand", "contentContainerStyle"];
4913
4919
  function ChoicesContainer(_ref) {
4914
4920
  var direction = _ref.direction,
4921
+ shouldExpand = _ref.shouldExpand,
4915
4922
  contentContainerStyle = _ref.contentContainerStyle,
4916
4923
  props = _objectWithoutProperties(_ref, _excluded$D);
4924
+ var shouldExpandFlexProps = shouldExpand ? {
4925
+ flexGrow: 1,
4926
+ flexShrink: 1
4927
+ } : {};
4917
4928
  if (direction === 'row') {
4918
- return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
4929
+ return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
4919
4930
  horizontal: true,
4920
- contentContainerStyle: contentContainerStyle
4921
- }, props));
4931
+ contentContainerStyle: shouldExpand ? shouldExpandFlexProps : contentContainerStyle
4932
+ }, props), shouldExpandFlexProps));
4922
4933
  }
4923
- return /*#__PURE__*/jsx(View$2, _objectSpread({}, props));
4934
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), shouldExpandFlexProps));
4924
4935
  }
4925
4936
 
4926
4937
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -4932,6 +4943,8 @@ function Choices(_ref2) {
4932
4943
  _ref2$direction = _ref2.direction,
4933
4944
  direction = _ref2$direction === void 0 ? 'column' : _ref2$direction,
4934
4945
  disabled = _ref2.disabled,
4946
+ _ref2$shouldExpand = _ref2.shouldExpand,
4947
+ shouldExpand = _ref2$shouldExpand === void 0 ? false : _ref2$shouldExpand,
4935
4948
  children = _ref2.children,
4936
4949
  value = _ref2.value,
4937
4950
  onPress = _ref2.onPress,
@@ -4950,6 +4963,7 @@ function Choices(_ref2) {
4950
4963
  var sharedProps = {
4951
4964
  type: type,
4952
4965
  disabled: disabled,
4966
+ shouldExpand: shouldExpand,
4953
4967
  onPress: !isForm ? onPress : undefined,
4954
4968
  onChange: isForm ? function (newValue) {
4955
4969
  setCurrentValue(newValue);
@@ -4961,6 +4975,7 @@ function Choices(_ref2) {
4961
4975
  };
4962
4976
  return /*#__PURE__*/jsx(ChoicesContainer, {
4963
4977
  direction: direction,
4978
+ shouldExpand: shouldExpand,
4964
4979
  testID: testID,
4965
4980
  id: id,
4966
4981
  style: style,
@@ -4971,6 +4986,7 @@ function Choices(_ref2) {
4971
4986
  }, sharedProps));
4972
4987
  return /*#__PURE__*/jsx(ChoiceItemContainer, {
4973
4988
  direction: direction,
4989
+ shouldExpand: shouldExpand,
4974
4990
  isLast: index === childrenArray.length - 1,
4975
4991
  children: element
4976
4992
  }, child.key);
@@ -10117,10 +10133,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
10117
10133
  button: {
10118
10134
  minWidth: theme.button.minWidth,
10119
10135
  maxWidth: theme.button.maxWidth,
10120
- minHeight: {
10121
- "default": theme.button.minHeight["default"],
10122
- medium: theme.button.minHeight.medium
10123
- },
10124
10136
  maxHeight: theme.button.maxHeight,
10125
10137
  height: {
10126
10138
  "default": theme.button.height["default"],
@@ -10737,7 +10749,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
10737
10749
  'heading-m': "".concat(theme.typography.types.headings.configs['heading-m'].fontSize, "px"),
10738
10750
  'heading-s': "".concat(theme.typography.types.headings.configs['heading-s'].fontSize, "px"),
10739
10751
  'heading-xs': "".concat(theme.typography.types.headings.configs['heading-xs'].fontSize, "px"),
10740
- 'heading-xxs': "".concat(theme.typography.types.headings.configs['heading-xxs'].fontSize, "px"),
10741
10752
  'body-xl': "".concat(theme.typography.types.bodies.configs['body-xl'].fontSize, "px"),
10742
10753
  'body-l': "".concat(theme.typography.types.bodies.configs['body-l'].fontSize, "px"),
10743
10754
  'body-m': "".concat(theme.typography.types.bodies.configs['body-m'].fontSize, "px"),
@@ -10761,7 +10772,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
10761
10772
  'heading-m': "".concat(theme.typography.types.headings.configs['heading-m'].lineHeight, "px"),
10762
10773
  'heading-s': "".concat(theme.typography.types.headings.configs['heading-s'].lineHeight, "px"),
10763
10774
  'heading-xs': "".concat(theme.typography.types.headings.configs['heading-xs'].lineHeight, "px"),
10764
- 'heading-xxs': "".concat(theme.typography.types.headings.configs['heading-xxs'].lineHeight, "px"),
10765
10775
  'body-xl': "".concat(theme.typography.types.bodies.configs['body-xl'].lineHeight, "px"),
10766
10776
  'body-l': "".concat(theme.typography.types.bodies.configs['body-l'].lineHeight, "px"),
10767
10777
  'body-m': "".concat(theme.typography.types.bodies.configs['body-m'].lineHeight, "px"),
@@ -12592,7 +12602,7 @@ function StoryTitleLevel4(_ref4) {
12592
12602
  return /*#__PURE__*/jsx(View, {
12593
12603
  marginBottom: 10,
12594
12604
  children: /*#__PURE__*/jsx(Typography.Header4, {
12595
- base: "body-l",
12605
+ base: "heading-s",
12596
12606
  color: useStoryBlockColor(color),
12597
12607
  numberOfLines: numberOfLines,
12598
12608
  children: children
@@ -13145,7 +13155,7 @@ function ToastContent(_ref) {
13145
13155
  flexGrow: 1,
13146
13156
  flexShrink: 1,
13147
13157
  children: [title ? /*#__PURE__*/jsx(Typography.Text, {
13148
- base: "body-m",
13158
+ base: "heading-xs",
13149
13159
  color: "white",
13150
13160
  children: title
13151
13161
  }) : null, description ? /*#__PURE__*/jsx(Typography.Text, {
@@ -13161,7 +13171,7 @@ function ToastContent(_ref) {
13161
13171
  borderColor: "white",
13162
13172
  onPress: onPress,
13163
13173
  children: /*#__PURE__*/jsx(Typography.Text, {
13164
- base: "body-m",
13174
+ base: "heading-xs",
13165
13175
  color: "white",
13166
13176
  children: actionLabel
13167
13177
  })