@ornikar/kitt-universal 2.0.0 → 2.1.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/definitions/IconButton/PressableAnimatedContainer.d.ts +2 -4
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts.map +1 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.web.d.ts +4 -0
- package/dist/definitions/IconButton/PressableAnimatedContainer.web.d.ts.map +1 -0
- package/dist/index-browser-all.es.android.js +20 -24
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +20 -24
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +20 -36
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +5 -8
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +3 -20
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +5 -5
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import type { IconButtonContentProps } from './IconButton';
|
|
3
3
|
import type { PressableIconButtonProps } from './PressableIconButton';
|
|
4
|
-
interface
|
|
4
|
+
export interface PressableAnimatedContainerProps {
|
|
5
5
|
children: NonNullable<ReactNode>;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
color: IconButtonContentProps['color'];
|
|
8
8
|
onPress: NonNullable<PressableIconButtonProps['onPress']>;
|
|
9
9
|
}
|
|
10
|
-
declare function
|
|
11
|
-
export declare const PressableAnimatedContainer: typeof WebAnimatedContainer;
|
|
12
|
-
export {};
|
|
10
|
+
export declare function PressableAnimatedContainer({ disabled, color, children, onPress, }: PressableAnimatedContainerProps): ReactElement;
|
|
13
11
|
//# sourceMappingURL=PressableAnimatedContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PressableAnimatedContainer.d.ts","sourceRoot":"","sources":["../../../src/IconButton/PressableAnimatedContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PressableAnimatedContainer.d.ts","sourceRoot":"","sources":["../../../src/IconButton/PressableAnimatedContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAGtE,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;IACvC,OAAO,EAAE,WAAW,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC,CAAC;CAC3D;AAgCD,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,KAAe,EACf,QAAQ,EACR,OAAO,GACR,EAAE,+BAA+B,GAAG,YAAY,CA6ChD"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { PressableAnimatedContainerProps } from './PressableAnimatedContainer';
|
|
3
|
+
export declare function PressableAnimatedContainer({ children, color, disabled, onPress, }: PressableAnimatedContainerProps): ReactElement;
|
|
4
|
+
//# sourceMappingURL=PressableAnimatedContainer.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PressableAnimatedContainer.web.d.ts","sourceRoot":"","sources":["../../../src/IconButton/PressableAnimatedContainer.web.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAGpF,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,OAAO,GACR,EAAE,+BAA+B,GAAG,YAAY,CAMhD"}
|
|
@@ -1063,33 +1063,31 @@ var PressableIconButton = styled(PrimitivePressable)(_templateObject$i || (_temp
|
|
|
1063
1063
|
});
|
|
1064
1064
|
|
|
1065
1065
|
var _templateObject$h, _templateObject2$7;
|
|
1066
|
-
|
|
1067
|
-
var
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
disabled = _ref2.disabled;
|
|
1066
|
+
var AnimatedIconButtonBackground = styled(Animated$1.View)(_templateObject$h || (_templateObject$h = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n width: ", "px;\n height: ", "px;\n position: absolute;\n bottom: 0;\n left: 0;\n"])), function (_ref) {
|
|
1067
|
+
var theme = _ref.theme,
|
|
1068
|
+
color = _ref.color,
|
|
1069
|
+
disabled = _ref.disabled;
|
|
1071
1070
|
var iconButton = theme.kitt.iconButton;
|
|
1072
1071
|
if (disabled) return iconButton.disabled.backgroundColor;
|
|
1073
1072
|
if (color === 'white') return iconButton.white.pressedBackgroundColor;
|
|
1074
1073
|
return iconButton["default"].pressedBackgroundColor;
|
|
1074
|
+
}, function (_ref2) {
|
|
1075
|
+
var theme = _ref2.theme;
|
|
1076
|
+
return theme.kitt.iconButton.borderRadius;
|
|
1075
1077
|
}, function (_ref3) {
|
|
1076
1078
|
var theme = _ref3.theme;
|
|
1077
|
-
return theme.kitt.iconButton.
|
|
1079
|
+
return theme.kitt.iconButton.width;
|
|
1078
1080
|
}, function (_ref4) {
|
|
1079
1081
|
var theme = _ref4.theme;
|
|
1080
|
-
return theme.kitt.iconButton.width;
|
|
1081
|
-
}, function (_ref5) {
|
|
1082
|
-
var theme = _ref5.theme;
|
|
1083
1082
|
return theme.kitt.iconButton.height;
|
|
1084
1083
|
});
|
|
1085
1084
|
var AnimatedViewContainer = styled(Animated$1.View)(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n"])));
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
onPress = _ref6.onPress;
|
|
1085
|
+
function PressableAnimatedContainer(_ref5) {
|
|
1086
|
+
var disabled = _ref5.disabled,
|
|
1087
|
+
_ref5$color = _ref5.color,
|
|
1088
|
+
color = _ref5$color === void 0 ? 'black' : _ref5$color,
|
|
1089
|
+
children = _ref5.children,
|
|
1090
|
+
onPress = _ref5.onPress;
|
|
1093
1091
|
var theme = useTheme();
|
|
1094
1092
|
var pressed = useSharedValue(false);
|
|
1095
1093
|
var opacityStyles = useAnimatedStyle(function () {
|
|
@@ -1105,7 +1103,7 @@ function NativeAnimatedContainer(_ref6) {
|
|
|
1105
1103
|
};
|
|
1106
1104
|
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1107
1105
|
_f.__workletHash = 10645190329247;
|
|
1108
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (
|
|
1106
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (55:41)";
|
|
1109
1107
|
_f.__optimalization = 2;
|
|
1110
1108
|
|
|
1111
1109
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1139,7 +1137,7 @@ function NativeAnimatedContainer(_ref6) {
|
|
|
1139
1137
|
};
|
|
1140
1138
|
_f.asString = "function _f(){const{withSpring,pressed,theme}=jsThis._closure;{return{transform:[{scale:withSpring(pressed.value?theme.kitt.iconButton.scale.base.active:theme.kitt.iconButton.scale.base.default)}]};}}";
|
|
1141
1139
|
_f.__workletHash = 13861998831411;
|
|
1142
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (
|
|
1140
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (61:39)";
|
|
1143
1141
|
_f.__optimalization = 2;
|
|
1144
1142
|
|
|
1145
1143
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1172,8 +1170,6 @@ function NativeAnimatedContainer(_ref6) {
|
|
|
1172
1170
|
}), children));
|
|
1173
1171
|
}
|
|
1174
1172
|
|
|
1175
|
-
var PressableAnimatedContainer = NativeAnimatedContainer;
|
|
1176
|
-
|
|
1177
1173
|
var _templateObject$g;
|
|
1178
1174
|
var IconButtonContentBorder = styled(PrimitiveView)(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n border: ", ";\n border-color: ", ";\n width: ", "px;\n height: ", "px;\n align-items: center;\n justify-content: center;\n border-radius: ", "px;\n"])), function (_ref) {
|
|
1179
1175
|
var theme = _ref.theme;
|
|
@@ -1275,9 +1271,9 @@ var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPre
|
|
|
1275
1271
|
|
|
1276
1272
|
var _templateObject$d;
|
|
1277
1273
|
|
|
1278
|
-
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
1274
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1279
1275
|
|
|
1280
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
1276
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1281
1277
|
var ContainerView = styled(PrimitiveView)(_templateObject$d || (_templateObject$d = _taggedTemplateLiteral(["\n flex-direction: row;\n padding: ", ";\n ", ";\n border-color: ", ";\n background-color: ", ";\n"])), function (_ref) {
|
|
1282
1278
|
var withPadding = _ref.withPadding,
|
|
1283
1279
|
theme = _ref.theme;
|
|
@@ -1469,9 +1465,9 @@ function Message(_ref11) {
|
|
|
1469
1465
|
})) : null);
|
|
1470
1466
|
}
|
|
1471
1467
|
|
|
1472
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
1468
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1473
1469
|
|
|
1474
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
1470
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1475
1471
|
var OverlayPressable = styled(PrimitivePressable)(function (_ref) {
|
|
1476
1472
|
var theme = _ref.theme;
|
|
1477
1473
|
return _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|