@ornikar/kitt-universal 4.3.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +1 -1
- package/dist/definitions/forms/Checkbox/Checkbox.d.ts +13 -0
- package/dist/definitions/forms/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/definitions/forms/InputPhone/InputPhone.d.ts +7 -0
- package/dist/definitions/forms/InputPhone/InputPhone.d.ts.map +1 -0
- package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +1 -1
- package/dist/definitions/index.d.ts +4 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +12 -0
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/checkbox.d.ts +13 -0
- package/dist/definitions/themes/late-ocean/checkbox.d.ts.map +1 -0
- package/dist/definitions/themes/late-ocean/forms.d.ts +12 -0
- package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +2210 -2115
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +2210 -2115
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +2266 -2171
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +2231 -2134
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +977 -881
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +813 -717
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +15 -1
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +15 -1
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +15 -1
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +15 -1
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +15 -1
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +15 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
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, EyeOffIcon, EyeIcon, LoaderIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, XIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
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
8
|
import { forwardRef, cloneElement, useContext, createContext, useMemo, useState, Fragment, Children, useEffect } from 'react';
|
|
@@ -16,9 +16,9 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
|
16
16
|
import { useFloating, offset, shift, flip, getScrollParents } from '@floating-ui/react-dom';
|
|
17
17
|
import { makeDecorator } from '@storybook/addons';
|
|
18
18
|
|
|
19
|
-
function ownKeys$
|
|
19
|
+
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; }
|
|
20
20
|
|
|
21
|
-
function _objectSpread$
|
|
21
|
+
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; }
|
|
22
22
|
// type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
|
|
23
23
|
// type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
|
|
24
24
|
// export function withTheme<Props extends { theme: DefaultTheme }, C>(
|
|
@@ -33,7 +33,7 @@ function withTheme(WrappedComponent) {
|
|
|
33
33
|
// eslint-disable-next-line prefer-arrow-callback
|
|
34
34
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
35
35
|
var theme = /*#__PURE__*/useTheme();
|
|
36
|
-
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$
|
|
36
|
+
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$l({
|
|
37
37
|
ref: ref,
|
|
38
38
|
theme: theme
|
|
39
39
|
}, props));
|
|
@@ -138,9 +138,9 @@ var KittBreakpointsMax = {
|
|
|
138
138
|
|
|
139
139
|
var _excluded$f = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
140
140
|
|
|
141
|
-
function ownKeys$
|
|
141
|
+
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; }
|
|
142
142
|
|
|
143
|
-
function _objectSpread$
|
|
143
|
+
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; }
|
|
144
144
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
145
145
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
146
146
|
function useTypographyColor() {
|
|
@@ -234,14 +234,14 @@ function Typography(_ref4) {
|
|
|
234
234
|
var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular';
|
|
235
235
|
var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
|
|
236
236
|
value: isHeader,
|
|
237
|
-
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$
|
|
237
|
+
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$k({
|
|
238
238
|
$color: colorOrDefaultToBlack,
|
|
239
239
|
$isHeader: isHeader,
|
|
240
240
|
$typeForCurrentWindowSize: typeForCurrentWindowSize,
|
|
241
241
|
$variant: nonNullableVariant,
|
|
242
242
|
accessibilityRole: accessibilityRole || undefined
|
|
243
243
|
}, otherProps))
|
|
244
|
-
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$
|
|
244
|
+
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$k({
|
|
245
245
|
$color: colorOrDefaultToBlack,
|
|
246
246
|
$isHeader: isHeader,
|
|
247
247
|
$variant: nonNullableVariant,
|
|
@@ -254,13 +254,13 @@ function Typography(_ref4) {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
function TypographyText(props) {
|
|
257
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
257
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$k({
|
|
258
258
|
accessibilityRole: null
|
|
259
259
|
}, props));
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
function TypographyParagraph(props) {
|
|
263
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
263
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$k({
|
|
264
264
|
accessibilityRole: "paragraph"
|
|
265
265
|
}, props));
|
|
266
266
|
}
|
|
@@ -268,7 +268,7 @@ function TypographyParagraph(props) {
|
|
|
268
268
|
var createHeading = function (level, defaultBase) {
|
|
269
269
|
// https://github.com/necolas/react-native-web/issues/401
|
|
270
270
|
function TypographyHeading(props) {
|
|
271
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
271
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$k(_objectSpread$k({
|
|
272
272
|
accessibilityRole: "header",
|
|
273
273
|
base: defaultBase
|
|
274
274
|
}, props), {}, {
|
|
@@ -306,9 +306,9 @@ Typography.h5 = createHeading(5, 'header5');
|
|
|
306
306
|
|
|
307
307
|
var _excluded$e = ["size", "base", "round", "light"];
|
|
308
308
|
|
|
309
|
-
function ownKeys$
|
|
309
|
+
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; }
|
|
310
310
|
|
|
311
|
-
function _objectSpread$
|
|
311
|
+
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; }
|
|
312
312
|
|
|
313
313
|
var getInitials = function (firstname, lastname) {
|
|
314
314
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
@@ -386,7 +386,7 @@ function Avatar(_ref6) {
|
|
|
386
386
|
$size: size,
|
|
387
387
|
$isRound: round,
|
|
388
388
|
$isLight: light,
|
|
389
|
-
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$
|
|
389
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$j({
|
|
390
390
|
size: size,
|
|
391
391
|
base: base,
|
|
392
392
|
isLight: light
|
|
@@ -400,9 +400,9 @@ function isSubtle(type) {
|
|
|
400
400
|
|
|
401
401
|
var _excluded$d = ["$type", "$isStretch", "disabled"];
|
|
402
402
|
|
|
403
|
-
function ownKeys$
|
|
403
|
+
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; }
|
|
404
404
|
|
|
405
|
-
function _objectSpread$
|
|
405
|
+
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; }
|
|
406
406
|
var AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
407
407
|
name: "AnimatedButtonPressableContainer",
|
|
408
408
|
"class": "a1vkj3mh",
|
|
@@ -508,7 +508,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref18, ref) {
|
|
|
508
508
|
$type: $type,
|
|
509
509
|
$isDisabled: !!disabled,
|
|
510
510
|
$isStretch: $isStretch,
|
|
511
|
-
children: /*#__PURE__*/jsx(Pressable, _objectSpread$
|
|
511
|
+
children: /*#__PURE__*/jsx(Pressable, _objectSpread$i({
|
|
512
512
|
disabled: disabled
|
|
513
513
|
}, props))
|
|
514
514
|
});
|
|
@@ -555,23 +555,23 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled$1(View).withConfig({
|
|
|
555
555
|
var _excluded$c = ["color"],
|
|
556
556
|
_excluded2$2 = ["color"];
|
|
557
557
|
|
|
558
|
-
function ownKeys$
|
|
558
|
+
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; }
|
|
559
559
|
|
|
560
|
-
function _objectSpread$
|
|
560
|
+
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; }
|
|
561
561
|
|
|
562
562
|
function TypographyIconSpecifiedColor(_ref) {
|
|
563
563
|
var color = _ref.color,
|
|
564
564
|
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
565
565
|
|
|
566
566
|
var theme = /*#__PURE__*/useTheme();
|
|
567
|
-
return /*#__PURE__*/jsx(Icon, _objectSpread$
|
|
567
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread$h(_objectSpread$h({}, props), {}, {
|
|
568
568
|
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
569
569
|
}));
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
function TypographyIconInheritColor(props) {
|
|
573
573
|
var color = useTypographyColor();
|
|
574
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$
|
|
574
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$h({
|
|
575
575
|
color: color
|
|
576
576
|
}, props));
|
|
577
577
|
}
|
|
@@ -581,19 +581,19 @@ function TypographyIcon(_ref2) {
|
|
|
581
581
|
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
582
582
|
|
|
583
583
|
if (color) {
|
|
584
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$
|
|
584
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$h({
|
|
585
585
|
color: color
|
|
586
586
|
}, props));
|
|
587
587
|
}
|
|
588
588
|
|
|
589
|
-
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$
|
|
589
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$h({}, props));
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
var _excluded$b = ["type", "isDisabled", "$isStretch", "icon", "children"];
|
|
593
593
|
|
|
594
|
-
function ownKeys$
|
|
594
|
+
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; }
|
|
595
595
|
|
|
596
|
-
function _objectSpread$
|
|
596
|
+
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; }
|
|
597
597
|
|
|
598
598
|
var getTextColorByType = function (type) {
|
|
599
599
|
switch (type) {
|
|
@@ -701,7 +701,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
701
701
|
color: isWebSubtle ? 'inherit' : color
|
|
702
702
|
};
|
|
703
703
|
return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
|
|
704
|
-
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$
|
|
704
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$g(_objectSpread$g({}, buttonIconSharedProps), {}, {
|
|
705
705
|
testID: "button-left-icon",
|
|
706
706
|
icon: icon
|
|
707
707
|
})) : null, /*#__PURE__*/jsx(StyledButtonText, {
|
|
@@ -712,7 +712,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
712
712
|
,
|
|
713
713
|
color: isWebSubtle ? undefined : color,
|
|
714
714
|
children: children
|
|
715
|
-
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$
|
|
715
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$g(_objectSpread$g({}, buttonIconSharedProps), {}, {
|
|
716
716
|
icon: icon
|
|
717
717
|
})) : null]
|
|
718
718
|
});
|
|
@@ -743,7 +743,7 @@ function ButtonContent(_ref7) {
|
|
|
743
743
|
$isSubtle: isSubtle(type),
|
|
744
744
|
$isStretch: $isStretch,
|
|
745
745
|
$isIconOnly: Boolean(!children && icon),
|
|
746
|
-
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$
|
|
746
|
+
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$g(_objectSpread$g({
|
|
747
747
|
icon: icon,
|
|
748
748
|
type: type,
|
|
749
749
|
isDisabled: isDisabled,
|
|
@@ -871,9 +871,9 @@ var defaultOpenLinkBehavior = {
|
|
|
871
871
|
|
|
872
872
|
var _excluded$a = ["as", "href", "openLinkBehavior", "onPress"];
|
|
873
873
|
|
|
874
|
-
function ownKeys$
|
|
874
|
+
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; }
|
|
875
875
|
|
|
876
|
-
function _objectSpread$
|
|
876
|
+
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; }
|
|
877
877
|
function ExternalLink(_ref) {
|
|
878
878
|
var Component = _ref.as,
|
|
879
879
|
href = _ref.href,
|
|
@@ -882,7 +882,7 @@ function ExternalLink(_ref) {
|
|
|
882
882
|
onPress = _ref.onPress,
|
|
883
883
|
rest = _objectWithoutProperties(_ref, _excluded$a);
|
|
884
884
|
|
|
885
|
-
return /*#__PURE__*/jsx(Component, _objectSpread$
|
|
885
|
+
return /*#__PURE__*/jsx(Component, _objectSpread$f(_objectSpread$f({}, rest), {}, {
|
|
886
886
|
href: href,
|
|
887
887
|
hrefAttrs: (openLinkBehavior === null || openLinkBehavior === void 0 ? void 0 : openLinkBehavior.web) === 'targetSelf' ? undefined : {
|
|
888
888
|
target: '_blank',
|
|
@@ -892,2295 +892,2465 @@ function ExternalLink(_ref) {
|
|
|
892
892
|
}));
|
|
893
893
|
}
|
|
894
894
|
|
|
895
|
-
var
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
}
|
|
918
|
-
var theme = _ref7.theme;
|
|
919
|
-
return theme.kitt.typography.types.bodies.fontFamily.regular;
|
|
920
|
-
});
|
|
921
|
-
|
|
922
|
-
function getInputUIState(_ref) {
|
|
923
|
-
var isFocused = _ref.isFocused,
|
|
924
|
-
isDisabled = _ref.isDisabled,
|
|
925
|
-
formState = _ref.formState;
|
|
926
|
-
if (isDisabled) return 'disabled';
|
|
927
|
-
if (isFocused) return 'focus';
|
|
928
|
-
if (formState === 'invalid') return 'invalid';
|
|
929
|
-
return 'default';
|
|
930
|
-
}
|
|
895
|
+
var lateOceanColorPalette = {
|
|
896
|
+
lateOcean: '#4C34E0',
|
|
897
|
+
lateOceanLight1: '#705DE6',
|
|
898
|
+
lateOceanLight2: '#9485EC',
|
|
899
|
+
lateOceanLight3: '#D6BAF9',
|
|
900
|
+
warmEmbrace: '#F4D3CE',
|
|
901
|
+
warmEmbraceLight1: '#FFEDE6',
|
|
902
|
+
black1000: '#000000',
|
|
903
|
+
black800: '#2C293D',
|
|
904
|
+
black555: '#737373',
|
|
905
|
+
black200: '#CCCCCC',
|
|
906
|
+
black100: '#E5E5E5',
|
|
907
|
+
black50: '#F2F2F2',
|
|
908
|
+
black25: '#F9F9F9',
|
|
909
|
+
white: '#FFFFFF',
|
|
910
|
+
viride: '#38836D',
|
|
911
|
+
englishVermillon: '#D44148',
|
|
912
|
+
goldCrayola: '#F8C583',
|
|
913
|
+
aero: '#89BDDD',
|
|
914
|
+
transparent: 'transparent',
|
|
915
|
+
moonPurple: '#DBD6F9',
|
|
916
|
+
moonPurpleLight1: '#EDEBFC'
|
|
917
|
+
};
|
|
931
918
|
|
|
932
|
-
var
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
}],
|
|
954
|
-
"i1encr9g-3": [function (_ref4) {
|
|
955
|
-
var theme = _ref4.theme,
|
|
956
|
-
$isDisabled = _ref4.$isDisabled;
|
|
957
|
-
if ($isDisabled) return theme.kitt.forms.input.states.disabled.borderColor;
|
|
958
|
-
return theme.kitt.forms.input.states.focus.borderColor;
|
|
959
|
-
}]
|
|
919
|
+
var colors = {
|
|
920
|
+
primary: lateOceanColorPalette.lateOcean,
|
|
921
|
+
primaryLight: lateOceanColorPalette.lateOceanLight1,
|
|
922
|
+
accent: lateOceanColorPalette.warmEmbrace,
|
|
923
|
+
accentLight: lateOceanColorPalette.warmEmbraceLight1,
|
|
924
|
+
success: lateOceanColorPalette.viride,
|
|
925
|
+
correct: lateOceanColorPalette.viride,
|
|
926
|
+
danger: lateOceanColorPalette.englishVermillon,
|
|
927
|
+
info: lateOceanColorPalette.aero,
|
|
928
|
+
warning: lateOceanColorPalette.goldCrayola,
|
|
929
|
+
separator: lateOceanColorPalette.black100,
|
|
930
|
+
hover: lateOceanColorPalette.black100,
|
|
931
|
+
black: lateOceanColorPalette.black1000,
|
|
932
|
+
uiBackground: lateOceanColorPalette.black25,
|
|
933
|
+
uiBackgroundLight: lateOceanColorPalette.white,
|
|
934
|
+
transparent: lateOceanColorPalette.transparent,
|
|
935
|
+
disabled: lateOceanColorPalette.black50,
|
|
936
|
+
overlay: {
|
|
937
|
+
dark: 'rgba(41, 48, 51, 0.25)',
|
|
938
|
+
light: 'rgba(255, 255, 255, 0.90)',
|
|
939
|
+
fullscreenLoader: 'rgba(0, 0, 0, 0.25)'
|
|
960
940
|
}
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
var _excluded$9 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
941
|
+
};
|
|
964
942
|
|
|
965
|
-
|
|
943
|
+
var avatar = {
|
|
944
|
+
borderRadius: 10,
|
|
945
|
+
"default": {
|
|
946
|
+
backgroundColor: colors.primary
|
|
947
|
+
},
|
|
948
|
+
light: {
|
|
949
|
+
backgroundColor: lateOceanColorPalette.black100
|
|
950
|
+
}
|
|
951
|
+
};
|
|
966
952
|
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
953
|
+
var button = {
|
|
954
|
+
borderRadius: 30,
|
|
955
|
+
borderWidth: {
|
|
956
|
+
disabled: 2,
|
|
957
|
+
focus: 3
|
|
958
|
+
},
|
|
959
|
+
minHeight: 40,
|
|
960
|
+
minWidth: 40,
|
|
961
|
+
maxWidth: 335,
|
|
962
|
+
scale: {
|
|
963
|
+
base: {
|
|
964
|
+
"default": 1,
|
|
965
|
+
hover: 0.95,
|
|
966
|
+
active: 0.95
|
|
967
|
+
},
|
|
968
|
+
medium: {
|
|
969
|
+
hover: 1.05
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
contentPadding: {
|
|
973
|
+
"default": '8px 16px 7px',
|
|
974
|
+
large: '12px 24px 11px',
|
|
975
|
+
disabled: '6px 14px 5px'
|
|
976
|
+
},
|
|
977
|
+
transition: {
|
|
978
|
+
duration: '200ms',
|
|
979
|
+
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
980
|
+
},
|
|
981
|
+
"default": {
|
|
982
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
983
|
+
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
984
|
+
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
985
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
986
|
+
},
|
|
987
|
+
primary: {
|
|
988
|
+
backgroundColor: colors.primary,
|
|
989
|
+
pressedBackgroundColor: colors.primaryLight,
|
|
990
|
+
hoverBackgroundColor: colors.primaryLight,
|
|
991
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)'
|
|
992
|
+
},
|
|
993
|
+
white: {
|
|
994
|
+
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
995
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
996
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
997
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.1)'
|
|
998
|
+
},
|
|
999
|
+
subtle: {
|
|
1000
|
+
backgroundColor: colors.transparent,
|
|
1001
|
+
pressedBackgroundColor: colors.transparent,
|
|
1002
|
+
hoverBackgroundColor: colors.transparent,
|
|
1003
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)',
|
|
1004
|
+
color: colors.primary,
|
|
1005
|
+
hoverColor: 'rgba(76, 52, 224, 0.8)',
|
|
1006
|
+
activeColor: 'rgba(76, 52, 224, 0.8)'
|
|
1007
|
+
},
|
|
1008
|
+
'subtle-dark': {
|
|
1009
|
+
backgroundColor: colors.transparent,
|
|
1010
|
+
pressedBackgroundColor: colors.transparent,
|
|
1011
|
+
hoverBackgroundColor: colors.transparent,
|
|
1012
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)',
|
|
1013
|
+
color: colors.black,
|
|
1014
|
+
hoverColor: 'rgba(0, 0, 0, 0.8)',
|
|
1015
|
+
activeColor: 'rgba(0, 0, 0, 0.8)'
|
|
1016
|
+
},
|
|
1017
|
+
disabled: {
|
|
1018
|
+
backgroundColor: colors.disabled,
|
|
1019
|
+
pressedBackgroundColor: colors.disabled,
|
|
1020
|
+
hoverBackgroundColor: colors.disabled,
|
|
1021
|
+
focusBorderColor: lateOceanColorPalette.black100,
|
|
1022
|
+
borderColor: lateOceanColorPalette.black100
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
974
1025
|
|
|
975
|
-
|
|
976
|
-
|
|
1026
|
+
var card = {
|
|
1027
|
+
borderRadius: 20,
|
|
1028
|
+
borderWidth: 2,
|
|
1029
|
+
primary: {
|
|
1030
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
1031
|
+
borderColor: colors.primary
|
|
1032
|
+
},
|
|
1033
|
+
secondary: {
|
|
1034
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
1035
|
+
borderColor: colors.separator
|
|
1036
|
+
},
|
|
1037
|
+
subtle: {
|
|
1038
|
+
backgroundColor: lateOceanColorPalette.black50,
|
|
1039
|
+
borderColor: colors.separator
|
|
977
1040
|
}
|
|
1041
|
+
};
|
|
978
1042
|
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:10px;"]);
|
|
994
|
-
var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
995
|
-
var id = _ref4.id,
|
|
996
|
-
right = _ref4.right,
|
|
997
|
-
_ref4$minHeight = _ref4.minHeight,
|
|
998
|
-
minHeight = _ref4$minHeight === void 0 ? 0 : _ref4$minHeight,
|
|
999
|
-
formState = _ref4.state,
|
|
1000
|
-
internalForceState = _ref4.internalForceState,
|
|
1001
|
-
_ref4$disabled = _ref4.disabled,
|
|
1002
|
-
disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
|
|
1003
|
-
_ref4$autoCorrect = _ref4.autoCorrect,
|
|
1004
|
-
autoCorrect = _ref4$autoCorrect === void 0 ? true : _ref4$autoCorrect,
|
|
1005
|
-
_ref4$textContentType = _ref4.textContentType,
|
|
1006
|
-
textContentType = _ref4$textContentType === void 0 ? 'none' : _ref4$textContentType,
|
|
1007
|
-
_ref4$autoCompleteTyp = _ref4.autoCompleteType,
|
|
1008
|
-
autoCompleteType = _ref4$autoCompleteTyp === void 0 ? 'off' : _ref4$autoCompleteTyp,
|
|
1009
|
-
_ref4$keyboardType = _ref4.keyboardType,
|
|
1010
|
-
keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
|
|
1011
|
-
_onFocus = _ref4.onFocus,
|
|
1012
|
-
_onBlur = _ref4.onBlur,
|
|
1013
|
-
props = _objectWithoutProperties(_ref4, _excluded$9);
|
|
1014
|
-
|
|
1015
|
-
var theme = /*#__PURE__*/useTheme();
|
|
1043
|
+
var feedbackMessage = {
|
|
1044
|
+
danger: {
|
|
1045
|
+
backgroundColor: colors.danger
|
|
1046
|
+
},
|
|
1047
|
+
success: {
|
|
1048
|
+
backgroundColor: colors.success
|
|
1049
|
+
},
|
|
1050
|
+
info: {
|
|
1051
|
+
backgroundColor: colors.info
|
|
1052
|
+
},
|
|
1053
|
+
warning: {
|
|
1054
|
+
backgroundColor: colors.warning
|
|
1055
|
+
}
|
|
1056
|
+
};
|
|
1016
1057
|
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1058
|
+
var checkbox = {
|
|
1059
|
+
borderWidth: 2,
|
|
1060
|
+
borderRadius: 5,
|
|
1061
|
+
height: 20,
|
|
1062
|
+
width: 20,
|
|
1063
|
+
iconSize: 14,
|
|
1064
|
+
borderColor: colors.separator,
|
|
1065
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
1066
|
+
checkedBorderColor: colors.primary,
|
|
1067
|
+
checkedBackgroundColor: colors.primary,
|
|
1068
|
+
markColor: colors.uiBackgroundLight
|
|
1069
|
+
};
|
|
1021
1070
|
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1071
|
+
var calcLineHeight = function (fontSize, lineHeightMultiplier) {
|
|
1072
|
+
return Math.round(fontSize * lineHeightMultiplier);
|
|
1073
|
+
};
|
|
1074
|
+
var createTypographyTypeConfig = function (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) {
|
|
1075
|
+
return {
|
|
1076
|
+
baseAndSmall: {
|
|
1077
|
+
fontSize: baseAndSmallFontSize,
|
|
1078
|
+
lineHeight: calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)
|
|
1079
|
+
},
|
|
1080
|
+
mediumAndWide: {
|
|
1081
|
+
fontSize: mediumAndWideFontSize,
|
|
1082
|
+
lineHeight: calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)
|
|
1083
|
+
}
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1086
|
+
var typography = {
|
|
1087
|
+
colors: {
|
|
1088
|
+
black: lateOceanColorPalette.black1000,
|
|
1089
|
+
'black-anthracite': lateOceanColorPalette.black800,
|
|
1090
|
+
'black-light': lateOceanColorPalette.black555,
|
|
1091
|
+
white: lateOceanColorPalette.white,
|
|
1092
|
+
'white-light': lateOceanColorPalette.white,
|
|
1093
|
+
primary: lateOceanColorPalette.lateOcean,
|
|
1094
|
+
'primary-light': lateOceanColorPalette.lateOceanLight1,
|
|
1095
|
+
accent: lateOceanColorPalette.warmEmbrace,
|
|
1096
|
+
success: lateOceanColorPalette.viride,
|
|
1097
|
+
danger: lateOceanColorPalette.englishVermillon
|
|
1098
|
+
},
|
|
1099
|
+
types: {
|
|
1100
|
+
headers: {
|
|
1101
|
+
fontFamily: {
|
|
1102
|
+
regular: 'Moderat',
|
|
1103
|
+
bold: 'Moderat'
|
|
1045
1104
|
},
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1105
|
+
fontWeight: 400,
|
|
1106
|
+
fontStyle: 'normal',
|
|
1107
|
+
configs: {
|
|
1108
|
+
// also known as xxlarge
|
|
1109
|
+
header1: createTypographyTypeConfig(1.3, 38, 62),
|
|
1110
|
+
// also known as xlarge
|
|
1111
|
+
header2: createTypographyTypeConfig(1.3, 32, 48),
|
|
1112
|
+
// also known as medium
|
|
1113
|
+
header3: createTypographyTypeConfig(1.3, 24, 36),
|
|
1114
|
+
// also known as xsmall
|
|
1115
|
+
header4: createTypographyTypeConfig(1.3, 18, 24),
|
|
1116
|
+
// also known as xxsmall
|
|
1117
|
+
header5: createTypographyTypeConfig(1.3, 18, 18)
|
|
1049
1118
|
}
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1119
|
+
},
|
|
1120
|
+
bodies: {
|
|
1121
|
+
fontFamily: {
|
|
1122
|
+
regular: 'Noto Sans',
|
|
1123
|
+
bold: 'Noto Sans'
|
|
1124
|
+
},
|
|
1125
|
+
fontWeight: {
|
|
1126
|
+
regular: 400,
|
|
1127
|
+
bold: 700
|
|
1128
|
+
},
|
|
1129
|
+
fontStyle: {
|
|
1130
|
+
regular: 'normal',
|
|
1131
|
+
bold: 'normal'
|
|
1132
|
+
},
|
|
1133
|
+
configs: {
|
|
1134
|
+
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
1135
|
+
'body-medium': createTypographyTypeConfig(1.6, 18, 18),
|
|
1136
|
+
body: createTypographyTypeConfig(1.6, 16, 16),
|
|
1137
|
+
'body-small': createTypographyTypeConfig(1.6, 14, 14),
|
|
1138
|
+
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
},
|
|
1142
|
+
link: {
|
|
1143
|
+
disabledColor: lateOceanColorPalette.black200
|
|
1144
|
+
}
|
|
1145
|
+
};
|
|
1057
1146
|
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1147
|
+
var inputStatesStyle = {
|
|
1148
|
+
"default": {
|
|
1149
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
1150
|
+
borderColor: colors.separator,
|
|
1151
|
+
color: 'black'
|
|
1152
|
+
},
|
|
1153
|
+
pending: {
|
|
1154
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
1155
|
+
borderColor: colors.separator,
|
|
1156
|
+
color: 'black'
|
|
1157
|
+
},
|
|
1158
|
+
valid: {
|
|
1159
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
1160
|
+
borderColor: lateOceanColorPalette.black100,
|
|
1161
|
+
color: 'black'
|
|
1162
|
+
},
|
|
1163
|
+
hover: {
|
|
1164
|
+
borderColor: lateOceanColorPalette.black200,
|
|
1165
|
+
color: 'black'
|
|
1166
|
+
},
|
|
1167
|
+
focus: {
|
|
1168
|
+
borderColor: colors.primary,
|
|
1169
|
+
color: 'black'
|
|
1170
|
+
},
|
|
1171
|
+
disabled: {
|
|
1172
|
+
backgroundColor: colors.disabled,
|
|
1173
|
+
borderColor: colors.separator,
|
|
1174
|
+
color: 'black-light'
|
|
1175
|
+
},
|
|
1176
|
+
invalid: {
|
|
1177
|
+
borderColor: colors.separator,
|
|
1178
|
+
color: 'black'
|
|
1179
|
+
}
|
|
1180
|
+
};
|
|
1181
|
+
var input = {
|
|
1182
|
+
color: {
|
|
1183
|
+
selection: colors.primary,
|
|
1184
|
+
placeholder: typography.colors['black-light']
|
|
1185
|
+
},
|
|
1186
|
+
borderWidth: 2,
|
|
1187
|
+
borderRadius: 10,
|
|
1188
|
+
icon: {
|
|
1189
|
+
size: 20
|
|
1190
|
+
},
|
|
1191
|
+
padding: {
|
|
1192
|
+
"default": '5px 16px',
|
|
1193
|
+
iOSSingleLine: '7px 16px'
|
|
1194
|
+
},
|
|
1195
|
+
transition: {
|
|
1196
|
+
property: 'border-color',
|
|
1197
|
+
duration: '200ms',
|
|
1198
|
+
timingFunction: 'ease-in-out'
|
|
1199
|
+
},
|
|
1200
|
+
states: inputStatesStyle
|
|
1201
|
+
};
|
|
1066
1202
|
|
|
1067
|
-
var
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1203
|
+
var inputField = {
|
|
1204
|
+
labelContainerPaddingBottom: 5,
|
|
1205
|
+
iconMarginLeft: 6
|
|
1206
|
+
};
|
|
1071
1207
|
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1208
|
+
var radio = {
|
|
1209
|
+
size: 18,
|
|
1210
|
+
unchecked: {
|
|
1211
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
1212
|
+
borderWidth: 2,
|
|
1213
|
+
borderColor: lateOceanColorPalette.black200
|
|
1214
|
+
},
|
|
1215
|
+
checked: {
|
|
1216
|
+
backgroundColor: colors.primary,
|
|
1217
|
+
innerSize: 5,
|
|
1218
|
+
innerBackgroundColor: colors.uiBackgroundLight
|
|
1219
|
+
},
|
|
1220
|
+
disabled: {
|
|
1221
|
+
backgroundColor: colors.disabled,
|
|
1222
|
+
borderColor: colors.separator
|
|
1075
1223
|
}
|
|
1076
1224
|
};
|
|
1077
1225
|
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
children = _ref.children;
|
|
1082
|
-
return /*#__PURE__*/jsx(Typography.Text, {
|
|
1083
|
-
base: "body-small",
|
|
1084
|
-
color: getColorFromState(state),
|
|
1085
|
-
testID: testID,
|
|
1086
|
-
children: children
|
|
1087
|
-
});
|
|
1088
|
-
}
|
|
1226
|
+
var textArea = {
|
|
1227
|
+
minHeight: 120
|
|
1228
|
+
};
|
|
1089
1229
|
|
|
1090
|
-
var
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
})(["", ";"], function (_ref) {
|
|
1098
|
-
var theme = _ref.theme;
|
|
1099
|
-
return theme.responsive.ifWindowSizeMatches({
|
|
1100
|
-
minWidth: KittBreakpoints.SMALL
|
|
1101
|
-
}, 'padding-top: 10px', 'padding-top: 5px');
|
|
1102
|
-
});
|
|
1103
|
-
var FieldLabelContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1104
|
-
displayName: "InputField__FieldLabelContainer",
|
|
1105
|
-
componentId: "kitt-universal__sc-13fkixs-2"
|
|
1106
|
-
})(["flex-direction:row;align-items:center;padding-bottom:", "px;"], function (_ref2) {
|
|
1107
|
-
var theme = _ref2.theme;
|
|
1108
|
-
return theme.kitt.forms.inputField.labelContainerPaddingBottom;
|
|
1109
|
-
});
|
|
1110
|
-
var LabelContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1111
|
-
displayName: "InputField__LabelContainer",
|
|
1112
|
-
componentId: "kitt-universal__sc-13fkixs-3"
|
|
1113
|
-
})(["margin-right:", "px;"], function (_ref3) {
|
|
1114
|
-
var theme = _ref3.theme;
|
|
1115
|
-
return theme.kitt.forms.inputField.iconMarginLeft;
|
|
1116
|
-
});
|
|
1117
|
-
function InputField(_ref4) {
|
|
1118
|
-
var label = _ref4.label,
|
|
1119
|
-
labelFeedback = _ref4.labelFeedback,
|
|
1120
|
-
input = _ref4.input,
|
|
1121
|
-
feedback = _ref4.feedback;
|
|
1122
|
-
return /*#__PURE__*/jsxs(FieldContainer, {
|
|
1123
|
-
children: [label ? /*#__PURE__*/jsxs(FieldLabelContainer, {
|
|
1124
|
-
children: [/*#__PURE__*/jsx(LabelContainer, {
|
|
1125
|
-
children: label
|
|
1126
|
-
}), labelFeedback]
|
|
1127
|
-
}) : null, input, feedback ? /*#__PURE__*/jsx(FeedbackContainer, {
|
|
1128
|
-
children: feedback
|
|
1129
|
-
}) : null]
|
|
1130
|
-
});
|
|
1131
|
-
}
|
|
1230
|
+
var forms = {
|
|
1231
|
+
input: input,
|
|
1232
|
+
radio: radio,
|
|
1233
|
+
inputField: inputField,
|
|
1234
|
+
textArea: textArea,
|
|
1235
|
+
checkbox: checkbox
|
|
1236
|
+
};
|
|
1132
1237
|
|
|
1133
|
-
|
|
1134
|
-
|
|
1238
|
+
var fullScreenModal = {
|
|
1239
|
+
header: {
|
|
1240
|
+
paddingVertical: 12,
|
|
1241
|
+
paddingHorizontal: 16,
|
|
1242
|
+
borderColor: lateOceanColorPalette.black100
|
|
1243
|
+
}
|
|
1244
|
+
};
|
|
1135
1245
|
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1246
|
+
var iconButton = {
|
|
1247
|
+
backgroundColor: 'transparent',
|
|
1248
|
+
width: 40,
|
|
1249
|
+
height: 40,
|
|
1250
|
+
borderRadius: 20,
|
|
1251
|
+
borderWidth: 2,
|
|
1252
|
+
borderColor: 'transparent',
|
|
1253
|
+
transition: {
|
|
1254
|
+
property: 'all',
|
|
1255
|
+
duration: '200ms',
|
|
1256
|
+
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1);'
|
|
1257
|
+
},
|
|
1258
|
+
scale: {
|
|
1259
|
+
base: {
|
|
1260
|
+
"default": 1,
|
|
1261
|
+
hover: 0.95,
|
|
1262
|
+
active: 0.95
|
|
1263
|
+
},
|
|
1264
|
+
medium: {
|
|
1265
|
+
hover: 1.05
|
|
1266
|
+
}
|
|
1267
|
+
},
|
|
1268
|
+
disabled: {
|
|
1269
|
+
scale: 1,
|
|
1270
|
+
backgroundColor: button.disabled.backgroundColor,
|
|
1271
|
+
borderColor: button.disabled.borderColor
|
|
1272
|
+
},
|
|
1273
|
+
"default": {
|
|
1274
|
+
pressedBackgroundColor: button["default"].pressedBackgroundColor
|
|
1275
|
+
},
|
|
1276
|
+
white: {
|
|
1277
|
+
pressedBackgroundColor: button.white.hoverBackgroundColor
|
|
1278
|
+
}
|
|
1279
|
+
};
|
|
1139
1280
|
|
|
1140
|
-
|
|
1141
|
-
|
|
1281
|
+
var listItem = {
|
|
1282
|
+
padding: '12px 16px',
|
|
1283
|
+
borderColor: colors.separator,
|
|
1284
|
+
borderWidth: 1,
|
|
1285
|
+
innerMargin: 8
|
|
1286
|
+
};
|
|
1142
1287
|
|
|
1143
|
-
|
|
1144
|
-
|
|
1288
|
+
var shadows = {
|
|
1289
|
+
medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
|
|
1290
|
+
};
|
|
1291
|
+
|
|
1292
|
+
var skeleton = {
|
|
1293
|
+
backgroundColor: lateOceanColorPalette.black100,
|
|
1294
|
+
flareColor: lateOceanColorPalette.black200,
|
|
1295
|
+
animationDuration: 1000
|
|
1296
|
+
};
|
|
1297
|
+
|
|
1298
|
+
var tag = {
|
|
1299
|
+
borderRadius: 10,
|
|
1300
|
+
padding: '2px 12px',
|
|
1301
|
+
primary: {
|
|
1302
|
+
fill: {
|
|
1303
|
+
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
1304
|
+
borderWidth: 0,
|
|
1305
|
+
borderColor: colors.transparent
|
|
1306
|
+
},
|
|
1307
|
+
outline: {
|
|
1308
|
+
backgroundColor: colors.transparent,
|
|
1309
|
+
borderWidth: 1,
|
|
1310
|
+
borderColor: colors.primary
|
|
1311
|
+
}
|
|
1312
|
+
},
|
|
1313
|
+
"default": {
|
|
1314
|
+
fill: {
|
|
1315
|
+
backgroundColor: lateOceanColorPalette.black50,
|
|
1316
|
+
borderWidth: 0,
|
|
1317
|
+
borderColor: colors.transparent
|
|
1318
|
+
},
|
|
1319
|
+
outline: {
|
|
1320
|
+
backgroundColor: colors.transparent,
|
|
1321
|
+
borderWidth: 1,
|
|
1322
|
+
borderColor: colors.black
|
|
1323
|
+
}
|
|
1324
|
+
},
|
|
1325
|
+
danger: {
|
|
1326
|
+
fill: {
|
|
1327
|
+
backgroundColor: lateOceanColorPalette.warmEmbrace,
|
|
1328
|
+
borderWidth: 0,
|
|
1329
|
+
borderColor: colors.transparent
|
|
1330
|
+
},
|
|
1331
|
+
outline: {
|
|
1332
|
+
backgroundColor: colors.transparent,
|
|
1333
|
+
borderWidth: 1,
|
|
1334
|
+
borderColor: colors.danger
|
|
1335
|
+
}
|
|
1145
1336
|
}
|
|
1146
|
-
}
|
|
1337
|
+
};
|
|
1147
1338
|
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
icon: icon,
|
|
1157
|
-
size: theme.kitt.forms.input.icon.size
|
|
1158
|
-
});
|
|
1159
|
-
}
|
|
1339
|
+
var tooltip = {
|
|
1340
|
+
backgroundColor: colors.black,
|
|
1341
|
+
borderRadius: 10,
|
|
1342
|
+
opacity: 0.95,
|
|
1343
|
+
horizontalPadding: 16,
|
|
1344
|
+
verticalPadding: 4,
|
|
1345
|
+
floatingPadding: 8
|
|
1346
|
+
};
|
|
1160
1347
|
|
|
1161
|
-
|
|
1348
|
+
var breakpoints = {
|
|
1349
|
+
values: {
|
|
1350
|
+
base: 0,
|
|
1351
|
+
small: 480,
|
|
1352
|
+
medium: 768,
|
|
1353
|
+
large: 1024,
|
|
1354
|
+
wide: 1280
|
|
1355
|
+
},
|
|
1356
|
+
min: {
|
|
1357
|
+
smallBreakpoint: 'min-width: 480px',
|
|
1358
|
+
mediumBreakpoint: 'min-width: 768px',
|
|
1359
|
+
largeBreakpoint: 'min-width: 1024px',
|
|
1360
|
+
wideBreakpoint: 'min-width: 1280px'
|
|
1361
|
+
},
|
|
1362
|
+
max: {
|
|
1363
|
+
smallBreakpoint: 'max-width: 479px',
|
|
1364
|
+
mediumBreakpoint: 'max-width: 767px',
|
|
1365
|
+
largeBreakpoint: 'max-width: 1023px',
|
|
1366
|
+
wideBreakpoint: 'max-width: 1279px'
|
|
1367
|
+
}
|
|
1368
|
+
}; // eslint-disable-next-line unicorn/expiring-todo-comments
|
|
1369
|
+
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
1162
1370
|
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1371
|
+
var theme = {
|
|
1372
|
+
spacing: 4,
|
|
1373
|
+
colors: colors,
|
|
1374
|
+
palettes: {
|
|
1375
|
+
lateOcean: lateOceanColorPalette
|
|
1376
|
+
},
|
|
1377
|
+
avatar: avatar,
|
|
1378
|
+
button: button,
|
|
1379
|
+
card: card,
|
|
1380
|
+
feedbackMessage: feedbackMessage,
|
|
1381
|
+
forms: forms,
|
|
1382
|
+
typography: typography,
|
|
1383
|
+
tag: tag,
|
|
1384
|
+
shadows: shadows,
|
|
1385
|
+
fullScreenModal: fullScreenModal,
|
|
1386
|
+
iconButton: iconButton,
|
|
1387
|
+
listItem: listItem,
|
|
1388
|
+
tooltip: tooltip,
|
|
1389
|
+
skeleton: skeleton,
|
|
1390
|
+
breakpoints: breakpoints
|
|
1391
|
+
};
|
|
1166
1392
|
|
|
1167
|
-
|
|
1393
|
+
function matchWindowSize(_ref, _ref2) {
|
|
1394
|
+
var width = _ref.width,
|
|
1395
|
+
height = _ref.height;
|
|
1396
|
+
var minWidth = _ref2.minWidth,
|
|
1397
|
+
maxWidth = _ref2.maxWidth,
|
|
1398
|
+
minHeight = _ref2.minHeight,
|
|
1399
|
+
maxHeight = _ref2.maxHeight;
|
|
1400
|
+
var hasWidthMatched = width ? (!minWidth || width >= minWidth) && (!maxWidth || width <= maxWidth) : true;
|
|
1401
|
+
var hasHeightMatched = height ? (!minHeight || height >= minHeight) && (!maxHeight || height <= maxHeight) : true;
|
|
1402
|
+
return hasWidthMatched && hasHeightMatched;
|
|
1168
1403
|
}
|
|
1404
|
+
function useMatchWindowSize(options) {
|
|
1405
|
+
var _useWindowDimensions = useWindowDimensions(),
|
|
1406
|
+
width = _useWindowDimensions.width,
|
|
1407
|
+
height = _useWindowDimensions.height;
|
|
1169
1408
|
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1409
|
+
return matchWindowSize({
|
|
1410
|
+
width: width,
|
|
1411
|
+
height: height
|
|
1412
|
+
}, options);
|
|
1413
|
+
}
|
|
1173
1414
|
|
|
1174
|
-
function
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1415
|
+
function createWindowSizeHelper(dimensions) {
|
|
1416
|
+
return {
|
|
1417
|
+
matchWindowSize: function matchWindowSize$1(options) {
|
|
1418
|
+
return matchWindowSize(dimensions, options);
|
|
1419
|
+
},
|
|
1420
|
+
ifWindowSizeMatches: function ifWindowSizeMatches(options, valueIfTrue, valueIfFalse) {
|
|
1421
|
+
return matchWindowSize(dimensions, options) ? valueIfTrue : valueIfFalse;
|
|
1422
|
+
},
|
|
1423
|
+
mapWindowWidth: function mapWindowWidth() {
|
|
1424
|
+
for (var _len = arguments.length, widthList = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1425
|
+
widthList[_key] = arguments[_key];
|
|
1426
|
+
}
|
|
1179
1427
|
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1428
|
+
if ((process.env.NODE_ENV !== "production")) {
|
|
1429
|
+
widthList.slice(1).forEach(function (_ref, index) {
|
|
1430
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
1431
|
+
minWidth = _ref2[0];
|
|
1184
1432
|
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
right: right || /*#__PURE__*/jsx(InputPressable, {
|
|
1191
|
-
accessibilityRole: "button",
|
|
1192
|
-
onPress: function onPress() {
|
|
1193
|
-
return setIsVisible(function (prev) {
|
|
1194
|
-
return !prev;
|
|
1433
|
+
var previousMinWidth = widthList[index][0];
|
|
1434
|
+
|
|
1435
|
+
if (previousMinWidth > minWidth) {
|
|
1436
|
+
throw new Error("mapWindowWidth: sort your values to be mobile first. ".concat(minWidth, " is < ").concat(previousMinWidth, ", so ").concat(minWidth, " should be before ").concat(previousMinWidth, "."));
|
|
1437
|
+
}
|
|
1195
1438
|
});
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
var found = widthList.find(function (_ref3) {
|
|
1442
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
1443
|
+
minWidth = _ref4[0];
|
|
1444
|
+
_ref4[1];
|
|
1445
|
+
|
|
1446
|
+
return matchWindowSize(dimensions, {
|
|
1447
|
+
minWidth: Number(minWidth)
|
|
1448
|
+
});
|
|
1449
|
+
});
|
|
1450
|
+
if (!found) return null;
|
|
1451
|
+
return found[1];
|
|
1452
|
+
}
|
|
1453
|
+
};
|
|
1202
1454
|
}
|
|
1203
1455
|
|
|
1204
|
-
function
|
|
1205
|
-
var
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1456
|
+
function useKittTheme() {
|
|
1457
|
+
var dimensions = useWindowDimensions();
|
|
1458
|
+
return useMemo(function () {
|
|
1459
|
+
return {
|
|
1460
|
+
kitt: theme,
|
|
1461
|
+
responsive: createWindowSizeHelper(dimensions)
|
|
1462
|
+
};
|
|
1463
|
+
}, [dimensions]);
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
var CheckboxAndLabelPressableWrapper = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
1467
|
+
displayName: "Checkbox__CheckboxAndLabelPressableWrapper",
|
|
1468
|
+
componentId: "kitt-universal__sc-1sav1n6-0"
|
|
1469
|
+
})(["display:flex;flex-direction:row;align-items:center;"]);
|
|
1470
|
+
var CheckboxContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1471
|
+
displayName: "Checkbox__CheckboxContainer",
|
|
1472
|
+
componentId: "kitt-universal__sc-1sav1n6-1"
|
|
1473
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:center;height:", "px;width:", "px;position:relative;border-radius:", "px;", " margin-right:", ";"], function (_ref) {
|
|
1474
|
+
var theme = _ref.theme;
|
|
1475
|
+
return theme.kitt.forms.checkbox.height;
|
|
1476
|
+
}, function (_ref2) {
|
|
1477
|
+
var theme = _ref2.theme;
|
|
1478
|
+
return theme.kitt.forms.checkbox.width;
|
|
1479
|
+
}, function (_ref3) {
|
|
1480
|
+
var theme = _ref3.theme;
|
|
1481
|
+
return theme.kitt.forms.checkbox.borderRadius;
|
|
1482
|
+
}, function (_ref4) {
|
|
1483
|
+
var $isChecked = _ref4.$isChecked,
|
|
1484
|
+
theme = _ref4.theme;
|
|
1485
|
+
var _theme$kitt$forms$che = theme.kitt.forms.checkbox,
|
|
1486
|
+
checkedBackgroundColor = _theme$kitt$forms$che.checkedBackgroundColor,
|
|
1487
|
+
checkedBorderColor = _theme$kitt$forms$che.checkedBorderColor,
|
|
1488
|
+
borderColor = _theme$kitt$forms$che.borderColor,
|
|
1489
|
+
borderWidth = _theme$kitt$forms$che.borderWidth,
|
|
1490
|
+
backgroundColor = _theme$kitt$forms$che.backgroundColor;
|
|
1491
|
+
|
|
1492
|
+
if ($isChecked) {
|
|
1493
|
+
return css(["background-color:", ";border:", ";"], checkedBackgroundColor, "".concat(borderWidth, "px solid ").concat(checkedBorderColor));
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
return css(["background-color:", ";border:", ";"], backgroundColor, "".concat(borderWidth, "px solid ").concat(borderColor));
|
|
1497
|
+
}, function (_ref5) {
|
|
1498
|
+
var theme = _ref5.theme,
|
|
1499
|
+
$hasLabel = _ref5.$hasLabel;
|
|
1500
|
+
if (!$hasLabel) return '0px';
|
|
1501
|
+
return "".concat(theme.kitt.spacing * 2.5, "px;");
|
|
1502
|
+
});
|
|
1503
|
+
function Checkbox(_ref6) {
|
|
1504
|
+
var onChange = _ref6.onChange,
|
|
1505
|
+
onBlur = _ref6.onBlur,
|
|
1506
|
+
onFocus = _ref6.onFocus,
|
|
1507
|
+
value = _ref6.value,
|
|
1508
|
+
_ref6$hitSlop = _ref6.hitSlop,
|
|
1509
|
+
hitSlop = _ref6$hitSlop === void 0 ? 40 : _ref6$hitSlop,
|
|
1510
|
+
id = _ref6.id,
|
|
1511
|
+
children = _ref6.children;
|
|
1512
|
+
var theme = useKittTheme();
|
|
1513
|
+
return /*#__PURE__*/jsxs(CheckboxAndLabelPressableWrapper, {
|
|
1514
|
+
accessibilityRole: "checkbox",
|
|
1515
|
+
accessibilityState: {
|
|
1516
|
+
checked: value
|
|
1517
|
+
},
|
|
1518
|
+
hitSlop: hitSlop,
|
|
1519
|
+
onPress: function handlePress(e) {
|
|
1520
|
+
if (onFocus) onFocus(e);
|
|
1521
|
+
if (onChange) onChange(e);
|
|
1522
|
+
if (onBlur) onBlur(e);
|
|
1523
|
+
},
|
|
1524
|
+
children: [/*#__PURE__*/jsx(CheckboxContainer, {
|
|
1525
|
+
$isChecked: value,
|
|
1526
|
+
$hasLabel: !!children,
|
|
1527
|
+
testID: id,
|
|
1528
|
+
children: value ? /*#__PURE__*/jsx(Icon, {
|
|
1529
|
+
align: "center",
|
|
1530
|
+
color: theme.kitt.forms.checkbox.markColor,
|
|
1531
|
+
size: theme.kitt.forms.checkbox.iconSize,
|
|
1532
|
+
icon: /*#__PURE__*/jsx(CheckboxMark, {})
|
|
1533
|
+
}) : null
|
|
1534
|
+
}), children]
|
|
1213
1535
|
});
|
|
1214
1536
|
}
|
|
1215
1537
|
|
|
1216
|
-
var
|
|
1217
|
-
displayName: "Radio__OuterRadio",
|
|
1218
|
-
componentId: "kitt-universal__sc-1mdgr2o-0"
|
|
1219
|
-
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", "px;border-color:", ";"], function (_ref) {
|
|
1538
|
+
var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width:", "px;border-radius:", "px;border-color:", ";font-size:", ";color:", ";font-family:", ";"], function (_ref) {
|
|
1220
1539
|
var theme = _ref.theme,
|
|
1221
|
-
|
|
1222
|
-
return theme.kitt.forms.
|
|
1540
|
+
$state = _ref.$state;
|
|
1541
|
+
return $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states["default"].backgroundColor;
|
|
1223
1542
|
}, function (_ref2) {
|
|
1224
1543
|
var theme = _ref2.theme;
|
|
1225
|
-
return theme.kitt.forms.
|
|
1544
|
+
return theme.kitt.forms.input.borderWidth;
|
|
1226
1545
|
}, function (_ref3) {
|
|
1227
1546
|
var theme = _ref3.theme;
|
|
1228
|
-
return theme.kitt.forms.
|
|
1547
|
+
return theme.kitt.forms.input.borderRadius;
|
|
1229
1548
|
}, function (_ref4) {
|
|
1230
|
-
var theme = _ref4.theme
|
|
1231
|
-
|
|
1549
|
+
var theme = _ref4.theme,
|
|
1550
|
+
$state = _ref4.$state;
|
|
1551
|
+
return theme.kitt.forms.input.states[$state].borderColor;
|
|
1232
1552
|
}, function (_ref5) {
|
|
1233
1553
|
var theme = _ref5.theme;
|
|
1234
|
-
|
|
1554
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
1555
|
+
return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize, "px");
|
|
1235
1556
|
}, function (_ref6) {
|
|
1236
1557
|
var theme = _ref6.theme,
|
|
1237
|
-
|
|
1238
|
-
return theme.kitt.forms.
|
|
1239
|
-
})
|
|
1240
|
-
var SelectedOuterRadio = /*#__PURE__*/styled$1(View).withConfig({
|
|
1241
|
-
displayName: "Radio__SelectedOuterRadio",
|
|
1242
|
-
componentId: "kitt-universal__sc-1mdgr2o-1"
|
|
1243
|
-
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], function (_ref7) {
|
|
1558
|
+
$state = _ref6.$state;
|
|
1559
|
+
return theme.kitt.typography.colors[theme.kitt.forms.input.states[$state].color];
|
|
1560
|
+
}, function (_ref7) {
|
|
1244
1561
|
var theme = _ref7.theme;
|
|
1245
|
-
return theme.kitt.
|
|
1246
|
-
}, function (_ref8) {
|
|
1247
|
-
var theme = _ref8.theme;
|
|
1248
|
-
return theme.kitt.forms.radio.size;
|
|
1249
|
-
}, function (_ref9) {
|
|
1250
|
-
var theme = _ref9.theme;
|
|
1251
|
-
return theme.kitt.forms.radio.size;
|
|
1252
|
-
}, function (_ref10) {
|
|
1253
|
-
var theme = _ref10.theme;
|
|
1254
|
-
return theme.kitt.forms.radio.size / 2;
|
|
1255
|
-
});
|
|
1256
|
-
var SelectedInnerRadio = /*#__PURE__*/styled$1(View).withConfig({
|
|
1257
|
-
displayName: "Radio__SelectedInnerRadio",
|
|
1258
|
-
componentId: "kitt-universal__sc-1mdgr2o-2"
|
|
1259
|
-
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], function (_ref11) {
|
|
1260
|
-
var theme = _ref11.theme;
|
|
1261
|
-
return theme.kitt.forms.radio.checked.innerBackgroundColor;
|
|
1262
|
-
}, function (_ref12) {
|
|
1263
|
-
var theme = _ref12.theme;
|
|
1264
|
-
return theme.kitt.forms.radio.checked.innerSize;
|
|
1265
|
-
}, function (_ref13) {
|
|
1266
|
-
var theme = _ref13.theme;
|
|
1267
|
-
return theme.kitt.forms.radio.checked.innerSize;
|
|
1268
|
-
}, function (_ref14) {
|
|
1269
|
-
var theme = _ref14.theme;
|
|
1270
|
-
return theme.kitt.forms.radio.checked.innerSize / 2;
|
|
1271
|
-
});
|
|
1272
|
-
var Container$2 = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
1273
|
-
displayName: "Radio__Container",
|
|
1274
|
-
componentId: "kitt-universal__sc-1mdgr2o-3"
|
|
1275
|
-
})(["flex-direction:row;align-items:center;"]);
|
|
1276
|
-
var Text = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
1277
|
-
displayName: "Radio__Text",
|
|
1278
|
-
componentId: "kitt-universal__sc-1mdgr2o-4"
|
|
1279
|
-
})(["margin-left:", "px;"], function (_ref15) {
|
|
1280
|
-
var theme = _ref15.theme;
|
|
1281
|
-
return theme.kitt.spacing * 2;
|
|
1562
|
+
return theme.kitt.typography.types.bodies.fontFamily.regular;
|
|
1282
1563
|
});
|
|
1283
|
-
function Radio(_ref16) {
|
|
1284
|
-
var id = _ref16.id,
|
|
1285
|
-
checked = _ref16.checked,
|
|
1286
|
-
onChange = _ref16.onChange,
|
|
1287
|
-
value = _ref16.value,
|
|
1288
|
-
_ref16$disabled = _ref16.disabled,
|
|
1289
|
-
disabled = _ref16$disabled === void 0 ? false : _ref16$disabled,
|
|
1290
|
-
children = _ref16.children;
|
|
1291
|
-
return /*#__PURE__*/jsxs(Container$2, {
|
|
1292
|
-
nativeID: id,
|
|
1293
|
-
disabled: disabled,
|
|
1294
|
-
accessibilityRole: "radio",
|
|
1295
|
-
"aria-checked": checked,
|
|
1296
|
-
focusable: checked && !disabled,
|
|
1297
|
-
onPress: function handlePress() {
|
|
1298
|
-
onChange(value);
|
|
1299
|
-
},
|
|
1300
|
-
children: [checked && !disabled ? /*#__PURE__*/jsx(SelectedOuterRadio, {
|
|
1301
|
-
children: /*#__PURE__*/jsx(SelectedInnerRadio, {})
|
|
1302
|
-
}) : /*#__PURE__*/jsx(OuterRadio, {
|
|
1303
|
-
disabled: disabled
|
|
1304
|
-
}), /*#__PURE__*/jsx(Text, {
|
|
1305
|
-
base: "body",
|
|
1306
|
-
color: disabled ? 'black-light' : 'black',
|
|
1307
|
-
children: children
|
|
1308
|
-
})]
|
|
1309
|
-
});
|
|
1310
|
-
}
|
|
1311
1564
|
|
|
1312
|
-
function
|
|
1565
|
+
function getInputUIState(_ref) {
|
|
1566
|
+
var isFocused = _ref.isFocused,
|
|
1567
|
+
isDisabled = _ref.isDisabled,
|
|
1568
|
+
formState = _ref.formState;
|
|
1569
|
+
if (isDisabled) return 'disabled';
|
|
1570
|
+
if (isFocused) return 'focus';
|
|
1571
|
+
if (formState === 'invalid') return 'invalid';
|
|
1572
|
+
return 'default';
|
|
1573
|
+
}
|
|
1313
1574
|
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1575
|
+
var InputTextContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
1576
|
+
name: "InputTextContainer",
|
|
1577
|
+
"class": "i1encr9g",
|
|
1578
|
+
vars: {
|
|
1579
|
+
"i1encr9g-0": [function (_ref) {
|
|
1580
|
+
var $isDisabled = _ref.$isDisabled;
|
|
1581
|
+
return $isDisabled ? 'not-allowed' : 'inherit';
|
|
1582
|
+
}],
|
|
1583
|
+
"i1encr9g-1": [function (_ref2) {
|
|
1584
|
+
var theme = _ref2.theme;
|
|
1585
|
+
var _theme$kitt$forms$inp = theme.kitt.forms.input.transition,
|
|
1586
|
+
property = _theme$kitt$forms$inp.property,
|
|
1587
|
+
duration = _theme$kitt$forms$inp.duration,
|
|
1588
|
+
timingFunction = _theme$kitt$forms$inp.timingFunction;
|
|
1589
|
+
return "".concat(property, " ").concat(duration, " ").concat(timingFunction);
|
|
1590
|
+
}],
|
|
1591
|
+
"i1encr9g-2": [function (_ref3) {
|
|
1592
|
+
var theme = _ref3.theme,
|
|
1593
|
+
$isDisabled = _ref3.$isDisabled;
|
|
1594
|
+
if ($isDisabled) return theme.kitt.forms.input.states.disabled.borderColor;
|
|
1595
|
+
return theme.kitt.forms.input.states.hover.borderColor;
|
|
1596
|
+
}],
|
|
1597
|
+
"i1encr9g-3": [function (_ref4) {
|
|
1598
|
+
var theme = _ref4.theme,
|
|
1599
|
+
$isDisabled = _ref4.$isDisabled;
|
|
1600
|
+
if ($isDisabled) return theme.kitt.forms.input.states.disabled.borderColor;
|
|
1601
|
+
return theme.kitt.forms.input.states.focus.borderColor;
|
|
1602
|
+
}]
|
|
1603
|
+
}
|
|
1604
|
+
}));
|
|
1317
1605
|
|
|
1318
|
-
|
|
1319
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$9({
|
|
1320
|
-
multiline: true,
|
|
1321
|
-
textAlignVertical: "top",
|
|
1322
|
-
minHeight: theme.kitt.forms.textArea.minHeight
|
|
1323
|
-
}, props));
|
|
1324
|
-
}
|
|
1606
|
+
var _excluded$9 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
1325
1607
|
|
|
1326
|
-
var
|
|
1327
|
-
displayName: "Body",
|
|
1328
|
-
componentId: "kitt-universal__sc-1ofncfn-0"
|
|
1329
|
-
})(["", " background-color:", ";flex:1;"], function (_ref) {
|
|
1330
|
-
var theme = _ref.theme;
|
|
1331
|
-
return theme.responsive.ifWindowSizeMatches({
|
|
1332
|
-
minWidth: KittBreakpoints.MEDIUM
|
|
1333
|
-
}, "padding-right: ".concat(theme.kitt.spacing * 12, "px;\n padding-left: ").concat(theme.kitt.spacing * 12, "px;"), "padding-right: ".concat(theme.kitt.spacing * 6, "px;\n padding-left: ").concat(theme.kitt.spacing * 6, "px;"));
|
|
1334
|
-
}, function (_ref2) {
|
|
1335
|
-
var theme = _ref2.theme;
|
|
1336
|
-
return theme.kitt.colors.uiBackgroundLight;
|
|
1337
|
-
});
|
|
1338
|
-
function FullScreenModalBody(_ref3) {
|
|
1339
|
-
var children = _ref3.children;
|
|
1340
|
-
return /*#__PURE__*/jsx(Body, {
|
|
1341
|
-
children: children
|
|
1342
|
-
});
|
|
1343
|
-
}
|
|
1608
|
+
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; }
|
|
1344
1609
|
|
|
1345
|
-
var
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1610
|
+
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; }
|
|
1611
|
+
var StyledTextInput = /*#__PURE__*/styled$1(TextInput).withConfig({
|
|
1612
|
+
displayName: "InputText__StyledTextInput",
|
|
1613
|
+
componentId: "kitt-universal__sc-uke279-0"
|
|
1614
|
+
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
1349
1615
|
var theme = _ref.theme,
|
|
1350
|
-
|
|
1351
|
-
side = _ref$side === void 0 ? 'left' : _ref$side;
|
|
1352
|
-
var padding = theme.kitt.spacing * 2;
|
|
1616
|
+
multiline = _ref.multiline;
|
|
1353
1617
|
|
|
1354
|
-
if (
|
|
1355
|
-
return
|
|
1618
|
+
if (!multiline && "web" === 'ios') {
|
|
1619
|
+
return theme.kitt.forms.input.padding.iOSSingleLine;
|
|
1356
1620
|
}
|
|
1357
1621
|
|
|
1358
|
-
return
|
|
1359
|
-
})
|
|
1360
|
-
|
|
1361
|
-
function getHeaderHorizontalMediumPadding(spacing) {
|
|
1362
|
-
return spacing * 6;
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
var Header = /*#__PURE__*/styled$1(View).withConfig({
|
|
1366
|
-
displayName: "Header",
|
|
1367
|
-
componentId: "kitt-universal__sc-dfmxi1-1"
|
|
1368
|
-
})(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], function (_ref2) {
|
|
1622
|
+
return theme.kitt.forms.input.padding["default"];
|
|
1623
|
+
}, function (_ref2) {
|
|
1369
1624
|
var theme = _ref2.theme,
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
var
|
|
1373
|
-
|
|
1374
|
-
paddingVertical = _theme$kitt$fullScree.paddingVertical,
|
|
1375
|
-
paddingHorizontal = _theme$kitt$fullScree.paddingHorizontal;
|
|
1376
|
-
return theme.responsive.ifWindowSizeMatches({
|
|
1377
|
-
minWidth: KittBreakpoints.MEDIUM
|
|
1378
|
-
}, "padding: ".concat(paddingTop, "px ").concat(getHeaderHorizontalMediumPadding(theme.kitt.spacing), "px ").concat(paddingVertical, "px;"), "padding: ".concat(paddingTop, "px ").concat(paddingHorizontal, "px ").concat(paddingVertical, "px;"));
|
|
1625
|
+
multiline = _ref2.multiline;
|
|
1626
|
+
if (!multiline && "web" === 'ios') return 0;
|
|
1627
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
1628
|
+
return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight, "px");
|
|
1379
1629
|
}, function (_ref3) {
|
|
1380
|
-
var
|
|
1381
|
-
return
|
|
1630
|
+
var $minHeight = _ref3.$minHeight;
|
|
1631
|
+
return $minHeight;
|
|
1382
1632
|
});
|
|
1383
|
-
var
|
|
1384
|
-
displayName: "
|
|
1385
|
-
componentId: "kitt-universal__sc-
|
|
1386
|
-
})(["
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1633
|
+
var RightInputContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1634
|
+
displayName: "InputText__RightInputContainer",
|
|
1635
|
+
componentId: "kitt-universal__sc-uke279-1"
|
|
1636
|
+
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:10px;"]);
|
|
1637
|
+
var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
1638
|
+
var id = _ref4.id,
|
|
1639
|
+
right = _ref4.right,
|
|
1640
|
+
_ref4$minHeight = _ref4.minHeight,
|
|
1641
|
+
minHeight = _ref4$minHeight === void 0 ? 0 : _ref4$minHeight,
|
|
1642
|
+
formState = _ref4.state,
|
|
1643
|
+
internalForceState = _ref4.internalForceState,
|
|
1644
|
+
_ref4$disabled = _ref4.disabled,
|
|
1645
|
+
disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
|
|
1646
|
+
_ref4$autoCorrect = _ref4.autoCorrect,
|
|
1647
|
+
autoCorrect = _ref4$autoCorrect === void 0 ? true : _ref4$autoCorrect,
|
|
1648
|
+
_ref4$textContentType = _ref4.textContentType,
|
|
1649
|
+
textContentType = _ref4$textContentType === void 0 ? 'none' : _ref4$textContentType,
|
|
1650
|
+
_ref4$autoCompleteTyp = _ref4.autoCompleteType,
|
|
1651
|
+
autoCompleteType = _ref4$autoCompleteTyp === void 0 ? 'off' : _ref4$autoCompleteTyp,
|
|
1652
|
+
_ref4$keyboardType = _ref4.keyboardType,
|
|
1653
|
+
keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
|
|
1654
|
+
_onFocus = _ref4.onFocus,
|
|
1655
|
+
_onBlur = _ref4.onBlur,
|
|
1656
|
+
props = _objectWithoutProperties(_ref4, _excluded$9);
|
|
1403
1657
|
|
|
1404
|
-
|
|
1405
|
-
minWidth: KittBreakpoints.MEDIUM
|
|
1406
|
-
}, "width: ".concat(computeWidth(parentHorizontalPaddingMedium), "px;"), "width: ".concat(computeWidth(parentHorizontalPadding), "px;"));
|
|
1407
|
-
}, function (_ref5) {
|
|
1408
|
-
var leftWidth = _ref5.leftWidth,
|
|
1409
|
-
rightWidth = _ref5.rightWidth;
|
|
1410
|
-
// Depending of the wider element, we must add a margin to fill the diff in space between elements
|
|
1411
|
-
var deltaMargin = Math.abs(leftWidth - rightWidth);
|
|
1658
|
+
var theme = /*#__PURE__*/useTheme();
|
|
1412
1659
|
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1660
|
+
var _useState = useState(false),
|
|
1661
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1662
|
+
isFocused = _useState2[0],
|
|
1663
|
+
setIsFocused = _useState2[1];
|
|
1416
1664
|
|
|
1417
|
-
|
|
1665
|
+
var state = internalForceState || getInputUIState({
|
|
1666
|
+
isFocused: isFocused,
|
|
1667
|
+
isDisabled: disabled,
|
|
1668
|
+
formState: formState
|
|
1669
|
+
});
|
|
1670
|
+
return /*#__PURE__*/jsxs(InputTextContainer, {
|
|
1671
|
+
$isDisabled: disabled,
|
|
1672
|
+
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread$e(_objectSpread$e({
|
|
1673
|
+
ref: ref,
|
|
1674
|
+
nativeID: id,
|
|
1675
|
+
editable: !disabled,
|
|
1676
|
+
keyboardType: keyboardType,
|
|
1677
|
+
autoCompleteType: autoCompleteType,
|
|
1678
|
+
autoCorrect: autoCorrect,
|
|
1679
|
+
$minHeight: minHeight,
|
|
1680
|
+
textContentType: textContentType,
|
|
1681
|
+
placeholderTextColor: theme.kitt.forms.input.color.placeholder,
|
|
1682
|
+
selectionColor: theme.kitt.forms.input.color.selection
|
|
1683
|
+
}, props), {}, {
|
|
1684
|
+
$state: state,
|
|
1685
|
+
onFocus: function onFocus(e) {
|
|
1686
|
+
setIsFocused(true);
|
|
1687
|
+
if (_onFocus) _onFocus(e);
|
|
1688
|
+
},
|
|
1689
|
+
onBlur: function onBlur(e) {
|
|
1690
|
+
setIsFocused(false);
|
|
1691
|
+
if (_onBlur) _onBlur(e);
|
|
1692
|
+
}
|
|
1693
|
+
})), right ? /*#__PURE__*/jsx(RightInputContainer, {
|
|
1694
|
+
children: right
|
|
1695
|
+
}) : null]
|
|
1696
|
+
});
|
|
1418
1697
|
});
|
|
1419
|
-
function FullScreenModalHeader(_ref6) {
|
|
1420
|
-
var children = _ref6.children,
|
|
1421
|
-
right = _ref6.right,
|
|
1422
|
-
left = _ref6.left;
|
|
1423
|
-
|
|
1424
|
-
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
1425
|
-
top = _useSafeAreaInsets.top;
|
|
1426
|
-
|
|
1427
|
-
var dimensions = useWindowDimensions();
|
|
1428
|
-
|
|
1429
|
-
var _useState = useState(0),
|
|
1430
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1431
|
-
leftWidth = _useState2[0],
|
|
1432
|
-
setLeftWidth = _useState2[1];
|
|
1433
1698
|
|
|
1434
|
-
|
|
1435
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
1436
|
-
rightWidth = _useState4[0],
|
|
1437
|
-
setRightWidth = _useState4[1];
|
|
1699
|
+
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; }
|
|
1438
1700
|
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1701
|
+
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; }
|
|
1702
|
+
function InputEmail(props) {
|
|
1703
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$d({
|
|
1704
|
+
autoCompleteType: "email",
|
|
1705
|
+
keyboardType: "email-address",
|
|
1706
|
+
textContentType: "emailAddress"
|
|
1707
|
+
}, props));
|
|
1708
|
+
}
|
|
1442
1709
|
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1710
|
+
var getColorFromState = function (state) {
|
|
1711
|
+
switch (state) {
|
|
1712
|
+
case 'invalid':
|
|
1713
|
+
return 'danger';
|
|
1447
1714
|
|
|
1448
|
-
|
|
1449
|
-
|
|
1715
|
+
case 'valid':
|
|
1716
|
+
default:
|
|
1717
|
+
return 'black-light';
|
|
1718
|
+
}
|
|
1719
|
+
};
|
|
1450
1720
|
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
leftWidth: leftWidth,
|
|
1461
|
-
rightWidth: rightWidth,
|
|
1462
|
-
children: children
|
|
1463
|
-
}), right ? /*#__PURE__*/jsx(SideContainer, {
|
|
1464
|
-
side: "right",
|
|
1465
|
-
onLayout: function onLayout(e) {
|
|
1466
|
-
return handleLayoutChange(e, 'right');
|
|
1467
|
-
},
|
|
1468
|
-
children: right
|
|
1469
|
-
}) : null]
|
|
1721
|
+
function InputFeedback(_ref) {
|
|
1722
|
+
var state = _ref.state,
|
|
1723
|
+
testID = _ref.testID,
|
|
1724
|
+
children = _ref.children;
|
|
1725
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
1726
|
+
base: "body-small",
|
|
1727
|
+
color: getColorFromState(state),
|
|
1728
|
+
testID: testID,
|
|
1729
|
+
children: children
|
|
1470
1730
|
});
|
|
1471
1731
|
}
|
|
1472
1732
|
|
|
1473
|
-
var
|
|
1474
|
-
displayName: "
|
|
1475
|
-
componentId: "kitt-universal__sc-
|
|
1476
|
-
})(["
|
|
1733
|
+
var FieldContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1734
|
+
displayName: "InputField__FieldContainer",
|
|
1735
|
+
componentId: "kitt-universal__sc-13fkixs-0"
|
|
1736
|
+
})(["padding:5px 0 10px;"]);
|
|
1737
|
+
var FeedbackContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1738
|
+
displayName: "InputField__FeedbackContainer",
|
|
1739
|
+
componentId: "kitt-universal__sc-13fkixs-1"
|
|
1740
|
+
})(["", ";"], function (_ref) {
|
|
1477
1741
|
var theme = _ref.theme;
|
|
1478
|
-
return theme.
|
|
1742
|
+
return theme.responsive.ifWindowSizeMatches({
|
|
1743
|
+
minWidth: KittBreakpoints.SMALL
|
|
1744
|
+
}, 'padding-top: 10px', 'padding-top: 5px');
|
|
1479
1745
|
});
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1746
|
+
var FieldLabelContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1747
|
+
displayName: "InputField__FieldLabelContainer",
|
|
1748
|
+
componentId: "kitt-universal__sc-13fkixs-2"
|
|
1749
|
+
})(["flex-direction:row;align-items:center;padding-bottom:", "px;"], function (_ref2) {
|
|
1750
|
+
var theme = _ref2.theme;
|
|
1751
|
+
return theme.kitt.forms.inputField.labelContainerPaddingBottom;
|
|
1752
|
+
});
|
|
1753
|
+
var LabelContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1754
|
+
displayName: "InputField__LabelContainer",
|
|
1755
|
+
componentId: "kitt-universal__sc-13fkixs-3"
|
|
1756
|
+
})(["margin-right:", "px;"], function (_ref3) {
|
|
1757
|
+
var theme = _ref3.theme;
|
|
1758
|
+
return theme.kitt.forms.inputField.iconMarginLeft;
|
|
1759
|
+
});
|
|
1760
|
+
function InputField(_ref4) {
|
|
1761
|
+
var label = _ref4.label,
|
|
1762
|
+
labelFeedback = _ref4.labelFeedback,
|
|
1763
|
+
input = _ref4.input,
|
|
1764
|
+
feedback = _ref4.feedback;
|
|
1765
|
+
return /*#__PURE__*/jsxs(FieldContainer, {
|
|
1766
|
+
children: [label ? /*#__PURE__*/jsxs(FieldLabelContainer, {
|
|
1767
|
+
children: [/*#__PURE__*/jsx(LabelContainer, {
|
|
1768
|
+
children: label
|
|
1769
|
+
}), labelFeedback]
|
|
1770
|
+
}) : null, input, feedback ? /*#__PURE__*/jsx(FeedbackContainer, {
|
|
1771
|
+
children: feedback
|
|
1772
|
+
}) : null]
|
|
1484
1773
|
});
|
|
1485
1774
|
}
|
|
1486
|
-
FullScreenModal.Header = FullScreenModalHeader;
|
|
1487
|
-
FullScreenModal.Body = FullScreenModalBody;
|
|
1488
|
-
|
|
1489
|
-
var _excluded$7 = ["as", "children"];
|
|
1490
1775
|
|
|
1491
|
-
function
|
|
1776
|
+
function getIconColor(state, disabled) {
|
|
1777
|
+
if (disabled) return 'black-light';
|
|
1492
1778
|
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
children = _ref.children,
|
|
1497
|
-
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
1498
|
-
|
|
1499
|
-
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
1500
|
-
return /*#__PURE__*/jsx(as || 'div', _objectSpread$8(_objectSpread$8({}, props), {}, {
|
|
1501
|
-
children: children
|
|
1502
|
-
}));
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
var _excluded$6 = ["color", "disabled"];
|
|
1506
|
-
|
|
1507
|
-
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; }
|
|
1779
|
+
switch (state) {
|
|
1780
|
+
case 'invalid':
|
|
1781
|
+
return 'danger';
|
|
1508
1782
|
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
name: "PressableIconButtonWebWrapper",
|
|
1512
|
-
"class": "p1nlccvg",
|
|
1513
|
-
vars: {
|
|
1514
|
-
"p1nlccvg-0": [function (_ref) {
|
|
1515
|
-
var theme = _ref.theme,
|
|
1516
|
-
$isDisabled = _ref.$isDisabled;
|
|
1517
|
-
return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.hover;
|
|
1518
|
-
}],
|
|
1519
|
-
"p1nlccvg-2": [function (_ref2) {
|
|
1520
|
-
var theme = _ref2.theme,
|
|
1521
|
-
$isDisabled = _ref2.$isDisabled;
|
|
1522
|
-
return $isDisabled ? 1 : theme.kitt.iconButton.scale.medium.hover;
|
|
1523
|
-
}],
|
|
1524
|
-
"p1nlccvg-3": [function (_ref3) {
|
|
1525
|
-
var theme = _ref3.theme,
|
|
1526
|
-
$isDisabled = _ref3.$isDisabled;
|
|
1527
|
-
return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.active;
|
|
1528
|
-
}],
|
|
1529
|
-
"p1nlccvg-4": [function (_ref4) {
|
|
1530
|
-
var theme = _ref4.theme,
|
|
1531
|
-
$isWhite = _ref4.$isWhite,
|
|
1532
|
-
$isDisabled = _ref4.$isDisabled;
|
|
1533
|
-
if ($isDisabled) return theme.kitt.iconButton.disabled.backgroundColor;
|
|
1534
|
-
var _theme$kitt$iconButto = theme.kitt.iconButton,
|
|
1535
|
-
white = _theme$kitt$iconButto.white,
|
|
1536
|
-
defaultIconButton = _theme$kitt$iconButto["default"];
|
|
1537
|
-
if ($isWhite) return white.pressedBackgroundColor;
|
|
1538
|
-
return defaultIconButton.pressedBackgroundColor;
|
|
1539
|
-
}]
|
|
1540
|
-
}
|
|
1541
|
-
}));
|
|
1542
|
-
var StyledPressableIconButton = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
1543
|
-
displayName: "PressableIconButton__StyledPressableIconButton",
|
|
1544
|
-
componentId: "kitt-universal__sc-1m6jo3s-0"
|
|
1545
|
-
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref5) {
|
|
1546
|
-
var theme = _ref5.theme;
|
|
1547
|
-
return theme.kitt.iconButton.borderRadius;
|
|
1548
|
-
}, function (_ref6) {
|
|
1549
|
-
var theme = _ref6.theme;
|
|
1550
|
-
return theme.kitt.iconButton.width;
|
|
1551
|
-
}, function (_ref7) {
|
|
1552
|
-
var theme = _ref7.theme;
|
|
1553
|
-
return theme.kitt.iconButton.height;
|
|
1554
|
-
}, function (_ref8) {
|
|
1555
|
-
var theme = _ref8.theme,
|
|
1556
|
-
disabled = _ref8.disabled;
|
|
1557
|
-
var iconButton = theme.kitt.iconButton;
|
|
1558
|
-
var transition = iconButton.transition;
|
|
1783
|
+
case 'valid':
|
|
1784
|
+
return 'success';
|
|
1559
1785
|
|
|
1560
|
-
|
|
1561
|
-
|
|
1786
|
+
default:
|
|
1787
|
+
return undefined;
|
|
1562
1788
|
}
|
|
1563
|
-
|
|
1564
|
-
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
|
|
1565
|
-
});
|
|
1566
|
-
function PressableIconButton(_ref9) {
|
|
1567
|
-
var color = _ref9.color,
|
|
1568
|
-
disabled = _ref9.disabled,
|
|
1569
|
-
props = _objectWithoutProperties(_ref9, _excluded$6);
|
|
1570
|
-
|
|
1571
|
-
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
1572
|
-
as: PressableIconButtonWebWrapper,
|
|
1573
|
-
$isWhite: color === 'white',
|
|
1574
|
-
$isDisabled: Boolean(disabled),
|
|
1575
|
-
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
1576
|
-
disabled: disabled
|
|
1577
|
-
}))
|
|
1578
|
-
});
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
function PressableAnimatedContainer(_ref) {
|
|
1582
|
-
var children = _ref.children,
|
|
1583
|
-
color = _ref.color,
|
|
1584
|
-
disabled = _ref.disabled,
|
|
1585
|
-
onPress = _ref.onPress;
|
|
1586
|
-
return /*#__PURE__*/jsx(PressableIconButton, {
|
|
1587
|
-
accessibilityRole: "button",
|
|
1588
|
-
color: color,
|
|
1589
|
-
disabled: disabled,
|
|
1590
|
-
onPress: onPress,
|
|
1591
|
-
children: children
|
|
1592
|
-
});
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
var IconButtonContentBorder = /*#__PURE__*/styled$1(View).withConfig({
|
|
1596
|
-
displayName: "IconButton__IconButtonContentBorder",
|
|
1597
|
-
componentId: "kitt-universal__sc-swelbf-0"
|
|
1598
|
-
})(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
|
|
1599
|
-
var theme = _ref.theme;
|
|
1600
|
-
return "".concat(theme.kitt.iconButton.borderWidth, "px solid");
|
|
1601
|
-
}, function (_ref2) {
|
|
1602
|
-
var theme = _ref2.theme,
|
|
1603
|
-
disabled = _ref2.disabled;
|
|
1604
|
-
return disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor;
|
|
1605
|
-
}, function (_ref3) {
|
|
1606
|
-
var theme = _ref3.theme;
|
|
1607
|
-
return theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth;
|
|
1608
|
-
}, function (_ref4) {
|
|
1609
|
-
var theme = _ref4.theme;
|
|
1610
|
-
return theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth;
|
|
1611
|
-
}, function (_ref5) {
|
|
1612
|
-
var theme = _ref5.theme;
|
|
1613
|
-
return theme.kitt.iconButton.borderRadius;
|
|
1614
|
-
});
|
|
1615
|
-
|
|
1616
|
-
function IconButtonContent(_ref6) {
|
|
1617
|
-
var disabled = _ref6.disabled,
|
|
1618
|
-
color = _ref6.color,
|
|
1619
|
-
icon = _ref6.icon;
|
|
1620
|
-
return /*#__PURE__*/jsx(IconButtonContentBorder, {
|
|
1621
|
-
disabled: disabled,
|
|
1622
|
-
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
1623
|
-
color: disabled ? 'black-light' : color,
|
|
1624
|
-
icon: icon
|
|
1625
|
-
})
|
|
1626
|
-
});
|
|
1627
1789
|
}
|
|
1628
1790
|
|
|
1629
|
-
function
|
|
1630
|
-
var icon =
|
|
1631
|
-
|
|
1632
|
-
disabled =
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
onPress = _ref7.onPress;
|
|
1637
|
-
return /*#__PURE__*/jsx(PressableAnimatedContainer, {
|
|
1791
|
+
function InputIcon(_ref) {
|
|
1792
|
+
var icon = _ref.icon,
|
|
1793
|
+
state = _ref.state,
|
|
1794
|
+
disabled = _ref.disabled;
|
|
1795
|
+
var theme = /*#__PURE__*/useTheme();
|
|
1796
|
+
var color = getIconColor(state, disabled);
|
|
1797
|
+
return /*#__PURE__*/jsx(TypographyIcon, {
|
|
1638
1798
|
color: color,
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
accessibilityLabel: accessibilityLabel,
|
|
1642
|
-
accessibilityRole: accessibilityRole,
|
|
1643
|
-
onPress: onPress,
|
|
1644
|
-
children: /*#__PURE__*/jsx(IconButtonContent, {
|
|
1645
|
-
disabled: disabled,
|
|
1646
|
-
color: color,
|
|
1647
|
-
icon: icon
|
|
1648
|
-
})
|
|
1799
|
+
icon: icon,
|
|
1800
|
+
size: theme.kitt.forms.input.icon.size
|
|
1649
1801
|
});
|
|
1650
1802
|
}
|
|
1651
1803
|
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
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; }
|
|
1804
|
+
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; }
|
|
1655
1805
|
|
|
1656
|
-
function _objectSpread$
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
componentId: "kitt-universal__sc-57q0u9-0"
|
|
1660
|
-
})(["flex:1 0 0%;align-self:center;"]);
|
|
1661
|
-
function ListItemContent(_ref) {
|
|
1662
|
-
var children = _ref.children,
|
|
1663
|
-
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
1806
|
+
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; }
|
|
1807
|
+
function InputPressable(_ref) {
|
|
1808
|
+
var props = _extends({}, _ref);
|
|
1664
1809
|
|
|
1665
|
-
return /*#__PURE__*/jsx(
|
|
1666
|
-
children: children
|
|
1667
|
-
}));
|
|
1810
|
+
return /*#__PURE__*/jsx(Pressable, _objectSpread$c({}, props));
|
|
1668
1811
|
}
|
|
1669
1812
|
|
|
1670
|
-
var _excluded$
|
|
1671
|
-
_excluded2$1 = ["children", "align"];
|
|
1813
|
+
var _excluded$8 = ["isPasswordDefaultVisible", "right"];
|
|
1672
1814
|
|
|
1673
|
-
function ownKeys$
|
|
1815
|
+
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; }
|
|
1674
1816
|
|
|
1675
|
-
function _objectSpread$
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
var theme = _ref.theme,
|
|
1681
|
-
side = _ref.side;
|
|
1682
|
-
return side === 'right' ? "".concat(theme.kitt.listItem.innerMargin, "px") : 0;
|
|
1683
|
-
}, function (_ref2) {
|
|
1684
|
-
var theme = _ref2.theme,
|
|
1685
|
-
side = _ref2.side;
|
|
1686
|
-
return side === 'left' ? "".concat(theme.kitt.listItem.innerMargin, "px") : 0;
|
|
1687
|
-
}); // Handles the vertical alignment of the side elements of the list item
|
|
1817
|
+
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; }
|
|
1818
|
+
function InputPassword(_ref) {
|
|
1819
|
+
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
1820
|
+
right = _ref.right,
|
|
1821
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
1688
1822
|
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
rest = _objectWithoutProperties(_ref3, _excluded$4);
|
|
1823
|
+
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
1824
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1825
|
+
isVisible = _useState2[0],
|
|
1826
|
+
setIsVisible = _useState2[1];
|
|
1694
1827
|
|
|
1695
|
-
return /*#__PURE__*/jsx(
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1828
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$b(_objectSpread$b({}, props), {}, {
|
|
1829
|
+
textContentType: "password",
|
|
1830
|
+
autoCompleteType: "password",
|
|
1831
|
+
autoCorrect: false,
|
|
1832
|
+
secureTextEntry: !isVisible,
|
|
1833
|
+
right: right || /*#__PURE__*/jsx(InputPressable, {
|
|
1834
|
+
accessibilityRole: "button",
|
|
1835
|
+
onPress: function onPress() {
|
|
1836
|
+
return setIsVisible(function (prev) {
|
|
1837
|
+
return !prev;
|
|
1838
|
+
});
|
|
1839
|
+
},
|
|
1840
|
+
children: /*#__PURE__*/jsx(InputIcon, {
|
|
1841
|
+
icon: isVisible ? /*#__PURE__*/jsx(EyeOffIcon, {}) : /*#__PURE__*/jsx(EyeIcon, {})
|
|
1842
|
+
})
|
|
1843
|
+
})
|
|
1699
1844
|
}));
|
|
1700
1845
|
}
|
|
1701
|
-
var SideContentView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1702
|
-
displayName: "ListItemSideContent__SideContentView",
|
|
1703
|
-
componentId: "kitt-universal__sc-1vajiw-1"
|
|
1704
|
-
})(["align-self:", ";"], function (_ref4) {
|
|
1705
|
-
var align = _ref4.align;
|
|
1706
|
-
return align;
|
|
1707
|
-
});
|
|
1708
|
-
function ListItemSideContent(_ref5) {
|
|
1709
|
-
var children = _ref5.children,
|
|
1710
|
-
_ref5$align = _ref5.align,
|
|
1711
|
-
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
1712
|
-
rest = _objectWithoutProperties(_ref5, _excluded2$1);
|
|
1713
1846
|
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1847
|
+
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; }
|
|
1848
|
+
|
|
1849
|
+
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; }
|
|
1850
|
+
function InputPhone(props) {
|
|
1851
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$a(_objectSpread$a({}, props), {}, {
|
|
1852
|
+
autoCompleteType: "tel",
|
|
1853
|
+
keyboardType: "number-pad",
|
|
1854
|
+
textContentType: "telephoneNumber"
|
|
1718
1855
|
}));
|
|
1719
1856
|
}
|
|
1720
1857
|
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1858
|
+
function Label(_ref) {
|
|
1859
|
+
var htmlFor = _ref.htmlFor,
|
|
1860
|
+
children = _ref.children;
|
|
1861
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
1862
|
+
base: "body",
|
|
1863
|
+
children: /*#__PURE__*/jsx("label", {
|
|
1864
|
+
htmlFor: htmlFor,
|
|
1865
|
+
children: children
|
|
1866
|
+
})
|
|
1867
|
+
});
|
|
1868
|
+
}
|
|
1724
1869
|
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
return withPadding ? theme.kitt.listItem.padding : 0;
|
|
1870
|
+
var OuterRadio = /*#__PURE__*/styled$1(View).withConfig({
|
|
1871
|
+
displayName: "Radio__OuterRadio",
|
|
1872
|
+
componentId: "kitt-universal__sc-1mdgr2o-0"
|
|
1873
|
+
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", "px;border-color:", ";"], function (_ref) {
|
|
1874
|
+
var theme = _ref.theme,
|
|
1875
|
+
disabled = _ref.disabled;
|
|
1876
|
+
return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].backgroundColor;
|
|
1733
1877
|
}, function (_ref2) {
|
|
1734
|
-
var theme = _ref2.theme
|
|
1735
|
-
|
|
1736
|
-
var borderWidth = theme.kitt.listItem.borderWidth;
|
|
1737
|
-
|
|
1738
|
-
if (borders === 'top') {
|
|
1739
|
-
return "border-top-width: ".concat(borderWidth, "px");
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
if (borders === 'bottom') {
|
|
1743
|
-
return "border-bottom-width: ".concat(borderWidth, "px");
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
|
-
if (borders === 'both') {
|
|
1747
|
-
return css(["border-top-width:", "px;border-bottom-width:", "px;"], borderWidth, borderWidth);
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
return 'border: none';
|
|
1878
|
+
var theme = _ref2.theme;
|
|
1879
|
+
return theme.kitt.forms.radio.size;
|
|
1751
1880
|
}, function (_ref3) {
|
|
1752
1881
|
var theme = _ref3.theme;
|
|
1753
|
-
return theme.kitt.
|
|
1882
|
+
return theme.kitt.forms.radio.size;
|
|
1754
1883
|
}, function (_ref4) {
|
|
1755
1884
|
var theme = _ref4.theme;
|
|
1756
|
-
return theme.kitt.
|
|
1885
|
+
return theme.kitt.forms.radio.size / 2;
|
|
1886
|
+
}, function (_ref5) {
|
|
1887
|
+
var theme = _ref5.theme;
|
|
1888
|
+
return theme.kitt.forms.radio.unchecked.borderWidth;
|
|
1889
|
+
}, function (_ref6) {
|
|
1890
|
+
var theme = _ref6.theme,
|
|
1891
|
+
disabled = _ref6.disabled;
|
|
1892
|
+
return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor;
|
|
1757
1893
|
});
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
var
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1894
|
+
var SelectedOuterRadio = /*#__PURE__*/styled$1(View).withConfig({
|
|
1895
|
+
displayName: "Radio__SelectedOuterRadio",
|
|
1896
|
+
componentId: "kitt-universal__sc-1mdgr2o-1"
|
|
1897
|
+
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], function (_ref7) {
|
|
1898
|
+
var theme = _ref7.theme;
|
|
1899
|
+
return theme.kitt.forms.radio.checked.backgroundColor;
|
|
1900
|
+
}, function (_ref8) {
|
|
1901
|
+
var theme = _ref8.theme;
|
|
1902
|
+
return theme.kitt.forms.radio.size;
|
|
1903
|
+
}, function (_ref9) {
|
|
1904
|
+
var theme = _ref9.theme;
|
|
1905
|
+
return theme.kitt.forms.radio.size;
|
|
1906
|
+
}, function (_ref10) {
|
|
1907
|
+
var theme = _ref10.theme;
|
|
1908
|
+
return theme.kitt.forms.radio.size / 2;
|
|
1909
|
+
});
|
|
1910
|
+
var SelectedInnerRadio = /*#__PURE__*/styled$1(View).withConfig({
|
|
1911
|
+
displayName: "Radio__SelectedInnerRadio",
|
|
1912
|
+
componentId: "kitt-universal__sc-1mdgr2o-2"
|
|
1913
|
+
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], function (_ref11) {
|
|
1914
|
+
var theme = _ref11.theme;
|
|
1915
|
+
return theme.kitt.forms.radio.checked.innerBackgroundColor;
|
|
1916
|
+
}, function (_ref12) {
|
|
1917
|
+
var theme = _ref12.theme;
|
|
1918
|
+
return theme.kitt.forms.radio.checked.innerSize;
|
|
1919
|
+
}, function (_ref13) {
|
|
1920
|
+
var theme = _ref13.theme;
|
|
1921
|
+
return theme.kitt.forms.radio.checked.innerSize;
|
|
1922
|
+
}, function (_ref14) {
|
|
1923
|
+
var theme = _ref14.theme;
|
|
1924
|
+
return theme.kitt.forms.radio.checked.innerSize / 2;
|
|
1925
|
+
});
|
|
1926
|
+
var Container$2 = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
1927
|
+
displayName: "Radio__Container",
|
|
1928
|
+
componentId: "kitt-universal__sc-1mdgr2o-3"
|
|
1929
|
+
})(["flex-direction:row;align-items:center;"]);
|
|
1930
|
+
var Text = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
1931
|
+
displayName: "Radio__Text",
|
|
1932
|
+
componentId: "kitt-universal__sc-1mdgr2o-4"
|
|
1933
|
+
})(["margin-left:", "px;"], function (_ref15) {
|
|
1934
|
+
var theme = _ref15.theme;
|
|
1935
|
+
return theme.kitt.spacing * 2;
|
|
1936
|
+
});
|
|
1937
|
+
function Radio(_ref16) {
|
|
1938
|
+
var id = _ref16.id,
|
|
1939
|
+
checked = _ref16.checked,
|
|
1940
|
+
onChange = _ref16.onChange,
|
|
1941
|
+
value = _ref16.value,
|
|
1942
|
+
_ref16$disabled = _ref16.disabled,
|
|
1943
|
+
disabled = _ref16$disabled === void 0 ? false : _ref16$disabled,
|
|
1944
|
+
children = _ref16.children;
|
|
1945
|
+
return /*#__PURE__*/jsxs(Container$2, {
|
|
1946
|
+
nativeID: id,
|
|
1947
|
+
disabled: disabled,
|
|
1948
|
+
accessibilityRole: "radio",
|
|
1949
|
+
"aria-checked": checked,
|
|
1950
|
+
focusable: checked && !disabled,
|
|
1951
|
+
onPress: function handlePress() {
|
|
1952
|
+
onChange(value);
|
|
1953
|
+
},
|
|
1954
|
+
children: [checked && !disabled ? /*#__PURE__*/jsx(SelectedOuterRadio, {
|
|
1955
|
+
children: /*#__PURE__*/jsx(SelectedInnerRadio, {})
|
|
1956
|
+
}) : /*#__PURE__*/jsx(OuterRadio, {
|
|
1957
|
+
disabled: disabled
|
|
1958
|
+
}), /*#__PURE__*/jsx(Text, {
|
|
1959
|
+
base: "body",
|
|
1960
|
+
color: disabled ? 'black-light' : 'black',
|
|
1961
|
+
children: children
|
|
1962
|
+
})]
|
|
1963
|
+
});
|
|
1789
1964
|
}
|
|
1790
|
-
ListItem.Content = ListItemContent;
|
|
1791
|
-
ListItem.SideContent = ListItemSideContent;
|
|
1792
|
-
ListItem.SideContainer = ListItemSideContainer;
|
|
1793
1965
|
|
|
1794
|
-
var
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
}
|
|
1807
|
-
}));
|
|
1808
|
-
function LargeLoader() {
|
|
1809
|
-
return /*#__PURE__*/jsx(LargeLoaderContainer, {
|
|
1810
|
-
children: /*#__PURE__*/jsxs("svg", {
|
|
1811
|
-
width: "60",
|
|
1812
|
-
height: "60",
|
|
1813
|
-
children: [/*#__PURE__*/jsx("g", {
|
|
1814
|
-
"data-large-loader": "base",
|
|
1815
|
-
children: /*#__PURE__*/jsx("circle", {
|
|
1816
|
-
cx: "30",
|
|
1817
|
-
cy: "30",
|
|
1818
|
-
r: "27",
|
|
1819
|
-
fill: "none"
|
|
1820
|
-
})
|
|
1821
|
-
}), /*#__PURE__*/jsx("g", {
|
|
1822
|
-
"data-large-loader": "fill",
|
|
1823
|
-
children: /*#__PURE__*/jsx("circle", {
|
|
1824
|
-
cx: "30",
|
|
1825
|
-
cy: "30",
|
|
1826
|
-
r: "27",
|
|
1827
|
-
fill: "none"
|
|
1828
|
-
})
|
|
1829
|
-
})]
|
|
1830
|
-
})
|
|
1831
|
-
});
|
|
1966
|
+
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; }
|
|
1967
|
+
|
|
1968
|
+
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; }
|
|
1969
|
+
function TextArea(_ref) {
|
|
1970
|
+
var props = _extends({}, _ref);
|
|
1971
|
+
|
|
1972
|
+
var theme = /*#__PURE__*/useTheme();
|
|
1973
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$9({
|
|
1974
|
+
multiline: true,
|
|
1975
|
+
textAlignVertical: "top",
|
|
1976
|
+
minHeight: theme.kitt.forms.textArea.minHeight
|
|
1977
|
+
}, props));
|
|
1832
1978
|
}
|
|
1833
1979
|
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
return
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1980
|
+
var Body = /*#__PURE__*/styled$1(View).withConfig({
|
|
1981
|
+
displayName: "Body",
|
|
1982
|
+
componentId: "kitt-universal__sc-1ofncfn-0"
|
|
1983
|
+
})(["", " background-color:", ";flex:1;"], function (_ref) {
|
|
1984
|
+
var theme = _ref.theme;
|
|
1985
|
+
return theme.responsive.ifWindowSizeMatches({
|
|
1986
|
+
minWidth: KittBreakpoints.MEDIUM
|
|
1987
|
+
}, "padding-right: ".concat(theme.kitt.spacing * 12, "px;\n padding-left: ").concat(theme.kitt.spacing * 12, "px;"), "padding-right: ".concat(theme.kitt.spacing * 6, "px;\n padding-left: ").concat(theme.kitt.spacing * 6, "px;"));
|
|
1988
|
+
}, function (_ref2) {
|
|
1989
|
+
var theme = _ref2.theme;
|
|
1990
|
+
return theme.kitt.colors.uiBackgroundLight;
|
|
1991
|
+
});
|
|
1992
|
+
function FullScreenModalBody(_ref3) {
|
|
1993
|
+
var children = _ref3.children;
|
|
1994
|
+
return /*#__PURE__*/jsx(Body, {
|
|
1995
|
+
children: children
|
|
1844
1996
|
});
|
|
1845
1997
|
}
|
|
1846
1998
|
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
});
|
|
1999
|
+
var SideContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
2000
|
+
displayName: "Header__SideContainer",
|
|
2001
|
+
componentId: "kitt-universal__sc-dfmxi1-0"
|
|
2002
|
+
})(["", ""], function (_ref) {
|
|
2003
|
+
var theme = _ref.theme,
|
|
2004
|
+
_ref$side = _ref.side,
|
|
2005
|
+
side = _ref$side === void 0 ? 'left' : _ref$side;
|
|
2006
|
+
var padding = theme.kitt.spacing * 2;
|
|
1856
2007
|
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
});
|
|
2008
|
+
if (side === 'left') {
|
|
2009
|
+
return "padding-right: ".concat(padding, "px;");
|
|
2010
|
+
}
|
|
1861
2011
|
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
color: color
|
|
1865
|
-
});
|
|
2012
|
+
return "padding-left: ".concat(padding, "px;");
|
|
2013
|
+
});
|
|
1866
2014
|
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
color: color
|
|
1870
|
-
});
|
|
1871
|
-
}
|
|
2015
|
+
function getHeaderHorizontalMediumPadding(spacing) {
|
|
2016
|
+
return spacing * 6;
|
|
1872
2017
|
}
|
|
1873
2018
|
|
|
1874
|
-
var
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
2019
|
+
var Header = /*#__PURE__*/styled$1(View).withConfig({
|
|
2020
|
+
displayName: "Header",
|
|
2021
|
+
componentId: "kitt-universal__sc-dfmxi1-1"
|
|
2022
|
+
})(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], function (_ref2) {
|
|
2023
|
+
var theme = _ref2.theme,
|
|
2024
|
+
_ref2$insetTop = _ref2.insetTop,
|
|
2025
|
+
insetTop = _ref2$insetTop === void 0 ? 0 : _ref2$insetTop;
|
|
2026
|
+
var paddingTop = insetTop + theme.kitt.fullScreenModal.header.paddingVertical;
|
|
2027
|
+
var _theme$kitt$fullScree = theme.kitt.fullScreenModal.header,
|
|
2028
|
+
paddingVertical = _theme$kitt$fullScree.paddingVertical,
|
|
2029
|
+
paddingHorizontal = _theme$kitt$fullScree.paddingHorizontal;
|
|
2030
|
+
return theme.responsive.ifWindowSizeMatches({
|
|
2031
|
+
minWidth: KittBreakpoints.MEDIUM
|
|
2032
|
+
}, "padding: ".concat(paddingTop, "px ").concat(getHeaderHorizontalMediumPadding(theme.kitt.spacing), "px ").concat(paddingVertical, "px;"), "padding: ".concat(paddingTop, "px ").concat(paddingHorizontal, "px ").concat(paddingVertical, "px;"));
|
|
2033
|
+
}, function (_ref3) {
|
|
2034
|
+
var theme = _ref3.theme;
|
|
2035
|
+
return theme.kitt.fullScreenModal.header.borderColor;
|
|
2036
|
+
});
|
|
2037
|
+
var HeaderContent = /*#__PURE__*/styled$1(View).withConfig({
|
|
2038
|
+
displayName: "Header__HeaderContent",
|
|
2039
|
+
componentId: "kitt-universal__sc-dfmxi1-2"
|
|
2040
|
+
})(["", ";", ";justify-content:center;align-items:center;"], function (_ref4) {
|
|
2041
|
+
var theme = _ref4.theme,
|
|
2042
|
+
leftWidth = _ref4.leftWidth,
|
|
2043
|
+
rightWidth = _ref4.rightWidth,
|
|
2044
|
+
windowWidth = _ref4.windowWidth;
|
|
1878
2045
|
|
|
1879
|
-
|
|
1880
|
-
|
|
2046
|
+
/*
|
|
2047
|
+
* Since we don't have controll over the rendered left and right elements,
|
|
2048
|
+
* we must apply some logic to give the title all the available space
|
|
2049
|
+
*/
|
|
2050
|
+
var sideElementMaxWidth = Math.max(leftWidth, rightWidth);
|
|
2051
|
+
var parentHorizontalPadding = theme.kitt.fullScreenModal.header.paddingHorizontal * 2;
|
|
2052
|
+
var parentHorizontalPaddingMedium = getHeaderHorizontalMediumPadding(theme.kitt.spacing) * 2;
|
|
1881
2053
|
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
}
|
|
1886
|
-
};
|
|
1887
|
-
var getIconButtonColor = function (messageType) {
|
|
1888
|
-
switch (messageType) {
|
|
1889
|
-
case 'success':
|
|
1890
|
-
case 'danger':
|
|
1891
|
-
return 'white';
|
|
2054
|
+
var computeWidth = function (breakpointPadding) {
|
|
2055
|
+
return windowWidth - breakpointPadding - sideElementMaxWidth * 2;
|
|
2056
|
+
};
|
|
1892
2057
|
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
2058
|
+
return theme.responsive.ifWindowSizeMatches({
|
|
2059
|
+
minWidth: KittBreakpoints.MEDIUM
|
|
2060
|
+
}, "width: ".concat(computeWidth(parentHorizontalPaddingMedium), "px;"), "width: ".concat(computeWidth(parentHorizontalPadding), "px;"));
|
|
2061
|
+
}, function (_ref5) {
|
|
2062
|
+
var leftWidth = _ref5.leftWidth,
|
|
2063
|
+
rightWidth = _ref5.rightWidth;
|
|
2064
|
+
// Depending of the wider element, we must add a margin to fill the diff in space between elements
|
|
2065
|
+
var deltaMargin = Math.abs(leftWidth - rightWidth);
|
|
1898
2066
|
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
})(["flex-direction:row;align-items:flex-start;justify-content:space-between;min-height:60px;padding-top:", "px;border-radius:", "px;background-color:", ";"], function (_ref) {
|
|
1903
|
-
var _$insets$top;
|
|
2067
|
+
if (leftWidth > rightWidth) {
|
|
2068
|
+
return "margin-right: ".concat(deltaMargin, "px;");
|
|
2069
|
+
}
|
|
1904
2070
|
|
|
1905
|
-
|
|
1906
|
-
return (_$insets$top = $insets === null || $insets === void 0 ? void 0 : $insets.top) !== null && _$insets$top !== void 0 ? _$insets$top : 0;
|
|
1907
|
-
}, function (_ref2) {
|
|
1908
|
-
var theme = _ref2.theme,
|
|
1909
|
-
$hasNoRadius = _ref2.$hasNoRadius;
|
|
1910
|
-
return $hasNoRadius ? 0 : theme.kitt.spacing * 5;
|
|
1911
|
-
}, function (_ref3) {
|
|
1912
|
-
var theme = _ref3.theme,
|
|
1913
|
-
$type = _ref3.$type;
|
|
1914
|
-
return theme.kitt.feedbackMessage[$type].backgroundColor;
|
|
1915
|
-
});
|
|
1916
|
-
var StyledDismissWrapper = /*#__PURE__*/styled$1(View).withConfig({
|
|
1917
|
-
displayName: "BaseMessage__StyledDismissWrapper",
|
|
1918
|
-
componentId: "kitt-universal__sc-eepeiz-1"
|
|
1919
|
-
})(["align-items:center;align-items:flex-start;margin:", ";"], function (_ref4) {
|
|
1920
|
-
var theme = _ref4.theme;
|
|
1921
|
-
var spacing = theme.kitt.spacing;
|
|
1922
|
-
return "".concat(spacing * 2.5, "px ").concat(spacing * 2, "px 0 ").concat(spacing * 5, "px");
|
|
1923
|
-
});
|
|
1924
|
-
var StyledIconContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1925
|
-
displayName: "BaseMessage__StyledIconContainer",
|
|
1926
|
-
componentId: "kitt-universal__sc-eepeiz-2"
|
|
1927
|
-
})(["margin:", ";"], function (_ref5) {
|
|
1928
|
-
var theme = _ref5.theme;
|
|
1929
|
-
var spacing = theme.kitt.spacing;
|
|
1930
|
-
return "".concat(spacing, "px ").concat(spacing * 5, "px 0 0");
|
|
1931
|
-
});
|
|
1932
|
-
var StyledTextContent = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
1933
|
-
displayName: "BaseMessage__StyledTextContent",
|
|
1934
|
-
componentId: "kitt-universal__sc-eepeiz-3"
|
|
1935
|
-
})(["flex:1;text-align:", ";"], function (_ref6) {
|
|
1936
|
-
var $isCenteredText = _ref6.$isCenteredText;
|
|
1937
|
-
return $isCenteredText ? 'center' : 'left';
|
|
1938
|
-
});
|
|
1939
|
-
var StyledMessageContent = /*#__PURE__*/styled$1(View).withConfig({
|
|
1940
|
-
displayName: "BaseMessage__StyledMessageContent",
|
|
1941
|
-
componentId: "kitt-universal__sc-eepeiz-4"
|
|
1942
|
-
})(["display:flex;flex-direction:row;flex-grow:1;align-self:center;align-items:flex-start;flex-shrink:1;padding:", ";"], function (_ref7) {
|
|
1943
|
-
var theme = _ref7.theme;
|
|
1944
|
-
var spacing = theme.kitt.spacing;
|
|
1945
|
-
return "".concat(spacing * 4, "px ").concat(spacing * 5, "px");
|
|
2071
|
+
return "margin-left: ".concat(deltaMargin, "px;");
|
|
1946
2072
|
});
|
|
1947
|
-
function
|
|
1948
|
-
var
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
var
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2073
|
+
function FullScreenModalHeader(_ref6) {
|
|
2074
|
+
var children = _ref6.children,
|
|
2075
|
+
right = _ref6.right,
|
|
2076
|
+
left = _ref6.left;
|
|
2077
|
+
|
|
2078
|
+
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
2079
|
+
top = _useSafeAreaInsets.top;
|
|
2080
|
+
|
|
2081
|
+
var dimensions = useWindowDimensions();
|
|
2082
|
+
|
|
2083
|
+
var _useState = useState(0),
|
|
2084
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2085
|
+
leftWidth = _useState2[0],
|
|
2086
|
+
setLeftWidth = _useState2[1];
|
|
2087
|
+
|
|
2088
|
+
var _useState3 = useState(0),
|
|
2089
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2090
|
+
rightWidth = _useState4[0],
|
|
2091
|
+
setRightWidth = _useState4[1];
|
|
2092
|
+
|
|
2093
|
+
var handleLayoutChange = function (event, side) {
|
|
2094
|
+
// Prevents react to nullify event on rerenders
|
|
2095
|
+
event.persist();
|
|
2096
|
+
|
|
2097
|
+
if (side === 'left') {
|
|
2098
|
+
setLeftWidth(event.nativeEvent.layout.width);
|
|
2099
|
+
return;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
setRightWidth(event.nativeEvent.layout.width);
|
|
2103
|
+
};
|
|
2104
|
+
|
|
2105
|
+
return /*#__PURE__*/jsxs(Header, {
|
|
2106
|
+
insetTop: top,
|
|
2107
|
+
children: [left ? /*#__PURE__*/jsx(SideContainer, {
|
|
2108
|
+
onLayout: function onLayout(e) {
|
|
2109
|
+
return handleLayoutChange(e, 'left');
|
|
2110
|
+
},
|
|
2111
|
+
children: left
|
|
2112
|
+
}) : null, /*#__PURE__*/jsx(HeaderContent, {
|
|
2113
|
+
windowWidth: dimensions.width,
|
|
2114
|
+
leftWidth: leftWidth,
|
|
2115
|
+
rightWidth: rightWidth,
|
|
2116
|
+
children: children
|
|
2117
|
+
}), right ? /*#__PURE__*/jsx(SideContainer, {
|
|
2118
|
+
side: "right",
|
|
2119
|
+
onLayout: function onLayout(e) {
|
|
2120
|
+
return handleLayoutChange(e, 'right');
|
|
2121
|
+
},
|
|
2122
|
+
children: right
|
|
1981
2123
|
}) : null]
|
|
1982
2124
|
});
|
|
1983
2125
|
}
|
|
1984
2126
|
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
hasNoRadius: hasNoRadius,
|
|
1996
|
-
type: type,
|
|
1997
|
-
centeredText: centeredText,
|
|
1998
|
-
onDismiss: onDismiss,
|
|
2127
|
+
var Container$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
2128
|
+
displayName: "FullScreenModal__Container",
|
|
2129
|
+
componentId: "kitt-universal__sc-11qpbe3-0"
|
|
2130
|
+
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
2131
|
+
var theme = _ref.theme;
|
|
2132
|
+
return theme.kitt.colors.uiBackground;
|
|
2133
|
+
});
|
|
2134
|
+
function FullScreenModal(_ref2) {
|
|
2135
|
+
var children = _ref2.children;
|
|
2136
|
+
return /*#__PURE__*/jsx(Container$1, {
|
|
1999
2137
|
children: children
|
|
2000
2138
|
});
|
|
2001
2139
|
}
|
|
2140
|
+
FullScreenModal.Header = FullScreenModalHeader;
|
|
2141
|
+
FullScreenModal.Body = FullScreenModalBody;
|
|
2002
2142
|
|
|
2003
|
-
|
|
2143
|
+
var _excluded$7 = ["as", "children"];
|
|
2004
2144
|
|
|
2005
|
-
function
|
|
2006
|
-
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
2007
|
-
var OverlayPressable = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
2008
|
-
displayName: "Overlay__OverlayPressable",
|
|
2009
|
-
componentId: "kitt-universal__sc-1cz1gbr-0"
|
|
2010
|
-
})(function (_ref) {
|
|
2011
|
-
var theme = _ref.theme;
|
|
2012
|
-
return _objectSpread$3(_objectSpread$3({}, StyleSheet.absoluteFillObject), {}, {
|
|
2013
|
-
backgroundColor: theme.kitt.colors.overlay.dark
|
|
2014
|
-
});
|
|
2015
|
-
});
|
|
2016
|
-
function Overlay(_ref2) {
|
|
2017
|
-
var onPress = _ref2.onPress;
|
|
2018
|
-
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
2019
|
-
accessibilityRole: "none",
|
|
2020
|
-
onPress: onPress,
|
|
2021
|
-
children: /*#__PURE__*/jsx(View, {})
|
|
2022
|
-
});
|
|
2023
|
-
}
|
|
2145
|
+
function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2024
2146
|
|
|
2025
|
-
var
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
return theme.kitt.spacing * 6;
|
|
2031
|
-
}, function (_ref2) {
|
|
2032
|
-
var theme = _ref2.theme;
|
|
2033
|
-
return theme.kitt.spacing * 4;
|
|
2034
|
-
});
|
|
2035
|
-
function ModalBody(_ref3) {
|
|
2036
|
-
var children = _ref3.children;
|
|
2037
|
-
return /*#__PURE__*/jsx(ScrollView, {
|
|
2038
|
-
children: /*#__PURE__*/jsx(BodyView, {
|
|
2039
|
-
children: children
|
|
2040
|
-
})
|
|
2041
|
-
});
|
|
2042
|
-
}
|
|
2147
|
+
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2148
|
+
function StyleWebWrapper(_ref) {
|
|
2149
|
+
var as = _ref.as,
|
|
2150
|
+
children = _ref.children,
|
|
2151
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
2043
2152
|
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
componentId: "kitt-universal__sc-1ujq2dc-0"
|
|
2047
|
-
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
2048
|
-
var theme = _ref.theme;
|
|
2049
|
-
return theme.kitt.spacing * 4;
|
|
2050
|
-
}, function (_ref2) {
|
|
2051
|
-
var theme = _ref2.theme;
|
|
2052
|
-
return theme.kitt.colors.separator;
|
|
2053
|
-
});
|
|
2054
|
-
function ModalFooter(_ref3) {
|
|
2055
|
-
var children = _ref3.children;
|
|
2056
|
-
return /*#__PURE__*/jsx(FooterView, {
|
|
2153
|
+
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
2154
|
+
return /*#__PURE__*/jsx(as || 'div', _objectSpread$8(_objectSpread$8({}, props), {}, {
|
|
2057
2155
|
children: children
|
|
2058
|
-
});
|
|
2156
|
+
}));
|
|
2059
2157
|
}
|
|
2060
2158
|
|
|
2061
|
-
var
|
|
2159
|
+
var _excluded$6 = ["color", "disabled"];
|
|
2062
2160
|
|
|
2063
|
-
var
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2161
|
+
function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2162
|
+
|
|
2163
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2164
|
+
var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled("div")({
|
|
2165
|
+
name: "PressableIconButtonWebWrapper",
|
|
2166
|
+
"class": "p1nlccvg",
|
|
2167
|
+
vars: {
|
|
2168
|
+
"p1nlccvg-0": [function (_ref) {
|
|
2169
|
+
var theme = _ref.theme,
|
|
2170
|
+
$isDisabled = _ref.$isDisabled;
|
|
2171
|
+
return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.hover;
|
|
2172
|
+
}],
|
|
2173
|
+
"p1nlccvg-2": [function (_ref2) {
|
|
2174
|
+
var theme = _ref2.theme,
|
|
2175
|
+
$isDisabled = _ref2.$isDisabled;
|
|
2176
|
+
return $isDisabled ? 1 : theme.kitt.iconButton.scale.medium.hover;
|
|
2177
|
+
}],
|
|
2178
|
+
"p1nlccvg-3": [function (_ref3) {
|
|
2179
|
+
var theme = _ref3.theme,
|
|
2180
|
+
$isDisabled = _ref3.$isDisabled;
|
|
2181
|
+
return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.active;
|
|
2182
|
+
}],
|
|
2183
|
+
"p1nlccvg-4": [function (_ref4) {
|
|
2184
|
+
var theme = _ref4.theme,
|
|
2185
|
+
$isWhite = _ref4.$isWhite,
|
|
2186
|
+
$isDisabled = _ref4.$isDisabled;
|
|
2187
|
+
if ($isDisabled) return theme.kitt.iconButton.disabled.backgroundColor;
|
|
2188
|
+
var _theme$kitt$iconButto = theme.kitt.iconButton,
|
|
2189
|
+
white = _theme$kitt$iconButto.white,
|
|
2190
|
+
defaultIconButton = _theme$kitt$iconButto["default"];
|
|
2191
|
+
if ($isWhite) return white.pressedBackgroundColor;
|
|
2192
|
+
return defaultIconButton.pressedBackgroundColor;
|
|
2193
|
+
}]
|
|
2194
|
+
}
|
|
2195
|
+
}));
|
|
2196
|
+
var StyledPressableIconButton = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
2197
|
+
displayName: "PressableIconButton__StyledPressableIconButton",
|
|
2198
|
+
componentId: "kitt-universal__sc-1m6jo3s-0"
|
|
2199
|
+
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref5) {
|
|
2200
|
+
var theme = _ref5.theme;
|
|
2201
|
+
return theme.kitt.iconButton.borderRadius;
|
|
2202
|
+
}, function (_ref6) {
|
|
2203
|
+
var theme = _ref6.theme;
|
|
2204
|
+
return theme.kitt.iconButton.width;
|
|
2205
|
+
}, function (_ref7) {
|
|
2206
|
+
var theme = _ref7.theme;
|
|
2207
|
+
return theme.kitt.iconButton.height;
|
|
2208
|
+
}, function (_ref8) {
|
|
2209
|
+
var theme = _ref8.theme,
|
|
2210
|
+
disabled = _ref8.disabled;
|
|
2211
|
+
var iconButton = theme.kitt.iconButton;
|
|
2212
|
+
var transition = iconButton.transition;
|
|
2213
|
+
|
|
2214
|
+
if (disabled) {
|
|
2215
|
+
return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
|
|
2094
2219
|
});
|
|
2095
|
-
function
|
|
2096
|
-
var
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
}), right !== undefined ? right : /*#__PURE__*/jsx(RightIconView, {
|
|
2108
|
-
children: /*#__PURE__*/jsx(Button, {
|
|
2109
|
-
type: "subtle-dark",
|
|
2110
|
-
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
2111
|
-
onPress: onClose
|
|
2112
|
-
})
|
|
2113
|
-
})]
|
|
2220
|
+
function PressableIconButton(_ref9) {
|
|
2221
|
+
var color = _ref9.color,
|
|
2222
|
+
disabled = _ref9.disabled,
|
|
2223
|
+
props = _objectWithoutProperties(_ref9, _excluded$6);
|
|
2224
|
+
|
|
2225
|
+
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
2226
|
+
as: PressableIconButtonWebWrapper,
|
|
2227
|
+
$isWhite: color === 'white',
|
|
2228
|
+
$isDisabled: Boolean(disabled),
|
|
2229
|
+
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
2230
|
+
disabled: disabled
|
|
2231
|
+
}))
|
|
2114
2232
|
});
|
|
2115
2233
|
}
|
|
2116
2234
|
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2235
|
+
function PressableAnimatedContainer(_ref) {
|
|
2236
|
+
var children = _ref.children,
|
|
2237
|
+
color = _ref.color,
|
|
2238
|
+
disabled = _ref.disabled,
|
|
2239
|
+
onPress = _ref.onPress;
|
|
2240
|
+
return /*#__PURE__*/jsx(PressableIconButton, {
|
|
2241
|
+
accessibilityRole: "button",
|
|
2242
|
+
color: color,
|
|
2243
|
+
disabled: disabled,
|
|
2244
|
+
onPress: onPress,
|
|
2245
|
+
children: children
|
|
2246
|
+
});
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2249
|
+
var IconButtonContentBorder = /*#__PURE__*/styled$1(View).withConfig({
|
|
2250
|
+
displayName: "IconButton__IconButtonContentBorder",
|
|
2251
|
+
componentId: "kitt-universal__sc-swelbf-0"
|
|
2252
|
+
})(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
|
|
2121
2253
|
var theme = _ref.theme;
|
|
2122
|
-
return theme.kitt.
|
|
2254
|
+
return "".concat(theme.kitt.iconButton.borderWidth, "px solid");
|
|
2123
2255
|
}, function (_ref2) {
|
|
2124
|
-
var theme = _ref2.theme
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
displayName: "Modal__ContentView",
|
|
2129
|
-
componentId: "kitt-universal__sc-1xy2w5u-1"
|
|
2130
|
-
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], function (_ref3) {
|
|
2256
|
+
var theme = _ref2.theme,
|
|
2257
|
+
disabled = _ref2.disabled;
|
|
2258
|
+
return disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor;
|
|
2259
|
+
}, function (_ref3) {
|
|
2131
2260
|
var theme = _ref3.theme;
|
|
2132
|
-
return theme.kitt.
|
|
2261
|
+
return theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth;
|
|
2133
2262
|
}, function (_ref4) {
|
|
2134
2263
|
var theme = _ref4.theme;
|
|
2135
|
-
return theme.kitt.
|
|
2264
|
+
return theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth;
|
|
2265
|
+
}, function (_ref5) {
|
|
2266
|
+
var theme = _ref5.theme;
|
|
2267
|
+
return theme.kitt.iconButton.borderRadius;
|
|
2136
2268
|
});
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
animationType: "fade",
|
|
2148
|
-
visible: visible,
|
|
2149
|
-
onShow: onEntered,
|
|
2150
|
-
onDismiss: onExited,
|
|
2151
|
-
onRequestClose: onClose,
|
|
2152
|
-
children: /*#__PURE__*/jsxs(ModalView, {
|
|
2153
|
-
children: [/*#__PURE__*/jsx(Overlay, {
|
|
2154
|
-
onPress: onClose
|
|
2155
|
-
}), /*#__PURE__*/jsx(ContentView, {
|
|
2156
|
-
children: children
|
|
2157
|
-
})]
|
|
2158
|
-
})
|
|
2269
|
+
|
|
2270
|
+
function IconButtonContent(_ref6) {
|
|
2271
|
+
var disabled = _ref6.disabled,
|
|
2272
|
+
color = _ref6.color,
|
|
2273
|
+
icon = _ref6.icon;
|
|
2274
|
+
return /*#__PURE__*/jsx(IconButtonContentBorder, {
|
|
2275
|
+
disabled: disabled,
|
|
2276
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
2277
|
+
color: disabled ? 'black-light' : color,
|
|
2278
|
+
icon: icon
|
|
2159
2279
|
})
|
|
2160
2280
|
});
|
|
2161
2281
|
}
|
|
2162
|
-
Modal.Header = ModalHeader;
|
|
2163
|
-
Modal.Body = ModalBody;
|
|
2164
|
-
Modal.Footer = ModalFooter;
|
|
2165
2282
|
|
|
2166
|
-
function
|
|
2167
|
-
var
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
children: children
|
|
2283
|
+
function IconButton(_ref7) {
|
|
2284
|
+
var icon = _ref7.icon,
|
|
2285
|
+
color = _ref7.color,
|
|
2286
|
+
disabled = _ref7.disabled,
|
|
2287
|
+
testID = _ref7.testID,
|
|
2288
|
+
accessibilityLabel = _ref7.accessibilityLabel,
|
|
2289
|
+
accessibilityRole = _ref7.accessibilityRole,
|
|
2290
|
+
onPress = _ref7.onPress;
|
|
2291
|
+
return /*#__PURE__*/jsx(PressableAnimatedContainer, {
|
|
2292
|
+
color: color,
|
|
2293
|
+
disabled: disabled,
|
|
2294
|
+
testID: testID,
|
|
2295
|
+
accessibilityLabel: accessibilityLabel,
|
|
2296
|
+
accessibilityRole: accessibilityRole,
|
|
2297
|
+
onPress: onPress,
|
|
2298
|
+
children: /*#__PURE__*/jsx(IconButtonContent, {
|
|
2299
|
+
disabled: disabled,
|
|
2300
|
+
color: color,
|
|
2301
|
+
icon: icon
|
|
2302
|
+
})
|
|
2187
2303
|
});
|
|
2188
2304
|
}
|
|
2189
2305
|
|
|
2190
|
-
var
|
|
2191
|
-
name: "StyledSkeleton",
|
|
2192
|
-
"class": "sc3upcl",
|
|
2193
|
-
vars: {
|
|
2194
|
-
"sc3upcl-0": [function (_ref) {
|
|
2195
|
-
var theme = _ref.theme;
|
|
2196
|
-
return theme.kitt.skeleton.backgroundColor;
|
|
2197
|
-
}],
|
|
2198
|
-
"sc3upcl-1": [function (_ref2) {
|
|
2199
|
-
var $isLoading = _ref2.$isLoading,
|
|
2200
|
-
theme = _ref2.theme;
|
|
2201
|
-
return $isLoading ? "linear-gradient(\n -90deg,\n ".concat(theme.kitt.skeleton.backgroundColor, ",\n ").concat(theme.kitt.skeleton.flareColor, " 50%,\n ").concat(theme.kitt.skeleton.backgroundColor, " 100%\n )") : 'none';
|
|
2202
|
-
}],
|
|
2203
|
-
"sc3upcl-2": [function (_ref3) {
|
|
2204
|
-
var $isLoading = _ref3.$isLoading;
|
|
2205
|
-
return $isLoading ? '1s ease-in-out infinite' : 'none';
|
|
2206
|
-
}]
|
|
2207
|
-
}
|
|
2208
|
-
}));
|
|
2209
|
-
function SkeletonContent(_ref4) {
|
|
2210
|
-
var isLoading = _ref4.isLoading;
|
|
2211
|
-
return /*#__PURE__*/jsx(StyledSkeleton, {
|
|
2212
|
-
$isLoading: isLoading
|
|
2213
|
-
});
|
|
2214
|
-
}
|
|
2306
|
+
var _excluded$5 = ["children"];
|
|
2215
2307
|
|
|
2216
|
-
var
|
|
2217
|
-
displayName: "Skeleton__SkeletonContainer",
|
|
2218
|
-
componentId: "kitt-universal__sc-1w5cm3i-0"
|
|
2219
|
-
})(["overflow:hidden;"]);
|
|
2220
|
-
function Skeleton(_ref) {
|
|
2221
|
-
var isLoading = _ref.isLoading,
|
|
2222
|
-
style = _ref.style;
|
|
2308
|
+
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; }
|
|
2223
2309
|
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2310
|
+
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; }
|
|
2311
|
+
var ContentView$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
2312
|
+
displayName: "ListItemContent__ContentView",
|
|
2313
|
+
componentId: "kitt-universal__sc-57q0u9-0"
|
|
2314
|
+
})(["flex:1 0 0%;align-self:center;"]);
|
|
2315
|
+
function ListItemContent(_ref) {
|
|
2316
|
+
var children = _ref.children,
|
|
2317
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
2228
2318
|
|
|
2229
|
-
return /*#__PURE__*/jsx(
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
var nativeEvent = _ref2.nativeEvent;
|
|
2233
|
-
return setWidth(nativeEvent.layout.width);
|
|
2234
|
-
},
|
|
2235
|
-
children: /*#__PURE__*/jsx(SkeletonContent, {
|
|
2236
|
-
isLoading: isLoading,
|
|
2237
|
-
width: width
|
|
2238
|
-
})
|
|
2239
|
-
});
|
|
2319
|
+
return /*#__PURE__*/jsx(ContentView$1, _objectSpread$6(_objectSpread$6({}, rest), {}, {
|
|
2320
|
+
children: children
|
|
2321
|
+
}));
|
|
2240
2322
|
}
|
|
2241
|
-
var Bar = /*#__PURE__*/styled$1(Skeleton).withConfig({
|
|
2242
|
-
displayName: "Skeleton__Bar",
|
|
2243
|
-
componentId: "kitt-universal__sc-1w5cm3i-1"
|
|
2244
|
-
})(["width:100%;height:", "px;border-radius:", "px;"], function (_ref3) {
|
|
2245
|
-
var theme = _ref3.theme;
|
|
2246
|
-
return theme.kitt.spacing * 2;
|
|
2247
|
-
}, function (_ref4) {
|
|
2248
|
-
var theme = _ref4.theme;
|
|
2249
|
-
return theme.kitt.spacing * 2;
|
|
2250
|
-
});
|
|
2251
|
-
var Circle = /*#__PURE__*/styled$1(Skeleton).withConfig({
|
|
2252
|
-
displayName: "Skeleton__Circle",
|
|
2253
|
-
componentId: "kitt-universal__sc-1w5cm3i-2"
|
|
2254
|
-
})(["width:", "px;height:", "px;border-radius:", "px;"], function (_ref5) {
|
|
2255
|
-
var theme = _ref5.theme;
|
|
2256
|
-
return theme.kitt.spacing * 12;
|
|
2257
|
-
}, function (_ref6) {
|
|
2258
|
-
var theme = _ref6.theme;
|
|
2259
|
-
return theme.kitt.spacing * 12;
|
|
2260
|
-
}, function (_ref7) {
|
|
2261
|
-
var theme = _ref7.theme;
|
|
2262
|
-
return theme.kitt.spacing * 6;
|
|
2263
|
-
});
|
|
2264
|
-
var Square = /*#__PURE__*/styled$1(Skeleton).withConfig({
|
|
2265
|
-
displayName: "Skeleton__Square",
|
|
2266
|
-
componentId: "kitt-universal__sc-1w5cm3i-3"
|
|
2267
|
-
})(["width:", "px;height:", "px;border-radius:", "px;"], function (_ref8) {
|
|
2268
|
-
var theme = _ref8.theme;
|
|
2269
|
-
return theme.kitt.spacing * 12;
|
|
2270
|
-
}, function (_ref9) {
|
|
2271
|
-
var theme = _ref9.theme;
|
|
2272
|
-
return theme.kitt.spacing * 12;
|
|
2273
|
-
}, function (_ref10) {
|
|
2274
|
-
var theme = _ref10.theme;
|
|
2275
|
-
return theme.kitt.spacing * 1.5;
|
|
2276
|
-
});
|
|
2277
|
-
Skeleton.Bar = Bar;
|
|
2278
|
-
Skeleton.Circle = Circle;
|
|
2279
|
-
Skeleton.Square = Square;
|
|
2280
2323
|
|
|
2281
|
-
var
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2324
|
+
var _excluded$4 = ["children", "side"],
|
|
2325
|
+
_excluded2$1 = ["children", "align"];
|
|
2326
|
+
|
|
2327
|
+
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; }
|
|
2328
|
+
|
|
2329
|
+
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; }
|
|
2330
|
+
var SideContainerView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2331
|
+
displayName: "ListItemSideContent__SideContainerView",
|
|
2332
|
+
componentId: "kitt-universal__sc-1vajiw-0"
|
|
2333
|
+
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
2334
|
+
var theme = _ref.theme,
|
|
2335
|
+
side = _ref.side;
|
|
2336
|
+
return side === 'right' ? "".concat(theme.kitt.listItem.innerMargin, "px") : 0;
|
|
2291
2337
|
}, function (_ref2) {
|
|
2292
2338
|
var theme = _ref2.theme,
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
});
|
|
2339
|
+
side = _ref2.side;
|
|
2340
|
+
return side === 'left' ? "".concat(theme.kitt.listItem.innerMargin, "px") : 0;
|
|
2341
|
+
}); // Handles the vertical alignment of the side elements of the list item
|
|
2297
2342
|
|
|
2298
|
-
|
|
2343
|
+
function ListItemSideContainer(_ref3) {
|
|
2344
|
+
var children = _ref3.children,
|
|
2345
|
+
_ref3$side = _ref3.side,
|
|
2346
|
+
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
2347
|
+
rest = _objectWithoutProperties(_ref3, _excluded$4);
|
|
2299
2348
|
|
|
2300
|
-
|
|
2301
|
-
|
|
2349
|
+
return /*#__PURE__*/jsx(SideContainerView, _objectSpread$5(_objectSpread$5({
|
|
2350
|
+
side: side
|
|
2351
|
+
}, rest), {}, {
|
|
2352
|
+
children: children
|
|
2353
|
+
}));
|
|
2354
|
+
}
|
|
2355
|
+
var SideContentView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2356
|
+
displayName: "ListItemSideContent__SideContentView",
|
|
2357
|
+
componentId: "kitt-universal__sc-1vajiw-1"
|
|
2358
|
+
})(["align-self:", ";"], function (_ref4) {
|
|
2359
|
+
var align = _ref4.align;
|
|
2360
|
+
return align;
|
|
2361
|
+
});
|
|
2362
|
+
function ListItemSideContent(_ref5) {
|
|
2363
|
+
var children = _ref5.children,
|
|
2364
|
+
_ref5$align = _ref5.align,
|
|
2365
|
+
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
2366
|
+
rest = _objectWithoutProperties(_ref5, _excluded2$1);
|
|
2302
2367
|
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2368
|
+
return /*#__PURE__*/jsx(SideContentView, _objectSpread$5(_objectSpread$5({
|
|
2369
|
+
align: align
|
|
2370
|
+
}, rest), {}, {
|
|
2371
|
+
children: children
|
|
2372
|
+
}));
|
|
2373
|
+
}
|
|
2306
2374
|
|
|
2307
|
-
|
|
2308
|
-
return '#ffffff';
|
|
2375
|
+
var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
2309
2376
|
|
|
2310
|
-
|
|
2311
|
-
return theme.kitt.palettes.lateOcean.lateOcean;
|
|
2377
|
+
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; }
|
|
2312
2378
|
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2379
|
+
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; }
|
|
2380
|
+
var ContainerView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2381
|
+
displayName: "ListItem__ContainerView",
|
|
2382
|
+
componentId: "kitt-universal__sc-2afp9s-0"
|
|
2383
|
+
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
2384
|
+
var withPadding = _ref.withPadding,
|
|
2385
|
+
theme = _ref.theme;
|
|
2386
|
+
return withPadding ? theme.kitt.listItem.padding : 0;
|
|
2387
|
+
}, function (_ref2) {
|
|
2388
|
+
var theme = _ref2.theme,
|
|
2389
|
+
borders = _ref2.borders;
|
|
2390
|
+
var borderWidth = theme.kitt.listItem.borderWidth;
|
|
2317
2391
|
|
|
2318
|
-
|
|
2319
|
-
|
|
2392
|
+
if (borders === 'top') {
|
|
2393
|
+
return "border-top-width: ".concat(borderWidth, "px");
|
|
2394
|
+
}
|
|
2320
2395
|
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
return 'white';
|
|
2396
|
+
if (borders === 'bottom') {
|
|
2397
|
+
return "border-bottom-width: ".concat(borderWidth, "px");
|
|
2398
|
+
}
|
|
2325
2399
|
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
return 'black';
|
|
2400
|
+
if (borders === 'both') {
|
|
2401
|
+
return css(["border-top-width:", "px;border-bottom-width:", "px;"], borderWidth, borderWidth);
|
|
2329
2402
|
}
|
|
2330
|
-
};
|
|
2331
2403
|
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
var
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2404
|
+
return 'border: none';
|
|
2405
|
+
}, function (_ref3) {
|
|
2406
|
+
var theme = _ref3.theme;
|
|
2407
|
+
return theme.kitt.listItem.borderColor;
|
|
2408
|
+
}, function (_ref4) {
|
|
2409
|
+
var theme = _ref4.theme;
|
|
2410
|
+
return theme.kitt.colors.uiBackgroundLight;
|
|
2411
|
+
});
|
|
2412
|
+
function ListItem(_ref5) {
|
|
2413
|
+
var children = _ref5.children,
|
|
2414
|
+
withPadding = _ref5.withPadding,
|
|
2415
|
+
borders = _ref5.borders,
|
|
2416
|
+
left = _ref5.left,
|
|
2417
|
+
right = _ref5.right,
|
|
2418
|
+
onPress = _ref5.onPress,
|
|
2419
|
+
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
2420
|
+
|
|
2421
|
+
var Wrapper = onPress ? Pressable : Fragment;
|
|
2422
|
+
var wrapperProps = onPress ? _objectSpread$4({
|
|
2423
|
+
accessibilityRole: 'button',
|
|
2424
|
+
onPress: onPress
|
|
2425
|
+
}, rest) : undefined;
|
|
2426
|
+
var containerProps = onPress ? undefined : rest;
|
|
2427
|
+
return /*#__PURE__*/jsx(Wrapper, _objectSpread$4(_objectSpread$4({}, wrapperProps), {}, {
|
|
2428
|
+
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread$4(_objectSpread$4({
|
|
2429
|
+
withPadding: withPadding,
|
|
2430
|
+
borders: borders
|
|
2431
|
+
}, containerProps), {}, {
|
|
2432
|
+
children: [left ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
2433
|
+
side: "left",
|
|
2434
|
+
children: left
|
|
2435
|
+
}) : null, /*#__PURE__*/jsx(ListItemContent, {
|
|
2355
2436
|
children: children
|
|
2356
|
-
})
|
|
2357
|
-
|
|
2358
|
-
|
|
2437
|
+
}), right ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
2438
|
+
side: "right",
|
|
2439
|
+
children: right
|
|
2440
|
+
}) : null]
|
|
2441
|
+
}))
|
|
2442
|
+
}));
|
|
2359
2443
|
}
|
|
2444
|
+
ListItem.Content = ListItemContent;
|
|
2445
|
+
ListItem.SideContent = ListItemSideContent;
|
|
2446
|
+
ListItem.SideContainer = ListItemSideContainer;
|
|
2360
2447
|
|
|
2361
|
-
var
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
}
|
|
2369
|
-
function
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2448
|
+
var LargeLoaderContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
2449
|
+
name: "LargeLoaderContainer",
|
|
2450
|
+
"class": "l2im3sa",
|
|
2451
|
+
vars: {
|
|
2452
|
+
"l2im3sa-0": [function (_ref) {
|
|
2453
|
+
var theme = _ref.theme;
|
|
2454
|
+
return theme.kitt.colors.separator;
|
|
2455
|
+
}],
|
|
2456
|
+
"l2im3sa-1": [function (_ref2) {
|
|
2457
|
+
var theme = _ref2.theme;
|
|
2458
|
+
return theme.kitt.colors.primary;
|
|
2459
|
+
}]
|
|
2460
|
+
}
|
|
2461
|
+
}));
|
|
2462
|
+
function LargeLoader() {
|
|
2463
|
+
return /*#__PURE__*/jsx(LargeLoaderContainer, {
|
|
2464
|
+
children: /*#__PURE__*/jsxs("svg", {
|
|
2465
|
+
width: "60",
|
|
2466
|
+
height: "60",
|
|
2467
|
+
children: [/*#__PURE__*/jsx("g", {
|
|
2468
|
+
"data-large-loader": "base",
|
|
2469
|
+
children: /*#__PURE__*/jsx("circle", {
|
|
2470
|
+
cx: "30",
|
|
2471
|
+
cy: "30",
|
|
2472
|
+
r: "27",
|
|
2473
|
+
fill: "none"
|
|
2474
|
+
})
|
|
2475
|
+
}), /*#__PURE__*/jsx("g", {
|
|
2476
|
+
"data-large-loader": "fill",
|
|
2477
|
+
children: /*#__PURE__*/jsx("circle", {
|
|
2478
|
+
cx: "30",
|
|
2479
|
+
cy: "30",
|
|
2480
|
+
r: "27",
|
|
2481
|
+
fill: "none"
|
|
2482
|
+
})
|
|
2483
|
+
})]
|
|
2380
2484
|
})
|
|
2381
2485
|
});
|
|
2382
2486
|
}
|
|
2383
2487
|
|
|
2384
|
-
function
|
|
2385
|
-
var color =
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
children: children
|
|
2395
|
-
})
|
|
2488
|
+
function Loader(_ref) {
|
|
2489
|
+
var _ref$color = _ref.color,
|
|
2490
|
+
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
2491
|
+
_ref$size = _ref.size,
|
|
2492
|
+
size = _ref$size === void 0 ? 20 : _ref$size;
|
|
2493
|
+
return /*#__PURE__*/jsx(TypographyIcon, {
|
|
2494
|
+
spin: true,
|
|
2495
|
+
color: color,
|
|
2496
|
+
size: size,
|
|
2497
|
+
icon: /*#__PURE__*/jsx(LoaderIcon, {})
|
|
2396
2498
|
});
|
|
2397
2499
|
}
|
|
2398
2500
|
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
var color = _ref3.color,
|
|
2403
|
-
children = _ref3.children,
|
|
2404
|
-
numberOfLines = _ref3.numberOfLines;
|
|
2405
|
-
return /*#__PURE__*/jsx(StorySubTitleContainer, {
|
|
2406
|
-
children: /*#__PURE__*/jsx(Typography.Header3, {
|
|
2407
|
-
variant: "bold",
|
|
2408
|
-
base: "header3",
|
|
2409
|
-
medium: "header4",
|
|
2410
|
-
color: useStoryBlockColor(color),
|
|
2411
|
-
numberOfLines: numberOfLines,
|
|
2412
|
-
children: children
|
|
2413
|
-
})
|
|
2414
|
-
});
|
|
2415
|
-
}
|
|
2501
|
+
function IconContent(_ref) {
|
|
2502
|
+
var type = _ref.type,
|
|
2503
|
+
color = _ref.color;
|
|
2416
2504
|
|
|
2417
|
-
|
|
2505
|
+
switch (type) {
|
|
2506
|
+
case 'warning':
|
|
2507
|
+
return /*#__PURE__*/jsx(AlertCircleIcon, {
|
|
2508
|
+
color: color
|
|
2509
|
+
});
|
|
2418
2510
|
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
return /*#__PURE__*/jsx(StorySubTitleContainer, {
|
|
2424
|
-
children: /*#__PURE__*/jsx(Typography.Header4, {
|
|
2425
|
-
variant: "bold",
|
|
2426
|
-
base: "header4",
|
|
2427
|
-
medium: "header5",
|
|
2428
|
-
color: useStoryBlockColor(color),
|
|
2429
|
-
numberOfLines: numberOfLines,
|
|
2430
|
-
children: children
|
|
2431
|
-
})
|
|
2432
|
-
});
|
|
2433
|
-
}
|
|
2511
|
+
case 'success':
|
|
2512
|
+
return /*#__PURE__*/jsx(CheckIcon, {
|
|
2513
|
+
color: color
|
|
2514
|
+
});
|
|
2434
2515
|
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2516
|
+
case 'danger':
|
|
2517
|
+
return /*#__PURE__*/jsx(AlertTriangleIcon, {
|
|
2518
|
+
color: color
|
|
2519
|
+
});
|
|
2439
2520
|
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
})
|
|
2444
|
-
|
|
2445
|
-
var title = _ref.title,
|
|
2446
|
-
contentContainerStyle = _ref.contentContainerStyle,
|
|
2447
|
-
children = _ref.children;
|
|
2448
|
-
return /*#__PURE__*/jsxs(StoryContainer$1, {
|
|
2449
|
-
contentContainerStyle: contentContainerStyle,
|
|
2450
|
-
children: [/*#__PURE__*/jsx(StoryTitle, {
|
|
2451
|
-
children: title
|
|
2452
|
-
}), children]
|
|
2453
|
-
});
|
|
2521
|
+
default:
|
|
2522
|
+
return /*#__PURE__*/jsx(InfoIcon, {
|
|
2523
|
+
color: color
|
|
2524
|
+
});
|
|
2525
|
+
}
|
|
2454
2526
|
}
|
|
2455
2527
|
|
|
2456
|
-
var
|
|
2457
|
-
|
|
2458
|
-
|
|
2528
|
+
var getColorByType = function (type) {
|
|
2529
|
+
switch (type) {
|
|
2530
|
+
case 'success':
|
|
2531
|
+
return 'white';
|
|
2459
2532
|
|
|
2460
|
-
|
|
2533
|
+
case 'danger':
|
|
2534
|
+
return 'white';
|
|
2461
2535
|
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
}
|
|
2467
|
-
function
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2536
|
+
case 'warning':
|
|
2537
|
+
default:
|
|
2538
|
+
return 'black';
|
|
2539
|
+
}
|
|
2540
|
+
};
|
|
2541
|
+
var getIconButtonColor = function (messageType) {
|
|
2542
|
+
switch (messageType) {
|
|
2543
|
+
case 'success':
|
|
2544
|
+
case 'danger':
|
|
2545
|
+
return 'white';
|
|
2472
2546
|
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
}));
|
|
2479
|
-
}
|
|
2480
|
-
var StyledSubSection = /*#__PURE__*/styled$1(View).withConfig({
|
|
2481
|
-
displayName: "StorySection__StyledSubSection",
|
|
2482
|
-
componentId: "kitt-universal__sc-1b3liv5-1"
|
|
2483
|
-
})(["margin-bottom:16px;"]);
|
|
2547
|
+
case 'warning':
|
|
2548
|
+
default:
|
|
2549
|
+
return 'black';
|
|
2550
|
+
}
|
|
2551
|
+
};
|
|
2484
2552
|
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2553
|
+
var StyledMessageContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
2554
|
+
displayName: "BaseMessage__StyledMessageContainer",
|
|
2555
|
+
componentId: "kitt-universal__sc-eepeiz-0"
|
|
2556
|
+
})(["flex-direction:row;align-items:flex-start;justify-content:space-between;min-height:60px;padding-top:", "px;border-radius:", "px;background-color:", ";"], function (_ref) {
|
|
2557
|
+
var _$insets$top;
|
|
2489
2558
|
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2559
|
+
var $insets = _ref.$insets;
|
|
2560
|
+
return (_$insets$top = $insets === null || $insets === void 0 ? void 0 : $insets.top) !== null && _$insets$top !== void 0 ? _$insets$top : 0;
|
|
2561
|
+
}, function (_ref2) {
|
|
2562
|
+
var theme = _ref2.theme,
|
|
2563
|
+
$hasNoRadius = _ref2.$hasNoRadius;
|
|
2564
|
+
return $hasNoRadius ? 0 : theme.kitt.spacing * 5;
|
|
2565
|
+
}, function (_ref3) {
|
|
2566
|
+
var theme = _ref3.theme,
|
|
2567
|
+
$type = _ref3.$type;
|
|
2568
|
+
return theme.kitt.feedbackMessage[$type].backgroundColor;
|
|
2569
|
+
});
|
|
2570
|
+
var StyledDismissWrapper = /*#__PURE__*/styled$1(View).withConfig({
|
|
2571
|
+
displayName: "BaseMessage__StyledDismissWrapper",
|
|
2572
|
+
componentId: "kitt-universal__sc-eepeiz-1"
|
|
2573
|
+
})(["align-items:center;align-items:flex-start;margin:", ";"], function (_ref4) {
|
|
2574
|
+
var theme = _ref4.theme;
|
|
2575
|
+
var spacing = theme.kitt.spacing;
|
|
2576
|
+
return "".concat(spacing * 2.5, "px ").concat(spacing * 2, "px 0 ").concat(spacing * 5, "px");
|
|
2577
|
+
});
|
|
2578
|
+
var StyledIconContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
2579
|
+
displayName: "BaseMessage__StyledIconContainer",
|
|
2580
|
+
componentId: "kitt-universal__sc-eepeiz-2"
|
|
2581
|
+
})(["margin:", ";"], function (_ref5) {
|
|
2582
|
+
var theme = _ref5.theme;
|
|
2583
|
+
var spacing = theme.kitt.spacing;
|
|
2584
|
+
return "".concat(spacing, "px ").concat(spacing * 5, "px 0 0");
|
|
2585
|
+
});
|
|
2586
|
+
var StyledTextContent = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
2587
|
+
displayName: "BaseMessage__StyledTextContent",
|
|
2588
|
+
componentId: "kitt-universal__sc-eepeiz-3"
|
|
2589
|
+
})(["flex:1;text-align:", ";"], function (_ref6) {
|
|
2590
|
+
var $isCenteredText = _ref6.$isCenteredText;
|
|
2591
|
+
return $isCenteredText ? 'center' : 'left';
|
|
2592
|
+
});
|
|
2593
|
+
var StyledMessageContent = /*#__PURE__*/styled$1(View).withConfig({
|
|
2594
|
+
displayName: "BaseMessage__StyledMessageContent",
|
|
2595
|
+
componentId: "kitt-universal__sc-eepeiz-4"
|
|
2596
|
+
})(["display:flex;flex-direction:row;flex-grow:1;align-self:center;align-items:flex-start;flex-shrink:1;padding:", ";"], function (_ref7) {
|
|
2597
|
+
var theme = _ref7.theme;
|
|
2598
|
+
var spacing = theme.kitt.spacing;
|
|
2599
|
+
return "".concat(spacing * 4, "px ").concat(spacing * 5, "px");
|
|
2600
|
+
});
|
|
2601
|
+
function BaseMessage(_ref8) {
|
|
2602
|
+
var _ref8$type = _ref8.type,
|
|
2603
|
+
type = _ref8$type === void 0 ? 'info' : _ref8$type,
|
|
2604
|
+
children = _ref8.children,
|
|
2605
|
+
hasNoRadius = _ref8.hasNoRadius,
|
|
2606
|
+
centeredText = _ref8.centeredText,
|
|
2607
|
+
insets = _ref8.insets,
|
|
2608
|
+
onDismiss = _ref8.onDismiss;
|
|
2609
|
+
var color = getColorByType(type);
|
|
2610
|
+
return /*#__PURE__*/jsxs(StyledMessageContainer, {
|
|
2611
|
+
$type: type,
|
|
2612
|
+
$hasNoRadius: hasNoRadius,
|
|
2613
|
+
$insets: insets,
|
|
2614
|
+
children: [/*#__PURE__*/jsxs(StyledMessageContent, {
|
|
2615
|
+
children: [centeredText ? null : /*#__PURE__*/jsx(StyledIconContainer, {
|
|
2616
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
2617
|
+
color: color,
|
|
2618
|
+
icon: /*#__PURE__*/jsx(IconContent, {
|
|
2619
|
+
type: type,
|
|
2620
|
+
color: color
|
|
2621
|
+
})
|
|
2622
|
+
})
|
|
2623
|
+
}), /*#__PURE__*/jsx(StyledTextContent, {
|
|
2624
|
+
$isCenteredText: centeredText,
|
|
2625
|
+
base: "body",
|
|
2626
|
+
color: color,
|
|
2627
|
+
children: children
|
|
2628
|
+
})]
|
|
2629
|
+
}), onDismiss ? /*#__PURE__*/jsx(StyledDismissWrapper, {
|
|
2630
|
+
children: /*#__PURE__*/jsx(IconButton, {
|
|
2631
|
+
color: getIconButtonColor(type),
|
|
2632
|
+
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
2633
|
+
onPress: onDismiss
|
|
2634
|
+
})
|
|
2635
|
+
}) : null]
|
|
2636
|
+
});
|
|
2495
2637
|
}
|
|
2496
2638
|
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2639
|
+
function Message(_ref) {
|
|
2640
|
+
var _ref$type = _ref.type,
|
|
2641
|
+
type = _ref$type === void 0 ? 'info' : _ref$type,
|
|
2642
|
+
children = _ref.children,
|
|
2643
|
+
hasNoRadius = _ref.hasNoRadius,
|
|
2644
|
+
centeredText = _ref.centeredText,
|
|
2645
|
+
insets = _ref.insets,
|
|
2646
|
+
onDismiss = _ref.onDismiss;
|
|
2647
|
+
return /*#__PURE__*/jsx(BaseMessage, {
|
|
2648
|
+
insets: insets,
|
|
2649
|
+
hasNoRadius: hasNoRadius,
|
|
2650
|
+
type: type,
|
|
2651
|
+
centeredText: centeredText,
|
|
2652
|
+
onDismiss: onDismiss,
|
|
2653
|
+
children: children
|
|
2654
|
+
});
|
|
2512
2655
|
}
|
|
2513
2656
|
|
|
2514
|
-
var
|
|
2515
|
-
displayName: "StorySection__StyledDemoSection",
|
|
2516
|
-
componentId: "kitt-universal__sc-1b3liv5-3"
|
|
2517
|
-
})(["margin-bottom:64px;"]);
|
|
2657
|
+
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2518
2658
|
|
|
2519
|
-
function
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2659
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2660
|
+
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
2661
|
+
var OverlayPressable = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
2662
|
+
displayName: "Overlay__OverlayPressable",
|
|
2663
|
+
componentId: "kitt-universal__sc-1cz1gbr-0"
|
|
2664
|
+
})(function (_ref) {
|
|
2665
|
+
var theme = _ref.theme;
|
|
2666
|
+
return _objectSpread$3(_objectSpread$3({}, StyleSheet.absoluteFillObject), {}, {
|
|
2667
|
+
backgroundColor: theme.kitt.colors.overlay.dark
|
|
2668
|
+
});
|
|
2669
|
+
});
|
|
2670
|
+
function Overlay(_ref2) {
|
|
2671
|
+
var onPress = _ref2.onPress;
|
|
2672
|
+
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
2673
|
+
accessibilityRole: "none",
|
|
2674
|
+
onPress: onPress,
|
|
2675
|
+
children: /*#__PURE__*/jsx(View, {})
|
|
2527
2676
|
});
|
|
2528
2677
|
}
|
|
2529
2678
|
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
function
|
|
2541
|
-
var children =
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
platform = _ref.platform;
|
|
2545
|
-
if (platform === 'native') return null;
|
|
2546
|
-
return /*#__PURE__*/jsx(StorySection.BlockSection, {
|
|
2547
|
-
testID: state,
|
|
2548
|
-
title: title,
|
|
2549
|
-
children: /*#__PURE__*/jsx("div", {
|
|
2550
|
-
className: state ? "kitt-".concat(state) : undefined,
|
|
2679
|
+
var BodyView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2680
|
+
displayName: "Body__BodyView",
|
|
2681
|
+
componentId: "kitt-universal__sc-17fwpo4-0"
|
|
2682
|
+
})(["padding:", "px ", "px;"], function (_ref) {
|
|
2683
|
+
var theme = _ref.theme;
|
|
2684
|
+
return theme.kitt.spacing * 6;
|
|
2685
|
+
}, function (_ref2) {
|
|
2686
|
+
var theme = _ref2.theme;
|
|
2687
|
+
return theme.kitt.spacing * 4;
|
|
2688
|
+
});
|
|
2689
|
+
function ModalBody(_ref3) {
|
|
2690
|
+
var children = _ref3.children;
|
|
2691
|
+
return /*#__PURE__*/jsx(ScrollView, {
|
|
2692
|
+
children: /*#__PURE__*/jsx(BodyView, {
|
|
2551
2693
|
children: children
|
|
2552
2694
|
})
|
|
2553
2695
|
});
|
|
2554
2696
|
}
|
|
2555
2697
|
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
var
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
var
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
})(["padding:8px 0 16px;"]);
|
|
2571
|
-
var FlexRow = /*#__PURE__*/styled$1(View).withConfig({
|
|
2572
|
-
displayName: "StoryGrid__FlexRow",
|
|
2573
|
-
componentId: "kitt-universal__sc-4z5new-2"
|
|
2574
|
-
})(["flex-direction:row;margin:0 -4px 16px;"]);
|
|
2575
|
-
var FlexCol = /*#__PURE__*/styled$1(View).withConfig({
|
|
2576
|
-
displayName: "StoryGrid__FlexCol",
|
|
2577
|
-
componentId: "kitt-universal__sc-4z5new-3"
|
|
2578
|
-
})(["flex-grow:1;flex-basis:0;margin:0 8px;"]);
|
|
2579
|
-
|
|
2580
|
-
function StoryGridRow(_ref) {
|
|
2581
|
-
var children = _ref.children,
|
|
2582
|
-
_ref$breakpoint = _ref.breakpoint,
|
|
2583
|
-
breakpoint = _ref$breakpoint === void 0 ? 'small' : _ref$breakpoint;
|
|
2584
|
-
|
|
2585
|
-
// eslint-disable-next-line unicorn/expiring-todo-comments
|
|
2586
|
-
// TODO use useBreakpoint instead
|
|
2587
|
-
var _useWindowDimensions = useWindowDimensions(),
|
|
2588
|
-
width = _useWindowDimensions.width;
|
|
2589
|
-
|
|
2590
|
-
var breakpointValue = breakpoint === 'small' ? 480 : 768;
|
|
2591
|
-
|
|
2592
|
-
if (width < breakpointValue) {
|
|
2593
|
-
return /*#__PURE__*/jsx(SmallScreenRow, {
|
|
2594
|
-
children: Children.map(children, function (child) {
|
|
2595
|
-
return /*#__PURE__*/jsx(SmallScreenCol, {
|
|
2596
|
-
children: child
|
|
2597
|
-
});
|
|
2598
|
-
})
|
|
2599
|
-
});
|
|
2600
|
-
}
|
|
2601
|
-
|
|
2602
|
-
return /*#__PURE__*/jsx(FlexRow, {
|
|
2603
|
-
children: Children.map(children, function (child) {
|
|
2604
|
-
return /*#__PURE__*/jsx(FlexCol, {
|
|
2605
|
-
children: child
|
|
2606
|
-
});
|
|
2607
|
-
})
|
|
2698
|
+
var FooterView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2699
|
+
displayName: "Footer__FooterView",
|
|
2700
|
+
componentId: "kitt-universal__sc-1ujq2dc-0"
|
|
2701
|
+
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
2702
|
+
var theme = _ref.theme;
|
|
2703
|
+
return theme.kitt.spacing * 4;
|
|
2704
|
+
}, function (_ref2) {
|
|
2705
|
+
var theme = _ref2.theme;
|
|
2706
|
+
return theme.kitt.colors.separator;
|
|
2707
|
+
});
|
|
2708
|
+
function ModalFooter(_ref3) {
|
|
2709
|
+
var children = _ref3.children;
|
|
2710
|
+
return /*#__PURE__*/jsx(FooterView, {
|
|
2711
|
+
children: children
|
|
2608
2712
|
});
|
|
2609
2713
|
}
|
|
2610
2714
|
|
|
2611
|
-
function
|
|
2612
|
-
var title = _ref2.title,
|
|
2613
|
-
titleColor = _ref2.titleColor,
|
|
2614
|
-
children = _ref2.children,
|
|
2615
|
-
_ref2$platform = _ref2.platform,
|
|
2616
|
-
platform = _ref2$platform === void 0 ? 'all' : _ref2$platform;
|
|
2617
|
-
|
|
2618
|
-
if (platform === 'native') {
|
|
2619
|
-
return null;
|
|
2620
|
-
}
|
|
2715
|
+
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
2621
2716
|
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2717
|
+
var HeaderView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2718
|
+
displayName: "Header__HeaderView",
|
|
2719
|
+
componentId: "kitt-universal__sc-1iwabch-0"
|
|
2720
|
+
})(["position:relative;padding:", "px;display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;align-items:center;border-bottom-width:1px;border-bottom-color:", ";min-height:57px;"], function (_ref) {
|
|
2721
|
+
var theme = _ref.theme;
|
|
2722
|
+
return theme.kitt.spacing * 2;
|
|
2723
|
+
}, function (_ref2) {
|
|
2724
|
+
var theme = _ref2.theme;
|
|
2725
|
+
return theme.kitt.colors.separator;
|
|
2726
|
+
});
|
|
2727
|
+
var LeftIconView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2728
|
+
displayName: "Header__LeftIconView",
|
|
2729
|
+
componentId: "kitt-universal__sc-1iwabch-1"
|
|
2730
|
+
})(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
|
|
2731
|
+
var theme = _ref3.theme;
|
|
2732
|
+
return theme.kitt.spacing * 2;
|
|
2733
|
+
});
|
|
2734
|
+
var RightIconView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2735
|
+
displayName: "Header__RightIconView",
|
|
2736
|
+
componentId: "kitt-universal__sc-1iwabch-2"
|
|
2737
|
+
})(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
|
|
2738
|
+
var theme = _ref4.theme;
|
|
2739
|
+
return theme.kitt.spacing * 2;
|
|
2740
|
+
});
|
|
2741
|
+
var TitleView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2742
|
+
displayName: "Header__TitleView",
|
|
2743
|
+
componentId: "kitt-universal__sc-1iwabch-3"
|
|
2744
|
+
})(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
|
|
2745
|
+
var theme = _ref5.theme,
|
|
2746
|
+
isIconLeft = _ref5.isIconLeft;
|
|
2747
|
+
return isIconLeft ? 0 : theme.kitt.spacing * 2;
|
|
2748
|
+
});
|
|
2749
|
+
function ModalHeader(_ref6) {
|
|
2750
|
+
var left = _ref6.left,
|
|
2751
|
+
right = _ref6.right,
|
|
2752
|
+
children = _ref6.children;
|
|
2753
|
+
var onClose = useContext(OnCloseContext);
|
|
2754
|
+
var isIconLeft = !!left;
|
|
2755
|
+
return /*#__PURE__*/jsxs(HeaderView, {
|
|
2756
|
+
children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
|
|
2757
|
+
children: left
|
|
2758
|
+
}), /*#__PURE__*/jsx(TitleView, {
|
|
2759
|
+
isIconLeft: isIconLeft,
|
|
2760
|
+
children: children
|
|
2761
|
+
}), right !== undefined ? right : /*#__PURE__*/jsx(RightIconView, {
|
|
2762
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
2763
|
+
type: "subtle-dark",
|
|
2764
|
+
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
2765
|
+
onPress: onClose
|
|
2766
|
+
})
|
|
2767
|
+
})]
|
|
2628
2768
|
});
|
|
2629
2769
|
}
|
|
2630
2770
|
|
|
2631
|
-
var
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
};
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
displayName: "Tag__Container",
|
|
2638
|
-
componentId: "kitt-universal__sc-19jmowi-0"
|
|
2639
|
-
})(["background-color:", ";border-width:", "px;border-color:", ";padding:", ";border-radius:", "px;align-self:flex-start;"], function (_ref) {
|
|
2640
|
-
var theme = _ref.theme,
|
|
2641
|
-
type = _ref.type,
|
|
2642
|
-
variant = _ref.variant;
|
|
2643
|
-
return theme.kitt.tag[type][variant].backgroundColor;
|
|
2771
|
+
var ModalView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2772
|
+
displayName: "Modal__ModalView",
|
|
2773
|
+
componentId: "kitt-universal__sc-1xy2w5u-0"
|
|
2774
|
+
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
|
|
2775
|
+
var theme = _ref.theme;
|
|
2776
|
+
return theme.kitt.spacing * 20;
|
|
2644
2777
|
}, function (_ref2) {
|
|
2645
|
-
var theme = _ref2.theme
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
return theme.kitt.
|
|
2778
|
+
var theme = _ref2.theme;
|
|
2779
|
+
return theme.kitt.spacing * 4;
|
|
2780
|
+
});
|
|
2781
|
+
var ContentView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2782
|
+
displayName: "Modal__ContentView",
|
|
2783
|
+
componentId: "kitt-universal__sc-1xy2w5u-1"
|
|
2784
|
+
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], function (_ref3) {
|
|
2785
|
+
var theme = _ref3.theme;
|
|
2786
|
+
return theme.kitt.card.borderRadius;
|
|
2654
2787
|
}, function (_ref4) {
|
|
2655
2788
|
var theme = _ref4.theme;
|
|
2656
|
-
return theme.kitt.
|
|
2657
|
-
}, function (_ref5) {
|
|
2658
|
-
var theme = _ref5.theme;
|
|
2659
|
-
return theme.kitt.tag.borderRadius;
|
|
2789
|
+
return theme.kitt.colors.uiBackgroundLight;
|
|
2660
2790
|
});
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
};
|
|
2684
|
-
function Tag(_ref6) {
|
|
2685
|
-
var label = _ref6.label,
|
|
2686
|
-
_ref6$type = _ref6.type,
|
|
2687
|
-
type = _ref6$type === void 0 ? 'default' : _ref6$type,
|
|
2688
|
-
_ref6$variant = _ref6.variant,
|
|
2689
|
-
variant = _ref6$variant === void 0 ? 'fill' : _ref6$variant;
|
|
2690
|
-
return /*#__PURE__*/jsx(Container, {
|
|
2691
|
-
type: type,
|
|
2692
|
-
variant: variant,
|
|
2693
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
2694
|
-
base: "body-xsmall",
|
|
2695
|
-
color: getLabelColor(type, variant),
|
|
2696
|
-
children: label
|
|
2791
|
+
function Modal(_ref5) {
|
|
2792
|
+
var visible = _ref5.visible,
|
|
2793
|
+
children = _ref5.children,
|
|
2794
|
+
onClose = _ref5.onClose,
|
|
2795
|
+
onEntered = _ref5.onEntered,
|
|
2796
|
+
onExited = _ref5.onExited;
|
|
2797
|
+
return /*#__PURE__*/jsx(OnCloseContext.Provider, {
|
|
2798
|
+
value: onClose,
|
|
2799
|
+
children: /*#__PURE__*/jsx(Modal$1, {
|
|
2800
|
+
transparent: true,
|
|
2801
|
+
animationType: "fade",
|
|
2802
|
+
visible: visible,
|
|
2803
|
+
onShow: onEntered,
|
|
2804
|
+
onDismiss: onExited,
|
|
2805
|
+
onRequestClose: onClose,
|
|
2806
|
+
children: /*#__PURE__*/jsxs(ModalView, {
|
|
2807
|
+
children: [/*#__PURE__*/jsx(Overlay, {
|
|
2808
|
+
onPress: onClose
|
|
2809
|
+
}), /*#__PURE__*/jsx(ContentView, {
|
|
2810
|
+
children: children
|
|
2811
|
+
})]
|
|
2812
|
+
})
|
|
2697
2813
|
})
|
|
2698
2814
|
});
|
|
2699
2815
|
}
|
|
2816
|
+
Modal.Header = ModalHeader;
|
|
2817
|
+
Modal.Body = ModalBody;
|
|
2818
|
+
Modal.Footer = ModalFooter;
|
|
2700
2819
|
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
black1000: '#000000',
|
|
2709
|
-
black800: '#2C293D',
|
|
2710
|
-
black555: '#737373',
|
|
2711
|
-
black200: '#CCCCCC',
|
|
2712
|
-
black100: '#E5E5E5',
|
|
2713
|
-
black50: '#F2F2F2',
|
|
2714
|
-
black25: '#F9F9F9',
|
|
2715
|
-
white: '#FFFFFF',
|
|
2716
|
-
viride: '#38836D',
|
|
2717
|
-
englishVermillon: '#D44148',
|
|
2718
|
-
goldCrayola: '#F8C583',
|
|
2719
|
-
aero: '#89BDDD',
|
|
2720
|
-
transparent: 'transparent',
|
|
2721
|
-
moonPurple: '#DBD6F9',
|
|
2722
|
-
moonPurpleLight1: '#EDEBFC'
|
|
2723
|
-
};
|
|
2820
|
+
function Notification(_ref) {
|
|
2821
|
+
var type = _ref.type,
|
|
2822
|
+
children = _ref.children,
|
|
2823
|
+
centeredText = _ref.centeredText,
|
|
2824
|
+
insets = _ref.insets,
|
|
2825
|
+
onDelete = _ref.onDelete,
|
|
2826
|
+
onDismiss = _ref.onDismiss;
|
|
2724
2827
|
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
accentLight: lateOceanColorPalette.warmEmbraceLight1,
|
|
2730
|
-
success: lateOceanColorPalette.viride,
|
|
2731
|
-
correct: lateOceanColorPalette.viride,
|
|
2732
|
-
danger: lateOceanColorPalette.englishVermillon,
|
|
2733
|
-
info: lateOceanColorPalette.aero,
|
|
2734
|
-
warning: lateOceanColorPalette.goldCrayola,
|
|
2735
|
-
separator: lateOceanColorPalette.black100,
|
|
2736
|
-
hover: lateOceanColorPalette.black100,
|
|
2737
|
-
black: lateOceanColorPalette.black1000,
|
|
2738
|
-
uiBackground: lateOceanColorPalette.black25,
|
|
2739
|
-
uiBackgroundLight: lateOceanColorPalette.white,
|
|
2740
|
-
transparent: lateOceanColorPalette.transparent,
|
|
2741
|
-
disabled: lateOceanColorPalette.black50,
|
|
2742
|
-
overlay: {
|
|
2743
|
-
dark: 'rgba(41, 48, 51, 0.25)',
|
|
2744
|
-
light: 'rgba(255, 255, 255, 0.90)',
|
|
2745
|
-
fullscreenLoader: 'rgba(0, 0, 0, 0.25)'
|
|
2828
|
+
if ((process.env.NODE_ENV !== "production")) {
|
|
2829
|
+
if (onDelete) {
|
|
2830
|
+
throw new Error('onDelete is deprecated us onDismiss instead');
|
|
2831
|
+
}
|
|
2746
2832
|
}
|
|
2747
|
-
};
|
|
2748
2833
|
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2834
|
+
return /*#__PURE__*/jsx(BaseMessage, {
|
|
2835
|
+
hasNoRadius: true,
|
|
2836
|
+
type: type,
|
|
2837
|
+
centeredText: centeredText,
|
|
2838
|
+
insets: insets,
|
|
2839
|
+
onDismiss: onDismiss,
|
|
2840
|
+
children: children
|
|
2841
|
+
});
|
|
2842
|
+
}
|
|
2843
|
+
|
|
2844
|
+
var StyledSkeleton = withTheme( /*#__PURE__*/styled("div")({
|
|
2845
|
+
name: "StyledSkeleton",
|
|
2846
|
+
"class": "sc3upcl",
|
|
2847
|
+
vars: {
|
|
2848
|
+
"sc3upcl-0": [function (_ref) {
|
|
2849
|
+
var theme = _ref.theme;
|
|
2850
|
+
return theme.kitt.skeleton.backgroundColor;
|
|
2851
|
+
}],
|
|
2852
|
+
"sc3upcl-1": [function (_ref2) {
|
|
2853
|
+
var $isLoading = _ref2.$isLoading,
|
|
2854
|
+
theme = _ref2.theme;
|
|
2855
|
+
return $isLoading ? "linear-gradient(\n -90deg,\n ".concat(theme.kitt.skeleton.backgroundColor, ",\n ").concat(theme.kitt.skeleton.flareColor, " 50%,\n ").concat(theme.kitt.skeleton.backgroundColor, " 100%\n )") : 'none';
|
|
2856
|
+
}],
|
|
2857
|
+
"sc3upcl-2": [function (_ref3) {
|
|
2858
|
+
var $isLoading = _ref3.$isLoading;
|
|
2859
|
+
return $isLoading ? '1s ease-in-out infinite' : 'none';
|
|
2860
|
+
}]
|
|
2756
2861
|
}
|
|
2757
|
-
};
|
|
2862
|
+
}));
|
|
2863
|
+
function SkeletonContent(_ref4) {
|
|
2864
|
+
var isLoading = _ref4.isLoading;
|
|
2865
|
+
return /*#__PURE__*/jsx(StyledSkeleton, {
|
|
2866
|
+
$isLoading: isLoading
|
|
2867
|
+
});
|
|
2868
|
+
}
|
|
2758
2869
|
|
|
2759
|
-
var
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2870
|
+
var SkeletonContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
2871
|
+
displayName: "Skeleton__SkeletonContainer",
|
|
2872
|
+
componentId: "kitt-universal__sc-1w5cm3i-0"
|
|
2873
|
+
})(["overflow:hidden;"]);
|
|
2874
|
+
function Skeleton(_ref) {
|
|
2875
|
+
var isLoading = _ref.isLoading,
|
|
2876
|
+
style = _ref.style;
|
|
2877
|
+
|
|
2878
|
+
var _useState = useState(0),
|
|
2879
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2880
|
+
width = _useState2[0],
|
|
2881
|
+
setWidth = _useState2[1];
|
|
2882
|
+
|
|
2883
|
+
return /*#__PURE__*/jsx(SkeletonContainer, {
|
|
2884
|
+
style: style,
|
|
2885
|
+
onLayout: function onLayout(_ref2) {
|
|
2886
|
+
var nativeEvent = _ref2.nativeEvent;
|
|
2887
|
+
return setWidth(nativeEvent.layout.width);
|
|
2773
2888
|
},
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
disabled: {
|
|
2824
|
-
backgroundColor: colors.disabled,
|
|
2825
|
-
pressedBackgroundColor: colors.disabled,
|
|
2826
|
-
hoverBackgroundColor: colors.disabled,
|
|
2827
|
-
focusBorderColor: lateOceanColorPalette.black100,
|
|
2828
|
-
borderColor: lateOceanColorPalette.black100
|
|
2889
|
+
children: /*#__PURE__*/jsx(SkeletonContent, {
|
|
2890
|
+
isLoading: isLoading,
|
|
2891
|
+
width: width
|
|
2892
|
+
})
|
|
2893
|
+
});
|
|
2894
|
+
}
|
|
2895
|
+
var Bar = /*#__PURE__*/styled$1(Skeleton).withConfig({
|
|
2896
|
+
displayName: "Skeleton__Bar",
|
|
2897
|
+
componentId: "kitt-universal__sc-1w5cm3i-1"
|
|
2898
|
+
})(["width:100%;height:", "px;border-radius:", "px;"], function (_ref3) {
|
|
2899
|
+
var theme = _ref3.theme;
|
|
2900
|
+
return theme.kitt.spacing * 2;
|
|
2901
|
+
}, function (_ref4) {
|
|
2902
|
+
var theme = _ref4.theme;
|
|
2903
|
+
return theme.kitt.spacing * 2;
|
|
2904
|
+
});
|
|
2905
|
+
var Circle = /*#__PURE__*/styled$1(Skeleton).withConfig({
|
|
2906
|
+
displayName: "Skeleton__Circle",
|
|
2907
|
+
componentId: "kitt-universal__sc-1w5cm3i-2"
|
|
2908
|
+
})(["width:", "px;height:", "px;border-radius:", "px;"], function (_ref5) {
|
|
2909
|
+
var theme = _ref5.theme;
|
|
2910
|
+
return theme.kitt.spacing * 12;
|
|
2911
|
+
}, function (_ref6) {
|
|
2912
|
+
var theme = _ref6.theme;
|
|
2913
|
+
return theme.kitt.spacing * 12;
|
|
2914
|
+
}, function (_ref7) {
|
|
2915
|
+
var theme = _ref7.theme;
|
|
2916
|
+
return theme.kitt.spacing * 6;
|
|
2917
|
+
});
|
|
2918
|
+
var Square = /*#__PURE__*/styled$1(Skeleton).withConfig({
|
|
2919
|
+
displayName: "Skeleton__Square",
|
|
2920
|
+
componentId: "kitt-universal__sc-1w5cm3i-3"
|
|
2921
|
+
})(["width:", "px;height:", "px;border-radius:", "px;"], function (_ref8) {
|
|
2922
|
+
var theme = _ref8.theme;
|
|
2923
|
+
return theme.kitt.spacing * 12;
|
|
2924
|
+
}, function (_ref9) {
|
|
2925
|
+
var theme = _ref9.theme;
|
|
2926
|
+
return theme.kitt.spacing * 12;
|
|
2927
|
+
}, function (_ref10) {
|
|
2928
|
+
var theme = _ref10.theme;
|
|
2929
|
+
return theme.kitt.spacing * 1.5;
|
|
2930
|
+
});
|
|
2931
|
+
Skeleton.Bar = Bar;
|
|
2932
|
+
Skeleton.Circle = Circle;
|
|
2933
|
+
Skeleton.Square = Square;
|
|
2934
|
+
|
|
2935
|
+
var Flex = /*#__PURE__*/styled$1(View).withConfig({
|
|
2936
|
+
shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
|
|
2937
|
+
return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
|
|
2829
2938
|
}
|
|
2830
|
-
}
|
|
2939
|
+
}).withConfig({
|
|
2940
|
+
displayName: "Flex",
|
|
2941
|
+
componentId: "kitt-universal__sc-15q3v3h-0"
|
|
2942
|
+
})(["display:flex;flex-direction:", ";flex-wrap:wrap;padding:", "px;"], function (_ref) {
|
|
2943
|
+
var direction = _ref.direction;
|
|
2944
|
+
return direction;
|
|
2945
|
+
}, function (_ref2) {
|
|
2946
|
+
var theme = _ref2.theme,
|
|
2947
|
+
_ref2$padding = _ref2.padding,
|
|
2948
|
+
padding = _ref2$padding === void 0 ? 0 : _ref2$padding;
|
|
2949
|
+
return padding * theme.kitt.spacing;
|
|
2950
|
+
});
|
|
2831
2951
|
|
|
2832
|
-
var
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2952
|
+
var storyPadding = 16;
|
|
2953
|
+
|
|
2954
|
+
var getBackgroundColorFromBlockColor = function (theme) {
|
|
2955
|
+
var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'transparent';
|
|
2956
|
+
|
|
2957
|
+
switch (color) {
|
|
2958
|
+
case 'dark':
|
|
2959
|
+
return '#293033';
|
|
2960
|
+
|
|
2961
|
+
case 'light':
|
|
2962
|
+
return '#ffffff';
|
|
2963
|
+
|
|
2964
|
+
case 'primary':
|
|
2965
|
+
return theme.kitt.palettes.lateOcean.lateOcean;
|
|
2966
|
+
|
|
2967
|
+
default:
|
|
2968
|
+
return 'transparent';
|
|
2846
2969
|
}
|
|
2847
2970
|
};
|
|
2848
2971
|
|
|
2849
|
-
var
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
backgroundColor: colors.warning
|
|
2972
|
+
var getTypographyColorFromBlockColor = function () {
|
|
2973
|
+
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transparent';
|
|
2974
|
+
|
|
2975
|
+
switch (color) {
|
|
2976
|
+
case 'dark':
|
|
2977
|
+
case 'primary':
|
|
2978
|
+
return 'white';
|
|
2979
|
+
|
|
2980
|
+
case 'light':
|
|
2981
|
+
default:
|
|
2982
|
+
return 'black';
|
|
2861
2983
|
}
|
|
2862
2984
|
};
|
|
2863
2985
|
|
|
2864
|
-
var
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
var
|
|
2868
|
-
return
|
|
2869
|
-
baseAndSmall: {
|
|
2870
|
-
fontSize: baseAndSmallFontSize,
|
|
2871
|
-
lineHeight: calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)
|
|
2872
|
-
},
|
|
2873
|
-
mediumAndWide: {
|
|
2874
|
-
fontSize: mediumAndWideFontSize,
|
|
2875
|
-
lineHeight: calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)
|
|
2876
|
-
}
|
|
2877
|
-
};
|
|
2878
|
-
};
|
|
2879
|
-
var typography = {
|
|
2880
|
-
colors: {
|
|
2881
|
-
black: lateOceanColorPalette.black1000,
|
|
2882
|
-
'black-anthracite': lateOceanColorPalette.black800,
|
|
2883
|
-
'black-light': lateOceanColorPalette.black555,
|
|
2884
|
-
white: lateOceanColorPalette.white,
|
|
2885
|
-
'white-light': lateOceanColorPalette.white,
|
|
2886
|
-
primary: lateOceanColorPalette.lateOcean,
|
|
2887
|
-
'primary-light': lateOceanColorPalette.lateOceanLight1,
|
|
2888
|
-
accent: lateOceanColorPalette.warmEmbrace,
|
|
2889
|
-
success: lateOceanColorPalette.viride,
|
|
2890
|
-
danger: lateOceanColorPalette.englishVermillon
|
|
2891
|
-
},
|
|
2892
|
-
types: {
|
|
2893
|
-
headers: {
|
|
2894
|
-
fontFamily: {
|
|
2895
|
-
regular: 'Moderat',
|
|
2896
|
-
bold: 'Moderat'
|
|
2897
|
-
},
|
|
2898
|
-
fontWeight: 400,
|
|
2899
|
-
fontStyle: 'normal',
|
|
2900
|
-
configs: {
|
|
2901
|
-
// also known as xxlarge
|
|
2902
|
-
header1: createTypographyTypeConfig(1.3, 38, 62),
|
|
2903
|
-
// also known as xlarge
|
|
2904
|
-
header2: createTypographyTypeConfig(1.3, 32, 48),
|
|
2905
|
-
// also known as medium
|
|
2906
|
-
header3: createTypographyTypeConfig(1.3, 24, 36),
|
|
2907
|
-
// also known as xsmall
|
|
2908
|
-
header4: createTypographyTypeConfig(1.3, 18, 24),
|
|
2909
|
-
// also known as xxsmall
|
|
2910
|
-
header5: createTypographyTypeConfig(1.3, 18, 18)
|
|
2911
|
-
}
|
|
2912
|
-
},
|
|
2913
|
-
bodies: {
|
|
2914
|
-
fontFamily: {
|
|
2915
|
-
regular: 'Noto Sans',
|
|
2916
|
-
bold: 'Noto Sans'
|
|
2917
|
-
},
|
|
2918
|
-
fontWeight: {
|
|
2919
|
-
regular: 400,
|
|
2920
|
-
bold: 700
|
|
2921
|
-
},
|
|
2922
|
-
fontStyle: {
|
|
2923
|
-
regular: 'normal',
|
|
2924
|
-
bold: 'normal'
|
|
2925
|
-
},
|
|
2926
|
-
configs: {
|
|
2927
|
-
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
2928
|
-
'body-medium': createTypographyTypeConfig(1.6, 18, 18),
|
|
2929
|
-
body: createTypographyTypeConfig(1.6, 16, 16),
|
|
2930
|
-
'body-small': createTypographyTypeConfig(1.6, 14, 14),
|
|
2931
|
-
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
2932
|
-
}
|
|
2933
|
-
}
|
|
2934
|
-
},
|
|
2935
|
-
link: {
|
|
2936
|
-
disabledColor: lateOceanColorPalette.black200
|
|
2937
|
-
}
|
|
2986
|
+
var StoryBlockBackgroundContext = /*#__PURE__*/createContext('transparent');
|
|
2987
|
+
var StoryBlockColorContext = /*#__PURE__*/createContext('black');
|
|
2988
|
+
var useStoryBlockColor = function (color) {
|
|
2989
|
+
var storyBlockColor = useContext(StoryBlockColorContext);
|
|
2990
|
+
return color || storyBlockColor;
|
|
2938
2991
|
};
|
|
2992
|
+
var StyledStoryBlockView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2993
|
+
displayName: "StoryBlock__StyledStoryBlockView",
|
|
2994
|
+
componentId: "kitt-universal__sc-3w4hdm-0"
|
|
2995
|
+
})(["padding:16px ", "px 0;margin:0 -", "px;background:", ";"], storyPadding, storyPadding, function (_ref) {
|
|
2996
|
+
var theme = _ref.theme,
|
|
2997
|
+
background = _ref.background;
|
|
2998
|
+
return getBackgroundColorFromBlockColor(theme, background);
|
|
2999
|
+
});
|
|
3000
|
+
function StoryBlock(_ref2) {
|
|
3001
|
+
var children = _ref2.children,
|
|
3002
|
+
background = _ref2.background;
|
|
3003
|
+
return /*#__PURE__*/jsx(StyledStoryBlockView, {
|
|
3004
|
+
background: background,
|
|
3005
|
+
children: /*#__PURE__*/jsx(StoryBlockColorContext.Provider, {
|
|
3006
|
+
value: getTypographyColorFromBlockColor(background),
|
|
3007
|
+
children: /*#__PURE__*/jsx(StoryBlockBackgroundContext.Provider, {
|
|
3008
|
+
value: background,
|
|
3009
|
+
children: children
|
|
3010
|
+
})
|
|
3011
|
+
})
|
|
3012
|
+
});
|
|
3013
|
+
}
|
|
2939
3014
|
|
|
2940
|
-
var
|
|
2941
|
-
"
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
color: 'black'
|
|
2963
|
-
},
|
|
2964
|
-
disabled: {
|
|
2965
|
-
backgroundColor: colors.disabled,
|
|
2966
|
-
borderColor: colors.separator,
|
|
2967
|
-
color: 'black-light'
|
|
2968
|
-
},
|
|
2969
|
-
invalid: {
|
|
2970
|
-
borderColor: colors.separator,
|
|
2971
|
-
color: 'black'
|
|
2972
|
-
}
|
|
2973
|
-
};
|
|
2974
|
-
var input = {
|
|
2975
|
-
color: {
|
|
2976
|
-
selection: colors.primary,
|
|
2977
|
-
placeholder: typography.colors['black-light']
|
|
2978
|
-
},
|
|
2979
|
-
borderWidth: 2,
|
|
2980
|
-
borderRadius: 10,
|
|
2981
|
-
icon: {
|
|
2982
|
-
size: 20
|
|
2983
|
-
},
|
|
2984
|
-
padding: {
|
|
2985
|
-
"default": '5px 16px',
|
|
2986
|
-
iOSSingleLine: '7px 16px'
|
|
2987
|
-
},
|
|
2988
|
-
transition: {
|
|
2989
|
-
property: 'border-color',
|
|
2990
|
-
duration: '200ms',
|
|
2991
|
-
timingFunction: 'ease-in-out'
|
|
2992
|
-
},
|
|
2993
|
-
states: inputStatesStyle
|
|
2994
|
-
};
|
|
3015
|
+
var StoryTitleContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
3016
|
+
displayName: "StoryTitle__StoryTitleContainer",
|
|
3017
|
+
componentId: "kitt-universal__sc-sic7hb-0"
|
|
3018
|
+
})(["margin-bottom:30px;"]);
|
|
3019
|
+
var StorySubTitleContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
3020
|
+
displayName: "StoryTitle__StorySubTitleContainer",
|
|
3021
|
+
componentId: "kitt-universal__sc-sic7hb-1"
|
|
3022
|
+
})(["margin-bottom:10px;"]);
|
|
3023
|
+
function StoryTitle(_ref) {
|
|
3024
|
+
var color = _ref.color,
|
|
3025
|
+
children = _ref.children,
|
|
3026
|
+
numberOfLines = _ref.numberOfLines;
|
|
3027
|
+
return /*#__PURE__*/jsx(StoryTitleContainer, {
|
|
3028
|
+
children: /*#__PURE__*/jsx(Typography.Header1, {
|
|
3029
|
+
variant: "bold",
|
|
3030
|
+
base: "header1",
|
|
3031
|
+
color: useStoryBlockColor(color),
|
|
3032
|
+
numberOfLines: numberOfLines,
|
|
3033
|
+
children: children
|
|
3034
|
+
})
|
|
3035
|
+
});
|
|
3036
|
+
}
|
|
2995
3037
|
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3038
|
+
function StoryTitleLevel2(_ref2) {
|
|
3039
|
+
var color = _ref2.color,
|
|
3040
|
+
children = _ref2.children,
|
|
3041
|
+
numberOfLines = _ref2.numberOfLines;
|
|
3042
|
+
return /*#__PURE__*/jsx(StoryTitleContainer, {
|
|
3043
|
+
children: /*#__PURE__*/jsx(Typography.Header2, {
|
|
3044
|
+
variant: "bold",
|
|
3045
|
+
base: "header2",
|
|
3046
|
+
color: useStoryBlockColor(color),
|
|
3047
|
+
numberOfLines: numberOfLines,
|
|
3048
|
+
children: children
|
|
3049
|
+
})
|
|
3050
|
+
});
|
|
3051
|
+
}
|
|
3000
3052
|
|
|
3001
|
-
|
|
3002
|
-
size: 18,
|
|
3003
|
-
unchecked: {
|
|
3004
|
-
backgroundColor: colors.uiBackgroundLight,
|
|
3005
|
-
borderWidth: 2,
|
|
3006
|
-
borderColor: lateOceanColorPalette.black200
|
|
3007
|
-
},
|
|
3008
|
-
checked: {
|
|
3009
|
-
backgroundColor: colors.primary,
|
|
3010
|
-
innerSize: 5,
|
|
3011
|
-
innerBackgroundColor: colors.uiBackgroundLight
|
|
3012
|
-
},
|
|
3013
|
-
disabled: {
|
|
3014
|
-
backgroundColor: colors.disabled,
|
|
3015
|
-
borderColor: colors.separator
|
|
3016
|
-
}
|
|
3017
|
-
};
|
|
3053
|
+
StoryTitleLevel2.displayName = 'StoryTitle.Level2';
|
|
3018
3054
|
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3055
|
+
function StoryTitleLevel3(_ref3) {
|
|
3056
|
+
var color = _ref3.color,
|
|
3057
|
+
children = _ref3.children,
|
|
3058
|
+
numberOfLines = _ref3.numberOfLines;
|
|
3059
|
+
return /*#__PURE__*/jsx(StorySubTitleContainer, {
|
|
3060
|
+
children: /*#__PURE__*/jsx(Typography.Header3, {
|
|
3061
|
+
variant: "bold",
|
|
3062
|
+
base: "header3",
|
|
3063
|
+
medium: "header4",
|
|
3064
|
+
color: useStoryBlockColor(color),
|
|
3065
|
+
numberOfLines: numberOfLines,
|
|
3066
|
+
children: children
|
|
3067
|
+
})
|
|
3068
|
+
});
|
|
3069
|
+
}
|
|
3022
3070
|
|
|
3023
|
-
|
|
3024
|
-
input: input,
|
|
3025
|
-
radio: radio,
|
|
3026
|
-
inputField: inputField,
|
|
3027
|
-
textArea: textArea
|
|
3028
|
-
};
|
|
3071
|
+
StoryTitleLevel3.displayName = 'StoryTitle.Level3';
|
|
3029
3072
|
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3073
|
+
function StoryTitleLevel4(_ref4) {
|
|
3074
|
+
var color = _ref4.color,
|
|
3075
|
+
children = _ref4.children,
|
|
3076
|
+
numberOfLines = _ref4.numberOfLines;
|
|
3077
|
+
return /*#__PURE__*/jsx(StorySubTitleContainer, {
|
|
3078
|
+
children: /*#__PURE__*/jsx(Typography.Header4, {
|
|
3079
|
+
variant: "bold",
|
|
3080
|
+
base: "header4",
|
|
3081
|
+
medium: "header5",
|
|
3082
|
+
color: useStoryBlockColor(color),
|
|
3083
|
+
numberOfLines: numberOfLines,
|
|
3084
|
+
children: children
|
|
3085
|
+
})
|
|
3086
|
+
});
|
|
3087
|
+
}
|
|
3088
|
+
|
|
3089
|
+
StoryTitleLevel4.displayName = 'StoryTitle.Level3';
|
|
3090
|
+
StoryTitle.Level2 = StoryTitleLevel2;
|
|
3091
|
+
StoryTitle.Level3 = StoryTitleLevel3;
|
|
3092
|
+
StoryTitle.Level4 = StoryTitleLevel4;
|
|
3093
|
+
|
|
3094
|
+
var StoryContainer$1 = /*#__PURE__*/styled$1(ScrollView).withConfig({
|
|
3095
|
+
displayName: "Story__StoryContainer",
|
|
3096
|
+
componentId: "kitt-universal__sc-1kwdg2p-0"
|
|
3097
|
+
})(["padding:", "px;"], storyPadding);
|
|
3098
|
+
function Story(_ref) {
|
|
3099
|
+
var title = _ref.title,
|
|
3100
|
+
contentContainerStyle = _ref.contentContainerStyle,
|
|
3101
|
+
children = _ref.children;
|
|
3102
|
+
return /*#__PURE__*/jsxs(StoryContainer$1, {
|
|
3103
|
+
contentContainerStyle: contentContainerStyle,
|
|
3104
|
+
children: [/*#__PURE__*/jsx(StoryTitle, {
|
|
3105
|
+
children: title
|
|
3106
|
+
}), children]
|
|
3107
|
+
});
|
|
3108
|
+
}
|
|
3109
|
+
|
|
3110
|
+
var _excluded$2 = ["title", "children", "internalIsDemoSection"],
|
|
3111
|
+
_excluded2 = ["title", "children"],
|
|
3112
|
+
_excluded3 = ["title", "children"];
|
|
3113
|
+
|
|
3114
|
+
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3115
|
+
|
|
3116
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3117
|
+
var StyledSection = /*#__PURE__*/styled$1(View).withConfig({
|
|
3118
|
+
displayName: "StorySection__StyledSection",
|
|
3119
|
+
componentId: "kitt-universal__sc-1b3liv5-0"
|
|
3120
|
+
})(["margin-bottom:32px;"]);
|
|
3121
|
+
function StorySection(_ref) {
|
|
3122
|
+
var title = _ref.title,
|
|
3123
|
+
children = _ref.children,
|
|
3124
|
+
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
3125
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
3126
|
+
|
|
3127
|
+
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
3128
|
+
return /*#__PURE__*/jsxs(StyledSection, _objectSpread$2(_objectSpread$2({}, props), {}, {
|
|
3129
|
+
children: [/*#__PURE__*/jsx(StoryTitle.Level2, {
|
|
3130
|
+
children: title
|
|
3131
|
+
}), children]
|
|
3132
|
+
}));
|
|
3133
|
+
}
|
|
3134
|
+
var StyledSubSection = /*#__PURE__*/styled$1(View).withConfig({
|
|
3135
|
+
displayName: "StorySection__StyledSubSection",
|
|
3136
|
+
componentId: "kitt-universal__sc-1b3liv5-1"
|
|
3137
|
+
})(["margin-bottom:16px;"]);
|
|
3138
|
+
|
|
3139
|
+
function SubSection(_ref2) {
|
|
3140
|
+
var title = _ref2.title,
|
|
3141
|
+
children = _ref2.children,
|
|
3142
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
3143
|
+
|
|
3144
|
+
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread$2(_objectSpread$2({}, props), {}, {
|
|
3145
|
+
children: [/*#__PURE__*/jsx(StoryTitle.Level3, {
|
|
3146
|
+
children: title
|
|
3147
|
+
}), children]
|
|
3148
|
+
}));
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3151
|
+
var StyledBlockSection = /*#__PURE__*/styled$1(View).withConfig({
|
|
3152
|
+
displayName: "StorySection__StyledBlockSection",
|
|
3153
|
+
componentId: "kitt-universal__sc-1b3liv5-2"
|
|
3154
|
+
})(["margin-bottom:16px;"]);
|
|
3155
|
+
|
|
3156
|
+
function BlockSection(_ref3) {
|
|
3157
|
+
var title = _ref3.title,
|
|
3158
|
+
children = _ref3.children,
|
|
3159
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
3160
|
+
|
|
3161
|
+
return /*#__PURE__*/jsxs(StyledBlockSection, _objectSpread$2(_objectSpread$2({}, props), {}, {
|
|
3162
|
+
children: [/*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
3163
|
+
children: title
|
|
3164
|
+
}), children]
|
|
3165
|
+
}));
|
|
3166
|
+
}
|
|
3167
|
+
|
|
3168
|
+
var StyledDemoSection = /*#__PURE__*/styled$1(View).withConfig({
|
|
3169
|
+
displayName: "StorySection__StyledDemoSection",
|
|
3170
|
+
componentId: "kitt-universal__sc-1b3liv5-3"
|
|
3171
|
+
})(["margin-bottom:64px;"]);
|
|
3172
|
+
|
|
3173
|
+
function DemoSection(_ref4) {
|
|
3174
|
+
var children = _ref4.children;
|
|
3175
|
+
return /*#__PURE__*/jsx(StyledDemoSection, {
|
|
3176
|
+
children: /*#__PURE__*/jsx(StorySection, {
|
|
3177
|
+
internalIsDemoSection: true,
|
|
3178
|
+
title: "Demo",
|
|
3179
|
+
children: children
|
|
3180
|
+
})
|
|
3181
|
+
});
|
|
3182
|
+
}
|
|
3183
|
+
|
|
3184
|
+
StorySection.SubSection = SubSection;
|
|
3185
|
+
StorySection.BlockSection = BlockSection;
|
|
3186
|
+
/** @deprecated use StorySection.Demo instead */
|
|
3187
|
+
|
|
3188
|
+
StorySection.DemoSection = DemoSection;
|
|
3189
|
+
StorySection.Demo = DemoSection;
|
|
3190
|
+
/** @deprecated use StorySection instead */
|
|
3191
|
+
|
|
3192
|
+
var DeprecatedSection = StorySection;
|
|
3193
|
+
|
|
3194
|
+
function StoryContainer(_ref) {
|
|
3195
|
+
var children = _ref.children,
|
|
3196
|
+
state = _ref.state,
|
|
3197
|
+
title = _ref.title,
|
|
3198
|
+
platform = _ref.platform;
|
|
3199
|
+
if (platform === 'native') return null;
|
|
3200
|
+
return /*#__PURE__*/jsx(StorySection.BlockSection, {
|
|
3201
|
+
testID: state,
|
|
3202
|
+
title: title,
|
|
3203
|
+
children: /*#__PURE__*/jsx("div", {
|
|
3204
|
+
className: state ? "kitt-".concat(state) : undefined,
|
|
3205
|
+
children: children
|
|
3206
|
+
})
|
|
3207
|
+
});
|
|
3208
|
+
}
|
|
3209
|
+
|
|
3210
|
+
function StoryDecorator(storyFn, context) {
|
|
3211
|
+
return /*#__PURE__*/jsx(Story, {
|
|
3212
|
+
title: context.name,
|
|
3213
|
+
children: storyFn()
|
|
3214
|
+
});
|
|
3215
|
+
}
|
|
3216
|
+
|
|
3217
|
+
var SmallScreenRow = /*#__PURE__*/styled$1(View).withConfig({
|
|
3218
|
+
displayName: "StoryGrid__SmallScreenRow",
|
|
3219
|
+
componentId: "kitt-universal__sc-4z5new-0"
|
|
3220
|
+
})(["flex-direction:column;margin:0;"]);
|
|
3221
|
+
var SmallScreenCol = /*#__PURE__*/styled$1(View).withConfig({
|
|
3222
|
+
displayName: "StoryGrid__SmallScreenCol",
|
|
3223
|
+
componentId: "kitt-universal__sc-4z5new-1"
|
|
3224
|
+
})(["padding:8px 0 16px;"]);
|
|
3225
|
+
var FlexRow = /*#__PURE__*/styled$1(View).withConfig({
|
|
3226
|
+
displayName: "StoryGrid__FlexRow",
|
|
3227
|
+
componentId: "kitt-universal__sc-4z5new-2"
|
|
3228
|
+
})(["flex-direction:row;margin:0 -4px 16px;"]);
|
|
3229
|
+
var FlexCol = /*#__PURE__*/styled$1(View).withConfig({
|
|
3230
|
+
displayName: "StoryGrid__FlexCol",
|
|
3231
|
+
componentId: "kitt-universal__sc-4z5new-3"
|
|
3232
|
+
})(["flex-grow:1;flex-basis:0;margin:0 8px;"]);
|
|
3233
|
+
|
|
3234
|
+
function StoryGridRow(_ref) {
|
|
3235
|
+
var children = _ref.children,
|
|
3236
|
+
_ref$breakpoint = _ref.breakpoint,
|
|
3237
|
+
breakpoint = _ref$breakpoint === void 0 ? 'small' : _ref$breakpoint;
|
|
3238
|
+
|
|
3239
|
+
// eslint-disable-next-line unicorn/expiring-todo-comments
|
|
3240
|
+
// TODO use useBreakpoint instead
|
|
3241
|
+
var _useWindowDimensions = useWindowDimensions(),
|
|
3242
|
+
width = _useWindowDimensions.width;
|
|
3243
|
+
|
|
3244
|
+
var breakpointValue = breakpoint === 'small' ? 480 : 768;
|
|
3245
|
+
|
|
3246
|
+
if (width < breakpointValue) {
|
|
3247
|
+
return /*#__PURE__*/jsx(SmallScreenRow, {
|
|
3248
|
+
children: Children.map(children, function (child) {
|
|
3249
|
+
return /*#__PURE__*/jsx(SmallScreenCol, {
|
|
3250
|
+
children: child
|
|
3251
|
+
});
|
|
3252
|
+
})
|
|
3253
|
+
});
|
|
3035
3254
|
}
|
|
3036
|
-
};
|
|
3037
3255
|
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
medium: {
|
|
3057
|
-
hover: 1.05
|
|
3058
|
-
}
|
|
3059
|
-
},
|
|
3060
|
-
disabled: {
|
|
3061
|
-
scale: 1,
|
|
3062
|
-
backgroundColor: button.disabled.backgroundColor,
|
|
3063
|
-
borderColor: button.disabled.borderColor
|
|
3064
|
-
},
|
|
3065
|
-
"default": {
|
|
3066
|
-
pressedBackgroundColor: button["default"].pressedBackgroundColor
|
|
3067
|
-
},
|
|
3068
|
-
white: {
|
|
3069
|
-
pressedBackgroundColor: button.white.hoverBackgroundColor
|
|
3256
|
+
return /*#__PURE__*/jsx(FlexRow, {
|
|
3257
|
+
children: Children.map(children, function (child) {
|
|
3258
|
+
return /*#__PURE__*/jsx(FlexCol, {
|
|
3259
|
+
children: child
|
|
3260
|
+
});
|
|
3261
|
+
})
|
|
3262
|
+
});
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
function StoryGridCol(_ref2) {
|
|
3266
|
+
var title = _ref2.title,
|
|
3267
|
+
titleColor = _ref2.titleColor,
|
|
3268
|
+
children = _ref2.children,
|
|
3269
|
+
_ref2$platform = _ref2.platform,
|
|
3270
|
+
platform = _ref2$platform === void 0 ? 'all' : _ref2$platform;
|
|
3271
|
+
|
|
3272
|
+
if (platform === 'native') {
|
|
3273
|
+
return null;
|
|
3070
3274
|
}
|
|
3071
|
-
};
|
|
3072
3275
|
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
}
|
|
3276
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
3277
|
+
children: [title ? /*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
3278
|
+
numberOfLines: 1,
|
|
3279
|
+
color: titleColor,
|
|
3280
|
+
children: title
|
|
3281
|
+
}) : null, children]
|
|
3282
|
+
});
|
|
3283
|
+
}
|
|
3079
3284
|
|
|
3080
|
-
var
|
|
3081
|
-
|
|
3285
|
+
var StoryGrid = {
|
|
3286
|
+
Row: StoryGridRow,
|
|
3287
|
+
Col: StoryGridCol
|
|
3082
3288
|
};
|
|
3083
3289
|
|
|
3084
|
-
var
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3290
|
+
var Container = /*#__PURE__*/styled$1(View).withConfig({
|
|
3291
|
+
displayName: "Tag__Container",
|
|
3292
|
+
componentId: "kitt-universal__sc-19jmowi-0"
|
|
3293
|
+
})(["background-color:", ";border-width:", "px;border-color:", ";padding:", ";border-radius:", "px;align-self:flex-start;"], function (_ref) {
|
|
3294
|
+
var theme = _ref.theme,
|
|
3295
|
+
type = _ref.type,
|
|
3296
|
+
variant = _ref.variant;
|
|
3297
|
+
return theme.kitt.tag[type][variant].backgroundColor;
|
|
3298
|
+
}, function (_ref2) {
|
|
3299
|
+
var theme = _ref2.theme,
|
|
3300
|
+
type = _ref2.type,
|
|
3301
|
+
variant = _ref2.variant;
|
|
3302
|
+
return theme.kitt.tag[type][variant].borderWidth;
|
|
3303
|
+
}, function (_ref3) {
|
|
3304
|
+
var theme = _ref3.theme,
|
|
3305
|
+
type = _ref3.type,
|
|
3306
|
+
variant = _ref3.variant;
|
|
3307
|
+
return theme.kitt.tag[type][variant].borderColor;
|
|
3308
|
+
}, function (_ref4) {
|
|
3309
|
+
var theme = _ref4.theme;
|
|
3310
|
+
return theme.kitt.tag.padding;
|
|
3311
|
+
}, function (_ref5) {
|
|
3312
|
+
var theme = _ref5.theme;
|
|
3313
|
+
return theme.kitt.tag.borderRadius;
|
|
3314
|
+
});
|
|
3315
|
+
var getLabelColor = function (type, variant) {
|
|
3316
|
+
switch (type) {
|
|
3317
|
+
case 'danger':
|
|
3318
|
+
{
|
|
3319
|
+
return variant === 'outline' ? 'danger' : 'black';
|
|
3320
|
+
}
|
|
3089
3321
|
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
fill: {
|
|
3095
|
-
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
3096
|
-
borderWidth: 0,
|
|
3097
|
-
borderColor: colors.transparent
|
|
3098
|
-
},
|
|
3099
|
-
outline: {
|
|
3100
|
-
backgroundColor: colors.transparent,
|
|
3101
|
-
borderWidth: 1,
|
|
3102
|
-
borderColor: colors.primary
|
|
3103
|
-
}
|
|
3104
|
-
},
|
|
3105
|
-
"default": {
|
|
3106
|
-
fill: {
|
|
3107
|
-
backgroundColor: lateOceanColorPalette.black50,
|
|
3108
|
-
borderWidth: 0,
|
|
3109
|
-
borderColor: colors.transparent
|
|
3110
|
-
},
|
|
3111
|
-
outline: {
|
|
3112
|
-
backgroundColor: colors.transparent,
|
|
3113
|
-
borderWidth: 1,
|
|
3114
|
-
borderColor: colors.black
|
|
3115
|
-
}
|
|
3116
|
-
},
|
|
3117
|
-
danger: {
|
|
3118
|
-
fill: {
|
|
3119
|
-
backgroundColor: lateOceanColorPalette.warmEmbrace,
|
|
3120
|
-
borderWidth: 0,
|
|
3121
|
-
borderColor: colors.transparent
|
|
3122
|
-
},
|
|
3123
|
-
outline: {
|
|
3124
|
-
backgroundColor: colors.transparent,
|
|
3125
|
-
borderWidth: 1,
|
|
3126
|
-
borderColor: colors.danger
|
|
3127
|
-
}
|
|
3128
|
-
}
|
|
3129
|
-
};
|
|
3322
|
+
case 'primary':
|
|
3323
|
+
{
|
|
3324
|
+
return 'primary';
|
|
3325
|
+
}
|
|
3130
3326
|
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
horizontalPadding: 16,
|
|
3136
|
-
verticalPadding: 4,
|
|
3137
|
-
floatingPadding: 8
|
|
3138
|
-
};
|
|
3327
|
+
case 'default':
|
|
3328
|
+
{
|
|
3329
|
+
return 'black';
|
|
3330
|
+
}
|
|
3139
3331
|
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
medium: 768,
|
|
3145
|
-
large: 1024,
|
|
3146
|
-
wide: 1280
|
|
3147
|
-
},
|
|
3148
|
-
min: {
|
|
3149
|
-
smallBreakpoint: 'min-width: 480px',
|
|
3150
|
-
mediumBreakpoint: 'min-width: 768px',
|
|
3151
|
-
largeBreakpoint: 'min-width: 1024px',
|
|
3152
|
-
wideBreakpoint: 'min-width: 1280px'
|
|
3153
|
-
},
|
|
3154
|
-
max: {
|
|
3155
|
-
smallBreakpoint: 'max-width: 479px',
|
|
3156
|
-
mediumBreakpoint: 'max-width: 767px',
|
|
3157
|
-
largeBreakpoint: 'max-width: 1023px',
|
|
3158
|
-
wideBreakpoint: 'max-width: 1279px'
|
|
3332
|
+
default:
|
|
3333
|
+
{
|
|
3334
|
+
return 'black';
|
|
3335
|
+
}
|
|
3159
3336
|
}
|
|
3160
|
-
}; // eslint-disable-next-line unicorn/expiring-todo-comments
|
|
3161
|
-
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
3162
|
-
|
|
3163
|
-
var theme = {
|
|
3164
|
-
spacing: 4,
|
|
3165
|
-
colors: colors,
|
|
3166
|
-
palettes: {
|
|
3167
|
-
lateOcean: lateOceanColorPalette
|
|
3168
|
-
},
|
|
3169
|
-
avatar: avatar,
|
|
3170
|
-
button: button,
|
|
3171
|
-
card: card,
|
|
3172
|
-
feedbackMessage: feedbackMessage,
|
|
3173
|
-
forms: forms,
|
|
3174
|
-
typography: typography,
|
|
3175
|
-
tag: tag,
|
|
3176
|
-
shadows: shadows,
|
|
3177
|
-
fullScreenModal: fullScreenModal,
|
|
3178
|
-
iconButton: iconButton,
|
|
3179
|
-
listItem: listItem,
|
|
3180
|
-
tooltip: tooltip,
|
|
3181
|
-
skeleton: skeleton,
|
|
3182
|
-
breakpoints: breakpoints
|
|
3183
3337
|
};
|
|
3338
|
+
function Tag(_ref6) {
|
|
3339
|
+
var label = _ref6.label,
|
|
3340
|
+
_ref6$type = _ref6.type,
|
|
3341
|
+
type = _ref6$type === void 0 ? 'default' : _ref6$type,
|
|
3342
|
+
_ref6$variant = _ref6.variant,
|
|
3343
|
+
variant = _ref6$variant === void 0 ? 'fill' : _ref6$variant;
|
|
3344
|
+
return /*#__PURE__*/jsx(Container, {
|
|
3345
|
+
type: type,
|
|
3346
|
+
variant: variant,
|
|
3347
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
3348
|
+
base: "body-xsmall",
|
|
3349
|
+
color: getLabelColor(type, variant),
|
|
3350
|
+
children: label
|
|
3351
|
+
})
|
|
3352
|
+
});
|
|
3353
|
+
}
|
|
3184
3354
|
|
|
3185
3355
|
function TimePicker() {
|
|
3186
3356
|
return /*#__PURE__*/jsx(Typography.Text, {
|
|
@@ -3475,79 +3645,6 @@ function TypographyLink(_ref5) {
|
|
|
3475
3645
|
}));
|
|
3476
3646
|
}
|
|
3477
3647
|
|
|
3478
|
-
function matchWindowSize(_ref, _ref2) {
|
|
3479
|
-
var width = _ref.width,
|
|
3480
|
-
height = _ref.height;
|
|
3481
|
-
var minWidth = _ref2.minWidth,
|
|
3482
|
-
maxWidth = _ref2.maxWidth,
|
|
3483
|
-
minHeight = _ref2.minHeight,
|
|
3484
|
-
maxHeight = _ref2.maxHeight;
|
|
3485
|
-
var hasWidthMatched = width ? (!minWidth || width >= minWidth) && (!maxWidth || width <= maxWidth) : true;
|
|
3486
|
-
var hasHeightMatched = height ? (!minHeight || height >= minHeight) && (!maxHeight || height <= maxHeight) : true;
|
|
3487
|
-
return hasWidthMatched && hasHeightMatched;
|
|
3488
|
-
}
|
|
3489
|
-
function useMatchWindowSize(options) {
|
|
3490
|
-
var _useWindowDimensions = useWindowDimensions(),
|
|
3491
|
-
width = _useWindowDimensions.width,
|
|
3492
|
-
height = _useWindowDimensions.height;
|
|
3493
|
-
|
|
3494
|
-
return matchWindowSize({
|
|
3495
|
-
width: width,
|
|
3496
|
-
height: height
|
|
3497
|
-
}, options);
|
|
3498
|
-
}
|
|
3499
|
-
|
|
3500
|
-
function createWindowSizeHelper(dimensions) {
|
|
3501
|
-
return {
|
|
3502
|
-
matchWindowSize: function matchWindowSize$1(options) {
|
|
3503
|
-
return matchWindowSize(dimensions, options);
|
|
3504
|
-
},
|
|
3505
|
-
ifWindowSizeMatches: function ifWindowSizeMatches(options, valueIfTrue, valueIfFalse) {
|
|
3506
|
-
return matchWindowSize(dimensions, options) ? valueIfTrue : valueIfFalse;
|
|
3507
|
-
},
|
|
3508
|
-
mapWindowWidth: function mapWindowWidth() {
|
|
3509
|
-
for (var _len = arguments.length, widthList = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3510
|
-
widthList[_key] = arguments[_key];
|
|
3511
|
-
}
|
|
3512
|
-
|
|
3513
|
-
if ((process.env.NODE_ENV !== "production")) {
|
|
3514
|
-
widthList.slice(1).forEach(function (_ref, index) {
|
|
3515
|
-
var _ref2 = _slicedToArray(_ref, 1),
|
|
3516
|
-
minWidth = _ref2[0];
|
|
3517
|
-
|
|
3518
|
-
var previousMinWidth = widthList[index][0];
|
|
3519
|
-
|
|
3520
|
-
if (previousMinWidth > minWidth) {
|
|
3521
|
-
throw new Error("mapWindowWidth: sort your values to be mobile first. ".concat(minWidth, " is < ").concat(previousMinWidth, ", so ").concat(minWidth, " should be before ").concat(previousMinWidth, "."));
|
|
3522
|
-
}
|
|
3523
|
-
});
|
|
3524
|
-
}
|
|
3525
|
-
|
|
3526
|
-
var found = widthList.find(function (_ref3) {
|
|
3527
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
3528
|
-
minWidth = _ref4[0];
|
|
3529
|
-
_ref4[1];
|
|
3530
|
-
|
|
3531
|
-
return matchWindowSize(dimensions, {
|
|
3532
|
-
minWidth: Number(minWidth)
|
|
3533
|
-
});
|
|
3534
|
-
});
|
|
3535
|
-
if (!found) return null;
|
|
3536
|
-
return found[1];
|
|
3537
|
-
}
|
|
3538
|
-
};
|
|
3539
|
-
}
|
|
3540
|
-
|
|
3541
|
-
function useKittTheme() {
|
|
3542
|
-
var dimensions = useWindowDimensions();
|
|
3543
|
-
return useMemo(function () {
|
|
3544
|
-
return {
|
|
3545
|
-
kitt: theme,
|
|
3546
|
-
responsive: createWindowSizeHelper(dimensions)
|
|
3547
|
-
};
|
|
3548
|
-
}, [dimensions]);
|
|
3549
|
-
}
|
|
3550
|
-
|
|
3551
3648
|
var hex2rgba = function (hex) {
|
|
3552
3649
|
var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
3553
3650
|
var r = parseInt(hex.slice(1, 3), 16);
|
|
@@ -3586,5 +3683,5 @@ function MatchWindowSize(_ref) {
|
|
|
3586
3683
|
return children;
|
|
3587
3684
|
}
|
|
3588
3685
|
|
|
3589
|
-
export { Avatar, Button, Card, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPressable, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Skeleton, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
3686
|
+
export { Avatar, Button, Card, Checkbox, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Skeleton, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
3590
3687
|
//# sourceMappingURL=index-browser-all.es.web.js.map
|