@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';
|
|
@@ -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
|
|
|
@@ -135,11 +101,7 @@ var KittBreakpointsMax = {
|
|
|
135
101
|
LARGE: KittBreakpoints.WIDE - 1
|
|
136
102
|
};
|
|
137
103
|
|
|
138
|
-
var _excluded$
|
|
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; }
|
|
104
|
+
var _excluded$i = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
143
105
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
144
106
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
145
107
|
function useTypographyColor() {
|
|
@@ -215,7 +177,7 @@ function Typography(_ref4) {
|
|
|
215
177
|
large = _ref4.large,
|
|
216
178
|
variant = _ref4.variant,
|
|
217
179
|
color = _ref4.color,
|
|
218
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded$
|
|
180
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded$i);
|
|
219
181
|
|
|
220
182
|
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
221
183
|
var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
|
|
@@ -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$
|
|
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$h = ["size", "base", "round", "light"];
|
|
310
268
|
|
|
311
269
|
var getInitials = function (firstname, lastname) {
|
|
312
270
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
@@ -377,13 +335,13 @@ function Avatar(_ref6) {
|
|
|
377
335
|
base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
|
|
378
336
|
round = _ref6.round,
|
|
379
337
|
light = _ref6.light,
|
|
380
|
-
props = _objectWithoutProperties(_ref6, _excluded$
|
|
338
|
+
props = _objectWithoutProperties(_ref6, _excluded$h);
|
|
381
339
|
|
|
382
340
|
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
383
341
|
$size: size,
|
|
384
342
|
$isRound: round,
|
|
385
343
|
$isLight: light,
|
|
386
|
-
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread
|
|
344
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread({
|
|
387
345
|
size: size,
|
|
388
346
|
base: base,
|
|
389
347
|
isLight: light
|
|
@@ -391,6 +349,20 @@ function Avatar(_ref6) {
|
|
|
391
349
|
});
|
|
392
350
|
}
|
|
393
351
|
|
|
352
|
+
var hasVariant = function (button, variant) {
|
|
353
|
+
return variant in button;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
function getVariantValuesIfExist(theme, type, variant) {
|
|
357
|
+
var button = theme.kitt.button[type];
|
|
358
|
+
|
|
359
|
+
if (hasVariant(button, variant)) {
|
|
360
|
+
return button[variant];
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
return theme.kitt.button[type]["default"];
|
|
364
|
+
}
|
|
365
|
+
|
|
394
366
|
var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
395
367
|
displayName: "AnimatedButtonPressable__StyledPressable"
|
|
396
368
|
})(["", ""], function (_ref) {
|
|
@@ -398,7 +370,7 @@ var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
|
398
370
|
if ($isStretch) return undefined;
|
|
399
371
|
return 'align-self: flex-start;';
|
|
400
372
|
});
|
|
401
|
-
var StyledAnimatedView = /*#__PURE__*/styled(Animated
|
|
373
|
+
var StyledAnimatedView = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
402
374
|
displayName: "AnimatedButtonPressable__StyledAnimatedView"
|
|
403
375
|
})(["border-radius:", "px;"], function (_ref2) {
|
|
404
376
|
var theme = _ref2.theme;
|
|
@@ -409,6 +381,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
409
381
|
disabled = _ref3.disabled,
|
|
410
382
|
accessibilityRole = _ref3.accessibilityRole,
|
|
411
383
|
$type = _ref3.$type,
|
|
384
|
+
$variant = _ref3.$variant,
|
|
412
385
|
$isStretch = _ref3.$isStretch,
|
|
413
386
|
href = _ref3.href,
|
|
414
387
|
hrefAttrs = _ref3.hrefAttrs,
|
|
@@ -417,9 +390,11 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
417
390
|
var theme = /*#__PURE__*/useTheme();
|
|
418
391
|
var pressed = useSharedValue(0);
|
|
419
392
|
var color = useSharedValue(0);
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
393
|
+
|
|
394
|
+
var _getVariantValuesIfEx = getVariantValuesIfExist(theme, $type, $variant),
|
|
395
|
+
backgroundColor = _getVariantValuesIfEx.backgroundColor,
|
|
396
|
+
pressedBackgroundColor = _getVariantValuesIfEx.pressedBackgroundColor;
|
|
397
|
+
|
|
423
398
|
var scale = theme.kitt.button.scale;
|
|
424
399
|
var scaleStyles = useAnimatedStyle(function () {
|
|
425
400
|
var _f = function () {
|
|
@@ -447,7 +422,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
447
422
|
};
|
|
448
423
|
_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
424
|
_f.__workletHash = 5368461229978;
|
|
450
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (
|
|
425
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (56:41)";
|
|
451
426
|
_f.__optimalization = 2;
|
|
452
427
|
|
|
453
428
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -508,10 +483,11 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
508
483
|
}, function (_ref6) {
|
|
509
484
|
var theme = _ref6.theme,
|
|
510
485
|
$isDisabled = _ref6.$isDisabled,
|
|
511
|
-
$type = _ref6.$type
|
|
512
|
-
|
|
486
|
+
$type = _ref6.$type,
|
|
487
|
+
$variant = _ref6.$variant;
|
|
488
|
+
if ($isDisabled) return theme.kitt.button.disabled["default"].backgroundColor;
|
|
513
489
|
if (Platform.OS !== 'web') return 'transparent';
|
|
514
|
-
return theme
|
|
490
|
+
return getVariantValuesIfExist(theme, $type, $variant).backgroundColor;
|
|
515
491
|
}, function (_ref7) {
|
|
516
492
|
var theme = _ref7.theme,
|
|
517
493
|
$isLarge = _ref7.$isLarge,
|
|
@@ -525,57 +501,49 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
525
501
|
return defaultPadding;
|
|
526
502
|
});
|
|
527
503
|
|
|
528
|
-
var _excluded$
|
|
529
|
-
_excluded2$
|
|
530
|
-
|
|
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; }
|
|
504
|
+
var _excluded$g = ["color"],
|
|
505
|
+
_excluded2$3 = ["color"];
|
|
534
506
|
|
|
535
507
|
function TypographyIconSpecifiedColor(_ref) {
|
|
536
508
|
var color = _ref.color,
|
|
537
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
509
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
538
510
|
|
|
539
511
|
var theme = /*#__PURE__*/useTheme();
|
|
540
|
-
return /*#__PURE__*/jsx(Icon, _objectSpread
|
|
512
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
|
|
541
513
|
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
542
514
|
}));
|
|
543
515
|
}
|
|
544
516
|
|
|
545
517
|
function TypographyIconInheritColor(props) {
|
|
546
518
|
var color = useTypographyColor();
|
|
547
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread
|
|
519
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread({
|
|
548
520
|
color: color
|
|
549
521
|
}, props));
|
|
550
522
|
}
|
|
551
523
|
|
|
552
524
|
function TypographyIcon(_ref2) {
|
|
553
525
|
var color = _ref2.color,
|
|
554
|
-
props = _objectWithoutProperties(_ref2, _excluded2$
|
|
526
|
+
props = _objectWithoutProperties(_ref2, _excluded2$3);
|
|
555
527
|
|
|
556
528
|
if (color) {
|
|
557
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread
|
|
529
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread({
|
|
558
530
|
color: color
|
|
559
531
|
}, props));
|
|
560
532
|
}
|
|
561
533
|
|
|
562
|
-
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread
|
|
534
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread({}, props));
|
|
563
535
|
}
|
|
564
536
|
|
|
565
537
|
function isSubtle(type) {
|
|
566
538
|
return type.startsWith('subtle');
|
|
567
539
|
}
|
|
568
540
|
|
|
569
|
-
var _excluded$
|
|
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; }
|
|
572
|
-
|
|
573
|
-
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; }
|
|
541
|
+
var _excluded$f = ["type", "variant", "isDisabled", "$isStretch", "icon", "children"];
|
|
574
542
|
|
|
575
|
-
var getTextColorByType = function (type) {
|
|
543
|
+
var getTextColorByType = function (type, variant) {
|
|
576
544
|
switch (type) {
|
|
577
545
|
case 'primary':
|
|
578
|
-
return 'white';
|
|
546
|
+
return variant === 'ghost' ? 'primary' : 'white';
|
|
579
547
|
|
|
580
548
|
case 'white':
|
|
581
549
|
return 'white';
|
|
@@ -626,14 +594,12 @@ var StyledIconContainer$1 = /*#__PURE__*/styled.View.withConfig({
|
|
|
626
594
|
function ButtonIcon(_ref3) {
|
|
627
595
|
var icon = _ref3.icon,
|
|
628
596
|
color = _ref3.color,
|
|
629
|
-
spin = _ref3.spin,
|
|
630
597
|
iconPosition = _ref3.iconPosition,
|
|
631
598
|
testID = _ref3.testID;
|
|
632
599
|
return /*#__PURE__*/jsx(StyledIconContainer$1, {
|
|
633
600
|
$iconPosition: iconPosition,
|
|
634
601
|
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
635
602
|
icon: icon,
|
|
636
|
-
spin: spin,
|
|
637
603
|
testID: testID,
|
|
638
604
|
color: color
|
|
639
605
|
})
|
|
@@ -647,7 +613,6 @@ function ButtonContentChildren(_ref4) {
|
|
|
647
613
|
var type = _ref4.type,
|
|
648
614
|
icon = _ref4.icon,
|
|
649
615
|
iconPosition = _ref4.iconPosition,
|
|
650
|
-
iconSpin = _ref4.iconSpin,
|
|
651
616
|
isDisabled = _ref4.isDisabled,
|
|
652
617
|
color = _ref4.color,
|
|
653
618
|
children = _ref4.children;
|
|
@@ -661,9 +626,8 @@ function ButtonContentChildren(_ref4) {
|
|
|
661
626
|
var isWebSubtle = isSubtle(type) && Platform.OS === 'web' && !isDisabled;
|
|
662
627
|
|
|
663
628
|
if (!children) {
|
|
664
|
-
return /*#__PURE__*/jsx(TypographyIcon
|
|
665
|
-
|
|
666
|
-
,
|
|
629
|
+
return /*#__PURE__*/jsx(TypographyIcon // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
630
|
+
, {
|
|
667
631
|
icon: icon,
|
|
668
632
|
color: isWebSubtle ? 'inherit' : color
|
|
669
633
|
});
|
|
@@ -671,12 +635,11 @@ function ButtonContentChildren(_ref4) {
|
|
|
671
635
|
|
|
672
636
|
var buttonIconSharedProps = {
|
|
673
637
|
type: type,
|
|
674
|
-
spin: iconSpin,
|
|
675
638
|
iconPosition: iconPosition,
|
|
676
639
|
color: isWebSubtle ? 'inherit' : color
|
|
677
640
|
};
|
|
678
641
|
return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
|
|
679
|
-
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread
|
|
642
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread(_objectSpread({}, buttonIconSharedProps), {}, {
|
|
680
643
|
testID: "button-left-icon",
|
|
681
644
|
icon: icon
|
|
682
645
|
})) : null, /*#__PURE__*/jsx(StyledButtonText, {
|
|
@@ -687,7 +650,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
687
650
|
,
|
|
688
651
|
color: isWebSubtle ? undefined : color,
|
|
689
652
|
children: children
|
|
690
|
-
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread
|
|
653
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread(_objectSpread({}, buttonIconSharedProps), {}, {
|
|
691
654
|
icon: icon
|
|
692
655
|
})) : null]
|
|
693
656
|
});
|
|
@@ -709,18 +672,19 @@ var ButtonContentContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
709
672
|
});
|
|
710
673
|
function ButtonContent(_ref7) {
|
|
711
674
|
var type = _ref7.type,
|
|
675
|
+
variant = _ref7.variant,
|
|
712
676
|
isDisabled = _ref7.isDisabled,
|
|
713
677
|
$isStretch = _ref7.$isStretch,
|
|
714
678
|
icon = _ref7.icon,
|
|
715
679
|
children = _ref7.children,
|
|
716
|
-
props = _objectWithoutProperties(_ref7, _excluded$
|
|
680
|
+
props = _objectWithoutProperties(_ref7, _excluded$f);
|
|
717
681
|
|
|
718
|
-
var color = isDisabled ? 'black-light' : getTextColorByType(type);
|
|
682
|
+
var color = isDisabled ? 'black-light' : getTextColorByType(type, variant);
|
|
719
683
|
return /*#__PURE__*/jsx(ButtonContentContainer, {
|
|
720
684
|
$isSubtle: isSubtle(type),
|
|
721
685
|
$isStretch: $isStretch,
|
|
722
686
|
$isIconOnly: Boolean(!children && icon),
|
|
723
|
-
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread
|
|
687
|
+
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread(_objectSpread({
|
|
724
688
|
icon: icon,
|
|
725
689
|
type: type,
|
|
726
690
|
isDisabled: isDisabled,
|
|
@@ -738,7 +702,7 @@ var StyledDisabled = /*#__PURE__*/styled.View.withConfig({
|
|
|
738
702
|
var _theme$kitt$button = theme.kitt.button,
|
|
739
703
|
borderWidth = _theme$kitt$button.borderWidth,
|
|
740
704
|
disabled = _theme$kitt$button.disabled;
|
|
741
|
-
return "".concat(borderWidth.disabled, "px solid ").concat(disabled.borderColor);
|
|
705
|
+
return "".concat(borderWidth.disabled, "px solid ").concat(disabled["default"].borderColor);
|
|
742
706
|
}, function (_ref2) {
|
|
743
707
|
var theme = _ref2.theme;
|
|
744
708
|
return theme.kitt.button.borderRadius;
|
|
@@ -748,19 +712,25 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
748
712
|
var children = _ref.children,
|
|
749
713
|
_ref$type = _ref.type,
|
|
750
714
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
715
|
+
_ref$variant = _ref.variant,
|
|
716
|
+
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
751
717
|
disabled = _ref.disabled,
|
|
752
718
|
stretch = _ref.stretch,
|
|
753
719
|
large = _ref.large,
|
|
754
720
|
icon = _ref.icon,
|
|
755
721
|
_ref$iconPosition = _ref.iconPosition,
|
|
756
722
|
iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
|
|
757
|
-
iconSpin = _ref.iconSpin,
|
|
758
723
|
testID = _ref.testID,
|
|
759
724
|
href = _ref.href,
|
|
760
725
|
hrefAttrs = _ref.hrefAttrs,
|
|
761
726
|
_ref$accessibilityRol = _ref.accessibilityRole,
|
|
762
727
|
accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
|
|
763
728
|
onPress = _ref.onPress;
|
|
729
|
+
|
|
730
|
+
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && type !== 'primary') {
|
|
731
|
+
throw new Error('variant=ghost is only allowed with type=primary');
|
|
732
|
+
}
|
|
733
|
+
|
|
764
734
|
return /*#__PURE__*/jsx(AnimatedButtonPressable, {
|
|
765
735
|
ref: ref,
|
|
766
736
|
accessibilityRole: accessibilityRole,
|
|
@@ -770,19 +740,21 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
770
740
|
disabled: disabled,
|
|
771
741
|
$isStretch: stretch,
|
|
772
742
|
$type: type,
|
|
743
|
+
$variant: variant,
|
|
773
744
|
onPress: onPress,
|
|
774
745
|
children: /*#__PURE__*/jsxs(BaseStyledButtonPressable, {
|
|
775
746
|
$type: type,
|
|
747
|
+
$variant: variant,
|
|
776
748
|
$isStretch: stretch,
|
|
777
749
|
$isLarge: large,
|
|
778
750
|
$isDisabled: disabled,
|
|
779
751
|
children: [/*#__PURE__*/jsx(ButtonContent, {
|
|
780
752
|
type: type,
|
|
753
|
+
variant: variant,
|
|
781
754
|
$isStretch: stretch,
|
|
782
755
|
isDisabled: disabled,
|
|
783
756
|
icon: icon,
|
|
784
757
|
iconPosition: iconPosition,
|
|
785
|
-
iconSpin: iconSpin,
|
|
786
758
|
children: children
|
|
787
759
|
}), Platform.OS !== 'web' && disabled ? /*#__PURE__*/jsx(StyledDisabled, {}) : null]
|
|
788
760
|
})
|
|
@@ -857,22 +829,22 @@ var defaultOpenLinkBehavior = {
|
|
|
857
829
|
web: 'targetBlank'
|
|
858
830
|
};
|
|
859
831
|
|
|
860
|
-
var _excluded$
|
|
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; }
|
|
832
|
+
var _excluded$e = ["as", "href", "openLinkBehavior", "onPress"];
|
|
865
833
|
function ExternalLink(_ref) {
|
|
866
834
|
var Component = _ref.as,
|
|
867
835
|
href = _ref.href,
|
|
868
836
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
869
837
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
870
838
|
onPress = _ref.onPress,
|
|
871
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
839
|
+
rest = _objectWithoutProperties(_ref, _excluded$e);
|
|
840
|
+
|
|
841
|
+
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
842
|
+
onPress: function handleOnPress(e) {
|
|
843
|
+
if (onPress) {
|
|
844
|
+
onPress(e);
|
|
845
|
+
if (e !== null && e !== void 0 && e.defaultPrevented) return;
|
|
846
|
+
}
|
|
872
847
|
|
|
873
|
-
return /*#__PURE__*/jsx(Component, _objectSpread$m(_objectSpread$m({}, rest), {}, {
|
|
874
|
-
onPress: function handleOnPress() {
|
|
875
|
-
if (onPress) onPress();
|
|
876
848
|
if (!href) return;
|
|
877
849
|
|
|
878
850
|
switch (openLinkBehavior["native"]) {
|
|
@@ -977,56 +949,77 @@ var button = {
|
|
|
977
949
|
}
|
|
978
950
|
},
|
|
979
951
|
contentPadding: {
|
|
980
|
-
"default": '
|
|
981
|
-
large: '
|
|
982
|
-
disabled: '
|
|
952
|
+
"default": '7px 16px 7px',
|
|
953
|
+
large: '11px 24px 11px',
|
|
954
|
+
disabled: '5px 14px 5px'
|
|
983
955
|
},
|
|
984
956
|
transition: {
|
|
985
957
|
duration: '200ms',
|
|
986
958
|
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
987
959
|
},
|
|
988
960
|
"default": {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
961
|
+
"default": {
|
|
962
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
963
|
+
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
964
|
+
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
965
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
966
|
+
}
|
|
993
967
|
},
|
|
994
968
|
primary: {
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
969
|
+
"default": {
|
|
970
|
+
backgroundColor: colors.primary,
|
|
971
|
+
pressedBackgroundColor: colors.primaryLight,
|
|
972
|
+
hoverBackgroundColor: colors.primaryLight,
|
|
973
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)'
|
|
974
|
+
},
|
|
975
|
+
ghost: {
|
|
976
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
977
|
+
pressedBackgroundColor: colors.uiBackground,
|
|
978
|
+
hoverBackgroundColor: colors.hover,
|
|
979
|
+
focusBorderColor: 'rgba(255,255,255, 0.4)',
|
|
980
|
+
color: colors.primary,
|
|
981
|
+
hoverColor: colors.hover,
|
|
982
|
+
activeColor: colors.hover
|
|
983
|
+
}
|
|
999
984
|
},
|
|
1000
985
|
white: {
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
986
|
+
"default": {
|
|
987
|
+
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
988
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
989
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
990
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.1)'
|
|
991
|
+
}
|
|
1005
992
|
},
|
|
1006
993
|
subtle: {
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
994
|
+
"default": {
|
|
995
|
+
backgroundColor: colors.transparent,
|
|
996
|
+
pressedBackgroundColor: colors.transparent,
|
|
997
|
+
hoverBackgroundColor: colors.transparent,
|
|
998
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)',
|
|
999
|
+
color: colors.primary,
|
|
1000
|
+
hoverColor: 'rgba(76, 52, 224, 0.8)',
|
|
1001
|
+
activeColor: 'rgba(76, 52, 224, 0.8)'
|
|
1002
|
+
}
|
|
1014
1003
|
},
|
|
1015
1004
|
'subtle-dark': {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1005
|
+
"default": {
|
|
1006
|
+
backgroundColor: colors.transparent,
|
|
1007
|
+
pressedBackgroundColor: colors.transparent,
|
|
1008
|
+
hoverBackgroundColor: colors.transparent,
|
|
1009
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)',
|
|
1010
|
+
color: colors.black,
|
|
1011
|
+
hoverColor: 'rgba(0, 0, 0, 0.8)',
|
|
1012
|
+
activeColor: 'rgba(0, 0, 0, 0.8)'
|
|
1013
|
+
}
|
|
1023
1014
|
},
|
|
1024
1015
|
disabled: {
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1016
|
+
"default": {
|
|
1017
|
+
backgroundColor: colors.disabled,
|
|
1018
|
+
pressedBackgroundColor: colors.disabled,
|
|
1019
|
+
hoverBackgroundColor: colors.disabled,
|
|
1020
|
+
focusBorderColor: lateOceanColorPalette.black100,
|
|
1021
|
+
borderColor: lateOceanColorPalette.black100
|
|
1022
|
+
}
|
|
1030
1023
|
}
|
|
1031
1024
|
};
|
|
1032
1025
|
|
|
@@ -1306,14 +1299,14 @@ var iconButton = {
|
|
|
1306
1299
|
},
|
|
1307
1300
|
disabled: {
|
|
1308
1301
|
scale: 1,
|
|
1309
|
-
backgroundColor: button.disabled.backgroundColor,
|
|
1310
|
-
borderColor: button.disabled.borderColor
|
|
1302
|
+
backgroundColor: button.disabled["default"].backgroundColor,
|
|
1303
|
+
borderColor: button.disabled["default"].borderColor
|
|
1311
1304
|
},
|
|
1312
1305
|
"default": {
|
|
1313
|
-
pressedBackgroundColor: button["default"].pressedBackgroundColor
|
|
1306
|
+
pressedBackgroundColor: button["default"]["default"].pressedBackgroundColor
|
|
1314
1307
|
},
|
|
1315
1308
|
white: {
|
|
1316
|
-
pressedBackgroundColor: button.white.hoverBackgroundColor
|
|
1309
|
+
pressedBackgroundColor: button.white["default"].hoverBackgroundColor
|
|
1317
1310
|
}
|
|
1318
1311
|
};
|
|
1319
1312
|
|
|
@@ -1504,7 +1497,7 @@ function useKittTheme() {
|
|
|
1504
1497
|
|
|
1505
1498
|
var CheckboxAndLabelPressableWrapper = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1506
1499
|
displayName: "Checkbox__CheckboxAndLabelPressableWrapper"
|
|
1507
|
-
})(["display:flex;flex-direction:row;
|
|
1500
|
+
})(["display:flex;flex-direction:row;"]);
|
|
1508
1501
|
var CheckboxContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1509
1502
|
displayName: "Checkbox__CheckboxContainer"
|
|
1510
1503
|
})(["display:flex;flex-direction:row;align-items:center;justify-content:center;height:", "px;width:", "px;position:relative;border-radius:", "px;", " margin-right:", ";"], function (_ref) {
|
|
@@ -1646,10 +1639,6 @@ function DatePickerInputPart(_ref4) {
|
|
|
1646
1639
|
});
|
|
1647
1640
|
}
|
|
1648
1641
|
|
|
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
1642
|
function prefixWithZero(value) {
|
|
1654
1643
|
return "".concat(value).padStart(2, '0');
|
|
1655
1644
|
}
|
|
@@ -1703,14 +1692,14 @@ function DatePickerInputs(_ref4) {
|
|
|
1703
1692
|
onPress: handleModalOpen,
|
|
1704
1693
|
children: [/*#__PURE__*/jsx(PartContainer, {
|
|
1705
1694
|
$isStretch: stretch,
|
|
1706
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread
|
|
1695
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
|
|
1707
1696
|
partName: "day",
|
|
1708
1697
|
value: currentValue ? prefixWithZero(currentValue.getDate()) : undefined,
|
|
1709
1698
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day
|
|
1710
1699
|
}))
|
|
1711
1700
|
}), /*#__PURE__*/jsx(PartContainer, {
|
|
1712
1701
|
$isStretch: stretch,
|
|
1713
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread
|
|
1702
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
|
|
1714
1703
|
partName: "month",
|
|
1715
1704
|
value: currentValue ? prefixWithZero(currentValue.getMonth() + 1) : undefined,
|
|
1716
1705
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month
|
|
@@ -1718,7 +1707,7 @@ function DatePickerInputs(_ref4) {
|
|
|
1718
1707
|
}), /*#__PURE__*/jsx(PartContainer, {
|
|
1719
1708
|
$isLast: true,
|
|
1720
1709
|
$isStretch: stretch,
|
|
1721
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread
|
|
1710
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
|
|
1722
1711
|
partName: "year",
|
|
1723
1712
|
value: currentValue ? currentValue.getFullYear() : undefined,
|
|
1724
1713
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year
|
|
@@ -1727,11 +1716,7 @@ function DatePickerInputs(_ref4) {
|
|
|
1727
1716
|
});
|
|
1728
1717
|
}
|
|
1729
1718
|
|
|
1730
|
-
var _excluded$
|
|
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; }
|
|
1719
|
+
var _excluded$d = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "setIsFocused", "currentValue", "setCurrentValue", "onChange", "isFocused"];
|
|
1735
1720
|
function DatePickerAndroid(_ref) {
|
|
1736
1721
|
var onBlur = _ref.onBlur,
|
|
1737
1722
|
onFocus = _ref.onFocus,
|
|
@@ -1742,13 +1727,13 @@ function DatePickerAndroid(_ref) {
|
|
|
1742
1727
|
setCurrentValue = _ref.setCurrentValue,
|
|
1743
1728
|
_onChange = _ref.onChange,
|
|
1744
1729
|
isFocused = _ref.isFocused,
|
|
1745
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1730
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
1746
1731
|
|
|
1747
1732
|
var handleClose = function () {
|
|
1748
1733
|
if (onBlur) onBlur();
|
|
1749
1734
|
};
|
|
1750
1735
|
|
|
1751
|
-
return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread
|
|
1736
|
+
return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
|
|
1752
1737
|
handleModalOpen: function handleModalOpen() {
|
|
1753
1738
|
setIsFocused(true);
|
|
1754
1739
|
if (onFocus) onFocus();
|
|
@@ -1776,15 +1761,12 @@ function DatePickerAndroid(_ref) {
|
|
|
1776
1761
|
}, props));
|
|
1777
1762
|
}
|
|
1778
1763
|
|
|
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
1764
|
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
1783
1765
|
var OverlayPressable = /*#__PURE__*/styled(Pressable).withConfig({
|
|
1784
1766
|
displayName: "Overlay__OverlayPressable"
|
|
1785
1767
|
})(function (_ref) {
|
|
1786
1768
|
var theme = _ref.theme;
|
|
1787
|
-
return _objectSpread
|
|
1769
|
+
return _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
1788
1770
|
backgroundColor: theme.kitt.colors.overlay.dark
|
|
1789
1771
|
});
|
|
1790
1772
|
});
|
|
@@ -1831,28 +1813,20 @@ function ModalFooter(_ref3) {
|
|
|
1831
1813
|
});
|
|
1832
1814
|
}
|
|
1833
1815
|
|
|
1834
|
-
var _excluded$
|
|
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; }
|
|
1816
|
+
var _excluded$c = ["as", "children"];
|
|
1839
1817
|
function StyleWebWrapper(_ref) {
|
|
1840
1818
|
var as = _ref.as,
|
|
1841
1819
|
children = _ref.children,
|
|
1842
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1820
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
1843
1821
|
|
|
1844
1822
|
if (Platform.OS !== 'web') return children;
|
|
1845
1823
|
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
1846
|
-
return /*#__PURE__*/jsx(as || 'div', _objectSpread
|
|
1824
|
+
return /*#__PURE__*/jsx(as || 'div', _objectSpread(_objectSpread({}, props), {}, {
|
|
1847
1825
|
children: children
|
|
1848
1826
|
}));
|
|
1849
1827
|
}
|
|
1850
1828
|
|
|
1851
|
-
var _excluded$
|
|
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; }
|
|
1829
|
+
var _excluded$b = ["color", "disabled"];
|
|
1856
1830
|
var PressableIconButtonWebWrapper = undefined;
|
|
1857
1831
|
var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1858
1832
|
displayName: "PressableIconButton__StyledPressableIconButton"
|
|
@@ -1885,19 +1859,19 @@ var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
|
|
|
1885
1859
|
function PressableIconButton(_ref5) {
|
|
1886
1860
|
var color = _ref5.color,
|
|
1887
1861
|
disabled = _ref5.disabled,
|
|
1888
|
-
props = _objectWithoutProperties(_ref5, _excluded$
|
|
1862
|
+
props = _objectWithoutProperties(_ref5, _excluded$b);
|
|
1889
1863
|
|
|
1890
1864
|
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
1891
1865
|
as: PressableIconButtonWebWrapper,
|
|
1892
1866
|
$isWhite: color === 'white',
|
|
1893
1867
|
$isDisabled: Boolean(disabled),
|
|
1894
|
-
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread
|
|
1868
|
+
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread(_objectSpread({}, props), {}, {
|
|
1895
1869
|
disabled: disabled
|
|
1896
1870
|
}))
|
|
1897
1871
|
});
|
|
1898
1872
|
}
|
|
1899
1873
|
|
|
1900
|
-
var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated
|
|
1874
|
+
var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
1901
1875
|
displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground"
|
|
1902
1876
|
})(["background-color:", ";border-radius:", "px;width:", "px;height:", "px;position:absolute;bottom:0;left:0;"], function (_ref) {
|
|
1903
1877
|
var theme = _ref.theme,
|
|
@@ -1917,7 +1891,7 @@ var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated$1.View).withConf
|
|
|
1917
1891
|
var theme = _ref4.theme;
|
|
1918
1892
|
return theme.kitt.iconButton.height;
|
|
1919
1893
|
});
|
|
1920
|
-
var AnimatedViewContainer = /*#__PURE__*/styled(Animated
|
|
1894
|
+
var AnimatedViewContainer = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
1921
1895
|
displayName: "PressableAnimatedContainer__AnimatedViewContainer"
|
|
1922
1896
|
})(["position:relative;align-items:center;justify-content:center;width:100%;height:100%;"]);
|
|
1923
1897
|
function PressableAnimatedContainer(_ref5) {
|
|
@@ -2170,10 +2144,6 @@ Modal.Header = ModalHeader;
|
|
|
2170
2144
|
Modal.Body = ModalBody;
|
|
2171
2145
|
Modal.Footer = ModalFooter;
|
|
2172
2146
|
|
|
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
2147
|
function getDatePickerDisplayMode() {
|
|
2178
2148
|
if (Platform.OS === 'android') return 'calendar';
|
|
2179
2149
|
if (Platform.OS === 'ios') return 'spinner';
|
|
@@ -2193,7 +2163,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
2193
2163
|
var iosProps = Platform.OS === 'ios' ? {
|
|
2194
2164
|
textColor: theme.kitt.colors.primary
|
|
2195
2165
|
} : {};
|
|
2196
|
-
return /*#__PURE__*/jsx(DateTimePicker, _objectSpread
|
|
2166
|
+
return /*#__PURE__*/jsx(DateTimePicker, _objectSpread(_objectSpread({
|
|
2197
2167
|
is24Hour: true,
|
|
2198
2168
|
testID: testID,
|
|
2199
2169
|
value: value || defaultDate,
|
|
@@ -2208,11 +2178,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
2208
2178
|
}));
|
|
2209
2179
|
}
|
|
2210
2180
|
|
|
2211
|
-
var _excluded$
|
|
2212
|
-
|
|
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; }
|
|
2181
|
+
var _excluded$a = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
2216
2182
|
|
|
2217
2183
|
function ModalTitle(_ref) {
|
|
2218
2184
|
var children = _ref.children;
|
|
@@ -2232,7 +2198,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2232
2198
|
validateButtonLabel = _ref2.validateButtonLabel,
|
|
2233
2199
|
onClose = _ref2.onClose,
|
|
2234
2200
|
onChange = _ref2.onChange,
|
|
2235
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
2201
|
+
props = _objectWithoutProperties(_ref2, _excluded$a);
|
|
2236
2202
|
|
|
2237
2203
|
var _useState = useState(value),
|
|
2238
2204
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2250,7 +2216,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2250
2216
|
children: [title ? /*#__PURE__*/jsx(ModalTitle, {
|
|
2251
2217
|
children: title
|
|
2252
2218
|
}) : null, /*#__PURE__*/jsx(Modal.Body, {
|
|
2253
|
-
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread
|
|
2219
|
+
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread(_objectSpread({}, props), {}, {
|
|
2254
2220
|
value: currentValue,
|
|
2255
2221
|
onChange: function handleChange(newDate) {
|
|
2256
2222
|
setCurrentValue(function (prev) {
|
|
@@ -2276,11 +2242,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2276
2242
|
});
|
|
2277
2243
|
}
|
|
2278
2244
|
|
|
2279
|
-
var _excluded$
|
|
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; }
|
|
2245
|
+
var _excluded$9 = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "onChange", "onFocus", "onBlur", "pickerDefaultDate"];
|
|
2284
2246
|
function DatePicker(_ref) {
|
|
2285
2247
|
var value = _ref.value,
|
|
2286
2248
|
pickerUITestID = _ref.pickerUITestID,
|
|
@@ -2290,7 +2252,7 @@ function DatePicker(_ref) {
|
|
|
2290
2252
|
onFocus = _ref.onFocus,
|
|
2291
2253
|
onBlur = _ref.onBlur,
|
|
2292
2254
|
pickerDefaultDate = _ref.pickerDefaultDate,
|
|
2293
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2255
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
2294
2256
|
|
|
2295
2257
|
var _useState = useState(false),
|
|
2296
2258
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2308,7 +2270,7 @@ function DatePicker(_ref) {
|
|
|
2308
2270
|
setCurrentValue = _useState6[1];
|
|
2309
2271
|
|
|
2310
2272
|
if (Platform.OS === 'android') {
|
|
2311
|
-
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread
|
|
2273
|
+
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
|
|
2312
2274
|
pickerDefaultDate: pickerDefaultDate,
|
|
2313
2275
|
pickerUITestID: pickerUITestID,
|
|
2314
2276
|
currentValue: currentValue,
|
|
@@ -2327,7 +2289,7 @@ function DatePicker(_ref) {
|
|
|
2327
2289
|
};
|
|
2328
2290
|
|
|
2329
2291
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
2330
|
-
children: [/*#__PURE__*/jsx(DatePickerInputs, _objectSpread
|
|
2292
|
+
children: [/*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
|
|
2331
2293
|
handleModalOpen: function handleModalOpen() {
|
|
2332
2294
|
if (onFocus) onFocus();
|
|
2333
2295
|
setIsPickerUIVisible(true);
|
|
@@ -2356,11 +2318,7 @@ var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
2356
2318
|
displayName: "InputTextContainer"
|
|
2357
2319
|
})(["position:relative;"]);
|
|
2358
2320
|
|
|
2359
|
-
var _excluded$
|
|
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; }
|
|
2321
|
+
var _excluded$8 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
2364
2322
|
var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
2365
2323
|
displayName: "InputText__StyledTextInput"
|
|
2366
2324
|
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
@@ -2404,7 +2362,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2404
2362
|
keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
|
|
2405
2363
|
_onFocus = _ref4.onFocus,
|
|
2406
2364
|
_onBlur = _ref4.onBlur,
|
|
2407
|
-
props = _objectWithoutProperties(_ref4, _excluded$
|
|
2365
|
+
props = _objectWithoutProperties(_ref4, _excluded$8);
|
|
2408
2366
|
|
|
2409
2367
|
var theme = /*#__PURE__*/useTheme();
|
|
2410
2368
|
|
|
@@ -2420,7 +2378,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2420
2378
|
});
|
|
2421
2379
|
return /*#__PURE__*/jsxs(InputTextContainer, {
|
|
2422
2380
|
$isDisabled: disabled,
|
|
2423
|
-
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread
|
|
2381
|
+
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread(_objectSpread({
|
|
2424
2382
|
ref: ref,
|
|
2425
2383
|
nativeID: id,
|
|
2426
2384
|
editable: !disabled,
|
|
@@ -2447,11 +2405,8 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2447
2405
|
});
|
|
2448
2406
|
});
|
|
2449
2407
|
|
|
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
2408
|
function InputEmail(props) {
|
|
2454
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2409
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread({
|
|
2455
2410
|
autoCompleteType: "email",
|
|
2456
2411
|
keyboardType: "email-address",
|
|
2457
2412
|
textContentType: "emailAddress",
|
|
@@ -2549,31 +2504,24 @@ function InputIcon(_ref) {
|
|
|
2549
2504
|
});
|
|
2550
2505
|
}
|
|
2551
2506
|
|
|
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
2507
|
function InputPressable(_ref) {
|
|
2556
2508
|
var props = _extends({}, _ref);
|
|
2557
2509
|
|
|
2558
|
-
return /*#__PURE__*/jsx(Pressable, _objectSpread
|
|
2510
|
+
return /*#__PURE__*/jsx(Pressable, _objectSpread({}, props));
|
|
2559
2511
|
}
|
|
2560
2512
|
|
|
2561
|
-
var _excluded$
|
|
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; }
|
|
2513
|
+
var _excluded$7 = ["isPasswordDefaultVisible", "right"];
|
|
2566
2514
|
function InputPassword(_ref) {
|
|
2567
2515
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
2568
2516
|
right = _ref.right,
|
|
2569
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2517
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
2570
2518
|
|
|
2571
2519
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
2572
2520
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2573
2521
|
isVisible = _useState2[0],
|
|
2574
2522
|
setIsVisible = _useState2[1];
|
|
2575
2523
|
|
|
2576
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2524
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({}, props), {}, {
|
|
2577
2525
|
textContentType: "password",
|
|
2578
2526
|
autoCompleteType: "password",
|
|
2579
2527
|
autoCorrect: false,
|
|
@@ -2592,11 +2540,8 @@ function InputPassword(_ref) {
|
|
|
2592
2540
|
}));
|
|
2593
2541
|
}
|
|
2594
2542
|
|
|
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
2543
|
function InputPhone(props) {
|
|
2599
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2544
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({}, props), {}, {
|
|
2600
2545
|
autoCompleteType: "tel",
|
|
2601
2546
|
keyboardType: "number-pad",
|
|
2602
2547
|
textContentType: "telephoneNumber"
|
|
@@ -2760,14 +2705,11 @@ function Radio(_ref16) {
|
|
|
2760
2705
|
});
|
|
2761
2706
|
}
|
|
2762
2707
|
|
|
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
2708
|
function TextArea(_ref) {
|
|
2767
2709
|
var props = _extends({}, _ref);
|
|
2768
2710
|
|
|
2769
2711
|
var theme = /*#__PURE__*/useTheme();
|
|
2770
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread
|
|
2712
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread({
|
|
2771
2713
|
multiline: true,
|
|
2772
2714
|
textAlignVertical: "top",
|
|
2773
2715
|
minHeight: theme.kitt.forms.textArea.minHeight
|
|
@@ -2932,29 +2874,65 @@ function FullScreenModal(_ref2) {
|
|
|
2932
2874
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
2933
2875
|
FullScreenModal.Body = FullScreenModalBody;
|
|
2934
2876
|
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2877
|
+
function SpinningIcon(_ref) {
|
|
2878
|
+
var icon = _ref.icon,
|
|
2879
|
+
_ref$size = _ref.size,
|
|
2880
|
+
size = _ref$size === void 0 ? defaultIconSize : _ref$size,
|
|
2881
|
+
align = _ref.align,
|
|
2882
|
+
color = _ref.color;
|
|
2883
|
+
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
2884
|
+
color: color
|
|
2885
|
+
});
|
|
2886
|
+
var animationRef = useRef(new Animated$1.Value(0));
|
|
2887
|
+
var rotation = animationRef.current.interpolate({
|
|
2888
|
+
inputRange: [0, 1],
|
|
2889
|
+
outputRange: ['0deg', '360deg']
|
|
2890
|
+
});
|
|
2891
|
+
useEffect(function () {
|
|
2892
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
2893
|
+
var animation = Animated$1.loop(Animated$1.timing(animationRef.current, {
|
|
2894
|
+
toValue: 1,
|
|
2895
|
+
duration: 1100,
|
|
2896
|
+
easing: Easing.linear,
|
|
2897
|
+
useNativeDriver: true
|
|
2898
|
+
}));
|
|
2899
|
+
animation.start();
|
|
2900
|
+
return function () {
|
|
2901
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
2902
|
+
animation.stop();
|
|
2903
|
+
return undefined;
|
|
2904
|
+
};
|
|
2905
|
+
}, []);
|
|
2906
|
+
return /*#__PURE__*/jsx(IconContainer$1, {
|
|
2907
|
+
$align: align,
|
|
2908
|
+
$size: size,
|
|
2909
|
+
$color: color,
|
|
2910
|
+
children: /*#__PURE__*/jsx(Animated$1.View, {
|
|
2911
|
+
style: {
|
|
2912
|
+
transform: [{
|
|
2913
|
+
rotate: rotation
|
|
2914
|
+
}]
|
|
2915
|
+
},
|
|
2916
|
+
children: clonedIcon
|
|
2917
|
+
})
|
|
2918
|
+
});
|
|
2919
|
+
}
|
|
2938
2920
|
|
|
2939
|
-
|
|
2921
|
+
var _excluded$6 = ["children"];
|
|
2940
2922
|
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
2941
2923
|
displayName: "ListItemContent__ContentView"
|
|
2942
2924
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
2943
2925
|
function ListItemContent(_ref) {
|
|
2944
2926
|
var children = _ref.children,
|
|
2945
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
2927
|
+
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
2946
2928
|
|
|
2947
|
-
return /*#__PURE__*/jsx(ContentView, _objectSpread
|
|
2929
|
+
return /*#__PURE__*/jsx(ContentView, _objectSpread(_objectSpread({}, rest), {}, {
|
|
2948
2930
|
children: children
|
|
2949
2931
|
}));
|
|
2950
2932
|
}
|
|
2951
2933
|
|
|
2952
|
-
var _excluded$
|
|
2953
|
-
_excluded2$
|
|
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; }
|
|
2934
|
+
var _excluded$5 = ["children", "side"],
|
|
2935
|
+
_excluded2$2 = ["children", "align"];
|
|
2958
2936
|
var SideContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
2959
2937
|
displayName: "ListItemSideContent__SideContainerView"
|
|
2960
2938
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
@@ -2971,9 +2949,9 @@ function ListItemSideContainer(_ref3) {
|
|
|
2971
2949
|
var children = _ref3.children,
|
|
2972
2950
|
_ref3$side = _ref3.side,
|
|
2973
2951
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
2974
|
-
rest = _objectWithoutProperties(_ref3, _excluded$
|
|
2952
|
+
rest = _objectWithoutProperties(_ref3, _excluded$5);
|
|
2975
2953
|
|
|
2976
|
-
return /*#__PURE__*/jsx(SideContainerView, _objectSpread
|
|
2954
|
+
return /*#__PURE__*/jsx(SideContainerView, _objectSpread(_objectSpread({
|
|
2977
2955
|
side: side
|
|
2978
2956
|
}, rest), {}, {
|
|
2979
2957
|
children: children
|
|
@@ -2989,20 +2967,16 @@ function ListItemSideContent(_ref5) {
|
|
|
2989
2967
|
var children = _ref5.children,
|
|
2990
2968
|
_ref5$align = _ref5.align,
|
|
2991
2969
|
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
2992
|
-
rest = _objectWithoutProperties(_ref5, _excluded2$
|
|
2970
|
+
rest = _objectWithoutProperties(_ref5, _excluded2$2);
|
|
2993
2971
|
|
|
2994
|
-
return /*#__PURE__*/jsx(SideContentView, _objectSpread
|
|
2972
|
+
return /*#__PURE__*/jsx(SideContentView, _objectSpread(_objectSpread({
|
|
2995
2973
|
align: align
|
|
2996
2974
|
}, rest), {}, {
|
|
2997
2975
|
children: children
|
|
2998
2976
|
}));
|
|
2999
2977
|
}
|
|
3000
2978
|
|
|
3001
|
-
var _excluded$
|
|
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; }
|
|
2979
|
+
var _excluded$4 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
3006
2980
|
var ContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
3007
2981
|
displayName: "ListItem__ContainerView"
|
|
3008
2982
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -3041,16 +3015,16 @@ function ListItem(_ref5) {
|
|
|
3041
3015
|
left = _ref5.left,
|
|
3042
3016
|
right = _ref5.right,
|
|
3043
3017
|
onPress = _ref5.onPress,
|
|
3044
|
-
rest = _objectWithoutProperties(_ref5, _excluded$
|
|
3018
|
+
rest = _objectWithoutProperties(_ref5, _excluded$4);
|
|
3045
3019
|
|
|
3046
3020
|
var Wrapper = onPress ? Pressable : Fragment$1;
|
|
3047
|
-
var wrapperProps = onPress ? _objectSpread
|
|
3021
|
+
var wrapperProps = onPress ? _objectSpread({
|
|
3048
3022
|
accessibilityRole: 'button',
|
|
3049
3023
|
onPress: onPress
|
|
3050
3024
|
}, rest) : undefined;
|
|
3051
3025
|
var containerProps = onPress ? undefined : rest;
|
|
3052
|
-
return /*#__PURE__*/jsx(Wrapper, _objectSpread
|
|
3053
|
-
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread
|
|
3026
|
+
return /*#__PURE__*/jsx(Wrapper, _objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
3027
|
+
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread(_objectSpread({
|
|
3054
3028
|
withPadding: withPadding,
|
|
3055
3029
|
borders: borders
|
|
3056
3030
|
}, containerProps), {}, {
|
|
@@ -3075,11 +3049,12 @@ function getActivityIndicatorSize(size) {
|
|
|
3075
3049
|
return size < 36 ? 'small' : 'large';
|
|
3076
3050
|
}
|
|
3077
3051
|
|
|
3052
|
+
var defaultLoaderSize = defaultIconSize;
|
|
3078
3053
|
function Loader(_ref) {
|
|
3079
3054
|
var _ref$color = _ref.color,
|
|
3080
3055
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
3081
3056
|
_ref$size = _ref.size,
|
|
3082
|
-
size = _ref$size === void 0 ?
|
|
3057
|
+
size = _ref$size === void 0 ? defaultLoaderSize : _ref$size;
|
|
3083
3058
|
var theme = /*#__PURE__*/useTheme();
|
|
3084
3059
|
var colorHex = theme.kitt.typography.colors[color];
|
|
3085
3060
|
return /*#__PURE__*/jsx(ActivityIndicator, {
|
|
@@ -3282,7 +3257,7 @@ var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
|
3282
3257
|
var theme = _ref2.theme;
|
|
3283
3258
|
return theme.kitt.skeleton.flareColor;
|
|
3284
3259
|
});
|
|
3285
|
-
var AnimatedLinearGradient = Animated
|
|
3260
|
+
var AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);
|
|
3286
3261
|
function SkeletonContent(_ref3) {
|
|
3287
3262
|
var isLoading = _ref3.isLoading,
|
|
3288
3263
|
width = _ref3.width;
|
|
@@ -3567,13 +3542,9 @@ function Story(_ref) {
|
|
|
3567
3542
|
});
|
|
3568
3543
|
}
|
|
3569
3544
|
|
|
3570
|
-
var _excluded$
|
|
3571
|
-
_excluded2 = ["title", "children"],
|
|
3545
|
+
var _excluded$3 = ["title", "children", "internalIsDemoSection"],
|
|
3546
|
+
_excluded2$1 = ["title", "children"],
|
|
3572
3547
|
_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
3548
|
var StyledSection = /*#__PURE__*/styled.View.withConfig({
|
|
3578
3549
|
displayName: "StorySection__StyledSection"
|
|
3579
3550
|
})(["margin-bottom:32px;"]);
|
|
@@ -3581,10 +3552,10 @@ function StorySection(_ref) {
|
|
|
3581
3552
|
var title = _ref.title,
|
|
3582
3553
|
children = _ref.children,
|
|
3583
3554
|
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
3584
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3555
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
3585
3556
|
|
|
3586
3557
|
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
3587
|
-
return /*#__PURE__*/jsxs(StyledSection, _objectSpread
|
|
3558
|
+
return /*#__PURE__*/jsxs(StyledSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3588
3559
|
children: [/*#__PURE__*/jsx(StoryTitle.Level2, {
|
|
3589
3560
|
children: title
|
|
3590
3561
|
}), children]
|
|
@@ -3597,9 +3568,9 @@ var StyledSubSection = /*#__PURE__*/styled.View.withConfig({
|
|
|
3597
3568
|
function SubSection(_ref2) {
|
|
3598
3569
|
var title = _ref2.title,
|
|
3599
3570
|
children = _ref2.children,
|
|
3600
|
-
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
3571
|
+
props = _objectWithoutProperties(_ref2, _excluded2$1);
|
|
3601
3572
|
|
|
3602
|
-
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread
|
|
3573
|
+
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3603
3574
|
children: [/*#__PURE__*/jsx(StoryTitle.Level3, {
|
|
3604
3575
|
children: title
|
|
3605
3576
|
}), children]
|
|
@@ -3615,7 +3586,7 @@ function BlockSection(_ref3) {
|
|
|
3615
3586
|
children = _ref3.children,
|
|
3616
3587
|
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
3617
3588
|
|
|
3618
|
-
return /*#__PURE__*/jsxs(StyledBlockSection, _objectSpread
|
|
3589
|
+
return /*#__PURE__*/jsxs(StyledBlockSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3619
3590
|
children: [/*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
3620
3591
|
children: title
|
|
3621
3592
|
}), children]
|
|
@@ -3965,9 +3936,6 @@ function TimePicker(_ref) {
|
|
|
3965
3936
|
});
|
|
3966
3937
|
}
|
|
3967
3938
|
|
|
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
3939
|
var StyledTooltipView = /*#__PURE__*/styled.View.withConfig({
|
|
3972
3940
|
displayName: "TooltipView__StyledTooltipView"
|
|
3973
3941
|
})(["align-items:center;"]);
|
|
@@ -3989,7 +3957,7 @@ var StyledTooltipContent = /*#__PURE__*/styled.View.withConfig({
|
|
|
3989
3957
|
|
|
3990
3958
|
function ArrowView(props) {
|
|
3991
3959
|
var theme = /*#__PURE__*/useTheme();
|
|
3992
|
-
return /*#__PURE__*/jsx(View, _objectSpread
|
|
3960
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
3993
3961
|
children: /*#__PURE__*/jsx(TooltipArrowIcon, {
|
|
3994
3962
|
color: theme.kitt.tooltip.backgroundColor
|
|
3995
3963
|
})
|
|
@@ -4025,9 +3993,6 @@ function TooltipView(_ref7) {
|
|
|
4025
3993
|
|
|
4026
3994
|
var tooltipDefaultPosition = 'top';
|
|
4027
3995
|
|
|
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
3996
|
// Since the tooltip use absolute positionning, we need a parent to provide the relative root
|
|
4032
3997
|
var TooltipContainer = /*#__PURE__*/styled.View.withConfig({
|
|
4033
3998
|
displayName: "Tooltip__TooltipContainer"
|
|
@@ -4114,12 +4079,12 @@ function Tooltip(_ref) {
|
|
|
4114
4079
|
ref: floating,
|
|
4115
4080
|
accessibilityElementsHidden: !pressed.value,
|
|
4116
4081
|
importantForAccessibility: pressed.value === true ? 'auto' : 'no-hide-descendants',
|
|
4117
|
-
style: _objectSpread
|
|
4082
|
+
style: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
4118
4083
|
top: y && position === 'bottom' ? y : undefined,
|
|
4119
4084
|
bottom: y && position === 'top' ? y : undefined,
|
|
4120
4085
|
left: x !== null && x !== void 0 ? x : 0
|
|
4121
4086
|
}),
|
|
4122
|
-
children: /*#__PURE__*/jsx(Animated
|
|
4087
|
+
children: /*#__PURE__*/jsx(Animated.View, {
|
|
4123
4088
|
style: [opacityStyles],
|
|
4124
4089
|
children: /*#__PURE__*/jsx(TooltipView, {
|
|
4125
4090
|
position: position,
|
|
@@ -4157,11 +4122,7 @@ function TypographyEmoji(_ref2) {
|
|
|
4157
4122
|
});
|
|
4158
4123
|
}
|
|
4159
4124
|
|
|
4160
|
-
var _excluded$
|
|
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; }
|
|
4125
|
+
var _excluded$2 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
|
|
4165
4126
|
var TypographyLinkWebWrapper = undefined;
|
|
4166
4127
|
var StyledLink = /*#__PURE__*/styled.Text.withConfig({
|
|
4167
4128
|
displayName: "TypographyLink__StyledLink"
|
|
@@ -4185,9 +4146,9 @@ function TypographyLink(_ref4) {
|
|
|
4185
4146
|
href = _ref4.href,
|
|
4186
4147
|
hrefAttrs = _ref4.hrefAttrs,
|
|
4187
4148
|
onPress = _ref4.onPress,
|
|
4188
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded$
|
|
4149
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded$2);
|
|
4189
4150
|
|
|
4190
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread
|
|
4151
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
4191
4152
|
accessibilityRole: "none",
|
|
4192
4153
|
children: /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
4193
4154
|
as: TypographyLinkWebWrapper,
|
|
@@ -4209,6 +4170,39 @@ function TypographyLink(_ref4) {
|
|
|
4209
4170
|
}));
|
|
4210
4171
|
}
|
|
4211
4172
|
|
|
4173
|
+
var _excluded$1 = ["color"],
|
|
4174
|
+
_excluded2 = ["color"];
|
|
4175
|
+
|
|
4176
|
+
function TypographySpinningIconSpecifiedColor(_ref) {
|
|
4177
|
+
var color = _ref.color,
|
|
4178
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
4179
|
+
|
|
4180
|
+
var theme = /*#__PURE__*/useTheme();
|
|
4181
|
+
return /*#__PURE__*/jsx(SpinningIcon, _objectSpread(_objectSpread({}, props), {}, {
|
|
4182
|
+
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
4183
|
+
}));
|
|
4184
|
+
}
|
|
4185
|
+
|
|
4186
|
+
function TypographySpinningIconInheritColor(props) {
|
|
4187
|
+
var color = useTypographyColor();
|
|
4188
|
+
return /*#__PURE__*/jsx(TypographySpinningIconSpecifiedColor, _objectSpread({
|
|
4189
|
+
color: color
|
|
4190
|
+
}, props));
|
|
4191
|
+
}
|
|
4192
|
+
|
|
4193
|
+
function TypographySpinningIcon(_ref2) {
|
|
4194
|
+
var color = _ref2.color,
|
|
4195
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
4196
|
+
|
|
4197
|
+
if (color) {
|
|
4198
|
+
return /*#__PURE__*/jsx(TypographySpinningIconSpecifiedColor, _objectSpread({
|
|
4199
|
+
color: color
|
|
4200
|
+
}, props));
|
|
4201
|
+
}
|
|
4202
|
+
|
|
4203
|
+
return /*#__PURE__*/jsx(TypographySpinningIconInheritColor, _objectSpread({}, props));
|
|
4204
|
+
}
|
|
4205
|
+
|
|
4212
4206
|
var hex2rgba = function (hex) {
|
|
4213
4207
|
var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
4214
4208
|
var r = parseInt(hex.slice(1, 3), 16);
|
|
@@ -4247,9 +4241,6 @@ function MatchWindowSize(_ref) {
|
|
|
4247
4241
|
return children;
|
|
4248
4242
|
}
|
|
4249
4243
|
|
|
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
4244
|
// type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
|
|
4254
4245
|
// type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
|
|
4255
4246
|
// export function withTheme<Props extends { theme: DefaultTheme }, C>(
|
|
@@ -4271,5 +4262,5 @@ function withTheme(WrappedComponent) {
|
|
|
4271
4262
|
});
|
|
4272
4263
|
}
|
|
4273
4264
|
|
|
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, 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 };
|
|
4265
|
+
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 };
|
|
4275
4266
|
//# sourceMappingURL=index-browser-all.es.ios.js.map
|