@ornikar/kitt-universal 31.1.2-canary.31eec21cbe0c2b92255fb1fa14d83757a05ea8b0.0 → 31.1.2-canary.4946783c3d0e6763db7a2d1dbe21658bc5dcdb4f.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.
@@ -1,6 +1,6 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import { useContext, createContext, forwardRef, useMemo, cloneElement, useState, useRef, useCallback, useLayoutEffect, useEffect, Children, useReducer, Fragment as Fragment$1 } from 'react';
3
+ import { useContext, createContext, forwardRef, useMemo, cloneElement, useRef, useEffect, useState, Children, useReducer, useCallback, Fragment as Fragment$1 } from 'react';
4
4
  import { View as View$1, ScrollView as ScrollView$1, Pressable as Pressable$1, Image as Image$1, FlatList as FlatList$1, SectionList as SectionList$1, Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, Center as Center$1, useBreakpointValue as useBreakpointValue$1, useSx, Text, Input, NativeBaseProvider, extendTheme } from 'native-base';
5
5
  export { useClipboard, useContrastText, useMediaQuery, useSx, useToken } from 'native-base';
6
6
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
@@ -3665,81 +3665,6 @@ function ButtonContent(_ref2) {
3665
3665
  });
3666
3666
  }
3667
3667
 
3668
- function ButtonGauge(_ref) {
3669
- var duration = _ref.duration,
3670
- running = _ref.running,
3671
- onEnded = _ref.onEnded;
3672
- var _useState = useState(100),
3673
- _useState2 = _slicedToArray(_useState, 2),
3674
- translate = _useState2[0],
3675
- setTranslate = _useState2[1];
3676
- var startTimeRef = useRef(0);
3677
- var pauseTimeRef = useRef(0);
3678
- var rafRef = useRef(undefined);
3679
- var distance = 100;
3680
- var draw = useCallback(function (timestamp) {
3681
- var timeElapsedSinceStart = timestamp - startTimeRef.current;
3682
- // Since the time between frame is not reliable and regular, we have to
3683
- // limit the progress to prevent overflows
3684
- var safeProgress = Math.min(distance * timeElapsedSinceStart / duration, distance);
3685
- setTranslate(safeProgress);
3686
- if (safeProgress < distance) {
3687
- if (!rafRef) return;
3688
- rafRef.current = requestAnimationFrame(draw);
3689
- return;
3690
- }
3691
- onEnded();
3692
- if (rafRef.current) {
3693
- cancelAnimationFrame(rafRef.current);
3694
- }
3695
- },
3696
- // eslint-disable-next-line react-hooks/exhaustive-deps
3697
- []);
3698
- useLayoutEffect(function () {
3699
- if (running) {
3700
- // Resuming from pause
3701
- if (pauseTimeRef.current > 0) {
3702
- startTimeRef.current += global.performance.now() - pauseTimeRef.current;
3703
- draw(global.performance.now());
3704
- return;
3705
- }
3706
-
3707
- // First launch
3708
- startTimeRef.current = global.performance.now();
3709
- draw(startTimeRef.current);
3710
- }
3711
-
3712
- // On pause
3713
- if (!running && rafRef.current) {
3714
- pauseTimeRef.current = global.performance.now();
3715
- cancelAnimationFrame(rafRef.current);
3716
- }
3717
- // eslint-disable-next-line react-hooks/exhaustive-deps
3718
- }, [running]);
3719
- useEffect(function () {
3720
- return function () {
3721
- if (rafRef.current) {
3722
- cancelAnimationFrame(rafRef.current);
3723
- }
3724
- };
3725
- }, []);
3726
- return /*#__PURE__*/jsx(View, {
3727
- position: "absolute",
3728
- left: 0,
3729
- right: 0,
3730
- top: 0,
3731
- bottom: 0,
3732
- overflow: "hidden",
3733
- alignItems: "flex-end",
3734
- borderRadius: "kitt.button.borderRadius",
3735
- children: /*#__PURE__*/jsx(View, {
3736
- width: "".concat(translate, "%"),
3737
- height: "100%",
3738
- backgroundColor: "kitt.palettes.deepPurple['white-alpha.20']"
3739
- })
3740
- });
3741
- }
3742
-
3743
3668
  function ButtonPadding(_ref) {
3744
3669
  var children = _ref.children,
3745
3670
  size = _ref.size,
@@ -3811,7 +3736,6 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
3811
3736
  hrefAttrs = _ref.hrefAttrs,
3812
3737
  withBadge = _ref.withBadge,
3813
3738
  badgeCount = _ref.badgeCount,
3814
- timerAttrs = _ref.timerAttrs,
3815
3739
  _ref$accessibilityRol = _ref.accessibilityRole,
3816
3740
  accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
3817
3741
  _ref$innerSpacing = _ref.innerSpacing,
@@ -3856,7 +3780,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
3856
3780
  var isHovered = _ref2.isHovered,
3857
3781
  isPressed = _ref2.isPressed,
3858
3782
  isFocused = _ref2.isFocused;
3859
- return /*#__PURE__*/jsxs(AnimatedContainer$2, {
3783
+ return /*#__PURE__*/jsx(AnimatedContainer$2, {
3860
3784
  animatedStyles: animatedStyles,
3861
3785
  type: type,
3862
3786
  isHovered: isHovered || isHoveredInternal,
@@ -3866,7 +3790,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
3866
3790
  size: size,
3867
3791
  isIconOnly: isIconOnly,
3868
3792
  isStretch: stretch,
3869
- children: [timerAttrs ? /*#__PURE__*/jsx(ButtonGauge, _objectSpread({}, timerAttrs)) : null, /*#__PURE__*/jsxs(ButtonPadding, {
3793
+ children: /*#__PURE__*/jsxs(ButtonPadding, {
3870
3794
  size: size,
3871
3795
  isIconOnly: isIconOnly,
3872
3796
  children: [/*#__PURE__*/jsx(ButtonContent, {
@@ -3888,7 +3812,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
3888
3812
  isHovered: isHovered,
3889
3813
  isPressed: isPressed
3890
3814
  })]
3891
- })]
3815
+ })
3892
3816
  });
3893
3817
  }
3894
3818
  });
@@ -13485,14 +13409,14 @@ function TypographyEmoji(_ref3) {
13485
13409
  });
13486
13410
  }
13487
13411
 
13488
- var styles = {"displayUnderline":"TypographyLinkWebWrapper-module_displayUnderline__KxwMp","kitt-hover":"TypographyLinkWebWrapper-module_kitt-hover__CyENw","displayUnderlineWhenHovered":"TypographyLinkWebWrapper-module_displayUnderlineWhenHovered__5V5Cl"};
13489
-
13412
+ // overrides :global(a) in Link styles.module.css
13413
+ var displayUnderline = "kitt-u_displayUnderline_dch42t";
13414
+ var displayUnderlineWhenHovered = "kitt-u_displayUnderlineWhenHovered_d80w0t7";
13490
13415
  function TypographyLinkWebWrapper(_ref) {
13491
13416
  var children = _ref.children,
13492
13417
  hasNoUnderline = _ref.hasNoUnderline;
13493
- var className = hasNoUnderline ? "".concat(styles.displayUnderline, " ").concat(styles.displayUnderlineWhenHovered) : styles.displayUnderline;
13494
13418
  return /*#__PURE__*/jsx("span", {
13495
- className: className,
13419
+ className: (displayUnderline ) + " " + ((hasNoUnderline ? displayUnderlineWhenHovered : undefined) || ""),
13496
13420
  children: children
13497
13421
  });
13498
13422
  }