@ornikar/kitt-universal 4.6.1 → 5.0.2
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 +3 -4
- package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts.map +1 -1
- package/dist/definitions/forms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/DatePicker.d.ts +2 -28
- package/dist/definitions/forms/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/DatePicker.web.d.ts +4 -0
- package/dist/definitions/forms/DatePicker/DatePicker.web.d.ts.map +1 -0
- package/dist/definitions/forms/DatePicker/DatePickerAndroid.d.ts +12 -0
- package/dist/definitions/forms/DatePicker/DatePickerAndroid.d.ts.map +1 -0
- package/dist/definitions/forms/DatePicker/DatePickerInputs.d.ts +9 -0
- package/dist/definitions/forms/DatePicker/DatePickerInputs.d.ts.map +1 -0
- package/dist/definitions/forms/DatePicker/types.d.ts +34 -0
- package/dist/definitions/forms/DatePicker/types.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +1 -1
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +214 -142
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +214 -142
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +214 -142
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +529 -667
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +160 -95
- 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 +409 -525
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1,26 +1,24 @@
|
|
|
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, StyleSheet, ScrollView, Modal as Modal$1
|
|
3
|
+
import { View, Text as Text$1, useWindowDimensions, Image, Pressable, TextInput, StyleSheet, ScrollView, Modal as Modal$1 } from 'react-native';
|
|
4
4
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
5
|
-
import { UserIcon, CheckboxMark,
|
|
5
|
+
import { UserIcon, CheckboxMark, EyeOffIcon, EyeIcon, LoaderIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, XIcon, 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
|
|
8
|
+
import { forwardRef, cloneElement, useContext, createContext, useMemo, useState, Fragment, Children, useEffect } from 'react';
|
|
9
9
|
import { styled } from '@linaria/react';
|
|
10
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
|
+
import { jsx, jsxs, Fragment as Fragment$1 } 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';
|
|
15
13
|
import _extends from '@babel/runtime/helpers/extends';
|
|
16
14
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
17
15
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
18
16
|
import { useFloating, offset, shift, flip, getScrollParents } from '@floating-ui/react-dom';
|
|
19
17
|
import { makeDecorator } from '@storybook/addons';
|
|
20
18
|
|
|
21
|
-
function ownKeys$
|
|
19
|
+
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; }
|
|
22
20
|
|
|
23
|
-
function _objectSpread$
|
|
21
|
+
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; }
|
|
24
22
|
// type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
|
|
25
23
|
// type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
|
|
26
24
|
// export function withTheme<Props extends { theme: DefaultTheme }, C>(
|
|
@@ -35,7 +33,7 @@ function withTheme(WrappedComponent) {
|
|
|
35
33
|
// eslint-disable-next-line prefer-arrow-callback
|
|
36
34
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
37
35
|
var theme = /*#__PURE__*/useTheme();
|
|
38
|
-
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$
|
|
36
|
+
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$n({
|
|
39
37
|
ref: ref,
|
|
40
38
|
theme: theme
|
|
41
39
|
}, props));
|
|
@@ -140,9 +138,9 @@ var KittBreakpointsMax = {
|
|
|
140
138
|
|
|
141
139
|
var _excluded$g = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
142
140
|
|
|
143
|
-
function ownKeys$
|
|
141
|
+
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; }
|
|
144
142
|
|
|
145
|
-
function _objectSpread$
|
|
143
|
+
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; }
|
|
146
144
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
147
145
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
148
146
|
function useTypographyColor() {
|
|
@@ -236,14 +234,14 @@ function Typography(_ref4) {
|
|
|
236
234
|
var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular';
|
|
237
235
|
var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
|
|
238
236
|
value: isHeader,
|
|
239
|
-
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$
|
|
237
|
+
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$m({
|
|
240
238
|
$color: colorOrDefaultToBlack,
|
|
241
239
|
$isHeader: isHeader,
|
|
242
240
|
$typeForCurrentWindowSize: typeForCurrentWindowSize,
|
|
243
241
|
$variant: nonNullableVariant,
|
|
244
242
|
accessibilityRole: accessibilityRole || undefined
|
|
245
243
|
}, otherProps))
|
|
246
|
-
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$
|
|
244
|
+
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$m({
|
|
247
245
|
$color: colorOrDefaultToBlack,
|
|
248
246
|
$isHeader: isHeader,
|
|
249
247
|
$variant: nonNullableVariant,
|
|
@@ -256,13 +254,13 @@ function Typography(_ref4) {
|
|
|
256
254
|
}
|
|
257
255
|
|
|
258
256
|
function TypographyText(props) {
|
|
259
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
257
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$m({
|
|
260
258
|
accessibilityRole: null
|
|
261
259
|
}, props));
|
|
262
260
|
}
|
|
263
261
|
|
|
264
262
|
function TypographyParagraph(props) {
|
|
265
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
263
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$m({
|
|
266
264
|
accessibilityRole: "paragraph"
|
|
267
265
|
}, props));
|
|
268
266
|
}
|
|
@@ -270,7 +268,7 @@ function TypographyParagraph(props) {
|
|
|
270
268
|
var createHeading = function (level, defaultBase) {
|
|
271
269
|
// https://github.com/necolas/react-native-web/issues/401
|
|
272
270
|
function TypographyHeading(props) {
|
|
273
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
271
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$m(_objectSpread$m({
|
|
274
272
|
accessibilityRole: "header",
|
|
275
273
|
base: defaultBase
|
|
276
274
|
}, props), {}, {
|
|
@@ -308,9 +306,9 @@ Typography.h5 = createHeading(5, 'header5');
|
|
|
308
306
|
|
|
309
307
|
var _excluded$f = ["size", "base", "round", "light"];
|
|
310
308
|
|
|
311
|
-
function ownKeys$
|
|
309
|
+
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; }
|
|
312
310
|
|
|
313
|
-
function _objectSpread$
|
|
311
|
+
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; }
|
|
314
312
|
|
|
315
313
|
var getInitials = function (firstname, lastname) {
|
|
316
314
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
@@ -388,7 +386,7 @@ function Avatar(_ref6) {
|
|
|
388
386
|
$size: size,
|
|
389
387
|
$isRound: round,
|
|
390
388
|
$isLight: light,
|
|
391
|
-
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$
|
|
389
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$l({
|
|
392
390
|
size: size,
|
|
393
391
|
base: base,
|
|
394
392
|
isLight: light
|
|
@@ -402,9 +400,9 @@ function isSubtle(type) {
|
|
|
402
400
|
|
|
403
401
|
var _excluded$e = ["$type", "$isStretch", "disabled"];
|
|
404
402
|
|
|
405
|
-
function ownKeys$
|
|
403
|
+
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; }
|
|
406
404
|
|
|
407
|
-
function _objectSpread$
|
|
405
|
+
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; }
|
|
408
406
|
var AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
409
407
|
name: "AnimatedButtonPressableContainer",
|
|
410
408
|
"class": "kitt-u_AnimatedButtonPressableContainer_a1vkj3mh",
|
|
@@ -510,7 +508,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref18, ref) {
|
|
|
510
508
|
$type: $type,
|
|
511
509
|
$isDisabled: !!disabled,
|
|
512
510
|
$isStretch: $isStretch,
|
|
513
|
-
children: /*#__PURE__*/jsx(Pressable, _objectSpread$
|
|
511
|
+
children: /*#__PURE__*/jsx(Pressable, _objectSpread$k({
|
|
514
512
|
disabled: disabled
|
|
515
513
|
}, props))
|
|
516
514
|
});
|
|
@@ -557,23 +555,23 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled$1(View).withConfig({
|
|
|
557
555
|
var _excluded$d = ["color"],
|
|
558
556
|
_excluded2$2 = ["color"];
|
|
559
557
|
|
|
560
|
-
function ownKeys$
|
|
558
|
+
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; }
|
|
561
559
|
|
|
562
|
-
function _objectSpread$
|
|
560
|
+
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; }
|
|
563
561
|
|
|
564
562
|
function TypographyIconSpecifiedColor(_ref) {
|
|
565
563
|
var color = _ref.color,
|
|
566
564
|
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
567
565
|
|
|
568
566
|
var theme = /*#__PURE__*/useTheme();
|
|
569
|
-
return /*#__PURE__*/jsx(Icon, _objectSpread$
|
|
567
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread$j(_objectSpread$j({}, props), {}, {
|
|
570
568
|
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
571
569
|
}));
|
|
572
570
|
}
|
|
573
571
|
|
|
574
572
|
function TypographyIconInheritColor(props) {
|
|
575
573
|
var color = useTypographyColor();
|
|
576
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$
|
|
574
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$j({
|
|
577
575
|
color: color
|
|
578
576
|
}, props));
|
|
579
577
|
}
|
|
@@ -583,19 +581,19 @@ function TypographyIcon(_ref2) {
|
|
|
583
581
|
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
584
582
|
|
|
585
583
|
if (color) {
|
|
586
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$
|
|
584
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$j({
|
|
587
585
|
color: color
|
|
588
586
|
}, props));
|
|
589
587
|
}
|
|
590
588
|
|
|
591
|
-
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$
|
|
589
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$j({}, props));
|
|
592
590
|
}
|
|
593
591
|
|
|
594
592
|
var _excluded$c = ["type", "isDisabled", "$isStretch", "icon", "children"];
|
|
595
593
|
|
|
596
|
-
function ownKeys$
|
|
594
|
+
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; }
|
|
597
595
|
|
|
598
|
-
function _objectSpread$
|
|
596
|
+
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; }
|
|
599
597
|
|
|
600
598
|
var getTextColorByType = function (type) {
|
|
601
599
|
switch (type) {
|
|
@@ -703,7 +701,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
703
701
|
color: isWebSubtle ? 'inherit' : color
|
|
704
702
|
};
|
|
705
703
|
return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
|
|
706
|
-
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$
|
|
704
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$i(_objectSpread$i({}, buttonIconSharedProps), {}, {
|
|
707
705
|
testID: "button-left-icon",
|
|
708
706
|
icon: icon
|
|
709
707
|
})) : null, /*#__PURE__*/jsx(StyledButtonText, {
|
|
@@ -714,7 +712,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
714
712
|
,
|
|
715
713
|
color: isWebSubtle ? undefined : color,
|
|
716
714
|
children: children
|
|
717
|
-
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$
|
|
715
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$i(_objectSpread$i({}, buttonIconSharedProps), {}, {
|
|
718
716
|
icon: icon
|
|
719
717
|
})) : null]
|
|
720
718
|
});
|
|
@@ -745,7 +743,7 @@ function ButtonContent(_ref7) {
|
|
|
745
743
|
$isSubtle: isSubtle(type),
|
|
746
744
|
$isStretch: $isStretch,
|
|
747
745
|
$isIconOnly: Boolean(!children && icon),
|
|
748
|
-
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$
|
|
746
|
+
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$i(_objectSpread$i({
|
|
749
747
|
icon: icon,
|
|
750
748
|
type: type,
|
|
751
749
|
isDisabled: isDisabled,
|
|
@@ -873,9 +871,9 @@ var defaultOpenLinkBehavior = {
|
|
|
873
871
|
|
|
874
872
|
var _excluded$b = ["as", "href", "openLinkBehavior", "onPress"];
|
|
875
873
|
|
|
876
|
-
function ownKeys$
|
|
874
|
+
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; }
|
|
877
875
|
|
|
878
|
-
function _objectSpread$
|
|
876
|
+
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; }
|
|
879
877
|
function ExternalLink(_ref) {
|
|
880
878
|
var Component = _ref.as,
|
|
881
879
|
href = _ref.href,
|
|
@@ -884,7 +882,7 @@ function ExternalLink(_ref) {
|
|
|
884
882
|
onPress = _ref.onPress,
|
|
885
883
|
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
886
884
|
|
|
887
|
-
return /*#__PURE__*/jsx(Component, _objectSpread$
|
|
885
|
+
return /*#__PURE__*/jsx(Component, _objectSpread$h(_objectSpread$h({}, rest), {}, {
|
|
888
886
|
href: href,
|
|
889
887
|
hrefAttrs: (openLinkBehavior === null || openLinkBehavior === void 0 ? void 0 : openLinkBehavior.web) === 'targetSelf' ? undefined : {
|
|
890
888
|
target: '_blank',
|
|
@@ -1500,7 +1498,7 @@ function useKittTheme() {
|
|
|
1500
1498
|
var CheckboxAndLabelPressableWrapper = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
1501
1499
|
displayName: "Checkbox__CheckboxAndLabelPressableWrapper",
|
|
1502
1500
|
componentId: "kitt-universal__sc-1sav1n6-0"
|
|
1503
|
-
})(["display:flex;flex-direction:row;
|
|
1501
|
+
})(["display:flex;flex-direction:row;"]);
|
|
1504
1502
|
var CheckboxContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1505
1503
|
displayName: "Checkbox__CheckboxContainer",
|
|
1506
1504
|
componentId: "kitt-universal__sc-1sav1n6-1"
|
|
@@ -1645,625 +1643,164 @@ function DatePickerInputPart(_ref4) {
|
|
|
1645
1643
|
});
|
|
1646
1644
|
}
|
|
1647
1645
|
|
|
1648
|
-
function ownKeys$
|
|
1646
|
+
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; }
|
|
1649
1647
|
|
|
1650
|
-
function _objectSpread$
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
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
|
-
});
|
|
1648
|
+
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; }
|
|
1649
|
+
|
|
1650
|
+
function prefixWithZero(value) {
|
|
1651
|
+
return "".concat(value).padStart(2, '0');
|
|
1668
1652
|
}
|
|
1669
1653
|
|
|
1670
|
-
var
|
|
1671
|
-
displayName: "
|
|
1672
|
-
componentId: "kitt-universal__sc-
|
|
1673
|
-
})(["
|
|
1674
|
-
var theme = _ref.theme
|
|
1675
|
-
|
|
1654
|
+
var PartContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1655
|
+
displayName: "DatePickerInputs__PartContainer",
|
|
1656
|
+
componentId: "kitt-universal__sc-j9hin5-0"
|
|
1657
|
+
})(["margin-right:", ";", ";"], function (_ref) {
|
|
1658
|
+
var theme = _ref.theme,
|
|
1659
|
+
$isLast = _ref.$isLast;
|
|
1660
|
+
return !$isLast ? "".concat(theme.kitt.spacing * 2, "px") : 0;
|
|
1676
1661
|
}, function (_ref2) {
|
|
1677
|
-
var
|
|
1678
|
-
return
|
|
1662
|
+
var $isStretch = _ref2.$isStretch;
|
|
1663
|
+
return $isStretch ? css(["flex:0.33;flex-grow:1;"]) : undefined;
|
|
1679
1664
|
});
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
})
|
|
1686
|
-
});
|
|
1687
|
-
}
|
|
1665
|
+
var DatePickerPressable = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
1666
|
+
displayName: "DatePickerInputs__DatePickerPressable",
|
|
1667
|
+
componentId: "kitt-universal__sc-j9hin5-1"
|
|
1668
|
+
})(["display:flex;flex-direction:row;", ";"], function (_ref3) {
|
|
1669
|
+
var $isStretch = _ref3.$isStretch;
|
|
1688
1670
|
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
return theme.kitt.spacing * 4;
|
|
1695
|
-
}, function (_ref2) {
|
|
1696
|
-
var theme = _ref2.theme;
|
|
1697
|
-
return theme.kitt.colors.separator;
|
|
1671
|
+
if ($isStretch) {
|
|
1672
|
+
return css(["width:100%;"]);
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
return css(["align-self:baseline;"]);
|
|
1698
1676
|
});
|
|
1699
|
-
function
|
|
1700
|
-
var
|
|
1701
|
-
|
|
1702
|
-
|
|
1677
|
+
function DatePickerInputs(_ref4) {
|
|
1678
|
+
var state = _ref4.state,
|
|
1679
|
+
internalForceState = _ref4.internalForceState,
|
|
1680
|
+
isFocused = _ref4.isFocused,
|
|
1681
|
+
disabled = _ref4.disabled,
|
|
1682
|
+
stretch = _ref4.stretch,
|
|
1683
|
+
id = _ref4.id,
|
|
1684
|
+
testID = _ref4.testID,
|
|
1685
|
+
handleModalOpen = _ref4.handleModalOpen,
|
|
1686
|
+
currentValue = _ref4.currentValue,
|
|
1687
|
+
placeholder = _ref4.placeholder;
|
|
1688
|
+
var currentState = internalForceState || getInputUIState({
|
|
1689
|
+
isFocused: isFocused,
|
|
1690
|
+
isDisabled: Boolean(disabled),
|
|
1691
|
+
formState: state
|
|
1692
|
+
});
|
|
1693
|
+
var sharedPartProps = {
|
|
1694
|
+
disabled: disabled,
|
|
1695
|
+
$state: currentState
|
|
1696
|
+
};
|
|
1697
|
+
return /*#__PURE__*/jsxs(DatePickerPressable, {
|
|
1698
|
+
$isStretch: stretch,
|
|
1699
|
+
nativeID: id,
|
|
1700
|
+
disabled: disabled,
|
|
1701
|
+
testID: testID,
|
|
1702
|
+
onPress: handleModalOpen,
|
|
1703
|
+
children: [/*#__PURE__*/jsx(PartContainer, {
|
|
1704
|
+
$isStretch: stretch,
|
|
1705
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$g(_objectSpread$g({}, sharedPartProps), {}, {
|
|
1706
|
+
partName: "day",
|
|
1707
|
+
value: currentValue ? prefixWithZero(currentValue.getDate()) : undefined,
|
|
1708
|
+
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day
|
|
1709
|
+
}))
|
|
1710
|
+
}), /*#__PURE__*/jsx(PartContainer, {
|
|
1711
|
+
$isStretch: stretch,
|
|
1712
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$g(_objectSpread$g({}, sharedPartProps), {}, {
|
|
1713
|
+
partName: "month",
|
|
1714
|
+
value: currentValue ? prefixWithZero(currentValue.getMonth() + 1) : undefined,
|
|
1715
|
+
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month
|
|
1716
|
+
}))
|
|
1717
|
+
}), /*#__PURE__*/jsx(PartContainer, {
|
|
1718
|
+
$isLast: true,
|
|
1719
|
+
$isStretch: stretch,
|
|
1720
|
+
children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$g(_objectSpread$g({}, sharedPartProps), {}, {
|
|
1721
|
+
partName: "year",
|
|
1722
|
+
value: currentValue ? currentValue.getFullYear() : undefined,
|
|
1723
|
+
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year
|
|
1724
|
+
}))
|
|
1725
|
+
})]
|
|
1703
1726
|
});
|
|
1704
1727
|
}
|
|
1705
1728
|
|
|
1706
|
-
var _excluded$a = ["
|
|
1729
|
+
var _excluded$a = ["value"];
|
|
1707
1730
|
|
|
1708
|
-
function ownKeys$
|
|
1731
|
+
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; }
|
|
1709
1732
|
|
|
1710
|
-
function _objectSpread$
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1733
|
+
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; }
|
|
1734
|
+
// This is not yet implemented
|
|
1735
|
+
// We still display the inputs for chromatic
|
|
1736
|
+
function DatePicker(_ref) {
|
|
1737
|
+
var value = _ref.value,
|
|
1714
1738
|
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
1715
1739
|
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1740
|
+
return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread$f({
|
|
1741
|
+
handleModalOpen: function handleModalOpen() {},
|
|
1742
|
+
currentValue: value,
|
|
1743
|
+
isFocused: false
|
|
1744
|
+
}, props));
|
|
1720
1745
|
}
|
|
1721
1746
|
|
|
1722
|
-
var
|
|
1723
|
-
|
|
1724
|
-
|
|
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": "kitt-u_PressableIconButtonWebWrapper_p1nlccvg",
|
|
1747
|
+
var InputTextContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
1748
|
+
name: "InputTextContainer",
|
|
1749
|
+
"class": "kitt-u_InputTextContainer_i1encr9g",
|
|
1730
1750
|
vars: {
|
|
1731
|
-
"
|
|
1732
|
-
var
|
|
1733
|
-
|
|
1734
|
-
return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.hover;
|
|
1751
|
+
"i1encr9g-0": [function (_ref) {
|
|
1752
|
+
var $isDisabled = _ref.$isDisabled;
|
|
1753
|
+
return $isDisabled ? 'not-allowed' : 'inherit';
|
|
1735
1754
|
}],
|
|
1736
|
-
"
|
|
1737
|
-
var theme = _ref2.theme
|
|
1738
|
-
|
|
1739
|
-
|
|
1755
|
+
"i1encr9g-1": [function (_ref2) {
|
|
1756
|
+
var theme = _ref2.theme;
|
|
1757
|
+
var _theme$kitt$forms$inp = theme.kitt.forms.input.transition,
|
|
1758
|
+
property = _theme$kitt$forms$inp.property,
|
|
1759
|
+
duration = _theme$kitt$forms$inp.duration,
|
|
1760
|
+
timingFunction = _theme$kitt$forms$inp.timingFunction;
|
|
1761
|
+
return "".concat(property, " ").concat(duration, " ").concat(timingFunction);
|
|
1740
1762
|
}],
|
|
1741
|
-
"
|
|
1763
|
+
"i1encr9g-2": [function (_ref3) {
|
|
1742
1764
|
var theme = _ref3.theme,
|
|
1743
1765
|
$isDisabled = _ref3.$isDisabled;
|
|
1744
|
-
|
|
1766
|
+
if ($isDisabled) return theme.kitt.forms.input.states.disabled.borderColor;
|
|
1767
|
+
return theme.kitt.forms.input.states.hover.borderColor;
|
|
1745
1768
|
}],
|
|
1746
|
-
"
|
|
1769
|
+
"i1encr9g-3": [function (_ref4) {
|
|
1747
1770
|
var theme = _ref4.theme,
|
|
1748
|
-
$isWhite = _ref4.$isWhite,
|
|
1749
1771
|
$isDisabled = _ref4.$isDisabled;
|
|
1750
|
-
if ($isDisabled) return theme.kitt.
|
|
1751
|
-
|
|
1752
|
-
white = _theme$kitt$iconButto.white,
|
|
1753
|
-
defaultIconButton = _theme$kitt$iconButto["default"];
|
|
1754
|
-
if ($isWhite) return white.pressedBackgroundColor;
|
|
1755
|
-
return defaultIconButton.pressedBackgroundColor;
|
|
1772
|
+
if ($isDisabled) return theme.kitt.forms.input.states.disabled.borderColor;
|
|
1773
|
+
return theme.kitt.forms.input.states.focus.borderColor;
|
|
1756
1774
|
}]
|
|
1757
1775
|
}
|
|
1758
1776
|
}));
|
|
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;
|
|
1776
1777
|
|
|
1777
|
-
|
|
1778
|
-
return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
|
|
1779
|
-
}
|
|
1778
|
+
var _excluded$9 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
1780
1779
|
|
|
1781
|
-
|
|
1782
|
-
});
|
|
1783
|
-
function PressableIconButton(_ref9) {
|
|
1784
|
-
var color = _ref9.color,
|
|
1785
|
-
disabled = _ref9.disabled,
|
|
1786
|
-
props = _objectWithoutProperties(_ref9, _excluded$9);
|
|
1780
|
+
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; }
|
|
1787
1781
|
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
});
|
|
1796
|
-
}
|
|
1782
|
+
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; }
|
|
1783
|
+
var StyledTextInput = /*#__PURE__*/styled$1(TextInput).withConfig({
|
|
1784
|
+
displayName: "InputText__StyledTextInput",
|
|
1785
|
+
componentId: "kitt-universal__sc-uke279-0"
|
|
1786
|
+
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
1787
|
+
var theme = _ref.theme,
|
|
1788
|
+
multiline = _ref.multiline;
|
|
1797
1789
|
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
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
|
-
}
|
|
1790
|
+
if (!multiline && "web" === 'ios') {
|
|
1791
|
+
return theme.kitt.forms.input.padding.iOSSingleLine;
|
|
1792
|
+
}
|
|
1811
1793
|
|
|
1812
|
-
|
|
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");
|
|
1794
|
+
return theme.kitt.forms.input.padding["default"];
|
|
1818
1795
|
}, function (_ref2) {
|
|
1819
1796
|
var theme = _ref2.theme,
|
|
1820
|
-
|
|
1821
|
-
|
|
1797
|
+
multiline = _ref2.multiline;
|
|
1798
|
+
if (!multiline && "web" === 'ios') return 0;
|
|
1799
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
1800
|
+
return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight, "px");
|
|
1822
1801
|
}, function (_ref3) {
|
|
1823
|
-
var
|
|
1824
|
-
return
|
|
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 ? currentValue.getFullYear() : undefined,
|
|
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": "kitt-u_InputTextContainer_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;
|
|
1802
|
+
var $minHeight = _ref3.$minHeight;
|
|
1803
|
+
return $minHeight;
|
|
2267
1804
|
});
|
|
2268
1805
|
var RightInputContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
2269
1806
|
displayName: "InputText__RightInputContainer",
|
|
@@ -2288,7 +1825,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2288
1825
|
keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
|
|
2289
1826
|
_onFocus = _ref4.onFocus,
|
|
2290
1827
|
_onBlur = _ref4.onBlur,
|
|
2291
|
-
props = _objectWithoutProperties(_ref4, _excluded$
|
|
1828
|
+
props = _objectWithoutProperties(_ref4, _excluded$9);
|
|
2292
1829
|
|
|
2293
1830
|
var theme = /*#__PURE__*/useTheme();
|
|
2294
1831
|
|
|
@@ -2304,7 +1841,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2304
1841
|
});
|
|
2305
1842
|
return /*#__PURE__*/jsxs(InputTextContainer, {
|
|
2306
1843
|
$isDisabled: disabled,
|
|
2307
|
-
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread$
|
|
1844
|
+
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread$e(_objectSpread$e({
|
|
2308
1845
|
ref: ref,
|
|
2309
1846
|
nativeID: id,
|
|
2310
1847
|
editable: !disabled,
|
|
@@ -2331,11 +1868,11 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2331
1868
|
});
|
|
2332
1869
|
});
|
|
2333
1870
|
|
|
2334
|
-
function ownKeys$
|
|
1871
|
+
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; }
|
|
2335
1872
|
|
|
2336
|
-
function _objectSpread$
|
|
1873
|
+
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; }
|
|
2337
1874
|
function InputEmail(props) {
|
|
2338
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$
|
|
1875
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$d({
|
|
2339
1876
|
autoCompleteType: "email",
|
|
2340
1877
|
keyboardType: "email-address",
|
|
2341
1878
|
textContentType: "emailAddress",
|
|
@@ -2437,31 +1974,31 @@ function InputIcon(_ref) {
|
|
|
2437
1974
|
});
|
|
2438
1975
|
}
|
|
2439
1976
|
|
|
2440
|
-
function ownKeys$
|
|
1977
|
+
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; }
|
|
2441
1978
|
|
|
2442
|
-
function _objectSpread$
|
|
1979
|
+
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; }
|
|
2443
1980
|
function InputPressable(_ref) {
|
|
2444
1981
|
var props = _extends({}, _ref);
|
|
2445
1982
|
|
|
2446
|
-
return /*#__PURE__*/jsx(Pressable, _objectSpread$
|
|
1983
|
+
return /*#__PURE__*/jsx(Pressable, _objectSpread$c({}, props));
|
|
2447
1984
|
}
|
|
2448
1985
|
|
|
2449
|
-
var _excluded$
|
|
1986
|
+
var _excluded$8 = ["isPasswordDefaultVisible", "right"];
|
|
2450
1987
|
|
|
2451
|
-
function ownKeys$
|
|
1988
|
+
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; }
|
|
2452
1989
|
|
|
2453
|
-
function _objectSpread$
|
|
1990
|
+
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; }
|
|
2454
1991
|
function InputPassword(_ref) {
|
|
2455
1992
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
2456
1993
|
right = _ref.right,
|
|
2457
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1994
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
2458
1995
|
|
|
2459
1996
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
2460
1997
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2461
1998
|
isVisible = _useState2[0],
|
|
2462
1999
|
setIsVisible = _useState2[1];
|
|
2463
2000
|
|
|
2464
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$
|
|
2001
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$b(_objectSpread$b({}, props), {}, {
|
|
2465
2002
|
textContentType: "password",
|
|
2466
2003
|
autoCompleteType: "password",
|
|
2467
2004
|
autoCorrect: false,
|
|
@@ -2480,11 +2017,11 @@ function InputPassword(_ref) {
|
|
|
2480
2017
|
}));
|
|
2481
2018
|
}
|
|
2482
2019
|
|
|
2483
|
-
function ownKeys$
|
|
2020
|
+
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; }
|
|
2484
2021
|
|
|
2485
|
-
function _objectSpread$
|
|
2022
|
+
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; }
|
|
2486
2023
|
function InputPhone(props) {
|
|
2487
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$
|
|
2024
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$a(_objectSpread$a({}, props), {}, {
|
|
2488
2025
|
autoCompleteType: "tel",
|
|
2489
2026
|
keyboardType: "number-pad",
|
|
2490
2027
|
textContentType: "telephoneNumber"
|
|
@@ -2655,14 +2192,14 @@ function Radio(_ref16) {
|
|
|
2655
2192
|
});
|
|
2656
2193
|
}
|
|
2657
2194
|
|
|
2658
|
-
function ownKeys$
|
|
2195
|
+
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; }
|
|
2659
2196
|
|
|
2660
|
-
function _objectSpread$
|
|
2197
|
+
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; }
|
|
2661
2198
|
function TextArea(_ref) {
|
|
2662
2199
|
var props = _extends({}, _ref);
|
|
2663
2200
|
|
|
2664
2201
|
var theme = /*#__PURE__*/useTheme();
|
|
2665
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$
|
|
2202
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$9({
|
|
2666
2203
|
multiline: true,
|
|
2667
2204
|
textAlignVertical: "top",
|
|
2668
2205
|
minHeight: theme.kitt.forms.textArea.minHeight
|
|
@@ -2816,28 +2353,191 @@ function FullScreenModalHeader(_ref6) {
|
|
|
2816
2353
|
});
|
|
2817
2354
|
}
|
|
2818
2355
|
|
|
2819
|
-
var Container$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
2820
|
-
displayName: "FullScreenModal__Container",
|
|
2821
|
-
componentId: "kitt-universal__sc-11qpbe3-0"
|
|
2822
|
-
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
2356
|
+
var Container$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
2357
|
+
displayName: "FullScreenModal__Container",
|
|
2358
|
+
componentId: "kitt-universal__sc-11qpbe3-0"
|
|
2359
|
+
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
2360
|
+
var theme = _ref.theme;
|
|
2361
|
+
return theme.kitt.colors.uiBackground;
|
|
2362
|
+
});
|
|
2363
|
+
function FullScreenModal(_ref2) {
|
|
2364
|
+
var children = _ref2.children;
|
|
2365
|
+
return /*#__PURE__*/jsx(Container$1, {
|
|
2366
|
+
children: children
|
|
2367
|
+
});
|
|
2368
|
+
}
|
|
2369
|
+
FullScreenModal.Header = FullScreenModalHeader;
|
|
2370
|
+
FullScreenModal.Body = FullScreenModalBody;
|
|
2371
|
+
|
|
2372
|
+
var _excluded$7 = ["as", "children"];
|
|
2373
|
+
|
|
2374
|
+
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; }
|
|
2375
|
+
|
|
2376
|
+
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; }
|
|
2377
|
+
function StyleWebWrapper(_ref) {
|
|
2378
|
+
var as = _ref.as,
|
|
2379
|
+
children = _ref.children,
|
|
2380
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
2381
|
+
|
|
2382
|
+
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
2383
|
+
return /*#__PURE__*/jsx(as || 'div', _objectSpread$8(_objectSpread$8({}, props), {}, {
|
|
2384
|
+
children: children
|
|
2385
|
+
}));
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
var _excluded$6 = ["color", "disabled"];
|
|
2389
|
+
|
|
2390
|
+
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; }
|
|
2391
|
+
|
|
2392
|
+
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; }
|
|
2393
|
+
var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled("div")({
|
|
2394
|
+
name: "PressableIconButtonWebWrapper",
|
|
2395
|
+
"class": "kitt-u_PressableIconButtonWebWrapper_p1nlccvg",
|
|
2396
|
+
vars: {
|
|
2397
|
+
"p1nlccvg-0": [function (_ref) {
|
|
2398
|
+
var theme = _ref.theme,
|
|
2399
|
+
$isDisabled = _ref.$isDisabled;
|
|
2400
|
+
return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.hover;
|
|
2401
|
+
}],
|
|
2402
|
+
"p1nlccvg-2": [function (_ref2) {
|
|
2403
|
+
var theme = _ref2.theme,
|
|
2404
|
+
$isDisabled = _ref2.$isDisabled;
|
|
2405
|
+
return $isDisabled ? 1 : theme.kitt.iconButton.scale.medium.hover;
|
|
2406
|
+
}],
|
|
2407
|
+
"p1nlccvg-3": [function (_ref3) {
|
|
2408
|
+
var theme = _ref3.theme,
|
|
2409
|
+
$isDisabled = _ref3.$isDisabled;
|
|
2410
|
+
return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.active;
|
|
2411
|
+
}],
|
|
2412
|
+
"p1nlccvg-4": [function (_ref4) {
|
|
2413
|
+
var theme = _ref4.theme,
|
|
2414
|
+
$isWhite = _ref4.$isWhite,
|
|
2415
|
+
$isDisabled = _ref4.$isDisabled;
|
|
2416
|
+
if ($isDisabled) return theme.kitt.iconButton.disabled.backgroundColor;
|
|
2417
|
+
var _theme$kitt$iconButto = theme.kitt.iconButton,
|
|
2418
|
+
white = _theme$kitt$iconButto.white,
|
|
2419
|
+
defaultIconButton = _theme$kitt$iconButto["default"];
|
|
2420
|
+
if ($isWhite) return white.pressedBackgroundColor;
|
|
2421
|
+
return defaultIconButton.pressedBackgroundColor;
|
|
2422
|
+
}]
|
|
2423
|
+
}
|
|
2424
|
+
}));
|
|
2425
|
+
var StyledPressableIconButton = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
2426
|
+
displayName: "PressableIconButton__StyledPressableIconButton",
|
|
2427
|
+
componentId: "kitt-universal__sc-1m6jo3s-0"
|
|
2428
|
+
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref5) {
|
|
2429
|
+
var theme = _ref5.theme;
|
|
2430
|
+
return theme.kitt.iconButton.borderRadius;
|
|
2431
|
+
}, function (_ref6) {
|
|
2432
|
+
var theme = _ref6.theme;
|
|
2433
|
+
return theme.kitt.iconButton.width;
|
|
2434
|
+
}, function (_ref7) {
|
|
2435
|
+
var theme = _ref7.theme;
|
|
2436
|
+
return theme.kitt.iconButton.height;
|
|
2437
|
+
}, function (_ref8) {
|
|
2438
|
+
var theme = _ref8.theme,
|
|
2439
|
+
disabled = _ref8.disabled;
|
|
2440
|
+
var iconButton = theme.kitt.iconButton;
|
|
2441
|
+
var transition = iconButton.transition;
|
|
2442
|
+
|
|
2443
|
+
if (disabled) {
|
|
2444
|
+
return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
|
|
2448
|
+
});
|
|
2449
|
+
function PressableIconButton(_ref9) {
|
|
2450
|
+
var color = _ref9.color,
|
|
2451
|
+
disabled = _ref9.disabled,
|
|
2452
|
+
props = _objectWithoutProperties(_ref9, _excluded$6);
|
|
2453
|
+
|
|
2454
|
+
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
2455
|
+
as: PressableIconButtonWebWrapper,
|
|
2456
|
+
$isWhite: color === 'white',
|
|
2457
|
+
$isDisabled: Boolean(disabled),
|
|
2458
|
+
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
2459
|
+
disabled: disabled
|
|
2460
|
+
}))
|
|
2461
|
+
});
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2464
|
+
function PressableAnimatedContainer(_ref) {
|
|
2465
|
+
var children = _ref.children,
|
|
2466
|
+
color = _ref.color,
|
|
2467
|
+
disabled = _ref.disabled,
|
|
2468
|
+
onPress = _ref.onPress;
|
|
2469
|
+
return /*#__PURE__*/jsx(PressableIconButton, {
|
|
2470
|
+
accessibilityRole: "button",
|
|
2471
|
+
color: color,
|
|
2472
|
+
disabled: disabled,
|
|
2473
|
+
onPress: onPress,
|
|
2474
|
+
children: children
|
|
2475
|
+
});
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
var IconButtonContentBorder = /*#__PURE__*/styled$1(View).withConfig({
|
|
2479
|
+
displayName: "IconButton__IconButtonContentBorder",
|
|
2480
|
+
componentId: "kitt-universal__sc-swelbf-0"
|
|
2481
|
+
})(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
|
|
2823
2482
|
var theme = _ref.theme;
|
|
2824
|
-
return theme.kitt.
|
|
2483
|
+
return "".concat(theme.kitt.iconButton.borderWidth, "px solid");
|
|
2484
|
+
}, function (_ref2) {
|
|
2485
|
+
var theme = _ref2.theme,
|
|
2486
|
+
disabled = _ref2.disabled;
|
|
2487
|
+
return disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor;
|
|
2488
|
+
}, function (_ref3) {
|
|
2489
|
+
var theme = _ref3.theme;
|
|
2490
|
+
return theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth;
|
|
2491
|
+
}, function (_ref4) {
|
|
2492
|
+
var theme = _ref4.theme;
|
|
2493
|
+
return theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth;
|
|
2494
|
+
}, function (_ref5) {
|
|
2495
|
+
var theme = _ref5.theme;
|
|
2496
|
+
return theme.kitt.iconButton.borderRadius;
|
|
2825
2497
|
});
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2498
|
+
|
|
2499
|
+
function IconButtonContent(_ref6) {
|
|
2500
|
+
var disabled = _ref6.disabled,
|
|
2501
|
+
color = _ref6.color,
|
|
2502
|
+
icon = _ref6.icon;
|
|
2503
|
+
return /*#__PURE__*/jsx(IconButtonContentBorder, {
|
|
2504
|
+
disabled: disabled,
|
|
2505
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
2506
|
+
color: disabled ? 'black-light' : color,
|
|
2507
|
+
icon: icon
|
|
2508
|
+
})
|
|
2509
|
+
});
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
function IconButton(_ref7) {
|
|
2513
|
+
var icon = _ref7.icon,
|
|
2514
|
+
color = _ref7.color,
|
|
2515
|
+
disabled = _ref7.disabled,
|
|
2516
|
+
testID = _ref7.testID,
|
|
2517
|
+
accessibilityLabel = _ref7.accessibilityLabel,
|
|
2518
|
+
accessibilityRole = _ref7.accessibilityRole,
|
|
2519
|
+
onPress = _ref7.onPress;
|
|
2520
|
+
return /*#__PURE__*/jsx(PressableAnimatedContainer, {
|
|
2521
|
+
color: color,
|
|
2522
|
+
disabled: disabled,
|
|
2523
|
+
testID: testID,
|
|
2524
|
+
accessibilityLabel: accessibilityLabel,
|
|
2525
|
+
accessibilityRole: accessibilityRole,
|
|
2526
|
+
onPress: onPress,
|
|
2527
|
+
children: /*#__PURE__*/jsx(IconButtonContent, {
|
|
2528
|
+
disabled: disabled,
|
|
2529
|
+
color: color,
|
|
2530
|
+
icon: icon
|
|
2531
|
+
})
|
|
2830
2532
|
});
|
|
2831
2533
|
}
|
|
2832
|
-
FullScreenModal.Header = FullScreenModalHeader;
|
|
2833
|
-
FullScreenModal.Body = FullScreenModalBody;
|
|
2834
2534
|
|
|
2835
2535
|
var _excluded$5 = ["children"];
|
|
2836
2536
|
|
|
2837
|
-
function ownKeys$
|
|
2537
|
+
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; }
|
|
2838
2538
|
|
|
2839
|
-
function _objectSpread$
|
|
2840
|
-
var ContentView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2539
|
+
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; }
|
|
2540
|
+
var ContentView$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
2841
2541
|
displayName: "ListItemContent__ContentView",
|
|
2842
2542
|
componentId: "kitt-universal__sc-57q0u9-0"
|
|
2843
2543
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
@@ -2845,7 +2545,7 @@ function ListItemContent(_ref) {
|
|
|
2845
2545
|
var children = _ref.children,
|
|
2846
2546
|
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
2847
2547
|
|
|
2848
|
-
return /*#__PURE__*/jsx(ContentView, _objectSpread$
|
|
2548
|
+
return /*#__PURE__*/jsx(ContentView$1, _objectSpread$6(_objectSpread$6({}, rest), {}, {
|
|
2849
2549
|
children: children
|
|
2850
2550
|
}));
|
|
2851
2551
|
}
|
|
@@ -2853,9 +2553,9 @@ function ListItemContent(_ref) {
|
|
|
2853
2553
|
var _excluded$4 = ["children", "side"],
|
|
2854
2554
|
_excluded2$1 = ["children", "align"];
|
|
2855
2555
|
|
|
2856
|
-
function ownKeys$
|
|
2556
|
+
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; }
|
|
2857
2557
|
|
|
2858
|
-
function _objectSpread$
|
|
2558
|
+
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; }
|
|
2859
2559
|
var SideContainerView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2860
2560
|
displayName: "ListItemSideContent__SideContainerView",
|
|
2861
2561
|
componentId: "kitt-universal__sc-1vajiw-0"
|
|
@@ -2875,7 +2575,7 @@ function ListItemSideContainer(_ref3) {
|
|
|
2875
2575
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
2876
2576
|
rest = _objectWithoutProperties(_ref3, _excluded$4);
|
|
2877
2577
|
|
|
2878
|
-
return /*#__PURE__*/jsx(SideContainerView, _objectSpread$
|
|
2578
|
+
return /*#__PURE__*/jsx(SideContainerView, _objectSpread$5(_objectSpread$5({
|
|
2879
2579
|
side: side
|
|
2880
2580
|
}, rest), {}, {
|
|
2881
2581
|
children: children
|
|
@@ -2894,7 +2594,7 @@ function ListItemSideContent(_ref5) {
|
|
|
2894
2594
|
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
2895
2595
|
rest = _objectWithoutProperties(_ref5, _excluded2$1);
|
|
2896
2596
|
|
|
2897
|
-
return /*#__PURE__*/jsx(SideContentView, _objectSpread$
|
|
2597
|
+
return /*#__PURE__*/jsx(SideContentView, _objectSpread$5(_objectSpread$5({
|
|
2898
2598
|
align: align
|
|
2899
2599
|
}, rest), {}, {
|
|
2900
2600
|
children: children
|
|
@@ -2903,9 +2603,9 @@ function ListItemSideContent(_ref5) {
|
|
|
2903
2603
|
|
|
2904
2604
|
var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
2905
2605
|
|
|
2906
|
-
function ownKeys$
|
|
2606
|
+
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; }
|
|
2907
2607
|
|
|
2908
|
-
function _objectSpread$
|
|
2608
|
+
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; }
|
|
2909
2609
|
var ContainerView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2910
2610
|
displayName: "ListItem__ContainerView",
|
|
2911
2611
|
componentId: "kitt-universal__sc-2afp9s-0"
|
|
@@ -2947,14 +2647,14 @@ function ListItem(_ref5) {
|
|
|
2947
2647
|
onPress = _ref5.onPress,
|
|
2948
2648
|
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
2949
2649
|
|
|
2950
|
-
var Wrapper = onPress ? Pressable : Fragment
|
|
2951
|
-
var wrapperProps = onPress ? _objectSpread$
|
|
2650
|
+
var Wrapper = onPress ? Pressable : Fragment;
|
|
2651
|
+
var wrapperProps = onPress ? _objectSpread$4({
|
|
2952
2652
|
accessibilityRole: 'button',
|
|
2953
2653
|
onPress: onPress
|
|
2954
2654
|
}, rest) : undefined;
|
|
2955
2655
|
var containerProps = onPress ? undefined : rest;
|
|
2956
|
-
return /*#__PURE__*/jsx(Wrapper, _objectSpread$
|
|
2957
|
-
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread$
|
|
2656
|
+
return /*#__PURE__*/jsx(Wrapper, _objectSpread$4(_objectSpread$4({}, wrapperProps), {}, {
|
|
2657
|
+
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread$4(_objectSpread$4({
|
|
2958
2658
|
withPadding: withPadding,
|
|
2959
2659
|
borders: borders
|
|
2960
2660
|
}, containerProps), {}, {
|
|
@@ -3183,6 +2883,168 @@ function Message(_ref) {
|
|
|
3183
2883
|
});
|
|
3184
2884
|
}
|
|
3185
2885
|
|
|
2886
|
+
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; }
|
|
2887
|
+
|
|
2888
|
+
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; }
|
|
2889
|
+
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
2890
|
+
var OverlayPressable = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
2891
|
+
displayName: "Overlay__OverlayPressable",
|
|
2892
|
+
componentId: "kitt-universal__sc-1cz1gbr-0"
|
|
2893
|
+
})(function (_ref) {
|
|
2894
|
+
var theme = _ref.theme;
|
|
2895
|
+
return _objectSpread$3(_objectSpread$3({}, StyleSheet.absoluteFillObject), {}, {
|
|
2896
|
+
backgroundColor: theme.kitt.colors.overlay.dark
|
|
2897
|
+
});
|
|
2898
|
+
});
|
|
2899
|
+
function Overlay(_ref2) {
|
|
2900
|
+
var onPress = _ref2.onPress;
|
|
2901
|
+
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
2902
|
+
accessibilityRole: "none",
|
|
2903
|
+
onPress: onPress,
|
|
2904
|
+
children: /*#__PURE__*/jsx(View, {})
|
|
2905
|
+
});
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
var BodyView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2909
|
+
displayName: "Body__BodyView",
|
|
2910
|
+
componentId: "kitt-universal__sc-17fwpo4-0"
|
|
2911
|
+
})(["padding:", "px ", "px;"], function (_ref) {
|
|
2912
|
+
var theme = _ref.theme;
|
|
2913
|
+
return theme.kitt.spacing * 6;
|
|
2914
|
+
}, function (_ref2) {
|
|
2915
|
+
var theme = _ref2.theme;
|
|
2916
|
+
return theme.kitt.spacing * 4;
|
|
2917
|
+
});
|
|
2918
|
+
function ModalBody(_ref3) {
|
|
2919
|
+
var children = _ref3.children;
|
|
2920
|
+
return /*#__PURE__*/jsx(ScrollView, {
|
|
2921
|
+
children: /*#__PURE__*/jsx(BodyView, {
|
|
2922
|
+
children: children
|
|
2923
|
+
})
|
|
2924
|
+
});
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2927
|
+
var FooterView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2928
|
+
displayName: "Footer__FooterView",
|
|
2929
|
+
componentId: "kitt-universal__sc-1ujq2dc-0"
|
|
2930
|
+
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
2931
|
+
var theme = _ref.theme;
|
|
2932
|
+
return theme.kitt.spacing * 4;
|
|
2933
|
+
}, function (_ref2) {
|
|
2934
|
+
var theme = _ref2.theme;
|
|
2935
|
+
return theme.kitt.colors.separator;
|
|
2936
|
+
});
|
|
2937
|
+
function ModalFooter(_ref3) {
|
|
2938
|
+
var children = _ref3.children;
|
|
2939
|
+
return /*#__PURE__*/jsx(FooterView, {
|
|
2940
|
+
children: children
|
|
2941
|
+
});
|
|
2942
|
+
}
|
|
2943
|
+
|
|
2944
|
+
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
2945
|
+
|
|
2946
|
+
var HeaderView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2947
|
+
displayName: "Header__HeaderView",
|
|
2948
|
+
componentId: "kitt-universal__sc-1iwabch-0"
|
|
2949
|
+
})(["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) {
|
|
2950
|
+
var theme = _ref.theme;
|
|
2951
|
+
return theme.kitt.spacing * 2;
|
|
2952
|
+
}, function (_ref2) {
|
|
2953
|
+
var theme = _ref2.theme;
|
|
2954
|
+
return theme.kitt.colors.separator;
|
|
2955
|
+
});
|
|
2956
|
+
var LeftIconView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2957
|
+
displayName: "Header__LeftIconView",
|
|
2958
|
+
componentId: "kitt-universal__sc-1iwabch-1"
|
|
2959
|
+
})(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
|
|
2960
|
+
var theme = _ref3.theme;
|
|
2961
|
+
return theme.kitt.spacing * 2;
|
|
2962
|
+
});
|
|
2963
|
+
var RightIconView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2964
|
+
displayName: "Header__RightIconView",
|
|
2965
|
+
componentId: "kitt-universal__sc-1iwabch-2"
|
|
2966
|
+
})(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
|
|
2967
|
+
var theme = _ref4.theme;
|
|
2968
|
+
return theme.kitt.spacing * 2;
|
|
2969
|
+
});
|
|
2970
|
+
var TitleView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2971
|
+
displayName: "Header__TitleView",
|
|
2972
|
+
componentId: "kitt-universal__sc-1iwabch-3"
|
|
2973
|
+
})(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
|
|
2974
|
+
var theme = _ref5.theme,
|
|
2975
|
+
isIconLeft = _ref5.isIconLeft;
|
|
2976
|
+
return isIconLeft ? 0 : theme.kitt.spacing * 2;
|
|
2977
|
+
});
|
|
2978
|
+
function ModalHeader(_ref6) {
|
|
2979
|
+
var left = _ref6.left,
|
|
2980
|
+
right = _ref6.right,
|
|
2981
|
+
children = _ref6.children;
|
|
2982
|
+
var onClose = useContext(OnCloseContext);
|
|
2983
|
+
var isIconLeft = !!left;
|
|
2984
|
+
return /*#__PURE__*/jsxs(HeaderView, {
|
|
2985
|
+
children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
|
|
2986
|
+
children: left
|
|
2987
|
+
}), /*#__PURE__*/jsx(TitleView, {
|
|
2988
|
+
isIconLeft: isIconLeft,
|
|
2989
|
+
children: children
|
|
2990
|
+
}), right !== undefined ? right : /*#__PURE__*/jsx(RightIconView, {
|
|
2991
|
+
children: /*#__PURE__*/jsx(IconButton, {
|
|
2992
|
+
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
2993
|
+
onPress: onClose
|
|
2994
|
+
})
|
|
2995
|
+
})]
|
|
2996
|
+
});
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
var ModalView = /*#__PURE__*/styled$1(View).withConfig({
|
|
3000
|
+
displayName: "Modal__ModalView",
|
|
3001
|
+
componentId: "kitt-universal__sc-1xy2w5u-0"
|
|
3002
|
+
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
|
|
3003
|
+
var theme = _ref.theme;
|
|
3004
|
+
return theme.kitt.spacing * 20;
|
|
3005
|
+
}, function (_ref2) {
|
|
3006
|
+
var theme = _ref2.theme;
|
|
3007
|
+
return theme.kitt.spacing * 4;
|
|
3008
|
+
});
|
|
3009
|
+
var ContentView = /*#__PURE__*/styled$1(View).withConfig({
|
|
3010
|
+
displayName: "Modal__ContentView",
|
|
3011
|
+
componentId: "kitt-universal__sc-1xy2w5u-1"
|
|
3012
|
+
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], function (_ref3) {
|
|
3013
|
+
var theme = _ref3.theme;
|
|
3014
|
+
return theme.kitt.card.borderRadius;
|
|
3015
|
+
}, function (_ref4) {
|
|
3016
|
+
var theme = _ref4.theme;
|
|
3017
|
+
return theme.kitt.colors.uiBackgroundLight;
|
|
3018
|
+
});
|
|
3019
|
+
function Modal(_ref5) {
|
|
3020
|
+
var visible = _ref5.visible,
|
|
3021
|
+
children = _ref5.children,
|
|
3022
|
+
onClose = _ref5.onClose,
|
|
3023
|
+
onEntered = _ref5.onEntered,
|
|
3024
|
+
onExited = _ref5.onExited;
|
|
3025
|
+
return /*#__PURE__*/jsx(OnCloseContext.Provider, {
|
|
3026
|
+
value: onClose,
|
|
3027
|
+
children: /*#__PURE__*/jsx(Modal$1, {
|
|
3028
|
+
transparent: true,
|
|
3029
|
+
animationType: "fade",
|
|
3030
|
+
visible: visible,
|
|
3031
|
+
onShow: onEntered,
|
|
3032
|
+
onDismiss: onExited,
|
|
3033
|
+
onRequestClose: onClose,
|
|
3034
|
+
children: /*#__PURE__*/jsxs(ModalView, {
|
|
3035
|
+
children: [/*#__PURE__*/jsx(Overlay, {
|
|
3036
|
+
onPress: onClose
|
|
3037
|
+
}), /*#__PURE__*/jsx(ContentView, {
|
|
3038
|
+
children: children
|
|
3039
|
+
})]
|
|
3040
|
+
})
|
|
3041
|
+
})
|
|
3042
|
+
});
|
|
3043
|
+
}
|
|
3044
|
+
Modal.Header = ModalHeader;
|
|
3045
|
+
Modal.Body = ModalBody;
|
|
3046
|
+
Modal.Footer = ModalFooter;
|
|
3047
|
+
|
|
3186
3048
|
function Notification(_ref) {
|
|
3187
3049
|
var type = _ref.type,
|
|
3188
3050
|
children = _ref.children,
|
|
@@ -3639,7 +3501,7 @@ function StoryGridCol(_ref2) {
|
|
|
3639
3501
|
return null;
|
|
3640
3502
|
}
|
|
3641
3503
|
|
|
3642
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
3504
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
3643
3505
|
children: [title ? /*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
3644
3506
|
numberOfLines: 1,
|
|
3645
3507
|
color: titleColor,
|
|
@@ -3886,7 +3748,7 @@ function Tooltip(_ref3) {
|
|
|
3886
3748
|
middlewareData: middlewareData
|
|
3887
3749
|
});
|
|
3888
3750
|
}, [x, y, reference, floating, strategy, update, refs, middlewareData, onUpdate]);
|
|
3889
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
3751
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
3890
3752
|
children: [/*#__PURE__*/jsx(StyledTooltipTrigger, {
|
|
3891
3753
|
ref: reference,
|
|
3892
3754
|
accessibilityRole: "button",
|