@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.
- package/CHANGELOG.md +1 -3
- package/dist/definitions/Button/Button.d.ts +0 -5
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyLinkWebWrapper.web.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +4 -78
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +4 -78
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +3 -79
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.css +2 -20
- package/dist/index-node-22.17.cjs.web.js +7 -83
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +4 -80
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.css +2 -20
- package/dist/index-node-22.17.es.web.mjs +8 -84
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +4 -80
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +8 -84
- package/dist/index.es.web.js.map +1 -1
- package/dist/styles.css +2 -20
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/definitions/Button/ButtonGauge.d.ts +0 -9
- package/dist/definitions/Button/ButtonGauge.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [31.1.2-canary.
|
|
6
|
+
## [31.1.2-canary.4946783c3d0e6763db7a2d1dbe21658bc5dcdb4f.0](https://github.com/ornikar/kitt/compare/@ornikar/kitt-universal@31.1.1...@ornikar/kitt-universal@31.1.2-canary.4946783c3d0e6763db7a2d1dbe21658bc5dcdb4f.0) (2025-12-09)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Features
|
|
10
10
|
|
|
11
|
-
* **kitt-universal/Button:** add timer gauge option OSE-21414 ([#2771](https://github.com/ornikar/kitt/issues/2771)) ([c1f1e27](https://github.com/ornikar/kitt/commit/c1f1e27fe5dd78718338bab01178bca075c4ae07))
|
|
12
|
-
* remove linaria usage OSE-18326 ([31eec21](https://github.com/ornikar/kitt/commit/31eec21cbe0c2b92255fb1fa14d83757a05ea8b0))
|
|
13
11
|
* upgrade RTL [OSE-18110] ([#2769](https://github.com/ornikar/kitt/issues/2769)) ([56bcbe4](https://github.com/ornikar/kitt/commit/56bcbe4d1933bb4ae099f85b546790ba537d18f7))
|
|
14
12
|
|
|
15
13
|
|
|
@@ -14,11 +14,6 @@ export interface ButtonProps extends Pick<PressableProps, 'onPress' | 'onFocus'
|
|
|
14
14
|
iconPosition?: IconPosition;
|
|
15
15
|
withBadge?: boolean;
|
|
16
16
|
badgeCount?: number;
|
|
17
|
-
timerAttrs?: {
|
|
18
|
-
duration: number;
|
|
19
|
-
running: boolean;
|
|
20
|
-
onEnded: () => void;
|
|
21
|
-
};
|
|
22
17
|
testID?: PressableProps['testID'];
|
|
23
18
|
href?: PressableProps['href'];
|
|
24
19
|
hrefAttrs?: PressableProps['hrefAttrs'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3E,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,6BAA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D,YAAY,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC3C,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAChC,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;CACrC;AAED,eAAO,MAAM,MAAM,uOAkGlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypographyLinkWebWrapper.web.d.ts","sourceRoot":"","sources":["../../../src/typography/TypographyLinkWebWrapper.web.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TypographyLinkWebWrapper.web.d.ts","sourceRoot":"","sources":["../../../src/typography/TypographyLinkWebWrapper.web.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AA2BhF,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,6BAA6B,GAAG,SAAS,CAI/G"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import React, { useContext, createContext, forwardRef, useMemo, cloneElement,
|
|
3
|
+
import React, { useContext, createContext, forwardRef, useMemo, cloneElement, useRef, useEffect, useState, Children, useReducer, Fragment as Fragment$1, useCallback } 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, useMediaQuery } from 'native-base';
|
|
5
5
|
export { useClipboard, useContrastText, useMediaQuery, useSx, useToken } from 'native-base';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -3634,79 +3634,6 @@ function ButtonContent(_ref) {
|
|
|
3634
3634
|
});
|
|
3635
3635
|
}
|
|
3636
3636
|
|
|
3637
|
-
function ButtonGauge({
|
|
3638
|
-
duration,
|
|
3639
|
-
running,
|
|
3640
|
-
onEnded
|
|
3641
|
-
}) {
|
|
3642
|
-
const [translate, setTranslate] = useState(100);
|
|
3643
|
-
const startTimeRef = useRef(0);
|
|
3644
|
-
const pauseTimeRef = useRef(0);
|
|
3645
|
-
const rafRef = useRef(undefined);
|
|
3646
|
-
const distance = 100;
|
|
3647
|
-
const draw = useCallback(timestamp => {
|
|
3648
|
-
const timeElapsedSinceStart = timestamp - startTimeRef.current;
|
|
3649
|
-
// Since the time between frame is not reliable and regular, we have to
|
|
3650
|
-
// limit the progress to prevent overflows
|
|
3651
|
-
const safeProgress = Math.min(distance * timeElapsedSinceStart / duration, distance);
|
|
3652
|
-
setTranslate(safeProgress);
|
|
3653
|
-
if (safeProgress < distance) {
|
|
3654
|
-
if (!rafRef) return;
|
|
3655
|
-
rafRef.current = requestAnimationFrame(draw);
|
|
3656
|
-
return;
|
|
3657
|
-
}
|
|
3658
|
-
onEnded();
|
|
3659
|
-
if (rafRef.current) {
|
|
3660
|
-
cancelAnimationFrame(rafRef.current);
|
|
3661
|
-
}
|
|
3662
|
-
},
|
|
3663
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3664
|
-
[]);
|
|
3665
|
-
useLayoutEffect(() => {
|
|
3666
|
-
if (running) {
|
|
3667
|
-
// Resuming from pause
|
|
3668
|
-
if (pauseTimeRef.current > 0) {
|
|
3669
|
-
startTimeRef.current += global.performance.now() - pauseTimeRef.current;
|
|
3670
|
-
draw(global.performance.now());
|
|
3671
|
-
return;
|
|
3672
|
-
}
|
|
3673
|
-
|
|
3674
|
-
// First launch
|
|
3675
|
-
startTimeRef.current = global.performance.now();
|
|
3676
|
-
draw(startTimeRef.current);
|
|
3677
|
-
}
|
|
3678
|
-
|
|
3679
|
-
// On pause
|
|
3680
|
-
if (!running && rafRef.current) {
|
|
3681
|
-
pauseTimeRef.current = global.performance.now();
|
|
3682
|
-
cancelAnimationFrame(rafRef.current);
|
|
3683
|
-
}
|
|
3684
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3685
|
-
}, [running]);
|
|
3686
|
-
useEffect(() => {
|
|
3687
|
-
return () => {
|
|
3688
|
-
if (rafRef.current) {
|
|
3689
|
-
cancelAnimationFrame(rafRef.current);
|
|
3690
|
-
}
|
|
3691
|
-
};
|
|
3692
|
-
}, []);
|
|
3693
|
-
return /*#__PURE__*/jsx(View, {
|
|
3694
|
-
position: "absolute",
|
|
3695
|
-
left: 0,
|
|
3696
|
-
right: 0,
|
|
3697
|
-
top: 0,
|
|
3698
|
-
bottom: 0,
|
|
3699
|
-
overflow: "hidden",
|
|
3700
|
-
alignItems: "flex-end",
|
|
3701
|
-
borderRadius: "kitt.button.borderRadius",
|
|
3702
|
-
children: /*#__PURE__*/jsx(View, {
|
|
3703
|
-
width: `${translate}%`,
|
|
3704
|
-
height: "100%",
|
|
3705
|
-
backgroundColor: "kitt.palettes.deepPurple['white-alpha.20']"
|
|
3706
|
-
})
|
|
3707
|
-
});
|
|
3708
|
-
}
|
|
3709
|
-
|
|
3710
3637
|
function ButtonPadding({
|
|
3711
3638
|
children,
|
|
3712
3639
|
size,
|
|
@@ -3797,7 +3724,6 @@ const Button = /*#__PURE__*/forwardRef(({
|
|
|
3797
3724
|
hrefAttrs,
|
|
3798
3725
|
withBadge,
|
|
3799
3726
|
badgeCount,
|
|
3800
|
-
timerAttrs,
|
|
3801
3727
|
accessibilityRole: _accessibilityRole = 'button',
|
|
3802
3728
|
innerSpacing: _innerSpacing = 'center',
|
|
3803
3729
|
isHoveredInternal,
|
|
@@ -3845,7 +3771,7 @@ const Button = /*#__PURE__*/forwardRef(({
|
|
|
3845
3771
|
isHovered,
|
|
3846
3772
|
isPressed,
|
|
3847
3773
|
isFocused
|
|
3848
|
-
}) => /*#__PURE__*/
|
|
3774
|
+
}) => /*#__PURE__*/jsx(AnimatedContainer$2, {
|
|
3849
3775
|
animatedStyles: animatedStyles,
|
|
3850
3776
|
type: _type,
|
|
3851
3777
|
isHovered: isHovered || isHoveredInternal,
|
|
@@ -3855,7 +3781,7 @@ const Button = /*#__PURE__*/forwardRef(({
|
|
|
3855
3781
|
size: _size,
|
|
3856
3782
|
isIconOnly: isIconOnly,
|
|
3857
3783
|
isStretch: stretch,
|
|
3858
|
-
children:
|
|
3784
|
+
children: /*#__PURE__*/jsxs(ButtonPadding, {
|
|
3859
3785
|
size: _size,
|
|
3860
3786
|
isIconOnly: isIconOnly,
|
|
3861
3787
|
children: [/*#__PURE__*/jsx(ButtonContent, {
|
|
@@ -3877,7 +3803,7 @@ const Button = /*#__PURE__*/forwardRef(({
|
|
|
3877
3803
|
isHovered: isHovered,
|
|
3878
3804
|
isPressed: isPressed
|
|
3879
3805
|
})]
|
|
3880
|
-
})
|
|
3806
|
+
})
|
|
3881
3807
|
})
|
|
3882
3808
|
});
|
|
3883
3809
|
});
|