@ornikar/kitt-universal 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +1 -1
- package/dist/definitions/forms/DatePicker/DatePicker.d.ts +30 -0
- package/dist/definitions/forms/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/definitions/forms/DatePicker/DatePickerInputPart.d.ts +11 -0
- package/dist/definitions/forms/DatePicker/DatePickerInputPart.d.ts.map +1 -0
- package/dist/definitions/forms/DatePicker/ModalPlatformDateTimePicker.d.ts +11 -0
- package/dist/definitions/forms/DatePicker/ModalPlatformDateTimePicker.d.ts.map +1 -0
- package/dist/definitions/forms/DatePicker/PlatformDateTimePicker.d.ts +14 -0
- package/dist/definitions/forms/DatePicker/PlatformDateTimePicker.d.ts.map +1 -0
- package/dist/definitions/forms/InputTag/InputTag.d.ts +10 -0
- package/dist/definitions/forms/InputTag/InputTag.d.ts.map +1 -0
- package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +1 -1
- package/dist/definitions/index.d.ts +4 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +2 -0
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/datePicker.d.ts +11 -0
- package/dist/definitions/themes/late-ocean/datePicker.d.ts.map +1 -0
- package/dist/definitions/themes/late-ocean/forms.d.ts +2 -0
- package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/input.d.ts +1 -0
- package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/inputTag.d.ts +14 -0
- package/dist/definitions/themes/late-ocean/inputTag.d.ts.map +1 -0
- package/dist/index-browser-all.es.android.js +1135 -773
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +1135 -773
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +1275 -913
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +855 -490
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +1097 -763
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.css +1 -1
- package/dist/index-node-14.17.cjs.web.js +874 -543
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +33 -1
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +33 -1
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +33 -1
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +33 -1
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +33 -1
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +33 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import { View, Text as Text$1, useWindowDimensions, Image, Pressable,
|
|
3
|
+
import { View, Text as Text$1, useWindowDimensions, Image, Pressable, StyleSheet, ScrollView, Modal as Modal$1, TextInput } from 'react-native';
|
|
4
4
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
5
|
-
import { UserIcon, CheckboxMark, EyeOffIcon, EyeIcon, LoaderIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon,
|
|
5
|
+
import { UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, LoaderIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
6
6
|
export * from '@ornikar/kitt-icons';
|
|
7
7
|
import styled$1, { useTheme, css, ThemeProvider } from 'styled-components/native';
|
|
8
|
-
import { forwardRef, cloneElement, useContext, createContext, useMemo, useState, Fragment, Children, useEffect } from 'react';
|
|
8
|
+
import { forwardRef, cloneElement, useContext, createContext, useMemo, useState, Fragment as Fragment$1, Children, useEffect } from 'react';
|
|
9
9
|
import { styled } from '@linaria/react';
|
|
10
|
-
import { jsx, jsxs, Fragment
|
|
10
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
11
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
12
12
|
import { parse } from 'twemoji-parser';
|
|
13
|
+
import { FormattedMessage } from 'react-intl';
|
|
14
|
+
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
13
15
|
import _extends from '@babel/runtime/helpers/extends';
|
|
14
16
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
15
17
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
16
18
|
import { useFloating, offset, shift, flip, getScrollParents } from '@floating-ui/react-dom';
|
|
17
19
|
import { makeDecorator } from '@storybook/addons';
|
|
18
20
|
|
|
19
|
-
function ownKeys$
|
|
21
|
+
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; }
|
|
20
22
|
|
|
21
|
-
function _objectSpread$
|
|
23
|
+
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; }
|
|
22
24
|
// type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
|
|
23
25
|
// type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
|
|
24
26
|
// export function withTheme<Props extends { theme: DefaultTheme }, C>(
|
|
@@ -33,7 +35,7 @@ function withTheme(WrappedComponent) {
|
|
|
33
35
|
// eslint-disable-next-line prefer-arrow-callback
|
|
34
36
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
35
37
|
var theme = /*#__PURE__*/useTheme();
|
|
36
|
-
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$
|
|
38
|
+
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$o({
|
|
37
39
|
ref: ref,
|
|
38
40
|
theme: theme
|
|
39
41
|
}, props));
|
|
@@ -51,7 +53,7 @@ function SpinningIcon(_ref) {
|
|
|
51
53
|
});
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
var IconContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
56
|
+
var IconContainer$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
55
57
|
displayName: "Icon__IconContainer",
|
|
56
58
|
componentId: "kitt-universal__sc-usm0ol-0"
|
|
57
59
|
})(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
|
|
@@ -78,7 +80,7 @@ function Icon(_ref5) {
|
|
|
78
80
|
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
79
81
|
color: color
|
|
80
82
|
});
|
|
81
|
-
return /*#__PURE__*/jsx(IconContainer, {
|
|
83
|
+
return /*#__PURE__*/jsx(IconContainer$1, {
|
|
82
84
|
align: align,
|
|
83
85
|
size: size,
|
|
84
86
|
color: color,
|
|
@@ -136,11 +138,11 @@ var KittBreakpointsMax = {
|
|
|
136
138
|
LARGE: KittBreakpoints.WIDE - 1
|
|
137
139
|
};
|
|
138
140
|
|
|
139
|
-
var _excluded$
|
|
141
|
+
var _excluded$g = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
140
142
|
|
|
141
|
-
function ownKeys$
|
|
143
|
+
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; }
|
|
142
144
|
|
|
143
|
-
function _objectSpread$
|
|
145
|
+
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; }
|
|
144
146
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
145
147
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
146
148
|
function useTypographyColor() {
|
|
@@ -217,7 +219,7 @@ function Typography(_ref4) {
|
|
|
217
219
|
large = _ref4.large,
|
|
218
220
|
variant = _ref4.variant,
|
|
219
221
|
color = _ref4.color,
|
|
220
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded$
|
|
222
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded$g);
|
|
221
223
|
|
|
222
224
|
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
223
225
|
var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
|
|
@@ -234,14 +236,14 @@ function Typography(_ref4) {
|
|
|
234
236
|
var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular';
|
|
235
237
|
var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
|
|
236
238
|
value: isHeader,
|
|
237
|
-
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$
|
|
239
|
+
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$n({
|
|
238
240
|
$color: colorOrDefaultToBlack,
|
|
239
241
|
$isHeader: isHeader,
|
|
240
242
|
$typeForCurrentWindowSize: typeForCurrentWindowSize,
|
|
241
243
|
$variant: nonNullableVariant,
|
|
242
244
|
accessibilityRole: accessibilityRole || undefined
|
|
243
245
|
}, otherProps))
|
|
244
|
-
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$
|
|
246
|
+
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$n({
|
|
245
247
|
$color: colorOrDefaultToBlack,
|
|
246
248
|
$isHeader: isHeader,
|
|
247
249
|
$variant: nonNullableVariant,
|
|
@@ -254,13 +256,13 @@ function Typography(_ref4) {
|
|
|
254
256
|
}
|
|
255
257
|
|
|
256
258
|
function TypographyText(props) {
|
|
257
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
259
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$n({
|
|
258
260
|
accessibilityRole: null
|
|
259
261
|
}, props));
|
|
260
262
|
}
|
|
261
263
|
|
|
262
264
|
function TypographyParagraph(props) {
|
|
263
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
265
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$n({
|
|
264
266
|
accessibilityRole: "paragraph"
|
|
265
267
|
}, props));
|
|
266
268
|
}
|
|
@@ -268,7 +270,7 @@ function TypographyParagraph(props) {
|
|
|
268
270
|
var createHeading = function (level, defaultBase) {
|
|
269
271
|
// https://github.com/necolas/react-native-web/issues/401
|
|
270
272
|
function TypographyHeading(props) {
|
|
271
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
273
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$n(_objectSpread$n({
|
|
272
274
|
accessibilityRole: "header",
|
|
273
275
|
base: defaultBase
|
|
274
276
|
}, props), {}, {
|
|
@@ -304,11 +306,11 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
304
306
|
|
|
305
307
|
Typography.h5 = createHeading(5, 'header5');
|
|
306
308
|
|
|
307
|
-
var _excluded$
|
|
309
|
+
var _excluded$f = ["size", "base", "round", "light"];
|
|
308
310
|
|
|
309
|
-
function ownKeys$
|
|
311
|
+
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; }
|
|
310
312
|
|
|
311
|
-
function _objectSpread$
|
|
313
|
+
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; }
|
|
312
314
|
|
|
313
315
|
var getInitials = function (firstname, lastname) {
|
|
314
316
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
@@ -380,13 +382,13 @@ function Avatar(_ref6) {
|
|
|
380
382
|
base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
|
|
381
383
|
round = _ref6.round,
|
|
382
384
|
light = _ref6.light,
|
|
383
|
-
props = _objectWithoutProperties(_ref6, _excluded$
|
|
385
|
+
props = _objectWithoutProperties(_ref6, _excluded$f);
|
|
384
386
|
|
|
385
387
|
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
386
388
|
$size: size,
|
|
387
389
|
$isRound: round,
|
|
388
390
|
$isLight: light,
|
|
389
|
-
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$
|
|
391
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$m({
|
|
390
392
|
size: size,
|
|
391
393
|
base: base,
|
|
392
394
|
isLight: light
|
|
@@ -398,11 +400,11 @@ function isSubtle(type) {
|
|
|
398
400
|
return type.startsWith('subtle');
|
|
399
401
|
}
|
|
400
402
|
|
|
401
|
-
var _excluded$
|
|
403
|
+
var _excluded$e = ["$type", "$isStretch", "disabled"];
|
|
402
404
|
|
|
403
|
-
function ownKeys$
|
|
405
|
+
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; }
|
|
404
406
|
|
|
405
|
-
function _objectSpread$
|
|
407
|
+
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; }
|
|
406
408
|
var AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
407
409
|
name: "AnimatedButtonPressableContainer",
|
|
408
410
|
"class": "a1vkj3mh",
|
|
@@ -501,14 +503,14 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref18, ref) {
|
|
|
501
503
|
var $type = _ref18.$type,
|
|
502
504
|
$isStretch = _ref18.$isStretch,
|
|
503
505
|
disabled = _ref18.disabled,
|
|
504
|
-
props = _objectWithoutProperties(_ref18, _excluded$
|
|
506
|
+
props = _objectWithoutProperties(_ref18, _excluded$e);
|
|
505
507
|
|
|
506
508
|
return /*#__PURE__*/jsx(AnimatedButtonPressableContainer, {
|
|
507
509
|
ref: ref,
|
|
508
510
|
$type: $type,
|
|
509
511
|
$isDisabled: !!disabled,
|
|
510
512
|
$isStretch: $isStretch,
|
|
511
|
-
children: /*#__PURE__*/jsx(Pressable, _objectSpread$
|
|
513
|
+
children: /*#__PURE__*/jsx(Pressable, _objectSpread$l({
|
|
512
514
|
disabled: disabled
|
|
513
515
|
}, props))
|
|
514
516
|
});
|
|
@@ -552,26 +554,26 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled$1(View).withConfig({
|
|
|
552
554
|
return defaultPadding;
|
|
553
555
|
});
|
|
554
556
|
|
|
555
|
-
var _excluded$
|
|
557
|
+
var _excluded$d = ["color"],
|
|
556
558
|
_excluded2$2 = ["color"];
|
|
557
559
|
|
|
558
|
-
function ownKeys$
|
|
560
|
+
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; }
|
|
559
561
|
|
|
560
|
-
function _objectSpread$
|
|
562
|
+
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; }
|
|
561
563
|
|
|
562
564
|
function TypographyIconSpecifiedColor(_ref) {
|
|
563
565
|
var color = _ref.color,
|
|
564
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
566
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
565
567
|
|
|
566
568
|
var theme = /*#__PURE__*/useTheme();
|
|
567
|
-
return /*#__PURE__*/jsx(Icon, _objectSpread$
|
|
569
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread$k(_objectSpread$k({}, props), {}, {
|
|
568
570
|
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
569
571
|
}));
|
|
570
572
|
}
|
|
571
573
|
|
|
572
574
|
function TypographyIconInheritColor(props) {
|
|
573
575
|
var color = useTypographyColor();
|
|
574
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$
|
|
576
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$k({
|
|
575
577
|
color: color
|
|
576
578
|
}, props));
|
|
577
579
|
}
|
|
@@ -581,19 +583,19 @@ function TypographyIcon(_ref2) {
|
|
|
581
583
|
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
582
584
|
|
|
583
585
|
if (color) {
|
|
584
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$
|
|
586
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$k({
|
|
585
587
|
color: color
|
|
586
588
|
}, props));
|
|
587
589
|
}
|
|
588
590
|
|
|
589
|
-
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$
|
|
591
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$k({}, props));
|
|
590
592
|
}
|
|
591
593
|
|
|
592
|
-
var _excluded$
|
|
594
|
+
var _excluded$c = ["type", "isDisabled", "$isStretch", "icon", "children"];
|
|
593
595
|
|
|
594
|
-
function ownKeys$
|
|
596
|
+
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; }
|
|
595
597
|
|
|
596
|
-
function _objectSpread$
|
|
598
|
+
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; }
|
|
597
599
|
|
|
598
600
|
var getTextColorByType = function (type) {
|
|
599
601
|
switch (type) {
|
|
@@ -701,7 +703,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
701
703
|
color: isWebSubtle ? 'inherit' : color
|
|
702
704
|
};
|
|
703
705
|
return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
|
|
704
|
-
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$
|
|
706
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$j(_objectSpread$j({}, buttonIconSharedProps), {}, {
|
|
705
707
|
testID: "button-left-icon",
|
|
706
708
|
icon: icon
|
|
707
709
|
})) : null, /*#__PURE__*/jsx(StyledButtonText, {
|
|
@@ -712,7 +714,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
712
714
|
,
|
|
713
715
|
color: isWebSubtle ? undefined : color,
|
|
714
716
|
children: children
|
|
715
|
-
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$
|
|
717
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$j(_objectSpread$j({}, buttonIconSharedProps), {}, {
|
|
716
718
|
icon: icon
|
|
717
719
|
})) : null]
|
|
718
720
|
});
|
|
@@ -736,14 +738,14 @@ function ButtonContent(_ref7) {
|
|
|
736
738
|
$isStretch = _ref7.$isStretch,
|
|
737
739
|
icon = _ref7.icon,
|
|
738
740
|
children = _ref7.children,
|
|
739
|
-
props = _objectWithoutProperties(_ref7, _excluded$
|
|
741
|
+
props = _objectWithoutProperties(_ref7, _excluded$c);
|
|
740
742
|
|
|
741
743
|
var color = isDisabled ? 'black-light' : getTextColorByType(type);
|
|
742
744
|
return /*#__PURE__*/jsx(ButtonContentContainer, {
|
|
743
745
|
$isSubtle: isSubtle(type),
|
|
744
746
|
$isStretch: $isStretch,
|
|
745
747
|
$isIconOnly: Boolean(!children && icon),
|
|
746
|
-
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$
|
|
748
|
+
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$j(_objectSpread$j({
|
|
747
749
|
icon: icon,
|
|
748
750
|
type: type,
|
|
749
751
|
isDisabled: isDisabled,
|
|
@@ -869,20 +871,20 @@ var defaultOpenLinkBehavior = {
|
|
|
869
871
|
web: 'targetBlank'
|
|
870
872
|
};
|
|
871
873
|
|
|
872
|
-
var _excluded$
|
|
874
|
+
var _excluded$b = ["as", "href", "openLinkBehavior", "onPress"];
|
|
873
875
|
|
|
874
|
-
function ownKeys$
|
|
876
|
+
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; }
|
|
875
877
|
|
|
876
|
-
function _objectSpread$
|
|
878
|
+
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; }
|
|
877
879
|
function ExternalLink(_ref) {
|
|
878
880
|
var Component = _ref.as,
|
|
879
881
|
href = _ref.href,
|
|
880
882
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
881
883
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
882
884
|
onPress = _ref.onPress,
|
|
883
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
885
|
+
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
884
886
|
|
|
885
|
-
return /*#__PURE__*/jsx(Component, _objectSpread$
|
|
887
|
+
return /*#__PURE__*/jsx(Component, _objectSpread$i(_objectSpread$i({}, rest), {}, {
|
|
886
888
|
href: href,
|
|
887
889
|
hrefAttrs: (openLinkBehavior === null || openLinkBehavior === void 0 ? void 0 : openLinkBehavior.web) === 'targetSelf' ? undefined : {
|
|
888
890
|
target: '_blank',
|
|
@@ -1068,6 +1070,18 @@ var checkbox = {
|
|
|
1068
1070
|
markColor: colors.uiBackgroundLight
|
|
1069
1071
|
};
|
|
1070
1072
|
|
|
1073
|
+
var datePicker = {
|
|
1074
|
+
day: {
|
|
1075
|
+
minWidth: 64
|
|
1076
|
+
},
|
|
1077
|
+
month: {
|
|
1078
|
+
minWidth: 64
|
|
1079
|
+
},
|
|
1080
|
+
year: {
|
|
1081
|
+
minWidth: 82
|
|
1082
|
+
}
|
|
1083
|
+
};
|
|
1084
|
+
|
|
1071
1085
|
var calcLineHeight = function (fontSize, lineHeightMultiplier) {
|
|
1072
1086
|
return Math.round(fontSize * lineHeightMultiplier);
|
|
1073
1087
|
};
|
|
@@ -1179,6 +1193,7 @@ var inputStatesStyle = {
|
|
|
1179
1193
|
}
|
|
1180
1194
|
};
|
|
1181
1195
|
var input = {
|
|
1196
|
+
minHeight: 40,
|
|
1182
1197
|
color: {
|
|
1183
1198
|
selection: colors.primary,
|
|
1184
1199
|
placeholder: typography.colors['black-light']
|
|
@@ -1205,6 +1220,23 @@ var inputField = {
|
|
|
1205
1220
|
iconMarginLeft: 6
|
|
1206
1221
|
};
|
|
1207
1222
|
|
|
1223
|
+
var inputTag = {
|
|
1224
|
+
success: {
|
|
1225
|
+
backgroundColor: colors.success,
|
|
1226
|
+
labelColor: colors.uiBackgroundLight
|
|
1227
|
+
},
|
|
1228
|
+
danger: {
|
|
1229
|
+
backgroundColor: colors.danger,
|
|
1230
|
+
labelColor: colors.uiBackgroundLight
|
|
1231
|
+
},
|
|
1232
|
+
"default": {
|
|
1233
|
+
backgroundColor: lateOceanColorPalette.black50,
|
|
1234
|
+
labelColor: colors.black
|
|
1235
|
+
},
|
|
1236
|
+
borderRadius: 10,
|
|
1237
|
+
iconSize: 13.5
|
|
1238
|
+
};
|
|
1239
|
+
|
|
1208
1240
|
var radio = {
|
|
1209
1241
|
size: 18,
|
|
1210
1242
|
unchecked: {
|
|
@@ -1228,11 +1260,13 @@ var textArea = {
|
|
|
1228
1260
|
};
|
|
1229
1261
|
|
|
1230
1262
|
var forms = {
|
|
1263
|
+
datePicker: datePicker,
|
|
1231
1264
|
input: input,
|
|
1232
1265
|
radio: radio,
|
|
1233
1266
|
inputField: inputField,
|
|
1234
1267
|
textArea: textArea,
|
|
1235
|
-
checkbox: checkbox
|
|
1268
|
+
checkbox: checkbox,
|
|
1269
|
+
inputTag: inputTag
|
|
1236
1270
|
};
|
|
1237
1271
|
|
|
1238
1272
|
var fullScreenModal = {
|
|
@@ -1535,6 +1569,16 @@ function Checkbox(_ref6) {
|
|
|
1535
1569
|
});
|
|
1536
1570
|
}
|
|
1537
1571
|
|
|
1572
|
+
function getInputUIState(_ref) {
|
|
1573
|
+
var isFocused = _ref.isFocused,
|
|
1574
|
+
isDisabled = _ref.isDisabled,
|
|
1575
|
+
formState = _ref.formState;
|
|
1576
|
+
if (isDisabled) return 'disabled';
|
|
1577
|
+
if (isFocused) return 'focus';
|
|
1578
|
+
if (formState === 'invalid') return 'invalid';
|
|
1579
|
+
return 'default';
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1538
1582
|
var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width:", "px;border-radius:", "px;border-color:", ";font-size:", ";color:", ";font-family:", ";"], function (_ref) {
|
|
1539
1583
|
var theme = _ref.theme,
|
|
1540
1584
|
$state = _ref.$state;
|
|
@@ -1562,75 +1606,666 @@ var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width
|
|
|
1562
1606
|
return theme.kitt.typography.types.bodies.fontFamily.regular;
|
|
1563
1607
|
});
|
|
1564
1608
|
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1609
|
+
var StyledTypographyText = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
1610
|
+
displayName: "DatePickerInputPart__StyledTypographyText",
|
|
1611
|
+
componentId: "kitt-universal__sc-11fmlmi-0"
|
|
1612
|
+
})(["text-align:center;"]);
|
|
1613
|
+
var ViewInput = /*#__PURE__*/styled$1(View).withConfig({
|
|
1614
|
+
displayName: "DatePickerInputPart__ViewInput",
|
|
1615
|
+
componentId: "kitt-universal__sc-11fmlmi-1"
|
|
1616
|
+
})(["", " padding:", ";min-height:", "px;min-width:", ";"], styledTextInputMixin, function (_ref) {
|
|
1617
|
+
var theme = _ref.theme;
|
|
1618
|
+
return theme.kitt.forms.input.padding["default"];
|
|
1619
|
+
}, function (_ref2) {
|
|
1620
|
+
var theme = _ref2.theme;
|
|
1621
|
+
return theme.kitt.forms.input.minHeight;
|
|
1622
|
+
}, function (_ref3) {
|
|
1623
|
+
var theme = _ref3.theme,
|
|
1624
|
+
$partName = _ref3.$partName;
|
|
1625
|
+
|
|
1626
|
+
if (!$partName) {
|
|
1627
|
+
return undefined;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
return "".concat(theme.kitt.forms.datePicker[$partName].minWidth, "px");
|
|
1631
|
+
});
|
|
1632
|
+
function DatePickerInputPart(_ref4) {
|
|
1633
|
+
var $state = _ref4.$state,
|
|
1634
|
+
placeholder = _ref4.placeholder,
|
|
1635
|
+
value = _ref4.value,
|
|
1636
|
+
partName = _ref4.partName,
|
|
1637
|
+
disabled = _ref4.disabled;
|
|
1638
|
+
return /*#__PURE__*/jsx(ViewInput, {
|
|
1639
|
+
$state: $state,
|
|
1640
|
+
$partName: partName,
|
|
1641
|
+
children: placeholder || value ? /*#__PURE__*/jsx(StyledTypographyText, {
|
|
1642
|
+
color: !value || disabled ? 'black-light' : undefined,
|
|
1643
|
+
children: value || placeholder
|
|
1644
|
+
}) : null
|
|
1645
|
+
});
|
|
1573
1646
|
}
|
|
1574
1647
|
|
|
1575
|
-
var
|
|
1576
|
-
|
|
1577
|
-
|
|
1648
|
+
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; }
|
|
1649
|
+
|
|
1650
|
+
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; }
|
|
1651
|
+
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
1652
|
+
var OverlayPressable = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
1653
|
+
displayName: "Overlay__OverlayPressable",
|
|
1654
|
+
componentId: "kitt-universal__sc-1cz1gbr-0"
|
|
1655
|
+
})(function (_ref) {
|
|
1656
|
+
var theme = _ref.theme;
|
|
1657
|
+
return _objectSpread$h(_objectSpread$h({}, StyleSheet.absoluteFillObject), {}, {
|
|
1658
|
+
backgroundColor: theme.kitt.colors.overlay.dark
|
|
1659
|
+
});
|
|
1660
|
+
});
|
|
1661
|
+
function Overlay(_ref2) {
|
|
1662
|
+
var onPress = _ref2.onPress;
|
|
1663
|
+
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
1664
|
+
accessibilityRole: "none",
|
|
1665
|
+
onPress: onPress,
|
|
1666
|
+
children: /*#__PURE__*/jsx(View, {})
|
|
1667
|
+
});
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
var BodyView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1671
|
+
displayName: "Body__BodyView",
|
|
1672
|
+
componentId: "kitt-universal__sc-17fwpo4-0"
|
|
1673
|
+
})(["padding:", "px ", "px;"], function (_ref) {
|
|
1674
|
+
var theme = _ref.theme;
|
|
1675
|
+
return theme.kitt.spacing * 6;
|
|
1676
|
+
}, function (_ref2) {
|
|
1677
|
+
var theme = _ref2.theme;
|
|
1678
|
+
return theme.kitt.spacing * 4;
|
|
1679
|
+
});
|
|
1680
|
+
function ModalBody(_ref3) {
|
|
1681
|
+
var children = _ref3.children;
|
|
1682
|
+
return /*#__PURE__*/jsx(ScrollView, {
|
|
1683
|
+
children: /*#__PURE__*/jsx(BodyView, {
|
|
1684
|
+
children: children
|
|
1685
|
+
})
|
|
1686
|
+
});
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
var FooterView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1690
|
+
displayName: "Footer__FooterView",
|
|
1691
|
+
componentId: "kitt-universal__sc-1ujq2dc-0"
|
|
1692
|
+
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
1693
|
+
var theme = _ref.theme;
|
|
1694
|
+
return theme.kitt.spacing * 4;
|
|
1695
|
+
}, function (_ref2) {
|
|
1696
|
+
var theme = _ref2.theme;
|
|
1697
|
+
return theme.kitt.colors.separator;
|
|
1698
|
+
});
|
|
1699
|
+
function ModalFooter(_ref3) {
|
|
1700
|
+
var children = _ref3.children;
|
|
1701
|
+
return /*#__PURE__*/jsx(FooterView, {
|
|
1702
|
+
children: children
|
|
1703
|
+
});
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
var _excluded$a = ["as", "children"];
|
|
1707
|
+
|
|
1708
|
+
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; }
|
|
1709
|
+
|
|
1710
|
+
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; }
|
|
1711
|
+
function StyleWebWrapper(_ref) {
|
|
1712
|
+
var as = _ref.as,
|
|
1713
|
+
children = _ref.children,
|
|
1714
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
1715
|
+
|
|
1716
|
+
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
1717
|
+
return /*#__PURE__*/jsx(as || 'div', _objectSpread$g(_objectSpread$g({}, props), {}, {
|
|
1718
|
+
children: children
|
|
1719
|
+
}));
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
var _excluded$9 = ["color", "disabled"];
|
|
1723
|
+
|
|
1724
|
+
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; }
|
|
1725
|
+
|
|
1726
|
+
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; }
|
|
1727
|
+
var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled("div")({
|
|
1728
|
+
name: "PressableIconButtonWebWrapper",
|
|
1729
|
+
"class": "p1nlccvg",
|
|
1578
1730
|
vars: {
|
|
1579
|
-
"
|
|
1580
|
-
var
|
|
1581
|
-
|
|
1731
|
+
"p1nlccvg-0": [function (_ref) {
|
|
1732
|
+
var theme = _ref.theme,
|
|
1733
|
+
$isDisabled = _ref.$isDisabled;
|
|
1734
|
+
return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.hover;
|
|
1582
1735
|
}],
|
|
1583
|
-
"
|
|
1584
|
-
var theme = _ref2.theme
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
duration = _theme$kitt$forms$inp.duration,
|
|
1588
|
-
timingFunction = _theme$kitt$forms$inp.timingFunction;
|
|
1589
|
-
return "".concat(property, " ").concat(duration, " ").concat(timingFunction);
|
|
1736
|
+
"p1nlccvg-2": [function (_ref2) {
|
|
1737
|
+
var theme = _ref2.theme,
|
|
1738
|
+
$isDisabled = _ref2.$isDisabled;
|
|
1739
|
+
return $isDisabled ? 1 : theme.kitt.iconButton.scale.medium.hover;
|
|
1590
1740
|
}],
|
|
1591
|
-
"
|
|
1741
|
+
"p1nlccvg-3": [function (_ref3) {
|
|
1592
1742
|
var theme = _ref3.theme,
|
|
1593
1743
|
$isDisabled = _ref3.$isDisabled;
|
|
1594
|
-
|
|
1595
|
-
return theme.kitt.forms.input.states.hover.borderColor;
|
|
1744
|
+
return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.active;
|
|
1596
1745
|
}],
|
|
1597
|
-
"
|
|
1746
|
+
"p1nlccvg-4": [function (_ref4) {
|
|
1598
1747
|
var theme = _ref4.theme,
|
|
1748
|
+
$isWhite = _ref4.$isWhite,
|
|
1599
1749
|
$isDisabled = _ref4.$isDisabled;
|
|
1600
|
-
if ($isDisabled) return theme.kitt.
|
|
1601
|
-
|
|
1750
|
+
if ($isDisabled) return theme.kitt.iconButton.disabled.backgroundColor;
|
|
1751
|
+
var _theme$kitt$iconButto = theme.kitt.iconButton,
|
|
1752
|
+
white = _theme$kitt$iconButto.white,
|
|
1753
|
+
defaultIconButton = _theme$kitt$iconButto["default"];
|
|
1754
|
+
if ($isWhite) return white.pressedBackgroundColor;
|
|
1755
|
+
return defaultIconButton.pressedBackgroundColor;
|
|
1602
1756
|
}]
|
|
1603
1757
|
}
|
|
1604
1758
|
}));
|
|
1759
|
+
var StyledPressableIconButton = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
1760
|
+
displayName: "PressableIconButton__StyledPressableIconButton",
|
|
1761
|
+
componentId: "kitt-universal__sc-1m6jo3s-0"
|
|
1762
|
+
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref5) {
|
|
1763
|
+
var theme = _ref5.theme;
|
|
1764
|
+
return theme.kitt.iconButton.borderRadius;
|
|
1765
|
+
}, function (_ref6) {
|
|
1766
|
+
var theme = _ref6.theme;
|
|
1767
|
+
return theme.kitt.iconButton.width;
|
|
1768
|
+
}, function (_ref7) {
|
|
1769
|
+
var theme = _ref7.theme;
|
|
1770
|
+
return theme.kitt.iconButton.height;
|
|
1771
|
+
}, function (_ref8) {
|
|
1772
|
+
var theme = _ref8.theme,
|
|
1773
|
+
disabled = _ref8.disabled;
|
|
1774
|
+
var iconButton = theme.kitt.iconButton;
|
|
1775
|
+
var transition = iconButton.transition;
|
|
1605
1776
|
|
|
1606
|
-
|
|
1777
|
+
if (disabled) {
|
|
1778
|
+
return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
|
|
1779
|
+
}
|
|
1607
1780
|
|
|
1608
|
-
|
|
1781
|
+
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
|
|
1782
|
+
});
|
|
1783
|
+
function PressableIconButton(_ref9) {
|
|
1784
|
+
var color = _ref9.color,
|
|
1785
|
+
disabled = _ref9.disabled,
|
|
1786
|
+
props = _objectWithoutProperties(_ref9, _excluded$9);
|
|
1609
1787
|
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1788
|
+
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
1789
|
+
as: PressableIconButtonWebWrapper,
|
|
1790
|
+
$isWhite: color === 'white',
|
|
1791
|
+
$isDisabled: Boolean(disabled),
|
|
1792
|
+
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$f(_objectSpread$f({}, props), {}, {
|
|
1793
|
+
disabled: disabled
|
|
1794
|
+
}))
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1617
1797
|
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1798
|
+
function PressableAnimatedContainer(_ref) {
|
|
1799
|
+
var children = _ref.children,
|
|
1800
|
+
color = _ref.color,
|
|
1801
|
+
disabled = _ref.disabled,
|
|
1802
|
+
onPress = _ref.onPress;
|
|
1803
|
+
return /*#__PURE__*/jsx(PressableIconButton, {
|
|
1804
|
+
accessibilityRole: "button",
|
|
1805
|
+
color: color,
|
|
1806
|
+
disabled: disabled,
|
|
1807
|
+
onPress: onPress,
|
|
1808
|
+
children: children
|
|
1809
|
+
});
|
|
1810
|
+
}
|
|
1621
1811
|
|
|
1622
|
-
|
|
1812
|
+
var IconButtonContentBorder = /*#__PURE__*/styled$1(View).withConfig({
|
|
1813
|
+
displayName: "IconButton__IconButtonContentBorder",
|
|
1814
|
+
componentId: "kitt-universal__sc-swelbf-0"
|
|
1815
|
+
})(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
|
|
1816
|
+
var theme = _ref.theme;
|
|
1817
|
+
return "".concat(theme.kitt.iconButton.borderWidth, "px solid");
|
|
1623
1818
|
}, function (_ref2) {
|
|
1624
1819
|
var theme = _ref2.theme,
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
1628
|
-
return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight, "px");
|
|
1820
|
+
disabled = _ref2.disabled;
|
|
1821
|
+
return disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor;
|
|
1629
1822
|
}, function (_ref3) {
|
|
1630
|
-
var
|
|
1631
|
-
return
|
|
1632
|
-
})
|
|
1633
|
-
var
|
|
1823
|
+
var theme = _ref3.theme;
|
|
1824
|
+
return theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth;
|
|
1825
|
+
}, function (_ref4) {
|
|
1826
|
+
var theme = _ref4.theme;
|
|
1827
|
+
return theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth;
|
|
1828
|
+
}, function (_ref5) {
|
|
1829
|
+
var theme = _ref5.theme;
|
|
1830
|
+
return theme.kitt.iconButton.borderRadius;
|
|
1831
|
+
});
|
|
1832
|
+
|
|
1833
|
+
function IconButtonContent(_ref6) {
|
|
1834
|
+
var disabled = _ref6.disabled,
|
|
1835
|
+
color = _ref6.color,
|
|
1836
|
+
icon = _ref6.icon;
|
|
1837
|
+
return /*#__PURE__*/jsx(IconButtonContentBorder, {
|
|
1838
|
+
disabled: disabled,
|
|
1839
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
1840
|
+
color: disabled ? 'black-light' : color,
|
|
1841
|
+
icon: icon
|
|
1842
|
+
})
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
function IconButton(_ref7) {
|
|
1847
|
+
var icon = _ref7.icon,
|
|
1848
|
+
color = _ref7.color,
|
|
1849
|
+
disabled = _ref7.disabled,
|
|
1850
|
+
testID = _ref7.testID,
|
|
1851
|
+
accessibilityLabel = _ref7.accessibilityLabel,
|
|
1852
|
+
accessibilityRole = _ref7.accessibilityRole,
|
|
1853
|
+
onPress = _ref7.onPress;
|
|
1854
|
+
return /*#__PURE__*/jsx(PressableAnimatedContainer, {
|
|
1855
|
+
color: color,
|
|
1856
|
+
disabled: disabled,
|
|
1857
|
+
testID: testID,
|
|
1858
|
+
accessibilityLabel: accessibilityLabel,
|
|
1859
|
+
accessibilityRole: accessibilityRole,
|
|
1860
|
+
onPress: onPress,
|
|
1861
|
+
children: /*#__PURE__*/jsx(IconButtonContent, {
|
|
1862
|
+
disabled: disabled,
|
|
1863
|
+
color: color,
|
|
1864
|
+
icon: icon
|
|
1865
|
+
})
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
1870
|
+
|
|
1871
|
+
var HeaderView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1872
|
+
displayName: "Header__HeaderView",
|
|
1873
|
+
componentId: "kitt-universal__sc-1iwabch-0"
|
|
1874
|
+
})(["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) {
|
|
1875
|
+
var theme = _ref.theme;
|
|
1876
|
+
return theme.kitt.spacing * 2;
|
|
1877
|
+
}, function (_ref2) {
|
|
1878
|
+
var theme = _ref2.theme;
|
|
1879
|
+
return theme.kitt.colors.separator;
|
|
1880
|
+
});
|
|
1881
|
+
var LeftIconView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1882
|
+
displayName: "Header__LeftIconView",
|
|
1883
|
+
componentId: "kitt-universal__sc-1iwabch-1"
|
|
1884
|
+
})(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
|
|
1885
|
+
var theme = _ref3.theme;
|
|
1886
|
+
return theme.kitt.spacing * 2;
|
|
1887
|
+
});
|
|
1888
|
+
var RightIconView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1889
|
+
displayName: "Header__RightIconView",
|
|
1890
|
+
componentId: "kitt-universal__sc-1iwabch-2"
|
|
1891
|
+
})(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
|
|
1892
|
+
var theme = _ref4.theme;
|
|
1893
|
+
return theme.kitt.spacing * 2;
|
|
1894
|
+
});
|
|
1895
|
+
var TitleView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1896
|
+
displayName: "Header__TitleView",
|
|
1897
|
+
componentId: "kitt-universal__sc-1iwabch-3"
|
|
1898
|
+
})(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
|
|
1899
|
+
var theme = _ref5.theme,
|
|
1900
|
+
isIconLeft = _ref5.isIconLeft;
|
|
1901
|
+
return isIconLeft ? 0 : theme.kitt.spacing * 2;
|
|
1902
|
+
});
|
|
1903
|
+
function ModalHeader(_ref6) {
|
|
1904
|
+
var left = _ref6.left,
|
|
1905
|
+
right = _ref6.right,
|
|
1906
|
+
children = _ref6.children;
|
|
1907
|
+
var onClose = useContext(OnCloseContext);
|
|
1908
|
+
var isIconLeft = !!left;
|
|
1909
|
+
return /*#__PURE__*/jsxs(HeaderView, {
|
|
1910
|
+
children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
|
|
1911
|
+
children: left
|
|
1912
|
+
}), /*#__PURE__*/jsx(TitleView, {
|
|
1913
|
+
isIconLeft: isIconLeft,
|
|
1914
|
+
children: children
|
|
1915
|
+
}), right !== undefined ? right : /*#__PURE__*/jsx(RightIconView, {
|
|
1916
|
+
children: /*#__PURE__*/jsx(IconButton, {
|
|
1917
|
+
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
1918
|
+
onPress: onClose
|
|
1919
|
+
})
|
|
1920
|
+
})]
|
|
1921
|
+
});
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
var ModalView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1925
|
+
displayName: "Modal__ModalView",
|
|
1926
|
+
componentId: "kitt-universal__sc-1xy2w5u-0"
|
|
1927
|
+
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
|
|
1928
|
+
var theme = _ref.theme;
|
|
1929
|
+
return theme.kitt.spacing * 20;
|
|
1930
|
+
}, function (_ref2) {
|
|
1931
|
+
var theme = _ref2.theme;
|
|
1932
|
+
return theme.kitt.spacing * 4;
|
|
1933
|
+
});
|
|
1934
|
+
var ContentView$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
1935
|
+
displayName: "Modal__ContentView",
|
|
1936
|
+
componentId: "kitt-universal__sc-1xy2w5u-1"
|
|
1937
|
+
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], function (_ref3) {
|
|
1938
|
+
var theme = _ref3.theme;
|
|
1939
|
+
return theme.kitt.card.borderRadius;
|
|
1940
|
+
}, function (_ref4) {
|
|
1941
|
+
var theme = _ref4.theme;
|
|
1942
|
+
return theme.kitt.colors.uiBackgroundLight;
|
|
1943
|
+
});
|
|
1944
|
+
function Modal(_ref5) {
|
|
1945
|
+
var visible = _ref5.visible,
|
|
1946
|
+
children = _ref5.children,
|
|
1947
|
+
onClose = _ref5.onClose,
|
|
1948
|
+
onEntered = _ref5.onEntered,
|
|
1949
|
+
onExited = _ref5.onExited;
|
|
1950
|
+
return /*#__PURE__*/jsx(OnCloseContext.Provider, {
|
|
1951
|
+
value: onClose,
|
|
1952
|
+
children: /*#__PURE__*/jsx(Modal$1, {
|
|
1953
|
+
transparent: true,
|
|
1954
|
+
animationType: "fade",
|
|
1955
|
+
visible: visible,
|
|
1956
|
+
onShow: onEntered,
|
|
1957
|
+
onDismiss: onExited,
|
|
1958
|
+
onRequestClose: onClose,
|
|
1959
|
+
children: /*#__PURE__*/jsxs(ModalView, {
|
|
1960
|
+
children: [/*#__PURE__*/jsx(Overlay, {
|
|
1961
|
+
onPress: onClose
|
|
1962
|
+
}), /*#__PURE__*/jsx(ContentView$1, {
|
|
1963
|
+
children: children
|
|
1964
|
+
})]
|
|
1965
|
+
})
|
|
1966
|
+
})
|
|
1967
|
+
});
|
|
1968
|
+
}
|
|
1969
|
+
Modal.Header = ModalHeader;
|
|
1970
|
+
Modal.Body = ModalBody;
|
|
1971
|
+
Modal.Footer = ModalFooter;
|
|
1972
|
+
|
|
1973
|
+
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; }
|
|
1974
|
+
|
|
1975
|
+
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; }
|
|
1976
|
+
|
|
1977
|
+
function getDatePickerDisplayMode() {
|
|
1978
|
+
return 'default';
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
function PlatformDateTimePicker(_ref) {
|
|
1982
|
+
var value = _ref.value,
|
|
1983
|
+
_ref$defaultDate = _ref.defaultDate,
|
|
1984
|
+
defaultDate = _ref$defaultDate === void 0 ? new Date() : _ref$defaultDate,
|
|
1985
|
+
maximumDate = _ref.maximumDate,
|
|
1986
|
+
minimuDate = _ref.minimuDate,
|
|
1987
|
+
testID = _ref.testID,
|
|
1988
|
+
_onChange = _ref.onChange;
|
|
1989
|
+
var displayMode = getDatePickerDisplayMode();
|
|
1990
|
+
var iosProps = {};
|
|
1991
|
+
return /*#__PURE__*/jsx(DateTimePicker, _objectSpread$e(_objectSpread$e({
|
|
1992
|
+
is24Hour: true,
|
|
1993
|
+
testID: testID,
|
|
1994
|
+
value: value || defaultDate,
|
|
1995
|
+
mode: "date",
|
|
1996
|
+
maximumDate: maximumDate,
|
|
1997
|
+
minimumDate: minimuDate,
|
|
1998
|
+
display: displayMode
|
|
1999
|
+
}, iosProps), {}, {
|
|
2000
|
+
onChange: function onChange(_event, date) {
|
|
2001
|
+
return _onChange(date);
|
|
2002
|
+
}
|
|
2003
|
+
}));
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
var _excluded$8 = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
2007
|
+
|
|
2008
|
+
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; }
|
|
2009
|
+
|
|
2010
|
+
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; }
|
|
2011
|
+
|
|
2012
|
+
function ModalTitle(_ref) {
|
|
2013
|
+
var children = _ref.children;
|
|
2014
|
+
return /*#__PURE__*/jsx(Modal.Header, {
|
|
2015
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
2016
|
+
base: "body",
|
|
2017
|
+
variant: "bold",
|
|
2018
|
+
children: children
|
|
2019
|
+
})
|
|
2020
|
+
});
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
function ModalPlatformDateTimePicker(_ref2) {
|
|
2024
|
+
var title = _ref2.title,
|
|
2025
|
+
isVisible = _ref2.isVisible,
|
|
2026
|
+
value = _ref2.value,
|
|
2027
|
+
validateButtonLabel = _ref2.validateButtonLabel,
|
|
2028
|
+
onClose = _ref2.onClose,
|
|
2029
|
+
onChange = _ref2.onChange,
|
|
2030
|
+
props = _objectWithoutProperties(_ref2, _excluded$8);
|
|
2031
|
+
|
|
2032
|
+
var _useState = useState(value),
|
|
2033
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2034
|
+
currentValue = _useState2[0],
|
|
2035
|
+
setCurrentValue = _useState2[1]; // Prevent unsynced value between the modal and its parent state
|
|
2036
|
+
|
|
2037
|
+
|
|
2038
|
+
return /*#__PURE__*/jsx(Modal, {
|
|
2039
|
+
visible: Boolean(isVisible),
|
|
2040
|
+
onClose: function handleClose() {
|
|
2041
|
+
setCurrentValue(value);
|
|
2042
|
+
onClose();
|
|
2043
|
+
},
|
|
2044
|
+
children: isVisible ? /*#__PURE__*/jsxs(Fragment, {
|
|
2045
|
+
children: [title ? /*#__PURE__*/jsx(ModalTitle, {
|
|
2046
|
+
children: title
|
|
2047
|
+
}) : null, /*#__PURE__*/jsx(Modal.Body, {
|
|
2048
|
+
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread$d(_objectSpread$d({}, props), {}, {
|
|
2049
|
+
value: currentValue,
|
|
2050
|
+
onChange: function handleChange(newDate) {
|
|
2051
|
+
setCurrentValue(function (prev) {
|
|
2052
|
+
return newDate || prev;
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
2055
|
+
}))
|
|
2056
|
+
}), /*#__PURE__*/jsx(Modal.Footer, {
|
|
2057
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
2058
|
+
stretch: true,
|
|
2059
|
+
type: "primary",
|
|
2060
|
+
onPress: function handleSubmit() {
|
|
2061
|
+
onChange(currentValue);
|
|
2062
|
+
},
|
|
2063
|
+
children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
|
|
2064
|
+
children: validateButtonLabel
|
|
2065
|
+
}) : /*#__PURE__*/jsx(FormattedMessage, {
|
|
2066
|
+
id: "kitt-universal.ModalDateTimePicker.confirm"
|
|
2067
|
+
})
|
|
2068
|
+
})
|
|
2069
|
+
})]
|
|
2070
|
+
}) : null
|
|
2071
|
+
});
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
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; }
|
|
2075
|
+
|
|
2076
|
+
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; }
|
|
2077
|
+
|
|
2078
|
+
function prefixWithZero(value) {
|
|
2079
|
+
return "".concat(value).padStart(2, '0');
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
var PartContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
2083
|
+
displayName: "DatePicker__PartContainer",
|
|
2084
|
+
componentId: "kitt-universal__sc-ebllsn-0"
|
|
2085
|
+
})(["margin-right:", ";", ";"], function (_ref) {
|
|
2086
|
+
var theme = _ref.theme,
|
|
2087
|
+
$isLast = _ref.$isLast;
|
|
2088
|
+
return !$isLast ? "".concat(theme.kitt.spacing * 2, "px") : 0;
|
|
2089
|
+
}, function (_ref2) {
|
|
2090
|
+
var $isStretch = _ref2.$isStretch;
|
|
2091
|
+
return $isStretch ? css(["flex:0.33;flex-grow:1;"]) : undefined;
|
|
2092
|
+
});
|
|
2093
|
+
var DatePickerPressable = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
2094
|
+
displayName: "DatePicker__DatePickerPressable",
|
|
2095
|
+
componentId: "kitt-universal__sc-ebllsn-1"
|
|
2096
|
+
})(["display:flex;flex-direction:row;", ";"], function (_ref3) {
|
|
2097
|
+
var $isStretch = _ref3.$isStretch;
|
|
2098
|
+
|
|
2099
|
+
if ($isStretch) {
|
|
2100
|
+
return css(["width:100%;"]);
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
return css(["align-self:baseline;"]);
|
|
2104
|
+
});
|
|
2105
|
+
function DatePicker(_ref4) {
|
|
2106
|
+
var value = _ref4.value,
|
|
2107
|
+
id = _ref4.id,
|
|
2108
|
+
disabled = _ref4.disabled,
|
|
2109
|
+
placeholder = _ref4.placeholder,
|
|
2110
|
+
state = _ref4.state,
|
|
2111
|
+
internalForceState = _ref4.internalForceState,
|
|
2112
|
+
testID = _ref4.testID,
|
|
2113
|
+
stretch = _ref4.stretch,
|
|
2114
|
+
pickerDefaultDate = _ref4.pickerDefaultDate,
|
|
2115
|
+
pickerUITestID = _ref4.pickerUITestID,
|
|
2116
|
+
pickerUITitle = _ref4.pickerUITitle,
|
|
2117
|
+
pickerUIValidateButtonLabel = _ref4.pickerUIValidateButtonLabel,
|
|
2118
|
+
onChange = _ref4.onChange,
|
|
2119
|
+
onFocus = _ref4.onFocus,
|
|
2120
|
+
onBlur = _ref4.onBlur;
|
|
2121
|
+
|
|
2122
|
+
var _useState = useState(false),
|
|
2123
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2124
|
+
isPickerUIVisible = _useState2[0],
|
|
2125
|
+
setIsPickerUIVisible = _useState2[1];
|
|
2126
|
+
|
|
2127
|
+
var _useState3 = useState(false),
|
|
2128
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2129
|
+
isFocused = _useState4[0],
|
|
2130
|
+
setIsFocused = _useState4[1];
|
|
2131
|
+
|
|
2132
|
+
var _useState5 = useState(value),
|
|
2133
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
2134
|
+
currentValue = _useState6[0],
|
|
2135
|
+
setCurrentValue = _useState6[1];
|
|
2136
|
+
|
|
2137
|
+
var handleModalClose = function () {
|
|
2138
|
+
if (onBlur) onBlur();
|
|
2139
|
+
setIsPickerUIVisible(false);
|
|
2140
|
+
setIsFocused(false);
|
|
2141
|
+
};
|
|
2142
|
+
|
|
2143
|
+
var handleChange = function (newDate) {
|
|
2144
|
+
setCurrentValue(newDate);
|
|
2145
|
+
onChange(newDate);
|
|
2146
|
+
handleModalClose();
|
|
2147
|
+
};
|
|
2148
|
+
|
|
2149
|
+
var currentState = internalForceState || getInputUIState({
|
|
2150
|
+
isFocused: isFocused,
|
|
2151
|
+
isDisabled: Boolean(disabled),
|
|
2152
|
+
formState: state
|
|
2153
|
+
});
|
|
2154
|
+
var sharedPickerProps = {
|
|
2155
|
+
testID: pickerUITestID,
|
|
2156
|
+
value: currentValue,
|
|
2157
|
+
onChange: handleChange
|
|
2158
|
+
};
|
|
2159
|
+
var sharedPartProps = {
|
|
2160
|
+
disabled: disabled,
|
|
2161
|
+
$state: currentState,
|
|
2162
|
+
defaultDate: pickerDefaultDate
|
|
2163
|
+
};
|
|
2164
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
2165
|
+
children: [/*#__PURE__*/jsxs(DatePickerPressable, {
|
|
2166
|
+
$isStretch: stretch,
|
|
2167
|
+
nativeID: id,
|
|
2168
|
+
disabled: disabled,
|
|
2169
|
+
testID: testID,
|
|
2170
|
+
onPress: function handleModalOpen() {
|
|
2171
|
+
if (onFocus) onFocus();
|
|
2172
|
+
setIsPickerUIVisible(true);
|
|
2173
|
+
setIsFocused(true);
|
|
2174
|
+
},
|
|
2175
|
+
children: [/*#__PURE__*/jsx(PartContainer, {
|
|
2176
|
+
$isStretch: stretch,
|
|
2177
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$c(_objectSpread$c({}, sharedPartProps), {}, {
|
|
2178
|
+
partName: "day",
|
|
2179
|
+
value: currentValue ? prefixWithZero(currentValue.getDate()) : undefined,
|
|
2180
|
+
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day
|
|
2181
|
+
}))
|
|
2182
|
+
}), /*#__PURE__*/jsx(PartContainer, {
|
|
2183
|
+
$isStretch: stretch,
|
|
2184
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$c(_objectSpread$c({}, sharedPartProps), {}, {
|
|
2185
|
+
partName: "month",
|
|
2186
|
+
value: currentValue ? prefixWithZero(currentValue.getMonth() + 1) : undefined,
|
|
2187
|
+
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month
|
|
2188
|
+
}))
|
|
2189
|
+
}), /*#__PURE__*/jsx(PartContainer, {
|
|
2190
|
+
$isLast: true,
|
|
2191
|
+
$isStretch: stretch,
|
|
2192
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$c(_objectSpread$c({}, sharedPartProps), {}, {
|
|
2193
|
+
partName: "year",
|
|
2194
|
+
value: currentValue === null || currentValue === void 0 ? void 0 : currentValue.getFullYear(),
|
|
2195
|
+
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year
|
|
2196
|
+
}))
|
|
2197
|
+
})]
|
|
2198
|
+
}), /*#__PURE__*/jsxs(Fragment, {
|
|
2199
|
+
children: [null, /*#__PURE__*/jsx(ModalPlatformDateTimePicker, _objectSpread$c(_objectSpread$c({}, sharedPickerProps), {}, {
|
|
2200
|
+
isVisible: isPickerUIVisible,
|
|
2201
|
+
title: pickerUITitle,
|
|
2202
|
+
validateButtonLabel: pickerUIValidateButtonLabel,
|
|
2203
|
+
onClose: handleModalClose,
|
|
2204
|
+
onChange: handleChange
|
|
2205
|
+
}))]
|
|
2206
|
+
})]
|
|
2207
|
+
});
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
var InputTextContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
2211
|
+
name: "InputTextContainer",
|
|
2212
|
+
"class": "i1encr9g",
|
|
2213
|
+
vars: {
|
|
2214
|
+
"i1encr9g-0": [function (_ref) {
|
|
2215
|
+
var $isDisabled = _ref.$isDisabled;
|
|
2216
|
+
return $isDisabled ? 'not-allowed' : 'inherit';
|
|
2217
|
+
}],
|
|
2218
|
+
"i1encr9g-1": [function (_ref2) {
|
|
2219
|
+
var theme = _ref2.theme;
|
|
2220
|
+
var _theme$kitt$forms$inp = theme.kitt.forms.input.transition,
|
|
2221
|
+
property = _theme$kitt$forms$inp.property,
|
|
2222
|
+
duration = _theme$kitt$forms$inp.duration,
|
|
2223
|
+
timingFunction = _theme$kitt$forms$inp.timingFunction;
|
|
2224
|
+
return "".concat(property, " ").concat(duration, " ").concat(timingFunction);
|
|
2225
|
+
}],
|
|
2226
|
+
"i1encr9g-2": [function (_ref3) {
|
|
2227
|
+
var theme = _ref3.theme,
|
|
2228
|
+
$isDisabled = _ref3.$isDisabled;
|
|
2229
|
+
if ($isDisabled) return theme.kitt.forms.input.states.disabled.borderColor;
|
|
2230
|
+
return theme.kitt.forms.input.states.hover.borderColor;
|
|
2231
|
+
}],
|
|
2232
|
+
"i1encr9g-3": [function (_ref4) {
|
|
2233
|
+
var theme = _ref4.theme,
|
|
2234
|
+
$isDisabled = _ref4.$isDisabled;
|
|
2235
|
+
if ($isDisabled) return theme.kitt.forms.input.states.disabled.borderColor;
|
|
2236
|
+
return theme.kitt.forms.input.states.focus.borderColor;
|
|
2237
|
+
}]
|
|
2238
|
+
}
|
|
2239
|
+
}));
|
|
2240
|
+
|
|
2241
|
+
var _excluded$7 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
2242
|
+
|
|
2243
|
+
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; }
|
|
2244
|
+
|
|
2245
|
+
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; }
|
|
2246
|
+
var StyledTextInput = /*#__PURE__*/styled$1(TextInput).withConfig({
|
|
2247
|
+
displayName: "InputText__StyledTextInput",
|
|
2248
|
+
componentId: "kitt-universal__sc-uke279-0"
|
|
2249
|
+
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
2250
|
+
var theme = _ref.theme,
|
|
2251
|
+
multiline = _ref.multiline;
|
|
2252
|
+
|
|
2253
|
+
if (!multiline && "web" === 'ios') {
|
|
2254
|
+
return theme.kitt.forms.input.padding.iOSSingleLine;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
return theme.kitt.forms.input.padding["default"];
|
|
2258
|
+
}, function (_ref2) {
|
|
2259
|
+
var theme = _ref2.theme,
|
|
2260
|
+
multiline = _ref2.multiline;
|
|
2261
|
+
if (!multiline && "web" === 'ios') return 0;
|
|
2262
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
2263
|
+
return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight, "px");
|
|
2264
|
+
}, function (_ref3) {
|
|
2265
|
+
var $minHeight = _ref3.$minHeight;
|
|
2266
|
+
return $minHeight;
|
|
2267
|
+
});
|
|
2268
|
+
var RightInputContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1634
2269
|
displayName: "InputText__RightInputContainer",
|
|
1635
2270
|
componentId: "kitt-universal__sc-uke279-1"
|
|
1636
2271
|
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:10px;"]);
|
|
@@ -1653,7 +2288,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
1653
2288
|
keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
|
|
1654
2289
|
_onFocus = _ref4.onFocus,
|
|
1655
2290
|
_onBlur = _ref4.onBlur,
|
|
1656
|
-
props = _objectWithoutProperties(_ref4, _excluded$
|
|
2291
|
+
props = _objectWithoutProperties(_ref4, _excluded$7);
|
|
1657
2292
|
|
|
1658
2293
|
var theme = /*#__PURE__*/useTheme();
|
|
1659
2294
|
|
|
@@ -1669,7 +2304,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
1669
2304
|
});
|
|
1670
2305
|
return /*#__PURE__*/jsxs(InputTextContainer, {
|
|
1671
2306
|
$isDisabled: disabled,
|
|
1672
|
-
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread$
|
|
2307
|
+
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread$b(_objectSpread$b({
|
|
1673
2308
|
ref: ref,
|
|
1674
2309
|
nativeID: id,
|
|
1675
2310
|
editable: !disabled,
|
|
@@ -1696,11 +2331,11 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
1696
2331
|
});
|
|
1697
2332
|
});
|
|
1698
2333
|
|
|
1699
|
-
function ownKeys$
|
|
2334
|
+
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; }
|
|
1700
2335
|
|
|
1701
|
-
function _objectSpread$
|
|
2336
|
+
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; }
|
|
1702
2337
|
function InputEmail(props) {
|
|
1703
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$
|
|
2338
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$a({
|
|
1704
2339
|
autoCompleteType: "email",
|
|
1705
2340
|
keyboardType: "email-address",
|
|
1706
2341
|
textContentType: "emailAddress"
|
|
@@ -1801,31 +2436,31 @@ function InputIcon(_ref) {
|
|
|
1801
2436
|
});
|
|
1802
2437
|
}
|
|
1803
2438
|
|
|
1804
|
-
function ownKeys$
|
|
2439
|
+
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; }
|
|
1805
2440
|
|
|
1806
|
-
function _objectSpread$
|
|
2441
|
+
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; }
|
|
1807
2442
|
function InputPressable(_ref) {
|
|
1808
2443
|
var props = _extends({}, _ref);
|
|
1809
2444
|
|
|
1810
|
-
return /*#__PURE__*/jsx(Pressable, _objectSpread$
|
|
2445
|
+
return /*#__PURE__*/jsx(Pressable, _objectSpread$9({}, props));
|
|
1811
2446
|
}
|
|
1812
2447
|
|
|
1813
|
-
var _excluded$
|
|
2448
|
+
var _excluded$6 = ["isPasswordDefaultVisible", "right"];
|
|
1814
2449
|
|
|
1815
|
-
function ownKeys$
|
|
2450
|
+
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; }
|
|
1816
2451
|
|
|
1817
|
-
function _objectSpread$
|
|
2452
|
+
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; }
|
|
1818
2453
|
function InputPassword(_ref) {
|
|
1819
2454
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
1820
2455
|
right = _ref.right,
|
|
1821
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2456
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
1822
2457
|
|
|
1823
2458
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
1824
2459
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1825
2460
|
isVisible = _useState2[0],
|
|
1826
2461
|
setIsVisible = _useState2[1];
|
|
1827
2462
|
|
|
1828
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$
|
|
2463
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$8(_objectSpread$8({}, props), {}, {
|
|
1829
2464
|
textContentType: "password",
|
|
1830
2465
|
autoCompleteType: "password",
|
|
1831
2466
|
autoCorrect: false,
|
|
@@ -1844,17 +2479,73 @@ function InputPassword(_ref) {
|
|
|
1844
2479
|
}));
|
|
1845
2480
|
}
|
|
1846
2481
|
|
|
1847
|
-
function ownKeys$
|
|
2482
|
+
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; }
|
|
1848
2483
|
|
|
1849
|
-
function _objectSpread$
|
|
2484
|
+
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; }
|
|
1850
2485
|
function InputPhone(props) {
|
|
1851
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$
|
|
2486
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
1852
2487
|
autoCompleteType: "tel",
|
|
1853
2488
|
keyboardType: "number-pad",
|
|
1854
2489
|
textContentType: "telephoneNumber"
|
|
1855
2490
|
}));
|
|
1856
2491
|
}
|
|
1857
2492
|
|
|
2493
|
+
var getTypographyColor = function (type) {
|
|
2494
|
+
return type ? 'white' : 'black';
|
|
2495
|
+
};
|
|
2496
|
+
|
|
2497
|
+
var InputTagContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
2498
|
+
displayName: "InputTag__InputTagContainer",
|
|
2499
|
+
componentId: "kitt-universal__sc-1511dsf-0"
|
|
2500
|
+
})(["align-items:center;justify-content:center;flex-direction:row;align-self:flex-start;overflow:hidden;padding-horizontal:", "px;background-color:", ";border-radius:", "px;"], function (_ref) {
|
|
2501
|
+
var theme = _ref.theme;
|
|
2502
|
+
return theme.kitt.spacing * 2;
|
|
2503
|
+
}, function (_ref2) {
|
|
2504
|
+
var theme = _ref2.theme,
|
|
2505
|
+
type = _ref2.type;
|
|
2506
|
+
|
|
2507
|
+
if (type === 'success') {
|
|
2508
|
+
return theme.kitt.forms.inputTag.success.backgroundColor;
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
if (type === 'danger') {
|
|
2512
|
+
return theme.kitt.forms.inputTag.danger.backgroundColor;
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
return theme.kitt.forms.inputTag["default"].backgroundColor;
|
|
2516
|
+
}, function (_ref3) {
|
|
2517
|
+
var theme = _ref3.theme;
|
|
2518
|
+
return theme.kitt.forms.inputTag.borderRadius;
|
|
2519
|
+
});
|
|
2520
|
+
var IconContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
2521
|
+
displayName: "InputTag__IconContainer",
|
|
2522
|
+
componentId: "kitt-universal__sc-1511dsf-1"
|
|
2523
|
+
})(["margin-right:", "px;"], function (_ref4) {
|
|
2524
|
+
var theme = _ref4.theme;
|
|
2525
|
+
return theme.kitt.spacing;
|
|
2526
|
+
});
|
|
2527
|
+
function InputTag(_ref5) {
|
|
2528
|
+
var children = _ref5.children,
|
|
2529
|
+
type = _ref5.type,
|
|
2530
|
+
icon = _ref5.icon;
|
|
2531
|
+
var typographyColor = getTypographyColor(type);
|
|
2532
|
+
var theme = useKittTheme();
|
|
2533
|
+
return /*#__PURE__*/jsxs(InputTagContainer, {
|
|
2534
|
+
type: type,
|
|
2535
|
+
children: [icon && /*#__PURE__*/jsx(IconContainer, {
|
|
2536
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
2537
|
+
icon: icon,
|
|
2538
|
+
size: theme.kitt.forms.inputTag.iconSize,
|
|
2539
|
+
color: typographyColor
|
|
2540
|
+
})
|
|
2541
|
+
}), /*#__PURE__*/jsx(Typography.Text, {
|
|
2542
|
+
base: "body-small",
|
|
2543
|
+
color: typographyColor,
|
|
2544
|
+
children: children
|
|
2545
|
+
})]
|
|
2546
|
+
});
|
|
2547
|
+
}
|
|
2548
|
+
|
|
1858
2549
|
function Label(_ref) {
|
|
1859
2550
|
var htmlFor = _ref.htmlFor,
|
|
1860
2551
|
children = _ref.children;
|
|
@@ -1963,14 +2654,14 @@ function Radio(_ref16) {
|
|
|
1963
2654
|
});
|
|
1964
2655
|
}
|
|
1965
2656
|
|
|
1966
|
-
function ownKeys$
|
|
2657
|
+
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; }
|
|
1967
2658
|
|
|
1968
|
-
function _objectSpread$
|
|
2659
|
+
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; }
|
|
1969
2660
|
function TextArea(_ref) {
|
|
1970
2661
|
var props = _extends({}, _ref);
|
|
1971
2662
|
|
|
1972
2663
|
var theme = /*#__PURE__*/useTheme();
|
|
1973
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$
|
|
2664
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$6({
|
|
1974
2665
|
multiline: true,
|
|
1975
2666
|
textAlignVertical: "top",
|
|
1976
2667
|
minHeight: theme.kitt.forms.textArea.minHeight
|
|
@@ -2101,214 +2792,51 @@ function FullScreenModalHeader(_ref6) {
|
|
|
2101
2792
|
|
|
2102
2793
|
setRightWidth(event.nativeEvent.layout.width);
|
|
2103
2794
|
};
|
|
2104
|
-
|
|
2105
|
-
return /*#__PURE__*/jsxs(Header, {
|
|
2106
|
-
insetTop: top,
|
|
2107
|
-
children: [left ? /*#__PURE__*/jsx(SideContainer, {
|
|
2108
|
-
onLayout: function onLayout(e) {
|
|
2109
|
-
return handleLayoutChange(e, 'left');
|
|
2110
|
-
},
|
|
2111
|
-
children: left
|
|
2112
|
-
}) : null, /*#__PURE__*/jsx(HeaderContent, {
|
|
2113
|
-
windowWidth: dimensions.width,
|
|
2114
|
-
leftWidth: leftWidth,
|
|
2115
|
-
rightWidth: rightWidth,
|
|
2116
|
-
children: children
|
|
2117
|
-
}), right ? /*#__PURE__*/jsx(SideContainer, {
|
|
2118
|
-
side: "right",
|
|
2119
|
-
onLayout: function onLayout(e) {
|
|
2120
|
-
return handleLayoutChange(e, 'right');
|
|
2121
|
-
},
|
|
2122
|
-
children: right
|
|
2123
|
-
}) : null]
|
|
2124
|
-
});
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
var Container$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
2128
|
-
displayName: "FullScreenModal__Container",
|
|
2129
|
-
componentId: "kitt-universal__sc-11qpbe3-0"
|
|
2130
|
-
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
2131
|
-
var theme = _ref.theme;
|
|
2132
|
-
return theme.kitt.colors.uiBackground;
|
|
2133
|
-
});
|
|
2134
|
-
function FullScreenModal(_ref2) {
|
|
2135
|
-
var children = _ref2.children;
|
|
2136
|
-
return /*#__PURE__*/jsx(Container$1, {
|
|
2137
|
-
children: children
|
|
2138
|
-
});
|
|
2139
|
-
}
|
|
2140
|
-
FullScreenModal.Header = FullScreenModalHeader;
|
|
2141
|
-
FullScreenModal.Body = FullScreenModalBody;
|
|
2142
|
-
|
|
2143
|
-
var _excluded$7 = ["as", "children"];
|
|
2144
|
-
|
|
2145
|
-
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; }
|
|
2146
|
-
|
|
2147
|
-
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; }
|
|
2148
|
-
function StyleWebWrapper(_ref) {
|
|
2149
|
-
var as = _ref.as,
|
|
2150
|
-
children = _ref.children,
|
|
2151
|
-
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
2152
|
-
|
|
2153
|
-
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
2154
|
-
return /*#__PURE__*/jsx(as || 'div', _objectSpread$8(_objectSpread$8({}, props), {}, {
|
|
2155
|
-
children: children
|
|
2156
|
-
}));
|
|
2157
|
-
}
|
|
2158
|
-
|
|
2159
|
-
var _excluded$6 = ["color", "disabled"];
|
|
2160
|
-
|
|
2161
|
-
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; }
|
|
2162
|
-
|
|
2163
|
-
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; }
|
|
2164
|
-
var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled("div")({
|
|
2165
|
-
name: "PressableIconButtonWebWrapper",
|
|
2166
|
-
"class": "p1nlccvg",
|
|
2167
|
-
vars: {
|
|
2168
|
-
"p1nlccvg-0": [function (_ref) {
|
|
2169
|
-
var theme = _ref.theme,
|
|
2170
|
-
$isDisabled = _ref.$isDisabled;
|
|
2171
|
-
return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.hover;
|
|
2172
|
-
}],
|
|
2173
|
-
"p1nlccvg-2": [function (_ref2) {
|
|
2174
|
-
var theme = _ref2.theme,
|
|
2175
|
-
$isDisabled = _ref2.$isDisabled;
|
|
2176
|
-
return $isDisabled ? 1 : theme.kitt.iconButton.scale.medium.hover;
|
|
2177
|
-
}],
|
|
2178
|
-
"p1nlccvg-3": [function (_ref3) {
|
|
2179
|
-
var theme = _ref3.theme,
|
|
2180
|
-
$isDisabled = _ref3.$isDisabled;
|
|
2181
|
-
return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.active;
|
|
2182
|
-
}],
|
|
2183
|
-
"p1nlccvg-4": [function (_ref4) {
|
|
2184
|
-
var theme = _ref4.theme,
|
|
2185
|
-
$isWhite = _ref4.$isWhite,
|
|
2186
|
-
$isDisabled = _ref4.$isDisabled;
|
|
2187
|
-
if ($isDisabled) return theme.kitt.iconButton.disabled.backgroundColor;
|
|
2188
|
-
var _theme$kitt$iconButto = theme.kitt.iconButton,
|
|
2189
|
-
white = _theme$kitt$iconButto.white,
|
|
2190
|
-
defaultIconButton = _theme$kitt$iconButto["default"];
|
|
2191
|
-
if ($isWhite) return white.pressedBackgroundColor;
|
|
2192
|
-
return defaultIconButton.pressedBackgroundColor;
|
|
2193
|
-
}]
|
|
2194
|
-
}
|
|
2195
|
-
}));
|
|
2196
|
-
var StyledPressableIconButton = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
2197
|
-
displayName: "PressableIconButton__StyledPressableIconButton",
|
|
2198
|
-
componentId: "kitt-universal__sc-1m6jo3s-0"
|
|
2199
|
-
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref5) {
|
|
2200
|
-
var theme = _ref5.theme;
|
|
2201
|
-
return theme.kitt.iconButton.borderRadius;
|
|
2202
|
-
}, function (_ref6) {
|
|
2203
|
-
var theme = _ref6.theme;
|
|
2204
|
-
return theme.kitt.iconButton.width;
|
|
2205
|
-
}, function (_ref7) {
|
|
2206
|
-
var theme = _ref7.theme;
|
|
2207
|
-
return theme.kitt.iconButton.height;
|
|
2208
|
-
}, function (_ref8) {
|
|
2209
|
-
var theme = _ref8.theme,
|
|
2210
|
-
disabled = _ref8.disabled;
|
|
2211
|
-
var iconButton = theme.kitt.iconButton;
|
|
2212
|
-
var transition = iconButton.transition;
|
|
2213
|
-
|
|
2214
|
-
if (disabled) {
|
|
2215
|
-
return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
|
|
2216
|
-
}
|
|
2217
|
-
|
|
2218
|
-
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
|
|
2219
|
-
});
|
|
2220
|
-
function PressableIconButton(_ref9) {
|
|
2221
|
-
var color = _ref9.color,
|
|
2222
|
-
disabled = _ref9.disabled,
|
|
2223
|
-
props = _objectWithoutProperties(_ref9, _excluded$6);
|
|
2224
|
-
|
|
2225
|
-
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
2226
|
-
as: PressableIconButtonWebWrapper,
|
|
2227
|
-
$isWhite: color === 'white',
|
|
2228
|
-
$isDisabled: Boolean(disabled),
|
|
2229
|
-
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
2230
|
-
disabled: disabled
|
|
2231
|
-
}))
|
|
2232
|
-
});
|
|
2233
|
-
}
|
|
2234
|
-
|
|
2235
|
-
function PressableAnimatedContainer(_ref) {
|
|
2236
|
-
var children = _ref.children,
|
|
2237
|
-
color = _ref.color,
|
|
2238
|
-
disabled = _ref.disabled,
|
|
2239
|
-
onPress = _ref.onPress;
|
|
2240
|
-
return /*#__PURE__*/jsx(PressableIconButton, {
|
|
2241
|
-
accessibilityRole: "button",
|
|
2242
|
-
color: color,
|
|
2243
|
-
disabled: disabled,
|
|
2244
|
-
onPress: onPress,
|
|
2245
|
-
children: children
|
|
2795
|
+
|
|
2796
|
+
return /*#__PURE__*/jsxs(Header, {
|
|
2797
|
+
insetTop: top,
|
|
2798
|
+
children: [left ? /*#__PURE__*/jsx(SideContainer, {
|
|
2799
|
+
onLayout: function onLayout(e) {
|
|
2800
|
+
return handleLayoutChange(e, 'left');
|
|
2801
|
+
},
|
|
2802
|
+
children: left
|
|
2803
|
+
}) : null, /*#__PURE__*/jsx(HeaderContent, {
|
|
2804
|
+
windowWidth: dimensions.width,
|
|
2805
|
+
leftWidth: leftWidth,
|
|
2806
|
+
rightWidth: rightWidth,
|
|
2807
|
+
children: children
|
|
2808
|
+
}), right ? /*#__PURE__*/jsx(SideContainer, {
|
|
2809
|
+
side: "right",
|
|
2810
|
+
onLayout: function onLayout(e) {
|
|
2811
|
+
return handleLayoutChange(e, 'right');
|
|
2812
|
+
},
|
|
2813
|
+
children: right
|
|
2814
|
+
}) : null]
|
|
2246
2815
|
});
|
|
2247
2816
|
}
|
|
2248
2817
|
|
|
2249
|
-
var
|
|
2250
|
-
displayName: "
|
|
2251
|
-
componentId: "kitt-universal__sc-
|
|
2252
|
-
})(["
|
|
2818
|
+
var Container$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
2819
|
+
displayName: "FullScreenModal__Container",
|
|
2820
|
+
componentId: "kitt-universal__sc-11qpbe3-0"
|
|
2821
|
+
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
2253
2822
|
var theme = _ref.theme;
|
|
2254
|
-
return
|
|
2255
|
-
}, function (_ref2) {
|
|
2256
|
-
var theme = _ref2.theme,
|
|
2257
|
-
disabled = _ref2.disabled;
|
|
2258
|
-
return disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor;
|
|
2259
|
-
}, function (_ref3) {
|
|
2260
|
-
var theme = _ref3.theme;
|
|
2261
|
-
return theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth;
|
|
2262
|
-
}, function (_ref4) {
|
|
2263
|
-
var theme = _ref4.theme;
|
|
2264
|
-
return theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth;
|
|
2265
|
-
}, function (_ref5) {
|
|
2266
|
-
var theme = _ref5.theme;
|
|
2267
|
-
return theme.kitt.iconButton.borderRadius;
|
|
2823
|
+
return theme.kitt.colors.uiBackground;
|
|
2268
2824
|
});
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
icon = _ref6.icon;
|
|
2274
|
-
return /*#__PURE__*/jsx(IconButtonContentBorder, {
|
|
2275
|
-
disabled: disabled,
|
|
2276
|
-
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
2277
|
-
color: disabled ? 'black-light' : color,
|
|
2278
|
-
icon: icon
|
|
2279
|
-
})
|
|
2280
|
-
});
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
function IconButton(_ref7) {
|
|
2284
|
-
var icon = _ref7.icon,
|
|
2285
|
-
color = _ref7.color,
|
|
2286
|
-
disabled = _ref7.disabled,
|
|
2287
|
-
testID = _ref7.testID,
|
|
2288
|
-
accessibilityLabel = _ref7.accessibilityLabel,
|
|
2289
|
-
accessibilityRole = _ref7.accessibilityRole,
|
|
2290
|
-
onPress = _ref7.onPress;
|
|
2291
|
-
return /*#__PURE__*/jsx(PressableAnimatedContainer, {
|
|
2292
|
-
color: color,
|
|
2293
|
-
disabled: disabled,
|
|
2294
|
-
testID: testID,
|
|
2295
|
-
accessibilityLabel: accessibilityLabel,
|
|
2296
|
-
accessibilityRole: accessibilityRole,
|
|
2297
|
-
onPress: onPress,
|
|
2298
|
-
children: /*#__PURE__*/jsx(IconButtonContent, {
|
|
2299
|
-
disabled: disabled,
|
|
2300
|
-
color: color,
|
|
2301
|
-
icon: icon
|
|
2302
|
-
})
|
|
2825
|
+
function FullScreenModal(_ref2) {
|
|
2826
|
+
var children = _ref2.children;
|
|
2827
|
+
return /*#__PURE__*/jsx(Container$1, {
|
|
2828
|
+
children: children
|
|
2303
2829
|
});
|
|
2304
2830
|
}
|
|
2831
|
+
FullScreenModal.Header = FullScreenModalHeader;
|
|
2832
|
+
FullScreenModal.Body = FullScreenModalBody;
|
|
2305
2833
|
|
|
2306
2834
|
var _excluded$5 = ["children"];
|
|
2307
2835
|
|
|
2308
|
-
function ownKeys$
|
|
2836
|
+
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; }
|
|
2309
2837
|
|
|
2310
|
-
function _objectSpread$
|
|
2311
|
-
var ContentView
|
|
2838
|
+
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; }
|
|
2839
|
+
var ContentView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2312
2840
|
displayName: "ListItemContent__ContentView",
|
|
2313
2841
|
componentId: "kitt-universal__sc-57q0u9-0"
|
|
2314
2842
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
@@ -2316,7 +2844,7 @@ function ListItemContent(_ref) {
|
|
|
2316
2844
|
var children = _ref.children,
|
|
2317
2845
|
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
2318
2846
|
|
|
2319
|
-
return /*#__PURE__*/jsx(ContentView
|
|
2847
|
+
return /*#__PURE__*/jsx(ContentView, _objectSpread$5(_objectSpread$5({}, rest), {}, {
|
|
2320
2848
|
children: children
|
|
2321
2849
|
}));
|
|
2322
2850
|
}
|
|
@@ -2324,9 +2852,9 @@ function ListItemContent(_ref) {
|
|
|
2324
2852
|
var _excluded$4 = ["children", "side"],
|
|
2325
2853
|
_excluded2$1 = ["children", "align"];
|
|
2326
2854
|
|
|
2327
|
-
function ownKeys$
|
|
2855
|
+
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2328
2856
|
|
|
2329
|
-
function _objectSpread$
|
|
2857
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2330
2858
|
var SideContainerView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2331
2859
|
displayName: "ListItemSideContent__SideContainerView",
|
|
2332
2860
|
componentId: "kitt-universal__sc-1vajiw-0"
|
|
@@ -2346,7 +2874,7 @@ function ListItemSideContainer(_ref3) {
|
|
|
2346
2874
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
2347
2875
|
rest = _objectWithoutProperties(_ref3, _excluded$4);
|
|
2348
2876
|
|
|
2349
|
-
return /*#__PURE__*/jsx(SideContainerView, _objectSpread$
|
|
2877
|
+
return /*#__PURE__*/jsx(SideContainerView, _objectSpread$4(_objectSpread$4({
|
|
2350
2878
|
side: side
|
|
2351
2879
|
}, rest), {}, {
|
|
2352
2880
|
children: children
|
|
@@ -2365,7 +2893,7 @@ function ListItemSideContent(_ref5) {
|
|
|
2365
2893
|
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
2366
2894
|
rest = _objectWithoutProperties(_ref5, _excluded2$1);
|
|
2367
2895
|
|
|
2368
|
-
return /*#__PURE__*/jsx(SideContentView, _objectSpread$
|
|
2896
|
+
return /*#__PURE__*/jsx(SideContentView, _objectSpread$4(_objectSpread$4({
|
|
2369
2897
|
align: align
|
|
2370
2898
|
}, rest), {}, {
|
|
2371
2899
|
children: children
|
|
@@ -2374,9 +2902,9 @@ function ListItemSideContent(_ref5) {
|
|
|
2374
2902
|
|
|
2375
2903
|
var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
2376
2904
|
|
|
2377
|
-
function ownKeys$
|
|
2905
|
+
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2378
2906
|
|
|
2379
|
-
function _objectSpread$
|
|
2907
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2380
2908
|
var ContainerView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2381
2909
|
displayName: "ListItem__ContainerView",
|
|
2382
2910
|
componentId: "kitt-universal__sc-2afp9s-0"
|
|
@@ -2418,14 +2946,14 @@ function ListItem(_ref5) {
|
|
|
2418
2946
|
onPress = _ref5.onPress,
|
|
2419
2947
|
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
2420
2948
|
|
|
2421
|
-
var Wrapper = onPress ? Pressable : Fragment;
|
|
2422
|
-
var wrapperProps = onPress ? _objectSpread$
|
|
2949
|
+
var Wrapper = onPress ? Pressable : Fragment$1;
|
|
2950
|
+
var wrapperProps = onPress ? _objectSpread$3({
|
|
2423
2951
|
accessibilityRole: 'button',
|
|
2424
2952
|
onPress: onPress
|
|
2425
2953
|
}, rest) : undefined;
|
|
2426
2954
|
var containerProps = onPress ? undefined : rest;
|
|
2427
|
-
return /*#__PURE__*/jsx(Wrapper, _objectSpread$
|
|
2428
|
-
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread$
|
|
2955
|
+
return /*#__PURE__*/jsx(Wrapper, _objectSpread$3(_objectSpread$3({}, wrapperProps), {}, {
|
|
2956
|
+
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread$3(_objectSpread$3({
|
|
2429
2957
|
withPadding: withPadding,
|
|
2430
2958
|
borders: borders
|
|
2431
2959
|
}, containerProps), {}, {
|
|
@@ -2654,169 +3182,6 @@ function Message(_ref) {
|
|
|
2654
3182
|
});
|
|
2655
3183
|
}
|
|
2656
3184
|
|
|
2657
|
-
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2658
|
-
|
|
2659
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2660
|
-
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
2661
|
-
var OverlayPressable = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
2662
|
-
displayName: "Overlay__OverlayPressable",
|
|
2663
|
-
componentId: "kitt-universal__sc-1cz1gbr-0"
|
|
2664
|
-
})(function (_ref) {
|
|
2665
|
-
var theme = _ref.theme;
|
|
2666
|
-
return _objectSpread$3(_objectSpread$3({}, StyleSheet.absoluteFillObject), {}, {
|
|
2667
|
-
backgroundColor: theme.kitt.colors.overlay.dark
|
|
2668
|
-
});
|
|
2669
|
-
});
|
|
2670
|
-
function Overlay(_ref2) {
|
|
2671
|
-
var onPress = _ref2.onPress;
|
|
2672
|
-
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
2673
|
-
accessibilityRole: "none",
|
|
2674
|
-
onPress: onPress,
|
|
2675
|
-
children: /*#__PURE__*/jsx(View, {})
|
|
2676
|
-
});
|
|
2677
|
-
}
|
|
2678
|
-
|
|
2679
|
-
var BodyView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2680
|
-
displayName: "Body__BodyView",
|
|
2681
|
-
componentId: "kitt-universal__sc-17fwpo4-0"
|
|
2682
|
-
})(["padding:", "px ", "px;"], function (_ref) {
|
|
2683
|
-
var theme = _ref.theme;
|
|
2684
|
-
return theme.kitt.spacing * 6;
|
|
2685
|
-
}, function (_ref2) {
|
|
2686
|
-
var theme = _ref2.theme;
|
|
2687
|
-
return theme.kitt.spacing * 4;
|
|
2688
|
-
});
|
|
2689
|
-
function ModalBody(_ref3) {
|
|
2690
|
-
var children = _ref3.children;
|
|
2691
|
-
return /*#__PURE__*/jsx(ScrollView, {
|
|
2692
|
-
children: /*#__PURE__*/jsx(BodyView, {
|
|
2693
|
-
children: children
|
|
2694
|
-
})
|
|
2695
|
-
});
|
|
2696
|
-
}
|
|
2697
|
-
|
|
2698
|
-
var FooterView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2699
|
-
displayName: "Footer__FooterView",
|
|
2700
|
-
componentId: "kitt-universal__sc-1ujq2dc-0"
|
|
2701
|
-
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
2702
|
-
var theme = _ref.theme;
|
|
2703
|
-
return theme.kitt.spacing * 4;
|
|
2704
|
-
}, function (_ref2) {
|
|
2705
|
-
var theme = _ref2.theme;
|
|
2706
|
-
return theme.kitt.colors.separator;
|
|
2707
|
-
});
|
|
2708
|
-
function ModalFooter(_ref3) {
|
|
2709
|
-
var children = _ref3.children;
|
|
2710
|
-
return /*#__PURE__*/jsx(FooterView, {
|
|
2711
|
-
children: children
|
|
2712
|
-
});
|
|
2713
|
-
}
|
|
2714
|
-
|
|
2715
|
-
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
2716
|
-
|
|
2717
|
-
var HeaderView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2718
|
-
displayName: "Header__HeaderView",
|
|
2719
|
-
componentId: "kitt-universal__sc-1iwabch-0"
|
|
2720
|
-
})(["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) {
|
|
2721
|
-
var theme = _ref.theme;
|
|
2722
|
-
return theme.kitt.spacing * 2;
|
|
2723
|
-
}, function (_ref2) {
|
|
2724
|
-
var theme = _ref2.theme;
|
|
2725
|
-
return theme.kitt.colors.separator;
|
|
2726
|
-
});
|
|
2727
|
-
var LeftIconView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2728
|
-
displayName: "Header__LeftIconView",
|
|
2729
|
-
componentId: "kitt-universal__sc-1iwabch-1"
|
|
2730
|
-
})(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
|
|
2731
|
-
var theme = _ref3.theme;
|
|
2732
|
-
return theme.kitt.spacing * 2;
|
|
2733
|
-
});
|
|
2734
|
-
var RightIconView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2735
|
-
displayName: "Header__RightIconView",
|
|
2736
|
-
componentId: "kitt-universal__sc-1iwabch-2"
|
|
2737
|
-
})(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
|
|
2738
|
-
var theme = _ref4.theme;
|
|
2739
|
-
return theme.kitt.spacing * 2;
|
|
2740
|
-
});
|
|
2741
|
-
var TitleView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2742
|
-
displayName: "Header__TitleView",
|
|
2743
|
-
componentId: "kitt-universal__sc-1iwabch-3"
|
|
2744
|
-
})(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
|
|
2745
|
-
var theme = _ref5.theme,
|
|
2746
|
-
isIconLeft = _ref5.isIconLeft;
|
|
2747
|
-
return isIconLeft ? 0 : theme.kitt.spacing * 2;
|
|
2748
|
-
});
|
|
2749
|
-
function ModalHeader(_ref6) {
|
|
2750
|
-
var left = _ref6.left,
|
|
2751
|
-
right = _ref6.right,
|
|
2752
|
-
children = _ref6.children;
|
|
2753
|
-
var onClose = useContext(OnCloseContext);
|
|
2754
|
-
var isIconLeft = !!left;
|
|
2755
|
-
return /*#__PURE__*/jsxs(HeaderView, {
|
|
2756
|
-
children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
|
|
2757
|
-
children: left
|
|
2758
|
-
}), /*#__PURE__*/jsx(TitleView, {
|
|
2759
|
-
isIconLeft: isIconLeft,
|
|
2760
|
-
children: children
|
|
2761
|
-
}), right !== undefined ? right : /*#__PURE__*/jsx(RightIconView, {
|
|
2762
|
-
children: /*#__PURE__*/jsx(Button, {
|
|
2763
|
-
type: "subtle-dark",
|
|
2764
|
-
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
2765
|
-
onPress: onClose
|
|
2766
|
-
})
|
|
2767
|
-
})]
|
|
2768
|
-
});
|
|
2769
|
-
}
|
|
2770
|
-
|
|
2771
|
-
var ModalView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2772
|
-
displayName: "Modal__ModalView",
|
|
2773
|
-
componentId: "kitt-universal__sc-1xy2w5u-0"
|
|
2774
|
-
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
|
|
2775
|
-
var theme = _ref.theme;
|
|
2776
|
-
return theme.kitt.spacing * 20;
|
|
2777
|
-
}, function (_ref2) {
|
|
2778
|
-
var theme = _ref2.theme;
|
|
2779
|
-
return theme.kitt.spacing * 4;
|
|
2780
|
-
});
|
|
2781
|
-
var ContentView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2782
|
-
displayName: "Modal__ContentView",
|
|
2783
|
-
componentId: "kitt-universal__sc-1xy2w5u-1"
|
|
2784
|
-
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], function (_ref3) {
|
|
2785
|
-
var theme = _ref3.theme;
|
|
2786
|
-
return theme.kitt.card.borderRadius;
|
|
2787
|
-
}, function (_ref4) {
|
|
2788
|
-
var theme = _ref4.theme;
|
|
2789
|
-
return theme.kitt.colors.uiBackgroundLight;
|
|
2790
|
-
});
|
|
2791
|
-
function Modal(_ref5) {
|
|
2792
|
-
var visible = _ref5.visible,
|
|
2793
|
-
children = _ref5.children,
|
|
2794
|
-
onClose = _ref5.onClose,
|
|
2795
|
-
onEntered = _ref5.onEntered,
|
|
2796
|
-
onExited = _ref5.onExited;
|
|
2797
|
-
return /*#__PURE__*/jsx(OnCloseContext.Provider, {
|
|
2798
|
-
value: onClose,
|
|
2799
|
-
children: /*#__PURE__*/jsx(Modal$1, {
|
|
2800
|
-
transparent: true,
|
|
2801
|
-
animationType: "fade",
|
|
2802
|
-
visible: visible,
|
|
2803
|
-
onShow: onEntered,
|
|
2804
|
-
onDismiss: onExited,
|
|
2805
|
-
onRequestClose: onClose,
|
|
2806
|
-
children: /*#__PURE__*/jsxs(ModalView, {
|
|
2807
|
-
children: [/*#__PURE__*/jsx(Overlay, {
|
|
2808
|
-
onPress: onClose
|
|
2809
|
-
}), /*#__PURE__*/jsx(ContentView, {
|
|
2810
|
-
children: children
|
|
2811
|
-
})]
|
|
2812
|
-
})
|
|
2813
|
-
})
|
|
2814
|
-
});
|
|
2815
|
-
}
|
|
2816
|
-
Modal.Header = ModalHeader;
|
|
2817
|
-
Modal.Body = ModalBody;
|
|
2818
|
-
Modal.Footer = ModalFooter;
|
|
2819
|
-
|
|
2820
3185
|
function Notification(_ref) {
|
|
2821
3186
|
var type = _ref.type,
|
|
2822
3187
|
children = _ref.children,
|
|
@@ -3273,7 +3638,7 @@ function StoryGridCol(_ref2) {
|
|
|
3273
3638
|
return null;
|
|
3274
3639
|
}
|
|
3275
3640
|
|
|
3276
|
-
return /*#__PURE__*/jsxs(Fragment
|
|
3641
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
3277
3642
|
children: [title ? /*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
3278
3643
|
numberOfLines: 1,
|
|
3279
3644
|
color: titleColor,
|
|
@@ -3520,7 +3885,7 @@ function Tooltip(_ref3) {
|
|
|
3520
3885
|
middlewareData: middlewareData
|
|
3521
3886
|
});
|
|
3522
3887
|
}, [x, y, reference, floating, strategy, update, refs, middlewareData, onUpdate]);
|
|
3523
|
-
return /*#__PURE__*/jsxs(Fragment
|
|
3888
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
3524
3889
|
children: [/*#__PURE__*/jsx(StyledTooltipTrigger, {
|
|
3525
3890
|
ref: reference,
|
|
3526
3891
|
accessibilityRole: "button",
|
|
@@ -3683,5 +4048,5 @@ function MatchWindowSize(_ref) {
|
|
|
3683
4048
|
return children;
|
|
3684
4049
|
}
|
|
3685
4050
|
|
|
3686
|
-
export { Avatar, Button, Card, Checkbox, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Skeleton, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
4051
|
+
export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Skeleton, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
3687
4052
|
//# sourceMappingURL=index-browser-all.es.web.js.map
|