@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';
|
|
@@ -19,71 +19,37 @@ import { LinearGradient } from 'expo-linear-gradient';
|
|
|
19
19
|
import { useFloating, offset, shift, flip } from '@floating-ui/react-native';
|
|
20
20
|
import { makeDecorator } from '@storybook/addons';
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
var children = _ref.children;
|
|
24
|
-
var animationRef = useRef(new Animated.Value(0));
|
|
25
|
-
var rotation = animationRef.current.interpolate({
|
|
26
|
-
inputRange: [0, 1],
|
|
27
|
-
outputRange: ['0deg', '360deg']
|
|
28
|
-
});
|
|
29
|
-
useEffect(function () {
|
|
30
|
-
if (process.env.TESTS) return undefined;
|
|
31
|
-
var animation = Animated.loop(Animated.timing(animationRef.current, {
|
|
32
|
-
toValue: 1,
|
|
33
|
-
duration: 1100,
|
|
34
|
-
easing: Easing.linear,
|
|
35
|
-
useNativeDriver: true
|
|
36
|
-
}));
|
|
37
|
-
animation.start();
|
|
38
|
-
return function () {
|
|
39
|
-
if (process.env.TESTS) return undefined;
|
|
40
|
-
animation.stop();
|
|
41
|
-
return undefined;
|
|
42
|
-
};
|
|
43
|
-
}, []);
|
|
44
|
-
return /*#__PURE__*/jsx(Animated.View, {
|
|
45
|
-
style: {
|
|
46
|
-
transform: [{
|
|
47
|
-
rotate: rotation
|
|
48
|
-
}]
|
|
49
|
-
},
|
|
50
|
-
children: children
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
22
|
+
var defaultIconSize = 20;
|
|
54
23
|
var IconContainer$1 = /*#__PURE__*/styled.View.withConfig({
|
|
55
24
|
displayName: "Icon__IconContainer"
|
|
56
25
|
})(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
|
|
57
|
-
var color = _ref
|
|
58
|
-
return color;
|
|
26
|
+
var $color = _ref.$color;
|
|
27
|
+
return $color;
|
|
59
28
|
}, function (_ref2) {
|
|
60
|
-
var size = _ref2
|
|
61
|
-
return size;
|
|
29
|
+
var $size = _ref2.$size;
|
|
30
|
+
return $size;
|
|
62
31
|
}, function (_ref3) {
|
|
63
|
-
var size = _ref3
|
|
64
|
-
return size;
|
|
32
|
+
var $size = _ref3.$size;
|
|
33
|
+
return $size;
|
|
65
34
|
}, function (_ref4) {
|
|
66
|
-
var _ref4
|
|
67
|
-
align = _ref4
|
|
68
|
-
return align;
|
|
35
|
+
var _ref4$$align = _ref4.$align,
|
|
36
|
+
$align = _ref4$$align === void 0 ? 'auto' : _ref4$$align;
|
|
37
|
+
return $align;
|
|
69
38
|
});
|
|
70
39
|
function Icon(_ref5) {
|
|
71
40
|
var icon = _ref5.icon,
|
|
72
41
|
_ref5$size = _ref5.size,
|
|
73
|
-
size = _ref5$size === void 0 ?
|
|
74
|
-
spin = _ref5.spin,
|
|
42
|
+
size = _ref5$size === void 0 ? defaultIconSize : _ref5$size,
|
|
75
43
|
align = _ref5.align,
|
|
76
44
|
color = _ref5.color;
|
|
77
45
|
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
78
46
|
color: color
|
|
79
47
|
});
|
|
80
48
|
return /*#__PURE__*/jsx(IconContainer$1, {
|
|
81
|
-
align: align,
|
|
82
|
-
size: size,
|
|
83
|
-
color: color,
|
|
84
|
-
children:
|
|
85
|
-
children: clonedIcon
|
|
86
|
-
}) : clonedIcon
|
|
49
|
+
$align: align,
|
|
50
|
+
$size: size,
|
|
51
|
+
$color: color,
|
|
52
|
+
children: clonedIcon
|
|
87
53
|
});
|
|
88
54
|
}
|
|
89
55
|
|
|
@@ -136,10 +102,6 @@ var KittBreakpointsMax = {
|
|
|
136
102
|
};
|
|
137
103
|
|
|
138
104
|
var _excluded$h = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
139
|
-
|
|
140
|
-
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; }
|
|
141
|
-
|
|
142
|
-
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; }
|
|
143
105
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
144
106
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
145
107
|
function useTypographyColor() {
|
|
@@ -232,14 +194,14 @@ function Typography(_ref4) {
|
|
|
232
194
|
var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular';
|
|
233
195
|
var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
|
|
234
196
|
value: isHeader,
|
|
235
|
-
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread
|
|
197
|
+
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread({
|
|
236
198
|
$color: colorOrDefaultToBlack,
|
|
237
199
|
$isHeader: isHeader,
|
|
238
200
|
$typeForCurrentWindowSize: typeForCurrentWindowSize,
|
|
239
201
|
$variant: nonNullableVariant,
|
|
240
202
|
accessibilityRole: accessibilityRole || undefined
|
|
241
203
|
}, otherProps))
|
|
242
|
-
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread
|
|
204
|
+
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread({
|
|
243
205
|
$color: colorOrDefaultToBlack,
|
|
244
206
|
$isHeader: isHeader,
|
|
245
207
|
$variant: nonNullableVariant,
|
|
@@ -252,13 +214,13 @@ function Typography(_ref4) {
|
|
|
252
214
|
}
|
|
253
215
|
|
|
254
216
|
function TypographyText(props) {
|
|
255
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread
|
|
217
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread({
|
|
256
218
|
accessibilityRole: null
|
|
257
219
|
}, props));
|
|
258
220
|
}
|
|
259
221
|
|
|
260
222
|
function TypographyParagraph(props) {
|
|
261
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread
|
|
223
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread({
|
|
262
224
|
accessibilityRole: "paragraph"
|
|
263
225
|
}, props));
|
|
264
226
|
}
|
|
@@ -266,7 +228,7 @@ function TypographyParagraph(props) {
|
|
|
266
228
|
var createHeading = function (level, defaultBase) {
|
|
267
229
|
// https://github.com/necolas/react-native-web/issues/401
|
|
268
230
|
function TypographyHeading(props) {
|
|
269
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread
|
|
231
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({
|
|
270
232
|
accessibilityRole: "header",
|
|
271
233
|
base: defaultBase
|
|
272
234
|
}, props), {}, {
|
|
@@ -302,11 +264,7 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
302
264
|
|
|
303
265
|
Typography.h5 = createHeading(5, 'header5');
|
|
304
266
|
|
|
305
|
-
var _excluded$g = ["size", "
|
|
306
|
-
|
|
307
|
-
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; }
|
|
308
|
-
|
|
309
|
-
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; }
|
|
267
|
+
var _excluded$g = ["size", "round", "light", "sizeVariant"];
|
|
310
268
|
|
|
311
269
|
var getInitials = function (firstname, lastname) {
|
|
312
270
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
@@ -317,9 +275,10 @@ var StyledAvatarView = /*#__PURE__*/styled.View.withConfig({
|
|
|
317
275
|
})(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
|
|
318
276
|
var theme = _ref.theme,
|
|
319
277
|
$isRound = _ref.$isRound,
|
|
320
|
-
$size = _ref.$size
|
|
278
|
+
$size = _ref.$size,
|
|
279
|
+
$sizeVariant = _ref.$sizeVariant;
|
|
321
280
|
if ($isRound) return "".concat($size / 2, "px");
|
|
322
|
-
return "".concat(theme.kitt.avatar.borderRadius, "px");
|
|
281
|
+
return "".concat($sizeVariant === 'large' ? theme.kitt.avatar.large.borderRadius : theme.kitt.avatar.borderRadius, "px");
|
|
323
282
|
}, function (_ref2) {
|
|
324
283
|
var theme = _ref2.theme,
|
|
325
284
|
$isLight = _ref2.$isLight;
|
|
@@ -338,8 +297,8 @@ function AvatarContent(_ref5) {
|
|
|
338
297
|
firstname = _ref5.firstname,
|
|
339
298
|
lastname = _ref5.lastname,
|
|
340
299
|
alt = _ref5.alt,
|
|
341
|
-
|
|
342
|
-
|
|
300
|
+
isLight = _ref5.isLight,
|
|
301
|
+
sizeVariant = _ref5.sizeVariant;
|
|
343
302
|
|
|
344
303
|
if (src) {
|
|
345
304
|
return /*#__PURE__*/jsx(Image, {
|
|
@@ -356,8 +315,8 @@ function AvatarContent(_ref5) {
|
|
|
356
315
|
|
|
357
316
|
if (firstname && lastname) {
|
|
358
317
|
return /*#__PURE__*/jsx(Typography.Text, {
|
|
359
|
-
base:
|
|
360
|
-
variant:
|
|
318
|
+
base: sizeVariant === 'large' ? 'body-large' : 'body',
|
|
319
|
+
variant: sizeVariant === 'large' ? 'bold' : 'regular',
|
|
361
320
|
color: isLight ? 'black' : 'white',
|
|
362
321
|
children: getInitials(firstname, lastname)
|
|
363
322
|
});
|
|
@@ -373,24 +332,38 @@ function AvatarContent(_ref5) {
|
|
|
373
332
|
function Avatar(_ref6) {
|
|
374
333
|
var _ref6$size = _ref6.size,
|
|
375
334
|
size = _ref6$size === void 0 ? 40 : _ref6$size,
|
|
376
|
-
_ref6$base = _ref6.base,
|
|
377
|
-
base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
|
|
378
335
|
round = _ref6.round,
|
|
379
336
|
light = _ref6.light,
|
|
337
|
+
sizeVariant = _ref6.sizeVariant,
|
|
380
338
|
props = _objectWithoutProperties(_ref6, _excluded$g);
|
|
381
339
|
|
|
382
340
|
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
383
341
|
$size: size,
|
|
384
342
|
$isRound: round,
|
|
385
343
|
$isLight: light,
|
|
386
|
-
|
|
344
|
+
$sizeVariant: sizeVariant,
|
|
345
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread({
|
|
387
346
|
size: size,
|
|
388
|
-
|
|
389
|
-
|
|
347
|
+
isLight: light,
|
|
348
|
+
sizeVariant: sizeVariant
|
|
390
349
|
}, props))
|
|
391
350
|
});
|
|
392
351
|
}
|
|
393
352
|
|
|
353
|
+
var hasVariant = function (button, variant) {
|
|
354
|
+
return variant in button;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
function getVariantValuesIfExist(theme, type, variant) {
|
|
358
|
+
var button = theme.kitt.button[type];
|
|
359
|
+
|
|
360
|
+
if (hasVariant(button, variant)) {
|
|
361
|
+
return button[variant];
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
return theme.kitt.button[type]["default"];
|
|
365
|
+
}
|
|
366
|
+
|
|
394
367
|
var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
395
368
|
displayName: "AnimatedButtonPressable__StyledPressable"
|
|
396
369
|
})(["", ""], function (_ref) {
|
|
@@ -398,7 +371,7 @@ var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
|
398
371
|
if ($isStretch) return undefined;
|
|
399
372
|
return 'align-self: flex-start;';
|
|
400
373
|
});
|
|
401
|
-
var StyledAnimatedView = /*#__PURE__*/styled(Animated
|
|
374
|
+
var StyledAnimatedView = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
402
375
|
displayName: "AnimatedButtonPressable__StyledAnimatedView"
|
|
403
376
|
})(["border-radius:", "px;"], function (_ref2) {
|
|
404
377
|
var theme = _ref2.theme;
|
|
@@ -409,6 +382,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
409
382
|
disabled = _ref3.disabled,
|
|
410
383
|
accessibilityRole = _ref3.accessibilityRole,
|
|
411
384
|
$type = _ref3.$type,
|
|
385
|
+
$variant = _ref3.$variant,
|
|
412
386
|
$isStretch = _ref3.$isStretch,
|
|
413
387
|
href = _ref3.href,
|
|
414
388
|
hrefAttrs = _ref3.hrefAttrs,
|
|
@@ -417,9 +391,11 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
417
391
|
var theme = /*#__PURE__*/useTheme();
|
|
418
392
|
var pressed = useSharedValue(0);
|
|
419
393
|
var color = useSharedValue(0);
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
394
|
+
|
|
395
|
+
var _getVariantValuesIfEx = getVariantValuesIfExist(theme, $type, $variant),
|
|
396
|
+
backgroundColor = _getVariantValuesIfEx.backgroundColor,
|
|
397
|
+
pressedBackgroundColor = _getVariantValuesIfEx.pressedBackgroundColor;
|
|
398
|
+
|
|
423
399
|
var scale = theme.kitt.button.scale;
|
|
424
400
|
var scaleStyles = useAnimatedStyle(function () {
|
|
425
401
|
var _f = function () {
|
|
@@ -447,7 +423,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
447
423
|
};
|
|
448
424
|
_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)}]};}}";
|
|
449
425
|
_f.__workletHash = 5368461229978;
|
|
450
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (
|
|
426
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (56:41)";
|
|
451
427
|
_f.__optimalization = 2;
|
|
452
428
|
|
|
453
429
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -508,10 +484,11 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
508
484
|
}, function (_ref6) {
|
|
509
485
|
var theme = _ref6.theme,
|
|
510
486
|
$isDisabled = _ref6.$isDisabled,
|
|
511
|
-
$type = _ref6.$type
|
|
512
|
-
|
|
487
|
+
$type = _ref6.$type,
|
|
488
|
+
$variant = _ref6.$variant;
|
|
489
|
+
if ($isDisabled) return theme.kitt.button.disabled["default"].backgroundColor;
|
|
513
490
|
if (Platform.OS !== 'web') return 'transparent';
|
|
514
|
-
return theme
|
|
491
|
+
return getVariantValuesIfExist(theme, $type, $variant).backgroundColor;
|
|
515
492
|
}, function (_ref7) {
|
|
516
493
|
var theme = _ref7.theme,
|
|
517
494
|
$isLarge = _ref7.$isLarge,
|
|
@@ -528,23 +505,19 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
528
505
|
var _excluded$f = ["color"],
|
|
529
506
|
_excluded2$2 = ["color"];
|
|
530
507
|
|
|
531
|
-
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; }
|
|
532
|
-
|
|
533
|
-
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; }
|
|
534
|
-
|
|
535
508
|
function TypographyIconSpecifiedColor(_ref) {
|
|
536
509
|
var color = _ref.color,
|
|
537
510
|
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
538
511
|
|
|
539
512
|
var theme = /*#__PURE__*/useTheme();
|
|
540
|
-
return /*#__PURE__*/jsx(Icon, _objectSpread
|
|
513
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
|
|
541
514
|
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
542
515
|
}));
|
|
543
516
|
}
|
|
544
517
|
|
|
545
518
|
function TypographyIconInheritColor(props) {
|
|
546
519
|
var color = useTypographyColor();
|
|
547
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread
|
|
520
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread({
|
|
548
521
|
color: color
|
|
549
522
|
}, props));
|
|
550
523
|
}
|
|
@@ -554,28 +527,24 @@ function TypographyIcon(_ref2) {
|
|
|
554
527
|
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
555
528
|
|
|
556
529
|
if (color) {
|
|
557
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread
|
|
530
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread({
|
|
558
531
|
color: color
|
|
559
532
|
}, props));
|
|
560
533
|
}
|
|
561
534
|
|
|
562
|
-
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread
|
|
535
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread({}, props));
|
|
563
536
|
}
|
|
564
537
|
|
|
565
538
|
function isSubtle(type) {
|
|
566
539
|
return type.startsWith('subtle');
|
|
567
540
|
}
|
|
568
541
|
|
|
569
|
-
var _excluded$e = ["type", "isDisabled", "$isStretch", "icon", "children"];
|
|
570
|
-
|
|
571
|
-
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; }
|
|
542
|
+
var _excluded$e = ["type", "variant", "isDisabled", "$isStretch", "icon", "children"];
|
|
572
543
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
var getTextColorByType = function (type) {
|
|
544
|
+
var getTextColorByType = function (type, variant) {
|
|
576
545
|
switch (type) {
|
|
577
546
|
case 'primary':
|
|
578
|
-
return 'white';
|
|
547
|
+
return variant === 'ghost' ? 'primary' : 'white';
|
|
579
548
|
|
|
580
549
|
case 'white':
|
|
581
550
|
return 'white';
|
|
@@ -626,14 +595,12 @@ var StyledIconContainer$1 = /*#__PURE__*/styled.View.withConfig({
|
|
|
626
595
|
function ButtonIcon(_ref3) {
|
|
627
596
|
var icon = _ref3.icon,
|
|
628
597
|
color = _ref3.color,
|
|
629
|
-
spin = _ref3.spin,
|
|
630
598
|
iconPosition = _ref3.iconPosition,
|
|
631
599
|
testID = _ref3.testID;
|
|
632
600
|
return /*#__PURE__*/jsx(StyledIconContainer$1, {
|
|
633
601
|
$iconPosition: iconPosition,
|
|
634
602
|
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
635
603
|
icon: icon,
|
|
636
|
-
spin: spin,
|
|
637
604
|
testID: testID,
|
|
638
605
|
color: color
|
|
639
606
|
})
|
|
@@ -647,7 +614,6 @@ function ButtonContentChildren(_ref4) {
|
|
|
647
614
|
var type = _ref4.type,
|
|
648
615
|
icon = _ref4.icon,
|
|
649
616
|
iconPosition = _ref4.iconPosition,
|
|
650
|
-
iconSpin = _ref4.iconSpin,
|
|
651
617
|
isDisabled = _ref4.isDisabled,
|
|
652
618
|
color = _ref4.color,
|
|
653
619
|
children = _ref4.children;
|
|
@@ -661,9 +627,8 @@ function ButtonContentChildren(_ref4) {
|
|
|
661
627
|
var isWebSubtle = isSubtle(type) && Platform.OS === 'web' && !isDisabled;
|
|
662
628
|
|
|
663
629
|
if (!children) {
|
|
664
|
-
return /*#__PURE__*/jsx(TypographyIcon
|
|
665
|
-
|
|
666
|
-
,
|
|
630
|
+
return /*#__PURE__*/jsx(TypographyIcon // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
631
|
+
, {
|
|
667
632
|
icon: icon,
|
|
668
633
|
color: isWebSubtle ? 'inherit' : color
|
|
669
634
|
});
|
|
@@ -671,12 +636,11 @@ function ButtonContentChildren(_ref4) {
|
|
|
671
636
|
|
|
672
637
|
var buttonIconSharedProps = {
|
|
673
638
|
type: type,
|
|
674
|
-
spin: iconSpin,
|
|
675
639
|
iconPosition: iconPosition,
|
|
676
640
|
color: isWebSubtle ? 'inherit' : color
|
|
677
641
|
};
|
|
678
642
|
return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
|
|
679
|
-
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread
|
|
643
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread(_objectSpread({}, buttonIconSharedProps), {}, {
|
|
680
644
|
testID: "button-left-icon",
|
|
681
645
|
icon: icon
|
|
682
646
|
})) : null, /*#__PURE__*/jsx(StyledButtonText, {
|
|
@@ -687,7 +651,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
687
651
|
,
|
|
688
652
|
color: isWebSubtle ? undefined : color,
|
|
689
653
|
children: children
|
|
690
|
-
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread
|
|
654
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread(_objectSpread({}, buttonIconSharedProps), {}, {
|
|
691
655
|
icon: icon
|
|
692
656
|
})) : null]
|
|
693
657
|
});
|
|
@@ -709,18 +673,19 @@ var ButtonContentContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
709
673
|
});
|
|
710
674
|
function ButtonContent(_ref7) {
|
|
711
675
|
var type = _ref7.type,
|
|
676
|
+
variant = _ref7.variant,
|
|
712
677
|
isDisabled = _ref7.isDisabled,
|
|
713
678
|
$isStretch = _ref7.$isStretch,
|
|
714
679
|
icon = _ref7.icon,
|
|
715
680
|
children = _ref7.children,
|
|
716
681
|
props = _objectWithoutProperties(_ref7, _excluded$e);
|
|
717
682
|
|
|
718
|
-
var color = isDisabled ? 'black-light' : getTextColorByType(type);
|
|
683
|
+
var color = isDisabled ? 'black-light' : getTextColorByType(type, variant);
|
|
719
684
|
return /*#__PURE__*/jsx(ButtonContentContainer, {
|
|
720
685
|
$isSubtle: isSubtle(type),
|
|
721
686
|
$isStretch: $isStretch,
|
|
722
687
|
$isIconOnly: Boolean(!children && icon),
|
|
723
|
-
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread
|
|
688
|
+
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread(_objectSpread({
|
|
724
689
|
icon: icon,
|
|
725
690
|
type: type,
|
|
726
691
|
isDisabled: isDisabled,
|
|
@@ -738,7 +703,7 @@ var StyledDisabled = /*#__PURE__*/styled.View.withConfig({
|
|
|
738
703
|
var _theme$kitt$button = theme.kitt.button,
|
|
739
704
|
borderWidth = _theme$kitt$button.borderWidth,
|
|
740
705
|
disabled = _theme$kitt$button.disabled;
|
|
741
|
-
return "".concat(borderWidth.disabled, "px solid ").concat(disabled.borderColor);
|
|
706
|
+
return "".concat(borderWidth.disabled, "px solid ").concat(disabled["default"].borderColor);
|
|
742
707
|
}, function (_ref2) {
|
|
743
708
|
var theme = _ref2.theme;
|
|
744
709
|
return theme.kitt.button.borderRadius;
|
|
@@ -748,19 +713,25 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
748
713
|
var children = _ref.children,
|
|
749
714
|
_ref$type = _ref.type,
|
|
750
715
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
716
|
+
_ref$variant = _ref.variant,
|
|
717
|
+
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
751
718
|
disabled = _ref.disabled,
|
|
752
719
|
stretch = _ref.stretch,
|
|
753
720
|
large = _ref.large,
|
|
754
721
|
icon = _ref.icon,
|
|
755
722
|
_ref$iconPosition = _ref.iconPosition,
|
|
756
723
|
iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
|
|
757
|
-
iconSpin = _ref.iconSpin,
|
|
758
724
|
testID = _ref.testID,
|
|
759
725
|
href = _ref.href,
|
|
760
726
|
hrefAttrs = _ref.hrefAttrs,
|
|
761
727
|
_ref$accessibilityRol = _ref.accessibilityRole,
|
|
762
728
|
accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
|
|
763
729
|
onPress = _ref.onPress;
|
|
730
|
+
|
|
731
|
+
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && type !== 'primary') {
|
|
732
|
+
throw new Error('variant=ghost is only allowed with type=primary');
|
|
733
|
+
}
|
|
734
|
+
|
|
764
735
|
return /*#__PURE__*/jsx(AnimatedButtonPressable, {
|
|
765
736
|
ref: ref,
|
|
766
737
|
accessibilityRole: accessibilityRole,
|
|
@@ -770,19 +741,21 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
770
741
|
disabled: disabled,
|
|
771
742
|
$isStretch: stretch,
|
|
772
743
|
$type: type,
|
|
744
|
+
$variant: variant,
|
|
773
745
|
onPress: onPress,
|
|
774
746
|
children: /*#__PURE__*/jsxs(BaseStyledButtonPressable, {
|
|
775
747
|
$type: type,
|
|
748
|
+
$variant: variant,
|
|
776
749
|
$isStretch: stretch,
|
|
777
750
|
$isLarge: large,
|
|
778
751
|
$isDisabled: disabled,
|
|
779
752
|
children: [/*#__PURE__*/jsx(ButtonContent, {
|
|
780
753
|
type: type,
|
|
754
|
+
variant: variant,
|
|
781
755
|
$isStretch: stretch,
|
|
782
756
|
isDisabled: disabled,
|
|
783
757
|
icon: icon,
|
|
784
758
|
iconPosition: iconPosition,
|
|
785
|
-
iconSpin: iconSpin,
|
|
786
759
|
children: children
|
|
787
760
|
}), Platform.OS !== 'web' && disabled ? /*#__PURE__*/jsx(StyledDisabled, {}) : null]
|
|
788
761
|
})
|
|
@@ -858,10 +831,6 @@ var defaultOpenLinkBehavior = {
|
|
|
858
831
|
};
|
|
859
832
|
|
|
860
833
|
var _excluded$d = ["as", "href", "openLinkBehavior", "onPress"];
|
|
861
|
-
|
|
862
|
-
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; }
|
|
863
|
-
|
|
864
|
-
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; }
|
|
865
834
|
function ExternalLink(_ref) {
|
|
866
835
|
var Component = _ref.as,
|
|
867
836
|
href = _ref.href,
|
|
@@ -870,9 +839,13 @@ function ExternalLink(_ref) {
|
|
|
870
839
|
onPress = _ref.onPress,
|
|
871
840
|
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
872
841
|
|
|
873
|
-
return /*#__PURE__*/jsx(Component, _objectSpread
|
|
874
|
-
onPress: function handleOnPress() {
|
|
875
|
-
if (onPress)
|
|
842
|
+
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
843
|
+
onPress: function handleOnPress(e) {
|
|
844
|
+
if (onPress) {
|
|
845
|
+
onPress(e);
|
|
846
|
+
if (e !== null && e !== void 0 && e.defaultPrevented) return;
|
|
847
|
+
}
|
|
848
|
+
|
|
876
849
|
if (!href) return;
|
|
877
850
|
|
|
878
851
|
switch (openLinkBehavior["native"]) {
|
|
@@ -954,6 +927,9 @@ var avatar = {
|
|
|
954
927
|
},
|
|
955
928
|
light: {
|
|
956
929
|
backgroundColor: lateOceanColorPalette.black100
|
|
930
|
+
},
|
|
931
|
+
large: {
|
|
932
|
+
borderRadius: 30
|
|
957
933
|
}
|
|
958
934
|
};
|
|
959
935
|
|
|
@@ -977,56 +953,77 @@ var button = {
|
|
|
977
953
|
}
|
|
978
954
|
},
|
|
979
955
|
contentPadding: {
|
|
980
|
-
"default": '
|
|
981
|
-
large: '
|
|
982
|
-
disabled: '
|
|
956
|
+
"default": '7px 16px 7px',
|
|
957
|
+
large: '11px 24px 11px',
|
|
958
|
+
disabled: '5px 14px 5px'
|
|
983
959
|
},
|
|
984
960
|
transition: {
|
|
985
961
|
duration: '200ms',
|
|
986
962
|
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
987
963
|
},
|
|
988
964
|
"default": {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
965
|
+
"default": {
|
|
966
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
967
|
+
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
968
|
+
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
969
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
970
|
+
}
|
|
993
971
|
},
|
|
994
972
|
primary: {
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
973
|
+
"default": {
|
|
974
|
+
backgroundColor: colors.primary,
|
|
975
|
+
pressedBackgroundColor: colors.primaryLight,
|
|
976
|
+
hoverBackgroundColor: colors.primaryLight,
|
|
977
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)'
|
|
978
|
+
},
|
|
979
|
+
ghost: {
|
|
980
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
981
|
+
pressedBackgroundColor: colors.uiBackground,
|
|
982
|
+
hoverBackgroundColor: colors.hover,
|
|
983
|
+
focusBorderColor: 'rgba(255,255,255, 0.4)',
|
|
984
|
+
color: colors.primary,
|
|
985
|
+
hoverColor: colors.hover,
|
|
986
|
+
activeColor: colors.hover
|
|
987
|
+
}
|
|
999
988
|
},
|
|
1000
989
|
white: {
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
990
|
+
"default": {
|
|
991
|
+
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
992
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
993
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
994
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.1)'
|
|
995
|
+
}
|
|
1005
996
|
},
|
|
1006
997
|
subtle: {
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
998
|
+
"default": {
|
|
999
|
+
backgroundColor: colors.transparent,
|
|
1000
|
+
pressedBackgroundColor: colors.transparent,
|
|
1001
|
+
hoverBackgroundColor: colors.transparent,
|
|
1002
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)',
|
|
1003
|
+
color: colors.primary,
|
|
1004
|
+
hoverColor: 'rgba(76, 52, 224, 0.8)',
|
|
1005
|
+
activeColor: 'rgba(76, 52, 224, 0.8)'
|
|
1006
|
+
}
|
|
1014
1007
|
},
|
|
1015
1008
|
'subtle-dark': {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1009
|
+
"default": {
|
|
1010
|
+
backgroundColor: colors.transparent,
|
|
1011
|
+
pressedBackgroundColor: colors.transparent,
|
|
1012
|
+
hoverBackgroundColor: colors.transparent,
|
|
1013
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)',
|
|
1014
|
+
color: colors.black,
|
|
1015
|
+
hoverColor: 'rgba(0, 0, 0, 0.8)',
|
|
1016
|
+
activeColor: 'rgba(0, 0, 0, 0.8)'
|
|
1017
|
+
}
|
|
1023
1018
|
},
|
|
1024
1019
|
disabled: {
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1020
|
+
"default": {
|
|
1021
|
+
backgroundColor: colors.disabled,
|
|
1022
|
+
pressedBackgroundColor: colors.disabled,
|
|
1023
|
+
hoverBackgroundColor: colors.disabled,
|
|
1024
|
+
focusBorderColor: lateOceanColorPalette.black100,
|
|
1025
|
+
borderColor: lateOceanColorPalette.black100
|
|
1026
|
+
}
|
|
1030
1027
|
}
|
|
1031
1028
|
};
|
|
1032
1029
|
|
|
@@ -1306,14 +1303,14 @@ var iconButton = {
|
|
|
1306
1303
|
},
|
|
1307
1304
|
disabled: {
|
|
1308
1305
|
scale: 1,
|
|
1309
|
-
backgroundColor: button.disabled.backgroundColor,
|
|
1310
|
-
borderColor: button.disabled.borderColor
|
|
1306
|
+
backgroundColor: button.disabled["default"].backgroundColor,
|
|
1307
|
+
borderColor: button.disabled["default"].borderColor
|
|
1311
1308
|
},
|
|
1312
1309
|
"default": {
|
|
1313
|
-
pressedBackgroundColor: button["default"].pressedBackgroundColor
|
|
1310
|
+
pressedBackgroundColor: button["default"]["default"].pressedBackgroundColor
|
|
1314
1311
|
},
|
|
1315
1312
|
white: {
|
|
1316
|
-
pressedBackgroundColor: button.white.hoverBackgroundColor
|
|
1313
|
+
pressedBackgroundColor: button.white["default"].hoverBackgroundColor
|
|
1317
1314
|
}
|
|
1318
1315
|
};
|
|
1319
1316
|
|
|
@@ -1324,6 +1321,10 @@ var listItem = {
|
|
|
1324
1321
|
innerMargin: 8
|
|
1325
1322
|
};
|
|
1326
1323
|
|
|
1324
|
+
var pageLoader = {
|
|
1325
|
+
size: 60
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1327
1328
|
var shadows = {
|
|
1328
1329
|
medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
|
|
1329
1330
|
};
|
|
@@ -1414,19 +1415,20 @@ var theme = {
|
|
|
1414
1415
|
lateOcean: lateOceanColorPalette
|
|
1415
1416
|
},
|
|
1416
1417
|
avatar: avatar,
|
|
1418
|
+
breakpoints: breakpoints,
|
|
1417
1419
|
button: button,
|
|
1418
1420
|
card: card,
|
|
1419
1421
|
feedbackMessage: feedbackMessage,
|
|
1420
1422
|
forms: forms,
|
|
1421
|
-
typography: typography,
|
|
1422
|
-
tag: tag,
|
|
1423
|
-
shadows: shadows,
|
|
1424
1423
|
fullScreenModal: fullScreenModal,
|
|
1425
1424
|
iconButton: iconButton,
|
|
1426
1425
|
listItem: listItem,
|
|
1427
|
-
|
|
1426
|
+
pageLoader: pageLoader,
|
|
1427
|
+
shadows: shadows,
|
|
1428
1428
|
skeleton: skeleton,
|
|
1429
|
-
|
|
1429
|
+
tag: tag,
|
|
1430
|
+
tooltip: tooltip,
|
|
1431
|
+
typography: typography
|
|
1430
1432
|
};
|
|
1431
1433
|
|
|
1432
1434
|
function matchWindowSize(_ref, _ref2) {
|
|
@@ -1646,10 +1648,6 @@ function DatePickerInputPart(_ref4) {
|
|
|
1646
1648
|
});
|
|
1647
1649
|
}
|
|
1648
1650
|
|
|
1649
|
-
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; }
|
|
1650
|
-
|
|
1651
|
-
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; }
|
|
1652
|
-
|
|
1653
1651
|
function prefixWithZero(value) {
|
|
1654
1652
|
return "".concat(value).padStart(2, '0');
|
|
1655
1653
|
}
|
|
@@ -1703,14 +1701,14 @@ function DatePickerInputs(_ref4) {
|
|
|
1703
1701
|
onPress: handleModalOpen,
|
|
1704
1702
|
children: [/*#__PURE__*/jsx(PartContainer, {
|
|
1705
1703
|
$isStretch: stretch,
|
|
1706
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread
|
|
1704
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
|
|
1707
1705
|
partName: "day",
|
|
1708
1706
|
value: currentValue ? prefixWithZero(currentValue.getDate()) : undefined,
|
|
1709
1707
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day
|
|
1710
1708
|
}))
|
|
1711
1709
|
}), /*#__PURE__*/jsx(PartContainer, {
|
|
1712
1710
|
$isStretch: stretch,
|
|
1713
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread
|
|
1711
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
|
|
1714
1712
|
partName: "month",
|
|
1715
1713
|
value: currentValue ? prefixWithZero(currentValue.getMonth() + 1) : undefined,
|
|
1716
1714
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month
|
|
@@ -1718,7 +1716,7 @@ function DatePickerInputs(_ref4) {
|
|
|
1718
1716
|
}), /*#__PURE__*/jsx(PartContainer, {
|
|
1719
1717
|
$isLast: true,
|
|
1720
1718
|
$isStretch: stretch,
|
|
1721
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread
|
|
1719
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
|
|
1722
1720
|
partName: "year",
|
|
1723
1721
|
value: currentValue ? currentValue.getFullYear() : undefined,
|
|
1724
1722
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year
|
|
@@ -1728,10 +1726,6 @@ function DatePickerInputs(_ref4) {
|
|
|
1728
1726
|
}
|
|
1729
1727
|
|
|
1730
1728
|
var _excluded$c = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "setIsFocused", "currentValue", "setCurrentValue", "onChange", "isFocused"];
|
|
1731
|
-
|
|
1732
|
-
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; }
|
|
1733
|
-
|
|
1734
|
-
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; }
|
|
1735
1729
|
function DatePickerAndroid(_ref) {
|
|
1736
1730
|
var onBlur = _ref.onBlur,
|
|
1737
1731
|
onFocus = _ref.onFocus,
|
|
@@ -1748,7 +1742,7 @@ function DatePickerAndroid(_ref) {
|
|
|
1748
1742
|
if (onBlur) onBlur();
|
|
1749
1743
|
};
|
|
1750
1744
|
|
|
1751
|
-
return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread
|
|
1745
|
+
return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
|
|
1752
1746
|
handleModalOpen: function handleModalOpen() {
|
|
1753
1747
|
setIsFocused(true);
|
|
1754
1748
|
if (onFocus) onFocus();
|
|
@@ -1776,24 +1770,22 @@ function DatePickerAndroid(_ref) {
|
|
|
1776
1770
|
}, props));
|
|
1777
1771
|
}
|
|
1778
1772
|
|
|
1779
|
-
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; }
|
|
1780
|
-
|
|
1781
|
-
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; }
|
|
1782
1773
|
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
1783
1774
|
var OverlayPressable = /*#__PURE__*/styled(Pressable).withConfig({
|
|
1784
1775
|
displayName: "Overlay__OverlayPressable"
|
|
1785
1776
|
})(function (_ref) {
|
|
1786
1777
|
var theme = _ref.theme;
|
|
1787
|
-
return _objectSpread
|
|
1778
|
+
return _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
1788
1779
|
backgroundColor: theme.kitt.colors.overlay.dark
|
|
1789
1780
|
});
|
|
1790
1781
|
});
|
|
1791
1782
|
function Overlay(_ref2) {
|
|
1792
|
-
var onPress = _ref2.onPress
|
|
1783
|
+
var onPress = _ref2.onPress,
|
|
1784
|
+
children = _ref2.children;
|
|
1793
1785
|
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
1794
1786
|
accessibilityRole: "none",
|
|
1795
1787
|
onPress: onPress,
|
|
1796
|
-
children:
|
|
1788
|
+
children: children
|
|
1797
1789
|
});
|
|
1798
1790
|
}
|
|
1799
1791
|
|
|
@@ -1832,10 +1824,6 @@ function ModalFooter(_ref3) {
|
|
|
1832
1824
|
}
|
|
1833
1825
|
|
|
1834
1826
|
var _excluded$b = ["as", "children"];
|
|
1835
|
-
|
|
1836
|
-
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; }
|
|
1837
|
-
|
|
1838
|
-
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; }
|
|
1839
1827
|
function StyleWebWrapper(_ref) {
|
|
1840
1828
|
var as = _ref.as,
|
|
1841
1829
|
children = _ref.children,
|
|
@@ -1843,16 +1831,12 @@ function StyleWebWrapper(_ref) {
|
|
|
1843
1831
|
|
|
1844
1832
|
if (Platform.OS !== 'web') return children;
|
|
1845
1833
|
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
1846
|
-
return /*#__PURE__*/jsx(as || 'div', _objectSpread
|
|
1834
|
+
return /*#__PURE__*/jsx(as || 'div', _objectSpread(_objectSpread({}, props), {}, {
|
|
1847
1835
|
children: children
|
|
1848
1836
|
}));
|
|
1849
1837
|
}
|
|
1850
1838
|
|
|
1851
1839
|
var _excluded$a = ["color", "disabled"];
|
|
1852
|
-
|
|
1853
|
-
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; }
|
|
1854
|
-
|
|
1855
|
-
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; }
|
|
1856
1840
|
var PressableIconButtonWebWrapper = undefined;
|
|
1857
1841
|
var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1858
1842
|
displayName: "PressableIconButton__StyledPressableIconButton"
|
|
@@ -1891,13 +1875,13 @@ function PressableIconButton(_ref5) {
|
|
|
1891
1875
|
as: PressableIconButtonWebWrapper,
|
|
1892
1876
|
$isWhite: color === 'white',
|
|
1893
1877
|
$isDisabled: Boolean(disabled),
|
|
1894
|
-
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread
|
|
1878
|
+
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread(_objectSpread({}, props), {}, {
|
|
1895
1879
|
disabled: disabled
|
|
1896
1880
|
}))
|
|
1897
1881
|
});
|
|
1898
1882
|
}
|
|
1899
1883
|
|
|
1900
|
-
var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated
|
|
1884
|
+
var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
1901
1885
|
displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground"
|
|
1902
1886
|
})(["background-color:", ";border-radius:", "px;width:", "px;height:", "px;position:absolute;bottom:0;left:0;"], function (_ref) {
|
|
1903
1887
|
var theme = _ref.theme,
|
|
@@ -1917,7 +1901,7 @@ var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated$1.View).withConf
|
|
|
1917
1901
|
var theme = _ref4.theme;
|
|
1918
1902
|
return theme.kitt.iconButton.height;
|
|
1919
1903
|
});
|
|
1920
|
-
var AnimatedViewContainer = /*#__PURE__*/styled(Animated
|
|
1904
|
+
var AnimatedViewContainer = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
1921
1905
|
displayName: "PressableAnimatedContainer__AnimatedViewContainer"
|
|
1922
1906
|
})(["position:relative;align-items:center;justify-content:center;width:100%;height:100%;"]);
|
|
1923
1907
|
function PressableAnimatedContainer(_ref5) {
|
|
@@ -2170,10 +2154,6 @@ Modal.Header = ModalHeader;
|
|
|
2170
2154
|
Modal.Body = ModalBody;
|
|
2171
2155
|
Modal.Footer = ModalFooter;
|
|
2172
2156
|
|
|
2173
|
-
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; }
|
|
2174
|
-
|
|
2175
|
-
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; }
|
|
2176
|
-
|
|
2177
2157
|
function getDatePickerDisplayMode() {
|
|
2178
2158
|
if (Platform.OS === 'android') return 'calendar';
|
|
2179
2159
|
if (Platform.OS === 'ios') return 'spinner';
|
|
@@ -2193,7 +2173,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
2193
2173
|
var iosProps = Platform.OS === 'ios' ? {
|
|
2194
2174
|
textColor: theme.kitt.colors.primary
|
|
2195
2175
|
} : {};
|
|
2196
|
-
return /*#__PURE__*/jsx(DateTimePicker, _objectSpread
|
|
2176
|
+
return /*#__PURE__*/jsx(DateTimePicker, _objectSpread(_objectSpread({
|
|
2197
2177
|
is24Hour: true,
|
|
2198
2178
|
testID: testID,
|
|
2199
2179
|
value: value || defaultDate,
|
|
@@ -2210,10 +2190,6 @@ function PlatformDateTimePicker(_ref) {
|
|
|
2210
2190
|
|
|
2211
2191
|
var _excluded$9 = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
2212
2192
|
|
|
2213
|
-
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; }
|
|
2214
|
-
|
|
2215
|
-
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; }
|
|
2216
|
-
|
|
2217
2193
|
function ModalTitle(_ref) {
|
|
2218
2194
|
var children = _ref.children;
|
|
2219
2195
|
return /*#__PURE__*/jsx(Modal.Header, {
|
|
@@ -2250,7 +2226,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2250
2226
|
children: [title ? /*#__PURE__*/jsx(ModalTitle, {
|
|
2251
2227
|
children: title
|
|
2252
2228
|
}) : null, /*#__PURE__*/jsx(Modal.Body, {
|
|
2253
|
-
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread
|
|
2229
|
+
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread(_objectSpread({}, props), {}, {
|
|
2254
2230
|
value: currentValue,
|
|
2255
2231
|
onChange: function handleChange(newDate) {
|
|
2256
2232
|
setCurrentValue(function (prev) {
|
|
@@ -2277,10 +2253,6 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2277
2253
|
}
|
|
2278
2254
|
|
|
2279
2255
|
var _excluded$8 = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "onChange", "onFocus", "onBlur", "pickerDefaultDate"];
|
|
2280
|
-
|
|
2281
|
-
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; }
|
|
2282
|
-
|
|
2283
|
-
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; }
|
|
2284
2256
|
function DatePicker(_ref) {
|
|
2285
2257
|
var value = _ref.value,
|
|
2286
2258
|
pickerUITestID = _ref.pickerUITestID,
|
|
@@ -2308,7 +2280,7 @@ function DatePicker(_ref) {
|
|
|
2308
2280
|
setCurrentValue = _useState6[1];
|
|
2309
2281
|
|
|
2310
2282
|
if (Platform.OS === 'android') {
|
|
2311
|
-
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread
|
|
2283
|
+
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
|
|
2312
2284
|
pickerDefaultDate: pickerDefaultDate,
|
|
2313
2285
|
pickerUITestID: pickerUITestID,
|
|
2314
2286
|
currentValue: currentValue,
|
|
@@ -2327,7 +2299,7 @@ function DatePicker(_ref) {
|
|
|
2327
2299
|
};
|
|
2328
2300
|
|
|
2329
2301
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
2330
|
-
children: [/*#__PURE__*/jsx(DatePickerInputs, _objectSpread
|
|
2302
|
+
children: [/*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
|
|
2331
2303
|
handleModalOpen: function handleModalOpen() {
|
|
2332
2304
|
if (onFocus) onFocus();
|
|
2333
2305
|
setIsPickerUIVisible(true);
|
|
@@ -2357,10 +2329,6 @@ var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
2357
2329
|
})(["position:relative;"]);
|
|
2358
2330
|
|
|
2359
2331
|
var _excluded$7 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
2360
|
-
|
|
2361
|
-
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; }
|
|
2362
|
-
|
|
2363
|
-
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; }
|
|
2364
2332
|
var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
2365
2333
|
displayName: "InputText__StyledTextInput"
|
|
2366
2334
|
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
@@ -2420,7 +2388,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2420
2388
|
});
|
|
2421
2389
|
return /*#__PURE__*/jsxs(InputTextContainer, {
|
|
2422
2390
|
$isDisabled: disabled,
|
|
2423
|
-
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread
|
|
2391
|
+
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread(_objectSpread({
|
|
2424
2392
|
ref: ref,
|
|
2425
2393
|
nativeID: id,
|
|
2426
2394
|
editable: !disabled,
|
|
@@ -2447,11 +2415,8 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2447
2415
|
});
|
|
2448
2416
|
});
|
|
2449
2417
|
|
|
2450
|
-
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; }
|
|
2451
|
-
|
|
2452
|
-
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; }
|
|
2453
2418
|
function InputEmail(props) {
|
|
2454
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2419
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread({
|
|
2455
2420
|
autoCompleteType: "email",
|
|
2456
2421
|
keyboardType: "email-address",
|
|
2457
2422
|
textContentType: "emailAddress",
|
|
@@ -2549,20 +2514,13 @@ function InputIcon(_ref) {
|
|
|
2549
2514
|
});
|
|
2550
2515
|
}
|
|
2551
2516
|
|
|
2552
|
-
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; }
|
|
2553
|
-
|
|
2554
|
-
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; }
|
|
2555
2517
|
function InputPressable(_ref) {
|
|
2556
2518
|
var props = _extends({}, _ref);
|
|
2557
2519
|
|
|
2558
|
-
return /*#__PURE__*/jsx(Pressable, _objectSpread
|
|
2520
|
+
return /*#__PURE__*/jsx(Pressable, _objectSpread({}, props));
|
|
2559
2521
|
}
|
|
2560
2522
|
|
|
2561
2523
|
var _excluded$6 = ["isPasswordDefaultVisible", "right"];
|
|
2562
|
-
|
|
2563
|
-
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; }
|
|
2564
|
-
|
|
2565
|
-
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; }
|
|
2566
2524
|
function InputPassword(_ref) {
|
|
2567
2525
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
2568
2526
|
right = _ref.right,
|
|
@@ -2573,7 +2531,7 @@ function InputPassword(_ref) {
|
|
|
2573
2531
|
isVisible = _useState2[0],
|
|
2574
2532
|
setIsVisible = _useState2[1];
|
|
2575
2533
|
|
|
2576
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2534
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({}, props), {}, {
|
|
2577
2535
|
textContentType: "password",
|
|
2578
2536
|
autoCompleteType: "password",
|
|
2579
2537
|
autoCorrect: false,
|
|
@@ -2592,11 +2550,8 @@ function InputPassword(_ref) {
|
|
|
2592
2550
|
}));
|
|
2593
2551
|
}
|
|
2594
2552
|
|
|
2595
|
-
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; }
|
|
2596
|
-
|
|
2597
|
-
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; }
|
|
2598
2553
|
function InputPhone(props) {
|
|
2599
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2554
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({}, props), {}, {
|
|
2600
2555
|
autoCompleteType: "tel",
|
|
2601
2556
|
keyboardType: "number-pad",
|
|
2602
2557
|
textContentType: "telephoneNumber"
|
|
@@ -2760,14 +2715,11 @@ function Radio(_ref16) {
|
|
|
2760
2715
|
});
|
|
2761
2716
|
}
|
|
2762
2717
|
|
|
2763
|
-
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; }
|
|
2764
|
-
|
|
2765
|
-
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; }
|
|
2766
2718
|
function TextArea(_ref) {
|
|
2767
2719
|
var props = _extends({}, _ref);
|
|
2768
2720
|
|
|
2769
2721
|
var theme = /*#__PURE__*/useTheme();
|
|
2770
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2722
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread({
|
|
2771
2723
|
multiline: true,
|
|
2772
2724
|
textAlignVertical: "top",
|
|
2773
2725
|
minHeight: theme.kitt.forms.textArea.minHeight
|
|
@@ -2932,11 +2884,48 @@ function FullScreenModal(_ref2) {
|
|
|
2932
2884
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
2933
2885
|
FullScreenModal.Body = FullScreenModalBody;
|
|
2934
2886
|
|
|
2935
|
-
|
|
2887
|
+
function SpinningIcon(_ref) {
|
|
2888
|
+
var icon = _ref.icon,
|
|
2889
|
+
color = _ref.color;
|
|
2936
2890
|
|
|
2937
|
-
|
|
2891
|
+
if (process.env.NODE_ENV !== 'production' && !color) {
|
|
2892
|
+
throw new Error("Invalid color passed to SpinningIcon: ".concat(String(color)));
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
2896
|
+
color: color
|
|
2897
|
+
});
|
|
2898
|
+
var animationRef = useRef(new Animated$1.Value(0));
|
|
2899
|
+
var rotation = animationRef.current.interpolate({
|
|
2900
|
+
inputRange: [0, 1],
|
|
2901
|
+
outputRange: ['0deg', '360deg']
|
|
2902
|
+
});
|
|
2903
|
+
useEffect(function () {
|
|
2904
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
2905
|
+
var animation = Animated$1.loop(Animated$1.timing(animationRef.current, {
|
|
2906
|
+
toValue: 1,
|
|
2907
|
+
duration: 1100,
|
|
2908
|
+
easing: Easing.linear,
|
|
2909
|
+
useNativeDriver: true
|
|
2910
|
+
}));
|
|
2911
|
+
animation.start();
|
|
2912
|
+
return function () {
|
|
2913
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
2914
|
+
animation.stop();
|
|
2915
|
+
return undefined;
|
|
2916
|
+
};
|
|
2917
|
+
}, []);
|
|
2918
|
+
return /*#__PURE__*/jsx(Animated$1.View, {
|
|
2919
|
+
style: {
|
|
2920
|
+
transform: [{
|
|
2921
|
+
rotate: rotation
|
|
2922
|
+
}]
|
|
2923
|
+
},
|
|
2924
|
+
children: clonedIcon
|
|
2925
|
+
});
|
|
2926
|
+
}
|
|
2938
2927
|
|
|
2939
|
-
|
|
2928
|
+
var _excluded$5 = ["children"];
|
|
2940
2929
|
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
2941
2930
|
displayName: "ListItemContent__ContentView"
|
|
2942
2931
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
@@ -2944,17 +2933,13 @@ function ListItemContent(_ref) {
|
|
|
2944
2933
|
var children = _ref.children,
|
|
2945
2934
|
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
2946
2935
|
|
|
2947
|
-
return /*#__PURE__*/jsx(ContentView, _objectSpread
|
|
2936
|
+
return /*#__PURE__*/jsx(ContentView, _objectSpread(_objectSpread({}, rest), {}, {
|
|
2948
2937
|
children: children
|
|
2949
2938
|
}));
|
|
2950
2939
|
}
|
|
2951
2940
|
|
|
2952
2941
|
var _excluded$4 = ["children", "side"],
|
|
2953
2942
|
_excluded2$1 = ["children", "align"];
|
|
2954
|
-
|
|
2955
|
-
function ownKeys$6(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; }
|
|
2956
|
-
|
|
2957
|
-
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2958
2943
|
var SideContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
2959
2944
|
displayName: "ListItemSideContent__SideContainerView"
|
|
2960
2945
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
@@ -2973,7 +2958,7 @@ function ListItemSideContainer(_ref3) {
|
|
|
2973
2958
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
2974
2959
|
rest = _objectWithoutProperties(_ref3, _excluded$4);
|
|
2975
2960
|
|
|
2976
|
-
return /*#__PURE__*/jsx(SideContainerView, _objectSpread
|
|
2961
|
+
return /*#__PURE__*/jsx(SideContainerView, _objectSpread(_objectSpread({
|
|
2977
2962
|
side: side
|
|
2978
2963
|
}, rest), {}, {
|
|
2979
2964
|
children: children
|
|
@@ -2991,7 +2976,7 @@ function ListItemSideContent(_ref5) {
|
|
|
2991
2976
|
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
2992
2977
|
rest = _objectWithoutProperties(_ref5, _excluded2$1);
|
|
2993
2978
|
|
|
2994
|
-
return /*#__PURE__*/jsx(SideContentView, _objectSpread
|
|
2979
|
+
return /*#__PURE__*/jsx(SideContentView, _objectSpread(_objectSpread({
|
|
2995
2980
|
align: align
|
|
2996
2981
|
}, rest), {}, {
|
|
2997
2982
|
children: children
|
|
@@ -2999,10 +2984,6 @@ function ListItemSideContent(_ref5) {
|
|
|
2999
2984
|
}
|
|
3000
2985
|
|
|
3001
2986
|
var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
3002
|
-
|
|
3003
|
-
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; }
|
|
3004
|
-
|
|
3005
|
-
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; }
|
|
3006
2987
|
var ContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
3007
2988
|
displayName: "ListItem__ContainerView"
|
|
3008
2989
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -3044,13 +3025,13 @@ function ListItem(_ref5) {
|
|
|
3044
3025
|
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
3045
3026
|
|
|
3046
3027
|
var Wrapper = onPress ? Pressable : Fragment$1;
|
|
3047
|
-
var wrapperProps = onPress ? _objectSpread
|
|
3028
|
+
var wrapperProps = onPress ? _objectSpread({
|
|
3048
3029
|
accessibilityRole: 'button',
|
|
3049
3030
|
onPress: onPress
|
|
3050
3031
|
}, rest) : undefined;
|
|
3051
3032
|
var containerProps = onPress ? undefined : rest;
|
|
3052
|
-
return /*#__PURE__*/jsx(Wrapper, _objectSpread
|
|
3053
|
-
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread
|
|
3033
|
+
return /*#__PURE__*/jsx(Wrapper, _objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
3034
|
+
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread(_objectSpread({
|
|
3054
3035
|
withPadding: withPadding,
|
|
3055
3036
|
borders: borders
|
|
3056
3037
|
}, containerProps), {}, {
|
|
@@ -3070,31 +3051,11 @@ ListItem.Content = ListItemContent;
|
|
|
3070
3051
|
ListItem.SideContent = ListItemSideContent;
|
|
3071
3052
|
ListItem.SideContainer = ListItemSideContainer;
|
|
3072
3053
|
|
|
3073
|
-
function
|
|
3074
|
-
|
|
3075
|
-
return
|
|
3076
|
-
}
|
|
3077
|
-
|
|
3078
|
-
function Loader(_ref) {
|
|
3079
|
-
var _ref$color = _ref.color,
|
|
3080
|
-
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
3081
|
-
_ref$size = _ref.size,
|
|
3082
|
-
size = _ref$size === void 0 ? 20 : _ref$size;
|
|
3083
|
-
var theme = /*#__PURE__*/useTheme();
|
|
3084
|
-
var colorHex = theme.kitt.typography.colors[color];
|
|
3085
|
-
return /*#__PURE__*/jsx(ActivityIndicator, {
|
|
3086
|
-
testID: "ActivityIndicator",
|
|
3087
|
-
color: colorHex,
|
|
3088
|
-
size: getActivityIndicatorSize(size)
|
|
3089
|
-
});
|
|
3090
|
-
}
|
|
3091
|
-
|
|
3092
|
-
function LargeLoader(_ref) {
|
|
3093
|
-
var _ref$color = _ref.color,
|
|
3094
|
-
color = _ref$color === void 0 ? 'primary' : _ref$color;
|
|
3095
|
-
return /*#__PURE__*/jsx(Loader, {
|
|
3054
|
+
function LoaderIcon(_ref) {
|
|
3055
|
+
var color = _ref.color;
|
|
3056
|
+
return /*#__PURE__*/jsx(SpinningIcon, {
|
|
3096
3057
|
color: color,
|
|
3097
|
-
|
|
3058
|
+
icon: /*#__PURE__*/jsx(ArcIcon, {})
|
|
3098
3059
|
});
|
|
3099
3060
|
}
|
|
3100
3061
|
|
|
@@ -3273,6 +3234,22 @@ function Notification(_ref) {
|
|
|
3273
3234
|
});
|
|
3274
3235
|
}
|
|
3275
3236
|
|
|
3237
|
+
function getActivityIndicatorSize(size) {
|
|
3238
|
+
if (Platform.OS === 'android') return size;
|
|
3239
|
+
return size < 36 ? 'small' : 'large';
|
|
3240
|
+
}
|
|
3241
|
+
|
|
3242
|
+
function PageLoader() {
|
|
3243
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3244
|
+
var size = theme.kitt.pageLoader.size;
|
|
3245
|
+
var colorHex = theme.kitt.typography.colors.primary;
|
|
3246
|
+
return /*#__PURE__*/jsx(ActivityIndicator, {
|
|
3247
|
+
testID: "ActivityIndicator",
|
|
3248
|
+
color: colorHex,
|
|
3249
|
+
size: getActivityIndicatorSize(size)
|
|
3250
|
+
});
|
|
3251
|
+
}
|
|
3252
|
+
|
|
3276
3253
|
var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
3277
3254
|
displayName: "SkeletonContent__Container"
|
|
3278
3255
|
})(["background-color:", ";border-color:", ";height:100%;width:100%;"], function (_ref) {
|
|
@@ -3282,7 +3259,7 @@ var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
|
3282
3259
|
var theme = _ref2.theme;
|
|
3283
3260
|
return theme.kitt.skeleton.flareColor;
|
|
3284
3261
|
});
|
|
3285
|
-
var AnimatedLinearGradient = Animated
|
|
3262
|
+
var AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);
|
|
3286
3263
|
function SkeletonContent(_ref3) {
|
|
3287
3264
|
var isLoading = _ref3.isLoading,
|
|
3288
3265
|
width = _ref3.width;
|
|
@@ -3570,10 +3547,6 @@ function Story(_ref) {
|
|
|
3570
3547
|
var _excluded$2 = ["title", "children", "internalIsDemoSection"],
|
|
3571
3548
|
_excluded2 = ["title", "children"],
|
|
3572
3549
|
_excluded3 = ["title", "children"];
|
|
3573
|
-
|
|
3574
|
-
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; }
|
|
3575
|
-
|
|
3576
|
-
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; }
|
|
3577
3550
|
var StyledSection = /*#__PURE__*/styled.View.withConfig({
|
|
3578
3551
|
displayName: "StorySection__StyledSection"
|
|
3579
3552
|
})(["margin-bottom:32px;"]);
|
|
@@ -3584,7 +3557,7 @@ function StorySection(_ref) {
|
|
|
3584
3557
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
3585
3558
|
|
|
3586
3559
|
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
3587
|
-
return /*#__PURE__*/jsxs(StyledSection, _objectSpread
|
|
3560
|
+
return /*#__PURE__*/jsxs(StyledSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3588
3561
|
children: [/*#__PURE__*/jsx(StoryTitle.Level2, {
|
|
3589
3562
|
children: title
|
|
3590
3563
|
}), children]
|
|
@@ -3599,7 +3572,7 @@ function SubSection(_ref2) {
|
|
|
3599
3572
|
children = _ref2.children,
|
|
3600
3573
|
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
3601
3574
|
|
|
3602
|
-
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread
|
|
3575
|
+
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3603
3576
|
children: [/*#__PURE__*/jsx(StoryTitle.Level3, {
|
|
3604
3577
|
children: title
|
|
3605
3578
|
}), children]
|
|
@@ -3615,7 +3588,7 @@ function BlockSection(_ref3) {
|
|
|
3615
3588
|
children = _ref3.children,
|
|
3616
3589
|
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
3617
3590
|
|
|
3618
|
-
return /*#__PURE__*/jsxs(StyledBlockSection, _objectSpread
|
|
3591
|
+
return /*#__PURE__*/jsxs(StyledBlockSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3619
3592
|
children: [/*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
3620
3593
|
children: title
|
|
3621
3594
|
}), children]
|
|
@@ -3965,9 +3938,6 @@ function TimePicker(_ref) {
|
|
|
3965
3938
|
});
|
|
3966
3939
|
}
|
|
3967
3940
|
|
|
3968
|
-
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; }
|
|
3969
|
-
|
|
3970
|
-
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; }
|
|
3971
3941
|
var StyledTooltipView = /*#__PURE__*/styled.View.withConfig({
|
|
3972
3942
|
displayName: "TooltipView__StyledTooltipView"
|
|
3973
3943
|
})(["align-items:center;"]);
|
|
@@ -3989,7 +3959,7 @@ var StyledTooltipContent = /*#__PURE__*/styled.View.withConfig({
|
|
|
3989
3959
|
|
|
3990
3960
|
function ArrowView(props) {
|
|
3991
3961
|
var theme = /*#__PURE__*/useTheme();
|
|
3992
|
-
return /*#__PURE__*/jsx(View, _objectSpread
|
|
3962
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
3993
3963
|
children: /*#__PURE__*/jsx(TooltipArrowIcon, {
|
|
3994
3964
|
color: theme.kitt.tooltip.backgroundColor
|
|
3995
3965
|
})
|
|
@@ -4025,9 +3995,6 @@ function TooltipView(_ref7) {
|
|
|
4025
3995
|
|
|
4026
3996
|
var tooltipDefaultPosition = 'top';
|
|
4027
3997
|
|
|
4028
|
-
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; }
|
|
4029
|
-
|
|
4030
|
-
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; }
|
|
4031
3998
|
// Since the tooltip use absolute positionning, we need a parent to provide the relative root
|
|
4032
3999
|
var TooltipContainer = /*#__PURE__*/styled.View.withConfig({
|
|
4033
4000
|
displayName: "Tooltip__TooltipContainer"
|
|
@@ -4114,12 +4081,12 @@ function Tooltip(_ref) {
|
|
|
4114
4081
|
ref: floating,
|
|
4115
4082
|
accessibilityElementsHidden: !pressed.value,
|
|
4116
4083
|
importantForAccessibility: pressed.value === true ? 'auto' : 'no-hide-descendants',
|
|
4117
|
-
style: _objectSpread
|
|
4084
|
+
style: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
4118
4085
|
top: y && position === 'bottom' ? y : undefined,
|
|
4119
4086
|
bottom: y && position === 'top' ? y : undefined,
|
|
4120
4087
|
left: x !== null && x !== void 0 ? x : 0
|
|
4121
4088
|
}),
|
|
4122
|
-
children: /*#__PURE__*/jsx(Animated
|
|
4089
|
+
children: /*#__PURE__*/jsx(Animated.View, {
|
|
4123
4090
|
style: [opacityStyles],
|
|
4124
4091
|
children: /*#__PURE__*/jsx(TooltipView, {
|
|
4125
4092
|
position: position,
|
|
@@ -4158,10 +4125,6 @@ function TypographyEmoji(_ref2) {
|
|
|
4158
4125
|
}
|
|
4159
4126
|
|
|
4160
4127
|
var _excluded$1 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
|
|
4161
|
-
|
|
4162
|
-
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; }
|
|
4163
|
-
|
|
4164
|
-
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; }
|
|
4165
4128
|
var TypographyLinkWebWrapper = undefined;
|
|
4166
4129
|
var StyledLink = /*#__PURE__*/styled.Text.withConfig({
|
|
4167
4130
|
displayName: "TypographyLink__StyledLink"
|
|
@@ -4187,7 +4150,7 @@ function TypographyLink(_ref4) {
|
|
|
4187
4150
|
onPress = _ref4.onPress,
|
|
4188
4151
|
otherProps = _objectWithoutProperties(_ref4, _excluded$1);
|
|
4189
4152
|
|
|
4190
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread
|
|
4153
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
4191
4154
|
accessibilityRole: "none",
|
|
4192
4155
|
children: /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
4193
4156
|
as: TypographyLinkWebWrapper,
|
|
@@ -4247,9 +4210,6 @@ function MatchWindowSize(_ref) {
|
|
|
4247
4210
|
return children;
|
|
4248
4211
|
}
|
|
4249
4212
|
|
|
4250
|
-
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; }
|
|
4251
|
-
|
|
4252
|
-
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; }
|
|
4253
4213
|
// type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
|
|
4254
4214
|
// type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
|
|
4255
4215
|
// export function withTheme<Props extends { theme: DefaultTheme }, C>(
|
|
@@ -4271,5 +4231,5 @@ function withTheme(WrappedComponent) {
|
|
|
4271
4231
|
});
|
|
4272
4232
|
}
|
|
4273
4233
|
|
|
4274
|
-
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,
|
|
4234
|
+
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 };
|
|
4275
4235
|
//# sourceMappingURL=index-browser-all.es.ios.js.map
|