@ornikar/kitt-universal 13.2.0 → 13.2.1
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/Actions/Actions.d.ts.map +1 -1
- package/dist/definitions/Actions/ActionsItem.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +44 -42
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +44 -42
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +44 -42
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +45 -43
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +45 -44
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +46 -45
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/Actions/Actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,KAAK,aAAa,GAAG,QAAQ,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/Actions/Actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,KAAK,aAAa,GAAG,QAAQ,GAAG,KAAK,CAAC;AA0BtC,MAAM,WAAW,YAAa,SAAQ,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/D,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,GAAG,YAAY,CAiBlF;yBAjBe,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsItem.d.ts","sourceRoot":"","sources":["../../../src/Actions/ActionsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAe,YAAY,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAE9F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionsItem.d.ts","sourceRoot":"","sources":["../../../src/Actions/ActionsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAe,YAAY,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAE9F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD,UAAU,+BAAgC,SAAQ,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC;CAAG;AAEjF,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,qBAAqB,CAAC,GAAG,CAAC;IACpE,QAAQ,CAAC,OAAO,CAAC,EAAE,CACjB,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAElD,OAAO,CAAC,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;CAChB;AAGD,KAAK,iCAAiC,CAAC,CAAC,SAAS,qBAAqB,CAAC,GAAG,CAAC,IAAI,IAAI,CACjF,cAAc,CAAC,CAAC,CAAC,EACjB,MAAM,gBAAgB,CAAC,CAAC,CAAC,GAAG,MAAM,+BAA+B,CAClE,CAAC;AAEF,wBAAgB,WAAW,CAAC,CAAC,SAAS,qBAAqB,CAAC,GAAG,CAAC,EAAE,EAChE,EAAE,EACF,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,OAAuC,EACvC,GAAG,KAAK,EACT,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,iCAAiC,CAAC,CAAC,CAAC,GAAG,YAAY,CA6C3E"}
|
|
@@ -8,7 +8,7 @@ import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructurin
|
|
|
8
8
|
import _extends from '@babel/runtime/helpers/extends';
|
|
9
9
|
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate } from 'react-native-reanimated';
|
|
10
10
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
11
|
-
import { Platform, Animated as Animated$1, Easing,
|
|
11
|
+
import { Platform, Animated as Animated$1, Easing, StyleSheet, Modal, ScrollView as ScrollView$2, View as View$2, Linking, Text as Text$1, Pressable as Pressable$2, useWindowDimensions, PixelRatio } from 'react-native';
|
|
12
12
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
13
13
|
import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
|
|
14
14
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
@@ -2344,53 +2344,18 @@ function LoaderIcon(_ref) {
|
|
|
2344
2344
|
});
|
|
2345
2345
|
}
|
|
2346
2346
|
|
|
2347
|
-
function matchWindowSize(_ref, _ref2) {
|
|
2348
|
-
var width = _ref.width,
|
|
2349
|
-
height = _ref.height;
|
|
2350
|
-
var minWidth = _ref2.minWidth,
|
|
2351
|
-
maxWidth = _ref2.maxWidth,
|
|
2352
|
-
minHeight = _ref2.minHeight,
|
|
2353
|
-
maxHeight = _ref2.maxHeight;
|
|
2354
|
-
var hasWidthMatched = width ? (!minWidth || width >= minWidth) && (!maxWidth || width <= maxWidth) : true;
|
|
2355
|
-
var hasHeightMatched = height ? (!minHeight || height >= minHeight) && (!maxHeight || height <= maxHeight) : true;
|
|
2356
|
-
return hasWidthMatched && hasHeightMatched;
|
|
2357
|
-
}
|
|
2358
|
-
|
|
2359
|
-
/**
|
|
2360
|
-
* Returns if a size matches based on dimensions passed as options.
|
|
2361
|
-
*
|
|
2362
|
-
* WARNING: Not SSR friendly.
|
|
2363
|
-
*/
|
|
2364
|
-
function useMatchWindowSize(options) {
|
|
2365
|
-
var _useWindowDimensions = useWindowDimensions(),
|
|
2366
|
-
width = _useWindowDimensions.width,
|
|
2367
|
-
height = _useWindowDimensions.height;
|
|
2368
|
-
return matchWindowSize({
|
|
2369
|
-
width: width,
|
|
2370
|
-
height: height
|
|
2371
|
-
}, options);
|
|
2372
|
-
}
|
|
2373
|
-
|
|
2374
2347
|
var _excluded$E = ["as", "onPress", "disabled", "icon", "stretch"];
|
|
2375
|
-
function getCurrentStretchValue(isStretch, isMedium) {
|
|
2376
|
-
// Stretch will follow the value passed from the component occurence if defined
|
|
2377
|
-
if (isStretch) return isStretch;
|
|
2378
|
-
return !isMedium ? true : undefined;
|
|
2379
|
-
}
|
|
2380
|
-
|
|
2381
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
2382
|
-
|
|
2383
2348
|
function ActionsItem(_ref) {
|
|
2384
2349
|
var as = _ref.as,
|
|
2385
2350
|
onPress = _ref.onPress,
|
|
2386
2351
|
disabled = _ref.disabled,
|
|
2387
2352
|
icon = _ref.icon,
|
|
2388
|
-
stretch = _ref.stretch,
|
|
2353
|
+
_ref$stretch = _ref.stretch,
|
|
2354
|
+
stretch = _ref$stretch === void 0 ? {
|
|
2355
|
+
base: true,
|
|
2356
|
+
medium: false
|
|
2357
|
+
} : _ref$stretch,
|
|
2389
2358
|
props = _objectWithoutProperties(_ref, _excluded$E);
|
|
2390
|
-
var isMedium = useMatchWindowSize({
|
|
2391
|
-
minWidth: KittBreakpoints.MEDIUM
|
|
2392
|
-
});
|
|
2393
|
-
var isCurrentStretch = getCurrentStretchValue(stretch, isMedium);
|
|
2394
2359
|
var _useState = useState(false),
|
|
2395
2360
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2396
2361
|
isLoading = _useState2[0],
|
|
@@ -2406,7 +2371,7 @@ function ActionsItem(_ref) {
|
|
|
2406
2371
|
}, []);
|
|
2407
2372
|
return /*#__PURE__*/jsx(View, {
|
|
2408
2373
|
children: /*#__PURE__*/jsx(as, _objectSpread(_objectSpread({}, props), {}, {
|
|
2409
|
-
stretch:
|
|
2374
|
+
stretch: stretch,
|
|
2410
2375
|
disabled: isLoading ? true : disabled,
|
|
2411
2376
|
icon: isLoading ? /*#__PURE__*/jsx(LoaderIcon, {}) : icon,
|
|
2412
2377
|
onPress: function handlePress(e) {
|
|
@@ -2478,14 +2443,24 @@ function getCurrentDirection(layout) {
|
|
|
2478
2443
|
if (layout === 'column') return 'column';
|
|
2479
2444
|
return 'row';
|
|
2480
2445
|
}
|
|
2446
|
+
function getCurrentAlignSelf(layout) {
|
|
2447
|
+
if (!layout) return {
|
|
2448
|
+
base: 'stretch',
|
|
2449
|
+
medium: undefined
|
|
2450
|
+
};
|
|
2451
|
+
if (layout === 'column') return 'stretch';
|
|
2452
|
+
return undefined;
|
|
2453
|
+
}
|
|
2481
2454
|
function Actions(_ref) {
|
|
2482
2455
|
var children = _ref.children,
|
|
2483
2456
|
layout = _ref.layout,
|
|
2484
2457
|
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
2485
2458
|
var currentAlignItems = getCurrentLayout(layout);
|
|
2486
2459
|
var currentDirection = getCurrentDirection(layout);
|
|
2460
|
+
var currentAlignSelf = getCurrentAlignSelf(layout);
|
|
2487
2461
|
return /*#__PURE__*/jsx(Stack, _objectSpread(_objectSpread({
|
|
2488
2462
|
alignItems: currentAlignItems,
|
|
2463
|
+
alignSelf: currentAlignSelf,
|
|
2489
2464
|
direction: currentDirection,
|
|
2490
2465
|
flexGrow: 1
|
|
2491
2466
|
}, props), {}, {
|
|
@@ -9716,6 +9691,33 @@ function StyleWebWrapper(_ref) {
|
|
|
9716
9691
|
}));
|
|
9717
9692
|
}
|
|
9718
9693
|
|
|
9694
|
+
function matchWindowSize(_ref, _ref2) {
|
|
9695
|
+
var width = _ref.width,
|
|
9696
|
+
height = _ref.height;
|
|
9697
|
+
var minWidth = _ref2.minWidth,
|
|
9698
|
+
maxWidth = _ref2.maxWidth,
|
|
9699
|
+
minHeight = _ref2.minHeight,
|
|
9700
|
+
maxHeight = _ref2.maxHeight;
|
|
9701
|
+
var hasWidthMatched = width ? (!minWidth || width >= minWidth) && (!maxWidth || width <= maxWidth) : true;
|
|
9702
|
+
var hasHeightMatched = height ? (!minHeight || height >= minHeight) && (!maxHeight || height <= maxHeight) : true;
|
|
9703
|
+
return hasWidthMatched && hasHeightMatched;
|
|
9704
|
+
}
|
|
9705
|
+
|
|
9706
|
+
/**
|
|
9707
|
+
* Returns if a size matches based on dimensions passed as options.
|
|
9708
|
+
*
|
|
9709
|
+
* WARNING: Not SSR friendly.
|
|
9710
|
+
*/
|
|
9711
|
+
function useMatchWindowSize(options) {
|
|
9712
|
+
var _useWindowDimensions = useWindowDimensions(),
|
|
9713
|
+
width = _useWindowDimensions.width,
|
|
9714
|
+
height = _useWindowDimensions.height;
|
|
9715
|
+
return matchWindowSize({
|
|
9716
|
+
width: width,
|
|
9717
|
+
height: height
|
|
9718
|
+
}, options);
|
|
9719
|
+
}
|
|
9720
|
+
|
|
9719
9721
|
var _excluded$1 = ["children"];
|
|
9720
9722
|
/**
|
|
9721
9723
|
* Display children if match window size options
|