@ornikar/kitt-universal 5.0.2 → 7.0.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/Avatar/Avatar.d.ts +5 -4
- package/dist/definitions/Avatar/Avatar.d.ts.map +1 -1
- package/dist/definitions/Button/AnimatedButtonPressable.d.ts +2 -1
- package/dist/definitions/Button/AnimatedButtonPressable.d.ts.map +1 -1
- package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +2 -1
- package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts.map +1 -1
- package/dist/definitions/Button/BaseStyledButtonPressable.d.ts +2 -1
- package/dist/definitions/Button/BaseStyledButtonPressable.d.ts.map +1 -1
- package/dist/definitions/Button/Button.d.ts +2 -1
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts +4 -3
- package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
- package/dist/definitions/Button/getVariantValuesIfExist.d.ts +5 -0
- package/dist/definitions/Button/getVariantValuesIfExist.d.ts.map +1 -0
- package/dist/definitions/ExternalLink/ExternalLink.d.ts +3 -3
- package/dist/definitions/ExternalLink/ExternalLink.d.ts.map +1 -1
- package/dist/definitions/Icon/Icon.d.ts +10 -2
- package/dist/definitions/Icon/Icon.d.ts.map +1 -1
- package/dist/definitions/Icon/SpinningIcon.d.ts +4 -3
- package/dist/definitions/Icon/SpinningIcon.d.ts.map +1 -1
- package/dist/definitions/Icon/SpinningIcon.web.d.ts +1 -1
- package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
- package/dist/definitions/LoaderIcon/LoaderIcon.d.ts +7 -0
- package/dist/definitions/LoaderIcon/LoaderIcon.d.ts.map +1 -0
- package/dist/definitions/Overlay/Overlay.d.ts +4 -3
- package/dist/definitions/Overlay/Overlay.d.ts.map +1 -1
- package/dist/definitions/PageLoader/PageLoader.d.ts +4 -0
- package/dist/definitions/PageLoader/PageLoader.d.ts.map +1 -0
- package/dist/definitions/PageLoader/PageLoader.web.d.ts +3 -0
- package/dist/definitions/PageLoader/PageLoader.web.d.ts.map +1 -0
- package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +1 -1
- package/dist/definitions/index.d.ts +7 -4
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +37 -36
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/avatar.d.ts +7 -3
- package/dist/definitions/themes/late-ocean/avatar.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/button.d.ts +26 -9
- package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/pageLoader.d.ts +5 -0
- package/dist/definitions/themes/late-ocean/pageLoader.d.ts.map +1 -0
- package/dist/definitions/utils/tests/renderWithProvidersUtils.d.ts +4 -2
- package/dist/definitions/utils/tests/renderWithProvidersUtils.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +265 -305
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +265 -305
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +265 -305
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +375 -399
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +208 -146
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.css +2 -2
- package/dist/index-node-14.17.cjs.web.js +247 -177
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +72 -43
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +72 -43
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +72 -43
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +72 -43
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +72 -43
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +72 -43
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/styles.css +2 -2
- package/dist/tsbuildinfo +1 -1
- package/package.json +9 -8
- package/dist/definitions/Loader/LargeLoader.d.ts +0 -7
- package/dist/definitions/Loader/LargeLoader.d.ts.map +0 -1
- package/dist/definitions/Loader/LargeLoader.web.d.ts +0 -3
- package/dist/definitions/Loader/LargeLoader.web.d.ts.map +0 -1
- package/dist/definitions/Loader/Loader.d.ts +0 -8
- package/dist/definitions/Loader/Loader.d.ts.map +0 -1
- package/dist/definitions/Loader/Loader.web.d.ts +0 -8
- package/dist/definitions/Loader/Loader.web.d.ts.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import { UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
3
|
+
import { UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, ArcIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
4
4
|
export * from '@ornikar/kitt-icons';
|
|
5
|
-
import {
|
|
5
|
+
import { useWindowDimensions, Image, Platform, Linking, Pressable, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1, TextInput, View, Animated as Animated$1, Easing, ActivityIndicator } from 'react-native';
|
|
6
6
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
7
7
|
import styled, { useTheme, css, ThemeProvider } from 'styled-components/native';
|
|
8
|
-
import {
|
|
8
|
+
import { cloneElement, useContext, createContext, forwardRef, useMemo, useState, useRef, useEffect, Fragment as Fragment$1, Children } from 'react';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
|
-
import Animated
|
|
10
|
+
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withRepeat, withTiming, Easing as Easing$1, interpolate } from 'react-native-reanimated';
|
|
11
11
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
12
12
|
import { parse } from 'twemoji-parser';
|
|
13
13
|
import { openBrowserAsync } from 'expo-web-browser';
|
|
@@ -20,71 +20,37 @@ import { LinearGradient } from 'expo-linear-gradient';
|
|
|
20
20
|
import { useFloating, offset, shift, flip } from '@floating-ui/react-native';
|
|
21
21
|
import { makeDecorator } from '@storybook/addons';
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
var children = _ref.children;
|
|
25
|
-
var animationRef = useRef(new Animated.Value(0));
|
|
26
|
-
var rotation = animationRef.current.interpolate({
|
|
27
|
-
inputRange: [0, 1],
|
|
28
|
-
outputRange: ['0deg', '360deg']
|
|
29
|
-
});
|
|
30
|
-
useEffect(function () {
|
|
31
|
-
if (process.env.TESTS) return undefined;
|
|
32
|
-
var animation = Animated.loop(Animated.timing(animationRef.current, {
|
|
33
|
-
toValue: 1,
|
|
34
|
-
duration: 1100,
|
|
35
|
-
easing: Easing.linear,
|
|
36
|
-
useNativeDriver: true
|
|
37
|
-
}));
|
|
38
|
-
animation.start();
|
|
39
|
-
return function () {
|
|
40
|
-
if (process.env.TESTS) return undefined;
|
|
41
|
-
animation.stop();
|
|
42
|
-
return undefined;
|
|
43
|
-
};
|
|
44
|
-
}, []);
|
|
45
|
-
return /*#__PURE__*/jsx(Animated.View, {
|
|
46
|
-
style: {
|
|
47
|
-
transform: [{
|
|
48
|
-
rotate: rotation
|
|
49
|
-
}]
|
|
50
|
-
},
|
|
51
|
-
children: children
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
23
|
+
var defaultIconSize = 20;
|
|
55
24
|
var IconContainer$1 = /*#__PURE__*/styled.View.withConfig({
|
|
56
25
|
displayName: "Icon__IconContainer"
|
|
57
26
|
})(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
|
|
58
|
-
var color = _ref
|
|
59
|
-
return color;
|
|
27
|
+
var $color = _ref.$color;
|
|
28
|
+
return $color;
|
|
60
29
|
}, function (_ref2) {
|
|
61
|
-
var size = _ref2
|
|
62
|
-
return size;
|
|
30
|
+
var $size = _ref2.$size;
|
|
31
|
+
return $size;
|
|
63
32
|
}, function (_ref3) {
|
|
64
|
-
var size = _ref3
|
|
65
|
-
return size;
|
|
33
|
+
var $size = _ref3.$size;
|
|
34
|
+
return $size;
|
|
66
35
|
}, function (_ref4) {
|
|
67
|
-
var _ref4
|
|
68
|
-
align = _ref4
|
|
69
|
-
return align;
|
|
36
|
+
var _ref4$$align = _ref4.$align,
|
|
37
|
+
$align = _ref4$$align === void 0 ? 'auto' : _ref4$$align;
|
|
38
|
+
return $align;
|
|
70
39
|
});
|
|
71
40
|
function Icon(_ref5) {
|
|
72
41
|
var icon = _ref5.icon,
|
|
73
42
|
_ref5$size = _ref5.size,
|
|
74
|
-
size = _ref5$size === void 0 ?
|
|
75
|
-
spin = _ref5.spin,
|
|
43
|
+
size = _ref5$size === void 0 ? defaultIconSize : _ref5$size,
|
|
76
44
|
align = _ref5.align,
|
|
77
45
|
color = _ref5.color;
|
|
78
46
|
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
79
47
|
color: color
|
|
80
48
|
});
|
|
81
49
|
return /*#__PURE__*/jsx(IconContainer$1, {
|
|
82
|
-
align: align,
|
|
83
|
-
size: size,
|
|
84
|
-
color: color,
|
|
85
|
-
children:
|
|
86
|
-
children: clonedIcon
|
|
87
|
-
}) : clonedIcon
|
|
50
|
+
$align: align,
|
|
51
|
+
$size: size,
|
|
52
|
+
$color: color,
|
|
53
|
+
children: clonedIcon
|
|
88
54
|
});
|
|
89
55
|
}
|
|
90
56
|
|
|
@@ -137,10 +103,6 @@ var KittBreakpointsMax = {
|
|
|
137
103
|
};
|
|
138
104
|
|
|
139
105
|
var _excluded$h = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
140
|
-
|
|
141
|
-
function ownKeys$q(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; }
|
|
142
|
-
|
|
143
|
-
function _objectSpread$q(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$q(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$q(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
144
106
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
145
107
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
146
108
|
function useTypographyColor() {
|
|
@@ -233,14 +195,14 @@ function Typography(_ref4) {
|
|
|
233
195
|
var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular';
|
|
234
196
|
var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
|
|
235
197
|
value: isHeader,
|
|
236
|
-
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread
|
|
198
|
+
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread({
|
|
237
199
|
$color: colorOrDefaultToBlack,
|
|
238
200
|
$isHeader: isHeader,
|
|
239
201
|
$typeForCurrentWindowSize: typeForCurrentWindowSize,
|
|
240
202
|
$variant: nonNullableVariant,
|
|
241
203
|
accessibilityRole: accessibilityRole || undefined
|
|
242
204
|
}, otherProps))
|
|
243
|
-
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread
|
|
205
|
+
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread({
|
|
244
206
|
$color: colorOrDefaultToBlack,
|
|
245
207
|
$isHeader: isHeader,
|
|
246
208
|
$variant: nonNullableVariant,
|
|
@@ -253,13 +215,13 @@ function Typography(_ref4) {
|
|
|
253
215
|
}
|
|
254
216
|
|
|
255
217
|
function TypographyText(props) {
|
|
256
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread
|
|
218
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread({
|
|
257
219
|
accessibilityRole: null
|
|
258
220
|
}, props));
|
|
259
221
|
}
|
|
260
222
|
|
|
261
223
|
function TypographyParagraph(props) {
|
|
262
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread
|
|
224
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread({
|
|
263
225
|
accessibilityRole: "paragraph"
|
|
264
226
|
}, props));
|
|
265
227
|
}
|
|
@@ -267,7 +229,7 @@ function TypographyParagraph(props) {
|
|
|
267
229
|
var createHeading = function (level, defaultBase) {
|
|
268
230
|
// https://github.com/necolas/react-native-web/issues/401
|
|
269
231
|
function TypographyHeading(props) {
|
|
270
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread
|
|
232
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({
|
|
271
233
|
accessibilityRole: "header",
|
|
272
234
|
base: defaultBase
|
|
273
235
|
}, props), {}, {
|
|
@@ -303,11 +265,7 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
303
265
|
|
|
304
266
|
Typography.h5 = createHeading(5, 'header5');
|
|
305
267
|
|
|
306
|
-
var _excluded$g = ["size", "
|
|
307
|
-
|
|
308
|
-
function ownKeys$p(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; }
|
|
309
|
-
|
|
310
|
-
function _objectSpread$p(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$p(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$p(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
268
|
+
var _excluded$g = ["size", "round", "light", "sizeVariant"];
|
|
311
269
|
|
|
312
270
|
var getInitials = function (firstname, lastname) {
|
|
313
271
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
@@ -318,9 +276,10 @@ var StyledAvatarView = /*#__PURE__*/styled.View.withConfig({
|
|
|
318
276
|
})(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
|
|
319
277
|
var theme = _ref.theme,
|
|
320
278
|
$isRound = _ref.$isRound,
|
|
321
|
-
$size = _ref.$size
|
|
279
|
+
$size = _ref.$size,
|
|
280
|
+
$sizeVariant = _ref.$sizeVariant;
|
|
322
281
|
if ($isRound) return "".concat($size / 2, "px");
|
|
323
|
-
return "".concat(theme.kitt.avatar.borderRadius, "px");
|
|
282
|
+
return "".concat($sizeVariant === 'large' ? theme.kitt.avatar.large.borderRadius : theme.kitt.avatar.borderRadius, "px");
|
|
324
283
|
}, function (_ref2) {
|
|
325
284
|
var theme = _ref2.theme,
|
|
326
285
|
$isLight = _ref2.$isLight;
|
|
@@ -339,8 +298,8 @@ function AvatarContent(_ref5) {
|
|
|
339
298
|
firstname = _ref5.firstname,
|
|
340
299
|
lastname = _ref5.lastname,
|
|
341
300
|
alt = _ref5.alt,
|
|
342
|
-
|
|
343
|
-
|
|
301
|
+
isLight = _ref5.isLight,
|
|
302
|
+
sizeVariant = _ref5.sizeVariant;
|
|
344
303
|
|
|
345
304
|
if (src) {
|
|
346
305
|
return /*#__PURE__*/jsx(Image, {
|
|
@@ -357,8 +316,8 @@ function AvatarContent(_ref5) {
|
|
|
357
316
|
|
|
358
317
|
if (firstname && lastname) {
|
|
359
318
|
return /*#__PURE__*/jsx(Typography.Text, {
|
|
360
|
-
base:
|
|
361
|
-
variant:
|
|
319
|
+
base: sizeVariant === 'large' ? 'body-large' : 'body',
|
|
320
|
+
variant: sizeVariant === 'large' ? 'bold' : 'regular',
|
|
362
321
|
color: isLight ? 'black' : 'white',
|
|
363
322
|
children: getInitials(firstname, lastname)
|
|
364
323
|
});
|
|
@@ -374,24 +333,38 @@ function AvatarContent(_ref5) {
|
|
|
374
333
|
function Avatar(_ref6) {
|
|
375
334
|
var _ref6$size = _ref6.size,
|
|
376
335
|
size = _ref6$size === void 0 ? 40 : _ref6$size,
|
|
377
|
-
_ref6$base = _ref6.base,
|
|
378
|
-
base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
|
|
379
336
|
round = _ref6.round,
|
|
380
337
|
light = _ref6.light,
|
|
338
|
+
sizeVariant = _ref6.sizeVariant,
|
|
381
339
|
props = _objectWithoutProperties(_ref6, _excluded$g);
|
|
382
340
|
|
|
383
341
|
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
384
342
|
$size: size,
|
|
385
343
|
$isRound: round,
|
|
386
344
|
$isLight: light,
|
|
387
|
-
|
|
345
|
+
$sizeVariant: sizeVariant,
|
|
346
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread({
|
|
388
347
|
size: size,
|
|
389
|
-
|
|
390
|
-
|
|
348
|
+
isLight: light,
|
|
349
|
+
sizeVariant: sizeVariant
|
|
391
350
|
}, props))
|
|
392
351
|
});
|
|
393
352
|
}
|
|
394
353
|
|
|
354
|
+
var hasVariant = function (button, variant) {
|
|
355
|
+
return variant in button;
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
function getVariantValuesIfExist(theme, type, variant) {
|
|
359
|
+
var button = theme.kitt.button[type];
|
|
360
|
+
|
|
361
|
+
if (hasVariant(button, variant)) {
|
|
362
|
+
return button[variant];
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
return theme.kitt.button[type]["default"];
|
|
366
|
+
}
|
|
367
|
+
|
|
395
368
|
var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
396
369
|
displayName: "AnimatedButtonPressable__StyledPressable"
|
|
397
370
|
})(["", ""], function (_ref) {
|
|
@@ -399,7 +372,7 @@ var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
|
399
372
|
if ($isStretch) return undefined;
|
|
400
373
|
return 'align-self: flex-start;';
|
|
401
374
|
});
|
|
402
|
-
var StyledAnimatedView = /*#__PURE__*/styled(Animated
|
|
375
|
+
var StyledAnimatedView = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
403
376
|
displayName: "AnimatedButtonPressable__StyledAnimatedView"
|
|
404
377
|
})(["border-radius:", "px;"], function (_ref2) {
|
|
405
378
|
var theme = _ref2.theme;
|
|
@@ -410,6 +383,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
410
383
|
disabled = _ref3.disabled,
|
|
411
384
|
accessibilityRole = _ref3.accessibilityRole,
|
|
412
385
|
$type = _ref3.$type,
|
|
386
|
+
$variant = _ref3.$variant,
|
|
413
387
|
$isStretch = _ref3.$isStretch,
|
|
414
388
|
href = _ref3.href,
|
|
415
389
|
hrefAttrs = _ref3.hrefAttrs,
|
|
@@ -418,9 +392,11 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
418
392
|
var theme = /*#__PURE__*/useTheme();
|
|
419
393
|
var pressed = useSharedValue(0);
|
|
420
394
|
var color = useSharedValue(0);
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
395
|
+
|
|
396
|
+
var _getVariantValuesIfEx = getVariantValuesIfExist(theme, $type, $variant),
|
|
397
|
+
backgroundColor = _getVariantValuesIfEx.backgroundColor,
|
|
398
|
+
pressedBackgroundColor = _getVariantValuesIfEx.pressedBackgroundColor;
|
|
399
|
+
|
|
424
400
|
var scale = theme.kitt.button.scale;
|
|
425
401
|
var scaleStyles = useAnimatedStyle(function () {
|
|
426
402
|
var _f = function () {
|
|
@@ -448,7 +424,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
448
424
|
};
|
|
449
425
|
_f.asString = "function _f(){const{interpolateColor,color,backgroundColor,pressedBackgroundColor,withSpring,pressed,scale}=jsThis._closure;{return{backgroundColor:interpolateColor(color.value,[0,1],[backgroundColor,pressedBackgroundColor]),transform:[{scale:withSpring(pressed.value?scale.base.active:scale.base.default)}]};}}";
|
|
450
426
|
_f.__workletHash = 5368461229978;
|
|
451
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (
|
|
427
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (56:41)";
|
|
452
428
|
_f.__optimalization = 2;
|
|
453
429
|
|
|
454
430
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -509,10 +485,11 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
509
485
|
}, function (_ref6) {
|
|
510
486
|
var theme = _ref6.theme,
|
|
511
487
|
$isDisabled = _ref6.$isDisabled,
|
|
512
|
-
$type = _ref6.$type
|
|
513
|
-
|
|
488
|
+
$type = _ref6.$type,
|
|
489
|
+
$variant = _ref6.$variant;
|
|
490
|
+
if ($isDisabled) return theme.kitt.button.disabled["default"].backgroundColor;
|
|
514
491
|
if (Platform.OS !== 'web') return 'transparent';
|
|
515
|
-
return theme
|
|
492
|
+
return getVariantValuesIfExist(theme, $type, $variant).backgroundColor;
|
|
516
493
|
}, function (_ref7) {
|
|
517
494
|
var theme = _ref7.theme,
|
|
518
495
|
$isLarge = _ref7.$isLarge,
|
|
@@ -529,23 +506,19 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
529
506
|
var _excluded$f = ["color"],
|
|
530
507
|
_excluded2$2 = ["color"];
|
|
531
508
|
|
|
532
|
-
function ownKeys$o(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; }
|
|
533
|
-
|
|
534
|
-
function _objectSpread$o(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$o(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$o(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
535
|
-
|
|
536
509
|
function TypographyIconSpecifiedColor(_ref) {
|
|
537
510
|
var color = _ref.color,
|
|
538
511
|
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
539
512
|
|
|
540
513
|
var theme = /*#__PURE__*/useTheme();
|
|
541
|
-
return /*#__PURE__*/jsx(Icon, _objectSpread
|
|
514
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
|
|
542
515
|
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
543
516
|
}));
|
|
544
517
|
}
|
|
545
518
|
|
|
546
519
|
function TypographyIconInheritColor(props) {
|
|
547
520
|
var color = useTypographyColor();
|
|
548
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread
|
|
521
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread({
|
|
549
522
|
color: color
|
|
550
523
|
}, props));
|
|
551
524
|
}
|
|
@@ -555,28 +528,24 @@ function TypographyIcon(_ref2) {
|
|
|
555
528
|
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
556
529
|
|
|
557
530
|
if (color) {
|
|
558
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread
|
|
531
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread({
|
|
559
532
|
color: color
|
|
560
533
|
}, props));
|
|
561
534
|
}
|
|
562
535
|
|
|
563
|
-
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread
|
|
536
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread({}, props));
|
|
564
537
|
}
|
|
565
538
|
|
|
566
539
|
function isSubtle(type) {
|
|
567
540
|
return type.startsWith('subtle');
|
|
568
541
|
}
|
|
569
542
|
|
|
570
|
-
var _excluded$e = ["type", "isDisabled", "$isStretch", "icon", "children"];
|
|
571
|
-
|
|
572
|
-
function ownKeys$n(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; }
|
|
543
|
+
var _excluded$e = ["type", "variant", "isDisabled", "$isStretch", "icon", "children"];
|
|
573
544
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
var getTextColorByType = function (type) {
|
|
545
|
+
var getTextColorByType = function (type, variant) {
|
|
577
546
|
switch (type) {
|
|
578
547
|
case 'primary':
|
|
579
|
-
return 'white';
|
|
548
|
+
return variant === 'ghost' ? 'primary' : 'white';
|
|
580
549
|
|
|
581
550
|
case 'white':
|
|
582
551
|
return 'white';
|
|
@@ -627,14 +596,12 @@ var StyledIconContainer$1 = /*#__PURE__*/styled.View.withConfig({
|
|
|
627
596
|
function ButtonIcon(_ref3) {
|
|
628
597
|
var icon = _ref3.icon,
|
|
629
598
|
color = _ref3.color,
|
|
630
|
-
spin = _ref3.spin,
|
|
631
599
|
iconPosition = _ref3.iconPosition,
|
|
632
600
|
testID = _ref3.testID;
|
|
633
601
|
return /*#__PURE__*/jsx(StyledIconContainer$1, {
|
|
634
602
|
$iconPosition: iconPosition,
|
|
635
603
|
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
636
604
|
icon: icon,
|
|
637
|
-
spin: spin,
|
|
638
605
|
testID: testID,
|
|
639
606
|
color: color
|
|
640
607
|
})
|
|
@@ -648,7 +615,6 @@ function ButtonContentChildren(_ref4) {
|
|
|
648
615
|
var type = _ref4.type,
|
|
649
616
|
icon = _ref4.icon,
|
|
650
617
|
iconPosition = _ref4.iconPosition,
|
|
651
|
-
iconSpin = _ref4.iconSpin,
|
|
652
618
|
isDisabled = _ref4.isDisabled,
|
|
653
619
|
color = _ref4.color,
|
|
654
620
|
children = _ref4.children;
|
|
@@ -662,9 +628,8 @@ function ButtonContentChildren(_ref4) {
|
|
|
662
628
|
var isWebSubtle = isSubtle(type) && Platform.OS === 'web' && !isDisabled;
|
|
663
629
|
|
|
664
630
|
if (!children) {
|
|
665
|
-
return /*#__PURE__*/jsx(TypographyIcon
|
|
666
|
-
|
|
667
|
-
,
|
|
631
|
+
return /*#__PURE__*/jsx(TypographyIcon // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
632
|
+
, {
|
|
668
633
|
icon: icon,
|
|
669
634
|
color: isWebSubtle ? 'inherit' : color
|
|
670
635
|
});
|
|
@@ -672,12 +637,11 @@ function ButtonContentChildren(_ref4) {
|
|
|
672
637
|
|
|
673
638
|
var buttonIconSharedProps = {
|
|
674
639
|
type: type,
|
|
675
|
-
spin: iconSpin,
|
|
676
640
|
iconPosition: iconPosition,
|
|
677
641
|
color: isWebSubtle ? 'inherit' : color
|
|
678
642
|
};
|
|
679
643
|
return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
|
|
680
|
-
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread
|
|
644
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread(_objectSpread({}, buttonIconSharedProps), {}, {
|
|
681
645
|
testID: "button-left-icon",
|
|
682
646
|
icon: icon
|
|
683
647
|
})) : null, /*#__PURE__*/jsx(StyledButtonText, {
|
|
@@ -688,7 +652,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
688
652
|
,
|
|
689
653
|
color: isWebSubtle ? undefined : color,
|
|
690
654
|
children: children
|
|
691
|
-
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread
|
|
655
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread(_objectSpread({}, buttonIconSharedProps), {}, {
|
|
692
656
|
icon: icon
|
|
693
657
|
})) : null]
|
|
694
658
|
});
|
|
@@ -710,18 +674,19 @@ var ButtonContentContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
710
674
|
});
|
|
711
675
|
function ButtonContent(_ref7) {
|
|
712
676
|
var type = _ref7.type,
|
|
677
|
+
variant = _ref7.variant,
|
|
713
678
|
isDisabled = _ref7.isDisabled,
|
|
714
679
|
$isStretch = _ref7.$isStretch,
|
|
715
680
|
icon = _ref7.icon,
|
|
716
681
|
children = _ref7.children,
|
|
717
682
|
props = _objectWithoutProperties(_ref7, _excluded$e);
|
|
718
683
|
|
|
719
|
-
var color = isDisabled ? 'black-light' : getTextColorByType(type);
|
|
684
|
+
var color = isDisabled ? 'black-light' : getTextColorByType(type, variant);
|
|
720
685
|
return /*#__PURE__*/jsx(ButtonContentContainer, {
|
|
721
686
|
$isSubtle: isSubtle(type),
|
|
722
687
|
$isStretch: $isStretch,
|
|
723
688
|
$isIconOnly: Boolean(!children && icon),
|
|
724
|
-
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread
|
|
689
|
+
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread(_objectSpread({
|
|
725
690
|
icon: icon,
|
|
726
691
|
type: type,
|
|
727
692
|
isDisabled: isDisabled,
|
|
@@ -739,7 +704,7 @@ var StyledDisabled = /*#__PURE__*/styled.View.withConfig({
|
|
|
739
704
|
var _theme$kitt$button = theme.kitt.button,
|
|
740
705
|
borderWidth = _theme$kitt$button.borderWidth,
|
|
741
706
|
disabled = _theme$kitt$button.disabled;
|
|
742
|
-
return "".concat(borderWidth.disabled, "px solid ").concat(disabled.borderColor);
|
|
707
|
+
return "".concat(borderWidth.disabled, "px solid ").concat(disabled["default"].borderColor);
|
|
743
708
|
}, function (_ref2) {
|
|
744
709
|
var theme = _ref2.theme;
|
|
745
710
|
return theme.kitt.button.borderRadius;
|
|
@@ -749,19 +714,25 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
749
714
|
var children = _ref.children,
|
|
750
715
|
_ref$type = _ref.type,
|
|
751
716
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
717
|
+
_ref$variant = _ref.variant,
|
|
718
|
+
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
752
719
|
disabled = _ref.disabled,
|
|
753
720
|
stretch = _ref.stretch,
|
|
754
721
|
large = _ref.large,
|
|
755
722
|
icon = _ref.icon,
|
|
756
723
|
_ref$iconPosition = _ref.iconPosition,
|
|
757
724
|
iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
|
|
758
|
-
iconSpin = _ref.iconSpin,
|
|
759
725
|
testID = _ref.testID,
|
|
760
726
|
href = _ref.href,
|
|
761
727
|
hrefAttrs = _ref.hrefAttrs,
|
|
762
728
|
_ref$accessibilityRol = _ref.accessibilityRole,
|
|
763
729
|
accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
|
|
764
730
|
onPress = _ref.onPress;
|
|
731
|
+
|
|
732
|
+
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && type !== 'primary') {
|
|
733
|
+
throw new Error('variant=ghost is only allowed with type=primary');
|
|
734
|
+
}
|
|
735
|
+
|
|
765
736
|
return /*#__PURE__*/jsx(AnimatedButtonPressable, {
|
|
766
737
|
ref: ref,
|
|
767
738
|
accessibilityRole: accessibilityRole,
|
|
@@ -771,19 +742,21 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
771
742
|
disabled: disabled,
|
|
772
743
|
$isStretch: stretch,
|
|
773
744
|
$type: type,
|
|
745
|
+
$variant: variant,
|
|
774
746
|
onPress: onPress,
|
|
775
747
|
children: /*#__PURE__*/jsxs(BaseStyledButtonPressable, {
|
|
776
748
|
$type: type,
|
|
749
|
+
$variant: variant,
|
|
777
750
|
$isStretch: stretch,
|
|
778
751
|
$isLarge: large,
|
|
779
752
|
$isDisabled: disabled,
|
|
780
753
|
children: [/*#__PURE__*/jsx(ButtonContent, {
|
|
781
754
|
type: type,
|
|
755
|
+
variant: variant,
|
|
782
756
|
$isStretch: stretch,
|
|
783
757
|
isDisabled: disabled,
|
|
784
758
|
icon: icon,
|
|
785
759
|
iconPosition: iconPosition,
|
|
786
|
-
iconSpin: iconSpin,
|
|
787
760
|
children: children
|
|
788
761
|
}), Platform.OS !== 'web' && disabled ? /*#__PURE__*/jsx(StyledDisabled, {}) : null]
|
|
789
762
|
})
|
|
@@ -859,10 +832,6 @@ var defaultOpenLinkBehavior = {
|
|
|
859
832
|
};
|
|
860
833
|
|
|
861
834
|
var _excluded$d = ["as", "href", "openLinkBehavior", "onPress"];
|
|
862
|
-
|
|
863
|
-
function ownKeys$m(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; }
|
|
864
|
-
|
|
865
|
-
function _objectSpread$m(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$m(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$m(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
866
835
|
function ExternalLink(_ref) {
|
|
867
836
|
var Component = _ref.as,
|
|
868
837
|
href = _ref.href,
|
|
@@ -871,9 +840,13 @@ function ExternalLink(_ref) {
|
|
|
871
840
|
onPress = _ref.onPress,
|
|
872
841
|
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
873
842
|
|
|
874
|
-
return /*#__PURE__*/jsx(Component, _objectSpread
|
|
875
|
-
onPress: function handleOnPress() {
|
|
876
|
-
if (onPress)
|
|
843
|
+
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
844
|
+
onPress: function handleOnPress(e) {
|
|
845
|
+
if (onPress) {
|
|
846
|
+
onPress(e);
|
|
847
|
+
if (e !== null && e !== void 0 && e.defaultPrevented) return;
|
|
848
|
+
}
|
|
849
|
+
|
|
877
850
|
if (!href) return;
|
|
878
851
|
|
|
879
852
|
switch (openLinkBehavior["native"]) {
|
|
@@ -955,6 +928,9 @@ var avatar = {
|
|
|
955
928
|
},
|
|
956
929
|
light: {
|
|
957
930
|
backgroundColor: lateOceanColorPalette.black100
|
|
931
|
+
},
|
|
932
|
+
large: {
|
|
933
|
+
borderRadius: 30
|
|
958
934
|
}
|
|
959
935
|
};
|
|
960
936
|
|
|
@@ -978,56 +954,77 @@ var button = {
|
|
|
978
954
|
}
|
|
979
955
|
},
|
|
980
956
|
contentPadding: {
|
|
981
|
-
"default": '
|
|
982
|
-
large: '
|
|
983
|
-
disabled: '
|
|
957
|
+
"default": '7px 16px 7px',
|
|
958
|
+
large: '11px 24px 11px',
|
|
959
|
+
disabled: '5px 14px 5px'
|
|
984
960
|
},
|
|
985
961
|
transition: {
|
|
986
962
|
duration: '200ms',
|
|
987
963
|
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
988
964
|
},
|
|
989
965
|
"default": {
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
966
|
+
"default": {
|
|
967
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
968
|
+
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
969
|
+
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
970
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
971
|
+
}
|
|
994
972
|
},
|
|
995
973
|
primary: {
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
974
|
+
"default": {
|
|
975
|
+
backgroundColor: colors.primary,
|
|
976
|
+
pressedBackgroundColor: colors.primaryLight,
|
|
977
|
+
hoverBackgroundColor: colors.primaryLight,
|
|
978
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)'
|
|
979
|
+
},
|
|
980
|
+
ghost: {
|
|
981
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
982
|
+
pressedBackgroundColor: colors.uiBackground,
|
|
983
|
+
hoverBackgroundColor: colors.hover,
|
|
984
|
+
focusBorderColor: 'rgba(255,255,255, 0.4)',
|
|
985
|
+
color: colors.primary,
|
|
986
|
+
hoverColor: colors.hover,
|
|
987
|
+
activeColor: colors.hover
|
|
988
|
+
}
|
|
1000
989
|
},
|
|
1001
990
|
white: {
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
991
|
+
"default": {
|
|
992
|
+
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
993
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
994
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
995
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.1)'
|
|
996
|
+
}
|
|
1006
997
|
},
|
|
1007
998
|
subtle: {
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
999
|
+
"default": {
|
|
1000
|
+
backgroundColor: colors.transparent,
|
|
1001
|
+
pressedBackgroundColor: colors.transparent,
|
|
1002
|
+
hoverBackgroundColor: colors.transparent,
|
|
1003
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)',
|
|
1004
|
+
color: colors.primary,
|
|
1005
|
+
hoverColor: 'rgba(76, 52, 224, 0.8)',
|
|
1006
|
+
activeColor: 'rgba(76, 52, 224, 0.8)'
|
|
1007
|
+
}
|
|
1015
1008
|
},
|
|
1016
1009
|
'subtle-dark': {
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1010
|
+
"default": {
|
|
1011
|
+
backgroundColor: colors.transparent,
|
|
1012
|
+
pressedBackgroundColor: colors.transparent,
|
|
1013
|
+
hoverBackgroundColor: colors.transparent,
|
|
1014
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)',
|
|
1015
|
+
color: colors.black,
|
|
1016
|
+
hoverColor: 'rgba(0, 0, 0, 0.8)',
|
|
1017
|
+
activeColor: 'rgba(0, 0, 0, 0.8)'
|
|
1018
|
+
}
|
|
1024
1019
|
},
|
|
1025
1020
|
disabled: {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1021
|
+
"default": {
|
|
1022
|
+
backgroundColor: colors.disabled,
|
|
1023
|
+
pressedBackgroundColor: colors.disabled,
|
|
1024
|
+
hoverBackgroundColor: colors.disabled,
|
|
1025
|
+
focusBorderColor: lateOceanColorPalette.black100,
|
|
1026
|
+
borderColor: lateOceanColorPalette.black100
|
|
1027
|
+
}
|
|
1031
1028
|
}
|
|
1032
1029
|
};
|
|
1033
1030
|
|
|
@@ -1307,14 +1304,14 @@ var iconButton = {
|
|
|
1307
1304
|
},
|
|
1308
1305
|
disabled: {
|
|
1309
1306
|
scale: 1,
|
|
1310
|
-
backgroundColor: button.disabled.backgroundColor,
|
|
1311
|
-
borderColor: button.disabled.borderColor
|
|
1307
|
+
backgroundColor: button.disabled["default"].backgroundColor,
|
|
1308
|
+
borderColor: button.disabled["default"].borderColor
|
|
1312
1309
|
},
|
|
1313
1310
|
"default": {
|
|
1314
|
-
pressedBackgroundColor: button["default"].pressedBackgroundColor
|
|
1311
|
+
pressedBackgroundColor: button["default"]["default"].pressedBackgroundColor
|
|
1315
1312
|
},
|
|
1316
1313
|
white: {
|
|
1317
|
-
pressedBackgroundColor: button.white.hoverBackgroundColor
|
|
1314
|
+
pressedBackgroundColor: button.white["default"].hoverBackgroundColor
|
|
1318
1315
|
}
|
|
1319
1316
|
};
|
|
1320
1317
|
|
|
@@ -1325,6 +1322,10 @@ var listItem = {
|
|
|
1325
1322
|
innerMargin: 8
|
|
1326
1323
|
};
|
|
1327
1324
|
|
|
1325
|
+
var pageLoader = {
|
|
1326
|
+
size: 60
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1328
1329
|
var shadows = {
|
|
1329
1330
|
medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
|
|
1330
1331
|
};
|
|
@@ -1415,19 +1416,20 @@ var theme = {
|
|
|
1415
1416
|
lateOcean: lateOceanColorPalette
|
|
1416
1417
|
},
|
|
1417
1418
|
avatar: avatar,
|
|
1419
|
+
breakpoints: breakpoints,
|
|
1418
1420
|
button: button,
|
|
1419
1421
|
card: card,
|
|
1420
1422
|
feedbackMessage: feedbackMessage,
|
|
1421
1423
|
forms: forms,
|
|
1422
|
-
typography: typography,
|
|
1423
|
-
tag: tag,
|
|
1424
|
-
shadows: shadows,
|
|
1425
1424
|
fullScreenModal: fullScreenModal,
|
|
1426
1425
|
iconButton: iconButton,
|
|
1427
1426
|
listItem: listItem,
|
|
1428
|
-
|
|
1427
|
+
pageLoader: pageLoader,
|
|
1428
|
+
shadows: shadows,
|
|
1429
1429
|
skeleton: skeleton,
|
|
1430
|
-
|
|
1430
|
+
tag: tag,
|
|
1431
|
+
tooltip: tooltip,
|
|
1432
|
+
typography: typography
|
|
1431
1433
|
};
|
|
1432
1434
|
|
|
1433
1435
|
function matchWindowSize(_ref, _ref2) {
|
|
@@ -1647,10 +1649,6 @@ function DatePickerInputPart(_ref4) {
|
|
|
1647
1649
|
});
|
|
1648
1650
|
}
|
|
1649
1651
|
|
|
1650
|
-
function ownKeys$l(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; }
|
|
1651
|
-
|
|
1652
|
-
function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$l(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1653
|
-
|
|
1654
1652
|
function prefixWithZero(value) {
|
|
1655
1653
|
return "".concat(value).padStart(2, '0');
|
|
1656
1654
|
}
|
|
@@ -1704,14 +1702,14 @@ function DatePickerInputs(_ref4) {
|
|
|
1704
1702
|
onPress: handleModalOpen,
|
|
1705
1703
|
children: [/*#__PURE__*/jsx(PartContainer, {
|
|
1706
1704
|
$isStretch: stretch,
|
|
1707
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread
|
|
1705
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
|
|
1708
1706
|
partName: "day",
|
|
1709
1707
|
value: currentValue ? prefixWithZero(currentValue.getDate()) : undefined,
|
|
1710
1708
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day
|
|
1711
1709
|
}))
|
|
1712
1710
|
}), /*#__PURE__*/jsx(PartContainer, {
|
|
1713
1711
|
$isStretch: stretch,
|
|
1714
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread
|
|
1712
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
|
|
1715
1713
|
partName: "month",
|
|
1716
1714
|
value: currentValue ? prefixWithZero(currentValue.getMonth() + 1) : undefined,
|
|
1717
1715
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month
|
|
@@ -1719,7 +1717,7 @@ function DatePickerInputs(_ref4) {
|
|
|
1719
1717
|
}), /*#__PURE__*/jsx(PartContainer, {
|
|
1720
1718
|
$isLast: true,
|
|
1721
1719
|
$isStretch: stretch,
|
|
1722
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread
|
|
1720
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
|
|
1723
1721
|
partName: "year",
|
|
1724
1722
|
value: currentValue ? currentValue.getFullYear() : undefined,
|
|
1725
1723
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year
|
|
@@ -1729,10 +1727,6 @@ function DatePickerInputs(_ref4) {
|
|
|
1729
1727
|
}
|
|
1730
1728
|
|
|
1731
1729
|
var _excluded$c = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "setIsFocused", "currentValue", "setCurrentValue", "onChange", "isFocused"];
|
|
1732
|
-
|
|
1733
|
-
function ownKeys$k(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; }
|
|
1734
|
-
|
|
1735
|
-
function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$k(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$k(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1736
1730
|
function DatePickerAndroid(_ref) {
|
|
1737
1731
|
var onBlur = _ref.onBlur,
|
|
1738
1732
|
onFocus = _ref.onFocus,
|
|
@@ -1749,7 +1743,7 @@ function DatePickerAndroid(_ref) {
|
|
|
1749
1743
|
if (onBlur) onBlur();
|
|
1750
1744
|
};
|
|
1751
1745
|
|
|
1752
|
-
return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread
|
|
1746
|
+
return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
|
|
1753
1747
|
handleModalOpen: function handleModalOpen() {
|
|
1754
1748
|
setIsFocused(true);
|
|
1755
1749
|
if (onFocus) onFocus();
|
|
@@ -1777,24 +1771,22 @@ function DatePickerAndroid(_ref) {
|
|
|
1777
1771
|
}, props));
|
|
1778
1772
|
}
|
|
1779
1773
|
|
|
1780
|
-
function ownKeys$j(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; }
|
|
1781
|
-
|
|
1782
|
-
function _objectSpread$j(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$j(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$j(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1783
1774
|
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
1784
1775
|
var OverlayPressable = /*#__PURE__*/styled(Pressable).withConfig({
|
|
1785
1776
|
displayName: "Overlay__OverlayPressable"
|
|
1786
1777
|
})(function (_ref) {
|
|
1787
1778
|
var theme = _ref.theme;
|
|
1788
|
-
return _objectSpread
|
|
1779
|
+
return _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
1789
1780
|
backgroundColor: theme.kitt.colors.overlay.dark
|
|
1790
1781
|
});
|
|
1791
1782
|
});
|
|
1792
1783
|
function Overlay(_ref2) {
|
|
1793
|
-
var onPress = _ref2.onPress
|
|
1784
|
+
var onPress = _ref2.onPress,
|
|
1785
|
+
children = _ref2.children;
|
|
1794
1786
|
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
1795
1787
|
accessibilityRole: "none",
|
|
1796
1788
|
onPress: onPress,
|
|
1797
|
-
children:
|
|
1789
|
+
children: children
|
|
1798
1790
|
});
|
|
1799
1791
|
}
|
|
1800
1792
|
|
|
@@ -1833,10 +1825,6 @@ function ModalFooter(_ref3) {
|
|
|
1833
1825
|
}
|
|
1834
1826
|
|
|
1835
1827
|
var _excluded$b = ["as", "children"];
|
|
1836
|
-
|
|
1837
|
-
function ownKeys$i(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; }
|
|
1838
|
-
|
|
1839
|
-
function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$i(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$i(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1840
1828
|
function StyleWebWrapper(_ref) {
|
|
1841
1829
|
var as = _ref.as,
|
|
1842
1830
|
children = _ref.children,
|
|
@@ -1844,14 +1832,11 @@ function StyleWebWrapper(_ref) {
|
|
|
1844
1832
|
|
|
1845
1833
|
if (Platform.OS !== 'web') return children;
|
|
1846
1834
|
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
1847
|
-
return /*#__PURE__*/jsx(as || 'div', _objectSpread
|
|
1835
|
+
return /*#__PURE__*/jsx(as || 'div', _objectSpread(_objectSpread({}, props), {}, {
|
|
1848
1836
|
children: children
|
|
1849
1837
|
}));
|
|
1850
1838
|
}
|
|
1851
1839
|
|
|
1852
|
-
function ownKeys$h(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; }
|
|
1853
|
-
|
|
1854
|
-
function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$h(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1855
1840
|
// type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
|
|
1856
1841
|
// type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
|
|
1857
1842
|
// export function withTheme<Props extends { theme: DefaultTheme }, C>(
|
|
@@ -1866,7 +1851,7 @@ function withTheme(WrappedComponent) {
|
|
|
1866
1851
|
// eslint-disable-next-line prefer-arrow-callback
|
|
1867
1852
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
1868
1853
|
var theme = /*#__PURE__*/useTheme();
|
|
1869
|
-
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread
|
|
1854
|
+
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread({
|
|
1870
1855
|
ref: ref,
|
|
1871
1856
|
theme: theme
|
|
1872
1857
|
}, props));
|
|
@@ -1874,10 +1859,6 @@ function withTheme(WrappedComponent) {
|
|
|
1874
1859
|
}
|
|
1875
1860
|
|
|
1876
1861
|
var _excluded$a = ["color", "disabled"];
|
|
1877
|
-
|
|
1878
|
-
function ownKeys$g(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; }
|
|
1879
|
-
|
|
1880
|
-
function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$g(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$g(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1881
1862
|
var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
|
|
1882
1863
|
name: "PressableIconButtonWebWrapper",
|
|
1883
1864
|
"class": "kitt-u_PressableIconButtonWebWrapper_p1nlccvg",
|
|
@@ -1947,13 +1928,13 @@ function PressableIconButton(_ref9) {
|
|
|
1947
1928
|
as: PressableIconButtonWebWrapper,
|
|
1948
1929
|
$isWhite: color === 'white',
|
|
1949
1930
|
$isDisabled: Boolean(disabled),
|
|
1950
|
-
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread
|
|
1931
|
+
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread(_objectSpread({}, props), {}, {
|
|
1951
1932
|
disabled: disabled
|
|
1952
1933
|
}))
|
|
1953
1934
|
});
|
|
1954
1935
|
}
|
|
1955
1936
|
|
|
1956
|
-
var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated
|
|
1937
|
+
var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
1957
1938
|
displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground"
|
|
1958
1939
|
})(["background-color:", ";border-radius:", "px;width:", "px;height:", "px;position:absolute;bottom:0;left:0;"], function (_ref) {
|
|
1959
1940
|
var theme = _ref.theme,
|
|
@@ -1973,7 +1954,7 @@ var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated$1.View).withConf
|
|
|
1973
1954
|
var theme = _ref4.theme;
|
|
1974
1955
|
return theme.kitt.iconButton.height;
|
|
1975
1956
|
});
|
|
1976
|
-
var AnimatedViewContainer = /*#__PURE__*/styled(Animated
|
|
1957
|
+
var AnimatedViewContainer = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
1977
1958
|
displayName: "PressableAnimatedContainer__AnimatedViewContainer"
|
|
1978
1959
|
})(["position:relative;align-items:center;justify-content:center;width:100%;height:100%;"]);
|
|
1979
1960
|
function PressableAnimatedContainer(_ref5) {
|
|
@@ -2226,10 +2207,6 @@ Modal.Header = ModalHeader;
|
|
|
2226
2207
|
Modal.Body = ModalBody;
|
|
2227
2208
|
Modal.Footer = ModalFooter;
|
|
2228
2209
|
|
|
2229
|
-
function ownKeys$f(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; }
|
|
2230
|
-
|
|
2231
|
-
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2232
|
-
|
|
2233
2210
|
function getDatePickerDisplayMode() {
|
|
2234
2211
|
if (Platform.OS === 'android') return 'calendar';
|
|
2235
2212
|
if (Platform.OS === 'ios') return 'spinner';
|
|
@@ -2249,7 +2226,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
2249
2226
|
var iosProps = Platform.OS === 'ios' ? {
|
|
2250
2227
|
textColor: theme.kitt.colors.primary
|
|
2251
2228
|
} : {};
|
|
2252
|
-
return /*#__PURE__*/jsx(DateTimePicker, _objectSpread
|
|
2229
|
+
return /*#__PURE__*/jsx(DateTimePicker, _objectSpread(_objectSpread({
|
|
2253
2230
|
is24Hour: true,
|
|
2254
2231
|
testID: testID,
|
|
2255
2232
|
value: value || defaultDate,
|
|
@@ -2266,10 +2243,6 @@ function PlatformDateTimePicker(_ref) {
|
|
|
2266
2243
|
|
|
2267
2244
|
var _excluded$9 = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
2268
2245
|
|
|
2269
|
-
function ownKeys$e(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; }
|
|
2270
|
-
|
|
2271
|
-
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$e(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2272
|
-
|
|
2273
2246
|
function ModalTitle(_ref) {
|
|
2274
2247
|
var children = _ref.children;
|
|
2275
2248
|
return /*#__PURE__*/jsx(Modal.Header, {
|
|
@@ -2306,7 +2279,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2306
2279
|
children: [title ? /*#__PURE__*/jsx(ModalTitle, {
|
|
2307
2280
|
children: title
|
|
2308
2281
|
}) : null, /*#__PURE__*/jsx(Modal.Body, {
|
|
2309
|
-
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread
|
|
2282
|
+
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread(_objectSpread({}, props), {}, {
|
|
2310
2283
|
value: currentValue,
|
|
2311
2284
|
onChange: function handleChange(newDate) {
|
|
2312
2285
|
setCurrentValue(function (prev) {
|
|
@@ -2333,10 +2306,6 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2333
2306
|
}
|
|
2334
2307
|
|
|
2335
2308
|
var _excluded$8 = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "onChange", "onFocus", "onBlur", "pickerDefaultDate"];
|
|
2336
|
-
|
|
2337
|
-
function ownKeys$d(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; }
|
|
2338
|
-
|
|
2339
|
-
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$d(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2340
2309
|
function DatePicker(_ref) {
|
|
2341
2310
|
var value = _ref.value,
|
|
2342
2311
|
pickerUITestID = _ref.pickerUITestID,
|
|
@@ -2364,7 +2333,7 @@ function DatePicker(_ref) {
|
|
|
2364
2333
|
setCurrentValue = _useState6[1];
|
|
2365
2334
|
|
|
2366
2335
|
if (Platform.OS === 'android') {
|
|
2367
|
-
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread
|
|
2336
|
+
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
|
|
2368
2337
|
pickerDefaultDate: pickerDefaultDate,
|
|
2369
2338
|
pickerUITestID: pickerUITestID,
|
|
2370
2339
|
currentValue: currentValue,
|
|
@@ -2383,7 +2352,7 @@ function DatePicker(_ref) {
|
|
|
2383
2352
|
};
|
|
2384
2353
|
|
|
2385
2354
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
2386
|
-
children: [/*#__PURE__*/jsx(DatePickerInputs, _objectSpread
|
|
2355
|
+
children: [/*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
|
|
2387
2356
|
handleModalOpen: function handleModalOpen() {
|
|
2388
2357
|
if (onFocus) onFocus();
|
|
2389
2358
|
setIsPickerUIVisible(true);
|
|
@@ -2413,10 +2382,6 @@ var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
2413
2382
|
})(["position:relative;"]);
|
|
2414
2383
|
|
|
2415
2384
|
var _excluded$7 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
2416
|
-
|
|
2417
|
-
function ownKeys$c(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; }
|
|
2418
|
-
|
|
2419
|
-
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$c(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2420
2385
|
var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
2421
2386
|
displayName: "InputText__StyledTextInput"
|
|
2422
2387
|
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
@@ -2476,7 +2441,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2476
2441
|
});
|
|
2477
2442
|
return /*#__PURE__*/jsxs(InputTextContainer, {
|
|
2478
2443
|
$isDisabled: disabled,
|
|
2479
|
-
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread
|
|
2444
|
+
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread(_objectSpread({
|
|
2480
2445
|
ref: ref,
|
|
2481
2446
|
nativeID: id,
|
|
2482
2447
|
editable: !disabled,
|
|
@@ -2503,11 +2468,8 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2503
2468
|
});
|
|
2504
2469
|
});
|
|
2505
2470
|
|
|
2506
|
-
function ownKeys$b(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; }
|
|
2507
|
-
|
|
2508
|
-
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$b(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$b(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2509
2471
|
function InputEmail(props) {
|
|
2510
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2472
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread({
|
|
2511
2473
|
autoCompleteType: "email",
|
|
2512
2474
|
keyboardType: "email-address",
|
|
2513
2475
|
textContentType: "emailAddress",
|
|
@@ -2605,20 +2567,13 @@ function InputIcon(_ref) {
|
|
|
2605
2567
|
});
|
|
2606
2568
|
}
|
|
2607
2569
|
|
|
2608
|
-
function ownKeys$a(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; }
|
|
2609
|
-
|
|
2610
|
-
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$a(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$a(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2611
2570
|
function InputPressable(_ref) {
|
|
2612
2571
|
var props = _extends({}, _ref);
|
|
2613
2572
|
|
|
2614
|
-
return /*#__PURE__*/jsx(Pressable, _objectSpread
|
|
2573
|
+
return /*#__PURE__*/jsx(Pressable, _objectSpread({}, props));
|
|
2615
2574
|
}
|
|
2616
2575
|
|
|
2617
2576
|
var _excluded$6 = ["isPasswordDefaultVisible", "right"];
|
|
2618
|
-
|
|
2619
|
-
function ownKeys$9(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; }
|
|
2620
|
-
|
|
2621
|
-
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2622
2577
|
function InputPassword(_ref) {
|
|
2623
2578
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
2624
2579
|
right = _ref.right,
|
|
@@ -2629,7 +2584,7 @@ function InputPassword(_ref) {
|
|
|
2629
2584
|
isVisible = _useState2[0],
|
|
2630
2585
|
setIsVisible = _useState2[1];
|
|
2631
2586
|
|
|
2632
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2587
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({}, props), {}, {
|
|
2633
2588
|
textContentType: "password",
|
|
2634
2589
|
autoCompleteType: "password",
|
|
2635
2590
|
autoCorrect: false,
|
|
@@ -2648,11 +2603,8 @@ function InputPassword(_ref) {
|
|
|
2648
2603
|
}));
|
|
2649
2604
|
}
|
|
2650
2605
|
|
|
2651
|
-
function ownKeys$8(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; }
|
|
2652
|
-
|
|
2653
|
-
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2654
2606
|
function InputPhone(props) {
|
|
2655
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2607
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({}, props), {}, {
|
|
2656
2608
|
autoCompleteType: "tel",
|
|
2657
2609
|
keyboardType: "number-pad",
|
|
2658
2610
|
textContentType: "telephoneNumber"
|
|
@@ -2816,14 +2768,11 @@ function Radio(_ref16) {
|
|
|
2816
2768
|
});
|
|
2817
2769
|
}
|
|
2818
2770
|
|
|
2819
|
-
function ownKeys$7(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; }
|
|
2820
|
-
|
|
2821
|
-
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2822
2771
|
function TextArea(_ref) {
|
|
2823
2772
|
var props = _extends({}, _ref);
|
|
2824
2773
|
|
|
2825
2774
|
var theme = /*#__PURE__*/useTheme();
|
|
2826
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2775
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread({
|
|
2827
2776
|
multiline: true,
|
|
2828
2777
|
textAlignVertical: "top",
|
|
2829
2778
|
minHeight: theme.kitt.forms.textArea.minHeight
|
|
@@ -2988,11 +2937,48 @@ function FullScreenModal(_ref2) {
|
|
|
2988
2937
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
2989
2938
|
FullScreenModal.Body = FullScreenModalBody;
|
|
2990
2939
|
|
|
2991
|
-
|
|
2940
|
+
function SpinningIcon(_ref) {
|
|
2941
|
+
var icon = _ref.icon,
|
|
2942
|
+
color = _ref.color;
|
|
2943
|
+
|
|
2944
|
+
if (process.env.NODE_ENV !== 'production' && !color) {
|
|
2945
|
+
throw new Error("Invalid color passed to SpinningIcon: ".concat(String(color)));
|
|
2946
|
+
}
|
|
2992
2947
|
|
|
2993
|
-
|
|
2948
|
+
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
2949
|
+
color: color
|
|
2950
|
+
});
|
|
2951
|
+
var animationRef = useRef(new Animated$1.Value(0));
|
|
2952
|
+
var rotation = animationRef.current.interpolate({
|
|
2953
|
+
inputRange: [0, 1],
|
|
2954
|
+
outputRange: ['0deg', '360deg']
|
|
2955
|
+
});
|
|
2956
|
+
useEffect(function () {
|
|
2957
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
2958
|
+
var animation = Animated$1.loop(Animated$1.timing(animationRef.current, {
|
|
2959
|
+
toValue: 1,
|
|
2960
|
+
duration: 1100,
|
|
2961
|
+
easing: Easing.linear,
|
|
2962
|
+
useNativeDriver: true
|
|
2963
|
+
}));
|
|
2964
|
+
animation.start();
|
|
2965
|
+
return function () {
|
|
2966
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
2967
|
+
animation.stop();
|
|
2968
|
+
return undefined;
|
|
2969
|
+
};
|
|
2970
|
+
}, []);
|
|
2971
|
+
return /*#__PURE__*/jsx(Animated$1.View, {
|
|
2972
|
+
style: {
|
|
2973
|
+
transform: [{
|
|
2974
|
+
rotate: rotation
|
|
2975
|
+
}]
|
|
2976
|
+
},
|
|
2977
|
+
children: clonedIcon
|
|
2978
|
+
});
|
|
2979
|
+
}
|
|
2994
2980
|
|
|
2995
|
-
|
|
2981
|
+
var _excluded$5 = ["children"];
|
|
2996
2982
|
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
2997
2983
|
displayName: "ListItemContent__ContentView"
|
|
2998
2984
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
@@ -3000,17 +2986,13 @@ function ListItemContent(_ref) {
|
|
|
3000
2986
|
var children = _ref.children,
|
|
3001
2987
|
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
3002
2988
|
|
|
3003
|
-
return /*#__PURE__*/jsx(ContentView, _objectSpread
|
|
2989
|
+
return /*#__PURE__*/jsx(ContentView, _objectSpread(_objectSpread({}, rest), {}, {
|
|
3004
2990
|
children: children
|
|
3005
2991
|
}));
|
|
3006
2992
|
}
|
|
3007
2993
|
|
|
3008
2994
|
var _excluded$4 = ["children", "side"],
|
|
3009
2995
|
_excluded2$1 = ["children", "align"];
|
|
3010
|
-
|
|
3011
|
-
function ownKeys$5(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; }
|
|
3012
|
-
|
|
3013
|
-
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3014
2996
|
var SideContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
3015
2997
|
displayName: "ListItemSideContent__SideContainerView"
|
|
3016
2998
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
@@ -3029,7 +3011,7 @@ function ListItemSideContainer(_ref3) {
|
|
|
3029
3011
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
3030
3012
|
rest = _objectWithoutProperties(_ref3, _excluded$4);
|
|
3031
3013
|
|
|
3032
|
-
return /*#__PURE__*/jsx(SideContainerView, _objectSpread
|
|
3014
|
+
return /*#__PURE__*/jsx(SideContainerView, _objectSpread(_objectSpread({
|
|
3033
3015
|
side: side
|
|
3034
3016
|
}, rest), {}, {
|
|
3035
3017
|
children: children
|
|
@@ -3047,7 +3029,7 @@ function ListItemSideContent(_ref5) {
|
|
|
3047
3029
|
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
3048
3030
|
rest = _objectWithoutProperties(_ref5, _excluded2$1);
|
|
3049
3031
|
|
|
3050
|
-
return /*#__PURE__*/jsx(SideContentView, _objectSpread
|
|
3032
|
+
return /*#__PURE__*/jsx(SideContentView, _objectSpread(_objectSpread({
|
|
3051
3033
|
align: align
|
|
3052
3034
|
}, rest), {}, {
|
|
3053
3035
|
children: children
|
|
@@ -3055,10 +3037,6 @@ function ListItemSideContent(_ref5) {
|
|
|
3055
3037
|
}
|
|
3056
3038
|
|
|
3057
3039
|
var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
3058
|
-
|
|
3059
|
-
function ownKeys$4(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; }
|
|
3060
|
-
|
|
3061
|
-
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3062
3040
|
var ContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
3063
3041
|
displayName: "ListItem__ContainerView"
|
|
3064
3042
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -3100,13 +3078,13 @@ function ListItem(_ref5) {
|
|
|
3100
3078
|
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
3101
3079
|
|
|
3102
3080
|
var Wrapper = onPress ? Pressable : Fragment$1;
|
|
3103
|
-
var wrapperProps = onPress ? _objectSpread
|
|
3081
|
+
var wrapperProps = onPress ? _objectSpread({
|
|
3104
3082
|
accessibilityRole: 'button',
|
|
3105
3083
|
onPress: onPress
|
|
3106
3084
|
}, rest) : undefined;
|
|
3107
3085
|
var containerProps = onPress ? undefined : rest;
|
|
3108
|
-
return /*#__PURE__*/jsx(Wrapper, _objectSpread
|
|
3109
|
-
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread
|
|
3086
|
+
return /*#__PURE__*/jsx(Wrapper, _objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
3087
|
+
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread(_objectSpread({
|
|
3110
3088
|
withPadding: withPadding,
|
|
3111
3089
|
borders: borders
|
|
3112
3090
|
}, containerProps), {}, {
|
|
@@ -3126,31 +3104,11 @@ ListItem.Content = ListItemContent;
|
|
|
3126
3104
|
ListItem.SideContent = ListItemSideContent;
|
|
3127
3105
|
ListItem.SideContainer = ListItemSideContainer;
|
|
3128
3106
|
|
|
3129
|
-
function
|
|
3130
|
-
|
|
3131
|
-
return
|
|
3132
|
-
}
|
|
3133
|
-
|
|
3134
|
-
function Loader(_ref) {
|
|
3135
|
-
var _ref$color = _ref.color,
|
|
3136
|
-
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
3137
|
-
_ref$size = _ref.size,
|
|
3138
|
-
size = _ref$size === void 0 ? 20 : _ref$size;
|
|
3139
|
-
var theme = /*#__PURE__*/useTheme();
|
|
3140
|
-
var colorHex = theme.kitt.typography.colors[color];
|
|
3141
|
-
return /*#__PURE__*/jsx(ActivityIndicator, {
|
|
3142
|
-
testID: "ActivityIndicator",
|
|
3143
|
-
color: colorHex,
|
|
3144
|
-
size: getActivityIndicatorSize(size)
|
|
3145
|
-
});
|
|
3146
|
-
}
|
|
3147
|
-
|
|
3148
|
-
function LargeLoader(_ref) {
|
|
3149
|
-
var _ref$color = _ref.color,
|
|
3150
|
-
color = _ref$color === void 0 ? 'primary' : _ref$color;
|
|
3151
|
-
return /*#__PURE__*/jsx(Loader, {
|
|
3107
|
+
function LoaderIcon(_ref) {
|
|
3108
|
+
var color = _ref.color;
|
|
3109
|
+
return /*#__PURE__*/jsx(SpinningIcon, {
|
|
3152
3110
|
color: color,
|
|
3153
|
-
|
|
3111
|
+
icon: /*#__PURE__*/jsx(ArcIcon, {})
|
|
3154
3112
|
});
|
|
3155
3113
|
}
|
|
3156
3114
|
|
|
@@ -3329,6 +3287,22 @@ function Notification(_ref) {
|
|
|
3329
3287
|
});
|
|
3330
3288
|
}
|
|
3331
3289
|
|
|
3290
|
+
function getActivityIndicatorSize(size) {
|
|
3291
|
+
if (Platform.OS === 'android') return size;
|
|
3292
|
+
return size < 36 ? 'small' : 'large';
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
|
+
function PageLoader() {
|
|
3296
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3297
|
+
var size = theme.kitt.pageLoader.size;
|
|
3298
|
+
var colorHex = theme.kitt.typography.colors.primary;
|
|
3299
|
+
return /*#__PURE__*/jsx(ActivityIndicator, {
|
|
3300
|
+
testID: "ActivityIndicator",
|
|
3301
|
+
color: colorHex,
|
|
3302
|
+
size: getActivityIndicatorSize(size)
|
|
3303
|
+
});
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3332
3306
|
var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
3333
3307
|
displayName: "SkeletonContent__Container"
|
|
3334
3308
|
})(["background-color:", ";border-color:", ";height:100%;width:100%;"], function (_ref) {
|
|
@@ -3338,7 +3312,7 @@ var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
|
3338
3312
|
var theme = _ref2.theme;
|
|
3339
3313
|
return theme.kitt.skeleton.flareColor;
|
|
3340
3314
|
});
|
|
3341
|
-
var AnimatedLinearGradient = Animated
|
|
3315
|
+
var AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);
|
|
3342
3316
|
function SkeletonContent(_ref3) {
|
|
3343
3317
|
var isLoading = _ref3.isLoading,
|
|
3344
3318
|
width = _ref3.width;
|
|
@@ -3626,10 +3600,6 @@ function Story(_ref) {
|
|
|
3626
3600
|
var _excluded$2 = ["title", "children", "internalIsDemoSection"],
|
|
3627
3601
|
_excluded2 = ["title", "children"],
|
|
3628
3602
|
_excluded3 = ["title", "children"];
|
|
3629
|
-
|
|
3630
|
-
function ownKeys$3(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; }
|
|
3631
|
-
|
|
3632
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3633
3603
|
var StyledSection = /*#__PURE__*/styled.View.withConfig({
|
|
3634
3604
|
displayName: "StorySection__StyledSection"
|
|
3635
3605
|
})(["margin-bottom:32px;"]);
|
|
@@ -3640,7 +3610,7 @@ function StorySection(_ref) {
|
|
|
3640
3610
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
3641
3611
|
|
|
3642
3612
|
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
3643
|
-
return /*#__PURE__*/jsxs(StyledSection, _objectSpread
|
|
3613
|
+
return /*#__PURE__*/jsxs(StyledSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3644
3614
|
children: [/*#__PURE__*/jsx(StoryTitle.Level2, {
|
|
3645
3615
|
children: title
|
|
3646
3616
|
}), children]
|
|
@@ -3655,7 +3625,7 @@ function SubSection(_ref2) {
|
|
|
3655
3625
|
children = _ref2.children,
|
|
3656
3626
|
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
3657
3627
|
|
|
3658
|
-
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread
|
|
3628
|
+
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3659
3629
|
children: [/*#__PURE__*/jsx(StoryTitle.Level3, {
|
|
3660
3630
|
children: title
|
|
3661
3631
|
}), children]
|
|
@@ -3671,7 +3641,7 @@ function BlockSection(_ref3) {
|
|
|
3671
3641
|
children = _ref3.children,
|
|
3672
3642
|
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
3673
3643
|
|
|
3674
|
-
return /*#__PURE__*/jsxs(StyledBlockSection, _objectSpread
|
|
3644
|
+
return /*#__PURE__*/jsxs(StyledBlockSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3675
3645
|
children: [/*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
3676
3646
|
children: title
|
|
3677
3647
|
}), children]
|
|
@@ -4021,9 +3991,6 @@ function TimePicker(_ref) {
|
|
|
4021
3991
|
});
|
|
4022
3992
|
}
|
|
4023
3993
|
|
|
4024
|
-
function ownKeys$2(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; }
|
|
4025
|
-
|
|
4026
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4027
3994
|
var StyledTooltipView = /*#__PURE__*/styled.View.withConfig({
|
|
4028
3995
|
displayName: "TooltipView__StyledTooltipView"
|
|
4029
3996
|
})(["align-items:center;"]);
|
|
@@ -4045,7 +4012,7 @@ var StyledTooltipContent = /*#__PURE__*/styled.View.withConfig({
|
|
|
4045
4012
|
|
|
4046
4013
|
function ArrowView(props) {
|
|
4047
4014
|
var theme = /*#__PURE__*/useTheme();
|
|
4048
|
-
return /*#__PURE__*/jsx(View, _objectSpread
|
|
4015
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4049
4016
|
children: /*#__PURE__*/jsx(TooltipArrowIcon, {
|
|
4050
4017
|
color: theme.kitt.tooltip.backgroundColor
|
|
4051
4018
|
})
|
|
@@ -4081,9 +4048,6 @@ function TooltipView(_ref7) {
|
|
|
4081
4048
|
|
|
4082
4049
|
var tooltipDefaultPosition = 'top';
|
|
4083
4050
|
|
|
4084
|
-
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; }
|
|
4085
|
-
|
|
4086
|
-
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; }
|
|
4087
4051
|
// Since the tooltip use absolute positionning, we need a parent to provide the relative root
|
|
4088
4052
|
var TooltipContainer = /*#__PURE__*/styled.View.withConfig({
|
|
4089
4053
|
displayName: "Tooltip__TooltipContainer"
|
|
@@ -4170,12 +4134,12 @@ function Tooltip(_ref) {
|
|
|
4170
4134
|
ref: floating,
|
|
4171
4135
|
accessibilityElementsHidden: !pressed.value,
|
|
4172
4136
|
importantForAccessibility: pressed.value === true ? 'auto' : 'no-hide-descendants',
|
|
4173
|
-
style: _objectSpread
|
|
4137
|
+
style: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
4174
4138
|
top: y && position === 'bottom' ? y : undefined,
|
|
4175
4139
|
bottom: y && position === 'top' ? y : undefined,
|
|
4176
4140
|
left: x !== null && x !== void 0 ? x : 0
|
|
4177
4141
|
}),
|
|
4178
|
-
children: /*#__PURE__*/jsx(Animated
|
|
4142
|
+
children: /*#__PURE__*/jsx(Animated.View, {
|
|
4179
4143
|
style: [opacityStyles],
|
|
4180
4144
|
children: /*#__PURE__*/jsx(TooltipView, {
|
|
4181
4145
|
position: position,
|
|
@@ -4214,10 +4178,6 @@ function TypographyEmoji(_ref2) {
|
|
|
4214
4178
|
}
|
|
4215
4179
|
|
|
4216
4180
|
var _excluded$1 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
|
|
4217
|
-
|
|
4218
|
-
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; }
|
|
4219
|
-
|
|
4220
|
-
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; }
|
|
4221
4181
|
var TypographyLinkWebWrapper = withTheme( /*#__PURE__*/styled$1("span")({
|
|
4222
4182
|
name: "TypographyLinkWebWrapper",
|
|
4223
4183
|
"class": "kitt-u_TypographyLinkWebWrapper_tcwz3nt",
|
|
@@ -4312,5 +4272,5 @@ function MatchWindowSize(_ref) {
|
|
|
4312
4272
|
return children;
|
|
4313
4273
|
}
|
|
4314
4274
|
|
|
4315
|
-
export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label,
|
|
4275
|
+
export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MatchWindowSize, Message, Modal, Notification, Overlay, PageLoader, Radio, DeprecatedSection as Section, Skeleton, SpinningIcon, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
4316
4276
|
//# sourceMappingURL=index-browser-all.es.js.map
|