@ornikar/kitt-universal 5.0.1 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definitions/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 -4
- 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/Loader/Loader.d.ts.map +1 -1
- package/dist/definitions/Loader/Loader.web.d.ts +3 -3
- package/dist/definitions/Loader/Loader.web.d.ts.map +1 -1
- package/dist/definitions/forms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +1 -1
- package/dist/definitions/index.d.ts +4 -0
- package/dist/definitions/index.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/typography/TypographySpinningIcon.d.ts +9 -0
- package/dist/definitions/typography/TypographySpinningIcon.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 +294 -303
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +294 -303
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +294 -303
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +373 -364
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +197 -109
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.css +1 -1
- package/dist/index-node-14.17.cjs.web.js +215 -118
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +59 -38
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +59 -38
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +59 -38
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +59 -38
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +59 -38
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +59 -38
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +8 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import { UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
4
4
|
export * from '@ornikar/kitt-icons';
|
|
5
|
-
import {
|
|
5
|
+
import { useWindowDimensions, Image, Platform, Linking, View, Pressable, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1, TextInput, 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
|
|
|
@@ -136,11 +102,7 @@ var KittBreakpointsMax = {
|
|
|
136
102
|
LARGE: KittBreakpoints.WIDE - 1
|
|
137
103
|
};
|
|
138
104
|
|
|
139
|
-
var _excluded$
|
|
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; }
|
|
105
|
+
var _excluded$i = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
144
106
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
145
107
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
146
108
|
function useTypographyColor() {
|
|
@@ -216,7 +178,7 @@ function Typography(_ref4) {
|
|
|
216
178
|
large = _ref4.large,
|
|
217
179
|
variant = _ref4.variant,
|
|
218
180
|
color = _ref4.color,
|
|
219
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded$
|
|
181
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded$i);
|
|
220
182
|
|
|
221
183
|
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
222
184
|
var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
|
|
@@ -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$
|
|
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$h = ["size", "base", "round", "light"];
|
|
311
269
|
|
|
312
270
|
var getInitials = function (firstname, lastname) {
|
|
313
271
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
@@ -378,13 +336,13 @@ function Avatar(_ref6) {
|
|
|
378
336
|
base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
|
|
379
337
|
round = _ref6.round,
|
|
380
338
|
light = _ref6.light,
|
|
381
|
-
props = _objectWithoutProperties(_ref6, _excluded$
|
|
339
|
+
props = _objectWithoutProperties(_ref6, _excluded$h);
|
|
382
340
|
|
|
383
341
|
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
384
342
|
$size: size,
|
|
385
343
|
$isRound: round,
|
|
386
344
|
$isLight: light,
|
|
387
|
-
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread
|
|
345
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread({
|
|
388
346
|
size: size,
|
|
389
347
|
base: base,
|
|
390
348
|
isLight: light
|
|
@@ -392,6 +350,20 @@ function Avatar(_ref6) {
|
|
|
392
350
|
});
|
|
393
351
|
}
|
|
394
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
|
+
|
|
395
367
|
var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
396
368
|
displayName: "AnimatedButtonPressable__StyledPressable"
|
|
397
369
|
})(["", ""], function (_ref) {
|
|
@@ -399,7 +371,7 @@ var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
|
399
371
|
if ($isStretch) return undefined;
|
|
400
372
|
return 'align-self: flex-start;';
|
|
401
373
|
});
|
|
402
|
-
var StyledAnimatedView = /*#__PURE__*/styled(Animated
|
|
374
|
+
var StyledAnimatedView = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
403
375
|
displayName: "AnimatedButtonPressable__StyledAnimatedView"
|
|
404
376
|
})(["border-radius:", "px;"], function (_ref2) {
|
|
405
377
|
var theme = _ref2.theme;
|
|
@@ -410,6 +382,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
410
382
|
disabled = _ref3.disabled,
|
|
411
383
|
accessibilityRole = _ref3.accessibilityRole,
|
|
412
384
|
$type = _ref3.$type,
|
|
385
|
+
$variant = _ref3.$variant,
|
|
413
386
|
$isStretch = _ref3.$isStretch,
|
|
414
387
|
href = _ref3.href,
|
|
415
388
|
hrefAttrs = _ref3.hrefAttrs,
|
|
@@ -418,9 +391,11 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
418
391
|
var theme = /*#__PURE__*/useTheme();
|
|
419
392
|
var pressed = useSharedValue(0);
|
|
420
393
|
var color = useSharedValue(0);
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
394
|
+
|
|
395
|
+
var _getVariantValuesIfEx = getVariantValuesIfExist(theme, $type, $variant),
|
|
396
|
+
backgroundColor = _getVariantValuesIfEx.backgroundColor,
|
|
397
|
+
pressedBackgroundColor = _getVariantValuesIfEx.pressedBackgroundColor;
|
|
398
|
+
|
|
424
399
|
var scale = theme.kitt.button.scale;
|
|
425
400
|
var scaleStyles = useAnimatedStyle(function () {
|
|
426
401
|
var _f = function () {
|
|
@@ -448,7 +423,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
448
423
|
};
|
|
449
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)}]};}}";
|
|
450
425
|
_f.__workletHash = 5368461229978;
|
|
451
|
-
_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)";
|
|
452
427
|
_f.__optimalization = 2;
|
|
453
428
|
|
|
454
429
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -509,10 +484,11 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
509
484
|
}, function (_ref6) {
|
|
510
485
|
var theme = _ref6.theme,
|
|
511
486
|
$isDisabled = _ref6.$isDisabled,
|
|
512
|
-
$type = _ref6.$type
|
|
513
|
-
|
|
487
|
+
$type = _ref6.$type,
|
|
488
|
+
$variant = _ref6.$variant;
|
|
489
|
+
if ($isDisabled) return theme.kitt.button.disabled["default"].backgroundColor;
|
|
514
490
|
if (Platform.OS !== 'web') return 'transparent';
|
|
515
|
-
return theme
|
|
491
|
+
return getVariantValuesIfExist(theme, $type, $variant).backgroundColor;
|
|
516
492
|
}, function (_ref7) {
|
|
517
493
|
var theme = _ref7.theme,
|
|
518
494
|
$isLarge = _ref7.$isLarge,
|
|
@@ -526,57 +502,49 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
526
502
|
return defaultPadding;
|
|
527
503
|
});
|
|
528
504
|
|
|
529
|
-
var _excluded$
|
|
530
|
-
_excluded2$
|
|
531
|
-
|
|
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; }
|
|
505
|
+
var _excluded$g = ["color"],
|
|
506
|
+
_excluded2$3 = ["color"];
|
|
535
507
|
|
|
536
508
|
function TypographyIconSpecifiedColor(_ref) {
|
|
537
509
|
var color = _ref.color,
|
|
538
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
510
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
539
511
|
|
|
540
512
|
var theme = /*#__PURE__*/useTheme();
|
|
541
|
-
return /*#__PURE__*/jsx(Icon, _objectSpread
|
|
513
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
|
|
542
514
|
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
543
515
|
}));
|
|
544
516
|
}
|
|
545
517
|
|
|
546
518
|
function TypographyIconInheritColor(props) {
|
|
547
519
|
var color = useTypographyColor();
|
|
548
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread
|
|
520
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread({
|
|
549
521
|
color: color
|
|
550
522
|
}, props));
|
|
551
523
|
}
|
|
552
524
|
|
|
553
525
|
function TypographyIcon(_ref2) {
|
|
554
526
|
var color = _ref2.color,
|
|
555
|
-
props = _objectWithoutProperties(_ref2, _excluded2$
|
|
527
|
+
props = _objectWithoutProperties(_ref2, _excluded2$3);
|
|
556
528
|
|
|
557
529
|
if (color) {
|
|
558
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread
|
|
530
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread({
|
|
559
531
|
color: color
|
|
560
532
|
}, props));
|
|
561
533
|
}
|
|
562
534
|
|
|
563
|
-
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread
|
|
535
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread({}, props));
|
|
564
536
|
}
|
|
565
537
|
|
|
566
538
|
function isSubtle(type) {
|
|
567
539
|
return type.startsWith('subtle');
|
|
568
540
|
}
|
|
569
541
|
|
|
570
|
-
var _excluded$
|
|
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; }
|
|
573
|
-
|
|
574
|
-
function _objectSpread$n(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$n(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$n(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
542
|
+
var _excluded$f = ["type", "variant", "isDisabled", "$isStretch", "icon", "children"];
|
|
575
543
|
|
|
576
|
-
var getTextColorByType = function (type) {
|
|
544
|
+
var getTextColorByType = function (type, variant) {
|
|
577
545
|
switch (type) {
|
|
578
546
|
case 'primary':
|
|
579
|
-
return 'white';
|
|
547
|
+
return variant === 'ghost' ? 'primary' : 'white';
|
|
580
548
|
|
|
581
549
|
case 'white':
|
|
582
550
|
return 'white';
|
|
@@ -627,14 +595,12 @@ var StyledIconContainer$1 = /*#__PURE__*/styled.View.withConfig({
|
|
|
627
595
|
function ButtonIcon(_ref3) {
|
|
628
596
|
var icon = _ref3.icon,
|
|
629
597
|
color = _ref3.color,
|
|
630
|
-
spin = _ref3.spin,
|
|
631
598
|
iconPosition = _ref3.iconPosition,
|
|
632
599
|
testID = _ref3.testID;
|
|
633
600
|
return /*#__PURE__*/jsx(StyledIconContainer$1, {
|
|
634
601
|
$iconPosition: iconPosition,
|
|
635
602
|
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
636
603
|
icon: icon,
|
|
637
|
-
spin: spin,
|
|
638
604
|
testID: testID,
|
|
639
605
|
color: color
|
|
640
606
|
})
|
|
@@ -648,7 +614,6 @@ function ButtonContentChildren(_ref4) {
|
|
|
648
614
|
var type = _ref4.type,
|
|
649
615
|
icon = _ref4.icon,
|
|
650
616
|
iconPosition = _ref4.iconPosition,
|
|
651
|
-
iconSpin = _ref4.iconSpin,
|
|
652
617
|
isDisabled = _ref4.isDisabled,
|
|
653
618
|
color = _ref4.color,
|
|
654
619
|
children = _ref4.children;
|
|
@@ -662,9 +627,8 @@ function ButtonContentChildren(_ref4) {
|
|
|
662
627
|
var isWebSubtle = isSubtle(type) && Platform.OS === 'web' && !isDisabled;
|
|
663
628
|
|
|
664
629
|
if (!children) {
|
|
665
|
-
return /*#__PURE__*/jsx(TypographyIcon
|
|
666
|
-
|
|
667
|
-
,
|
|
630
|
+
return /*#__PURE__*/jsx(TypographyIcon // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
631
|
+
, {
|
|
668
632
|
icon: icon,
|
|
669
633
|
color: isWebSubtle ? 'inherit' : color
|
|
670
634
|
});
|
|
@@ -672,12 +636,11 @@ function ButtonContentChildren(_ref4) {
|
|
|
672
636
|
|
|
673
637
|
var buttonIconSharedProps = {
|
|
674
638
|
type: type,
|
|
675
|
-
spin: iconSpin,
|
|
676
639
|
iconPosition: iconPosition,
|
|
677
640
|
color: isWebSubtle ? 'inherit' : color
|
|
678
641
|
};
|
|
679
642
|
return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
|
|
680
|
-
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread
|
|
643
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread(_objectSpread({}, buttonIconSharedProps), {}, {
|
|
681
644
|
testID: "button-left-icon",
|
|
682
645
|
icon: icon
|
|
683
646
|
})) : null, /*#__PURE__*/jsx(StyledButtonText, {
|
|
@@ -688,7 +651,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
688
651
|
,
|
|
689
652
|
color: isWebSubtle ? undefined : color,
|
|
690
653
|
children: children
|
|
691
|
-
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread
|
|
654
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread(_objectSpread({}, buttonIconSharedProps), {}, {
|
|
692
655
|
icon: icon
|
|
693
656
|
})) : null]
|
|
694
657
|
});
|
|
@@ -710,18 +673,19 @@ var ButtonContentContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
710
673
|
});
|
|
711
674
|
function ButtonContent(_ref7) {
|
|
712
675
|
var type = _ref7.type,
|
|
676
|
+
variant = _ref7.variant,
|
|
713
677
|
isDisabled = _ref7.isDisabled,
|
|
714
678
|
$isStretch = _ref7.$isStretch,
|
|
715
679
|
icon = _ref7.icon,
|
|
716
680
|
children = _ref7.children,
|
|
717
|
-
props = _objectWithoutProperties(_ref7, _excluded$
|
|
681
|
+
props = _objectWithoutProperties(_ref7, _excluded$f);
|
|
718
682
|
|
|
719
|
-
var color = isDisabled ? 'black-light' : getTextColorByType(type);
|
|
683
|
+
var color = isDisabled ? 'black-light' : getTextColorByType(type, variant);
|
|
720
684
|
return /*#__PURE__*/jsx(ButtonContentContainer, {
|
|
721
685
|
$isSubtle: isSubtle(type),
|
|
722
686
|
$isStretch: $isStretch,
|
|
723
687
|
$isIconOnly: Boolean(!children && icon),
|
|
724
|
-
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread
|
|
688
|
+
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread(_objectSpread({
|
|
725
689
|
icon: icon,
|
|
726
690
|
type: type,
|
|
727
691
|
isDisabled: isDisabled,
|
|
@@ -739,7 +703,7 @@ var StyledDisabled = /*#__PURE__*/styled.View.withConfig({
|
|
|
739
703
|
var _theme$kitt$button = theme.kitt.button,
|
|
740
704
|
borderWidth = _theme$kitt$button.borderWidth,
|
|
741
705
|
disabled = _theme$kitt$button.disabled;
|
|
742
|
-
return "".concat(borderWidth.disabled, "px solid ").concat(disabled.borderColor);
|
|
706
|
+
return "".concat(borderWidth.disabled, "px solid ").concat(disabled["default"].borderColor);
|
|
743
707
|
}, function (_ref2) {
|
|
744
708
|
var theme = _ref2.theme;
|
|
745
709
|
return theme.kitt.button.borderRadius;
|
|
@@ -749,19 +713,25 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
749
713
|
var children = _ref.children,
|
|
750
714
|
_ref$type = _ref.type,
|
|
751
715
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
716
|
+
_ref$variant = _ref.variant,
|
|
717
|
+
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
752
718
|
disabled = _ref.disabled,
|
|
753
719
|
stretch = _ref.stretch,
|
|
754
720
|
large = _ref.large,
|
|
755
721
|
icon = _ref.icon,
|
|
756
722
|
_ref$iconPosition = _ref.iconPosition,
|
|
757
723
|
iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
|
|
758
|
-
iconSpin = _ref.iconSpin,
|
|
759
724
|
testID = _ref.testID,
|
|
760
725
|
href = _ref.href,
|
|
761
726
|
hrefAttrs = _ref.hrefAttrs,
|
|
762
727
|
_ref$accessibilityRol = _ref.accessibilityRole,
|
|
763
728
|
accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
|
|
764
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
|
+
|
|
765
735
|
return /*#__PURE__*/jsx(AnimatedButtonPressable, {
|
|
766
736
|
ref: ref,
|
|
767
737
|
accessibilityRole: accessibilityRole,
|
|
@@ -771,19 +741,21 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
771
741
|
disabled: disabled,
|
|
772
742
|
$isStretch: stretch,
|
|
773
743
|
$type: type,
|
|
744
|
+
$variant: variant,
|
|
774
745
|
onPress: onPress,
|
|
775
746
|
children: /*#__PURE__*/jsxs(BaseStyledButtonPressable, {
|
|
776
747
|
$type: type,
|
|
748
|
+
$variant: variant,
|
|
777
749
|
$isStretch: stretch,
|
|
778
750
|
$isLarge: large,
|
|
779
751
|
$isDisabled: disabled,
|
|
780
752
|
children: [/*#__PURE__*/jsx(ButtonContent, {
|
|
781
753
|
type: type,
|
|
754
|
+
variant: variant,
|
|
782
755
|
$isStretch: stretch,
|
|
783
756
|
isDisabled: disabled,
|
|
784
757
|
icon: icon,
|
|
785
758
|
iconPosition: iconPosition,
|
|
786
|
-
iconSpin: iconSpin,
|
|
787
759
|
children: children
|
|
788
760
|
}), Platform.OS !== 'web' && disabled ? /*#__PURE__*/jsx(StyledDisabled, {}) : null]
|
|
789
761
|
})
|
|
@@ -858,22 +830,22 @@ var defaultOpenLinkBehavior = {
|
|
|
858
830
|
web: 'targetBlank'
|
|
859
831
|
};
|
|
860
832
|
|
|
861
|
-
var _excluded$
|
|
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; }
|
|
833
|
+
var _excluded$e = ["as", "href", "openLinkBehavior", "onPress"];
|
|
866
834
|
function ExternalLink(_ref) {
|
|
867
835
|
var Component = _ref.as,
|
|
868
836
|
href = _ref.href,
|
|
869
837
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
870
838
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
871
839
|
onPress = _ref.onPress,
|
|
872
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
840
|
+
rest = _objectWithoutProperties(_ref, _excluded$e);
|
|
841
|
+
|
|
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
|
+
}
|
|
873
848
|
|
|
874
|
-
return /*#__PURE__*/jsx(Component, _objectSpread$m(_objectSpread$m({}, rest), {}, {
|
|
875
|
-
onPress: function handleOnPress() {
|
|
876
|
-
if (onPress) onPress();
|
|
877
849
|
if (!href) return;
|
|
878
850
|
|
|
879
851
|
switch (openLinkBehavior["native"]) {
|
|
@@ -978,56 +950,77 @@ var button = {
|
|
|
978
950
|
}
|
|
979
951
|
},
|
|
980
952
|
contentPadding: {
|
|
981
|
-
"default": '
|
|
982
|
-
large: '
|
|
983
|
-
disabled: '
|
|
953
|
+
"default": '7px 16px 7px',
|
|
954
|
+
large: '11px 24px 11px',
|
|
955
|
+
disabled: '5px 14px 5px'
|
|
984
956
|
},
|
|
985
957
|
transition: {
|
|
986
958
|
duration: '200ms',
|
|
987
959
|
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
988
960
|
},
|
|
989
961
|
"default": {
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
962
|
+
"default": {
|
|
963
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
964
|
+
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
965
|
+
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
966
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
967
|
+
}
|
|
994
968
|
},
|
|
995
969
|
primary: {
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
970
|
+
"default": {
|
|
971
|
+
backgroundColor: colors.primary,
|
|
972
|
+
pressedBackgroundColor: colors.primaryLight,
|
|
973
|
+
hoverBackgroundColor: colors.primaryLight,
|
|
974
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)'
|
|
975
|
+
},
|
|
976
|
+
ghost: {
|
|
977
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
978
|
+
pressedBackgroundColor: colors.uiBackground,
|
|
979
|
+
hoverBackgroundColor: colors.hover,
|
|
980
|
+
focusBorderColor: 'rgba(255,255,255, 0.4)',
|
|
981
|
+
color: colors.primary,
|
|
982
|
+
hoverColor: colors.hover,
|
|
983
|
+
activeColor: colors.hover
|
|
984
|
+
}
|
|
1000
985
|
},
|
|
1001
986
|
white: {
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
987
|
+
"default": {
|
|
988
|
+
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
989
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
990
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
991
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.1)'
|
|
992
|
+
}
|
|
1006
993
|
},
|
|
1007
994
|
subtle: {
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
995
|
+
"default": {
|
|
996
|
+
backgroundColor: colors.transparent,
|
|
997
|
+
pressedBackgroundColor: colors.transparent,
|
|
998
|
+
hoverBackgroundColor: colors.transparent,
|
|
999
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)',
|
|
1000
|
+
color: colors.primary,
|
|
1001
|
+
hoverColor: 'rgba(76, 52, 224, 0.8)',
|
|
1002
|
+
activeColor: 'rgba(76, 52, 224, 0.8)'
|
|
1003
|
+
}
|
|
1015
1004
|
},
|
|
1016
1005
|
'subtle-dark': {
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1006
|
+
"default": {
|
|
1007
|
+
backgroundColor: colors.transparent,
|
|
1008
|
+
pressedBackgroundColor: colors.transparent,
|
|
1009
|
+
hoverBackgroundColor: colors.transparent,
|
|
1010
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)',
|
|
1011
|
+
color: colors.black,
|
|
1012
|
+
hoverColor: 'rgba(0, 0, 0, 0.8)',
|
|
1013
|
+
activeColor: 'rgba(0, 0, 0, 0.8)'
|
|
1014
|
+
}
|
|
1024
1015
|
},
|
|
1025
1016
|
disabled: {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1017
|
+
"default": {
|
|
1018
|
+
backgroundColor: colors.disabled,
|
|
1019
|
+
pressedBackgroundColor: colors.disabled,
|
|
1020
|
+
hoverBackgroundColor: colors.disabled,
|
|
1021
|
+
focusBorderColor: lateOceanColorPalette.black100,
|
|
1022
|
+
borderColor: lateOceanColorPalette.black100
|
|
1023
|
+
}
|
|
1031
1024
|
}
|
|
1032
1025
|
};
|
|
1033
1026
|
|
|
@@ -1307,14 +1300,14 @@ var iconButton = {
|
|
|
1307
1300
|
},
|
|
1308
1301
|
disabled: {
|
|
1309
1302
|
scale: 1,
|
|
1310
|
-
backgroundColor: button.disabled.backgroundColor,
|
|
1311
|
-
borderColor: button.disabled.borderColor
|
|
1303
|
+
backgroundColor: button.disabled["default"].backgroundColor,
|
|
1304
|
+
borderColor: button.disabled["default"].borderColor
|
|
1312
1305
|
},
|
|
1313
1306
|
"default": {
|
|
1314
|
-
pressedBackgroundColor: button["default"].pressedBackgroundColor
|
|
1307
|
+
pressedBackgroundColor: button["default"]["default"].pressedBackgroundColor
|
|
1315
1308
|
},
|
|
1316
1309
|
white: {
|
|
1317
|
-
pressedBackgroundColor: button.white.hoverBackgroundColor
|
|
1310
|
+
pressedBackgroundColor: button.white["default"].hoverBackgroundColor
|
|
1318
1311
|
}
|
|
1319
1312
|
};
|
|
1320
1313
|
|
|
@@ -1505,7 +1498,7 @@ function useKittTheme() {
|
|
|
1505
1498
|
|
|
1506
1499
|
var CheckboxAndLabelPressableWrapper = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1507
1500
|
displayName: "Checkbox__CheckboxAndLabelPressableWrapper"
|
|
1508
|
-
})(["display:flex;flex-direction:row;
|
|
1501
|
+
})(["display:flex;flex-direction:row;"]);
|
|
1509
1502
|
var CheckboxContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1510
1503
|
displayName: "Checkbox__CheckboxContainer"
|
|
1511
1504
|
})(["display:flex;flex-direction:row;align-items:center;justify-content:center;height:", "px;width:", "px;position:relative;border-radius:", "px;", " margin-right:", ";"], function (_ref) {
|
|
@@ -1647,10 +1640,6 @@ function DatePickerInputPart(_ref4) {
|
|
|
1647
1640
|
});
|
|
1648
1641
|
}
|
|
1649
1642
|
|
|
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
1643
|
function prefixWithZero(value) {
|
|
1655
1644
|
return "".concat(value).padStart(2, '0');
|
|
1656
1645
|
}
|
|
@@ -1704,14 +1693,14 @@ function DatePickerInputs(_ref4) {
|
|
|
1704
1693
|
onPress: handleModalOpen,
|
|
1705
1694
|
children: [/*#__PURE__*/jsx(PartContainer, {
|
|
1706
1695
|
$isStretch: stretch,
|
|
1707
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread
|
|
1696
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
|
|
1708
1697
|
partName: "day",
|
|
1709
1698
|
value: currentValue ? prefixWithZero(currentValue.getDate()) : undefined,
|
|
1710
1699
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day
|
|
1711
1700
|
}))
|
|
1712
1701
|
}), /*#__PURE__*/jsx(PartContainer, {
|
|
1713
1702
|
$isStretch: stretch,
|
|
1714
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread
|
|
1703
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
|
|
1715
1704
|
partName: "month",
|
|
1716
1705
|
value: currentValue ? prefixWithZero(currentValue.getMonth() + 1) : undefined,
|
|
1717
1706
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month
|
|
@@ -1719,7 +1708,7 @@ function DatePickerInputs(_ref4) {
|
|
|
1719
1708
|
}), /*#__PURE__*/jsx(PartContainer, {
|
|
1720
1709
|
$isLast: true,
|
|
1721
1710
|
$isStretch: stretch,
|
|
1722
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread
|
|
1711
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
|
|
1723
1712
|
partName: "year",
|
|
1724
1713
|
value: currentValue ? currentValue.getFullYear() : undefined,
|
|
1725
1714
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year
|
|
@@ -1728,11 +1717,7 @@ function DatePickerInputs(_ref4) {
|
|
|
1728
1717
|
});
|
|
1729
1718
|
}
|
|
1730
1719
|
|
|
1731
|
-
var _excluded$
|
|
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; }
|
|
1720
|
+
var _excluded$d = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "setIsFocused", "currentValue", "setCurrentValue", "onChange", "isFocused"];
|
|
1736
1721
|
function DatePickerAndroid(_ref) {
|
|
1737
1722
|
var onBlur = _ref.onBlur,
|
|
1738
1723
|
onFocus = _ref.onFocus,
|
|
@@ -1743,13 +1728,13 @@ function DatePickerAndroid(_ref) {
|
|
|
1743
1728
|
setCurrentValue = _ref.setCurrentValue,
|
|
1744
1729
|
_onChange = _ref.onChange,
|
|
1745
1730
|
isFocused = _ref.isFocused,
|
|
1746
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1731
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
1747
1732
|
|
|
1748
1733
|
var handleClose = function () {
|
|
1749
1734
|
if (onBlur) onBlur();
|
|
1750
1735
|
};
|
|
1751
1736
|
|
|
1752
|
-
return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread
|
|
1737
|
+
return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
|
|
1753
1738
|
handleModalOpen: function handleModalOpen() {
|
|
1754
1739
|
setIsFocused(true);
|
|
1755
1740
|
if (onFocus) onFocus();
|
|
@@ -1777,15 +1762,12 @@ function DatePickerAndroid(_ref) {
|
|
|
1777
1762
|
}, props));
|
|
1778
1763
|
}
|
|
1779
1764
|
|
|
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
1765
|
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
1784
1766
|
var OverlayPressable = /*#__PURE__*/styled(Pressable).withConfig({
|
|
1785
1767
|
displayName: "Overlay__OverlayPressable"
|
|
1786
1768
|
})(function (_ref) {
|
|
1787
1769
|
var theme = _ref.theme;
|
|
1788
|
-
return _objectSpread
|
|
1770
|
+
return _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
1789
1771
|
backgroundColor: theme.kitt.colors.overlay.dark
|
|
1790
1772
|
});
|
|
1791
1773
|
});
|
|
@@ -1832,26 +1814,19 @@ function ModalFooter(_ref3) {
|
|
|
1832
1814
|
});
|
|
1833
1815
|
}
|
|
1834
1816
|
|
|
1835
|
-
var _excluded$
|
|
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; }
|
|
1817
|
+
var _excluded$c = ["as", "children"];
|
|
1840
1818
|
function StyleWebWrapper(_ref) {
|
|
1841
1819
|
var as = _ref.as,
|
|
1842
1820
|
children = _ref.children,
|
|
1843
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1821
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
1844
1822
|
|
|
1845
1823
|
if (Platform.OS !== 'web') return children;
|
|
1846
1824
|
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
1847
|
-
return /*#__PURE__*/jsx(as || 'div', _objectSpread
|
|
1825
|
+
return /*#__PURE__*/jsx(as || 'div', _objectSpread(_objectSpread({}, props), {}, {
|
|
1848
1826
|
children: children
|
|
1849
1827
|
}));
|
|
1850
1828
|
}
|
|
1851
1829
|
|
|
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
1830
|
// type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
|
|
1856
1831
|
// type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
|
|
1857
1832
|
// export function withTheme<Props extends { theme: DefaultTheme }, C>(
|
|
@@ -1866,18 +1841,14 @@ function withTheme(WrappedComponent) {
|
|
|
1866
1841
|
// eslint-disable-next-line prefer-arrow-callback
|
|
1867
1842
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
1868
1843
|
var theme = /*#__PURE__*/useTheme();
|
|
1869
|
-
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread
|
|
1844
|
+
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread({
|
|
1870
1845
|
ref: ref,
|
|
1871
1846
|
theme: theme
|
|
1872
1847
|
}, props));
|
|
1873
1848
|
});
|
|
1874
1849
|
}
|
|
1875
1850
|
|
|
1876
|
-
var _excluded$
|
|
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; }
|
|
1851
|
+
var _excluded$b = ["color", "disabled"];
|
|
1881
1852
|
var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
|
|
1882
1853
|
name: "PressableIconButtonWebWrapper",
|
|
1883
1854
|
"class": "kitt-u_PressableIconButtonWebWrapper_p1nlccvg",
|
|
@@ -1941,19 +1912,19 @@ var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
|
|
|
1941
1912
|
function PressableIconButton(_ref9) {
|
|
1942
1913
|
var color = _ref9.color,
|
|
1943
1914
|
disabled = _ref9.disabled,
|
|
1944
|
-
props = _objectWithoutProperties(_ref9, _excluded$
|
|
1915
|
+
props = _objectWithoutProperties(_ref9, _excluded$b);
|
|
1945
1916
|
|
|
1946
1917
|
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
1947
1918
|
as: PressableIconButtonWebWrapper,
|
|
1948
1919
|
$isWhite: color === 'white',
|
|
1949
1920
|
$isDisabled: Boolean(disabled),
|
|
1950
|
-
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread
|
|
1921
|
+
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread(_objectSpread({}, props), {}, {
|
|
1951
1922
|
disabled: disabled
|
|
1952
1923
|
}))
|
|
1953
1924
|
});
|
|
1954
1925
|
}
|
|
1955
1926
|
|
|
1956
|
-
var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated
|
|
1927
|
+
var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
1957
1928
|
displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground"
|
|
1958
1929
|
})(["background-color:", ";border-radius:", "px;width:", "px;height:", "px;position:absolute;bottom:0;left:0;"], function (_ref) {
|
|
1959
1930
|
var theme = _ref.theme,
|
|
@@ -1973,7 +1944,7 @@ var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated$1.View).withConf
|
|
|
1973
1944
|
var theme = _ref4.theme;
|
|
1974
1945
|
return theme.kitt.iconButton.height;
|
|
1975
1946
|
});
|
|
1976
|
-
var AnimatedViewContainer = /*#__PURE__*/styled(Animated
|
|
1947
|
+
var AnimatedViewContainer = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
1977
1948
|
displayName: "PressableAnimatedContainer__AnimatedViewContainer"
|
|
1978
1949
|
})(["position:relative;align-items:center;justify-content:center;width:100%;height:100%;"]);
|
|
1979
1950
|
function PressableAnimatedContainer(_ref5) {
|
|
@@ -2226,10 +2197,6 @@ Modal.Header = ModalHeader;
|
|
|
2226
2197
|
Modal.Body = ModalBody;
|
|
2227
2198
|
Modal.Footer = ModalFooter;
|
|
2228
2199
|
|
|
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
2200
|
function getDatePickerDisplayMode() {
|
|
2234
2201
|
if (Platform.OS === 'android') return 'calendar';
|
|
2235
2202
|
if (Platform.OS === 'ios') return 'spinner';
|
|
@@ -2249,7 +2216,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
2249
2216
|
var iosProps = Platform.OS === 'ios' ? {
|
|
2250
2217
|
textColor: theme.kitt.colors.primary
|
|
2251
2218
|
} : {};
|
|
2252
|
-
return /*#__PURE__*/jsx(DateTimePicker, _objectSpread
|
|
2219
|
+
return /*#__PURE__*/jsx(DateTimePicker, _objectSpread(_objectSpread({
|
|
2253
2220
|
is24Hour: true,
|
|
2254
2221
|
testID: testID,
|
|
2255
2222
|
value: value || defaultDate,
|
|
@@ -2264,11 +2231,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
2264
2231
|
}));
|
|
2265
2232
|
}
|
|
2266
2233
|
|
|
2267
|
-
var _excluded$
|
|
2268
|
-
|
|
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; }
|
|
2234
|
+
var _excluded$a = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
2272
2235
|
|
|
2273
2236
|
function ModalTitle(_ref) {
|
|
2274
2237
|
var children = _ref.children;
|
|
@@ -2288,7 +2251,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2288
2251
|
validateButtonLabel = _ref2.validateButtonLabel,
|
|
2289
2252
|
onClose = _ref2.onClose,
|
|
2290
2253
|
onChange = _ref2.onChange,
|
|
2291
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
2254
|
+
props = _objectWithoutProperties(_ref2, _excluded$a);
|
|
2292
2255
|
|
|
2293
2256
|
var _useState = useState(value),
|
|
2294
2257
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2306,7 +2269,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2306
2269
|
children: [title ? /*#__PURE__*/jsx(ModalTitle, {
|
|
2307
2270
|
children: title
|
|
2308
2271
|
}) : null, /*#__PURE__*/jsx(Modal.Body, {
|
|
2309
|
-
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread
|
|
2272
|
+
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread(_objectSpread({}, props), {}, {
|
|
2310
2273
|
value: currentValue,
|
|
2311
2274
|
onChange: function handleChange(newDate) {
|
|
2312
2275
|
setCurrentValue(function (prev) {
|
|
@@ -2332,11 +2295,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2332
2295
|
});
|
|
2333
2296
|
}
|
|
2334
2297
|
|
|
2335
|
-
var _excluded$
|
|
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; }
|
|
2298
|
+
var _excluded$9 = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "onChange", "onFocus", "onBlur", "pickerDefaultDate"];
|
|
2340
2299
|
function DatePicker(_ref) {
|
|
2341
2300
|
var value = _ref.value,
|
|
2342
2301
|
pickerUITestID = _ref.pickerUITestID,
|
|
@@ -2346,7 +2305,7 @@ function DatePicker(_ref) {
|
|
|
2346
2305
|
onFocus = _ref.onFocus,
|
|
2347
2306
|
onBlur = _ref.onBlur,
|
|
2348
2307
|
pickerDefaultDate = _ref.pickerDefaultDate,
|
|
2349
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2308
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
2350
2309
|
|
|
2351
2310
|
var _useState = useState(false),
|
|
2352
2311
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2364,7 +2323,7 @@ function DatePicker(_ref) {
|
|
|
2364
2323
|
setCurrentValue = _useState6[1];
|
|
2365
2324
|
|
|
2366
2325
|
if (Platform.OS === 'android') {
|
|
2367
|
-
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread
|
|
2326
|
+
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
|
|
2368
2327
|
pickerDefaultDate: pickerDefaultDate,
|
|
2369
2328
|
pickerUITestID: pickerUITestID,
|
|
2370
2329
|
currentValue: currentValue,
|
|
@@ -2383,7 +2342,7 @@ function DatePicker(_ref) {
|
|
|
2383
2342
|
};
|
|
2384
2343
|
|
|
2385
2344
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
2386
|
-
children: [/*#__PURE__*/jsx(DatePickerInputs, _objectSpread
|
|
2345
|
+
children: [/*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
|
|
2387
2346
|
handleModalOpen: function handleModalOpen() {
|
|
2388
2347
|
if (onFocus) onFocus();
|
|
2389
2348
|
setIsPickerUIVisible(true);
|
|
@@ -2412,11 +2371,7 @@ var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
2412
2371
|
displayName: "InputTextContainer"
|
|
2413
2372
|
})(["position:relative;"]);
|
|
2414
2373
|
|
|
2415
|
-
var _excluded$
|
|
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; }
|
|
2374
|
+
var _excluded$8 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
2420
2375
|
var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
2421
2376
|
displayName: "InputText__StyledTextInput"
|
|
2422
2377
|
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
@@ -2460,7 +2415,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2460
2415
|
keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
|
|
2461
2416
|
_onFocus = _ref4.onFocus,
|
|
2462
2417
|
_onBlur = _ref4.onBlur,
|
|
2463
|
-
props = _objectWithoutProperties(_ref4, _excluded$
|
|
2418
|
+
props = _objectWithoutProperties(_ref4, _excluded$8);
|
|
2464
2419
|
|
|
2465
2420
|
var theme = /*#__PURE__*/useTheme();
|
|
2466
2421
|
|
|
@@ -2476,7 +2431,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2476
2431
|
});
|
|
2477
2432
|
return /*#__PURE__*/jsxs(InputTextContainer, {
|
|
2478
2433
|
$isDisabled: disabled,
|
|
2479
|
-
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread
|
|
2434
|
+
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread(_objectSpread({
|
|
2480
2435
|
ref: ref,
|
|
2481
2436
|
nativeID: id,
|
|
2482
2437
|
editable: !disabled,
|
|
@@ -2503,11 +2458,8 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2503
2458
|
});
|
|
2504
2459
|
});
|
|
2505
2460
|
|
|
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
2461
|
function InputEmail(props) {
|
|
2510
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2462
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread({
|
|
2511
2463
|
autoCompleteType: "email",
|
|
2512
2464
|
keyboardType: "email-address",
|
|
2513
2465
|
textContentType: "emailAddress",
|
|
@@ -2605,31 +2557,24 @@ function InputIcon(_ref) {
|
|
|
2605
2557
|
});
|
|
2606
2558
|
}
|
|
2607
2559
|
|
|
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
2560
|
function InputPressable(_ref) {
|
|
2612
2561
|
var props = _extends({}, _ref);
|
|
2613
2562
|
|
|
2614
|
-
return /*#__PURE__*/jsx(Pressable, _objectSpread
|
|
2563
|
+
return /*#__PURE__*/jsx(Pressable, _objectSpread({}, props));
|
|
2615
2564
|
}
|
|
2616
2565
|
|
|
2617
|
-
var _excluded$
|
|
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; }
|
|
2566
|
+
var _excluded$7 = ["isPasswordDefaultVisible", "right"];
|
|
2622
2567
|
function InputPassword(_ref) {
|
|
2623
2568
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
2624
2569
|
right = _ref.right,
|
|
2625
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2570
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
2626
2571
|
|
|
2627
2572
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
2628
2573
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2629
2574
|
isVisible = _useState2[0],
|
|
2630
2575
|
setIsVisible = _useState2[1];
|
|
2631
2576
|
|
|
2632
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2577
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({}, props), {}, {
|
|
2633
2578
|
textContentType: "password",
|
|
2634
2579
|
autoCompleteType: "password",
|
|
2635
2580
|
autoCorrect: false,
|
|
@@ -2648,11 +2593,8 @@ function InputPassword(_ref) {
|
|
|
2648
2593
|
}));
|
|
2649
2594
|
}
|
|
2650
2595
|
|
|
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
2596
|
function InputPhone(props) {
|
|
2655
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2597
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({}, props), {}, {
|
|
2656
2598
|
autoCompleteType: "tel",
|
|
2657
2599
|
keyboardType: "number-pad",
|
|
2658
2600
|
textContentType: "telephoneNumber"
|
|
@@ -2816,14 +2758,11 @@ function Radio(_ref16) {
|
|
|
2816
2758
|
});
|
|
2817
2759
|
}
|
|
2818
2760
|
|
|
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
2761
|
function TextArea(_ref) {
|
|
2823
2762
|
var props = _extends({}, _ref);
|
|
2824
2763
|
|
|
2825
2764
|
var theme = /*#__PURE__*/useTheme();
|
|
2826
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2765
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread({
|
|
2827
2766
|
multiline: true,
|
|
2828
2767
|
textAlignVertical: "top",
|
|
2829
2768
|
minHeight: theme.kitt.forms.textArea.minHeight
|
|
@@ -2988,29 +2927,65 @@ function FullScreenModal(_ref2) {
|
|
|
2988
2927
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
2989
2928
|
FullScreenModal.Body = FullScreenModalBody;
|
|
2990
2929
|
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2930
|
+
function SpinningIcon(_ref) {
|
|
2931
|
+
var icon = _ref.icon,
|
|
2932
|
+
_ref$size = _ref.size,
|
|
2933
|
+
size = _ref$size === void 0 ? defaultIconSize : _ref$size,
|
|
2934
|
+
align = _ref.align,
|
|
2935
|
+
color = _ref.color;
|
|
2936
|
+
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
2937
|
+
color: color
|
|
2938
|
+
});
|
|
2939
|
+
var animationRef = useRef(new Animated$1.Value(0));
|
|
2940
|
+
var rotation = animationRef.current.interpolate({
|
|
2941
|
+
inputRange: [0, 1],
|
|
2942
|
+
outputRange: ['0deg', '360deg']
|
|
2943
|
+
});
|
|
2944
|
+
useEffect(function () {
|
|
2945
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
2946
|
+
var animation = Animated$1.loop(Animated$1.timing(animationRef.current, {
|
|
2947
|
+
toValue: 1,
|
|
2948
|
+
duration: 1100,
|
|
2949
|
+
easing: Easing.linear,
|
|
2950
|
+
useNativeDriver: true
|
|
2951
|
+
}));
|
|
2952
|
+
animation.start();
|
|
2953
|
+
return function () {
|
|
2954
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
2955
|
+
animation.stop();
|
|
2956
|
+
return undefined;
|
|
2957
|
+
};
|
|
2958
|
+
}, []);
|
|
2959
|
+
return /*#__PURE__*/jsx(IconContainer$1, {
|
|
2960
|
+
$align: align,
|
|
2961
|
+
$size: size,
|
|
2962
|
+
$color: color,
|
|
2963
|
+
children: /*#__PURE__*/jsx(Animated$1.View, {
|
|
2964
|
+
style: {
|
|
2965
|
+
transform: [{
|
|
2966
|
+
rotate: rotation
|
|
2967
|
+
}]
|
|
2968
|
+
},
|
|
2969
|
+
children: clonedIcon
|
|
2970
|
+
})
|
|
2971
|
+
});
|
|
2972
|
+
}
|
|
2994
2973
|
|
|
2995
|
-
|
|
2974
|
+
var _excluded$6 = ["children"];
|
|
2996
2975
|
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
2997
2976
|
displayName: "ListItemContent__ContentView"
|
|
2998
2977
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
2999
2978
|
function ListItemContent(_ref) {
|
|
3000
2979
|
var children = _ref.children,
|
|
3001
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
2980
|
+
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
3002
2981
|
|
|
3003
|
-
return /*#__PURE__*/jsx(ContentView, _objectSpread
|
|
2982
|
+
return /*#__PURE__*/jsx(ContentView, _objectSpread(_objectSpread({}, rest), {}, {
|
|
3004
2983
|
children: children
|
|
3005
2984
|
}));
|
|
3006
2985
|
}
|
|
3007
2986
|
|
|
3008
|
-
var _excluded$
|
|
3009
|
-
_excluded2$
|
|
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; }
|
|
2987
|
+
var _excluded$5 = ["children", "side"],
|
|
2988
|
+
_excluded2$2 = ["children", "align"];
|
|
3014
2989
|
var SideContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
3015
2990
|
displayName: "ListItemSideContent__SideContainerView"
|
|
3016
2991
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
@@ -3027,9 +3002,9 @@ function ListItemSideContainer(_ref3) {
|
|
|
3027
3002
|
var children = _ref3.children,
|
|
3028
3003
|
_ref3$side = _ref3.side,
|
|
3029
3004
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
3030
|
-
rest = _objectWithoutProperties(_ref3, _excluded$
|
|
3005
|
+
rest = _objectWithoutProperties(_ref3, _excluded$5);
|
|
3031
3006
|
|
|
3032
|
-
return /*#__PURE__*/jsx(SideContainerView, _objectSpread
|
|
3007
|
+
return /*#__PURE__*/jsx(SideContainerView, _objectSpread(_objectSpread({
|
|
3033
3008
|
side: side
|
|
3034
3009
|
}, rest), {}, {
|
|
3035
3010
|
children: children
|
|
@@ -3045,20 +3020,16 @@ function ListItemSideContent(_ref5) {
|
|
|
3045
3020
|
var children = _ref5.children,
|
|
3046
3021
|
_ref5$align = _ref5.align,
|
|
3047
3022
|
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
3048
|
-
rest = _objectWithoutProperties(_ref5, _excluded2$
|
|
3023
|
+
rest = _objectWithoutProperties(_ref5, _excluded2$2);
|
|
3049
3024
|
|
|
3050
|
-
return /*#__PURE__*/jsx(SideContentView, _objectSpread
|
|
3025
|
+
return /*#__PURE__*/jsx(SideContentView, _objectSpread(_objectSpread({
|
|
3051
3026
|
align: align
|
|
3052
3027
|
}, rest), {}, {
|
|
3053
3028
|
children: children
|
|
3054
3029
|
}));
|
|
3055
3030
|
}
|
|
3056
3031
|
|
|
3057
|
-
var _excluded$
|
|
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; }
|
|
3032
|
+
var _excluded$4 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
3062
3033
|
var ContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
3063
3034
|
displayName: "ListItem__ContainerView"
|
|
3064
3035
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -3097,16 +3068,16 @@ function ListItem(_ref5) {
|
|
|
3097
3068
|
left = _ref5.left,
|
|
3098
3069
|
right = _ref5.right,
|
|
3099
3070
|
onPress = _ref5.onPress,
|
|
3100
|
-
rest = _objectWithoutProperties(_ref5, _excluded$
|
|
3071
|
+
rest = _objectWithoutProperties(_ref5, _excluded$4);
|
|
3101
3072
|
|
|
3102
3073
|
var Wrapper = onPress ? Pressable : Fragment$1;
|
|
3103
|
-
var wrapperProps = onPress ? _objectSpread
|
|
3074
|
+
var wrapperProps = onPress ? _objectSpread({
|
|
3104
3075
|
accessibilityRole: 'button',
|
|
3105
3076
|
onPress: onPress
|
|
3106
3077
|
}, rest) : undefined;
|
|
3107
3078
|
var containerProps = onPress ? undefined : rest;
|
|
3108
|
-
return /*#__PURE__*/jsx(Wrapper, _objectSpread
|
|
3109
|
-
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread
|
|
3079
|
+
return /*#__PURE__*/jsx(Wrapper, _objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
3080
|
+
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread(_objectSpread({
|
|
3110
3081
|
withPadding: withPadding,
|
|
3111
3082
|
borders: borders
|
|
3112
3083
|
}, containerProps), {}, {
|
|
@@ -3131,11 +3102,12 @@ function getActivityIndicatorSize(size) {
|
|
|
3131
3102
|
return size < 36 ? 'small' : 'large';
|
|
3132
3103
|
}
|
|
3133
3104
|
|
|
3105
|
+
var defaultLoaderSize = defaultIconSize;
|
|
3134
3106
|
function Loader(_ref) {
|
|
3135
3107
|
var _ref$color = _ref.color,
|
|
3136
3108
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
3137
3109
|
_ref$size = _ref.size,
|
|
3138
|
-
size = _ref$size === void 0 ?
|
|
3110
|
+
size = _ref$size === void 0 ? defaultLoaderSize : _ref$size;
|
|
3139
3111
|
var theme = /*#__PURE__*/useTheme();
|
|
3140
3112
|
var colorHex = theme.kitt.typography.colors[color];
|
|
3141
3113
|
return /*#__PURE__*/jsx(ActivityIndicator, {
|
|
@@ -3338,7 +3310,7 @@ var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
|
3338
3310
|
var theme = _ref2.theme;
|
|
3339
3311
|
return theme.kitt.skeleton.flareColor;
|
|
3340
3312
|
});
|
|
3341
|
-
var AnimatedLinearGradient = Animated
|
|
3313
|
+
var AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);
|
|
3342
3314
|
function SkeletonContent(_ref3) {
|
|
3343
3315
|
var isLoading = _ref3.isLoading,
|
|
3344
3316
|
width = _ref3.width;
|
|
@@ -3623,13 +3595,9 @@ function Story(_ref) {
|
|
|
3623
3595
|
});
|
|
3624
3596
|
}
|
|
3625
3597
|
|
|
3626
|
-
var _excluded$
|
|
3627
|
-
_excluded2 = ["title", "children"],
|
|
3598
|
+
var _excluded$3 = ["title", "children", "internalIsDemoSection"],
|
|
3599
|
+
_excluded2$1 = ["title", "children"],
|
|
3628
3600
|
_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
3601
|
var StyledSection = /*#__PURE__*/styled.View.withConfig({
|
|
3634
3602
|
displayName: "StorySection__StyledSection"
|
|
3635
3603
|
})(["margin-bottom:32px;"]);
|
|
@@ -3637,10 +3605,10 @@ function StorySection(_ref) {
|
|
|
3637
3605
|
var title = _ref.title,
|
|
3638
3606
|
children = _ref.children,
|
|
3639
3607
|
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
3640
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3608
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
3641
3609
|
|
|
3642
3610
|
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
3643
|
-
return /*#__PURE__*/jsxs(StyledSection, _objectSpread
|
|
3611
|
+
return /*#__PURE__*/jsxs(StyledSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3644
3612
|
children: [/*#__PURE__*/jsx(StoryTitle.Level2, {
|
|
3645
3613
|
children: title
|
|
3646
3614
|
}), children]
|
|
@@ -3653,9 +3621,9 @@ var StyledSubSection = /*#__PURE__*/styled.View.withConfig({
|
|
|
3653
3621
|
function SubSection(_ref2) {
|
|
3654
3622
|
var title = _ref2.title,
|
|
3655
3623
|
children = _ref2.children,
|
|
3656
|
-
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
3624
|
+
props = _objectWithoutProperties(_ref2, _excluded2$1);
|
|
3657
3625
|
|
|
3658
|
-
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread
|
|
3626
|
+
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3659
3627
|
children: [/*#__PURE__*/jsx(StoryTitle.Level3, {
|
|
3660
3628
|
children: title
|
|
3661
3629
|
}), children]
|
|
@@ -3671,7 +3639,7 @@ function BlockSection(_ref3) {
|
|
|
3671
3639
|
children = _ref3.children,
|
|
3672
3640
|
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
3673
3641
|
|
|
3674
|
-
return /*#__PURE__*/jsxs(StyledBlockSection, _objectSpread
|
|
3642
|
+
return /*#__PURE__*/jsxs(StyledBlockSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3675
3643
|
children: [/*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
3676
3644
|
children: title
|
|
3677
3645
|
}), children]
|
|
@@ -4021,9 +3989,6 @@ function TimePicker(_ref) {
|
|
|
4021
3989
|
});
|
|
4022
3990
|
}
|
|
4023
3991
|
|
|
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
3992
|
var StyledTooltipView = /*#__PURE__*/styled.View.withConfig({
|
|
4028
3993
|
displayName: "TooltipView__StyledTooltipView"
|
|
4029
3994
|
})(["align-items:center;"]);
|
|
@@ -4045,7 +4010,7 @@ var StyledTooltipContent = /*#__PURE__*/styled.View.withConfig({
|
|
|
4045
4010
|
|
|
4046
4011
|
function ArrowView(props) {
|
|
4047
4012
|
var theme = /*#__PURE__*/useTheme();
|
|
4048
|
-
return /*#__PURE__*/jsx(View, _objectSpread
|
|
4013
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4049
4014
|
children: /*#__PURE__*/jsx(TooltipArrowIcon, {
|
|
4050
4015
|
color: theme.kitt.tooltip.backgroundColor
|
|
4051
4016
|
})
|
|
@@ -4081,9 +4046,6 @@ function TooltipView(_ref7) {
|
|
|
4081
4046
|
|
|
4082
4047
|
var tooltipDefaultPosition = 'top';
|
|
4083
4048
|
|
|
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
4049
|
// Since the tooltip use absolute positionning, we need a parent to provide the relative root
|
|
4088
4050
|
var TooltipContainer = /*#__PURE__*/styled.View.withConfig({
|
|
4089
4051
|
displayName: "Tooltip__TooltipContainer"
|
|
@@ -4170,12 +4132,12 @@ function Tooltip(_ref) {
|
|
|
4170
4132
|
ref: floating,
|
|
4171
4133
|
accessibilityElementsHidden: !pressed.value,
|
|
4172
4134
|
importantForAccessibility: pressed.value === true ? 'auto' : 'no-hide-descendants',
|
|
4173
|
-
style: _objectSpread
|
|
4135
|
+
style: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
4174
4136
|
top: y && position === 'bottom' ? y : undefined,
|
|
4175
4137
|
bottom: y && position === 'top' ? y : undefined,
|
|
4176
4138
|
left: x !== null && x !== void 0 ? x : 0
|
|
4177
4139
|
}),
|
|
4178
|
-
children: /*#__PURE__*/jsx(Animated
|
|
4140
|
+
children: /*#__PURE__*/jsx(Animated.View, {
|
|
4179
4141
|
style: [opacityStyles],
|
|
4180
4142
|
children: /*#__PURE__*/jsx(TooltipView, {
|
|
4181
4143
|
position: position,
|
|
@@ -4213,11 +4175,7 @@ function TypographyEmoji(_ref2) {
|
|
|
4213
4175
|
});
|
|
4214
4176
|
}
|
|
4215
4177
|
|
|
4216
|
-
var _excluded$
|
|
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; }
|
|
4178
|
+
var _excluded$2 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
|
|
4221
4179
|
var TypographyLinkWebWrapper = withTheme( /*#__PURE__*/styled$1("span")({
|
|
4222
4180
|
name: "TypographyLinkWebWrapper",
|
|
4223
4181
|
"class": "kitt-u_TypographyLinkWebWrapper_tcwz3nt",
|
|
@@ -4250,7 +4208,7 @@ function TypographyLink(_ref5) {
|
|
|
4250
4208
|
href = _ref5.href,
|
|
4251
4209
|
hrefAttrs = _ref5.hrefAttrs,
|
|
4252
4210
|
onPress = _ref5.onPress,
|
|
4253
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
4211
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$2);
|
|
4254
4212
|
|
|
4255
4213
|
return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
4256
4214
|
accessibilityRole: "none",
|
|
@@ -4274,6 +4232,39 @@ function TypographyLink(_ref5) {
|
|
|
4274
4232
|
}));
|
|
4275
4233
|
}
|
|
4276
4234
|
|
|
4235
|
+
var _excluded$1 = ["color"],
|
|
4236
|
+
_excluded2 = ["color"];
|
|
4237
|
+
|
|
4238
|
+
function TypographySpinningIconSpecifiedColor(_ref) {
|
|
4239
|
+
var color = _ref.color,
|
|
4240
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
4241
|
+
|
|
4242
|
+
var theme = /*#__PURE__*/useTheme();
|
|
4243
|
+
return /*#__PURE__*/jsx(SpinningIcon, _objectSpread(_objectSpread({}, props), {}, {
|
|
4244
|
+
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
4245
|
+
}));
|
|
4246
|
+
}
|
|
4247
|
+
|
|
4248
|
+
function TypographySpinningIconInheritColor(props) {
|
|
4249
|
+
var color = useTypographyColor();
|
|
4250
|
+
return /*#__PURE__*/jsx(TypographySpinningIconSpecifiedColor, _objectSpread({
|
|
4251
|
+
color: color
|
|
4252
|
+
}, props));
|
|
4253
|
+
}
|
|
4254
|
+
|
|
4255
|
+
function TypographySpinningIcon(_ref2) {
|
|
4256
|
+
var color = _ref2.color,
|
|
4257
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
4258
|
+
|
|
4259
|
+
if (color) {
|
|
4260
|
+
return /*#__PURE__*/jsx(TypographySpinningIconSpecifiedColor, _objectSpread({
|
|
4261
|
+
color: color
|
|
4262
|
+
}, props));
|
|
4263
|
+
}
|
|
4264
|
+
|
|
4265
|
+
return /*#__PURE__*/jsx(TypographySpinningIconInheritColor, _objectSpread({}, props));
|
|
4266
|
+
}
|
|
4267
|
+
|
|
4277
4268
|
var hex2rgba = function (hex) {
|
|
4278
4269
|
var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
4279
4270
|
var r = parseInt(hex.slice(1, 3), 16);
|
|
@@ -4312,5 +4303,5 @@ function MatchWindowSize(_ref) {
|
|
|
4312
4303
|
return children;
|
|
4313
4304
|
}
|
|
4314
4305
|
|
|
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, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Skeleton, 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 };
|
|
4306
|
+
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, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Skeleton, SpinningIcon, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, TypographySpinningIcon, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
4316
4307
|
//# sourceMappingURL=index-browser-all.es.js.map
|