@ornikar/kitt-universal 11.2.0 → 12.0.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/.vscode/settings.json +3 -0
- package/babel-plugin-csf-to-jest.js +15 -1
- package/dist/definitions/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts +15 -0
- package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts.map +1 -0
- package/dist/definitions/Choices/AnimatedChoiceItemView.web.d.ts +4 -0
- package/dist/definitions/Choices/AnimatedChoiceItemView.web.d.ts.map +1 -0
- package/dist/definitions/Choices/ChoiceItem.d.ts +2 -3
- package/dist/definitions/Choices/ChoiceItem.d.ts.map +1 -1
- package/dist/definitions/Choices/ChoiceItemContainer.d.ts +5 -5
- package/dist/definitions/Choices/ChoiceItemContainer.d.ts.map +1 -1
- package/dist/definitions/Choices/utils/getBackgroundColor.d.ts +9 -0
- package/dist/definitions/Choices/utils/getBackgroundColor.d.ts.map +1 -0
- package/dist/definitions/Choices/utils/getBorderRadius.d.ts +3 -0
- package/dist/definitions/Choices/utils/getBorderRadius.d.ts.map +1 -0
- package/dist/definitions/Choices/utils/getCurrentTextColor.d.ts +10 -0
- package/dist/definitions/Choices/utils/getCurrentTextColor.d.ts.map +1 -0
- package/dist/definitions/ListItem/ListItem.d.ts.map +1 -1
- package/dist/definitions/ListItem/ListItemContent.d.ts.map +1 -1
- package/dist/definitions/ListItem/ListItemSideContent.d.ts.map +1 -1
- package/dist/definitions/Overlay/Overlay.d.ts.map +1 -1
- package/dist/definitions/PageLoader/PageLoader.d.ts.map +1 -1
- package/dist/definitions/Picker/Picker.d.ts.map +1 -1
- package/dist/definitions/Picker/PickerItem.d.ts.map +1 -1
- package/dist/definitions/Skeleton/SkeletonContent.d.ts.map +1 -1
- package/dist/definitions/Tag/Tag.d.ts.map +1 -1
- package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts +7 -3
- package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts.map +1 -1
- package/dist/definitions/TimePicker/TimePicker.d.ts +19 -8
- package/dist/definitions/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/definitions/TimePicker/TimePicker.web.d.ts +2 -1
- package/dist/definitions/TimePicker/TimePicker.web.d.ts.map +1 -1
- package/dist/definitions/TimePicker/TimePickerPressable.d.ts +20 -0
- package/dist/definitions/TimePicker/TimePickerPressable.d.ts.map +1 -0
- package/dist/definitions/TimePicker/utils/formatDateToTimeString.d.ts +2 -0
- package/dist/definitions/TimePicker/utils/formatDateToTimeString.d.ts.map +1 -0
- package/dist/definitions/TimePicker/utils/getCurrentInternalForcedState.d.ts +10 -0
- package/dist/definitions/TimePicker/utils/getCurrentInternalForcedState.d.ts.map +1 -0
- package/dist/definitions/VerticalSteps/Step.d.ts +16 -0
- package/dist/definitions/VerticalSteps/Step.d.ts.map +1 -0
- package/dist/definitions/VerticalSteps/StepIcon.d.ts +13 -0
- package/dist/definitions/VerticalSteps/StepIcon.d.ts.map +1 -0
- package/dist/definitions/VerticalSteps/VerticalSteps.d.ts +12 -0
- package/dist/definitions/VerticalSteps/VerticalSteps.d.ts.map +1 -0
- package/dist/definitions/VerticalSteps/utils/getStepState.d.ts +3 -0
- package/dist/definitions/VerticalSteps/utils/getStepState.d.ts.map +1 -0
- package/dist/definitions/forms/InputTag/InputTag.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputTextContainer.d.ts +2 -4
- package/dist/definitions/forms/InputText/InputTextContainer.d.ts.map +1 -1
- package/dist/definitions/forms/RadioButtonGroup/AnimatedContainer/AnimatedContainer.d.ts +1 -1
- package/dist/definitions/forms/RadioButtonGroup/AnimatedContainer/AnimatedContainer.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +1 -1
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +190 -0
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/story-components/Flex.d.ts +6 -4
- package/dist/definitions/story-components/Flex.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +2 -0
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/choices.d.ts +2 -0
- package/dist/definitions/themes/late-ocean/choices.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/forms.d.ts +1 -0
- package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/listItem.d.ts +3 -0
- package/dist/definitions/themes/late-ocean/listItem.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/picker.d.ts +3 -0
- package/dist/definitions/themes/late-ocean/picker.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/tag.d.ts +3 -0
- package/dist/definitions/themes/late-ocean/tag.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/timePicker.d.ts +5 -0
- package/dist/definitions/themes/late-ocean/timePicker.d.ts.map +1 -0
- package/dist/definitions/themes/late-ocean/verticalSteps.d.ts +14 -0
- package/dist/definitions/themes/late-ocean/verticalSteps.d.ts.map +1 -0
- package/dist/index-browser-all.es.android.js +923 -656
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +923 -656
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +922 -655
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +726 -383
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +764 -486
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +599 -245
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +35 -2
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +35 -2
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +35 -2
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +35 -2
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +35 -2
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +35 -2
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +5 -5
- package/typings/react-native-web.d.ts +2 -0
- package/dist/definitions/TimePicker/useTimePicker.d.ts +0 -14
- package/dist/definitions/TimePicker/useTimePicker.d.ts.map +0 -1
- package/dist/definitions/forms/styledTextInputMixin.d.ts +0 -8
- package/dist/definitions/forms/styledTextInputMixin.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext, createContext, forwardRef, cloneElement, useRef, useEffect, useState, useMemo, Children, useReducer, Fragment as Fragment$1, useCallback } from 'react';
|
|
1
|
+
import React, { useContext, createContext, forwardRef, cloneElement, useRef, useEffect, useState, useMemo, Children, useReducer, Fragment as Fragment$1, useCallback, createElement } from 'react';
|
|
2
2
|
import { View as View$1, ScrollView as ScrollView$1, Pressable as Pressable$1, Image as Image$1, FlatList as FlatList$1, SectionList as SectionList$1, Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, Center as Center$1, useSx, Text, Input, NativeBaseProvider, extendTheme, useBreakpointValue, useMediaQuery } from 'native-base';
|
|
3
3
|
export { useBreakpointValue, useClipboard, useMediaQuery, useSx, useToken } from 'native-base';
|
|
4
4
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
@@ -8,7 +8,7 @@ import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructurin
|
|
|
8
8
|
import _extends from '@babel/runtime/helpers/extends';
|
|
9
9
|
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate } from 'react-native-reanimated';
|
|
10
10
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
11
|
-
import { Platform, Animated as Animated$1, Easing, useWindowDimensions,
|
|
11
|
+
import { Platform, Animated as Animated$1, Easing, useWindowDimensions, StyleSheet, Modal as Modal$1, ScrollView as ScrollView$2, View as View$2, Linking, Text as Text$1, Pressable as Pressable$2, PixelRatio } from 'react-native';
|
|
12
12
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
13
13
|
import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
|
|
14
14
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
@@ -16,11 +16,11 @@ import { ArcIcon, UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, InfoIcon,
|
|
|
16
16
|
export * from '@ornikar/kitt-icons';
|
|
17
17
|
import { BottomSheetScrollView, BottomSheetView, useBottomSheetDynamicSnapPoints, BottomSheetModal, BottomSheetHandle, BottomSheetBackdrop } from '@gorhom/bottom-sheet';
|
|
18
18
|
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
19
|
-
import styled, { css, ThemeProvider } from 'styled-components/native';
|
|
20
19
|
import { parse } from 'twemoji-parser';
|
|
21
20
|
import * as WebBrowser from 'expo-web-browser';
|
|
22
21
|
import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/datetimepicker';
|
|
23
22
|
import { FormattedMessage } from 'react-intl';
|
|
23
|
+
import styled, { ThemeProvider } from 'styled-components/native';
|
|
24
24
|
import { parseNumber, getCountryCallingCode, isValidNumber } from 'libphonenumber-js';
|
|
25
25
|
import Svg, { LinearGradient, Stop, Mask, Path, G, Defs, Circle as Circle$1 } from 'react-native-svg';
|
|
26
26
|
import { Picker as Picker$1 } from '@react-native-picker/picker';
|
|
@@ -1043,6 +1043,10 @@ var textArea = {
|
|
|
1043
1043
|
minHeight: 120
|
|
1044
1044
|
};
|
|
1045
1045
|
|
|
1046
|
+
var timePicker = {
|
|
1047
|
+
minWidth: 100
|
|
1048
|
+
};
|
|
1049
|
+
|
|
1046
1050
|
var forms = {
|
|
1047
1051
|
datePicker: datePicker,
|
|
1048
1052
|
input: input,
|
|
@@ -1051,7 +1055,8 @@ var forms = {
|
|
|
1051
1055
|
textArea: textArea,
|
|
1052
1056
|
checkbox: checkbox,
|
|
1053
1057
|
inputTag: inputTag,
|
|
1054
|
-
radioButtonGroup: radioButtonGroup
|
|
1058
|
+
radioButtonGroup: radioButtonGroup,
|
|
1059
|
+
timePicker: timePicker
|
|
1055
1060
|
};
|
|
1056
1061
|
|
|
1057
1062
|
var webAnimationContentDuration = 600;
|
|
@@ -1141,6 +1146,8 @@ var iconButton = {
|
|
|
1141
1146
|
|
|
1142
1147
|
var listItem = {
|
|
1143
1148
|
padding: '12px 16px',
|
|
1149
|
+
verticalPadding: 12,
|
|
1150
|
+
horizontalPadding: 16,
|
|
1144
1151
|
borderColor: colors.separator,
|
|
1145
1152
|
borderWidth: 1,
|
|
1146
1153
|
innerMargin: 8
|
|
@@ -1182,6 +1189,8 @@ var picker = {
|
|
|
1182
1189
|
},
|
|
1183
1190
|
android: {
|
|
1184
1191
|
padding: '12px 24px',
|
|
1192
|
+
verticalPadding: 12,
|
|
1193
|
+
horizontalPadding: 24,
|
|
1185
1194
|
"default": {
|
|
1186
1195
|
backgroundColor: colors.transparent
|
|
1187
1196
|
},
|
|
@@ -1280,6 +1289,8 @@ var skeleton = {
|
|
|
1280
1289
|
var tag = {
|
|
1281
1290
|
borderRadius: 10,
|
|
1282
1291
|
padding: '2px 12px',
|
|
1292
|
+
verticalPadding: 2,
|
|
1293
|
+
horizontalPadding: 12,
|
|
1283
1294
|
primary: {
|
|
1284
1295
|
fill: {
|
|
1285
1296
|
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
@@ -1356,6 +1367,27 @@ var tooltip = {
|
|
|
1356
1367
|
}
|
|
1357
1368
|
};
|
|
1358
1369
|
|
|
1370
|
+
var verticalSteps = {
|
|
1371
|
+
active: {
|
|
1372
|
+
icon: {
|
|
1373
|
+
backgroundColor: colors.primary,
|
|
1374
|
+
textColor: colors.white
|
|
1375
|
+
}
|
|
1376
|
+
},
|
|
1377
|
+
done: {
|
|
1378
|
+
icon: {
|
|
1379
|
+
backgroundColor: lateOceanColorPalette.moonPurple,
|
|
1380
|
+
textColor: colors.primary
|
|
1381
|
+
}
|
|
1382
|
+
},
|
|
1383
|
+
"default": {
|
|
1384
|
+
icon: {
|
|
1385
|
+
backgroundColor: colors.disabled,
|
|
1386
|
+
textColor: colors.blackDisabled
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
};
|
|
1390
|
+
|
|
1359
1391
|
var breakpoints = {
|
|
1360
1392
|
values: {
|
|
1361
1393
|
base: 0,
|
|
@@ -1407,7 +1439,8 @@ var theme = {
|
|
|
1407
1439
|
tooltip: tooltip,
|
|
1408
1440
|
typography: typography,
|
|
1409
1441
|
fullscreenModal: fullscreenModal,
|
|
1410
|
-
actionCard: actionCard
|
|
1442
|
+
actionCard: actionCard,
|
|
1443
|
+
verticalSteps: verticalSteps
|
|
1411
1444
|
};
|
|
1412
1445
|
|
|
1413
1446
|
var KittThemeContext = /*#__PURE__*/createContext({
|
|
@@ -1712,7 +1745,7 @@ var isTypographyHeader = function (type, isHeaderTypographyInContext) {
|
|
|
1712
1745
|
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
1713
1746
|
};
|
|
1714
1747
|
|
|
1715
|
-
var _excluded$
|
|
1748
|
+
var _excluded$G = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
|
|
1716
1749
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
1717
1750
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
1718
1751
|
function useTypographyColor() {
|
|
@@ -1762,7 +1795,7 @@ function Typography(_ref) {
|
|
|
1762
1795
|
} : _ref$type,
|
|
1763
1796
|
variant = _ref.variant,
|
|
1764
1797
|
color = _ref.color,
|
|
1765
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
1798
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$G);
|
|
1766
1799
|
var sx = useSx();
|
|
1767
1800
|
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
1768
1801
|
var defaultColor = useTypographyDefaultColor();
|
|
@@ -1867,11 +1900,11 @@ function Icon(_ref) {
|
|
|
1867
1900
|
});
|
|
1868
1901
|
}
|
|
1869
1902
|
|
|
1870
|
-
var _excluded$
|
|
1903
|
+
var _excluded$F = ["color"],
|
|
1871
1904
|
_excluded2$5 = ["color"];
|
|
1872
1905
|
function TypographyIconSpecifiedColor(_ref) {
|
|
1873
1906
|
var color = _ref.color,
|
|
1874
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1907
|
+
props = _objectWithoutProperties(_ref, _excluded$F);
|
|
1875
1908
|
var sx = useSx();
|
|
1876
1909
|
var colorStyle = sx({
|
|
1877
1910
|
color: getTypographyColorValue(color)
|
|
@@ -1915,7 +1948,7 @@ var getTextColorByType = function (type, variant, isHovered, isPressed) {
|
|
|
1915
1948
|
}
|
|
1916
1949
|
};
|
|
1917
1950
|
|
|
1918
|
-
var _excluded$
|
|
1951
|
+
var _excluded$E = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused"];
|
|
1919
1952
|
function ButtonIcon(_ref) {
|
|
1920
1953
|
var icon = _ref.icon,
|
|
1921
1954
|
color = _ref.color,
|
|
@@ -1990,7 +2023,7 @@ function ButtonContent(_ref3) {
|
|
|
1990
2023
|
isHovered = _ref3.isHovered,
|
|
1991
2024
|
isPressed = _ref3.isPressed;
|
|
1992
2025
|
_ref3.isFocused;
|
|
1993
|
-
var props = _objectWithoutProperties(_ref3, _excluded$
|
|
2026
|
+
var props = _objectWithoutProperties(_ref3, _excluded$E);
|
|
1994
2027
|
var color = isDisabled ? 'black-light' : getTextColorByType(type, variant, isHovered, isPressed);
|
|
1995
2028
|
return /*#__PURE__*/jsx(View, {
|
|
1996
2029
|
_web: {
|
|
@@ -2039,7 +2072,7 @@ function ButtonPadding(_ref2) {
|
|
|
2039
2072
|
});
|
|
2040
2073
|
}
|
|
2041
2074
|
|
|
2042
|
-
function DisabledBorder
|
|
2075
|
+
function DisabledBorder() {
|
|
2043
2076
|
return /*#__PURE__*/jsx(View, {
|
|
2044
2077
|
position: "absolute",
|
|
2045
2078
|
top: 0,
|
|
@@ -2236,7 +2269,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2236
2269
|
isPressed: isPressed,
|
|
2237
2270
|
isFocused: isFocused,
|
|
2238
2271
|
children: _children
|
|
2239
|
-
}), disabled ? /*#__PURE__*/jsx(DisabledBorder
|
|
2272
|
+
}), disabled ? /*#__PURE__*/jsx(DisabledBorder, {}) : null, /*#__PURE__*/jsx(FocusBorder, {
|
|
2240
2273
|
type: type,
|
|
2241
2274
|
variant: variant,
|
|
2242
2275
|
isFocused: isFocused || isFocusedInternal,
|
|
@@ -2323,7 +2356,7 @@ function useMatchWindowSize(options) {
|
|
|
2323
2356
|
}, options);
|
|
2324
2357
|
}
|
|
2325
2358
|
|
|
2326
|
-
var _excluded$
|
|
2359
|
+
var _excluded$D = ["as", "onPress", "disabled", "icon", "stretch"];
|
|
2327
2360
|
function getCurrentStretchValue(isStretch, isMedium) {
|
|
2328
2361
|
// Stretch will follow the value passed from the component occurence if defined
|
|
2329
2362
|
if (isStretch) return isStretch;
|
|
@@ -2338,7 +2371,7 @@ function ActionsItem(_ref) {
|
|
|
2338
2371
|
disabled = _ref.disabled,
|
|
2339
2372
|
icon = _ref.icon,
|
|
2340
2373
|
stretch = _ref.stretch,
|
|
2341
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2374
|
+
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
2342
2375
|
var isMedium = useMatchWindowSize({
|
|
2343
2376
|
minWidth: KittBreakpoints.MEDIUM
|
|
2344
2377
|
});
|
|
@@ -2413,7 +2446,7 @@ function ActionsButton(_ref) {
|
|
|
2413
2446
|
}, props));
|
|
2414
2447
|
}
|
|
2415
2448
|
|
|
2416
|
-
var _excluded$
|
|
2449
|
+
var _excluded$C = ["children", "layout"];
|
|
2417
2450
|
function getCurrentLayout(layout) {
|
|
2418
2451
|
if (!layout) return {
|
|
2419
2452
|
base: 'stretch',
|
|
@@ -2433,7 +2466,7 @@ function getCurrentDirection(layout) {
|
|
|
2433
2466
|
function Actions(_ref) {
|
|
2434
2467
|
var children = _ref.children,
|
|
2435
2468
|
layout = _ref.layout,
|
|
2436
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2469
|
+
props = _objectWithoutProperties(_ref, _excluded$C);
|
|
2437
2470
|
var currentAlignItems = getCurrentLayout(layout);
|
|
2438
2471
|
var currentDirection = getCurrentDirection(layout);
|
|
2439
2472
|
return /*#__PURE__*/jsx(Stack, _objectSpread(_objectSpread({
|
|
@@ -2479,7 +2512,7 @@ function getInitials(firstname, lastname) {
|
|
|
2479
2512
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
2480
2513
|
}
|
|
2481
2514
|
|
|
2482
|
-
var _excluded$
|
|
2515
|
+
var _excluded$B = ["size", "round", "light", "sizeVariant"];
|
|
2483
2516
|
function AvatarContent(_ref) {
|
|
2484
2517
|
var size = _ref.size,
|
|
2485
2518
|
src = _ref.src,
|
|
@@ -2518,7 +2551,7 @@ function Avatar(_ref2) {
|
|
|
2518
2551
|
round = _ref2.round,
|
|
2519
2552
|
light = _ref2.light,
|
|
2520
2553
|
sizeVariant = _ref2.sizeVariant,
|
|
2521
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
2554
|
+
props = _objectWithoutProperties(_ref2, _excluded$B);
|
|
2522
2555
|
var currentSize = getCurrentSize({
|
|
2523
2556
|
size: size,
|
|
2524
2557
|
sizeVariant: sizeVariant
|
|
@@ -2686,19 +2719,16 @@ function ModalBehaviour(_ref2) {
|
|
|
2686
2719
|
}
|
|
2687
2720
|
ModalBehaviour.CloseButton = CloseButton;
|
|
2688
2721
|
|
|
2689
|
-
|
|
2690
|
-
var
|
|
2691
|
-
|
|
2692
|
-
})(function (_ref) {
|
|
2693
|
-
var theme = _ref.theme;
|
|
2694
|
-
return _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
2695
|
-
backgroundColor: theme.kitt.colors.overlay.dark
|
|
2696
|
-
});
|
|
2697
|
-
});
|
|
2698
|
-
function Overlay(_ref2) {
|
|
2699
|
-
var onPress = _ref2.onPress;
|
|
2700
|
-
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
2722
|
+
function Overlay(_ref) {
|
|
2723
|
+
var onPress = _ref.onPress;
|
|
2724
|
+
return /*#__PURE__*/jsx(Pressable, {
|
|
2701
2725
|
accessibilityRole: "none",
|
|
2726
|
+
position: "absolute",
|
|
2727
|
+
top: "0",
|
|
2728
|
+
left: "0",
|
|
2729
|
+
right: "0",
|
|
2730
|
+
bottom: "0",
|
|
2731
|
+
backgroundColor: "kitt.overlay.dark",
|
|
2702
2732
|
onPress: onPress
|
|
2703
2733
|
});
|
|
2704
2734
|
}
|
|
@@ -2938,11 +2968,11 @@ function CardModalAnimation(_ref) {
|
|
|
2938
2968
|
});
|
|
2939
2969
|
}
|
|
2940
2970
|
|
|
2941
|
-
var _excluded$
|
|
2971
|
+
var _excluded$A = ["children"],
|
|
2942
2972
|
_excluded2$4 = ["children", "visible", "onClose", "onExited"];
|
|
2943
2973
|
function CardModalScrollContainer(_ref) {
|
|
2944
2974
|
var children = _ref.children,
|
|
2945
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2975
|
+
props = _objectWithoutProperties(_ref, _excluded$A);
|
|
2946
2976
|
if (Platform.OS !== 'web') {
|
|
2947
2977
|
return /*#__PURE__*/jsx(View, {
|
|
2948
2978
|
children: children
|
|
@@ -2988,7 +3018,7 @@ function CardModalBehaviour(_ref2) {
|
|
|
2988
3018
|
});
|
|
2989
3019
|
}
|
|
2990
3020
|
|
|
2991
|
-
var _excluded$
|
|
3021
|
+
var _excluded$z = ["children", "paddingX", "paddingY"];
|
|
2992
3022
|
function CardModalBody(_ref) {
|
|
2993
3023
|
var children = _ref.children,
|
|
2994
3024
|
_ref$paddingX = _ref.paddingX,
|
|
@@ -2998,7 +3028,7 @@ function CardModalBody(_ref) {
|
|
|
2998
3028
|
} : _ref$paddingX,
|
|
2999
3029
|
_ref$paddingY = _ref.paddingY,
|
|
3000
3030
|
paddingY = _ref$paddingY === void 0 ? 'kitt.4' : _ref$paddingY,
|
|
3001
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3031
|
+
props = _objectWithoutProperties(_ref, _excluded$z);
|
|
3002
3032
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
3003
3033
|
paddingX: paddingX,
|
|
3004
3034
|
paddingY: paddingY
|
|
@@ -3007,7 +3037,7 @@ function CardModalBody(_ref) {
|
|
|
3007
3037
|
}));
|
|
3008
3038
|
}
|
|
3009
3039
|
|
|
3010
|
-
var _excluded$
|
|
3040
|
+
var _excluded$y = ["children", "padding", "hasSeparator"];
|
|
3011
3041
|
function CardModalFooter(_ref) {
|
|
3012
3042
|
var children = _ref.children,
|
|
3013
3043
|
_ref$padding = _ref.padding,
|
|
@@ -3017,7 +3047,7 @@ function CardModalFooter(_ref) {
|
|
|
3017
3047
|
} : _ref$padding,
|
|
3018
3048
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
3019
3049
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
3020
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3050
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
3021
3051
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
3022
3052
|
marginTop: "kitt.2",
|
|
3023
3053
|
padding: padding,
|
|
@@ -3031,7 +3061,7 @@ function CardModalFooter(_ref) {
|
|
|
3031
3061
|
}));
|
|
3032
3062
|
}
|
|
3033
3063
|
|
|
3034
|
-
var _excluded$
|
|
3064
|
+
var _excluded$x = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
|
|
3035
3065
|
function CardModalHeader(_ref) {
|
|
3036
3066
|
var children = _ref.children,
|
|
3037
3067
|
title = _ref.title,
|
|
@@ -3044,7 +3074,7 @@ function CardModalHeader(_ref) {
|
|
|
3044
3074
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
3045
3075
|
right = _ref.right,
|
|
3046
3076
|
left = _ref.left,
|
|
3047
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3077
|
+
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
3048
3078
|
var defaultContainerPadding = {
|
|
3049
3079
|
base: 'kitt.4',
|
|
3050
3080
|
medium: 'kitt.6'
|
|
@@ -3082,7 +3112,7 @@ function CardModalHeader(_ref) {
|
|
|
3082
3112
|
}));
|
|
3083
3113
|
}
|
|
3084
3114
|
|
|
3085
|
-
var _excluded$
|
|
3115
|
+
var _excluded$w = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
3086
3116
|
function CardModal(_ref) {
|
|
3087
3117
|
var _ref$backgroundColor = _ref.backgroundColor,
|
|
3088
3118
|
backgroundColor = _ref$backgroundColor === void 0 ? 'kitt.uiBackgroundLight' : _ref$backgroundColor,
|
|
@@ -3093,7 +3123,7 @@ function CardModal(_ref) {
|
|
|
3093
3123
|
header = _ref.header,
|
|
3094
3124
|
body = _ref.body,
|
|
3095
3125
|
footer = _ref.footer,
|
|
3096
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3126
|
+
props = _objectWithoutProperties(_ref, _excluded$w);
|
|
3097
3127
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
3098
3128
|
overflow: "hidden",
|
|
3099
3129
|
backgroundColor: backgroundColor,
|
|
@@ -3111,6 +3141,59 @@ CardModal.Header = CardModalHeader;
|
|
|
3111
3141
|
CardModal.Footer = CardModalFooter;
|
|
3112
3142
|
CardModal.ModalBehaviour = CardModalBehaviour;
|
|
3113
3143
|
|
|
3144
|
+
function getBackgroundColor$3(_ref) {
|
|
3145
|
+
var isDisabled = _ref.isDisabled,
|
|
3146
|
+
isSelected = _ref.isSelected,
|
|
3147
|
+
isHovered = _ref.isHovered,
|
|
3148
|
+
isPressed = _ref.isPressed;
|
|
3149
|
+
if (isDisabled) return 'kitt.choices.item.disabled.backgroundColor';
|
|
3150
|
+
if (isSelected && isHovered) return 'kitt.choices.item.hoverWhenSelected.backgroundColor';
|
|
3151
|
+
if (isPressed) return 'kitt.choices.item.pressed.backgroundColor';
|
|
3152
|
+
if (isHovered) return 'kitt.choices.item.hover.backgroundColor';
|
|
3153
|
+
if (isSelected) return 'kitt.choices.item.selected.backgroundColor';
|
|
3154
|
+
return 'kitt.choices.item.default.backgroundColor';
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
function getBorderRadius(variant) {
|
|
3158
|
+
// The clean way to have the rounded effect would have been to know the children height since radius >= height * 0.5
|
|
3159
|
+
// We don't control over the height of the rendered children we just go with a arbitrary really high value
|
|
3160
|
+
return variant === 'rounded' ? Number.MAX_SAFE_INTEGER : 'kitt.choices.item.borderRadius';
|
|
3161
|
+
}
|
|
3162
|
+
|
|
3163
|
+
function AnimatedChoiceItemView(_ref) {
|
|
3164
|
+
var children = _ref.children,
|
|
3165
|
+
variant = _ref.variant,
|
|
3166
|
+
size = _ref.size,
|
|
3167
|
+
isHovered = _ref.isHovered,
|
|
3168
|
+
isPressed = _ref.isPressed,
|
|
3169
|
+
isDisabled = _ref.isDisabled,
|
|
3170
|
+
isSelected = _ref.isSelected,
|
|
3171
|
+
animatedStyles = _ref.animatedStyles;
|
|
3172
|
+
var sx = useSx();
|
|
3173
|
+
var style = sx({
|
|
3174
|
+
position: 'relative',
|
|
3175
|
+
borderRadius: getBorderRadius(variant),
|
|
3176
|
+
backgroundColor: getBackgroundColor$3({
|
|
3177
|
+
isDisabled: isDisabled,
|
|
3178
|
+
isSelected: isSelected,
|
|
3179
|
+
isHovered: isHovered,
|
|
3180
|
+
isPressed: isPressed
|
|
3181
|
+
}),
|
|
3182
|
+
paddingX: size === 'small' ? 'kitt.4' : {
|
|
3183
|
+
base: 'kitt.4',
|
|
3184
|
+
small: 'kitt.6'
|
|
3185
|
+
},
|
|
3186
|
+
paddingY: size === 'small' ? 'kitt.2' : {
|
|
3187
|
+
base: 'kitt.4',
|
|
3188
|
+
small: 'kitt.6'
|
|
3189
|
+
}
|
|
3190
|
+
});
|
|
3191
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
3192
|
+
style: [style, animatedStyles],
|
|
3193
|
+
children: children
|
|
3194
|
+
});
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3114
3197
|
var useNativeAnimation$2 = function (_ref) {
|
|
3115
3198
|
var selected = _ref.selected,
|
|
3116
3199
|
disabled = _ref.disabled,
|
|
@@ -3201,87 +3284,22 @@ function getCurrentTextColor$1(_ref) {
|
|
|
3201
3284
|
if (isSelected || isPressed) return 'white';
|
|
3202
3285
|
return 'black';
|
|
3203
3286
|
}
|
|
3204
|
-
function getBorderRadius(defaultRadius, variant) {
|
|
3205
|
-
// The clean way to have the rounded effect would have been to know the children height since radius >= height * 0.5
|
|
3206
|
-
// We don't control over the height of the rendered children we just go with a arbitrary really high value
|
|
3207
3287
|
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
});
|
|
3224
|
-
var ChoiceItemView = /*#__PURE__*/styled(Platform.OS === 'web' ? View$2 : Animated.View).withConfig({
|
|
3225
|
-
displayName: "ChoiceItem__ChoiceItemView"
|
|
3226
|
-
})(["position:relative;border-radius:", "px;background-color:", ";", ";", ""], function (_ref4) {
|
|
3227
|
-
var theme = _ref4.theme,
|
|
3228
|
-
$variant = _ref4.$variant;
|
|
3229
|
-
return getBorderRadius(theme.kitt.choices.item.borderRadius, $variant);
|
|
3230
|
-
}, function (_ref5) {
|
|
3231
|
-
var theme = _ref5.theme,
|
|
3232
|
-
$isHovered = _ref5.$isHovered,
|
|
3233
|
-
$isPressed = _ref5.$isPressed,
|
|
3234
|
-
$isDisabled = _ref5.$isDisabled,
|
|
3235
|
-
$isSelected = _ref5.$isSelected;
|
|
3236
|
-
var _theme$kitt$choices$i2 = theme.kitt.choices.item.backgroundColor,
|
|
3237
|
-
hoverWhenSelected = _theme$kitt$choices$i2.hoverWhenSelected,
|
|
3238
|
-
hover = _theme$kitt$choices$i2.hover,
|
|
3239
|
-
disabled = _theme$kitt$choices$i2.disabled,
|
|
3240
|
-
selected = _theme$kitt$choices$i2.selected,
|
|
3241
|
-
pressed = _theme$kitt$choices$i2.pressed,
|
|
3242
|
-
defaultBackground = _theme$kitt$choices$i2["default"];
|
|
3243
|
-
if ($isDisabled) return disabled;
|
|
3244
|
-
if ($isSelected && $isHovered) return hoverWhenSelected;
|
|
3245
|
-
if ($isPressed) return pressed;
|
|
3246
|
-
if ($isHovered) return hover;
|
|
3247
|
-
if ($isSelected) return selected;
|
|
3248
|
-
return defaultBackground;
|
|
3249
|
-
}, function (_ref6) {
|
|
3250
|
-
var theme = _ref6.theme,
|
|
3251
|
-
$size = _ref6.$size;
|
|
3252
|
-
var _theme$kitt$choices$i3 = theme.kitt.choices.item.padding,
|
|
3253
|
-
base = _theme$kitt$choices$i3.base,
|
|
3254
|
-
small = _theme$kitt$choices$i3.small;
|
|
3255
|
-
if ($size === 'small') {
|
|
3256
|
-
return css(["padding:", "px ", "px;"], base / 2, base);
|
|
3257
|
-
}
|
|
3258
|
-
return theme.responsive.ifWindowSizeMatches({
|
|
3259
|
-
minWidth: KittBreakpoints.SMALL
|
|
3260
|
-
}, css(["padding:", "px;"], small), css(["padding:", "px;"], base));
|
|
3261
|
-
}, function (_ref7) {
|
|
3262
|
-
var theme = _ref7.theme;
|
|
3263
|
-
if (Platform.OS !== 'web') return undefined;
|
|
3264
|
-
var _theme$kitt$choices$i4 = theme.kitt.choices.item.transition,
|
|
3265
|
-
property = _theme$kitt$choices$i4.property,
|
|
3266
|
-
duration = _theme$kitt$choices$i4.duration,
|
|
3267
|
-
timingFunction = _theme$kitt$choices$i4.timingFunction;
|
|
3268
|
-
return css(["transition:", " ", "ms ", ";"], property, duration, timingFunction);
|
|
3269
|
-
});
|
|
3270
|
-
function ChoiceItem(_ref8) {
|
|
3271
|
-
var _ref8$type = _ref8.type,
|
|
3272
|
-
type = _ref8$type === void 0 ? 'button' : _ref8$type,
|
|
3273
|
-
value = _ref8.value,
|
|
3274
|
-
selected = _ref8.selected,
|
|
3275
|
-
disabled = _ref8.disabled,
|
|
3276
|
-
variant = _ref8.variant,
|
|
3277
|
-
_children = _ref8.children,
|
|
3278
|
-
isPressedInternal = _ref8.isPressedInternal,
|
|
3279
|
-
isHoveredInternal = _ref8.isHoveredInternal,
|
|
3280
|
-
onPress = _ref8.onPress,
|
|
3281
|
-
onChange = _ref8.onChange,
|
|
3282
|
-
onBlur = _ref8.onBlur,
|
|
3283
|
-
onFocus = _ref8.onFocus,
|
|
3284
|
-
size = _ref8.size;
|
|
3288
|
+
function ChoiceItem(_ref) {
|
|
3289
|
+
var _ref$type = _ref.type,
|
|
3290
|
+
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
3291
|
+
value = _ref.value,
|
|
3292
|
+
selected = _ref.selected,
|
|
3293
|
+
disabled = _ref.disabled,
|
|
3294
|
+
variant = _ref.variant,
|
|
3295
|
+
_children = _ref.children,
|
|
3296
|
+
isPressedInternal = _ref.isPressedInternal,
|
|
3297
|
+
isHoveredInternal = _ref.isHoveredInternal,
|
|
3298
|
+
onPress = _ref.onPress,
|
|
3299
|
+
onChange = _ref.onChange,
|
|
3300
|
+
onBlur = _ref.onBlur,
|
|
3301
|
+
onFocus = _ref.onFocus,
|
|
3302
|
+
size = _ref.size;
|
|
3285
3303
|
var _useNativeAnimation = useNativeAnimation$2({
|
|
3286
3304
|
selected: selected,
|
|
3287
3305
|
disabled: disabled,
|
|
@@ -3316,17 +3334,17 @@ function ChoiceItem(_ref8) {
|
|
|
3316
3334
|
},
|
|
3317
3335
|
onPressIn: onPressIn,
|
|
3318
3336
|
onPressOut: onPressOut,
|
|
3319
|
-
children: function children(
|
|
3320
|
-
var isHovered =
|
|
3321
|
-
isPressed =
|
|
3322
|
-
return /*#__PURE__*/jsxs(
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3337
|
+
children: function children(_ref2) {
|
|
3338
|
+
var isHovered = _ref2.isHovered,
|
|
3339
|
+
isPressed = _ref2.isPressed;
|
|
3340
|
+
return /*#__PURE__*/jsxs(AnimatedChoiceItemView, {
|
|
3341
|
+
animatedStyles: backgroundStyles,
|
|
3342
|
+
isHovered: isHovered || isHoveredInternal,
|
|
3343
|
+
isDisabled: disabled,
|
|
3344
|
+
isSelected: selected,
|
|
3345
|
+
isPressed: isPressed || isPressedInternal,
|
|
3346
|
+
variant: variant,
|
|
3347
|
+
size: size,
|
|
3330
3348
|
children: [/*#__PURE__*/jsx(Typography.SetDefaultColor, {
|
|
3331
3349
|
value: getCurrentTextColor$1({
|
|
3332
3350
|
isDisabled: disabled,
|
|
@@ -3335,34 +3353,37 @@ function ChoiceItem(_ref8) {
|
|
|
3335
3353
|
isHovered: isHovered || isHoveredInternal
|
|
3336
3354
|
}),
|
|
3337
3355
|
children: _children
|
|
3338
|
-
}), disabled ? /*#__PURE__*/jsx(
|
|
3339
|
-
|
|
3340
|
-
|
|
3356
|
+
}), disabled ? /*#__PURE__*/jsx(View, {
|
|
3357
|
+
borderRadius: getBorderRadius(variant),
|
|
3358
|
+
borderWidth: "kitt.choices.item.disabled.borderWidth",
|
|
3359
|
+
borderColor: "kitt.choices.item.disabled.borderColor",
|
|
3360
|
+
position: "absolute",
|
|
3361
|
+
top: "0",
|
|
3362
|
+
right: "0",
|
|
3363
|
+
left: "0",
|
|
3364
|
+
bottom: "0"
|
|
3341
3365
|
}) : null]
|
|
3342
3366
|
});
|
|
3343
3367
|
}
|
|
3344
3368
|
});
|
|
3345
3369
|
}
|
|
3346
3370
|
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
}
|
|
3359
|
-
return css(["margin-bottom:", "px;"], $isLast ? 0 : column);
|
|
3360
|
-
});
|
|
3371
|
+
function ChoiceItemContainer(_ref) {
|
|
3372
|
+
var children = _ref.children,
|
|
3373
|
+
direction = _ref.direction,
|
|
3374
|
+
isLast = _ref.isLast;
|
|
3375
|
+
var currentItemMarginValue = isLast ? undefined : 'kitt.3';
|
|
3376
|
+
return /*#__PURE__*/jsx(View, {
|
|
3377
|
+
marginRight: direction === 'row' ? currentItemMarginValue : undefined,
|
|
3378
|
+
marginBottom: direction === 'column' ? currentItemMarginValue : undefined,
|
|
3379
|
+
children: children
|
|
3380
|
+
});
|
|
3381
|
+
}
|
|
3361
3382
|
|
|
3362
|
-
var _excluded$
|
|
3383
|
+
var _excluded$v = ["direction"];
|
|
3363
3384
|
function ChoicesContainer(_ref) {
|
|
3364
3385
|
var direction = _ref.direction,
|
|
3365
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3386
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
3366
3387
|
if (direction === 'row') {
|
|
3367
3388
|
return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
|
|
3368
3389
|
horizontal: true
|
|
@@ -3416,8 +3437,8 @@ function Choices(_ref2) {
|
|
|
3416
3437
|
selected: isForm ? child.props.value === currentValue : undefined
|
|
3417
3438
|
}, sharedProps));
|
|
3418
3439
|
return /*#__PURE__*/jsx(ChoiceItemContainer, {
|
|
3419
|
-
|
|
3420
|
-
|
|
3440
|
+
direction: direction,
|
|
3441
|
+
isLast: index === childrenArray.length - 1,
|
|
3421
3442
|
children: element
|
|
3422
3443
|
}, child.key);
|
|
3423
3444
|
})
|
|
@@ -3656,13 +3677,13 @@ function DialogModalAnimation(_ref) {
|
|
|
3656
3677
|
});
|
|
3657
3678
|
}
|
|
3658
3679
|
|
|
3659
|
-
var _excluded$
|
|
3680
|
+
var _excluded$u = ["children", "visible", "onClose", "onExited"];
|
|
3660
3681
|
function DialogModalBehaviour(_ref) {
|
|
3661
3682
|
var children = _ref.children,
|
|
3662
3683
|
visible = _ref.visible,
|
|
3663
3684
|
onClose = _ref.onClose,
|
|
3664
3685
|
onExited = _ref.onExited,
|
|
3665
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3686
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
3666
3687
|
var _useState = useState(visible),
|
|
3667
3688
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3668
3689
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -3693,7 +3714,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
3693
3714
|
});
|
|
3694
3715
|
}
|
|
3695
3716
|
|
|
3696
|
-
var _excluded$
|
|
3717
|
+
var _excluded$t = ["stretch"];
|
|
3697
3718
|
function DialogModal(_ref) {
|
|
3698
3719
|
var illustration = _ref.illustration,
|
|
3699
3720
|
title = _ref.title,
|
|
@@ -3734,7 +3755,7 @@ DialogModal.ModalBehaviour = DialogModalBehaviour;
|
|
|
3734
3755
|
function DialogModalButton(_ref2) {
|
|
3735
3756
|
var _ref2$stretch = _ref2.stretch,
|
|
3736
3757
|
stretch = _ref2$stretch === void 0 ? true : _ref2$stretch,
|
|
3737
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
3758
|
+
props = _objectWithoutProperties(_ref2, _excluded$t);
|
|
3738
3759
|
return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
|
|
3739
3760
|
stretch: stretch
|
|
3740
3761
|
}, props));
|
|
@@ -3771,7 +3792,7 @@ function Emoji(_ref) {
|
|
|
3771
3792
|
});
|
|
3772
3793
|
}
|
|
3773
3794
|
|
|
3774
|
-
var _excluded$
|
|
3795
|
+
var _excluded$s = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
|
|
3775
3796
|
_excluded2$3 = ["phoneNumber", "children"],
|
|
3776
3797
|
_excluded3$2 = ["phoneNumber", "children"],
|
|
3777
3798
|
_excluded4$1 = ["emailAddress", "children"];
|
|
@@ -3781,7 +3802,7 @@ function ExternalAppLink(_ref) {
|
|
|
3781
3802
|
appValue = _ref.appValue,
|
|
3782
3803
|
onPress = _ref.onPress,
|
|
3783
3804
|
onOpenAppError = _ref.onOpenAppError,
|
|
3784
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
3805
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
3785
3806
|
var href = "".concat(appScheme, ":").concat(appValue);
|
|
3786
3807
|
var handleOnPress = /*#__PURE__*/function () {
|
|
3787
3808
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
@@ -3876,14 +3897,14 @@ var defaultOpenLinkBehavior = {
|
|
|
3876
3897
|
web: 'targetBlank'
|
|
3877
3898
|
};
|
|
3878
3899
|
|
|
3879
|
-
var _excluded$
|
|
3900
|
+
var _excluded$r = ["as", "href", "openLinkBehavior", "onPress"];
|
|
3880
3901
|
function ExternalLink(_ref) {
|
|
3881
3902
|
var Component = _ref.as,
|
|
3882
3903
|
href = _ref.href,
|
|
3883
3904
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
3884
3905
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
3885
3906
|
onPress = _ref.onPress,
|
|
3886
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
3907
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
3887
3908
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
3888
3909
|
onPress: function handleOnPress(e) {
|
|
3889
3910
|
if (onPress) {
|
|
@@ -4210,11 +4231,15 @@ function stringToNumber(text) {
|
|
|
4210
4231
|
return parseInt(text, 10);
|
|
4211
4232
|
}
|
|
4212
4233
|
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4234
|
+
function InputTextContainer(_ref) {
|
|
4235
|
+
var children = _ref.children;
|
|
4236
|
+
return /*#__PURE__*/jsx(View, {
|
|
4237
|
+
position: "relative",
|
|
4238
|
+
children: children
|
|
4239
|
+
});
|
|
4240
|
+
}
|
|
4216
4241
|
|
|
4217
|
-
var _excluded$
|
|
4242
|
+
var _excluded$q = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "keyboardType", "multiline", "onSubmitEditing"];
|
|
4218
4243
|
var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
4219
4244
|
var id = _ref.id,
|
|
4220
4245
|
right = _ref.right;
|
|
@@ -4234,14 +4259,13 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
4234
4259
|
keyboardType = _ref$keyboardType === void 0 ? 'default' : _ref$keyboardType,
|
|
4235
4260
|
multiline = _ref.multiline,
|
|
4236
4261
|
onSubmitEditing = _ref.onSubmitEditing,
|
|
4237
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4262
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
4238
4263
|
var theme = useTheme();
|
|
4239
4264
|
var fontSizeForNativeBase = createNativeBaseFontSize({
|
|
4240
4265
|
base: 'body'
|
|
4241
4266
|
});
|
|
4242
4267
|
var shouldHandleSingleLineOnIOS = Platform.OS === 'ios' && !multiline;
|
|
4243
4268
|
return /*#__PURE__*/jsxs(InputTextContainer, {
|
|
4244
|
-
$isDisabled: disabled,
|
|
4245
4269
|
children: [/*#__PURE__*/jsx(Input, _objectSpread(_objectSpread({
|
|
4246
4270
|
ref: ref,
|
|
4247
4271
|
multiline: multiline,
|
|
@@ -4278,7 +4302,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
4278
4302
|
});
|
|
4279
4303
|
});
|
|
4280
4304
|
|
|
4281
|
-
function getCurrentInternalForcedState(_ref) {
|
|
4305
|
+
function getCurrentInternalForcedState$1(_ref) {
|
|
4282
4306
|
var isDisabled = _ref.isDisabled,
|
|
4283
4307
|
isHoveredInternal = _ref.isHoveredInternal,
|
|
4284
4308
|
isFocusedInternal = _ref.isFocusedInternal,
|
|
@@ -4302,7 +4326,7 @@ var InputPart = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
4302
4326
|
onSubmitEditing = _ref2.onSubmitEditing;
|
|
4303
4327
|
return /*#__PURE__*/jsx(InputText, {
|
|
4304
4328
|
ref: ref,
|
|
4305
|
-
internalForceState: getCurrentInternalForcedState({
|
|
4329
|
+
internalForceState: getCurrentInternalForcedState$1({
|
|
4306
4330
|
isDisabled: disabled,
|
|
4307
4331
|
isHoveredInternal: isHoveredInternal,
|
|
4308
4332
|
isFocusedInternal: isFocusedInternal,
|
|
@@ -4332,7 +4356,7 @@ function PartContainer(_ref) {
|
|
|
4332
4356
|
});
|
|
4333
4357
|
}
|
|
4334
4358
|
|
|
4335
|
-
var _excluded$
|
|
4359
|
+
var _excluded$p = ["value", "testID", "id", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "returnKeyType", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
|
|
4336
4360
|
var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
4337
4361
|
var value = _ref.value,
|
|
4338
4362
|
testID = _ref.testID,
|
|
@@ -4350,7 +4374,7 @@ var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
4350
4374
|
onBlur = _ref.onBlur,
|
|
4351
4375
|
onFocus = _ref.onFocus,
|
|
4352
4376
|
onSubmitEditing = _ref.onSubmitEditing;
|
|
4353
|
-
_objectWithoutProperties(_ref, _excluded$
|
|
4377
|
+
_objectWithoutProperties(_ref, _excluded$p);
|
|
4354
4378
|
var monthRef = useRef(null);
|
|
4355
4379
|
var yearRef = useRef(null);
|
|
4356
4380
|
var defaultValue = value;
|
|
@@ -4557,7 +4581,7 @@ var PressableDateInputs = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
4557
4581
|
});
|
|
4558
4582
|
});
|
|
4559
4583
|
|
|
4560
|
-
var _excluded$
|
|
4584
|
+
var _excluded$o = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
|
|
4561
4585
|
var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
4562
4586
|
var onBlur = _ref.onBlur,
|
|
4563
4587
|
onFocus = _ref.onFocus,
|
|
@@ -4566,7 +4590,7 @@ var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
4566
4590
|
isDefaultVisible = _ref.isDefaultVisible,
|
|
4567
4591
|
value = _ref.value,
|
|
4568
4592
|
_onChange = _ref.onChange,
|
|
4569
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4593
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
4570
4594
|
var _useState = useState(false),
|
|
4571
4595
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4572
4596
|
isFocused = _useState2[0],
|
|
@@ -4643,7 +4667,7 @@ function ModalFooter(_ref3) {
|
|
|
4643
4667
|
});
|
|
4644
4668
|
}
|
|
4645
4669
|
|
|
4646
|
-
var _excluded$
|
|
4670
|
+
var _excluded$n = ["color", "isDisabled"];
|
|
4647
4671
|
function getBackgroundColor$1(color, isDisabled) {
|
|
4648
4672
|
if (isDisabled) {
|
|
4649
4673
|
return 'kitt.iconButton.disabled.backgroundColor';
|
|
@@ -4661,7 +4685,7 @@ function getBackgroundColor$1(color, isDisabled) {
|
|
|
4661
4685
|
function Background(_ref) {
|
|
4662
4686
|
var color = _ref.color,
|
|
4663
4687
|
isDisabled = _ref.isDisabled,
|
|
4664
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4688
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
4665
4689
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4666
4690
|
width: "100%",
|
|
4667
4691
|
height: "100%",
|
|
@@ -4912,7 +4936,7 @@ var ModalView = /*#__PURE__*/styled.View.withConfig({
|
|
|
4912
4936
|
var theme = _ref2.theme;
|
|
4913
4937
|
return theme.kitt.spacing * 4;
|
|
4914
4938
|
});
|
|
4915
|
-
var ContentView
|
|
4939
|
+
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
4916
4940
|
displayName: "Modal__ContentView"
|
|
4917
4941
|
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], function (_ref3) {
|
|
4918
4942
|
var theme = _ref3.theme;
|
|
@@ -4944,7 +4968,7 @@ function Modal(_ref5) {
|
|
|
4944
4968
|
children: /*#__PURE__*/jsxs(ModalView, {
|
|
4945
4969
|
children: [/*#__PURE__*/jsx(Overlay, {
|
|
4946
4970
|
onPress: onClose
|
|
4947
|
-
}), /*#__PURE__*/jsx(ContentView
|
|
4971
|
+
}), /*#__PURE__*/jsx(ContentView, {
|
|
4948
4972
|
children: children
|
|
4949
4973
|
})]
|
|
4950
4974
|
})
|
|
@@ -4988,7 +5012,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
4988
5012
|
}));
|
|
4989
5013
|
}
|
|
4990
5014
|
|
|
4991
|
-
var _excluded$
|
|
5015
|
+
var _excluded$m = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
4992
5016
|
function ModalTitle(_ref) {
|
|
4993
5017
|
var children = _ref.children;
|
|
4994
5018
|
return /*#__PURE__*/jsx(Modal.Header, {
|
|
@@ -5006,7 +5030,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
5006
5030
|
validateButtonLabel = _ref2.validateButtonLabel,
|
|
5007
5031
|
onClose = _ref2.onClose,
|
|
5008
5032
|
onChange = _ref2.onChange,
|
|
5009
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
5033
|
+
props = _objectWithoutProperties(_ref2, _excluded$m);
|
|
5010
5034
|
var _useState = useState(value),
|
|
5011
5035
|
_useState2 = _slicedToArray(_useState, 2),
|
|
5012
5036
|
currentValue = _useState2[0],
|
|
@@ -5050,7 +5074,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
5050
5074
|
});
|
|
5051
5075
|
}
|
|
5052
5076
|
|
|
5053
|
-
var _excluded$
|
|
5077
|
+
var _excluded$l = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
|
|
5054
5078
|
var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5055
5079
|
var value = _ref.value,
|
|
5056
5080
|
pickerUITestID = _ref.pickerUITestID,
|
|
@@ -5064,7 +5088,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5064
5088
|
onChange = _ref.onChange,
|
|
5065
5089
|
onFocus = _ref.onFocus,
|
|
5066
5090
|
onBlur = _ref.onBlur,
|
|
5067
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5091
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
5068
5092
|
var _useState = useState(isDefaultVisible),
|
|
5069
5093
|
_useState2 = _slicedToArray(_useState, 2),
|
|
5070
5094
|
isPickerUIVisible = _useState2[0],
|
|
@@ -5111,7 +5135,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5111
5135
|
});
|
|
5112
5136
|
});
|
|
5113
5137
|
|
|
5114
|
-
var _excluded$
|
|
5138
|
+
var _excluded$k = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
|
|
5115
5139
|
var NativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5116
5140
|
var value = _ref.value,
|
|
5117
5141
|
pickerUITestID = _ref.pickerUITestID,
|
|
@@ -5119,7 +5143,7 @@ var NativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5119
5143
|
pickerDefaultDate = _ref.pickerDefaultDate,
|
|
5120
5144
|
onChange = _ref.onChange,
|
|
5121
5145
|
onBlur = _ref.onBlur,
|
|
5122
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5146
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
5123
5147
|
if (Platform.OS === 'android') {
|
|
5124
5148
|
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
|
|
5125
5149
|
ref: ref,
|
|
@@ -5141,14 +5165,14 @@ var NativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5141
5165
|
}, props));
|
|
5142
5166
|
});
|
|
5143
5167
|
|
|
5144
|
-
var _excluded$
|
|
5168
|
+
var _excluded$j = ["fillMode", "returnKeyType", "value", "onSubmitEditing"];
|
|
5145
5169
|
var DatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5146
5170
|
var _ref$fillMode = _ref.fillMode,
|
|
5147
5171
|
fillMode = _ref$fillMode === void 0 ? 'native' : _ref$fillMode,
|
|
5148
5172
|
returnKeyType = _ref.returnKeyType,
|
|
5149
5173
|
value = _ref.value,
|
|
5150
5174
|
onSubmitEditing = _ref.onSubmitEditing,
|
|
5151
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5175
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
5152
5176
|
// in apps, final-form can give a string value that will break the component
|
|
5153
5177
|
var currentValue = value || undefined;
|
|
5154
5178
|
if (fillMode === 'keyboard') {
|
|
@@ -5251,11 +5275,11 @@ function InputPressable(_ref) {
|
|
|
5251
5275
|
return /*#__PURE__*/jsx(Pressable$2, _objectSpread({}, props));
|
|
5252
5276
|
}
|
|
5253
5277
|
|
|
5254
|
-
var _excluded$
|
|
5278
|
+
var _excluded$i = ["isPasswordDefaultVisible", "right"];
|
|
5255
5279
|
var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5256
5280
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
5257
5281
|
right = _ref.right,
|
|
5258
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5282
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
5259
5283
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
5260
5284
|
_useState2 = _slicedToArray(_useState, 2),
|
|
5261
5285
|
isVisible = _useState2[0],
|
|
@@ -5283,7 +5307,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5283
5307
|
}));
|
|
5284
5308
|
});
|
|
5285
5309
|
|
|
5286
|
-
var _excluded$
|
|
5310
|
+
var _excluded$h = ["returnKeyType", "autoComplete", "phoneNumberLength", "value", "onChange"];
|
|
5287
5311
|
function isPhoneNumberValid(number) {
|
|
5288
5312
|
return isValidNumber(number);
|
|
5289
5313
|
}
|
|
@@ -5298,7 +5322,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5298
5322
|
phoneNumberLength = _ref$phoneNumberLengt === void 0 ? 10 : _ref$phoneNumberLengt,
|
|
5299
5323
|
value = _ref.value,
|
|
5300
5324
|
onChange = _ref.onChange,
|
|
5301
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5325
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
5302
5326
|
var _useState = useState(value),
|
|
5303
5327
|
_useState2 = _slicedToArray(_useState, 2),
|
|
5304
5328
|
currentValue = _useState2[0],
|
|
@@ -5346,46 +5370,29 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5346
5370
|
var getTypographyColor = function (type) {
|
|
5347
5371
|
return type ? 'white' : 'black';
|
|
5348
5372
|
};
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
return theme.kitt.spacing * 2;
|
|
5354
|
-
}, function (_ref2) {
|
|
5355
|
-
var theme = _ref2.theme,
|
|
5356
|
-
type = _ref2.type;
|
|
5357
|
-
if (type === 'success') {
|
|
5358
|
-
return theme.kitt.forms.inputTag.success.backgroundColor;
|
|
5359
|
-
}
|
|
5360
|
-
if (type === 'danger') {
|
|
5361
|
-
return theme.kitt.forms.inputTag.danger.backgroundColor;
|
|
5362
|
-
}
|
|
5363
|
-
return theme.kitt.forms.inputTag["default"].backgroundColor;
|
|
5364
|
-
}, function (_ref3) {
|
|
5365
|
-
var theme = _ref3.theme;
|
|
5366
|
-
return theme.kitt.forms.inputTag.borderRadius;
|
|
5367
|
-
});
|
|
5368
|
-
var IconContainer = /*#__PURE__*/styled(View$2).withConfig({
|
|
5369
|
-
displayName: "InputTag__IconContainer"
|
|
5370
|
-
})(["margin-right:", "px;"], function (_ref4) {
|
|
5371
|
-
var theme = _ref4.theme;
|
|
5372
|
-
return theme.kitt.spacing;
|
|
5373
|
-
});
|
|
5374
|
-
function InputTag(_ref5) {
|
|
5375
|
-
var children = _ref5.children,
|
|
5376
|
-
type = _ref5.type,
|
|
5377
|
-
icon = _ref5.icon;
|
|
5373
|
+
function InputTag(_ref) {
|
|
5374
|
+
var children = _ref.children,
|
|
5375
|
+
type = _ref.type,
|
|
5376
|
+
icon = _ref.icon;
|
|
5378
5377
|
var typographyColor = getTypographyColor(type);
|
|
5379
5378
|
var theme = useTheme();
|
|
5380
|
-
return /*#__PURE__*/jsxs(
|
|
5381
|
-
|
|
5382
|
-
|
|
5379
|
+
return /*#__PURE__*/jsxs(View, {
|
|
5380
|
+
alignItems: "center",
|
|
5381
|
+
justifyContent: "center",
|
|
5382
|
+
flexDirection: "row",
|
|
5383
|
+
alignSelf: "flex-start",
|
|
5384
|
+
overflow: "hidden",
|
|
5385
|
+
paddingX: "kitt.2",
|
|
5386
|
+
backgroundColor: "kitt.forms.inputTag.".concat(type || 'default', ".backgroundColor"),
|
|
5387
|
+
borderRadius: "kitt.forms.inputTag.borderRadius",
|
|
5388
|
+
children: [icon ? /*#__PURE__*/jsx(View, {
|
|
5389
|
+
marginRight: "kitt.1",
|
|
5383
5390
|
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
5384
5391
|
icon: icon,
|
|
5385
5392
|
size: theme.kitt.forms.inputTag.iconSize,
|
|
5386
5393
|
color: typographyColor
|
|
5387
5394
|
})
|
|
5388
|
-
}), /*#__PURE__*/jsx(Typography.Text, {
|
|
5395
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
5389
5396
|
base: "body-small",
|
|
5390
5397
|
color: typographyColor,
|
|
5391
5398
|
children: children
|
|
@@ -5560,49 +5567,22 @@ var Radio = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5560
5567
|
});
|
|
5561
5568
|
});
|
|
5562
5569
|
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
var
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
}
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
return $isLast ? theme.kitt.forms.radioButtonGroup.item.borderRadius : 0;
|
|
5580
|
-
}, function (_ref5) {
|
|
5581
|
-
var theme = _ref5.theme,
|
|
5582
|
-
$isLast = _ref5.$isLast;
|
|
5583
|
-
return $isLast ? theme.kitt.forms.radioButtonGroup.item.borderRadius : 0;
|
|
5584
|
-
}, function (_ref6) {
|
|
5585
|
-
var theme = _ref6.theme,
|
|
5586
|
-
$isFirst = _ref6.$isFirst;
|
|
5587
|
-
return $isFirst ? theme.kitt.forms.radioButtonGroup.item.borderWidth : 0;
|
|
5588
|
-
});
|
|
5589
|
-
function AnimatedContainer(_ref7) {
|
|
5590
|
-
var children = _ref7.children,
|
|
5591
|
-
isFocused = _ref7.isFocused,
|
|
5592
|
-
isPressed = _ref7.isPressed,
|
|
5593
|
-
isSelected = _ref7.isSelected,
|
|
5594
|
-
isDisabled = _ref7.isDisabled,
|
|
5595
|
-
isFirst = _ref7.isFirst,
|
|
5596
|
-
isLast = _ref7.isLast,
|
|
5597
|
-
animatedStyles = _ref7.animatedStyles;
|
|
5598
|
-
return /*#__PURE__*/jsx(StyledAnimatedView, {
|
|
5599
|
-
style: [animatedStyles],
|
|
5600
|
-
$isFocused: isFocused,
|
|
5601
|
-
$isPressed: isPressed,
|
|
5602
|
-
$isSelected: isSelected,
|
|
5603
|
-
$isDisabled: isDisabled,
|
|
5604
|
-
$isFirst: isFirst,
|
|
5605
|
-
$isLast: isLast,
|
|
5570
|
+
function AnimatedContainer(_ref) {
|
|
5571
|
+
var children = _ref.children,
|
|
5572
|
+
isFirst = _ref.isFirst,
|
|
5573
|
+
isLast = _ref.isLast,
|
|
5574
|
+
animatedStyles = _ref.animatedStyles;
|
|
5575
|
+
var sx = useSx();
|
|
5576
|
+
var styles = sx({
|
|
5577
|
+
borderWidth: 'kitt.forms.radioButtonGroup.item.borderWidth',
|
|
5578
|
+
borderTopLeftRadius: isFirst ? 'kitt.forms.radioButtonGroup.item.borderRadius' : 0,
|
|
5579
|
+
borderBottomLeftRadius: isFirst ? 'kitt.forms.radioButtonGroup.item.borderRadius' : 0,
|
|
5580
|
+
borderTopRightRadius: isLast ? 'kitt.forms.radioButtonGroup.item.borderRadius' : 0,
|
|
5581
|
+
borderBottomRightRadius: isLast ? 'kitt.forms.radioButtonGroup.item.borderRadius' : 0,
|
|
5582
|
+
borderLeftWidth: isFirst ? 'kitt.forms.radioButtonGroup.item.borderWidth' : 0
|
|
5583
|
+
});
|
|
5584
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
5585
|
+
style: [styles, animatedStyles],
|
|
5606
5586
|
children: children
|
|
5607
5587
|
});
|
|
5608
5588
|
}
|
|
@@ -5807,7 +5787,7 @@ function RadioButton(_ref) {
|
|
|
5807
5787
|
});
|
|
5808
5788
|
}
|
|
5809
5789
|
|
|
5810
|
-
var _excluded$
|
|
5790
|
+
var _excluded$g = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
|
|
5811
5791
|
function RadioButtonGroupItem(_ref) {
|
|
5812
5792
|
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
5813
5793
|
return /*#__PURE__*/jsx(RadioButton, _objectSpread({}, props));
|
|
@@ -5820,7 +5800,7 @@ function RadioButtonGroup(_ref2) {
|
|
|
5820
5800
|
onFocus = _ref2.onFocus,
|
|
5821
5801
|
onBlur = _ref2.onBlur,
|
|
5822
5802
|
onChange = _ref2.onChange,
|
|
5823
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
5803
|
+
props = _objectWithoutProperties(_ref2, _excluded$g);
|
|
5824
5804
|
var _useState = useState(value),
|
|
5825
5805
|
_useState2 = _slicedToArray(_useState, 2),
|
|
5826
5806
|
currentValue = _useState2[0],
|
|
@@ -5862,13 +5842,13 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5862
5842
|
}, props));
|
|
5863
5843
|
});
|
|
5864
5844
|
|
|
5865
|
-
var _excluded$
|
|
5845
|
+
var _excluded$f = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
|
|
5866
5846
|
function FullscreenModalBody(_ref) {
|
|
5867
5847
|
var children = _ref.children,
|
|
5868
5848
|
shouldHandleBottomNotch = _ref.shouldHandleBottomNotch,
|
|
5869
5849
|
style = _ref.style,
|
|
5870
5850
|
shouldHandleTopNotch = _ref.shouldHandleTopNotch,
|
|
5871
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5851
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
5872
5852
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
5873
5853
|
bottom = _useSafeAreaInsets.bottom,
|
|
5874
5854
|
top = _useSafeAreaInsets.top;
|
|
@@ -5885,14 +5865,14 @@ function FullscreenModalBody(_ref) {
|
|
|
5885
5865
|
}));
|
|
5886
5866
|
}
|
|
5887
5867
|
|
|
5888
|
-
var _excluded$
|
|
5868
|
+
var _excluded$e = ["shouldHandleBottomNotch", "hasSeparator", "children"];
|
|
5889
5869
|
function FullscreenModalFooter(_ref) {
|
|
5890
5870
|
var _ref$shouldHandleBott = _ref.shouldHandleBottomNotch,
|
|
5891
5871
|
shouldHandleBottomNotch = _ref$shouldHandleBott === void 0 ? true : _ref$shouldHandleBott,
|
|
5892
5872
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
5893
5873
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
5894
5874
|
children = _ref.children,
|
|
5895
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5875
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
5896
5876
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
5897
5877
|
bottom = _useSafeAreaInsets.bottom;
|
|
5898
5878
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
@@ -6108,13 +6088,13 @@ function FullscreenModalAnimation(_ref) {
|
|
|
6108
6088
|
});
|
|
6109
6089
|
}
|
|
6110
6090
|
|
|
6111
|
-
var _excluded$
|
|
6091
|
+
var _excluded$d = ["children", "visible", "onClose", "onExited"];
|
|
6112
6092
|
function FullscreenModalBehaviour(_ref) {
|
|
6113
6093
|
var children = _ref.children,
|
|
6114
6094
|
visible = _ref.visible,
|
|
6115
6095
|
onClose = _ref.onClose,
|
|
6116
6096
|
onExited = _ref.onExited,
|
|
6117
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6097
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
6118
6098
|
var _useState = useState(visible),
|
|
6119
6099
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6120
6100
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -6158,7 +6138,7 @@ function FullscreenModalContainer(_ref) {
|
|
|
6158
6138
|
});
|
|
6159
6139
|
}
|
|
6160
6140
|
|
|
6161
|
-
var _excluded$
|
|
6141
|
+
var _excluded$c = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
|
|
6162
6142
|
function FullscreenModalHeader(_ref) {
|
|
6163
6143
|
var _ref$hasSeparator = _ref.hasSeparator,
|
|
6164
6144
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
@@ -6169,7 +6149,7 @@ function FullscreenModalHeader(_ref) {
|
|
|
6169
6149
|
left = _ref.left,
|
|
6170
6150
|
_ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
|
|
6171
6151
|
shouldHandleTopNotch = _ref$shouldHandleTopN === void 0 ? true : _ref$shouldHandleTopN,
|
|
6172
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6152
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
6173
6153
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
6174
6154
|
top = _useSafeAreaInsets.top;
|
|
6175
6155
|
var hasRight = Boolean(right);
|
|
@@ -6282,98 +6262,57 @@ function useKittMapConfig() {
|
|
|
6282
6262
|
return context;
|
|
6283
6263
|
}
|
|
6284
6264
|
|
|
6285
|
-
var _excluded$
|
|
6286
|
-
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
6287
|
-
displayName: "ListItemContent__ContentView"
|
|
6288
|
-
})(["flex:1 0 0%;align-self:center;"]);
|
|
6265
|
+
var _excluded$b = ["children"];
|
|
6289
6266
|
function ListItemContent(_ref) {
|
|
6290
6267
|
var children = _ref.children,
|
|
6291
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6292
|
-
return /*#__PURE__*/jsx(
|
|
6268
|
+
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
6269
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
6270
|
+
alignSelf: "center",
|
|
6271
|
+
flexBasis: "0%",
|
|
6272
|
+
flexGrow: 1,
|
|
6273
|
+
flexShrink: 0
|
|
6274
|
+
}, rest), {}, {
|
|
6293
6275
|
children: children
|
|
6294
6276
|
}));
|
|
6295
6277
|
}
|
|
6296
6278
|
|
|
6297
|
-
var _excluded$
|
|
6279
|
+
var _excluded$a = ["children", "side"],
|
|
6298
6280
|
_excluded2$2 = ["children", "align"];
|
|
6299
|
-
var SideContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
6300
|
-
displayName: "ListItemSideContent__SideContainerView"
|
|
6301
|
-
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
6302
|
-
var theme = _ref.theme,
|
|
6303
|
-
side = _ref.side;
|
|
6304
|
-
return side === 'right' ? "".concat(theme.kitt.listItem.innerMargin, "px") : 0;
|
|
6305
|
-
}, function (_ref2) {
|
|
6306
|
-
var theme = _ref2.theme,
|
|
6307
|
-
side = _ref2.side;
|
|
6308
|
-
return side === 'left' ? "".concat(theme.kitt.listItem.innerMargin, "px") : 0;
|
|
6309
|
-
});
|
|
6310
|
-
|
|
6311
6281
|
// Handles the vertical alignment of the side elements of the list item
|
|
6312
|
-
function ListItemSideContainer(
|
|
6313
|
-
var children =
|
|
6314
|
-
|
|
6315
|
-
side =
|
|
6316
|
-
rest = _objectWithoutProperties(
|
|
6317
|
-
return /*#__PURE__*/jsx(
|
|
6318
|
-
|
|
6282
|
+
function ListItemSideContainer(_ref) {
|
|
6283
|
+
var children = _ref.children,
|
|
6284
|
+
_ref$side = _ref.side,
|
|
6285
|
+
side = _ref$side === void 0 ? 'left' : _ref$side,
|
|
6286
|
+
rest = _objectWithoutProperties(_ref, _excluded$a);
|
|
6287
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
6288
|
+
flexDirection: "row",
|
|
6289
|
+
marginLeft: side === 'right' ? 'kitt.2' : undefined,
|
|
6290
|
+
marginRight: side === 'left' ? 'kitt.2' : undefined
|
|
6319
6291
|
}, rest), {}, {
|
|
6320
6292
|
children: children
|
|
6321
6293
|
}));
|
|
6322
6294
|
}
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
var children = _ref5.children,
|
|
6331
|
-
_ref5$align = _ref5.align,
|
|
6332
|
-
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
6333
|
-
rest = _objectWithoutProperties(_ref5, _excluded2$2);
|
|
6334
|
-
return /*#__PURE__*/jsx(SideContentView, _objectSpread(_objectSpread({
|
|
6335
|
-
align: align
|
|
6295
|
+
function ListItemSideContent(_ref2) {
|
|
6296
|
+
var children = _ref2.children,
|
|
6297
|
+
_ref2$align = _ref2.align,
|
|
6298
|
+
align = _ref2$align === void 0 ? 'auto' : _ref2$align,
|
|
6299
|
+
rest = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
6300
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
6301
|
+
alignSelf: align
|
|
6336
6302
|
}, rest), {}, {
|
|
6337
6303
|
children: children
|
|
6338
6304
|
}));
|
|
6339
6305
|
}
|
|
6340
6306
|
|
|
6341
|
-
var _excluded$
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
borders = _ref2.borders;
|
|
6351
|
-
var borderWidth = theme.kitt.listItem.borderWidth;
|
|
6352
|
-
if (borders === 'top') {
|
|
6353
|
-
return "border-top-width: ".concat(borderWidth, "px");
|
|
6354
|
-
}
|
|
6355
|
-
if (borders === 'bottom') {
|
|
6356
|
-
return "border-bottom-width: ".concat(borderWidth, "px");
|
|
6357
|
-
}
|
|
6358
|
-
if (borders === 'both') {
|
|
6359
|
-
return css(["border-top-width:", "px;border-bottom-width:", "px;"], borderWidth, borderWidth);
|
|
6360
|
-
}
|
|
6361
|
-
return 'border: none';
|
|
6362
|
-
}, function (_ref3) {
|
|
6363
|
-
var theme = _ref3.theme;
|
|
6364
|
-
return theme.kitt.listItem.borderColor;
|
|
6365
|
-
}, function (_ref4) {
|
|
6366
|
-
var theme = _ref4.theme;
|
|
6367
|
-
return theme.kitt.colors.uiBackgroundLight;
|
|
6368
|
-
});
|
|
6369
|
-
function ListItem(_ref5) {
|
|
6370
|
-
var children = _ref5.children,
|
|
6371
|
-
withPadding = _ref5.withPadding,
|
|
6372
|
-
borders = _ref5.borders,
|
|
6373
|
-
left = _ref5.left,
|
|
6374
|
-
right = _ref5.right,
|
|
6375
|
-
onPress = _ref5.onPress,
|
|
6376
|
-
rest = _objectWithoutProperties(_ref5, _excluded$7);
|
|
6307
|
+
var _excluded$9 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
6308
|
+
function ListItem(_ref) {
|
|
6309
|
+
var children = _ref.children,
|
|
6310
|
+
withPadding = _ref.withPadding,
|
|
6311
|
+
borders = _ref.borders,
|
|
6312
|
+
left = _ref.left,
|
|
6313
|
+
right = _ref.right,
|
|
6314
|
+
onPress = _ref.onPress,
|
|
6315
|
+
rest = _objectWithoutProperties(_ref, _excluded$9);
|
|
6377
6316
|
var Wrapper = onPress ? Pressable$2 : Fragment$1;
|
|
6378
6317
|
var wrapperProps = onPress ? _objectSpread({
|
|
6379
6318
|
accessibilityRole: 'button',
|
|
@@ -6381,9 +6320,14 @@ function ListItem(_ref5) {
|
|
|
6381
6320
|
}, rest) : undefined;
|
|
6382
6321
|
var containerProps = onPress ? undefined : rest;
|
|
6383
6322
|
return /*#__PURE__*/jsx(Wrapper, _objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
6384
|
-
children: /*#__PURE__*/jsxs(
|
|
6385
|
-
|
|
6386
|
-
|
|
6323
|
+
children: /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({
|
|
6324
|
+
flexDirection: "row",
|
|
6325
|
+
paddingX: withPadding ? 'kitt.listItem.horizontalPadding' : undefined,
|
|
6326
|
+
paddingY: withPadding ? 'kitt.listItem.verticalPadding' : undefined,
|
|
6327
|
+
borderColor: "kitt.listItem.borderColor",
|
|
6328
|
+
backgroundColor: "kitt.uiBackgroundLight",
|
|
6329
|
+
borderTopWidth: borders === 'top' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
6330
|
+
borderBottomWidth: borders === 'bottom' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined
|
|
6387
6331
|
}, containerProps), {}, {
|
|
6388
6332
|
children: [left ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
6389
6333
|
side: "left",
|
|
@@ -6852,6 +6796,71 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6852
6796
|
'subtle-dark': theme.button['subtle-dark'],
|
|
6853
6797
|
disabled: theme.button.disabled
|
|
6854
6798
|
},
|
|
6799
|
+
choices: {
|
|
6800
|
+
item: {
|
|
6801
|
+
"default": {
|
|
6802
|
+
backgroundColor: theme.choices.item.backgroundColor["default"]
|
|
6803
|
+
},
|
|
6804
|
+
disabled: {
|
|
6805
|
+
backgroundColor: theme.choices.item.backgroundColor.disabled,
|
|
6806
|
+
borderColor: theme.choices.item.disabled.border.color
|
|
6807
|
+
},
|
|
6808
|
+
selected: {
|
|
6809
|
+
backgroundColor: theme.choices.item.backgroundColor.selected
|
|
6810
|
+
},
|
|
6811
|
+
pressed: {
|
|
6812
|
+
backgroundColor: theme.choices.item.backgroundColor.pressed
|
|
6813
|
+
},
|
|
6814
|
+
hover: {
|
|
6815
|
+
backgroundColor: theme.choices.item.backgroundColor.hover
|
|
6816
|
+
},
|
|
6817
|
+
hoverWhenSelected: {
|
|
6818
|
+
backgroundColor: theme.choices.item.backgroundColor.hoverWhenSelected
|
|
6819
|
+
}
|
|
6820
|
+
}
|
|
6821
|
+
},
|
|
6822
|
+
tag: {
|
|
6823
|
+
primary: {
|
|
6824
|
+
fill: {
|
|
6825
|
+
backgroundColor: theme.tag.primary.fill.backgroundColor,
|
|
6826
|
+
borderColor: theme.tag.primary.fill.borderColor
|
|
6827
|
+
},
|
|
6828
|
+
outline: {
|
|
6829
|
+
backgroundColor: theme.tag.primary.outline.backgroundColor,
|
|
6830
|
+
borderColor: theme.tag.primary.outline.borderColor
|
|
6831
|
+
}
|
|
6832
|
+
},
|
|
6833
|
+
"default": {
|
|
6834
|
+
fill: {
|
|
6835
|
+
backgroundColor: theme.tag["default"].fill.backgroundColor,
|
|
6836
|
+
borderColor: theme.tag["default"].fill.borderColor
|
|
6837
|
+
},
|
|
6838
|
+
outline: {
|
|
6839
|
+
backgroundColor: theme.tag["default"].outline.backgroundColor,
|
|
6840
|
+
borderColor: theme.tag["default"].outline.borderColor
|
|
6841
|
+
}
|
|
6842
|
+
},
|
|
6843
|
+
danger: {
|
|
6844
|
+
fill: {
|
|
6845
|
+
backgroundColor: theme.tag.danger.fill.backgroundColor,
|
|
6846
|
+
borderColor: theme.tag.danger.fill.borderColor
|
|
6847
|
+
},
|
|
6848
|
+
outline: {
|
|
6849
|
+
backgroundColor: theme.tag.danger.outline.backgroundColor,
|
|
6850
|
+
borderColor: theme.tag.danger.outline.borderColor
|
|
6851
|
+
}
|
|
6852
|
+
},
|
|
6853
|
+
warn: {
|
|
6854
|
+
fill: {
|
|
6855
|
+
backgroundColor: theme.tag.warn.fill.backgroundColor,
|
|
6856
|
+
borderColor: theme.tag.warn.fill.borderColor
|
|
6857
|
+
},
|
|
6858
|
+
outline: {
|
|
6859
|
+
backgroundColor: theme.tag.warn.outline.backgroundColor,
|
|
6860
|
+
borderColor: theme.tag.warn.outline.borderColor
|
|
6861
|
+
}
|
|
6862
|
+
}
|
|
6863
|
+
},
|
|
6855
6864
|
tooltip: {
|
|
6856
6865
|
backgroundColor: theme.tooltip.backgroundColor
|
|
6857
6866
|
},
|
|
@@ -6875,6 +6884,17 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6875
6884
|
input: {
|
|
6876
6885
|
states: theme.forms.input.states
|
|
6877
6886
|
},
|
|
6887
|
+
inputTag: {
|
|
6888
|
+
danger: {
|
|
6889
|
+
backgroundColor: theme.forms.inputTag.danger.backgroundColor
|
|
6890
|
+
},
|
|
6891
|
+
"default": {
|
|
6892
|
+
backgroundColor: theme.forms.inputTag["default"].backgroundColor
|
|
6893
|
+
},
|
|
6894
|
+
success: {
|
|
6895
|
+
backgroundColor: theme.forms.inputTag.success.backgroundColor
|
|
6896
|
+
}
|
|
6897
|
+
},
|
|
6878
6898
|
radioButtonGroup: {
|
|
6879
6899
|
item: {
|
|
6880
6900
|
borderColor: theme.forms.radioButtonGroup.item.borderColor,
|
|
@@ -6973,6 +6993,49 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6973
6993
|
dark: {
|
|
6974
6994
|
backgroundColor: theme.highlight.dark.backgroundColor
|
|
6975
6995
|
}
|
|
6996
|
+
},
|
|
6997
|
+
verticalSteps: {
|
|
6998
|
+
active: {
|
|
6999
|
+
icon: {
|
|
7000
|
+
backgroundColor: theme.verticalSteps.active.icon.backgroundColor,
|
|
7001
|
+
textColor: theme.verticalSteps.active.icon.textColor
|
|
7002
|
+
}
|
|
7003
|
+
},
|
|
7004
|
+
done: {
|
|
7005
|
+
icon: {
|
|
7006
|
+
backgroundColor: theme.verticalSteps.done.icon.backgroundColor,
|
|
7007
|
+
textColor: theme.verticalSteps.done.icon.textColor
|
|
7008
|
+
}
|
|
7009
|
+
},
|
|
7010
|
+
"default": {
|
|
7011
|
+
icon: {
|
|
7012
|
+
backgroundColor: theme.verticalSteps["default"].icon.backgroundColor,
|
|
7013
|
+
textColor: theme.verticalSteps["default"].icon.textColor
|
|
7014
|
+
}
|
|
7015
|
+
}
|
|
7016
|
+
},
|
|
7017
|
+
listItem: {
|
|
7018
|
+
borderColor: theme.listItem.borderColor
|
|
7019
|
+
},
|
|
7020
|
+
picker: {
|
|
7021
|
+
ios: {
|
|
7022
|
+
item: {
|
|
7023
|
+
selected: {
|
|
7024
|
+
color: theme.picker.ios.selected.color
|
|
7025
|
+
}
|
|
7026
|
+
}
|
|
7027
|
+
},
|
|
7028
|
+
android: {
|
|
7029
|
+
item: {
|
|
7030
|
+
"default": {
|
|
7031
|
+
backgroundColor: theme.picker.android["default"].backgroundColor
|
|
7032
|
+
},
|
|
7033
|
+
selected: {
|
|
7034
|
+
color: theme.picker.android.selected.color,
|
|
7035
|
+
backgroundColor: theme.picker.android.selected.backgroundColor
|
|
7036
|
+
}
|
|
7037
|
+
}
|
|
7038
|
+
}
|
|
6976
7039
|
}
|
|
6977
7040
|
}),
|
|
6978
7041
|
app: appTheme === null || appTheme === void 0 ? void 0 : appTheme.colors
|
|
@@ -7007,6 +7070,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7007
7070
|
cardModal: {
|
|
7008
7071
|
borderRadius: theme.cardModal.borderRadius
|
|
7009
7072
|
},
|
|
7073
|
+
choices: {
|
|
7074
|
+
item: {
|
|
7075
|
+
borderRadius: theme.choices.item.borderRadius
|
|
7076
|
+
}
|
|
7077
|
+
},
|
|
7010
7078
|
dialogModal: {
|
|
7011
7079
|
borderRadius: theme.dialogModal.borderRadius
|
|
7012
7080
|
},
|
|
@@ -7014,6 +7082,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7014
7082
|
input: {
|
|
7015
7083
|
borderRadius: theme.forms.input.borderRadius
|
|
7016
7084
|
},
|
|
7085
|
+
inputTag: {
|
|
7086
|
+
borderRadius: theme.forms.inputTag.borderRadius
|
|
7087
|
+
},
|
|
7017
7088
|
radioButtonGroup: {
|
|
7018
7089
|
item: {
|
|
7019
7090
|
borderRadius: theme.forms.radioButtonGroup.item.borderRadius
|
|
@@ -7035,6 +7106,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7035
7106
|
iconButton: {
|
|
7036
7107
|
borderRadius: theme.iconButton.borderRadius
|
|
7037
7108
|
},
|
|
7109
|
+
tag: {
|
|
7110
|
+
borderRadius: theme.tag.borderRadius
|
|
7111
|
+
},
|
|
7038
7112
|
tooltip: {
|
|
7039
7113
|
borderRadius: theme.tooltip.borderRadius
|
|
7040
7114
|
},
|
|
@@ -7146,6 +7220,13 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7146
7220
|
button: {
|
|
7147
7221
|
borderWidth: theme.button.borderWidth
|
|
7148
7222
|
},
|
|
7223
|
+
choices: {
|
|
7224
|
+
item: {
|
|
7225
|
+
disabled: {
|
|
7226
|
+
borderWidth: theme.choices.item.disabled.border.width
|
|
7227
|
+
}
|
|
7228
|
+
}
|
|
7229
|
+
},
|
|
7149
7230
|
iconButton: {
|
|
7150
7231
|
borderWidth: theme.iconButton.borderWidth
|
|
7151
7232
|
},
|
|
@@ -7172,10 +7253,47 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7172
7253
|
footer: {
|
|
7173
7254
|
borderWidth: theme.cardModal.footer.borderWidth
|
|
7174
7255
|
}
|
|
7175
|
-
}
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7256
|
+
},
|
|
7257
|
+
listItem: {
|
|
7258
|
+
borderWidth: theme.listItem.borderWidth
|
|
7259
|
+
},
|
|
7260
|
+
tag: {
|
|
7261
|
+
primary: {
|
|
7262
|
+
fill: {
|
|
7263
|
+
borderWidth: theme.tag.primary.fill.borderWidth
|
|
7264
|
+
},
|
|
7265
|
+
outline: {
|
|
7266
|
+
borderWidth: theme.tag.primary.outline.borderWidth
|
|
7267
|
+
}
|
|
7268
|
+
},
|
|
7269
|
+
"default": {
|
|
7270
|
+
fill: {
|
|
7271
|
+
borderWidth: theme.tag["default"].fill.borderWidth
|
|
7272
|
+
},
|
|
7273
|
+
outline: {
|
|
7274
|
+
borderWidth: theme.tag["default"].outline.borderWidth
|
|
7275
|
+
}
|
|
7276
|
+
},
|
|
7277
|
+
danger: {
|
|
7278
|
+
fill: {
|
|
7279
|
+
borderWidth: theme.tag.danger.fill.borderWidth
|
|
7280
|
+
},
|
|
7281
|
+
outline: {
|
|
7282
|
+
borderWidth: theme.tag.danger.outline.borderWidth
|
|
7283
|
+
}
|
|
7284
|
+
},
|
|
7285
|
+
warn: {
|
|
7286
|
+
fill: {
|
|
7287
|
+
borderWidth: theme.tag.warn.fill.borderWidth
|
|
7288
|
+
},
|
|
7289
|
+
outline: {
|
|
7290
|
+
borderWidth: theme.tag.warn.outline.borderWidth
|
|
7291
|
+
}
|
|
7292
|
+
}
|
|
7293
|
+
}
|
|
7294
|
+
},
|
|
7295
|
+
app: appTheme === null || appTheme === void 0 ? void 0 : appTheme.borderWidths
|
|
7296
|
+
},
|
|
7179
7297
|
sizes: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, spaces.positive), spaces.negative), overridenNativeBaseSizeandSpaceScale), {}, {
|
|
7180
7298
|
kitt: {
|
|
7181
7299
|
avatar: {
|
|
@@ -7243,6 +7361,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7243
7361
|
},
|
|
7244
7362
|
textArea: {
|
|
7245
7363
|
minHeight: theme.forms.textArea.minHeight
|
|
7364
|
+
},
|
|
7365
|
+
timePicker: {
|
|
7366
|
+
minWidth: theme.forms.timePicker.minWidth
|
|
7246
7367
|
}
|
|
7247
7368
|
},
|
|
7248
7369
|
iconButton: {
|
|
@@ -7255,6 +7376,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7255
7376
|
height: theme.fullscreenModal.header.height
|
|
7256
7377
|
}
|
|
7257
7378
|
},
|
|
7379
|
+
pageLoader: {
|
|
7380
|
+
size: theme.pageLoader.size
|
|
7381
|
+
},
|
|
7258
7382
|
tooltip: {
|
|
7259
7383
|
maxWidth: theme.tooltip.maxWidth,
|
|
7260
7384
|
arrow: {
|
|
@@ -7274,6 +7398,16 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7274
7398
|
size: theme.skeleton.shape.square.size
|
|
7275
7399
|
}
|
|
7276
7400
|
}
|
|
7401
|
+
},
|
|
7402
|
+
picker: {
|
|
7403
|
+
ios: {
|
|
7404
|
+
"default": {
|
|
7405
|
+
height: theme.picker.ios["default"].height
|
|
7406
|
+
},
|
|
7407
|
+
landscape: {
|
|
7408
|
+
height: theme.picker.ios.landscape.height
|
|
7409
|
+
}
|
|
7410
|
+
}
|
|
7277
7411
|
}
|
|
7278
7412
|
},
|
|
7279
7413
|
app: appTheme === null || appTheme === void 0 ? void 0 : appTheme.sizes
|
|
@@ -7319,10 +7453,26 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7319
7453
|
highlight: {
|
|
7320
7454
|
padding: theme.highlight.padding
|
|
7321
7455
|
},
|
|
7456
|
+
listItem: {
|
|
7457
|
+
verticalPadding: theme.listItem.verticalPadding,
|
|
7458
|
+
horizontalPadding: theme.listItem.horizontalPadding
|
|
7459
|
+
},
|
|
7460
|
+
tag: {
|
|
7461
|
+
verticalPadding: theme.tag.verticalPadding,
|
|
7462
|
+
horizontalPadding: theme.tag.horizontalPadding
|
|
7463
|
+
},
|
|
7322
7464
|
tooltip: {
|
|
7323
7465
|
horizontalPadding: theme.tooltip.horizontalPadding,
|
|
7324
7466
|
verticalPadding: theme.tooltip.verticalPadding,
|
|
7325
7467
|
floatingPadding: theme.tooltip.floatingPadding
|
|
7468
|
+
},
|
|
7469
|
+
picker: {
|
|
7470
|
+
android: {
|
|
7471
|
+
item: {
|
|
7472
|
+
verticalPadding: theme.picker.android.verticalPadding,
|
|
7473
|
+
horizontalPadding: theme.picker.android.horizontalPadding
|
|
7474
|
+
}
|
|
7475
|
+
}
|
|
7326
7476
|
}
|
|
7327
7477
|
},
|
|
7328
7478
|
app: appTheme === null || appTheme === void 0 ? void 0 : appTheme.space
|
|
@@ -7892,7 +8042,7 @@ function KittNativeBaseProvider(_ref) {
|
|
|
7892
8042
|
});
|
|
7893
8043
|
}
|
|
7894
8044
|
|
|
7895
|
-
var _excluded$
|
|
8045
|
+
var _excluded$8 = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
|
|
7896
8046
|
function SimpleContainer(_ref) {
|
|
7897
8047
|
var children = _ref.children;
|
|
7898
8048
|
return children;
|
|
@@ -7906,7 +8056,7 @@ function NavigationModalBehaviour(_ref2) {
|
|
|
7906
8056
|
onEnter = _ref2.onEnter,
|
|
7907
8057
|
onExit = _ref2.onExit,
|
|
7908
8058
|
onClose = _ref2.onClose,
|
|
7909
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
8059
|
+
props = _objectWithoutProperties(_ref2, _excluded$8);
|
|
7910
8060
|
var AnimationComponent = useBreakpointValue({
|
|
7911
8061
|
base: FullscreenModalAnimation,
|
|
7912
8062
|
small: CardModalAnimation
|
|
@@ -8174,47 +8324,46 @@ function AnimatedFilledCircle() {
|
|
|
8174
8324
|
});
|
|
8175
8325
|
}
|
|
8176
8326
|
|
|
8177
|
-
var PageLoaderContainer = /*#__PURE__*/styled.View.withConfig({
|
|
8178
|
-
displayName: "PageLoader__PageLoaderContainer"
|
|
8179
|
-
})(["transform:scale(-1) rotate(90deg);position:relative;width:", "px;height:", "px;"], function (_ref) {
|
|
8180
|
-
var theme = _ref.theme;
|
|
8181
|
-
return theme.kitt.pageLoader.size;
|
|
8182
|
-
}, function (_ref2) {
|
|
8183
|
-
var theme = _ref2.theme;
|
|
8184
|
-
return theme.kitt.pageLoader.size;
|
|
8185
|
-
});
|
|
8186
8327
|
function PageLoader() {
|
|
8187
|
-
|
|
8328
|
+
var sharedTransformStyle = {
|
|
8329
|
+
style: {
|
|
8330
|
+
/* Needed to make the animation starting from the top of the circles */
|
|
8331
|
+
transform: [{
|
|
8332
|
+
rotate: '90deg'
|
|
8333
|
+
}, {
|
|
8334
|
+
scale: -1
|
|
8335
|
+
}]
|
|
8336
|
+
}
|
|
8337
|
+
};
|
|
8338
|
+
return /*#__PURE__*/jsxs(View, {
|
|
8339
|
+
position: "relative",
|
|
8340
|
+
height: "kitt.pageLoader.size",
|
|
8341
|
+
width: "kitt.pageLoader.size",
|
|
8342
|
+
_ios: sharedTransformStyle,
|
|
8343
|
+
_android: sharedTransformStyle,
|
|
8188
8344
|
children: [/*#__PURE__*/jsx(AnimatedBackgroundCircle, {}), /*#__PURE__*/jsx(AnimatedFilledCircle, {})]
|
|
8189
8345
|
});
|
|
8190
8346
|
}
|
|
8191
8347
|
|
|
8192
|
-
var ContainerPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
8193
|
-
displayName: "PickerItem__ContainerPressable"
|
|
8194
|
-
})(["padding:", ";background-color:", ";"], function (_ref) {
|
|
8195
|
-
var theme = _ref.theme;
|
|
8196
|
-
return theme.kitt.picker.android.padding;
|
|
8197
|
-
}, function (_ref2) {
|
|
8198
|
-
var theme = _ref2.theme,
|
|
8199
|
-
$isSelected = _ref2.$isSelected;
|
|
8200
|
-
return $isSelected ? theme.kitt.picker.android.selected.backgroundColor : theme.kitt.picker.android["default"].backgroundColor;
|
|
8201
|
-
});
|
|
8202
|
-
|
|
8203
8348
|
// This item is for Android only, iOS uses its own implementation and web is not supported yet
|
|
8204
|
-
function PickerItem(
|
|
8205
|
-
var label =
|
|
8206
|
-
value =
|
|
8207
|
-
isSelected =
|
|
8208
|
-
onPress =
|
|
8209
|
-
return /*#__PURE__*/jsx(
|
|
8349
|
+
function PickerItem(_ref) {
|
|
8350
|
+
var label = _ref.label,
|
|
8351
|
+
value = _ref.value,
|
|
8352
|
+
isSelected = _ref.isSelected,
|
|
8353
|
+
onPress = _ref.onPress;
|
|
8354
|
+
return /*#__PURE__*/jsx(Pressable, {
|
|
8210
8355
|
accessibilityRole: "button",
|
|
8211
8356
|
accessibilityState: {
|
|
8212
8357
|
selected: isSelected
|
|
8213
8358
|
},
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8359
|
+
backgroundColor: isSelected ? 'kitt.picker.android.item.selected.backgroundColor' : 'kitt.picker.android.item.default.backgroundColor',
|
|
8360
|
+
paddingX: "kitt.picker.android.horizontalPadding",
|
|
8361
|
+
paddingY: "kitt.picker.android.verticalPadding",
|
|
8362
|
+
onPress: function handelPress() {
|
|
8363
|
+
if (onPress) {
|
|
8364
|
+
onPress(value);
|
|
8365
|
+
}
|
|
8366
|
+
},
|
|
8218
8367
|
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
8219
8368
|
base: "body",
|
|
8220
8369
|
color: isSelected ? 'white' : undefined,
|
|
@@ -8232,69 +8381,86 @@ function Picker(_ref) {
|
|
|
8232
8381
|
testID = _ref.testID,
|
|
8233
8382
|
onValueSelected = _ref.onValueSelected,
|
|
8234
8383
|
onClose = _ref.onClose;
|
|
8384
|
+
var sx = useSx();
|
|
8385
|
+
|
|
8235
8386
|
// Max height is based on base Modal sizes (which are not themified): padding (4*20*2) + footer (58) + header (58) + default iOS picker height (216)
|
|
8236
8387
|
var _useMediaQuery = useMediaQuery({
|
|
8237
8388
|
maxHeight: 492
|
|
8238
8389
|
}),
|
|
8239
8390
|
_useMediaQuery2 = _slicedToArray(_useMediaQuery, 1),
|
|
8240
8391
|
isMatchingMaxHeight = _useMediaQuery2[0];
|
|
8392
|
+
var iosItemStyle = sx({
|
|
8393
|
+
fontSize: 'baseAndSmall.body',
|
|
8394
|
+
lineHeight: 'baseAndSmall.body',
|
|
8395
|
+
fontFamily: 'bodies.regular',
|
|
8396
|
+
color: 'kitt.typography.black-light',
|
|
8397
|
+
// As it is displayed in a modal, we must hard code an height to ensure that the picker doesn't bleed out of it
|
|
8398
|
+
// We can't set a percentage as it will be computed based on the page height
|
|
8399
|
+
height: isMatchingMaxHeight ? 'kitt.picker.ios.landscape.height' : 'kitt.picker.ios.default.height'
|
|
8400
|
+
});
|
|
8401
|
+
var getIosTextStyle = function (isSelected) {
|
|
8402
|
+
return sx({
|
|
8403
|
+
color: isSelected ? 'kitt.picker.ios.selected.color' : undefined
|
|
8404
|
+
});
|
|
8405
|
+
};
|
|
8241
8406
|
var _useState = useState(initialValue),
|
|
8242
8407
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8243
8408
|
value = _useState2[0],
|
|
8244
8409
|
setValue = _useState2[1];
|
|
8245
|
-
return /*#__PURE__*/
|
|
8410
|
+
return /*#__PURE__*/jsx(CardModal.ModalBehaviour, {
|
|
8246
8411
|
visible: isVisible,
|
|
8247
8412
|
onClose: onClose,
|
|
8248
|
-
children:
|
|
8249
|
-
children: /*#__PURE__*/jsx(
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
,
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8413
|
+
children: /*#__PURE__*/jsxs(CardModal, {
|
|
8414
|
+
children: [/*#__PURE__*/jsx(CardModal.Header, {
|
|
8415
|
+
right: /*#__PURE__*/jsx(IconButton, {
|
|
8416
|
+
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
8417
|
+
onPress: onClose
|
|
8418
|
+
}),
|
|
8419
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
8420
|
+
base: "body",
|
|
8421
|
+
variant: "bold",
|
|
8422
|
+
children: title
|
|
8423
|
+
})
|
|
8424
|
+
}), Platform.OS === 'ios' ? /*#__PURE__*/jsx(Picker$1, {
|
|
8425
|
+
testID: testID,
|
|
8426
|
+
selectedValue: value,
|
|
8427
|
+
itemStyle: iosItemStyle,
|
|
8428
|
+
onValueChange: function onValueChange(itemValue) {
|
|
8429
|
+
return setValue(itemValue);
|
|
8430
|
+
},
|
|
8431
|
+
children: React.Children.map(children, function (child) {
|
|
8432
|
+
var item = child;
|
|
8268
8433
|
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8280
|
-
|
|
8434
|
+
// iOS Picker doesn't support a custom Item component, we need to override its props manually for the selected one
|
|
8435
|
+
return /*#__PURE__*/cloneElement(item, {
|
|
8436
|
+
color: getIosTextStyle(item.props.value === value).color
|
|
8437
|
+
});
|
|
8438
|
+
})
|
|
8439
|
+
}) : /*#__PURE__*/jsx(ScrollView$2, {
|
|
8440
|
+
testID: testID,
|
|
8441
|
+
children: React.Children.map(children, function (child) {
|
|
8442
|
+
var item = child;
|
|
8443
|
+
return /*#__PURE__*/cloneElement(item, {
|
|
8444
|
+
onPress: function onPress(newValue) {
|
|
8445
|
+
return setValue(newValue);
|
|
8446
|
+
},
|
|
8447
|
+
isSelected: item.props.value === value
|
|
8448
|
+
});
|
|
8449
|
+
})
|
|
8450
|
+
}), /*#__PURE__*/jsx(CardModal.Footer, {
|
|
8451
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
8452
|
+
stretch: true,
|
|
8453
|
+
type: "primary",
|
|
8454
|
+
onPress: function handleValueSelected() {
|
|
8455
|
+
onValueSelected(value);
|
|
8456
|
+
onClose();
|
|
8281
8457
|
},
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
}), /*#__PURE__*/jsx(Modal.Footer, {
|
|
8286
|
-
children: /*#__PURE__*/jsx(Button, {
|
|
8287
|
-
stretch: true,
|
|
8288
|
-
type: "primary",
|
|
8289
|
-
onPress: function handleValueSelected() {
|
|
8290
|
-
onValueSelected(value);
|
|
8291
|
-
onClose();
|
|
8292
|
-
},
|
|
8293
|
-
children: validateButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
|
|
8294
|
-
id: "kitt-universal.Picker.validate"
|
|
8458
|
+
children: validateButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
|
|
8459
|
+
id: "kitt-universal.Picker.validate"
|
|
8460
|
+
})
|
|
8295
8461
|
})
|
|
8296
|
-
})
|
|
8297
|
-
})
|
|
8462
|
+
})]
|
|
8463
|
+
})
|
|
8298
8464
|
});
|
|
8299
8465
|
}
|
|
8300
8466
|
Picker.Item = PickerItem;
|
|
@@ -8352,19 +8518,10 @@ function SegmentedProgressBar(_ref) {
|
|
|
8352
8518
|
});
|
|
8353
8519
|
}
|
|
8354
8520
|
|
|
8355
|
-
var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
8356
|
-
displayName: "SkeletonContent__Container"
|
|
8357
|
-
})(["background-color:", ";border-color:", ";height:100%;width:100%;"], function (_ref) {
|
|
8358
|
-
var theme = _ref.theme;
|
|
8359
|
-
return theme.kitt.skeleton.backgroundColor;
|
|
8360
|
-
}, function (_ref2) {
|
|
8361
|
-
var theme = _ref2.theme;
|
|
8362
|
-
return theme.kitt.skeleton.flareColor;
|
|
8363
|
-
});
|
|
8364
8521
|
var AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient$1);
|
|
8365
|
-
function SkeletonContent(
|
|
8366
|
-
var isLoading =
|
|
8367
|
-
width =
|
|
8522
|
+
function SkeletonContent(_ref) {
|
|
8523
|
+
var isLoading = _ref.isLoading,
|
|
8524
|
+
width = _ref.width;
|
|
8368
8525
|
var theme = useTheme();
|
|
8369
8526
|
var sharedX = useSharedValue(0);
|
|
8370
8527
|
useEffect(function () {
|
|
@@ -8390,11 +8547,15 @@ function SkeletonContent(_ref3) {
|
|
|
8390
8547
|
};
|
|
8391
8548
|
_f.asString = "function _f(){const{interpolate,sharedX,width}=jsThis._closure;{return{transform:[{translateX:interpolate(sharedX.value,[0,1],[-width,width])}]};}}";
|
|
8392
8549
|
_f.__workletHash = 1670955855244;
|
|
8393
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Skeleton/SkeletonContent.tsx (
|
|
8550
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Skeleton/SkeletonContent.tsx (36:47)";
|
|
8394
8551
|
_f.__optimalization = 3;
|
|
8395
8552
|
return _f;
|
|
8396
8553
|
}());
|
|
8397
|
-
return /*#__PURE__*/jsx(
|
|
8554
|
+
return /*#__PURE__*/jsx(View, {
|
|
8555
|
+
height: "100%",
|
|
8556
|
+
width: "100%",
|
|
8557
|
+
backgroundColor: "kitt.skeleton.backgroundColor",
|
|
8558
|
+
borderColor: "kitt.skeleton.flareColor",
|
|
8398
8559
|
children: /*#__PURE__*/jsx(AnimatedLinearGradient, {
|
|
8399
8560
|
colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
|
|
8400
8561
|
locations: [0.1, 0.5, 0.9],
|
|
@@ -8411,7 +8572,7 @@ function SkeletonContent(_ref3) {
|
|
|
8411
8572
|
});
|
|
8412
8573
|
}
|
|
8413
8574
|
|
|
8414
|
-
var _excluded$
|
|
8575
|
+
var _excluded$7 = ["isLoading", "style"],
|
|
8415
8576
|
_excluded2$1 = ["size"],
|
|
8416
8577
|
_excluded3$1 = ["size"],
|
|
8417
8578
|
_excluded4 = ["size"];
|
|
@@ -8419,7 +8580,7 @@ function Skeleton(_ref) {
|
|
|
8419
8580
|
var _ref$isLoading = _ref.isLoading,
|
|
8420
8581
|
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
8421
8582
|
style = _ref.style,
|
|
8422
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8583
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
8423
8584
|
var _useState = useState(0),
|
|
8424
8585
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8425
8586
|
width = _useState2[0],
|
|
@@ -8614,7 +8775,7 @@ function getShouldDisplay2x() {
|
|
|
8614
8775
|
return currentDevicePixelRatio > 1;
|
|
8615
8776
|
}
|
|
8616
8777
|
|
|
8617
|
-
var _excluded$
|
|
8778
|
+
var _excluded$6 = ["width", "height", "alt", "apiToken", "mapId", "marker", "center", "onLoaded", "onError"];
|
|
8618
8779
|
var mapBoxMaxPictureWidth = 1280;
|
|
8619
8780
|
|
|
8620
8781
|
// Mapbox requestable width for image is between 1 - 1280px
|
|
@@ -8632,7 +8793,7 @@ function StaticMap(_ref) {
|
|
|
8632
8793
|
center = _ref.center,
|
|
8633
8794
|
onLoaded = _ref.onLoaded,
|
|
8634
8795
|
onError = _ref.onError,
|
|
8635
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8796
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
8636
8797
|
var _useState = useState(getPictureWidth(width)),
|
|
8637
8798
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8638
8799
|
currentWidth = _useState2[0],
|
|
@@ -8722,21 +8883,17 @@ StaticMap.Loader = StaticMapLoader;
|
|
|
8722
8883
|
StaticMap.Error = StaticMapError;
|
|
8723
8884
|
StaticMap.Marker = StaticMapMarker;
|
|
8724
8885
|
|
|
8725
|
-
var
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
8734
|
-
}
|
|
8735
|
-
|
|
8736
|
-
_ref2$padding = _ref2.padding,
|
|
8737
|
-
padding = _ref2$padding === void 0 ? 0 : _ref2$padding;
|
|
8738
|
-
return padding * theme.kitt.spacing;
|
|
8739
|
-
});
|
|
8886
|
+
var _excluded$5 = ["direction", "wrap"];
|
|
8887
|
+
function Flex(_ref) {
|
|
8888
|
+
var direction = _ref.direction,
|
|
8889
|
+
_ref$wrap = _ref.wrap,
|
|
8890
|
+
wrap = _ref$wrap === void 0 ? 'wrap' : _ref$wrap,
|
|
8891
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
8892
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
8893
|
+
flexDirection: direction,
|
|
8894
|
+
flexWrap: wrap
|
|
8895
|
+
}));
|
|
8896
|
+
}
|
|
8740
8897
|
|
|
8741
8898
|
var storyPadding = 'kitt.4';
|
|
8742
8899
|
|
|
@@ -8871,14 +9028,14 @@ function Story(_ref) {
|
|
|
8871
9028
|
});
|
|
8872
9029
|
}
|
|
8873
9030
|
|
|
8874
|
-
var _excluded$
|
|
9031
|
+
var _excluded$4 = ["title", "children", "internalIsDemoSection"],
|
|
8875
9032
|
_excluded2 = ["title", "children"],
|
|
8876
9033
|
_excluded3 = ["title", "children"];
|
|
8877
9034
|
function StorySection(_ref) {
|
|
8878
9035
|
var title = _ref.title,
|
|
8879
9036
|
children = _ref.children,
|
|
8880
9037
|
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
8881
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
9038
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
8882
9039
|
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
8883
9040
|
return /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({
|
|
8884
9041
|
marginBottom: "kitt.8"
|
|
@@ -9006,30 +9163,6 @@ var StoryGrid = {
|
|
|
9006
9163
|
Col: StoryGridCol
|
|
9007
9164
|
};
|
|
9008
9165
|
|
|
9009
|
-
var Container$1 = /*#__PURE__*/styled.View.withConfig({
|
|
9010
|
-
displayName: "Tag__Container"
|
|
9011
|
-
})(["background-color:", ";border-width:", "px;border-color:", ";padding:", ";border-radius:", "px;align-self:flex-start;"], function (_ref) {
|
|
9012
|
-
var theme = _ref.theme,
|
|
9013
|
-
type = _ref.type,
|
|
9014
|
-
variant = _ref.variant;
|
|
9015
|
-
return theme.kitt.tag[type][variant].backgroundColor;
|
|
9016
|
-
}, function (_ref2) {
|
|
9017
|
-
var theme = _ref2.theme,
|
|
9018
|
-
type = _ref2.type,
|
|
9019
|
-
variant = _ref2.variant;
|
|
9020
|
-
return theme.kitt.tag[type][variant].borderWidth;
|
|
9021
|
-
}, function (_ref3) {
|
|
9022
|
-
var theme = _ref3.theme,
|
|
9023
|
-
type = _ref3.type,
|
|
9024
|
-
variant = _ref3.variant;
|
|
9025
|
-
return theme.kitt.tag[type][variant].borderColor;
|
|
9026
|
-
}, function (_ref4) {
|
|
9027
|
-
var theme = _ref4.theme;
|
|
9028
|
-
return theme.kitt.tag.padding;
|
|
9029
|
-
}, function (_ref5) {
|
|
9030
|
-
var theme = _ref5.theme;
|
|
9031
|
-
return theme.kitt.tag.borderRadius;
|
|
9032
|
-
});
|
|
9033
9166
|
var getLabelColor = function (type, variant) {
|
|
9034
9167
|
switch (type) {
|
|
9035
9168
|
case 'danger':
|
|
@@ -9054,15 +9187,20 @@ var getLabelColor = function (type, variant) {
|
|
|
9054
9187
|
}
|
|
9055
9188
|
}
|
|
9056
9189
|
};
|
|
9057
|
-
function Tag(
|
|
9058
|
-
var label =
|
|
9059
|
-
|
|
9060
|
-
type =
|
|
9061
|
-
|
|
9062
|
-
variant =
|
|
9063
|
-
return /*#__PURE__*/jsx(
|
|
9064
|
-
|
|
9065
|
-
|
|
9190
|
+
function Tag(_ref) {
|
|
9191
|
+
var label = _ref.label,
|
|
9192
|
+
_ref$type = _ref.type,
|
|
9193
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
9194
|
+
_ref$variant = _ref.variant,
|
|
9195
|
+
variant = _ref$variant === void 0 ? 'fill' : _ref$variant;
|
|
9196
|
+
return /*#__PURE__*/jsx(View, {
|
|
9197
|
+
alignSelf: "flex-start",
|
|
9198
|
+
borderRadius: "kitt.tag.borderRadius",
|
|
9199
|
+
paddingX: "kitt.tag.horizontalPadding",
|
|
9200
|
+
paddingY: "kitt.tag.verticalPadding",
|
|
9201
|
+
backgroundColor: "kitt.tag.".concat(type, ".").concat(variant, ".backgroundColor"),
|
|
9202
|
+
borderColor: "kitt.tag.".concat(type, ".").concat(variant, ".borderColor"),
|
|
9203
|
+
borderWidth: "kitt.tag.".concat(type, ".").concat(variant, ".borderWidth"),
|
|
9066
9204
|
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
9067
9205
|
base: "body-xsmall",
|
|
9068
9206
|
color: getLabelColor(type, variant),
|
|
@@ -9071,194 +9209,200 @@ function Tag(_ref6) {
|
|
|
9071
9209
|
});
|
|
9072
9210
|
}
|
|
9073
9211
|
|
|
9074
|
-
|
|
9075
|
-
var
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
var theme = _ref.theme,
|
|
9084
|
-
$state = _ref.$state;
|
|
9085
|
-
return $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states["default"].backgroundColor;
|
|
9086
|
-
}, function (_ref2) {
|
|
9087
|
-
var theme = _ref2.theme;
|
|
9088
|
-
return theme.kitt.forms.input.borderWidth;
|
|
9089
|
-
}, function (_ref3) {
|
|
9090
|
-
var theme = _ref3.theme;
|
|
9091
|
-
return theme.kitt.forms.input.borderRadius;
|
|
9092
|
-
}, function (_ref4) {
|
|
9093
|
-
var theme = _ref4.theme,
|
|
9094
|
-
$state = _ref4.$state;
|
|
9095
|
-
return theme.kitt.forms.input.states[$state].borderColor;
|
|
9096
|
-
}, function (_ref5) {
|
|
9097
|
-
var theme = _ref5.theme;
|
|
9098
|
-
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
9099
|
-
return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize, "px");
|
|
9100
|
-
}, function (_ref6) {
|
|
9101
|
-
var theme = _ref6.theme,
|
|
9102
|
-
$state = _ref6.$state;
|
|
9103
|
-
return theme.kitt.forms.input.states[$state].color || theme.kitt.forms.input.states["default"].color;
|
|
9104
|
-
}, function (_ref7) {
|
|
9105
|
-
var theme = _ref7.theme;
|
|
9106
|
-
return Platform.OS === 'web' ? theme.kitt.typography.types.bodies.fontFamily.web.regular : theme.kitt.typography.types.bodies.fontFamily["native"].regular;
|
|
9107
|
-
});
|
|
9108
|
-
|
|
9109
|
-
function Title(_ref) {
|
|
9110
|
-
var children = _ref.children;
|
|
9111
|
-
return /*#__PURE__*/jsx(Modal.Header, {
|
|
9112
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
9113
|
-
base: "body",
|
|
9114
|
-
variant: "bold",
|
|
9115
|
-
children: children
|
|
9116
|
-
})
|
|
9117
|
-
});
|
|
9118
|
-
}
|
|
9119
|
-
function ModalDateTimePicker(_ref2) {
|
|
9120
|
-
var title = _ref2.title,
|
|
9121
|
-
visible = _ref2.visible,
|
|
9122
|
-
value = _ref2.value,
|
|
9123
|
-
validateButtonLabel = _ref2.validateButtonLabel,
|
|
9124
|
-
onChange = _ref2.onChange,
|
|
9125
|
-
onClose = _ref2.onClose;
|
|
9212
|
+
function ModalDateTimePicker(_ref) {
|
|
9213
|
+
var title = _ref.title,
|
|
9214
|
+
visible = _ref.visible,
|
|
9215
|
+
value = _ref.value,
|
|
9216
|
+
validateButtonLabel = _ref.validateButtonLabel,
|
|
9217
|
+
testID = _ref.testID,
|
|
9218
|
+
pickerTestID = _ref.pickerTestID,
|
|
9219
|
+
onChange = _ref.onChange,
|
|
9220
|
+
onClose = _ref.onClose;
|
|
9126
9221
|
var _useState = useState(value),
|
|
9127
9222
|
_useState2 = _slicedToArray(_useState, 2),
|
|
9128
9223
|
currentValue = _useState2[0],
|
|
9129
9224
|
setCurrentValue = _useState2[1];
|
|
9130
9225
|
|
|
9131
9226
|
// Prevent unsynced value between the modal and its parent state
|
|
9132
|
-
|
|
9133
|
-
|
|
9227
|
+
var handleClose = function () {
|
|
9228
|
+
setCurrentValue(value);
|
|
9229
|
+
onClose();
|
|
9230
|
+
};
|
|
9231
|
+
var handleChange = function (nextDate) {
|
|
9232
|
+
if (nextDate) setCurrentValue(nextDate);
|
|
9233
|
+
};
|
|
9234
|
+
var buttonContent = validateButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
|
|
9235
|
+
id: "kitt-universal.ModalDateTimePicker.confirm"
|
|
9236
|
+
});
|
|
9237
|
+
return /*#__PURE__*/jsx(CardModal.ModalBehaviour, {
|
|
9134
9238
|
visible: Boolean(visible),
|
|
9135
|
-
onClose:
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9239
|
+
onClose: handleClose,
|
|
9240
|
+
children: /*#__PURE__*/jsxs(CardModal, {
|
|
9241
|
+
testID: testID,
|
|
9242
|
+
children: [title ? /*#__PURE__*/jsx(CardModal.Header, {
|
|
9243
|
+
title: title,
|
|
9244
|
+
right: /*#__PURE__*/jsx(IconButton, {
|
|
9245
|
+
testID: "timePicker.ModalDateTimePicker.closeButton",
|
|
9246
|
+
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
9247
|
+
onPress: handleClose
|
|
9248
|
+
})
|
|
9249
|
+
}) : null, /*#__PURE__*/jsx(CardModal.Body, {
|
|
9143
9250
|
children: /*#__PURE__*/jsx(DateTimePicker, {
|
|
9144
9251
|
is24Hour: true,
|
|
9145
|
-
testID:
|
|
9252
|
+
testID: pickerTestID,
|
|
9146
9253
|
value: currentValue,
|
|
9147
9254
|
mode: "time",
|
|
9148
9255
|
display: Platform.OS === 'ios' ? 'spinner' : 'default',
|
|
9149
|
-
onChange: function (
|
|
9150
|
-
return
|
|
9151
|
-
return date || prev;
|
|
9152
|
-
});
|
|
9256
|
+
onChange: function (event, date) {
|
|
9257
|
+
return handleChange(date);
|
|
9153
9258
|
}
|
|
9154
9259
|
})
|
|
9155
|
-
}), /*#__PURE__*/jsx(
|
|
9260
|
+
}), /*#__PURE__*/jsx(CardModal.Footer, {
|
|
9156
9261
|
children: /*#__PURE__*/jsx(Button, {
|
|
9157
9262
|
stretch: true,
|
|
9263
|
+
testID: "timePicker.ModalDateTimePicker.submitButton",
|
|
9158
9264
|
type: "primary",
|
|
9159
9265
|
onPress: function handleSubmit() {
|
|
9160
9266
|
onChange(currentValue);
|
|
9161
9267
|
},
|
|
9162
|
-
children:
|
|
9163
|
-
children: validateButtonLabel
|
|
9164
|
-
}) : /*#__PURE__*/jsx(FormattedMessage, {
|
|
9165
|
-
id: "kitt-universal.ModalDateTimePicker.confirm"
|
|
9166
|
-
})
|
|
9268
|
+
children: buttonContent
|
|
9167
9269
|
})
|
|
9168
9270
|
})]
|
|
9169
|
-
})
|
|
9271
|
+
})
|
|
9170
9272
|
});
|
|
9171
9273
|
}
|
|
9172
9274
|
|
|
9173
|
-
|
|
9174
|
-
var formatNumberToTimeString = function (time) {
|
|
9275
|
+
function formatNumberToTimeString(time) {
|
|
9175
9276
|
return "".concat(String(time).padStart(2, '0'));
|
|
9176
|
-
}
|
|
9177
|
-
|
|
9277
|
+
}
|
|
9278
|
+
function formatDateToTimeString(date) {
|
|
9178
9279
|
return "".concat(formatNumberToTimeString(date.getHours()), ":").concat(formatNumberToTimeString(date.getMinutes()));
|
|
9179
|
-
}
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
|
|
9207
|
-
|
|
9208
|
-
|
|
9209
|
-
|
|
9210
|
-
|
|
9280
|
+
}
|
|
9281
|
+
|
|
9282
|
+
function getCurrentInternalForcedState(_ref) {
|
|
9283
|
+
var isDisabled = _ref.isDisabled,
|
|
9284
|
+
isHoveredInternal = _ref.isHoveredInternal,
|
|
9285
|
+
isFocusedInternal = _ref.isFocusedInternal,
|
|
9286
|
+
isPressedInternal = _ref.isPressedInternal;
|
|
9287
|
+
if (isDisabled) return 'disabled';
|
|
9288
|
+
if (isHoveredInternal) return 'hover';
|
|
9289
|
+
if (isFocusedInternal) return 'focus';
|
|
9290
|
+
if (isPressedInternal) return 'hover';
|
|
9291
|
+
return 'default';
|
|
9292
|
+
}
|
|
9293
|
+
|
|
9294
|
+
function TimePickerPressable(_ref) {
|
|
9295
|
+
var testID = _ref.testID,
|
|
9296
|
+
disabled = _ref.disabled,
|
|
9297
|
+
stretch = _ref.stretch,
|
|
9298
|
+
value = _ref.value,
|
|
9299
|
+
placeholder = _ref.placeholder,
|
|
9300
|
+
isHoveredInternal = _ref.isHoveredInternal,
|
|
9301
|
+
isFocusedInternal = _ref.isFocusedInternal,
|
|
9302
|
+
isPressedInternal = _ref.isPressedInternal,
|
|
9303
|
+
onPress = _ref.onPress;
|
|
9304
|
+
return /*#__PURE__*/jsx(Pressable, {
|
|
9305
|
+
testID: testID,
|
|
9306
|
+
disabled: disabled,
|
|
9307
|
+
accessibilityRole: "button",
|
|
9308
|
+
width: createResponsiveStyleFromProp(stretch, '100%', 'kitt.forms.timePicker.minWidth'),
|
|
9309
|
+
onPress: onPress,
|
|
9310
|
+
children: function children(_ref2) {
|
|
9311
|
+
var isHovered = _ref2.isHovered,
|
|
9312
|
+
isFocused = _ref2.isFocused,
|
|
9313
|
+
isPressed = _ref2.isPressed;
|
|
9314
|
+
return /*#__PURE__*/jsxs(View, {
|
|
9315
|
+
position: "relative",
|
|
9316
|
+
children: [/*#__PURE__*/jsx(InputText, {
|
|
9317
|
+
internalForceState: getCurrentInternalForcedState({
|
|
9318
|
+
isDisabled: disabled,
|
|
9319
|
+
isHoveredInternal: isHovered || isHoveredInternal,
|
|
9320
|
+
isFocusedInternal: isFocused || isFocusedInternal,
|
|
9321
|
+
isPressedInternal: isPressed || isPressedInternal
|
|
9322
|
+
}),
|
|
9323
|
+
value: value ? formatDateToTimeString(value) : undefined,
|
|
9324
|
+
placeholder: placeholder,
|
|
9325
|
+
disabled: disabled,
|
|
9326
|
+
textAlign: "center"
|
|
9327
|
+
}), /*#__PURE__*/jsx(View, {
|
|
9328
|
+
position: "absolute",
|
|
9329
|
+
top: "0",
|
|
9330
|
+
left: "0",
|
|
9331
|
+
height: "100%",
|
|
9332
|
+
width: "100%"
|
|
9333
|
+
})]
|
|
9334
|
+
});
|
|
9211
9335
|
}
|
|
9212
|
-
};
|
|
9213
|
-
}
|
|
9336
|
+
});
|
|
9337
|
+
}
|
|
9214
9338
|
|
|
9215
|
-
var Container = /*#__PURE__*/styled.Pressable.withConfig({
|
|
9216
|
-
displayName: "TimePicker__Container"
|
|
9217
|
-
})(["", " width:100px;height:40px;justify-content:center;align-items:center;"], styledTextInputMixin);
|
|
9218
9339
|
function TimePicker(_ref) {
|
|
9219
9340
|
var title = _ref.title,
|
|
9220
|
-
_ref$state = _ref.state,
|
|
9221
|
-
state = _ref$state === void 0 ? 'default' : _ref$state,
|
|
9222
9341
|
_ref$disabled = _ref.disabled,
|
|
9223
9342
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
9224
|
-
|
|
9343
|
+
stretch = _ref.stretch,
|
|
9225
9344
|
value = _ref.value,
|
|
9226
9345
|
validateButtonLabel = _ref.validateButtonLabel,
|
|
9227
9346
|
isDefaultVisible = _ref.isDefaultVisible,
|
|
9347
|
+
_ref$placeholder = _ref.placeholder,
|
|
9348
|
+
placeholder = _ref$placeholder === void 0 ? '--:--' : _ref$placeholder,
|
|
9349
|
+
testID = _ref.testID,
|
|
9350
|
+
modalTestID = _ref.modalTestID,
|
|
9351
|
+
_ref$pickerTestID = _ref.pickerTestID,
|
|
9352
|
+
pickerTestID = _ref$pickerTestID === void 0 ? 'timePicker.ModalDateTimePicker.dateTimeNativePicker' : _ref$pickerTestID,
|
|
9353
|
+
isHoveredInternal = _ref.isHoveredInternal,
|
|
9354
|
+
isFocusedInternal = _ref.isFocusedInternal,
|
|
9355
|
+
isPressedInternal = _ref.isPressedInternal,
|
|
9228
9356
|
onChange = _ref.onChange,
|
|
9229
9357
|
onBlur = _ref.onBlur;
|
|
9230
|
-
var
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9237
|
-
|
|
9238
|
-
|
|
9239
|
-
|
|
9240
|
-
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
|
|
9358
|
+
var _useState = useState(value),
|
|
9359
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
9360
|
+
currentValue = _useState2[0],
|
|
9361
|
+
setCurrentValue = _useState2[1];
|
|
9362
|
+
var _useState3 = useState(isDefaultVisible),
|
|
9363
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
9364
|
+
isPickerVisible = _useState4[0],
|
|
9365
|
+
setIsPickerVisible = _useState4[1];
|
|
9366
|
+
var handleChange = function (nextDate) {
|
|
9367
|
+
setCurrentValue(nextDate);
|
|
9368
|
+
setIsPickerVisible(false);
|
|
9369
|
+
if (onChange) onChange(nextDate);
|
|
9370
|
+
if (onBlur) onBlur();
|
|
9371
|
+
};
|
|
9372
|
+
var pickerValue = currentValue || new Date();
|
|
9373
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
9374
|
+
children: [/*#__PURE__*/jsx(TimePickerPressable, {
|
|
9375
|
+
testID: testID,
|
|
9376
|
+
disabled: disabled,
|
|
9377
|
+
stretch: stretch,
|
|
9378
|
+
value: currentValue,
|
|
9379
|
+
placeholder: placeholder,
|
|
9380
|
+
isHoveredInternal: isHoveredInternal,
|
|
9381
|
+
isFocusedInternal: isFocusedInternal,
|
|
9382
|
+
isPressedInternal: isPressedInternal,
|
|
9383
|
+
onPress: function handlePress() {
|
|
9384
|
+
setIsPickerVisible(true);
|
|
9385
|
+
}
|
|
9386
|
+
}), Platform.OS === 'android' && isPickerVisible ? /*#__PURE__*/jsx(DateTimePicker, {
|
|
9247
9387
|
is24Hour: true,
|
|
9248
|
-
testID:
|
|
9249
|
-
value:
|
|
9388
|
+
testID: pickerTestID,
|
|
9389
|
+
value: pickerValue,
|
|
9250
9390
|
mode: "time",
|
|
9251
9391
|
display: "default",
|
|
9252
|
-
onChange: function (
|
|
9253
|
-
return
|
|
9392
|
+
onChange: function (event, date) {
|
|
9393
|
+
return handleChange(date);
|
|
9254
9394
|
}
|
|
9255
9395
|
}) : null, Platform.OS !== 'android' ? /*#__PURE__*/jsx(ModalDateTimePicker, {
|
|
9396
|
+
visible: isPickerVisible,
|
|
9256
9397
|
title: title,
|
|
9257
|
-
|
|
9258
|
-
|
|
9398
|
+
testID: modalTestID,
|
|
9399
|
+
pickerTestID: pickerTestID,
|
|
9400
|
+
value: pickerValue,
|
|
9259
9401
|
validateButtonLabel: validateButtonLabel,
|
|
9260
|
-
onChange:
|
|
9261
|
-
onClose:
|
|
9402
|
+
onChange: handleChange,
|
|
9403
|
+
onClose: function handleClose() {
|
|
9404
|
+
setIsPickerVisible(false);
|
|
9405
|
+
}
|
|
9262
9406
|
}) : null]
|
|
9263
9407
|
});
|
|
9264
9408
|
}
|
|
@@ -9592,11 +9736,11 @@ function TypographyEmoji(_ref3) {
|
|
|
9592
9736
|
});
|
|
9593
9737
|
}
|
|
9594
9738
|
|
|
9595
|
-
var _excluded$
|
|
9739
|
+
var _excluded$3 = ["as", "children"];
|
|
9596
9740
|
function StyleWebWrapper(_ref) {
|
|
9597
9741
|
var as = _ref.as,
|
|
9598
9742
|
children = _ref.children,
|
|
9599
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
9743
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
9600
9744
|
if (Platform.OS !== 'web') return children;
|
|
9601
9745
|
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
9602
9746
|
return /*#__PURE__*/jsx(as || 'div', _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -9604,7 +9748,7 @@ function StyleWebWrapper(_ref) {
|
|
|
9604
9748
|
}));
|
|
9605
9749
|
}
|
|
9606
9750
|
|
|
9607
|
-
var _excluded$
|
|
9751
|
+
var _excluded$2 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
|
|
9608
9752
|
// overrides :global(a) in Link styles.module.css
|
|
9609
9753
|
var TypographyLinkWebWrapper = undefined;
|
|
9610
9754
|
function TypographyLink(_ref) {
|
|
@@ -9614,7 +9758,7 @@ function TypographyLink(_ref) {
|
|
|
9614
9758
|
href = _ref.href,
|
|
9615
9759
|
hrefAttrs = _ref.hrefAttrs,
|
|
9616
9760
|
onPress = _ref.onPress,
|
|
9617
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
9761
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
9618
9762
|
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
9619
9763
|
as: TypographyLinkWebWrapper,
|
|
9620
9764
|
$hasNoUnderline: noUnderline,
|
|
@@ -9727,7 +9871,7 @@ var KittThemeDecorator = makeDecorator({
|
|
|
9727
9871
|
}
|
|
9728
9872
|
});
|
|
9729
9873
|
|
|
9730
|
-
var _excluded = ["children"];
|
|
9874
|
+
var _excluded$1 = ["children"];
|
|
9731
9875
|
/**
|
|
9732
9876
|
* Display children if match window size options
|
|
9733
9877
|
*
|
|
@@ -9735,7 +9879,7 @@ var _excluded = ["children"];
|
|
|
9735
9879
|
*/
|
|
9736
9880
|
function MatchWindowSize(_ref) {
|
|
9737
9881
|
var children = _ref.children,
|
|
9738
|
-
matchWindowSizeOptions = _objectWithoutProperties(_ref, _excluded);
|
|
9882
|
+
matchWindowSizeOptions = _objectWithoutProperties(_ref, _excluded$1);
|
|
9739
9883
|
var match = useMatchWindowSize(matchWindowSizeOptions);
|
|
9740
9884
|
if (!match) return null;
|
|
9741
9885
|
return children;
|
|
@@ -9762,5 +9906,128 @@ function withTheme(WrappedComponent) {
|
|
|
9762
9906
|
});
|
|
9763
9907
|
}
|
|
9764
9908
|
|
|
9765
|
-
|
|
9909
|
+
var backgroundColors = {
|
|
9910
|
+
done: 'kitt.verticalSteps.done.icon.backgroundColor',
|
|
9911
|
+
active: 'kitt.verticalSteps.active.icon.backgroundColor',
|
|
9912
|
+
"default": 'kitt.verticalSteps.default.icon.backgroundColor'
|
|
9913
|
+
};
|
|
9914
|
+
function IconStatus(_ref) {
|
|
9915
|
+
var state = _ref.state,
|
|
9916
|
+
index = _ref.index;
|
|
9917
|
+
if (state === 'done') {
|
|
9918
|
+
return /*#__PURE__*/jsx(TypographyIcon, {
|
|
9919
|
+
icon: /*#__PURE__*/jsx(CheckIcon, {}),
|
|
9920
|
+
color: "kitt.verticalSteps.done.icon.textColor"
|
|
9921
|
+
});
|
|
9922
|
+
}
|
|
9923
|
+
if (state === 'active') {
|
|
9924
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
9925
|
+
textAlign: "center",
|
|
9926
|
+
variant: "bold",
|
|
9927
|
+
color: "kitt.verticalSteps.active.icon.textColor",
|
|
9928
|
+
children: index + 1
|
|
9929
|
+
});
|
|
9930
|
+
}
|
|
9931
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
9932
|
+
textAlign: "center",
|
|
9933
|
+
variant: "bold",
|
|
9934
|
+
color: "kitt.verticalSteps.default.icon.textColor",
|
|
9935
|
+
children: index + 1
|
|
9936
|
+
});
|
|
9937
|
+
}
|
|
9938
|
+
function StepIcon(_ref2) {
|
|
9939
|
+
var index = _ref2.index,
|
|
9940
|
+
_ref2$state = _ref2.state,
|
|
9941
|
+
state = _ref2$state === void 0 ? 'default' : _ref2$state;
|
|
9942
|
+
return /*#__PURE__*/jsx(View, {
|
|
9943
|
+
justifyContent: "center",
|
|
9944
|
+
alignItems: "center",
|
|
9945
|
+
width: 30,
|
|
9946
|
+
height: 30,
|
|
9947
|
+
borderRadius: 15,
|
|
9948
|
+
backgroundColor: backgroundColors[state],
|
|
9949
|
+
children: /*#__PURE__*/jsx(IconStatus, {
|
|
9950
|
+
state: state,
|
|
9951
|
+
index: index
|
|
9952
|
+
})
|
|
9953
|
+
});
|
|
9954
|
+
}
|
|
9955
|
+
|
|
9956
|
+
function ExternalStep() {
|
|
9957
|
+
return null;
|
|
9958
|
+
}
|
|
9959
|
+
function Step(_ref) {
|
|
9960
|
+
var _ref$index = _ref.index,
|
|
9961
|
+
index = _ref$index === void 0 ? 0 : _ref$index,
|
|
9962
|
+
children = _ref.children,
|
|
9963
|
+
_ref$state = _ref.state,
|
|
9964
|
+
state = _ref$state === void 0 ? 'default' : _ref$state,
|
|
9965
|
+
_ref$isLast = _ref.isLast,
|
|
9966
|
+
isLast = _ref$isLast === void 0 ? false : _ref$isLast,
|
|
9967
|
+
_ref$shouldDisableNex = _ref.shouldDisableNextLink,
|
|
9968
|
+
shouldDisableNextLink = _ref$shouldDisableNex === void 0 ? false : _ref$shouldDisableNex;
|
|
9969
|
+
return /*#__PURE__*/jsxs(HStack$1, {
|
|
9970
|
+
space: "kitt.2",
|
|
9971
|
+
flexGrow: 1,
|
|
9972
|
+
children: [/*#__PURE__*/jsxs(View, {
|
|
9973
|
+
marginTop: "kitt.2",
|
|
9974
|
+
paddingY: "kitt.2",
|
|
9975
|
+
backgroundColor: "kitt.white",
|
|
9976
|
+
children: [/*#__PURE__*/jsx(StepIcon, {
|
|
9977
|
+
state: state,
|
|
9978
|
+
index: index
|
|
9979
|
+
}), !isLast ? /*#__PURE__*/jsx(View, {
|
|
9980
|
+
backgroundColor: shouldDisableNextLink ? 'kitt.palettes.lateOcean.black100' : 'kitt.palettes.lateOcean.moonPurple',
|
|
9981
|
+
width: 1,
|
|
9982
|
+
position: "absolute",
|
|
9983
|
+
top: 46,
|
|
9984
|
+
left: 15,
|
|
9985
|
+
zIndex: -1,
|
|
9986
|
+
height: "100%"
|
|
9987
|
+
}) : null]
|
|
9988
|
+
}), /*#__PURE__*/jsx(View, {
|
|
9989
|
+
flexGrow: 1,
|
|
9990
|
+
children: /*#__PURE__*/jsx(ActionCard, {
|
|
9991
|
+
variant: "primary",
|
|
9992
|
+
children: children
|
|
9993
|
+
})
|
|
9994
|
+
})]
|
|
9995
|
+
});
|
|
9996
|
+
}
|
|
9997
|
+
|
|
9998
|
+
function getStepState(index, activeIndex) {
|
|
9999
|
+
if (index === activeIndex) {
|
|
10000
|
+
return 'active';
|
|
10001
|
+
}
|
|
10002
|
+
if (index < activeIndex) {
|
|
10003
|
+
return 'done';
|
|
10004
|
+
}
|
|
10005
|
+
return 'default';
|
|
10006
|
+
}
|
|
10007
|
+
|
|
10008
|
+
var _excluded = ["children", "activeIndex"];
|
|
10009
|
+
function VerticalSteps(_ref) {
|
|
10010
|
+
var children = _ref.children,
|
|
10011
|
+
activeIndex = _ref.activeIndex,
|
|
10012
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
10013
|
+
return /*#__PURE__*/jsx(VStack$1, _objectSpread(_objectSpread({
|
|
10014
|
+
space: "kitt.4",
|
|
10015
|
+
width: "100%"
|
|
10016
|
+
}, props), {}, {
|
|
10017
|
+
children: Children.map(children, function (child, index) {
|
|
10018
|
+
if ((process.env.NODE_ENV !== "production") && child.type !== ExternalStep) {
|
|
10019
|
+
throw new Error('VerticalSteps only accepts VerticalSteps.Step as children');
|
|
10020
|
+
}
|
|
10021
|
+
var isLast = index === Children.count(children) - 1;
|
|
10022
|
+
return /*#__PURE__*/createElement(Step, _objectSpread(_objectSpread({}, child.props), {}, {
|
|
10023
|
+
index: index,
|
|
10024
|
+
isLast: isLast,
|
|
10025
|
+
state: getStepState(index, activeIndex)
|
|
10026
|
+
}), child.props.children);
|
|
10027
|
+
})
|
|
10028
|
+
}));
|
|
10029
|
+
}
|
|
10030
|
+
VerticalSteps.Step = ExternalStep;
|
|
10031
|
+
|
|
10032
|
+
export { ActionCard, Actions, Avatar, BottomSheet, Button, CardModal, Center, Checkbox, ChoicesElements, DatePicker, DialogModal, Emoji, ExternalAppLink, ExternalLink, FlatList, Flex, FullscreenModal, HStack, Highlight, Icon, IconButton, Image, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarkerLarge, MapMarkerPosition, MapMarkerSimple, MatchWindowSize, Message, Modal, ModalBehaviour, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, createWindowSizeHelper, getStaticMapImageUrl, hex2rgba, matchWindowSize, theme, useBottomSheet, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useStaticBottomSheet, useStoryBlockColor, useTheme, withTheme };
|
|
9766
10033
|
//# sourceMappingURL=index-browser-all.es.android.js.map
|