@ornikar/kitt-universal 25.52.0 → 25.54.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/dist/index.es.js CHANGED
@@ -8027,7 +8027,10 @@ function FullscreenModalBody(_ref) {
8027
8027
  verticalPadding = _useTheme.kitt.fullscreenModal.body.verticalPadding;
8028
8028
  var paddingBottom = shouldHandleBottomNotch ? Math.max(bottom, verticalPadding) : verticalPadding;
8029
8029
  var paddingTop = shouldHandleTopNotch ? Math.max(top, verticalPadding) : verticalPadding;
8030
- return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
8030
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
8031
+ flexGrow: 1,
8032
+ flexShrink: 1
8033
+ }, props), {}, {
8031
8034
  paddingX: "kitt.fullscreenModal.horizontalPadding",
8032
8035
  paddingTop: paddingTop,
8033
8036
  paddingBottom: paddingBottom,
@@ -8315,27 +8318,30 @@ function FullscreenModalHeader(_ref) {
8315
8318
  }
8316
8319
 
8317
8320
  function FullscreenModal(_ref) {
8318
- var body = _ref.body,
8321
+ var children = _ref.children,
8322
+ body = _ref.body,
8319
8323
  header = _ref.header,
8320
8324
  footer = _ref.footer,
8321
8325
  backgroundColor = _ref.backgroundColor;
8322
- return /*#__PURE__*/jsxs(FullscreenModalContainer, {
8326
+ return /*#__PURE__*/jsx(FullscreenModalContainer, {
8323
8327
  backgroundColor: backgroundColor,
8324
- children: [header ? /*#__PURE__*/jsx(View, {
8325
- children: header
8326
- }) : null, /*#__PURE__*/jsxs(View, {
8327
- flexGrow: 1,
8328
- flexShrink: 1,
8329
- justifyContent: "space-between",
8330
- children: [/*#__PURE__*/jsx(ScrollView$2, {
8331
- bounces: false,
8332
- contentContainerStyle: {
8333
- flexGrow: 1,
8334
- position: 'relative'
8335
- },
8336
- children: body
8337
- }), footer || null]
8338
- })]
8328
+ children: children || /*#__PURE__*/jsxs(Fragment, {
8329
+ children: [header ? /*#__PURE__*/jsx(View, {
8330
+ children: header
8331
+ }) : null, /*#__PURE__*/jsxs(View, {
8332
+ flexGrow: 1,
8333
+ flexShrink: 1,
8334
+ justifyContent: "space-between",
8335
+ children: [/*#__PURE__*/jsx(ScrollView$2, {
8336
+ bounces: false,
8337
+ contentContainerStyle: {
8338
+ flexGrow: 1,
8339
+ position: 'relative'
8340
+ },
8341
+ children: body
8342
+ }), footer || null]
8343
+ })]
8344
+ })
8339
8345
  });
8340
8346
  }
8341
8347
  FullscreenModal.Header = FullscreenModalHeader;
@@ -8745,6 +8751,8 @@ function IconButton(_ref) {
8745
8751
  ariaLabel = _ref.ariaLabel,
8746
8752
  _ref$accessibilityRol = _ref.accessibilityRole,
8747
8753
  accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
8754
+ withBadge = _ref.withBadge,
8755
+ bagdeCount = _ref.bagdeCount,
8748
8756
  isHoveredInternal = _ref.isHoveredInternal,
8749
8757
  isPressedInternal = _ref.isPressedInternal,
8750
8758
  isFocusedInternal = _ref.isFocusedInternal,
@@ -8783,26 +8791,55 @@ function IconButton(_ref) {
8783
8791
  isFocused = _ref2.isFocused;
8784
8792
  var isCurrentHovered = isHovered || isHoveredInternal;
8785
8793
  var isCurrentPressed = isPressed || isPressedInternal;
8786
- return /*#__PURE__*/jsxs(AnimatedScale, {
8787
- isDisabled: disabled,
8788
- isHovered: isCurrentHovered,
8789
- isPressed: isCurrentPressed,
8790
- scaleStyles: scaleStyles,
8791
- children: [/*#__PURE__*/jsx(AnimatedBackground, {
8792
- color: color,
8794
+ return /*#__PURE__*/jsxs(Fragment, {
8795
+ children: [/*#__PURE__*/jsxs(AnimatedScale, {
8793
8796
  isDisabled: disabled,
8794
8797
  isHovered: isCurrentHovered,
8795
8798
  isPressed: isCurrentPressed,
8796
- isFocused: isFocused || isFocusedInternal,
8797
- opacityStyles: opacityStyles
8798
- }), /*#__PURE__*/jsx(View, {
8799
- alignItems: "center",
8800
- justifyContent: "center",
8801
- children: /*#__PURE__*/jsx(TypographyIcon, {
8802
- color: getIconButtonTextColorByColor(color, disabled),
8803
- icon: icon
8799
+ scaleStyles: scaleStyles,
8800
+ children: [/*#__PURE__*/jsx(AnimatedBackground, {
8801
+ color: color,
8802
+ isDisabled: disabled,
8803
+ isHovered: isCurrentHovered,
8804
+ isPressed: isCurrentPressed,
8805
+ isFocused: isFocused || isFocusedInternal,
8806
+ opacityStyles: opacityStyles
8807
+ }), /*#__PURE__*/jsx(View, {
8808
+ alignItems: "center",
8809
+ justifyContent: "center",
8810
+ children: /*#__PURE__*/jsx(TypographyIcon, {
8811
+ color: getIconButtonTextColorByColor(color, disabled),
8812
+ icon: icon
8813
+ })
8814
+ })]
8815
+ }), withBadge ? /*#__PURE__*/jsx(View, {
8816
+ height: "10px",
8817
+ width: "10px",
8818
+ backgroundColor: lateOceanColorPalette['coral.10'],
8819
+ borderRadius: "kitt.iconButton.borderRadius",
8820
+ position: "absolute",
8821
+ top: "1px",
8822
+ right: "1px"
8823
+ }) : null, !withBadge && bagdeCount && bagdeCount > 0 ? /*#__PURE__*/jsx(View, {
8824
+ height: "20px",
8825
+ width: "20px",
8826
+ backgroundColor: lateOceanColorPalette['coral.10'],
8827
+ borderRadius: "kitt.iconButton.borderRadius",
8828
+ position: "absolute",
8829
+ top: "-6px",
8830
+ right: "-6px",
8831
+ children: /*#__PURE__*/jsx(View, {
8832
+ alignItems: "center",
8833
+ justifyContent: "center",
8834
+ marginTop: "2px",
8835
+ children: /*#__PURE__*/jsx(Typography.Text, {
8836
+ base: "body-xs",
8837
+ variant: "bold",
8838
+ color: "white",
8839
+ children: bagdeCount > 5 ? '+5' : bagdeCount
8840
+ })
8804
8841
  })
8805
- })]
8842
+ }) : null]
8806
8843
  });
8807
8844
  }
8808
8845
  });
@@ -11769,12 +11806,16 @@ function NavigationModal(_ref) {
11769
11806
  var body = _ref.body,
11770
11807
  backgroundColor = _ref.backgroundColor,
11771
11808
  footer = _ref.footer,
11772
- header = _ref.header;
11809
+ header = _ref.header,
11810
+ children = _ref.children;
11773
11811
  var Component = useBreakpointValue({
11774
11812
  base: FullscreenModal,
11775
11813
  small: CardModal
11776
11814
  });
11777
- return /*#__PURE__*/jsx(Component, {
11815
+ return children ? /*#__PURE__*/jsx(Component, {
11816
+ backgroundColor: backgroundColor,
11817
+ children: children
11818
+ }) : /*#__PURE__*/jsx(Component, {
11778
11819
  body: body,
11779
11820
  backgroundColor: backgroundColor,
11780
11821
  footer: footer,