@ornikar/kitt-universal 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definitions/forms/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/DatePickerAndroid.d.ts +12 -0
- package/dist/definitions/forms/DatePicker/DatePickerAndroid.d.ts.map +1 -0
- package/dist/index-browser-all.es.android.js +879 -706
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +102 -40
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +102 -40
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +60 -1
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/definitions/forms/DatePicker/DatePicker.android.d.ts +0 -4
- package/dist/definitions/forms/DatePicker/DatePicker.android.d.ts.map +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import { UserIcon, CheckboxMark, EyeOffIcon, EyeIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon,
|
|
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 { Animated, Easing, useWindowDimensions, Image, Platform, Linking,
|
|
5
|
+
import { Animated, Easing, useWindowDimensions, Image, Platform, Linking, View, Pressable, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1, TextInput, 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 { useRef, useEffect, cloneElement, useContext, createContext, forwardRef, useMemo, useState, Fragment, Children } from 'react';
|
|
9
|
-
import { jsx, jsxs, Fragment
|
|
8
|
+
import { useRef, useEffect, cloneElement, useContext, createContext, forwardRef, useMemo, useState, Fragment as Fragment$1, Children } from 'react';
|
|
9
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
10
|
import Animated$1, { 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';
|
|
14
14
|
import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/datetimepicker';
|
|
15
|
+
import { FormattedMessage } from 'react-intl';
|
|
15
16
|
import _extends from '@babel/runtime/helpers/extends';
|
|
16
17
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
17
18
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
18
|
-
import { FormattedMessage } from 'react-intl';
|
|
19
19
|
import { useFloating, offset, shift, flip } from '@floating-ui/react-native';
|
|
20
20
|
import { makeDecorator } from '@storybook/addons';
|
|
21
21
|
|
|
@@ -135,11 +135,11 @@ var KittBreakpointsMax = {
|
|
|
135
135
|
LARGE: KittBreakpoints.WIDE - 1
|
|
136
136
|
};
|
|
137
137
|
|
|
138
|
-
var _excluded$
|
|
138
|
+
var _excluded$h = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
139
139
|
|
|
140
|
-
function ownKeys$
|
|
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
141
|
|
|
142
|
-
function _objectSpread$
|
|
142
|
+
function _objectSpread$q(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$q(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$q(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
143
143
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
144
144
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
145
145
|
function useTypographyColor() {
|
|
@@ -215,7 +215,7 @@ function Typography(_ref4) {
|
|
|
215
215
|
large = _ref4.large,
|
|
216
216
|
variant = _ref4.variant,
|
|
217
217
|
color = _ref4.color,
|
|
218
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded$
|
|
218
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded$h);
|
|
219
219
|
|
|
220
220
|
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
221
221
|
var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
|
|
@@ -232,14 +232,14 @@ function Typography(_ref4) {
|
|
|
232
232
|
var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular';
|
|
233
233
|
var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
|
|
234
234
|
value: isHeader,
|
|
235
|
-
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$
|
|
235
|
+
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$q({
|
|
236
236
|
$color: colorOrDefaultToBlack,
|
|
237
237
|
$isHeader: isHeader,
|
|
238
238
|
$typeForCurrentWindowSize: typeForCurrentWindowSize,
|
|
239
239
|
$variant: nonNullableVariant,
|
|
240
240
|
accessibilityRole: accessibilityRole || undefined
|
|
241
241
|
}, otherProps))
|
|
242
|
-
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$
|
|
242
|
+
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$q({
|
|
243
243
|
$color: colorOrDefaultToBlack,
|
|
244
244
|
$isHeader: isHeader,
|
|
245
245
|
$variant: nonNullableVariant,
|
|
@@ -252,13 +252,13 @@ function Typography(_ref4) {
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
function TypographyText(props) {
|
|
255
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
255
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$q({
|
|
256
256
|
accessibilityRole: null
|
|
257
257
|
}, props));
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
function TypographyParagraph(props) {
|
|
261
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
261
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$q({
|
|
262
262
|
accessibilityRole: "paragraph"
|
|
263
263
|
}, props));
|
|
264
264
|
}
|
|
@@ -266,7 +266,7 @@ function TypographyParagraph(props) {
|
|
|
266
266
|
var createHeading = function (level, defaultBase) {
|
|
267
267
|
// https://github.com/necolas/react-native-web/issues/401
|
|
268
268
|
function TypographyHeading(props) {
|
|
269
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
269
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$q(_objectSpread$q({
|
|
270
270
|
accessibilityRole: "header",
|
|
271
271
|
base: defaultBase
|
|
272
272
|
}, props), {}, {
|
|
@@ -302,11 +302,11 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
302
302
|
|
|
303
303
|
Typography.h5 = createHeading(5, 'header5');
|
|
304
304
|
|
|
305
|
-
var _excluded$
|
|
305
|
+
var _excluded$g = ["size", "base", "round", "light"];
|
|
306
306
|
|
|
307
|
-
function ownKeys$
|
|
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
308
|
|
|
309
|
-
function _objectSpread$
|
|
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; }
|
|
310
310
|
|
|
311
311
|
var getInitials = function (firstname, lastname) {
|
|
312
312
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
@@ -377,13 +377,13 @@ function Avatar(_ref6) {
|
|
|
377
377
|
base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
|
|
378
378
|
round = _ref6.round,
|
|
379
379
|
light = _ref6.light,
|
|
380
|
-
props = _objectWithoutProperties(_ref6, _excluded$
|
|
380
|
+
props = _objectWithoutProperties(_ref6, _excluded$g);
|
|
381
381
|
|
|
382
382
|
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
383
383
|
$size: size,
|
|
384
384
|
$isRound: round,
|
|
385
385
|
$isLight: light,
|
|
386
|
-
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$
|
|
386
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$p({
|
|
387
387
|
size: size,
|
|
388
388
|
base: base,
|
|
389
389
|
isLight: light
|
|
@@ -525,26 +525,26 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
525
525
|
return defaultPadding;
|
|
526
526
|
});
|
|
527
527
|
|
|
528
|
-
var _excluded$
|
|
528
|
+
var _excluded$f = ["color"],
|
|
529
529
|
_excluded2$2 = ["color"];
|
|
530
530
|
|
|
531
|
-
function ownKeys$
|
|
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
532
|
|
|
533
|
-
function _objectSpread$
|
|
533
|
+
function _objectSpread$o(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$o(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$o(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
534
534
|
|
|
535
535
|
function TypographyIconSpecifiedColor(_ref) {
|
|
536
536
|
var color = _ref.color,
|
|
537
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
537
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
538
538
|
|
|
539
539
|
var theme = /*#__PURE__*/useTheme();
|
|
540
|
-
return /*#__PURE__*/jsx(Icon, _objectSpread$
|
|
540
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread$o(_objectSpread$o({}, props), {}, {
|
|
541
541
|
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
542
542
|
}));
|
|
543
543
|
}
|
|
544
544
|
|
|
545
545
|
function TypographyIconInheritColor(props) {
|
|
546
546
|
var color = useTypographyColor();
|
|
547
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$
|
|
547
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$o({
|
|
548
548
|
color: color
|
|
549
549
|
}, props));
|
|
550
550
|
}
|
|
@@ -554,23 +554,23 @@ function TypographyIcon(_ref2) {
|
|
|
554
554
|
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
555
555
|
|
|
556
556
|
if (color) {
|
|
557
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$
|
|
557
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$o({
|
|
558
558
|
color: color
|
|
559
559
|
}, props));
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
-
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$
|
|
562
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$o({}, props));
|
|
563
563
|
}
|
|
564
564
|
|
|
565
565
|
function isSubtle(type) {
|
|
566
566
|
return type.startsWith('subtle');
|
|
567
567
|
}
|
|
568
568
|
|
|
569
|
-
var _excluded$
|
|
569
|
+
var _excluded$e = ["type", "isDisabled", "$isStretch", "icon", "children"];
|
|
570
570
|
|
|
571
|
-
function ownKeys$
|
|
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
572
|
|
|
573
|
-
function _objectSpread$
|
|
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; }
|
|
574
574
|
|
|
575
575
|
var getTextColorByType = function (type) {
|
|
576
576
|
switch (type) {
|
|
@@ -676,7 +676,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
676
676
|
color: isWebSubtle ? 'inherit' : color
|
|
677
677
|
};
|
|
678
678
|
return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
|
|
679
|
-
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$
|
|
679
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$n(_objectSpread$n({}, buttonIconSharedProps), {}, {
|
|
680
680
|
testID: "button-left-icon",
|
|
681
681
|
icon: icon
|
|
682
682
|
})) : null, /*#__PURE__*/jsx(StyledButtonText, {
|
|
@@ -687,7 +687,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
687
687
|
,
|
|
688
688
|
color: isWebSubtle ? undefined : color,
|
|
689
689
|
children: children
|
|
690
|
-
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$
|
|
690
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$n(_objectSpread$n({}, buttonIconSharedProps), {}, {
|
|
691
691
|
icon: icon
|
|
692
692
|
})) : null]
|
|
693
693
|
});
|
|
@@ -713,14 +713,14 @@ function ButtonContent(_ref7) {
|
|
|
713
713
|
$isStretch = _ref7.$isStretch,
|
|
714
714
|
icon = _ref7.icon,
|
|
715
715
|
children = _ref7.children,
|
|
716
|
-
props = _objectWithoutProperties(_ref7, _excluded$
|
|
716
|
+
props = _objectWithoutProperties(_ref7, _excluded$e);
|
|
717
717
|
|
|
718
718
|
var color = isDisabled ? 'black-light' : getTextColorByType(type);
|
|
719
719
|
return /*#__PURE__*/jsx(ButtonContentContainer, {
|
|
720
720
|
$isSubtle: isSubtle(type),
|
|
721
721
|
$isStretch: $isStretch,
|
|
722
722
|
$isIconOnly: Boolean(!children && icon),
|
|
723
|
-
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$
|
|
723
|
+
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$n(_objectSpread$n({
|
|
724
724
|
icon: icon,
|
|
725
725
|
type: type,
|
|
726
726
|
isDisabled: isDisabled,
|
|
@@ -857,20 +857,20 @@ var defaultOpenLinkBehavior = {
|
|
|
857
857
|
web: 'targetBlank'
|
|
858
858
|
};
|
|
859
859
|
|
|
860
|
-
var _excluded$
|
|
860
|
+
var _excluded$d = ["as", "href", "openLinkBehavior", "onPress"];
|
|
861
861
|
|
|
862
|
-
function ownKeys$
|
|
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
863
|
|
|
864
|
-
function _objectSpread$
|
|
864
|
+
function _objectSpread$m(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$m(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$m(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
865
865
|
function ExternalLink(_ref) {
|
|
866
866
|
var Component = _ref.as,
|
|
867
867
|
href = _ref.href,
|
|
868
868
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
869
869
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
870
870
|
onPress = _ref.onPress,
|
|
871
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
871
|
+
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
872
872
|
|
|
873
|
-
return /*#__PURE__*/jsx(Component, _objectSpread$
|
|
873
|
+
return /*#__PURE__*/jsx(Component, _objectSpread$m(_objectSpread$m({}, rest), {}, {
|
|
874
874
|
onPress: function handleOnPress() {
|
|
875
875
|
if (onPress) onPress();
|
|
876
876
|
if (!href) return;
|
|
@@ -1646,9 +1646,9 @@ function DatePickerInputPart(_ref4) {
|
|
|
1646
1646
|
});
|
|
1647
1647
|
}
|
|
1648
1648
|
|
|
1649
|
-
function ownKeys$
|
|
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
1650
|
|
|
1651
|
-
function _objectSpread$
|
|
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
1652
|
|
|
1653
1653
|
function prefixWithZero(value) {
|
|
1654
1654
|
return "".concat(value).padStart(2, '0');
|
|
@@ -1703,14 +1703,14 @@ function DatePickerInputs(_ref4) {
|
|
|
1703
1703
|
onPress: handleModalOpen,
|
|
1704
1704
|
children: [/*#__PURE__*/jsx(PartContainer, {
|
|
1705
1705
|
$isStretch: stretch,
|
|
1706
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$
|
|
1706
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$l(_objectSpread$l({}, sharedPartProps), {}, {
|
|
1707
1707
|
partName: "day",
|
|
1708
1708
|
value: currentValue ? prefixWithZero(currentValue.getDate()) : undefined,
|
|
1709
1709
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day
|
|
1710
1710
|
}))
|
|
1711
1711
|
}), /*#__PURE__*/jsx(PartContainer, {
|
|
1712
1712
|
$isStretch: stretch,
|
|
1713
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$
|
|
1713
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$l(_objectSpread$l({}, sharedPartProps), {}, {
|
|
1714
1714
|
partName: "month",
|
|
1715
1715
|
value: currentValue ? prefixWithZero(currentValue.getMonth() + 1) : undefined,
|
|
1716
1716
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month
|
|
@@ -1718,7 +1718,7 @@ function DatePickerInputs(_ref4) {
|
|
|
1718
1718
|
}), /*#__PURE__*/jsx(PartContainer, {
|
|
1719
1719
|
$isLast: true,
|
|
1720
1720
|
$isStretch: stretch,
|
|
1721
|
-
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$
|
|
1721
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$l(_objectSpread$l({}, sharedPartProps), {}, {
|
|
1722
1722
|
partName: "year",
|
|
1723
1723
|
value: currentValue ? currentValue.getFullYear() : undefined,
|
|
1724
1724
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year
|
|
@@ -1727,37 +1727,28 @@ function DatePickerInputs(_ref4) {
|
|
|
1727
1727
|
});
|
|
1728
1728
|
}
|
|
1729
1729
|
|
|
1730
|
-
var _excluded$
|
|
1730
|
+
var _excluded$c = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "setIsFocused", "currentValue", "setCurrentValue", "onChange", "isFocused"];
|
|
1731
1731
|
|
|
1732
|
-
function ownKeys$
|
|
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
1733
|
|
|
1734
|
-
function _objectSpread$
|
|
1735
|
-
function
|
|
1736
|
-
var
|
|
1737
|
-
pickerUITestID = _ref.pickerUITestID;
|
|
1738
|
-
_ref.pickerUITitle;
|
|
1739
|
-
_ref.pickerUIValidateButtonLabel;
|
|
1740
|
-
var pickerDefaultDate = _ref.pickerDefaultDate,
|
|
1741
|
-
_onChange = _ref.onChange,
|
|
1734
|
+
function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$k(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$k(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1735
|
+
function DatePickerAndroid(_ref) {
|
|
1736
|
+
var onBlur = _ref.onBlur,
|
|
1742
1737
|
onFocus = _ref.onFocus,
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
var _useState3 = useState(false),
|
|
1752
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
1753
|
-
isFocused = _useState4[0],
|
|
1754
|
-
setIsFocused = _useState4[1];
|
|
1738
|
+
pickerDefaultDate = _ref.pickerDefaultDate,
|
|
1739
|
+
pickerUITestID = _ref.pickerUITestID,
|
|
1740
|
+
setIsFocused = _ref.setIsFocused,
|
|
1741
|
+
currentValue = _ref.currentValue,
|
|
1742
|
+
setCurrentValue = _ref.setCurrentValue,
|
|
1743
|
+
_onChange = _ref.onChange,
|
|
1744
|
+
isFocused = _ref.isFocused,
|
|
1745
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
1755
1746
|
|
|
1756
1747
|
var handleClose = function () {
|
|
1757
1748
|
if (onBlur) onBlur();
|
|
1758
1749
|
};
|
|
1759
1750
|
|
|
1760
|
-
return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread$
|
|
1751
|
+
return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread$k({
|
|
1761
1752
|
handleModalOpen: function handleModalOpen() {
|
|
1762
1753
|
setIsFocused(true);
|
|
1763
1754
|
if (onFocus) onFocus();
|
|
@@ -1785,228 +1776,804 @@ function DatePicker(_ref) {
|
|
|
1785
1776
|
}, props));
|
|
1786
1777
|
}
|
|
1787
1778
|
|
|
1788
|
-
var
|
|
1789
|
-
displayName: "InputTextContainer"
|
|
1790
|
-
})(["position:relative;"]);
|
|
1791
|
-
|
|
1792
|
-
var _excluded$9 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
1793
|
-
|
|
1794
|
-
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; }
|
|
1795
|
-
|
|
1796
|
-
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; }
|
|
1797
|
-
var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
1798
|
-
displayName: "InputText__StyledTextInput"
|
|
1799
|
-
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
1800
|
-
var theme = _ref.theme,
|
|
1801
|
-
multiline = _ref.multiline;
|
|
1802
|
-
|
|
1803
|
-
if (!multiline && Platform.OS === 'ios') {
|
|
1804
|
-
return theme.kitt.forms.input.padding.iOSSingleLine;
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
return theme.kitt.forms.input.padding["default"];
|
|
1808
|
-
}, function (_ref2) {
|
|
1809
|
-
var theme = _ref2.theme,
|
|
1810
|
-
multiline = _ref2.multiline;
|
|
1811
|
-
if (!multiline && Platform.OS === 'ios') return 0;
|
|
1812
|
-
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
1813
|
-
return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight, "px");
|
|
1814
|
-
}, function (_ref3) {
|
|
1815
|
-
var $minHeight = _ref3.$minHeight;
|
|
1816
|
-
return $minHeight;
|
|
1817
|
-
});
|
|
1818
|
-
var RightInputContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1819
|
-
displayName: "InputText__RightInputContainer"
|
|
1820
|
-
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:10px;"]);
|
|
1821
|
-
var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
1822
|
-
var id = _ref4.id,
|
|
1823
|
-
right = _ref4.right,
|
|
1824
|
-
_ref4$minHeight = _ref4.minHeight,
|
|
1825
|
-
minHeight = _ref4$minHeight === void 0 ? 0 : _ref4$minHeight,
|
|
1826
|
-
formState = _ref4.state,
|
|
1827
|
-
internalForceState = _ref4.internalForceState,
|
|
1828
|
-
_ref4$disabled = _ref4.disabled,
|
|
1829
|
-
disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
|
|
1830
|
-
_ref4$autoCorrect = _ref4.autoCorrect,
|
|
1831
|
-
autoCorrect = _ref4$autoCorrect === void 0 ? true : _ref4$autoCorrect,
|
|
1832
|
-
_ref4$textContentType = _ref4.textContentType,
|
|
1833
|
-
textContentType = _ref4$textContentType === void 0 ? 'none' : _ref4$textContentType,
|
|
1834
|
-
_ref4$autoCompleteTyp = _ref4.autoCompleteType,
|
|
1835
|
-
autoCompleteType = _ref4$autoCompleteTyp === void 0 ? 'off' : _ref4$autoCompleteTyp,
|
|
1836
|
-
_ref4$keyboardType = _ref4.keyboardType,
|
|
1837
|
-
keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
|
|
1838
|
-
_onFocus = _ref4.onFocus,
|
|
1839
|
-
_onBlur = _ref4.onBlur,
|
|
1840
|
-
props = _objectWithoutProperties(_ref4, _excluded$9);
|
|
1841
|
-
|
|
1842
|
-
var theme = /*#__PURE__*/useTheme();
|
|
1843
|
-
|
|
1844
|
-
var _useState = useState(false),
|
|
1845
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1846
|
-
isFocused = _useState2[0],
|
|
1847
|
-
setIsFocused = _useState2[1];
|
|
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; }
|
|
1848
1780
|
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
ref: ref,
|
|
1858
|
-
nativeID: id,
|
|
1859
|
-
editable: !disabled,
|
|
1860
|
-
keyboardType: keyboardType,
|
|
1861
|
-
autoCompleteType: autoCompleteType,
|
|
1862
|
-
autoCorrect: autoCorrect,
|
|
1863
|
-
$minHeight: minHeight,
|
|
1864
|
-
textContentType: textContentType,
|
|
1865
|
-
placeholderTextColor: theme.kitt.forms.input.color.placeholder,
|
|
1866
|
-
selectionColor: theme.kitt.forms.input.color.selection
|
|
1867
|
-
}, props), {}, {
|
|
1868
|
-
$state: state,
|
|
1869
|
-
onFocus: function onFocus(e) {
|
|
1870
|
-
setIsFocused(true);
|
|
1871
|
-
if (_onFocus) _onFocus(e);
|
|
1872
|
-
},
|
|
1873
|
-
onBlur: function onBlur(e) {
|
|
1874
|
-
setIsFocused(false);
|
|
1875
|
-
if (_onBlur) _onBlur(e);
|
|
1876
|
-
}
|
|
1877
|
-
})), right ? /*#__PURE__*/jsx(RightInputContainer, {
|
|
1878
|
-
children: right
|
|
1879
|
-
}) : null]
|
|
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
|
+
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
1783
|
+
var OverlayPressable = /*#__PURE__*/styled(Pressable).withConfig({
|
|
1784
|
+
displayName: "Overlay__OverlayPressable"
|
|
1785
|
+
})(function (_ref) {
|
|
1786
|
+
var theme = _ref.theme;
|
|
1787
|
+
return _objectSpread$j(_objectSpread$j({}, StyleSheet.absoluteFillObject), {}, {
|
|
1788
|
+
backgroundColor: theme.kitt.colors.overlay.dark
|
|
1880
1789
|
});
|
|
1881
1790
|
});
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
keyboardType: "email-address",
|
|
1890
|
-
textContentType: "emailAddress",
|
|
1891
|
-
autoCapitalize: "none"
|
|
1892
|
-
}, props));
|
|
1791
|
+
function Overlay(_ref2) {
|
|
1792
|
+
var onPress = _ref2.onPress;
|
|
1793
|
+
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
1794
|
+
accessibilityRole: "none",
|
|
1795
|
+
onPress: onPress,
|
|
1796
|
+
children: /*#__PURE__*/jsx(View, {})
|
|
1797
|
+
});
|
|
1893
1798
|
}
|
|
1894
1799
|
|
|
1895
|
-
var
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
return /*#__PURE__*/jsx(Typography.Text, {
|
|
1911
|
-
base: "body-small",
|
|
1912
|
-
color: getColorFromState(state),
|
|
1913
|
-
testID: testID,
|
|
1914
|
-
children: children
|
|
1800
|
+
var BodyView = /*#__PURE__*/styled.View.withConfig({
|
|
1801
|
+
displayName: "Body__BodyView"
|
|
1802
|
+
})(["padding:", "px ", "px;"], function (_ref) {
|
|
1803
|
+
var theme = _ref.theme;
|
|
1804
|
+
return theme.kitt.spacing * 6;
|
|
1805
|
+
}, function (_ref2) {
|
|
1806
|
+
var theme = _ref2.theme;
|
|
1807
|
+
return theme.kitt.spacing * 4;
|
|
1808
|
+
});
|
|
1809
|
+
function ModalBody(_ref3) {
|
|
1810
|
+
var children = _ref3.children;
|
|
1811
|
+
return /*#__PURE__*/jsx(ScrollView, {
|
|
1812
|
+
children: /*#__PURE__*/jsx(BodyView, {
|
|
1813
|
+
children: children
|
|
1814
|
+
})
|
|
1915
1815
|
});
|
|
1916
1816
|
}
|
|
1917
1817
|
|
|
1918
|
-
var
|
|
1919
|
-
displayName: "
|
|
1920
|
-
})(["
|
|
1921
|
-
var FeedbackContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1922
|
-
displayName: "InputField__FeedbackContainer"
|
|
1923
|
-
})(["", ";"], function (_ref) {
|
|
1818
|
+
var FooterView = /*#__PURE__*/styled.View.withConfig({
|
|
1819
|
+
displayName: "Footer__FooterView"
|
|
1820
|
+
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
1924
1821
|
var theme = _ref.theme;
|
|
1925
|
-
return theme.
|
|
1926
|
-
|
|
1927
|
-
}, 'padding-top: 10px', 'padding-top: 5px');
|
|
1928
|
-
});
|
|
1929
|
-
var FieldLabelContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1930
|
-
displayName: "InputField__FieldLabelContainer"
|
|
1931
|
-
})(["flex-direction:row;align-items:center;padding-bottom:", "px;"], function (_ref2) {
|
|
1822
|
+
return theme.kitt.spacing * 4;
|
|
1823
|
+
}, function (_ref2) {
|
|
1932
1824
|
var theme = _ref2.theme;
|
|
1933
|
-
return theme.kitt.
|
|
1934
|
-
});
|
|
1935
|
-
var LabelContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1936
|
-
displayName: "InputField__LabelContainer"
|
|
1937
|
-
})(["margin-right:", "px;"], function (_ref3) {
|
|
1938
|
-
var theme = _ref3.theme;
|
|
1939
|
-
return theme.kitt.forms.inputField.iconMarginLeft;
|
|
1825
|
+
return theme.kitt.colors.separator;
|
|
1940
1826
|
});
|
|
1941
|
-
function
|
|
1942
|
-
var
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
feedback = _ref4.feedback;
|
|
1946
|
-
return /*#__PURE__*/jsxs(FieldContainer, {
|
|
1947
|
-
children: [label ? /*#__PURE__*/jsxs(FieldLabelContainer, {
|
|
1948
|
-
children: [/*#__PURE__*/jsx(LabelContainer, {
|
|
1949
|
-
children: label
|
|
1950
|
-
}), labelFeedback]
|
|
1951
|
-
}) : null, input, feedback ? /*#__PURE__*/jsx(FeedbackContainer, {
|
|
1952
|
-
children: feedback
|
|
1953
|
-
}) : null]
|
|
1827
|
+
function ModalFooter(_ref3) {
|
|
1828
|
+
var children = _ref3.children;
|
|
1829
|
+
return /*#__PURE__*/jsx(FooterView, {
|
|
1830
|
+
children: children
|
|
1954
1831
|
});
|
|
1955
1832
|
}
|
|
1956
1833
|
|
|
1957
|
-
|
|
1958
|
-
if (disabled) return 'black-light';
|
|
1834
|
+
var _excluded$b = ["as", "children"];
|
|
1959
1835
|
|
|
1960
|
-
|
|
1961
|
-
case 'invalid':
|
|
1962
|
-
return 'danger';
|
|
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; }
|
|
1963
1837
|
|
|
1964
|
-
|
|
1965
|
-
|
|
1838
|
+
function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$i(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$i(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1839
|
+
function StyleWebWrapper(_ref) {
|
|
1840
|
+
var as = _ref.as,
|
|
1841
|
+
children = _ref.children,
|
|
1842
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
1966
1843
|
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
}
|
|
1844
|
+
if (Platform.OS !== 'web') return children;
|
|
1845
|
+
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
1846
|
+
return /*#__PURE__*/jsx(as || 'div', _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
1847
|
+
children: children
|
|
1848
|
+
}));
|
|
1970
1849
|
}
|
|
1971
1850
|
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1851
|
+
var _excluded$a = ["color", "disabled"];
|
|
1852
|
+
|
|
1853
|
+
function ownKeys$h(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1854
|
+
|
|
1855
|
+
function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$h(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1856
|
+
var PressableIconButtonWebWrapper = undefined;
|
|
1857
|
+
var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1858
|
+
displayName: "PressableIconButton__StyledPressableIconButton"
|
|
1859
|
+
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref) {
|
|
1860
|
+
var theme = _ref.theme;
|
|
1861
|
+
return theme.kitt.iconButton.borderRadius;
|
|
1862
|
+
}, function (_ref2) {
|
|
1863
|
+
var theme = _ref2.theme;
|
|
1864
|
+
return theme.kitt.iconButton.width;
|
|
1865
|
+
}, function (_ref3) {
|
|
1866
|
+
var theme = _ref3.theme;
|
|
1867
|
+
return theme.kitt.iconButton.height;
|
|
1868
|
+
}, function (_ref4) {
|
|
1869
|
+
var theme = _ref4.theme,
|
|
1870
|
+
disabled = _ref4.disabled;
|
|
1871
|
+
var iconButton = theme.kitt.iconButton;
|
|
1872
|
+
|
|
1873
|
+
if (Platform.OS !== 'web') {
|
|
1874
|
+
return undefined;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
var transition = iconButton.transition;
|
|
1878
|
+
|
|
1879
|
+
if (disabled) {
|
|
1880
|
+
return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
|
|
1884
|
+
});
|
|
1885
|
+
function PressableIconButton(_ref5) {
|
|
1886
|
+
var color = _ref5.color,
|
|
1887
|
+
disabled = _ref5.disabled,
|
|
1888
|
+
props = _objectWithoutProperties(_ref5, _excluded$a);
|
|
1889
|
+
|
|
1890
|
+
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
1891
|
+
as: PressableIconButtonWebWrapper,
|
|
1892
|
+
$isWhite: color === 'white',
|
|
1893
|
+
$isDisabled: Boolean(disabled),
|
|
1894
|
+
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$h(_objectSpread$h({}, props), {}, {
|
|
1895
|
+
disabled: disabled
|
|
1896
|
+
}))
|
|
1897
|
+
});
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated$1.View).withConfig({
|
|
1901
|
+
displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground"
|
|
1902
|
+
})(["background-color:", ";border-radius:", "px;width:", "px;height:", "px;position:absolute;bottom:0;left:0;"], function (_ref) {
|
|
1903
|
+
var theme = _ref.theme,
|
|
1904
|
+
color = _ref.color,
|
|
1905
|
+
disabled = _ref.disabled;
|
|
1906
|
+
var iconButton = theme.kitt.iconButton;
|
|
1907
|
+
if (disabled) return iconButton.disabled.backgroundColor;
|
|
1908
|
+
if (color === 'white') return iconButton.white.pressedBackgroundColor;
|
|
1909
|
+
return iconButton["default"].pressedBackgroundColor;
|
|
1910
|
+
}, function (_ref2) {
|
|
1911
|
+
var theme = _ref2.theme;
|
|
1912
|
+
return theme.kitt.iconButton.borderRadius;
|
|
1913
|
+
}, function (_ref3) {
|
|
1914
|
+
var theme = _ref3.theme;
|
|
1915
|
+
return theme.kitt.iconButton.width;
|
|
1916
|
+
}, function (_ref4) {
|
|
1917
|
+
var theme = _ref4.theme;
|
|
1918
|
+
return theme.kitt.iconButton.height;
|
|
1919
|
+
});
|
|
1920
|
+
var AnimatedViewContainer = /*#__PURE__*/styled(Animated$1.View).withConfig({
|
|
1921
|
+
displayName: "PressableAnimatedContainer__AnimatedViewContainer"
|
|
1922
|
+
})(["position:relative;align-items:center;justify-content:center;width:100%;height:100%;"]);
|
|
1923
|
+
function PressableAnimatedContainer(_ref5) {
|
|
1924
|
+
var disabled = _ref5.disabled,
|
|
1925
|
+
_ref5$color = _ref5.color,
|
|
1926
|
+
color = _ref5$color === void 0 ? 'black' : _ref5$color,
|
|
1927
|
+
testID = _ref5.testID,
|
|
1928
|
+
_ref5$accessibilityRo = _ref5.accessibilityRole,
|
|
1929
|
+
accessibilityRole = _ref5$accessibilityRo === void 0 ? 'button' : _ref5$accessibilityRo,
|
|
1930
|
+
accessibilityLabel = _ref5.accessibilityLabel,
|
|
1931
|
+
children = _ref5.children,
|
|
1932
|
+
onPress = _ref5.onPress;
|
|
1933
|
+
var theme = /*#__PURE__*/useTheme();
|
|
1934
|
+
var pressed = useSharedValue(false);
|
|
1935
|
+
var opacityStyles = useAnimatedStyle(function () {
|
|
1936
|
+
var _f = function () {
|
|
1937
|
+
return {
|
|
1938
|
+
opacity: withSpring(pressed.value ? 1 : 0)
|
|
1939
|
+
};
|
|
1940
|
+
};
|
|
1941
|
+
|
|
1942
|
+
_f._closure = {
|
|
1943
|
+
withSpring: withSpring,
|
|
1944
|
+
pressed: pressed
|
|
1945
|
+
};
|
|
1946
|
+
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1947
|
+
_f.__workletHash = 10645190329247;
|
|
1948
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (60:41)";
|
|
1949
|
+
_f.__optimalization = 2;
|
|
1950
|
+
|
|
1951
|
+
global.__reanimatedWorkletInit(_f);
|
|
1952
|
+
|
|
1953
|
+
return _f;
|
|
1954
|
+
}());
|
|
1955
|
+
var scaleStyles = useAnimatedStyle(function () {
|
|
1956
|
+
var _f = function () {
|
|
1957
|
+
return {
|
|
1958
|
+
transform: [{
|
|
1959
|
+
scale: withSpring(pressed.value ? theme.kitt.iconButton.scale.base.active : theme.kitt.iconButton.scale.base["default"])
|
|
1960
|
+
}]
|
|
1961
|
+
};
|
|
1962
|
+
};
|
|
1963
|
+
|
|
1964
|
+
_f._closure = {
|
|
1965
|
+
withSpring: withSpring,
|
|
1966
|
+
pressed: pressed,
|
|
1967
|
+
theme: {
|
|
1968
|
+
kitt: {
|
|
1969
|
+
iconButton: {
|
|
1970
|
+
scale: {
|
|
1971
|
+
base: {
|
|
1972
|
+
active: theme.kitt.iconButton.scale.base.active,
|
|
1973
|
+
"default": theme.kitt.iconButton.scale.base["default"]
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
};
|
|
1980
|
+
_f.asString = "function _f(){const{withSpring,pressed,theme}=jsThis._closure;{return{transform:[{scale:withSpring(pressed.value?theme.kitt.iconButton.scale.base.active:theme.kitt.iconButton.scale.base.default)}]};}}";
|
|
1981
|
+
_f.__workletHash = 13861998831411;
|
|
1982
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (66:39)";
|
|
1983
|
+
_f.__optimalization = 2;
|
|
1984
|
+
|
|
1985
|
+
global.__reanimatedWorkletInit(_f);
|
|
1986
|
+
|
|
1987
|
+
return _f;
|
|
1988
|
+
}());
|
|
1989
|
+
return /*#__PURE__*/jsx(PressableIconButton, {
|
|
1990
|
+
accessibilityRole: accessibilityRole,
|
|
1991
|
+
disabled: disabled,
|
|
1992
|
+
color: color,
|
|
1993
|
+
testID: testID,
|
|
1994
|
+
accessibilityLabel: accessibilityLabel,
|
|
1995
|
+
onPress: onPress,
|
|
1996
|
+
onPressIn: function onPressIn() {
|
|
1997
|
+
pressed.value = true;
|
|
1998
|
+
},
|
|
1999
|
+
onPressOut: function onPressOut() {
|
|
2000
|
+
pressed.value = false;
|
|
2001
|
+
},
|
|
2002
|
+
children: /*#__PURE__*/jsxs(AnimatedViewContainer, {
|
|
2003
|
+
style: disabled ? [{
|
|
2004
|
+
transform: [{
|
|
2005
|
+
scale: 1
|
|
2006
|
+
}]
|
|
2007
|
+
}] : [scaleStyles],
|
|
2008
|
+
children: [/*#__PURE__*/jsx(AnimatedIconButtonBackground, {
|
|
2009
|
+
disabled: disabled,
|
|
2010
|
+
color: color,
|
|
2011
|
+
style: disabled ? [{
|
|
2012
|
+
opacity: 1
|
|
2013
|
+
}] : [opacityStyles]
|
|
2014
|
+
}), children]
|
|
2015
|
+
})
|
|
2016
|
+
});
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
var IconButtonContentBorder = /*#__PURE__*/styled.View.withConfig({
|
|
2020
|
+
displayName: "IconButton__IconButtonContentBorder"
|
|
2021
|
+
})(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
|
|
2022
|
+
var theme = _ref.theme;
|
|
2023
|
+
return "".concat(theme.kitt.iconButton.borderWidth, "px solid");
|
|
2024
|
+
}, function (_ref2) {
|
|
2025
|
+
var theme = _ref2.theme,
|
|
2026
|
+
disabled = _ref2.disabled;
|
|
2027
|
+
return disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor;
|
|
2028
|
+
}, function (_ref3) {
|
|
2029
|
+
var theme = _ref3.theme;
|
|
2030
|
+
return theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth;
|
|
2031
|
+
}, function (_ref4) {
|
|
2032
|
+
var theme = _ref4.theme;
|
|
2033
|
+
return theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth;
|
|
2034
|
+
}, function (_ref5) {
|
|
2035
|
+
var theme = _ref5.theme;
|
|
2036
|
+
return theme.kitt.iconButton.borderRadius;
|
|
2037
|
+
});
|
|
2038
|
+
|
|
2039
|
+
function IconButtonContent(_ref6) {
|
|
2040
|
+
var disabled = _ref6.disabled,
|
|
2041
|
+
color = _ref6.color,
|
|
2042
|
+
icon = _ref6.icon;
|
|
2043
|
+
return /*#__PURE__*/jsx(IconButtonContentBorder, {
|
|
2044
|
+
disabled: disabled,
|
|
2045
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
2046
|
+
color: disabled ? 'black-light' : color,
|
|
2047
|
+
icon: icon
|
|
2048
|
+
})
|
|
2049
|
+
});
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
function IconButton(_ref7) {
|
|
2053
|
+
var icon = _ref7.icon,
|
|
2054
|
+
color = _ref7.color,
|
|
2055
|
+
disabled = _ref7.disabled,
|
|
2056
|
+
testID = _ref7.testID,
|
|
2057
|
+
accessibilityLabel = _ref7.accessibilityLabel,
|
|
2058
|
+
accessibilityRole = _ref7.accessibilityRole,
|
|
2059
|
+
onPress = _ref7.onPress;
|
|
2060
|
+
return /*#__PURE__*/jsx(PressableAnimatedContainer, {
|
|
2061
|
+
color: color,
|
|
2062
|
+
disabled: disabled,
|
|
2063
|
+
testID: testID,
|
|
2064
|
+
accessibilityLabel: accessibilityLabel,
|
|
2065
|
+
accessibilityRole: accessibilityRole,
|
|
2066
|
+
onPress: onPress,
|
|
2067
|
+
children: /*#__PURE__*/jsx(IconButtonContent, {
|
|
2068
|
+
disabled: disabled,
|
|
2069
|
+
color: color,
|
|
2070
|
+
icon: icon
|
|
2071
|
+
})
|
|
2072
|
+
});
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
2076
|
+
|
|
2077
|
+
var HeaderView = /*#__PURE__*/styled.View.withConfig({
|
|
2078
|
+
displayName: "Header__HeaderView"
|
|
2079
|
+
})(["position:relative;padding:", "px;display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;align-items:center;border-bottom-width:1px;border-bottom-color:", ";min-height:57px;"], function (_ref) {
|
|
2080
|
+
var theme = _ref.theme;
|
|
2081
|
+
return theme.kitt.spacing * 2;
|
|
2082
|
+
}, function (_ref2) {
|
|
2083
|
+
var theme = _ref2.theme;
|
|
2084
|
+
return theme.kitt.colors.separator;
|
|
2085
|
+
});
|
|
2086
|
+
var LeftIconView = /*#__PURE__*/styled.View.withConfig({
|
|
2087
|
+
displayName: "Header__LeftIconView"
|
|
2088
|
+
})(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
|
|
2089
|
+
var theme = _ref3.theme;
|
|
2090
|
+
return theme.kitt.spacing * 2;
|
|
2091
|
+
});
|
|
2092
|
+
var RightIconView = /*#__PURE__*/styled.View.withConfig({
|
|
2093
|
+
displayName: "Header__RightIconView"
|
|
2094
|
+
})(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
|
|
2095
|
+
var theme = _ref4.theme;
|
|
2096
|
+
return theme.kitt.spacing * 2;
|
|
2097
|
+
});
|
|
2098
|
+
var TitleView = /*#__PURE__*/styled.View.withConfig({
|
|
2099
|
+
displayName: "Header__TitleView"
|
|
2100
|
+
})(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
|
|
2101
|
+
var theme = _ref5.theme,
|
|
2102
|
+
isIconLeft = _ref5.isIconLeft;
|
|
2103
|
+
return isIconLeft ? 0 : theme.kitt.spacing * 2;
|
|
2104
|
+
});
|
|
2105
|
+
function ModalHeader(_ref6) {
|
|
2106
|
+
var left = _ref6.left,
|
|
2107
|
+
right = _ref6.right,
|
|
2108
|
+
children = _ref6.children;
|
|
2109
|
+
var onClose = useContext(OnCloseContext);
|
|
2110
|
+
var isIconLeft = !!left;
|
|
2111
|
+
return /*#__PURE__*/jsxs(HeaderView, {
|
|
2112
|
+
children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
|
|
2113
|
+
children: left
|
|
2114
|
+
}), /*#__PURE__*/jsx(TitleView, {
|
|
2115
|
+
isIconLeft: isIconLeft,
|
|
2116
|
+
children: children
|
|
2117
|
+
}), right !== undefined ? right : /*#__PURE__*/jsx(RightIconView, {
|
|
2118
|
+
children: /*#__PURE__*/jsx(IconButton, {
|
|
2119
|
+
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
2120
|
+
onPress: onClose
|
|
2121
|
+
})
|
|
2122
|
+
})]
|
|
2123
|
+
});
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
var ModalView = /*#__PURE__*/styled.View.withConfig({
|
|
2127
|
+
displayName: "Modal__ModalView"
|
|
2128
|
+
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
|
|
2129
|
+
var theme = _ref.theme;
|
|
2130
|
+
return theme.kitt.spacing * 20;
|
|
2131
|
+
}, function (_ref2) {
|
|
2132
|
+
var theme = _ref2.theme;
|
|
2133
|
+
return theme.kitt.spacing * 4;
|
|
2134
|
+
});
|
|
2135
|
+
var ContentView$1 = /*#__PURE__*/styled.View.withConfig({
|
|
2136
|
+
displayName: "Modal__ContentView"
|
|
2137
|
+
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], function (_ref3) {
|
|
2138
|
+
var theme = _ref3.theme;
|
|
2139
|
+
return theme.kitt.card.borderRadius;
|
|
2140
|
+
}, function (_ref4) {
|
|
2141
|
+
var theme = _ref4.theme;
|
|
2142
|
+
return theme.kitt.colors.uiBackgroundLight;
|
|
2143
|
+
});
|
|
2144
|
+
function Modal(_ref5) {
|
|
2145
|
+
var visible = _ref5.visible,
|
|
2146
|
+
children = _ref5.children,
|
|
2147
|
+
onClose = _ref5.onClose,
|
|
2148
|
+
onEntered = _ref5.onEntered,
|
|
2149
|
+
onExited = _ref5.onExited;
|
|
2150
|
+
return /*#__PURE__*/jsx(OnCloseContext.Provider, {
|
|
2151
|
+
value: onClose,
|
|
2152
|
+
children: /*#__PURE__*/jsx(Modal$1, {
|
|
2153
|
+
transparent: true,
|
|
2154
|
+
animationType: "fade",
|
|
2155
|
+
visible: visible,
|
|
2156
|
+
onShow: onEntered,
|
|
2157
|
+
onDismiss: onExited,
|
|
2158
|
+
onRequestClose: onClose,
|
|
2159
|
+
children: /*#__PURE__*/jsxs(ModalView, {
|
|
2160
|
+
children: [/*#__PURE__*/jsx(Overlay, {
|
|
2161
|
+
onPress: onClose
|
|
2162
|
+
}), /*#__PURE__*/jsx(ContentView$1, {
|
|
2163
|
+
children: children
|
|
2164
|
+
})]
|
|
2165
|
+
})
|
|
2166
|
+
})
|
|
2167
|
+
});
|
|
2168
|
+
}
|
|
2169
|
+
Modal.Header = ModalHeader;
|
|
2170
|
+
Modal.Body = ModalBody;
|
|
2171
|
+
Modal.Footer = ModalFooter;
|
|
2172
|
+
|
|
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
|
+
function getDatePickerDisplayMode() {
|
|
2178
|
+
if (Platform.OS === 'android') return 'calendar';
|
|
2179
|
+
if (Platform.OS === 'ios') return 'spinner';
|
|
2180
|
+
return 'default';
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
function PlatformDateTimePicker(_ref) {
|
|
2184
|
+
var value = _ref.value,
|
|
2185
|
+
_ref$defaultDate = _ref.defaultDate,
|
|
2186
|
+
defaultDate = _ref$defaultDate === void 0 ? new Date() : _ref$defaultDate,
|
|
2187
|
+
maximumDate = _ref.maximumDate,
|
|
2188
|
+
minimuDate = _ref.minimuDate,
|
|
2189
|
+
testID = _ref.testID,
|
|
2190
|
+
_onChange = _ref.onChange;
|
|
2191
|
+
var theme = /*#__PURE__*/useTheme();
|
|
2192
|
+
var displayMode = getDatePickerDisplayMode();
|
|
2193
|
+
var iosProps = Platform.OS === 'ios' ? {
|
|
2194
|
+
textColor: theme.kitt.colors.primary
|
|
2195
|
+
} : {};
|
|
2196
|
+
return /*#__PURE__*/jsx(DateTimePicker, _objectSpread$g(_objectSpread$g({
|
|
2197
|
+
is24Hour: true,
|
|
2198
|
+
testID: testID,
|
|
2199
|
+
value: value || defaultDate,
|
|
2200
|
+
mode: "date",
|
|
2201
|
+
maximumDate: maximumDate,
|
|
2202
|
+
minimumDate: minimuDate,
|
|
2203
|
+
display: displayMode
|
|
2204
|
+
}, iosProps), {}, {
|
|
2205
|
+
onChange: function onChange(_event, date) {
|
|
2206
|
+
return _onChange(date);
|
|
2207
|
+
}
|
|
2208
|
+
}));
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
var _excluded$9 = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
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; }
|
|
2216
|
+
|
|
2217
|
+
function ModalTitle(_ref) {
|
|
2218
|
+
var children = _ref.children;
|
|
2219
|
+
return /*#__PURE__*/jsx(Modal.Header, {
|
|
2220
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
2221
|
+
base: "body",
|
|
2222
|
+
variant: "bold",
|
|
2223
|
+
children: children
|
|
2224
|
+
})
|
|
2225
|
+
});
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
function ModalPlatformDateTimePicker(_ref2) {
|
|
2229
|
+
var title = _ref2.title,
|
|
2230
|
+
isVisible = _ref2.isVisible,
|
|
2231
|
+
value = _ref2.value,
|
|
2232
|
+
validateButtonLabel = _ref2.validateButtonLabel,
|
|
2233
|
+
onClose = _ref2.onClose,
|
|
2234
|
+
onChange = _ref2.onChange,
|
|
2235
|
+
props = _objectWithoutProperties(_ref2, _excluded$9);
|
|
2236
|
+
|
|
2237
|
+
var _useState = useState(value),
|
|
2238
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2239
|
+
currentValue = _useState2[0],
|
|
2240
|
+
setCurrentValue = _useState2[1]; // Prevent unsynced value between the modal and its parent state
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
return /*#__PURE__*/jsx(Modal, {
|
|
2244
|
+
visible: Boolean(isVisible),
|
|
2245
|
+
onClose: function handleClose() {
|
|
2246
|
+
setCurrentValue(value);
|
|
2247
|
+
onClose();
|
|
2248
|
+
},
|
|
2249
|
+
children: isVisible ? /*#__PURE__*/jsxs(Fragment, {
|
|
2250
|
+
children: [title ? /*#__PURE__*/jsx(ModalTitle, {
|
|
2251
|
+
children: title
|
|
2252
|
+
}) : null, /*#__PURE__*/jsx(Modal.Body, {
|
|
2253
|
+
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread$f(_objectSpread$f({}, props), {}, {
|
|
2254
|
+
value: currentValue,
|
|
2255
|
+
onChange: function handleChange(newDate) {
|
|
2256
|
+
setCurrentValue(function (prev) {
|
|
2257
|
+
return newDate || prev;
|
|
2258
|
+
});
|
|
2259
|
+
}
|
|
2260
|
+
}))
|
|
2261
|
+
}), /*#__PURE__*/jsx(Modal.Footer, {
|
|
2262
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
2263
|
+
stretch: true,
|
|
2264
|
+
type: "primary",
|
|
2265
|
+
onPress: function handleSubmit() {
|
|
2266
|
+
onChange(currentValue);
|
|
2267
|
+
},
|
|
2268
|
+
children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
|
|
2269
|
+
children: validateButtonLabel
|
|
2270
|
+
}) : /*#__PURE__*/jsx(FormattedMessage, {
|
|
2271
|
+
id: "kitt-universal.ModalDateTimePicker.confirm"
|
|
2272
|
+
})
|
|
2273
|
+
})
|
|
2274
|
+
})]
|
|
2275
|
+
}) : null
|
|
2276
|
+
});
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
var _excluded$8 = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "onChange", "onFocus", "onBlur", "pickerDefaultDate"];
|
|
2280
|
+
|
|
2281
|
+
function ownKeys$e(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2282
|
+
|
|
2283
|
+
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$e(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2284
|
+
function DatePicker(_ref) {
|
|
2285
|
+
var value = _ref.value,
|
|
2286
|
+
pickerUITestID = _ref.pickerUITestID,
|
|
2287
|
+
pickerUITitle = _ref.pickerUITitle,
|
|
2288
|
+
pickerUIValidateButtonLabel = _ref.pickerUIValidateButtonLabel,
|
|
2289
|
+
onChange = _ref.onChange,
|
|
2290
|
+
onFocus = _ref.onFocus,
|
|
2291
|
+
onBlur = _ref.onBlur,
|
|
2292
|
+
pickerDefaultDate = _ref.pickerDefaultDate,
|
|
2293
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
2294
|
+
|
|
2295
|
+
var _useState = useState(false),
|
|
2296
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2297
|
+
isPickerUIVisible = _useState2[0],
|
|
2298
|
+
setIsPickerUIVisible = _useState2[1];
|
|
2299
|
+
|
|
2300
|
+
var _useState3 = useState(false),
|
|
2301
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2302
|
+
isFocused = _useState4[0],
|
|
2303
|
+
setIsFocused = _useState4[1];
|
|
2304
|
+
|
|
2305
|
+
var _useState5 = useState(value),
|
|
2306
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
2307
|
+
currentValue = _useState6[0],
|
|
2308
|
+
setCurrentValue = _useState6[1];
|
|
2309
|
+
|
|
2310
|
+
if (Platform.OS === 'android') {
|
|
2311
|
+
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread$e({
|
|
2312
|
+
pickerDefaultDate: pickerDefaultDate,
|
|
2313
|
+
pickerUITestID: pickerUITestID,
|
|
2314
|
+
currentValue: currentValue,
|
|
2315
|
+
setCurrentValue: setCurrentValue,
|
|
2316
|
+
isFocused: isFocused,
|
|
2317
|
+
setIsFocused: setIsFocused,
|
|
2318
|
+
onChange: onChange,
|
|
2319
|
+
onBlur: onBlur
|
|
2320
|
+
}, props));
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
var handleModalClose = function () {
|
|
2324
|
+
if (onBlur) onBlur();
|
|
2325
|
+
setIsPickerUIVisible(false);
|
|
2326
|
+
setIsFocused(false);
|
|
2327
|
+
};
|
|
2328
|
+
|
|
2329
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
2330
|
+
children: [/*#__PURE__*/jsx(DatePickerInputs, _objectSpread$e({
|
|
2331
|
+
handleModalOpen: function handleModalOpen() {
|
|
2332
|
+
if (onFocus) onFocus();
|
|
2333
|
+
setIsPickerUIVisible(true);
|
|
2334
|
+
setIsFocused(true);
|
|
2335
|
+
},
|
|
2336
|
+
currentValue: currentValue,
|
|
2337
|
+
isFocused: isFocused
|
|
2338
|
+
}, props)), /*#__PURE__*/jsx(ModalPlatformDateTimePicker, {
|
|
2339
|
+
testID: pickerUITestID,
|
|
2340
|
+
value: currentValue,
|
|
2341
|
+
isVisible: isPickerUIVisible,
|
|
2342
|
+
title: pickerUITitle,
|
|
2343
|
+
validateButtonLabel: pickerUIValidateButtonLabel,
|
|
2344
|
+
defaultDate: pickerDefaultDate,
|
|
2345
|
+
onClose: handleModalClose,
|
|
2346
|
+
onChange: function handleChange(newDate) {
|
|
2347
|
+
setCurrentValue(newDate);
|
|
2348
|
+
onChange(newDate);
|
|
2349
|
+
handleModalClose();
|
|
2350
|
+
}
|
|
2351
|
+
})]
|
|
2352
|
+
});
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
|
|
2356
|
+
displayName: "InputTextContainer"
|
|
2357
|
+
})(["position:relative;"]);
|
|
2358
|
+
|
|
2359
|
+
var _excluded$7 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
2360
|
+
|
|
2361
|
+
function ownKeys$d(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2362
|
+
|
|
2363
|
+
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$d(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2364
|
+
var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
2365
|
+
displayName: "InputText__StyledTextInput"
|
|
2366
|
+
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
2367
|
+
var theme = _ref.theme,
|
|
2368
|
+
multiline = _ref.multiline;
|
|
2369
|
+
|
|
2370
|
+
if (!multiline && Platform.OS === 'ios') {
|
|
2371
|
+
return theme.kitt.forms.input.padding.iOSSingleLine;
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
return theme.kitt.forms.input.padding["default"];
|
|
2375
|
+
}, function (_ref2) {
|
|
2376
|
+
var theme = _ref2.theme,
|
|
2377
|
+
multiline = _ref2.multiline;
|
|
2378
|
+
if (!multiline && Platform.OS === 'ios') return 0;
|
|
2379
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
2380
|
+
return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight, "px");
|
|
2381
|
+
}, function (_ref3) {
|
|
2382
|
+
var $minHeight = _ref3.$minHeight;
|
|
2383
|
+
return $minHeight;
|
|
2384
|
+
});
|
|
2385
|
+
var RightInputContainer = /*#__PURE__*/styled.View.withConfig({
|
|
2386
|
+
displayName: "InputText__RightInputContainer"
|
|
2387
|
+
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:10px;"]);
|
|
2388
|
+
var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
2389
|
+
var id = _ref4.id,
|
|
2390
|
+
right = _ref4.right,
|
|
2391
|
+
_ref4$minHeight = _ref4.minHeight,
|
|
2392
|
+
minHeight = _ref4$minHeight === void 0 ? 0 : _ref4$minHeight,
|
|
2393
|
+
formState = _ref4.state,
|
|
2394
|
+
internalForceState = _ref4.internalForceState,
|
|
2395
|
+
_ref4$disabled = _ref4.disabled,
|
|
2396
|
+
disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
|
|
2397
|
+
_ref4$autoCorrect = _ref4.autoCorrect,
|
|
2398
|
+
autoCorrect = _ref4$autoCorrect === void 0 ? true : _ref4$autoCorrect,
|
|
2399
|
+
_ref4$textContentType = _ref4.textContentType,
|
|
2400
|
+
textContentType = _ref4$textContentType === void 0 ? 'none' : _ref4$textContentType,
|
|
2401
|
+
_ref4$autoCompleteTyp = _ref4.autoCompleteType,
|
|
2402
|
+
autoCompleteType = _ref4$autoCompleteTyp === void 0 ? 'off' : _ref4$autoCompleteTyp,
|
|
2403
|
+
_ref4$keyboardType = _ref4.keyboardType,
|
|
2404
|
+
keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
|
|
2405
|
+
_onFocus = _ref4.onFocus,
|
|
2406
|
+
_onBlur = _ref4.onBlur,
|
|
2407
|
+
props = _objectWithoutProperties(_ref4, _excluded$7);
|
|
2408
|
+
|
|
2409
|
+
var theme = /*#__PURE__*/useTheme();
|
|
2410
|
+
|
|
2411
|
+
var _useState = useState(false),
|
|
2412
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2413
|
+
isFocused = _useState2[0],
|
|
2414
|
+
setIsFocused = _useState2[1];
|
|
2415
|
+
|
|
2416
|
+
var state = internalForceState || getInputUIState({
|
|
2417
|
+
isFocused: isFocused,
|
|
2418
|
+
isDisabled: disabled,
|
|
2419
|
+
formState: formState
|
|
2420
|
+
});
|
|
2421
|
+
return /*#__PURE__*/jsxs(InputTextContainer, {
|
|
2422
|
+
$isDisabled: disabled,
|
|
2423
|
+
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread$d(_objectSpread$d({
|
|
2424
|
+
ref: ref,
|
|
2425
|
+
nativeID: id,
|
|
2426
|
+
editable: !disabled,
|
|
2427
|
+
keyboardType: keyboardType,
|
|
2428
|
+
autoCompleteType: autoCompleteType,
|
|
2429
|
+
autoCorrect: autoCorrect,
|
|
2430
|
+
$minHeight: minHeight,
|
|
2431
|
+
textContentType: textContentType,
|
|
2432
|
+
placeholderTextColor: theme.kitt.forms.input.color.placeholder,
|
|
2433
|
+
selectionColor: theme.kitt.forms.input.color.selection
|
|
2434
|
+
}, props), {}, {
|
|
2435
|
+
$state: state,
|
|
2436
|
+
onFocus: function onFocus(e) {
|
|
2437
|
+
setIsFocused(true);
|
|
2438
|
+
if (_onFocus) _onFocus(e);
|
|
2439
|
+
},
|
|
2440
|
+
onBlur: function onBlur(e) {
|
|
2441
|
+
setIsFocused(false);
|
|
2442
|
+
if (_onBlur) _onBlur(e);
|
|
2443
|
+
}
|
|
2444
|
+
})), right ? /*#__PURE__*/jsx(RightInputContainer, {
|
|
2445
|
+
children: right
|
|
2446
|
+
}) : null]
|
|
2447
|
+
});
|
|
2448
|
+
});
|
|
2449
|
+
|
|
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
|
+
function InputEmail(props) {
|
|
2454
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$c({
|
|
2455
|
+
autoCompleteType: "email",
|
|
2456
|
+
keyboardType: "email-address",
|
|
2457
|
+
textContentType: "emailAddress",
|
|
2458
|
+
autoCapitalize: "none"
|
|
2459
|
+
}, props));
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
var getColorFromState = function (state) {
|
|
2463
|
+
switch (state) {
|
|
2464
|
+
case 'invalid':
|
|
2465
|
+
return 'danger';
|
|
2466
|
+
|
|
2467
|
+
case 'valid':
|
|
2468
|
+
default:
|
|
2469
|
+
return 'black-light';
|
|
2470
|
+
}
|
|
2471
|
+
};
|
|
2472
|
+
|
|
2473
|
+
function InputFeedback(_ref) {
|
|
2474
|
+
var state = _ref.state,
|
|
2475
|
+
testID = _ref.testID,
|
|
2476
|
+
children = _ref.children;
|
|
2477
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
2478
|
+
base: "body-small",
|
|
2479
|
+
color: getColorFromState(state),
|
|
2480
|
+
testID: testID,
|
|
2481
|
+
children: children
|
|
2482
|
+
});
|
|
2483
|
+
}
|
|
2484
|
+
|
|
2485
|
+
var FieldContainer = /*#__PURE__*/styled.View.withConfig({
|
|
2486
|
+
displayName: "InputField__FieldContainer"
|
|
2487
|
+
})(["padding:5px 0 10px;"]);
|
|
2488
|
+
var FeedbackContainer = /*#__PURE__*/styled.View.withConfig({
|
|
2489
|
+
displayName: "InputField__FeedbackContainer"
|
|
2490
|
+
})(["", ";"], function (_ref) {
|
|
2491
|
+
var theme = _ref.theme;
|
|
2492
|
+
return theme.responsive.ifWindowSizeMatches({
|
|
2493
|
+
minWidth: KittBreakpoints.SMALL
|
|
2494
|
+
}, 'padding-top: 10px', 'padding-top: 5px');
|
|
2495
|
+
});
|
|
2496
|
+
var FieldLabelContainer = /*#__PURE__*/styled.View.withConfig({
|
|
2497
|
+
displayName: "InputField__FieldLabelContainer"
|
|
2498
|
+
})(["flex-direction:row;align-items:center;padding-bottom:", "px;"], function (_ref2) {
|
|
2499
|
+
var theme = _ref2.theme;
|
|
2500
|
+
return theme.kitt.forms.inputField.labelContainerPaddingBottom;
|
|
2501
|
+
});
|
|
2502
|
+
var LabelContainer = /*#__PURE__*/styled.View.withConfig({
|
|
2503
|
+
displayName: "InputField__LabelContainer"
|
|
2504
|
+
})(["margin-right:", "px;"], function (_ref3) {
|
|
2505
|
+
var theme = _ref3.theme;
|
|
2506
|
+
return theme.kitt.forms.inputField.iconMarginLeft;
|
|
2507
|
+
});
|
|
2508
|
+
function InputField(_ref4) {
|
|
2509
|
+
var label = _ref4.label,
|
|
2510
|
+
labelFeedback = _ref4.labelFeedback,
|
|
2511
|
+
input = _ref4.input,
|
|
2512
|
+
feedback = _ref4.feedback;
|
|
2513
|
+
return /*#__PURE__*/jsxs(FieldContainer, {
|
|
2514
|
+
children: [label ? /*#__PURE__*/jsxs(FieldLabelContainer, {
|
|
2515
|
+
children: [/*#__PURE__*/jsx(LabelContainer, {
|
|
2516
|
+
children: label
|
|
2517
|
+
}), labelFeedback]
|
|
2518
|
+
}) : null, input, feedback ? /*#__PURE__*/jsx(FeedbackContainer, {
|
|
2519
|
+
children: feedback
|
|
2520
|
+
}) : null]
|
|
2521
|
+
});
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
function getIconColor(state, disabled) {
|
|
2525
|
+
if (disabled) return 'black-light';
|
|
2526
|
+
|
|
2527
|
+
switch (state) {
|
|
2528
|
+
case 'invalid':
|
|
2529
|
+
return 'danger';
|
|
2530
|
+
|
|
2531
|
+
case 'valid':
|
|
2532
|
+
return 'success';
|
|
2533
|
+
|
|
2534
|
+
default:
|
|
2535
|
+
return undefined;
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
function InputIcon(_ref) {
|
|
2540
|
+
var icon = _ref.icon,
|
|
2541
|
+
state = _ref.state,
|
|
2542
|
+
disabled = _ref.disabled;
|
|
2543
|
+
var theme = /*#__PURE__*/useTheme();
|
|
2544
|
+
var color = getIconColor(state, disabled);
|
|
2545
|
+
return /*#__PURE__*/jsx(TypographyIcon, {
|
|
2546
|
+
color: color,
|
|
1980
2547
|
icon: icon,
|
|
1981
2548
|
size: theme.kitt.forms.input.icon.size
|
|
1982
2549
|
});
|
|
1983
2550
|
}
|
|
1984
2551
|
|
|
1985
|
-
function ownKeys$
|
|
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; }
|
|
1986
2553
|
|
|
1987
|
-
function _objectSpread$
|
|
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; }
|
|
1988
2555
|
function InputPressable(_ref) {
|
|
1989
2556
|
var props = _extends({}, _ref);
|
|
1990
2557
|
|
|
1991
|
-
return /*#__PURE__*/jsx(Pressable, _objectSpread$
|
|
2558
|
+
return /*#__PURE__*/jsx(Pressable, _objectSpread$b({}, props));
|
|
1992
2559
|
}
|
|
1993
2560
|
|
|
1994
|
-
var _excluded$
|
|
2561
|
+
var _excluded$6 = ["isPasswordDefaultVisible", "right"];
|
|
1995
2562
|
|
|
1996
|
-
function ownKeys$
|
|
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; }
|
|
1997
2564
|
|
|
1998
|
-
function _objectSpread$
|
|
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; }
|
|
1999
2566
|
function InputPassword(_ref) {
|
|
2000
2567
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
2001
2568
|
right = _ref.right,
|
|
2002
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2569
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
2003
2570
|
|
|
2004
2571
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
2005
2572
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2006
2573
|
isVisible = _useState2[0],
|
|
2007
2574
|
setIsVisible = _useState2[1];
|
|
2008
2575
|
|
|
2009
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$
|
|
2576
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$a(_objectSpread$a({}, props), {}, {
|
|
2010
2577
|
textContentType: "password",
|
|
2011
2578
|
autoCompleteType: "password",
|
|
2012
2579
|
autoCorrect: false,
|
|
@@ -2025,11 +2592,11 @@ function InputPassword(_ref) {
|
|
|
2025
2592
|
}));
|
|
2026
2593
|
}
|
|
2027
2594
|
|
|
2028
|
-
function ownKeys$
|
|
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; }
|
|
2029
2596
|
|
|
2030
|
-
function _objectSpread$
|
|
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; }
|
|
2031
2598
|
function InputPhone(props) {
|
|
2032
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$
|
|
2599
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$9(_objectSpread$9({}, props), {}, {
|
|
2033
2600
|
autoCompleteType: "tel",
|
|
2034
2601
|
keyboardType: "number-pad",
|
|
2035
2602
|
textContentType: "telephoneNumber"
|
|
@@ -2193,14 +2760,14 @@ function Radio(_ref16) {
|
|
|
2193
2760
|
});
|
|
2194
2761
|
}
|
|
2195
2762
|
|
|
2196
|
-
function ownKeys$
|
|
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; }
|
|
2197
2764
|
|
|
2198
|
-
function _objectSpread$
|
|
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; }
|
|
2199
2766
|
function TextArea(_ref) {
|
|
2200
2767
|
var props = _extends({}, _ref);
|
|
2201
2768
|
|
|
2202
2769
|
var theme = /*#__PURE__*/useTheme();
|
|
2203
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$
|
|
2770
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$8({
|
|
2204
2771
|
multiline: true,
|
|
2205
2772
|
textAlignVertical: "top",
|
|
2206
2773
|
minHeight: theme.kitt.forms.textArea.minHeight
|
|
@@ -2316,309 +2883,68 @@ function FullScreenModalHeader(_ref6) {
|
|
|
2316
2883
|
rightWidth = _useState4[0],
|
|
2317
2884
|
setRightWidth = _useState4[1];
|
|
2318
2885
|
|
|
2319
|
-
var handleLayoutChange = function (event, side) {
|
|
2320
|
-
// Prevents react to nullify event on rerenders
|
|
2321
|
-
event.persist();
|
|
2322
|
-
|
|
2323
|
-
if (side === 'left') {
|
|
2324
|
-
setLeftWidth(event.nativeEvent.layout.width);
|
|
2325
|
-
return;
|
|
2326
|
-
}
|
|
2327
|
-
|
|
2328
|
-
setRightWidth(event.nativeEvent.layout.width);
|
|
2329
|
-
};
|
|
2330
|
-
|
|
2331
|
-
return /*#__PURE__*/jsxs(Header, {
|
|
2332
|
-
insetTop: Platform.OS === 'ios' ? undefined : top,
|
|
2333
|
-
children: [left ? /*#__PURE__*/jsx(SideContainer, {
|
|
2334
|
-
onLayout: function onLayout(e) {
|
|
2335
|
-
return handleLayoutChange(e, 'left');
|
|
2336
|
-
},
|
|
2337
|
-
children: left
|
|
2338
|
-
}) : null, /*#__PURE__*/jsx(HeaderContent, {
|
|
2339
|
-
windowWidth: dimensions.width,
|
|
2340
|
-
leftWidth: leftWidth,
|
|
2341
|
-
rightWidth: rightWidth,
|
|
2342
|
-
children: children
|
|
2343
|
-
}), right ? /*#__PURE__*/jsx(SideContainer, {
|
|
2344
|
-
side: "right",
|
|
2345
|
-
onLayout: function onLayout(e) {
|
|
2346
|
-
return handleLayoutChange(e, 'right');
|
|
2347
|
-
},
|
|
2348
|
-
children: right
|
|
2349
|
-
}) : null]
|
|
2350
|
-
});
|
|
2351
|
-
}
|
|
2352
|
-
|
|
2353
|
-
var Container$3 = /*#__PURE__*/styled.View.withConfig({
|
|
2354
|
-
displayName: "FullScreenModal__Container"
|
|
2355
|
-
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
2356
|
-
var theme = _ref.theme;
|
|
2357
|
-
return theme.kitt.colors.uiBackground;
|
|
2358
|
-
});
|
|
2359
|
-
function FullScreenModal(_ref2) {
|
|
2360
|
-
var children = _ref2.children;
|
|
2361
|
-
return /*#__PURE__*/jsx(Container$3, {
|
|
2362
|
-
children: children
|
|
2363
|
-
});
|
|
2364
|
-
}
|
|
2365
|
-
FullScreenModal.Header = FullScreenModalHeader;
|
|
2366
|
-
FullScreenModal.Body = FullScreenModalBody;
|
|
2367
|
-
|
|
2368
|
-
var _excluded$7 = ["as", "children"];
|
|
2369
|
-
|
|
2370
|
-
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; }
|
|
2371
|
-
|
|
2372
|
-
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; }
|
|
2373
|
-
function StyleWebWrapper(_ref) {
|
|
2374
|
-
var as = _ref.as,
|
|
2375
|
-
children = _ref.children,
|
|
2376
|
-
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
2377
|
-
|
|
2378
|
-
if (Platform.OS !== 'web') return children;
|
|
2379
|
-
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
2380
|
-
return /*#__PURE__*/jsx(as || 'div', _objectSpread$a(_objectSpread$a({}, props), {}, {
|
|
2381
|
-
children: children
|
|
2382
|
-
}));
|
|
2383
|
-
}
|
|
2384
|
-
|
|
2385
|
-
var _excluded$6 = ["color", "disabled"];
|
|
2386
|
-
|
|
2387
|
-
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; }
|
|
2388
|
-
|
|
2389
|
-
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; }
|
|
2390
|
-
var PressableIconButtonWebWrapper = undefined;
|
|
2391
|
-
var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
|
|
2392
|
-
displayName: "PressableIconButton__StyledPressableIconButton"
|
|
2393
|
-
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref) {
|
|
2394
|
-
var theme = _ref.theme;
|
|
2395
|
-
return theme.kitt.iconButton.borderRadius;
|
|
2396
|
-
}, function (_ref2) {
|
|
2397
|
-
var theme = _ref2.theme;
|
|
2398
|
-
return theme.kitt.iconButton.width;
|
|
2399
|
-
}, function (_ref3) {
|
|
2400
|
-
var theme = _ref3.theme;
|
|
2401
|
-
return theme.kitt.iconButton.height;
|
|
2402
|
-
}, function (_ref4) {
|
|
2403
|
-
var theme = _ref4.theme,
|
|
2404
|
-
disabled = _ref4.disabled;
|
|
2405
|
-
var iconButton = theme.kitt.iconButton;
|
|
2406
|
-
|
|
2407
|
-
if (Platform.OS !== 'web') {
|
|
2408
|
-
return undefined;
|
|
2409
|
-
}
|
|
2410
|
-
|
|
2411
|
-
var transition = iconButton.transition;
|
|
2412
|
-
|
|
2413
|
-
if (disabled) {
|
|
2414
|
-
return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
|
|
2415
|
-
}
|
|
2416
|
-
|
|
2417
|
-
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
|
|
2418
|
-
});
|
|
2419
|
-
function PressableIconButton(_ref5) {
|
|
2420
|
-
var color = _ref5.color,
|
|
2421
|
-
disabled = _ref5.disabled,
|
|
2422
|
-
props = _objectWithoutProperties(_ref5, _excluded$6);
|
|
2423
|
-
|
|
2424
|
-
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
2425
|
-
as: PressableIconButtonWebWrapper,
|
|
2426
|
-
$isWhite: color === 'white',
|
|
2427
|
-
$isDisabled: Boolean(disabled),
|
|
2428
|
-
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$9(_objectSpread$9({}, props), {}, {
|
|
2429
|
-
disabled: disabled
|
|
2430
|
-
}))
|
|
2431
|
-
});
|
|
2432
|
-
}
|
|
2433
|
-
|
|
2434
|
-
var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated$1.View).withConfig({
|
|
2435
|
-
displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground"
|
|
2436
|
-
})(["background-color:", ";border-radius:", "px;width:", "px;height:", "px;position:absolute;bottom:0;left:0;"], function (_ref) {
|
|
2437
|
-
var theme = _ref.theme,
|
|
2438
|
-
color = _ref.color,
|
|
2439
|
-
disabled = _ref.disabled;
|
|
2440
|
-
var iconButton = theme.kitt.iconButton;
|
|
2441
|
-
if (disabled) return iconButton.disabled.backgroundColor;
|
|
2442
|
-
if (color === 'white') return iconButton.white.pressedBackgroundColor;
|
|
2443
|
-
return iconButton["default"].pressedBackgroundColor;
|
|
2444
|
-
}, function (_ref2) {
|
|
2445
|
-
var theme = _ref2.theme;
|
|
2446
|
-
return theme.kitt.iconButton.borderRadius;
|
|
2447
|
-
}, function (_ref3) {
|
|
2448
|
-
var theme = _ref3.theme;
|
|
2449
|
-
return theme.kitt.iconButton.width;
|
|
2450
|
-
}, function (_ref4) {
|
|
2451
|
-
var theme = _ref4.theme;
|
|
2452
|
-
return theme.kitt.iconButton.height;
|
|
2453
|
-
});
|
|
2454
|
-
var AnimatedViewContainer = /*#__PURE__*/styled(Animated$1.View).withConfig({
|
|
2455
|
-
displayName: "PressableAnimatedContainer__AnimatedViewContainer"
|
|
2456
|
-
})(["position:relative;align-items:center;justify-content:center;width:100%;height:100%;"]);
|
|
2457
|
-
function PressableAnimatedContainer(_ref5) {
|
|
2458
|
-
var disabled = _ref5.disabled,
|
|
2459
|
-
_ref5$color = _ref5.color,
|
|
2460
|
-
color = _ref5$color === void 0 ? 'black' : _ref5$color,
|
|
2461
|
-
testID = _ref5.testID,
|
|
2462
|
-
_ref5$accessibilityRo = _ref5.accessibilityRole,
|
|
2463
|
-
accessibilityRole = _ref5$accessibilityRo === void 0 ? 'button' : _ref5$accessibilityRo,
|
|
2464
|
-
accessibilityLabel = _ref5.accessibilityLabel,
|
|
2465
|
-
children = _ref5.children,
|
|
2466
|
-
onPress = _ref5.onPress;
|
|
2467
|
-
var theme = /*#__PURE__*/useTheme();
|
|
2468
|
-
var pressed = useSharedValue(false);
|
|
2469
|
-
var opacityStyles = useAnimatedStyle(function () {
|
|
2470
|
-
var _f = function () {
|
|
2471
|
-
return {
|
|
2472
|
-
opacity: withSpring(pressed.value ? 1 : 0)
|
|
2473
|
-
};
|
|
2474
|
-
};
|
|
2475
|
-
|
|
2476
|
-
_f._closure = {
|
|
2477
|
-
withSpring: withSpring,
|
|
2478
|
-
pressed: pressed
|
|
2479
|
-
};
|
|
2480
|
-
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
2481
|
-
_f.__workletHash = 10645190329247;
|
|
2482
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (60:41)";
|
|
2483
|
-
_f.__optimalization = 2;
|
|
2484
|
-
|
|
2485
|
-
global.__reanimatedWorkletInit(_f);
|
|
2486
|
-
|
|
2487
|
-
return _f;
|
|
2488
|
-
}());
|
|
2489
|
-
var scaleStyles = useAnimatedStyle(function () {
|
|
2490
|
-
var _f = function () {
|
|
2491
|
-
return {
|
|
2492
|
-
transform: [{
|
|
2493
|
-
scale: withSpring(pressed.value ? theme.kitt.iconButton.scale.base.active : theme.kitt.iconButton.scale.base["default"])
|
|
2494
|
-
}]
|
|
2495
|
-
};
|
|
2496
|
-
};
|
|
2497
|
-
|
|
2498
|
-
_f._closure = {
|
|
2499
|
-
withSpring: withSpring,
|
|
2500
|
-
pressed: pressed,
|
|
2501
|
-
theme: {
|
|
2502
|
-
kitt: {
|
|
2503
|
-
iconButton: {
|
|
2504
|
-
scale: {
|
|
2505
|
-
base: {
|
|
2506
|
-
active: theme.kitt.iconButton.scale.base.active,
|
|
2507
|
-
"default": theme.kitt.iconButton.scale.base["default"]
|
|
2508
|
-
}
|
|
2509
|
-
}
|
|
2510
|
-
}
|
|
2511
|
-
}
|
|
2512
|
-
}
|
|
2513
|
-
};
|
|
2514
|
-
_f.asString = "function _f(){const{withSpring,pressed,theme}=jsThis._closure;{return{transform:[{scale:withSpring(pressed.value?theme.kitt.iconButton.scale.base.active:theme.kitt.iconButton.scale.base.default)}]};}}";
|
|
2515
|
-
_f.__workletHash = 13861998831411;
|
|
2516
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (66:39)";
|
|
2517
|
-
_f.__optimalization = 2;
|
|
2518
|
-
|
|
2519
|
-
global.__reanimatedWorkletInit(_f);
|
|
2520
|
-
|
|
2521
|
-
return _f;
|
|
2522
|
-
}());
|
|
2523
|
-
return /*#__PURE__*/jsx(PressableIconButton, {
|
|
2524
|
-
accessibilityRole: accessibilityRole,
|
|
2525
|
-
disabled: disabled,
|
|
2526
|
-
color: color,
|
|
2527
|
-
testID: testID,
|
|
2528
|
-
accessibilityLabel: accessibilityLabel,
|
|
2529
|
-
onPress: onPress,
|
|
2530
|
-
onPressIn: function onPressIn() {
|
|
2531
|
-
pressed.value = true;
|
|
2532
|
-
},
|
|
2533
|
-
onPressOut: function onPressOut() {
|
|
2534
|
-
pressed.value = false;
|
|
2535
|
-
},
|
|
2536
|
-
children: /*#__PURE__*/jsxs(AnimatedViewContainer, {
|
|
2537
|
-
style: disabled ? [{
|
|
2538
|
-
transform: [{
|
|
2539
|
-
scale: 1
|
|
2540
|
-
}]
|
|
2541
|
-
}] : [scaleStyles],
|
|
2542
|
-
children: [/*#__PURE__*/jsx(AnimatedIconButtonBackground, {
|
|
2543
|
-
disabled: disabled,
|
|
2544
|
-
color: color,
|
|
2545
|
-
style: disabled ? [{
|
|
2546
|
-
opacity: 1
|
|
2547
|
-
}] : [opacityStyles]
|
|
2548
|
-
}), children]
|
|
2549
|
-
})
|
|
2550
|
-
});
|
|
2551
|
-
}
|
|
2552
|
-
|
|
2553
|
-
var IconButtonContentBorder = /*#__PURE__*/styled.View.withConfig({
|
|
2554
|
-
displayName: "IconButton__IconButtonContentBorder"
|
|
2555
|
-
})(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
|
|
2556
|
-
var theme = _ref.theme;
|
|
2557
|
-
return "".concat(theme.kitt.iconButton.borderWidth, "px solid");
|
|
2558
|
-
}, function (_ref2) {
|
|
2559
|
-
var theme = _ref2.theme,
|
|
2560
|
-
disabled = _ref2.disabled;
|
|
2561
|
-
return disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor;
|
|
2562
|
-
}, function (_ref3) {
|
|
2563
|
-
var theme = _ref3.theme;
|
|
2564
|
-
return theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth;
|
|
2565
|
-
}, function (_ref4) {
|
|
2566
|
-
var theme = _ref4.theme;
|
|
2567
|
-
return theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth;
|
|
2568
|
-
}, function (_ref5) {
|
|
2569
|
-
var theme = _ref5.theme;
|
|
2570
|
-
return theme.kitt.iconButton.borderRadius;
|
|
2571
|
-
});
|
|
2886
|
+
var handleLayoutChange = function (event, side) {
|
|
2887
|
+
// Prevents react to nullify event on rerenders
|
|
2888
|
+
event.persist();
|
|
2572
2889
|
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2890
|
+
if (side === 'left') {
|
|
2891
|
+
setLeftWidth(event.nativeEvent.layout.width);
|
|
2892
|
+
return;
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
setRightWidth(event.nativeEvent.layout.width);
|
|
2896
|
+
};
|
|
2897
|
+
|
|
2898
|
+
return /*#__PURE__*/jsxs(Header, {
|
|
2899
|
+
insetTop: Platform.OS === 'ios' ? undefined : top,
|
|
2900
|
+
children: [left ? /*#__PURE__*/jsx(SideContainer, {
|
|
2901
|
+
onLayout: function onLayout(e) {
|
|
2902
|
+
return handleLayoutChange(e, 'left');
|
|
2903
|
+
},
|
|
2904
|
+
children: left
|
|
2905
|
+
}) : null, /*#__PURE__*/jsx(HeaderContent, {
|
|
2906
|
+
windowWidth: dimensions.width,
|
|
2907
|
+
leftWidth: leftWidth,
|
|
2908
|
+
rightWidth: rightWidth,
|
|
2909
|
+
children: children
|
|
2910
|
+
}), right ? /*#__PURE__*/jsx(SideContainer, {
|
|
2911
|
+
side: "right",
|
|
2912
|
+
onLayout: function onLayout(e) {
|
|
2913
|
+
return handleLayoutChange(e, 'right');
|
|
2914
|
+
},
|
|
2915
|
+
children: right
|
|
2916
|
+
}) : null]
|
|
2583
2917
|
});
|
|
2584
2918
|
}
|
|
2585
2919
|
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
return /*#__PURE__*/jsx(
|
|
2595
|
-
|
|
2596
|
-
disabled: disabled,
|
|
2597
|
-
testID: testID,
|
|
2598
|
-
accessibilityLabel: accessibilityLabel,
|
|
2599
|
-
accessibilityRole: accessibilityRole,
|
|
2600
|
-
onPress: onPress,
|
|
2601
|
-
children: /*#__PURE__*/jsx(IconButtonContent, {
|
|
2602
|
-
disabled: disabled,
|
|
2603
|
-
color: color,
|
|
2604
|
-
icon: icon
|
|
2605
|
-
})
|
|
2920
|
+
var Container$3 = /*#__PURE__*/styled.View.withConfig({
|
|
2921
|
+
displayName: "FullScreenModal__Container"
|
|
2922
|
+
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
2923
|
+
var theme = _ref.theme;
|
|
2924
|
+
return theme.kitt.colors.uiBackground;
|
|
2925
|
+
});
|
|
2926
|
+
function FullScreenModal(_ref2) {
|
|
2927
|
+
var children = _ref2.children;
|
|
2928
|
+
return /*#__PURE__*/jsx(Container$3, {
|
|
2929
|
+
children: children
|
|
2606
2930
|
});
|
|
2607
2931
|
}
|
|
2932
|
+
FullScreenModal.Header = FullScreenModalHeader;
|
|
2933
|
+
FullScreenModal.Body = FullScreenModalBody;
|
|
2608
2934
|
|
|
2609
2935
|
var _excluded$5 = ["children"];
|
|
2610
2936
|
|
|
2611
|
-
function ownKeys$
|
|
2937
|
+
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; }
|
|
2612
2938
|
|
|
2613
|
-
function _objectSpread$
|
|
2614
|
-
var ContentView
|
|
2939
|
+
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; }
|
|
2940
|
+
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
2615
2941
|
displayName: "ListItemContent__ContentView"
|
|
2616
2942
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
2617
2943
|
function ListItemContent(_ref) {
|
|
2618
2944
|
var children = _ref.children,
|
|
2619
2945
|
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
2620
2946
|
|
|
2621
|
-
return /*#__PURE__*/jsx(ContentView
|
|
2947
|
+
return /*#__PURE__*/jsx(ContentView, _objectSpread$7(_objectSpread$7({}, rest), {}, {
|
|
2622
2948
|
children: children
|
|
2623
2949
|
}));
|
|
2624
2950
|
}
|
|
@@ -2626,9 +2952,9 @@ function ListItemContent(_ref) {
|
|
|
2626
2952
|
var _excluded$4 = ["children", "side"],
|
|
2627
2953
|
_excluded2$1 = ["children", "align"];
|
|
2628
2954
|
|
|
2629
|
-
function ownKeys$
|
|
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; }
|
|
2630
2956
|
|
|
2631
|
-
function _objectSpread$
|
|
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; }
|
|
2632
2958
|
var SideContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
2633
2959
|
displayName: "ListItemSideContent__SideContainerView"
|
|
2634
2960
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
@@ -2647,7 +2973,7 @@ function ListItemSideContainer(_ref3) {
|
|
|
2647
2973
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
2648
2974
|
rest = _objectWithoutProperties(_ref3, _excluded$4);
|
|
2649
2975
|
|
|
2650
|
-
return /*#__PURE__*/jsx(SideContainerView, _objectSpread$
|
|
2976
|
+
return /*#__PURE__*/jsx(SideContainerView, _objectSpread$6(_objectSpread$6({
|
|
2651
2977
|
side: side
|
|
2652
2978
|
}, rest), {}, {
|
|
2653
2979
|
children: children
|
|
@@ -2665,7 +2991,7 @@ function ListItemSideContent(_ref5) {
|
|
|
2665
2991
|
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
2666
2992
|
rest = _objectWithoutProperties(_ref5, _excluded2$1);
|
|
2667
2993
|
|
|
2668
|
-
return /*#__PURE__*/jsx(SideContentView, _objectSpread$
|
|
2994
|
+
return /*#__PURE__*/jsx(SideContentView, _objectSpread$6(_objectSpread$6({
|
|
2669
2995
|
align: align
|
|
2670
2996
|
}, rest), {}, {
|
|
2671
2997
|
children: children
|
|
@@ -2674,9 +3000,9 @@ function ListItemSideContent(_ref5) {
|
|
|
2674
3000
|
|
|
2675
3001
|
var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
2676
3002
|
|
|
2677
|
-
function ownKeys$
|
|
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; }
|
|
2678
3004
|
|
|
2679
|
-
function _objectSpread$
|
|
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; }
|
|
2680
3006
|
var ContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
2681
3007
|
displayName: "ListItem__ContainerView"
|
|
2682
3008
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -2717,14 +3043,14 @@ function ListItem(_ref5) {
|
|
|
2717
3043
|
onPress = _ref5.onPress,
|
|
2718
3044
|
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
2719
3045
|
|
|
2720
|
-
var Wrapper = onPress ? Pressable : Fragment;
|
|
2721
|
-
var wrapperProps = onPress ? _objectSpread$
|
|
3046
|
+
var Wrapper = onPress ? Pressable : Fragment$1;
|
|
3047
|
+
var wrapperProps = onPress ? _objectSpread$5({
|
|
2722
3048
|
accessibilityRole: 'button',
|
|
2723
3049
|
onPress: onPress
|
|
2724
3050
|
}, rest) : undefined;
|
|
2725
3051
|
var containerProps = onPress ? undefined : rest;
|
|
2726
|
-
return /*#__PURE__*/jsx(Wrapper, _objectSpread$
|
|
2727
|
-
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread$
|
|
3052
|
+
return /*#__PURE__*/jsx(Wrapper, _objectSpread$5(_objectSpread$5({}, wrapperProps), {}, {
|
|
3053
|
+
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread$5(_objectSpread$5({
|
|
2728
3054
|
withPadding: withPadding,
|
|
2729
3055
|
borders: borders
|
|
2730
3056
|
}, containerProps), {}, {
|
|
@@ -2923,159 +3249,6 @@ function Message(_ref) {
|
|
|
2923
3249
|
});
|
|
2924
3250
|
}
|
|
2925
3251
|
|
|
2926
|
-
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; }
|
|
2927
|
-
|
|
2928
|
-
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; }
|
|
2929
|
-
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
2930
|
-
var OverlayPressable = /*#__PURE__*/styled(Pressable).withConfig({
|
|
2931
|
-
displayName: "Overlay__OverlayPressable"
|
|
2932
|
-
})(function (_ref) {
|
|
2933
|
-
var theme = _ref.theme;
|
|
2934
|
-
return _objectSpread$5(_objectSpread$5({}, StyleSheet.absoluteFillObject), {}, {
|
|
2935
|
-
backgroundColor: theme.kitt.colors.overlay.dark
|
|
2936
|
-
});
|
|
2937
|
-
});
|
|
2938
|
-
function Overlay(_ref2) {
|
|
2939
|
-
var onPress = _ref2.onPress;
|
|
2940
|
-
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
2941
|
-
accessibilityRole: "none",
|
|
2942
|
-
onPress: onPress,
|
|
2943
|
-
children: /*#__PURE__*/jsx(View, {})
|
|
2944
|
-
});
|
|
2945
|
-
}
|
|
2946
|
-
|
|
2947
|
-
var BodyView = /*#__PURE__*/styled.View.withConfig({
|
|
2948
|
-
displayName: "Body__BodyView"
|
|
2949
|
-
})(["padding:", "px ", "px;"], function (_ref) {
|
|
2950
|
-
var theme = _ref.theme;
|
|
2951
|
-
return theme.kitt.spacing * 6;
|
|
2952
|
-
}, function (_ref2) {
|
|
2953
|
-
var theme = _ref2.theme;
|
|
2954
|
-
return theme.kitt.spacing * 4;
|
|
2955
|
-
});
|
|
2956
|
-
function ModalBody(_ref3) {
|
|
2957
|
-
var children = _ref3.children;
|
|
2958
|
-
return /*#__PURE__*/jsx(ScrollView, {
|
|
2959
|
-
children: /*#__PURE__*/jsx(BodyView, {
|
|
2960
|
-
children: children
|
|
2961
|
-
})
|
|
2962
|
-
});
|
|
2963
|
-
}
|
|
2964
|
-
|
|
2965
|
-
var FooterView = /*#__PURE__*/styled.View.withConfig({
|
|
2966
|
-
displayName: "Footer__FooterView"
|
|
2967
|
-
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
2968
|
-
var theme = _ref.theme;
|
|
2969
|
-
return theme.kitt.spacing * 4;
|
|
2970
|
-
}, function (_ref2) {
|
|
2971
|
-
var theme = _ref2.theme;
|
|
2972
|
-
return theme.kitt.colors.separator;
|
|
2973
|
-
});
|
|
2974
|
-
function ModalFooter(_ref3) {
|
|
2975
|
-
var children = _ref3.children;
|
|
2976
|
-
return /*#__PURE__*/jsx(FooterView, {
|
|
2977
|
-
children: children
|
|
2978
|
-
});
|
|
2979
|
-
}
|
|
2980
|
-
|
|
2981
|
-
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
2982
|
-
|
|
2983
|
-
var HeaderView = /*#__PURE__*/styled.View.withConfig({
|
|
2984
|
-
displayName: "Header__HeaderView"
|
|
2985
|
-
})(["position:relative;padding:", "px;display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;align-items:center;border-bottom-width:1px;border-bottom-color:", ";min-height:57px;"], function (_ref) {
|
|
2986
|
-
var theme = _ref.theme;
|
|
2987
|
-
return theme.kitt.spacing * 2;
|
|
2988
|
-
}, function (_ref2) {
|
|
2989
|
-
var theme = _ref2.theme;
|
|
2990
|
-
return theme.kitt.colors.separator;
|
|
2991
|
-
});
|
|
2992
|
-
var LeftIconView = /*#__PURE__*/styled.View.withConfig({
|
|
2993
|
-
displayName: "Header__LeftIconView"
|
|
2994
|
-
})(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
|
|
2995
|
-
var theme = _ref3.theme;
|
|
2996
|
-
return theme.kitt.spacing * 2;
|
|
2997
|
-
});
|
|
2998
|
-
var RightIconView = /*#__PURE__*/styled.View.withConfig({
|
|
2999
|
-
displayName: "Header__RightIconView"
|
|
3000
|
-
})(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
|
|
3001
|
-
var theme = _ref4.theme;
|
|
3002
|
-
return theme.kitt.spacing * 2;
|
|
3003
|
-
});
|
|
3004
|
-
var TitleView = /*#__PURE__*/styled.View.withConfig({
|
|
3005
|
-
displayName: "Header__TitleView"
|
|
3006
|
-
})(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
|
|
3007
|
-
var theme = _ref5.theme,
|
|
3008
|
-
isIconLeft = _ref5.isIconLeft;
|
|
3009
|
-
return isIconLeft ? 0 : theme.kitt.spacing * 2;
|
|
3010
|
-
});
|
|
3011
|
-
function ModalHeader(_ref6) {
|
|
3012
|
-
var left = _ref6.left,
|
|
3013
|
-
right = _ref6.right,
|
|
3014
|
-
children = _ref6.children;
|
|
3015
|
-
var onClose = useContext(OnCloseContext);
|
|
3016
|
-
var isIconLeft = !!left;
|
|
3017
|
-
return /*#__PURE__*/jsxs(HeaderView, {
|
|
3018
|
-
children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
|
|
3019
|
-
children: left
|
|
3020
|
-
}), /*#__PURE__*/jsx(TitleView, {
|
|
3021
|
-
isIconLeft: isIconLeft,
|
|
3022
|
-
children: children
|
|
3023
|
-
}), right !== undefined ? right : /*#__PURE__*/jsx(RightIconView, {
|
|
3024
|
-
children: /*#__PURE__*/jsx(IconButton, {
|
|
3025
|
-
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
3026
|
-
onPress: onClose
|
|
3027
|
-
})
|
|
3028
|
-
})]
|
|
3029
|
-
});
|
|
3030
|
-
}
|
|
3031
|
-
|
|
3032
|
-
var ModalView = /*#__PURE__*/styled.View.withConfig({
|
|
3033
|
-
displayName: "Modal__ModalView"
|
|
3034
|
-
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
|
|
3035
|
-
var theme = _ref.theme;
|
|
3036
|
-
return theme.kitt.spacing * 20;
|
|
3037
|
-
}, function (_ref2) {
|
|
3038
|
-
var theme = _ref2.theme;
|
|
3039
|
-
return theme.kitt.spacing * 4;
|
|
3040
|
-
});
|
|
3041
|
-
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
3042
|
-
displayName: "Modal__ContentView"
|
|
3043
|
-
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], function (_ref3) {
|
|
3044
|
-
var theme = _ref3.theme;
|
|
3045
|
-
return theme.kitt.card.borderRadius;
|
|
3046
|
-
}, function (_ref4) {
|
|
3047
|
-
var theme = _ref4.theme;
|
|
3048
|
-
return theme.kitt.colors.uiBackgroundLight;
|
|
3049
|
-
});
|
|
3050
|
-
function Modal(_ref5) {
|
|
3051
|
-
var visible = _ref5.visible,
|
|
3052
|
-
children = _ref5.children,
|
|
3053
|
-
onClose = _ref5.onClose,
|
|
3054
|
-
onEntered = _ref5.onEntered,
|
|
3055
|
-
onExited = _ref5.onExited;
|
|
3056
|
-
return /*#__PURE__*/jsx(OnCloseContext.Provider, {
|
|
3057
|
-
value: onClose,
|
|
3058
|
-
children: /*#__PURE__*/jsx(Modal$1, {
|
|
3059
|
-
transparent: true,
|
|
3060
|
-
animationType: "fade",
|
|
3061
|
-
visible: visible,
|
|
3062
|
-
onShow: onEntered,
|
|
3063
|
-
onDismiss: onExited,
|
|
3064
|
-
onRequestClose: onClose,
|
|
3065
|
-
children: /*#__PURE__*/jsxs(ModalView, {
|
|
3066
|
-
children: [/*#__PURE__*/jsx(Overlay, {
|
|
3067
|
-
onPress: onClose
|
|
3068
|
-
}), /*#__PURE__*/jsx(ContentView, {
|
|
3069
|
-
children: children
|
|
3070
|
-
})]
|
|
3071
|
-
})
|
|
3072
|
-
})
|
|
3073
|
-
});
|
|
3074
|
-
}
|
|
3075
|
-
Modal.Header = ModalHeader;
|
|
3076
|
-
Modal.Body = ModalBody;
|
|
3077
|
-
Modal.Footer = ModalFooter;
|
|
3078
|
-
|
|
3079
3252
|
function Notification(_ref) {
|
|
3080
3253
|
var type = _ref.type,
|
|
3081
3254
|
children = _ref.children,
|
|
@@ -3556,7 +3729,7 @@ function StoryGridCol(_ref2) {
|
|
|
3556
3729
|
return null;
|
|
3557
3730
|
}
|
|
3558
3731
|
|
|
3559
|
-
return /*#__PURE__*/jsxs(Fragment
|
|
3732
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
3560
3733
|
children: [title ? /*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
3561
3734
|
numberOfLines: 1,
|
|
3562
3735
|
color: titleColor,
|
|
@@ -3665,7 +3838,7 @@ function ModalDateTimePicker(_ref2) {
|
|
|
3665
3838
|
setCurrentValue(value);
|
|
3666
3839
|
onClose();
|
|
3667
3840
|
},
|
|
3668
|
-
children: visible ? /*#__PURE__*/jsxs(Fragment
|
|
3841
|
+
children: visible ? /*#__PURE__*/jsxs(Fragment, {
|
|
3669
3842
|
children: [title ? /*#__PURE__*/jsx(Title, {
|
|
3670
3843
|
children: title
|
|
3671
3844
|
}) : null, /*#__PURE__*/jsx(Modal.Body, {
|