@ornikar/kitt-universal 11.2.0 → 13.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/Icon/SpinningIcon.web.d.ts.map +1 -1
- 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/PageLoader/PageLoader.web.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/Skeleton/SkeletonContent.web.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/DatePicker/components/NativeUIDatePicker/ModalPlatformDateTimePicker.d.ts.map +1 -1
- 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/InputText/InputTextContainer.web.d.ts +2 -9
- package/dist/definitions/forms/InputText/InputTextContainer.web.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 -6
- 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/input.d.ts +3 -0
- package/dist/definitions/themes/late-ocean/input.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/pageLoader.d.ts +7 -0
- package/dist/definitions/themes/late-ocean/pageLoader.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/skeleton.d.ts +2 -0
- package/dist/definitions/themes/late-ocean/skeleton.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/definitions/typography/TypographyLink.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyLinkWebWrapper.d.ts +7 -0
- package/dist/definitions/typography/TypographyLinkWebWrapper.d.ts.map +1 -0
- package/dist/definitions/typography/TypographyLinkWebWrapper.web.d.ts +4 -0
- package/dist/definitions/typography/TypographyLinkWebWrapper.web.d.ts.map +1 -0
- package/dist/definitions/useKittTheme.d.ts +0 -3
- package/dist/definitions/useKittTheme.d.ts.map +1 -1
- package/dist/definitions/utils/StyleWebWrapper.d.ts +3 -0
- package/dist/definitions/utils/StyleWebWrapper.d.ts.map +1 -1
- package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts +0 -5
- package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts.map +1 -1
- package/dist/definitions/utils/windowSize/useMatchWindowSize.d.ts +4 -1
- package/dist/definitions/utils/windowSize/useMatchWindowSize.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +1278 -1181
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +1278 -1181
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +1285 -1209
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +819 -791
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +1143 -1041
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.css +7 -5
- package/dist/index-node-14.17.cjs.web.js +693 -619
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +59 -14
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +59 -14
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +59 -14
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +59 -14
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +59 -14
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +59 -14
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/styles.css +7 -5
- package/dist/tsbuildinfo +1 -1
- package/package.json +7 -11
- package/typings/react-native-web.d.ts +2 -0
- package/.stylelintrc +0 -3
- package/dist/definitions/Modal/Body.d.ts +0 -6
- package/dist/definitions/Modal/Body.d.ts.map +0 -1
- package/dist/definitions/Modal/Footer.d.ts +0 -6
- package/dist/definitions/Modal/Footer.d.ts.map +0 -1
- package/dist/definitions/Modal/Header.d.ts +0 -8
- package/dist/definitions/Modal/Header.d.ts.map +0 -1
- package/dist/definitions/Modal/Modal.d.ts +0 -21
- package/dist/definitions/Modal/Modal.d.ts.map +0 -1
- package/dist/definitions/Modal/OnCloseContext.d.ts +0 -3
- package/dist/definitions/Modal/OnCloseContext.d.ts.map +0 -1
- 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
- package/dist/definitions/utils/tests/styled-component-typing-test.d.ts +0 -19
- package/dist/definitions/utils/tests/styled-component-typing-test.d.ts.map +0 -1
- package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts +0 -50
- package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts.map +0 -1
- package/dist/definitions/utils/withTheme.d.ts +0 -7
- package/dist/definitions/utils/withTheme.d.ts.map +0 -1
- package/dist/index-browser-all.es.css +0 -1
- package/dist/index-node-14.17.cjs.css +0 -1
|
@@ -6,11 +6,9 @@ const react = require('react');
|
|
|
6
6
|
const nativeBase = require('native-base');
|
|
7
7
|
const jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
const kittIcons = require('@ornikar/kitt-icons');
|
|
9
|
-
const
|
|
10
|
-
const BabelPluginStyledComponentsReactNative = require('react-native');
|
|
9
|
+
const reactNative = require('react-native');
|
|
11
10
|
const reactPortal = require('react-portal');
|
|
12
11
|
const reactTransitionGroup = require('react-transition-group');
|
|
13
|
-
const styled = require('styled-components/native');
|
|
14
12
|
const twemojiParser = require('twemoji-parser');
|
|
15
13
|
const libphonenumberJs = require('libphonenumber-js');
|
|
16
14
|
const reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
@@ -18,23 +16,6 @@ const reactDom = require('@floating-ui/react-dom');
|
|
|
18
16
|
const usehooksTs = require('usehooks-ts');
|
|
19
17
|
const addons = require('@storybook/addons');
|
|
20
18
|
|
|
21
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
22
|
-
|
|
23
|
-
function _interopNamespace(e) {
|
|
24
|
-
if (e && e.__esModule) return e;
|
|
25
|
-
const n = Object.create(null);
|
|
26
|
-
if (e) {
|
|
27
|
-
for (const k in e) {
|
|
28
|
-
n[k] = e[k];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
n["default"] = e;
|
|
32
|
-
return n;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const BabelPluginStyledComponentsReactNative__namespace = /*#__PURE__*/_interopNamespace(BabelPluginStyledComponentsReactNative);
|
|
36
|
-
const styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
37
|
-
|
|
38
19
|
const View = nativeBase.View;
|
|
39
20
|
const ScrollView = nativeBase.ScrollView;
|
|
40
21
|
const Pressable = nativeBase.Pressable;
|
|
@@ -923,6 +904,9 @@ const inputStatesStyle = {
|
|
|
923
904
|
color: colors.black
|
|
924
905
|
}
|
|
925
906
|
};
|
|
907
|
+
const webAnimationDuration = '200ms';
|
|
908
|
+
const webAnimationTimingFunction = 'ease-in-out';
|
|
909
|
+
const webAnimationProperty = 'border-color';
|
|
926
910
|
const input = {
|
|
927
911
|
minHeight: 40,
|
|
928
912
|
color: {
|
|
@@ -942,9 +926,9 @@ const input = {
|
|
|
942
926
|
vertical: 5
|
|
943
927
|
},
|
|
944
928
|
transition: {
|
|
945
|
-
property:
|
|
946
|
-
duration:
|
|
947
|
-
timingFunction:
|
|
929
|
+
property: webAnimationProperty,
|
|
930
|
+
duration: webAnimationDuration,
|
|
931
|
+
timingFunction: webAnimationTimingFunction
|
|
948
932
|
},
|
|
949
933
|
states: inputStatesStyle
|
|
950
934
|
};
|
|
@@ -1043,6 +1027,10 @@ const textArea = {
|
|
|
1043
1027
|
minHeight: 120
|
|
1044
1028
|
};
|
|
1045
1029
|
|
|
1030
|
+
const timePicker = {
|
|
1031
|
+
minWidth: 100
|
|
1032
|
+
};
|
|
1033
|
+
|
|
1046
1034
|
const forms = {
|
|
1047
1035
|
datePicker,
|
|
1048
1036
|
input,
|
|
@@ -1051,7 +1039,8 @@ const forms = {
|
|
|
1051
1039
|
textArea,
|
|
1052
1040
|
checkbox,
|
|
1053
1041
|
inputTag,
|
|
1054
|
-
radioButtonGroup
|
|
1042
|
+
radioButtonGroup,
|
|
1043
|
+
timePicker
|
|
1055
1044
|
};
|
|
1056
1045
|
|
|
1057
1046
|
const webAnimationContentDuration = 600;
|
|
@@ -1141,25 +1130,34 @@ const iconButton = {
|
|
|
1141
1130
|
|
|
1142
1131
|
const listItem = {
|
|
1143
1132
|
padding: '12px 16px',
|
|
1133
|
+
verticalPadding: 12,
|
|
1134
|
+
horizontalPadding: 16,
|
|
1144
1135
|
borderColor: colors.separator,
|
|
1145
1136
|
borderWidth: 1,
|
|
1146
1137
|
innerMargin: 8
|
|
1147
1138
|
};
|
|
1148
1139
|
|
|
1140
|
+
const pageLoaderSize = 60;
|
|
1141
|
+
const pageLoaderStrokeWidth = 3;
|
|
1142
|
+
const webAnimationDelay = 500;
|
|
1143
|
+
const webAnimationCircleBackgroundFillDuration = 1000;
|
|
1144
|
+
const webAnimationFilledCircleFillDuration = 1800;
|
|
1145
|
+
const webAnimationFilledCircleRotationDuration = 2160;
|
|
1146
|
+
const fillEasingFunction = [0.39, 0.575, 0.565, 1];
|
|
1149
1147
|
const pageLoader = {
|
|
1150
|
-
size:
|
|
1151
|
-
strokeWidth:
|
|
1148
|
+
size: pageLoaderSize,
|
|
1149
|
+
strokeWidth: pageLoaderStrokeWidth,
|
|
1152
1150
|
colors: {
|
|
1153
1151
|
base: colors.separator,
|
|
1154
1152
|
fill: colors.primary
|
|
1155
1153
|
},
|
|
1156
1154
|
animation: {
|
|
1157
|
-
delay:
|
|
1158
|
-
circleBackgroundFillDuration:
|
|
1159
|
-
filledCircleFillDuration:
|
|
1155
|
+
delay: webAnimationDelay,
|
|
1156
|
+
circleBackgroundFillDuration: webAnimationCircleBackgroundFillDuration,
|
|
1157
|
+
filledCircleFillDuration: webAnimationFilledCircleFillDuration,
|
|
1160
1158
|
groupFilledCircleRotationDuration: 1800,
|
|
1161
|
-
filledCircleRotationDuration:
|
|
1162
|
-
fillEasingFunction
|
|
1159
|
+
filledCircleRotationDuration: webAnimationFilledCircleRotationDuration,
|
|
1160
|
+
fillEasingFunction
|
|
1163
1161
|
}
|
|
1164
1162
|
};
|
|
1165
1163
|
|
|
@@ -1182,6 +1180,8 @@ const picker = {
|
|
|
1182
1180
|
},
|
|
1183
1181
|
android: {
|
|
1184
1182
|
padding: '12px 24px',
|
|
1183
|
+
verticalPadding: 12,
|
|
1184
|
+
horizontalPadding: 24,
|
|
1185
1185
|
default: {
|
|
1186
1186
|
backgroundColor: colors.transparent
|
|
1187
1187
|
},
|
|
@@ -1257,9 +1257,11 @@ const shadows = {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
};
|
|
1259
1259
|
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
|
|
1260
|
+
const skeletonBackgroundColor = lateOceanColorPalette.black100;
|
|
1261
|
+
const skeletonFlareColor = lateOceanColorPalette.black200;
|
|
1262
|
+
const skeleton$1 = {
|
|
1263
|
+
backgroundColor: skeletonBackgroundColor,
|
|
1264
|
+
flareColor: skeletonFlareColor,
|
|
1263
1265
|
animationDuration: 1000,
|
|
1264
1266
|
shape: {
|
|
1265
1267
|
bar: {
|
|
@@ -1280,6 +1282,8 @@ const skeleton = {
|
|
|
1280
1282
|
const tag = {
|
|
1281
1283
|
borderRadius: 10,
|
|
1282
1284
|
padding: '2px 12px',
|
|
1285
|
+
verticalPadding: 2,
|
|
1286
|
+
horizontalPadding: 12,
|
|
1283
1287
|
primary: {
|
|
1284
1288
|
fill: {
|
|
1285
1289
|
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
@@ -1356,6 +1360,27 @@ const tooltip = {
|
|
|
1356
1360
|
}
|
|
1357
1361
|
};
|
|
1358
1362
|
|
|
1363
|
+
const verticalSteps = {
|
|
1364
|
+
active: {
|
|
1365
|
+
icon: {
|
|
1366
|
+
backgroundColor: colors.primary,
|
|
1367
|
+
textColor: colors.white
|
|
1368
|
+
}
|
|
1369
|
+
},
|
|
1370
|
+
done: {
|
|
1371
|
+
icon: {
|
|
1372
|
+
backgroundColor: lateOceanColorPalette.moonPurple,
|
|
1373
|
+
textColor: colors.primary
|
|
1374
|
+
}
|
|
1375
|
+
},
|
|
1376
|
+
default: {
|
|
1377
|
+
icon: {
|
|
1378
|
+
backgroundColor: colors.disabled,
|
|
1379
|
+
textColor: colors.blackDisabled
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
};
|
|
1383
|
+
|
|
1359
1384
|
const breakpoints = {
|
|
1360
1385
|
values: {
|
|
1361
1386
|
base: 0,
|
|
@@ -1402,12 +1427,13 @@ const theme = {
|
|
|
1402
1427
|
pageLoader,
|
|
1403
1428
|
picker,
|
|
1404
1429
|
shadows,
|
|
1405
|
-
skeleton,
|
|
1430
|
+
skeleton: skeleton$1,
|
|
1406
1431
|
tag,
|
|
1407
1432
|
tooltip,
|
|
1408
1433
|
typography,
|
|
1409
1434
|
fullscreenModal,
|
|
1410
|
-
actionCard
|
|
1435
|
+
actionCard,
|
|
1436
|
+
verticalSteps
|
|
1411
1437
|
};
|
|
1412
1438
|
|
|
1413
1439
|
const KittThemeContext = /*#__PURE__*/react.createContext({
|
|
@@ -2095,7 +2121,7 @@ function ButtonPadding({
|
|
|
2095
2121
|
});
|
|
2096
2122
|
}
|
|
2097
2123
|
|
|
2098
|
-
function DisabledBorder
|
|
2124
|
+
function DisabledBorder() {
|
|
2099
2125
|
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
2100
2126
|
position: "absolute",
|
|
2101
2127
|
top: 0,
|
|
@@ -2236,7 +2262,7 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
2236
2262
|
isPressed: isPressed,
|
|
2237
2263
|
isFocused: isFocused,
|
|
2238
2264
|
children: children
|
|
2239
|
-
}), disabled ? /*#__PURE__*/jsxRuntime.jsx(DisabledBorder
|
|
2265
|
+
}), disabled ? /*#__PURE__*/jsxRuntime.jsx(DisabledBorder, {}) : null, /*#__PURE__*/jsxRuntime.jsx(FocusBorder, {
|
|
2240
2266
|
type: type,
|
|
2241
2267
|
variant: variant,
|
|
2242
2268
|
isFocused: isFocused || isFocusedInternal,
|
|
@@ -2248,23 +2274,7 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
2248
2274
|
});
|
|
2249
2275
|
});
|
|
2250
2276
|
|
|
2251
|
-
|
|
2252
|
-
// eslint-disable-next-line prefer-arrow-callback
|
|
2253
|
-
return /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
2254
|
-
const theme = useTheme();
|
|
2255
|
-
return /*#__PURE__*/jsxRuntime.jsx(WrappedComponent, {
|
|
2256
|
-
ref: ref,
|
|
2257
|
-
theme: theme,
|
|
2258
|
-
...props
|
|
2259
|
-
});
|
|
2260
|
-
});
|
|
2261
|
-
}
|
|
2262
|
-
|
|
2263
|
-
const StyledSpinningIconContainer = withTheme( /*#__PURE__*/react$1.styled('div')({
|
|
2264
|
-
name: "StyledSpinningIconContainer",
|
|
2265
|
-
class: "kitt-u_StyledSpinningIconContainer_ssn8o83",
|
|
2266
|
-
propsAsIs: false
|
|
2267
|
-
}));
|
|
2277
|
+
const spinningIcon = "kitt-u_spinningIcon_ssn8o83";
|
|
2268
2278
|
function SpinningIcon({
|
|
2269
2279
|
icon,
|
|
2270
2280
|
color
|
|
@@ -2272,7 +2282,8 @@ function SpinningIcon({
|
|
|
2272
2282
|
const clonedIcon = /*#__PURE__*/react.cloneElement(icon, {
|
|
2273
2283
|
color
|
|
2274
2284
|
});
|
|
2275
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
2285
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2286
|
+
className: spinningIcon,
|
|
2276
2287
|
children: clonedIcon
|
|
2277
2288
|
});
|
|
2278
2289
|
}
|
|
@@ -2309,7 +2320,7 @@ function useMatchWindowSize(options) {
|
|
|
2309
2320
|
const {
|
|
2310
2321
|
width,
|
|
2311
2322
|
height
|
|
2312
|
-
} =
|
|
2323
|
+
} = reactNative.useWindowDimensions();
|
|
2313
2324
|
return matchWindowSize({
|
|
2314
2325
|
width,
|
|
2315
2326
|
height
|
|
@@ -2571,18 +2582,18 @@ function ModalBehaviourPortal({
|
|
|
2571
2582
|
});
|
|
2572
2583
|
}
|
|
2573
2584
|
|
|
2574
|
-
const OnCloseContext
|
|
2585
|
+
const OnCloseContext = /*#__PURE__*/react.createContext(() => {});
|
|
2575
2586
|
function OnCloseProvider({
|
|
2576
2587
|
children,
|
|
2577
2588
|
onClose
|
|
2578
2589
|
}) {
|
|
2579
|
-
return /*#__PURE__*/jsxRuntime.jsx(OnCloseContext
|
|
2590
|
+
return /*#__PURE__*/jsxRuntime.jsx(OnCloseContext.Provider, {
|
|
2580
2591
|
value: onClose,
|
|
2581
2592
|
children: children
|
|
2582
2593
|
});
|
|
2583
2594
|
}
|
|
2584
2595
|
function useOnCloseModalBehaviour() {
|
|
2585
|
-
const onClose = react.useContext(OnCloseContext
|
|
2596
|
+
const onClose = react.useContext(OnCloseContext);
|
|
2586
2597
|
return onClose;
|
|
2587
2598
|
}
|
|
2588
2599
|
|
|
@@ -2622,21 +2633,17 @@ function ModalBehaviour({
|
|
|
2622
2633
|
}
|
|
2623
2634
|
ModalBehaviour.CloseButton = CloseButton;
|
|
2624
2635
|
|
|
2625
|
-
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
2626
|
-
const OverlayPressable = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.Pressable).withConfig({
|
|
2627
|
-
displayName: "Overlay__OverlayPressable",
|
|
2628
|
-
componentId: "kitt-universal__sc-1cz1gbr-0"
|
|
2629
|
-
})(({
|
|
2630
|
-
theme
|
|
2631
|
-
}) => ({
|
|
2632
|
-
...BabelPluginStyledComponentsReactNative.StyleSheet.absoluteFillObject,
|
|
2633
|
-
backgroundColor: theme.kitt.colors.overlay.dark
|
|
2634
|
-
}));
|
|
2635
2636
|
function Overlay({
|
|
2636
2637
|
onPress
|
|
2637
2638
|
}) {
|
|
2638
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
2639
|
+
return /*#__PURE__*/jsxRuntime.jsx(Pressable, {
|
|
2639
2640
|
accessibilityRole: "none",
|
|
2641
|
+
position: "absolute",
|
|
2642
|
+
top: "0",
|
|
2643
|
+
left: "0",
|
|
2644
|
+
right: "0",
|
|
2645
|
+
bottom: "0",
|
|
2646
|
+
backgroundColor: "kitt.overlay.dark",
|
|
2640
2647
|
onPress: onPress
|
|
2641
2648
|
});
|
|
2642
2649
|
}
|
|
@@ -2887,6 +2894,64 @@ CardModal.Header = CardModalHeader;
|
|
|
2887
2894
|
CardModal.Footer = CardModalFooter;
|
|
2888
2895
|
CardModal.ModalBehaviour = CardModalBehaviour;
|
|
2889
2896
|
|
|
2897
|
+
function getBackgroundColor$3({
|
|
2898
|
+
isDisabled,
|
|
2899
|
+
isSelected,
|
|
2900
|
+
isHovered,
|
|
2901
|
+
isPressed
|
|
2902
|
+
}) {
|
|
2903
|
+
if (isDisabled) return 'kitt.choices.item.disabled.backgroundColor';
|
|
2904
|
+
if (isSelected && isHovered) return 'kitt.choices.item.hoverWhenSelected.backgroundColor';
|
|
2905
|
+
if (isPressed) return 'kitt.choices.item.pressed.backgroundColor';
|
|
2906
|
+
if (isHovered) return 'kitt.choices.item.hover.backgroundColor';
|
|
2907
|
+
if (isSelected) return 'kitt.choices.item.selected.backgroundColor';
|
|
2908
|
+
return 'kitt.choices.item.default.backgroundColor';
|
|
2909
|
+
}
|
|
2910
|
+
|
|
2911
|
+
function getBorderRadius(variant) {
|
|
2912
|
+
// The clean way to have the rounded effect would have been to know the children height since radius >= height * 0.5
|
|
2913
|
+
// We don't control over the height of the rendered children we just go with a arbitrary really high value
|
|
2914
|
+
return variant === 'rounded' ? Number.MAX_SAFE_INTEGER : 'kitt.choices.item.borderRadius';
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2917
|
+
function AnimatedChoiceItemView({
|
|
2918
|
+
children,
|
|
2919
|
+
variant,
|
|
2920
|
+
size,
|
|
2921
|
+
isHovered,
|
|
2922
|
+
isPressed,
|
|
2923
|
+
isDisabled,
|
|
2924
|
+
isSelected
|
|
2925
|
+
}) {
|
|
2926
|
+
const theme = useTheme();
|
|
2927
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
2928
|
+
position: "relative",
|
|
2929
|
+
borderRadius: getBorderRadius(variant),
|
|
2930
|
+
backgroundColor: getBackgroundColor$3({
|
|
2931
|
+
isDisabled,
|
|
2932
|
+
isSelected,
|
|
2933
|
+
isHovered,
|
|
2934
|
+
isPressed
|
|
2935
|
+
}),
|
|
2936
|
+
paddingX: size === 'small' ? 'kitt.4' : {
|
|
2937
|
+
base: 'kitt.4',
|
|
2938
|
+
small: 'kitt.6'
|
|
2939
|
+
},
|
|
2940
|
+
paddingY: size === 'small' ? 'kitt.2' : {
|
|
2941
|
+
base: 'kitt.4',
|
|
2942
|
+
small: 'kitt.6'
|
|
2943
|
+
},
|
|
2944
|
+
_web: {
|
|
2945
|
+
style: {
|
|
2946
|
+
transitionProperty: theme.kitt.choices.item.transition.property,
|
|
2947
|
+
transitionDuration: `${theme.kitt.choices.item.transition.duration}ms`,
|
|
2948
|
+
transitionTimingFunction: theme.kitt.choices.item.transition.timingFunction
|
|
2949
|
+
}
|
|
2950
|
+
},
|
|
2951
|
+
children: children
|
|
2952
|
+
});
|
|
2953
|
+
}
|
|
2954
|
+
|
|
2890
2955
|
const useNativeAnimation$2 = () => {
|
|
2891
2956
|
return {
|
|
2892
2957
|
onPressIn: () => {},
|
|
@@ -2906,79 +2971,7 @@ function getCurrentTextColor$1({
|
|
|
2906
2971
|
if (isSelected || isPressed) return 'white';
|
|
2907
2972
|
return 'black';
|
|
2908
2973
|
}
|
|
2909
|
-
function getBorderRadius(defaultRadius, variant) {
|
|
2910
|
-
// The clean way to have the rounded effect would have been to know the children height since radius >= height * 0.5
|
|
2911
|
-
// We don't control over the height of the rendered children we just go with a arbitrary really high value
|
|
2912
2974
|
|
|
2913
|
-
if (variant === 'rounded') return 800;
|
|
2914
|
-
return defaultRadius;
|
|
2915
|
-
}
|
|
2916
|
-
const DisabledBorder = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
2917
|
-
displayName: "ChoiceItem__DisabledBorder",
|
|
2918
|
-
componentId: "kitt-universal__sc-wuv3y6-0"
|
|
2919
|
-
})(["border-radius:", "px;", ";"], ({
|
|
2920
|
-
theme,
|
|
2921
|
-
$variant
|
|
2922
|
-
}) => getBorderRadius(theme.kitt.choices.item.borderRadius, $variant), ({
|
|
2923
|
-
theme
|
|
2924
|
-
}) => {
|
|
2925
|
-
const {
|
|
2926
|
-
width,
|
|
2927
|
-
color
|
|
2928
|
-
} = theme.kitt.choices.item.disabled.border;
|
|
2929
|
-
return styled.css(["border:", "px solid ", ";"], width, color);
|
|
2930
|
-
});
|
|
2931
|
-
const ChoiceItemView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
2932
|
-
displayName: "ChoiceItem__ChoiceItemView",
|
|
2933
|
-
componentId: "kitt-universal__sc-wuv3y6-1"
|
|
2934
|
-
})(["position:relative;border-radius:", "px;background-color:", ";", ";", ""], ({
|
|
2935
|
-
theme,
|
|
2936
|
-
$variant
|
|
2937
|
-
}) => getBorderRadius(theme.kitt.choices.item.borderRadius, $variant), ({
|
|
2938
|
-
theme,
|
|
2939
|
-
$isHovered,
|
|
2940
|
-
$isPressed,
|
|
2941
|
-
$isDisabled,
|
|
2942
|
-
$isSelected
|
|
2943
|
-
}) => {
|
|
2944
|
-
const {
|
|
2945
|
-
hoverWhenSelected,
|
|
2946
|
-
hover,
|
|
2947
|
-
disabled,
|
|
2948
|
-
selected,
|
|
2949
|
-
pressed,
|
|
2950
|
-
default: defaultBackground
|
|
2951
|
-
} = theme.kitt.choices.item.backgroundColor;
|
|
2952
|
-
if ($isDisabled) return disabled;
|
|
2953
|
-
if ($isSelected && $isHovered) return hoverWhenSelected;
|
|
2954
|
-
if ($isPressed) return pressed;
|
|
2955
|
-
if ($isHovered) return hover;
|
|
2956
|
-
if ($isSelected) return selected;
|
|
2957
|
-
return defaultBackground;
|
|
2958
|
-
}, ({
|
|
2959
|
-
theme,
|
|
2960
|
-
$size
|
|
2961
|
-
}) => {
|
|
2962
|
-
const {
|
|
2963
|
-
base,
|
|
2964
|
-
small
|
|
2965
|
-
} = theme.kitt.choices.item.padding;
|
|
2966
|
-
if ($size === 'small') {
|
|
2967
|
-
return styled.css(["padding:", "px ", "px;"], base / 2, base);
|
|
2968
|
-
}
|
|
2969
|
-
return theme.responsive.ifWindowSizeMatches({
|
|
2970
|
-
minWidth: KittBreakpoints.SMALL
|
|
2971
|
-
}, styled.css(["padding:", "px;"], small), styled.css(["padding:", "px;"], base));
|
|
2972
|
-
}, ({
|
|
2973
|
-
theme
|
|
2974
|
-
}) => {
|
|
2975
|
-
const {
|
|
2976
|
-
property,
|
|
2977
|
-
duration,
|
|
2978
|
-
timingFunction
|
|
2979
|
-
} = theme.kitt.choices.item.transition;
|
|
2980
|
-
return styled.css(["transition:", " ", "ms ", ";"], property, duration, timingFunction);
|
|
2981
|
-
});
|
|
2982
2975
|
function ChoiceItem({
|
|
2983
2976
|
type = 'button',
|
|
2984
2977
|
value,
|
|
@@ -3028,14 +3021,14 @@ function ChoiceItem({
|
|
|
3028
3021
|
children: ({
|
|
3029
3022
|
isHovered,
|
|
3030
3023
|
isPressed
|
|
3031
|
-
}) => /*#__PURE__*/jsxRuntime.jsxs(
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3024
|
+
}) => /*#__PURE__*/jsxRuntime.jsxs(AnimatedChoiceItemView, {
|
|
3025
|
+
animatedStyles: backgroundStyles,
|
|
3026
|
+
isHovered: isHovered || isHoveredInternal,
|
|
3027
|
+
isDisabled: disabled,
|
|
3028
|
+
isSelected: selected,
|
|
3029
|
+
isPressed: isPressed || isPressedInternal,
|
|
3030
|
+
variant: variant,
|
|
3031
|
+
size: size,
|
|
3039
3032
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography.SetDefaultColor, {
|
|
3040
3033
|
value: getCurrentTextColor$1({
|
|
3041
3034
|
isDisabled: disabled,
|
|
@@ -3044,43 +3037,44 @@ function ChoiceItem({
|
|
|
3044
3037
|
isHovered: isHovered || isHoveredInternal
|
|
3045
3038
|
}),
|
|
3046
3039
|
children: children
|
|
3047
|
-
}), disabled ? /*#__PURE__*/jsxRuntime.jsx(
|
|
3048
|
-
|
|
3049
|
-
|
|
3040
|
+
}), disabled ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
3041
|
+
borderRadius: getBorderRadius(variant),
|
|
3042
|
+
borderWidth: "kitt.choices.item.disabled.borderWidth",
|
|
3043
|
+
borderColor: "kitt.choices.item.disabled.borderColor",
|
|
3044
|
+
position: "absolute",
|
|
3045
|
+
top: "0",
|
|
3046
|
+
right: "0",
|
|
3047
|
+
left: "0",
|
|
3048
|
+
bottom: "0"
|
|
3050
3049
|
}) : null]
|
|
3051
3050
|
})
|
|
3052
3051
|
});
|
|
3053
3052
|
}
|
|
3054
3053
|
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
if ($direction === 'row') {
|
|
3068
|
-
return styled.css(["margin-right:", "px;"], $isLast ? 0 : row);
|
|
3069
|
-
}
|
|
3070
|
-
return styled.css(["margin-bottom:", "px;"], $isLast ? 0 : column);
|
|
3071
|
-
});
|
|
3054
|
+
function ChoiceItemContainer({
|
|
3055
|
+
children,
|
|
3056
|
+
direction,
|
|
3057
|
+
isLast
|
|
3058
|
+
}) {
|
|
3059
|
+
const currentItemMarginValue = isLast ? undefined : 'kitt.3';
|
|
3060
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
3061
|
+
marginRight: direction === 'row' ? currentItemMarginValue : undefined,
|
|
3062
|
+
marginBottom: direction === 'column' ? currentItemMarginValue : undefined,
|
|
3063
|
+
children: children
|
|
3064
|
+
});
|
|
3065
|
+
}
|
|
3072
3066
|
|
|
3073
3067
|
function ChoicesContainer({
|
|
3074
3068
|
direction,
|
|
3075
3069
|
...props
|
|
3076
3070
|
}) {
|
|
3077
3071
|
if (direction === 'row') {
|
|
3078
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
3072
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
|
|
3079
3073
|
horizontal: true,
|
|
3080
3074
|
...props
|
|
3081
3075
|
});
|
|
3082
3076
|
}
|
|
3083
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
3077
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
3084
3078
|
...props
|
|
3085
3079
|
});
|
|
3086
3080
|
}
|
|
@@ -3128,8 +3122,8 @@ function Choices({
|
|
|
3128
3122
|
...sharedProps
|
|
3129
3123
|
});
|
|
3130
3124
|
return /*#__PURE__*/jsxRuntime.jsx(ChoiceItemContainer, {
|
|
3131
|
-
|
|
3132
|
-
|
|
3125
|
+
direction: direction,
|
|
3126
|
+
isLast: index === childrenArray.length - 1,
|
|
3133
3127
|
children: element
|
|
3134
3128
|
}, child.key);
|
|
3135
3129
|
})
|
|
@@ -3347,13 +3341,13 @@ function ExternalAppLink({
|
|
|
3347
3341
|
...rest,
|
|
3348
3342
|
onPress: async e => {
|
|
3349
3343
|
try {
|
|
3350
|
-
const canOpen = await
|
|
3344
|
+
const canOpen = await reactNative.Linking.canOpenURL(href);
|
|
3351
3345
|
if (canOpen) {
|
|
3352
3346
|
if (onPress) {
|
|
3353
3347
|
onPress(e);
|
|
3354
3348
|
if (e?.defaultPrevented) return;
|
|
3355
3349
|
}
|
|
3356
|
-
|
|
3350
|
+
reactNative.Linking.openURL(href).catch(error => {
|
|
3357
3351
|
console.error(`An error occurred while opening ${href}`, error);
|
|
3358
3352
|
onOpenAppError?.(`An error occurred while opening ${href}`);
|
|
3359
3353
|
});
|
|
@@ -3736,24 +3730,13 @@ function stringToNumber(text) {
|
|
|
3736
3730
|
return parseInt(text, 10);
|
|
3737
3731
|
}
|
|
3738
3732
|
|
|
3739
|
-
const
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
} = theme.kitt.forms.input.transition;
|
|
3747
|
-
return `${property} ${duration} ${timingFunction}`;
|
|
3748
|
-
};
|
|
3749
|
-
const InputTextContainer = withTheme( /*#__PURE__*/react$1.styled('div')({
|
|
3750
|
-
name: "InputTextContainer",
|
|
3751
|
-
class: "kitt-u_InputTextContainer_i1encr9g",
|
|
3752
|
-
propsAsIs: false,
|
|
3753
|
-
vars: {
|
|
3754
|
-
"i1encr9g-0": [_exp$2()]
|
|
3755
|
-
}
|
|
3756
|
-
}));
|
|
3733
|
+
const inputTextContainer = "kitt-u_inputTextContainer_i1encr9g";
|
|
3734
|
+
function InputTextContainer(props) {
|
|
3735
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3736
|
+
className: inputTextContainer,
|
|
3737
|
+
...props
|
|
3738
|
+
});
|
|
3739
|
+
}
|
|
3757
3740
|
|
|
3758
3741
|
const InputText = /*#__PURE__*/react.forwardRef(({
|
|
3759
3742
|
id,
|
|
@@ -3775,7 +3758,6 @@ const InputText = /*#__PURE__*/react.forwardRef(({
|
|
|
3775
3758
|
base: 'body'
|
|
3776
3759
|
});
|
|
3777
3760
|
return /*#__PURE__*/jsxRuntime.jsxs(InputTextContainer, {
|
|
3778
|
-
$isDisabled: disabled,
|
|
3779
3761
|
children: [/*#__PURE__*/jsxRuntime.jsx(nativeBase.Input, {
|
|
3780
3762
|
ref: ref,
|
|
3781
3763
|
multiline: multiline,
|
|
@@ -3810,7 +3792,7 @@ const InputText = /*#__PURE__*/react.forwardRef(({
|
|
|
3810
3792
|
});
|
|
3811
3793
|
});
|
|
3812
3794
|
|
|
3813
|
-
function getCurrentInternalForcedState({
|
|
3795
|
+
function getCurrentInternalForcedState$1({
|
|
3814
3796
|
isDisabled,
|
|
3815
3797
|
isHoveredInternal,
|
|
3816
3798
|
isFocusedInternal,
|
|
@@ -3836,7 +3818,7 @@ const InputPart = /*#__PURE__*/react.forwardRef(({
|
|
|
3836
3818
|
}, ref) => {
|
|
3837
3819
|
return /*#__PURE__*/jsxRuntime.jsx(InputText, {
|
|
3838
3820
|
ref: ref,
|
|
3839
|
-
internalForceState: getCurrentInternalForcedState({
|
|
3821
|
+
internalForceState: getCurrentInternalForcedState$1({
|
|
3840
3822
|
isDisabled: disabled,
|
|
3841
3823
|
isHoveredInternal,
|
|
3842
3824
|
isFocusedInternal,
|
|
@@ -4113,7 +4095,7 @@ function InputIcon({
|
|
|
4113
4095
|
function InputPressable({
|
|
4114
4096
|
...props
|
|
4115
4097
|
}) {
|
|
4116
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
4098
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.Pressable, {
|
|
4117
4099
|
...props
|
|
4118
4100
|
});
|
|
4119
4101
|
}
|
|
@@ -4204,31 +4186,6 @@ const InputPhone = /*#__PURE__*/react.forwardRef(({
|
|
|
4204
4186
|
});
|
|
4205
4187
|
|
|
4206
4188
|
const getTypographyColor = type => type ? 'white' : 'black';
|
|
4207
|
-
const InputTagContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
4208
|
-
displayName: "InputTag__InputTagContainer",
|
|
4209
|
-
componentId: "kitt-universal__sc-1511dsf-0"
|
|
4210
|
-
})(["align-items:center;justify-content:center;flex-direction:row;align-self:flex-start;overflow:hidden;padding-horizontal:", "px;background-color:", ";border-radius:", "px;"], ({
|
|
4211
|
-
theme
|
|
4212
|
-
}) => theme.kitt.spacing * 2, ({
|
|
4213
|
-
theme,
|
|
4214
|
-
type
|
|
4215
|
-
}) => {
|
|
4216
|
-
if (type === 'success') {
|
|
4217
|
-
return theme.kitt.forms.inputTag.success.backgroundColor;
|
|
4218
|
-
}
|
|
4219
|
-
if (type === 'danger') {
|
|
4220
|
-
return theme.kitt.forms.inputTag.danger.backgroundColor;
|
|
4221
|
-
}
|
|
4222
|
-
return theme.kitt.forms.inputTag.default.backgroundColor;
|
|
4223
|
-
}, ({
|
|
4224
|
-
theme
|
|
4225
|
-
}) => theme.kitt.forms.inputTag.borderRadius);
|
|
4226
|
-
const IconContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
4227
|
-
displayName: "InputTag__IconContainer",
|
|
4228
|
-
componentId: "kitt-universal__sc-1511dsf-1"
|
|
4229
|
-
})(["margin-right:", "px;"], ({
|
|
4230
|
-
theme
|
|
4231
|
-
}) => theme.kitt.spacing);
|
|
4232
4189
|
function InputTag({
|
|
4233
4190
|
children,
|
|
4234
4191
|
type,
|
|
@@ -4236,15 +4193,23 @@ function InputTag({
|
|
|
4236
4193
|
}) {
|
|
4237
4194
|
const typographyColor = getTypographyColor(type);
|
|
4238
4195
|
const theme = useTheme();
|
|
4239
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
4240
|
-
|
|
4241
|
-
|
|
4196
|
+
return /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
4197
|
+
alignItems: "center",
|
|
4198
|
+
justifyContent: "center",
|
|
4199
|
+
flexDirection: "row",
|
|
4200
|
+
alignSelf: "flex-start",
|
|
4201
|
+
overflow: "hidden",
|
|
4202
|
+
paddingX: "kitt.2",
|
|
4203
|
+
backgroundColor: `kitt.forms.inputTag.${type || 'default'}.backgroundColor`,
|
|
4204
|
+
borderRadius: "kitt.forms.inputTag.borderRadius",
|
|
4205
|
+
children: [icon ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4206
|
+
marginRight: "kitt.1",
|
|
4242
4207
|
children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
4243
4208
|
icon: icon,
|
|
4244
4209
|
size: theme.kitt.forms.inputTag.iconSize,
|
|
4245
4210
|
color: typographyColor
|
|
4246
4211
|
})
|
|
4247
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
4212
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
4248
4213
|
base: "body-small",
|
|
4249
4214
|
color: typographyColor,
|
|
4250
4215
|
children: children
|
|
@@ -4921,7 +4886,7 @@ function FullscreenModal({
|
|
|
4921
4886
|
flexGrow: 1,
|
|
4922
4887
|
flexShrink: 1,
|
|
4923
4888
|
justifyContent: "space-between",
|
|
4924
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
4889
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
|
|
4925
4890
|
bounces: false,
|
|
4926
4891
|
contentContainerStyle: {
|
|
4927
4892
|
flexGrow: 1,
|
|
@@ -5165,89 +5130,46 @@ function useKittMapConfig() {
|
|
|
5165
5130
|
return context;
|
|
5166
5131
|
}
|
|
5167
5132
|
|
|
5168
|
-
const ContentView$1 = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
5169
|
-
displayName: "ListItemContent__ContentView",
|
|
5170
|
-
componentId: "kitt-universal__sc-57q0u9-0"
|
|
5171
|
-
})(["flex:1 0 0%;align-self:center;"]);
|
|
5172
5133
|
function ListItemContent({
|
|
5173
5134
|
children,
|
|
5174
5135
|
...rest
|
|
5175
5136
|
}) {
|
|
5176
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
5137
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
5138
|
+
alignSelf: "center",
|
|
5139
|
+
flexBasis: "0%",
|
|
5140
|
+
flexGrow: 1,
|
|
5141
|
+
flexShrink: 0,
|
|
5177
5142
|
...rest,
|
|
5178
5143
|
children: children
|
|
5179
5144
|
});
|
|
5180
5145
|
}
|
|
5181
5146
|
|
|
5182
|
-
const SideContainerView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
5183
|
-
displayName: "ListItemSideContent__SideContainerView",
|
|
5184
|
-
componentId: "kitt-universal__sc-1vajiw-0"
|
|
5185
|
-
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], ({
|
|
5186
|
-
theme,
|
|
5187
|
-
side
|
|
5188
|
-
}) => side === 'right' ? `${theme.kitt.listItem.innerMargin}px` : 0, ({
|
|
5189
|
-
theme,
|
|
5190
|
-
side
|
|
5191
|
-
}) => side === 'left' ? `${theme.kitt.listItem.innerMargin}px` : 0);
|
|
5192
|
-
|
|
5193
5147
|
// Handles the vertical alignment of the side elements of the list item
|
|
5194
5148
|
function ListItemSideContainer({
|
|
5195
5149
|
children,
|
|
5196
5150
|
side = 'left',
|
|
5197
5151
|
...rest
|
|
5198
5152
|
}) {
|
|
5199
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
5200
|
-
|
|
5153
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
5154
|
+
flexDirection: "row",
|
|
5155
|
+
marginLeft: side === 'right' ? 'kitt.2' : undefined,
|
|
5156
|
+
marginRight: side === 'left' ? 'kitt.2' : undefined,
|
|
5201
5157
|
...rest,
|
|
5202
5158
|
children: children
|
|
5203
5159
|
});
|
|
5204
5160
|
}
|
|
5205
|
-
const SideContentView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
5206
|
-
displayName: "ListItemSideContent__SideContentView",
|
|
5207
|
-
componentId: "kitt-universal__sc-1vajiw-1"
|
|
5208
|
-
})(["align-self:", ";"], ({
|
|
5209
|
-
align
|
|
5210
|
-
}) => align);
|
|
5211
5161
|
function ListItemSideContent({
|
|
5212
5162
|
children,
|
|
5213
5163
|
align = 'auto',
|
|
5214
5164
|
...rest
|
|
5215
5165
|
}) {
|
|
5216
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
5217
|
-
|
|
5166
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
5167
|
+
alignSelf: align,
|
|
5218
5168
|
...rest,
|
|
5219
5169
|
children: children
|
|
5220
5170
|
});
|
|
5221
5171
|
}
|
|
5222
5172
|
|
|
5223
|
-
const ContainerView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
5224
|
-
displayName: "ListItem__ContainerView",
|
|
5225
|
-
componentId: "kitt-universal__sc-2afp9s-0"
|
|
5226
|
-
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], ({
|
|
5227
|
-
withPadding,
|
|
5228
|
-
theme
|
|
5229
|
-
}) => withPadding ? theme.kitt.listItem.padding : 0, ({
|
|
5230
|
-
theme,
|
|
5231
|
-
borders
|
|
5232
|
-
}) => {
|
|
5233
|
-
const {
|
|
5234
|
-
borderWidth
|
|
5235
|
-
} = theme.kitt.listItem;
|
|
5236
|
-
if (borders === 'top') {
|
|
5237
|
-
return `border-top-width: ${borderWidth}px`;
|
|
5238
|
-
}
|
|
5239
|
-
if (borders === 'bottom') {
|
|
5240
|
-
return `border-bottom-width: ${borderWidth}px`;
|
|
5241
|
-
}
|
|
5242
|
-
if (borders === 'both') {
|
|
5243
|
-
return styled.css(["border-top-width:", "px;border-bottom-width:", "px;"], borderWidth, borderWidth);
|
|
5244
|
-
}
|
|
5245
|
-
return 'border: none';
|
|
5246
|
-
}, ({
|
|
5247
|
-
theme
|
|
5248
|
-
}) => theme.kitt.listItem.borderColor, ({
|
|
5249
|
-
theme
|
|
5250
|
-
}) => theme.kitt.colors.uiBackgroundLight);
|
|
5251
5173
|
function ListItem({
|
|
5252
5174
|
children,
|
|
5253
5175
|
withPadding,
|
|
@@ -5257,7 +5179,7 @@ function ListItem({
|
|
|
5257
5179
|
onPress,
|
|
5258
5180
|
...rest
|
|
5259
5181
|
}) {
|
|
5260
|
-
const Wrapper = onPress ?
|
|
5182
|
+
const Wrapper = onPress ? reactNative.Pressable : react.Fragment;
|
|
5261
5183
|
const wrapperProps = onPress ? {
|
|
5262
5184
|
accessibilityRole: 'button',
|
|
5263
5185
|
onPress,
|
|
@@ -5266,9 +5188,14 @@ function ListItem({
|
|
|
5266
5188
|
const containerProps = onPress ? undefined : rest;
|
|
5267
5189
|
return /*#__PURE__*/jsxRuntime.jsx(Wrapper, {
|
|
5268
5190
|
...wrapperProps,
|
|
5269
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(
|
|
5270
|
-
|
|
5271
|
-
|
|
5191
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
5192
|
+
flexDirection: "row",
|
|
5193
|
+
paddingX: withPadding ? 'kitt.listItem.horizontalPadding' : undefined,
|
|
5194
|
+
paddingY: withPadding ? 'kitt.listItem.verticalPadding' : undefined,
|
|
5195
|
+
borderColor: "kitt.listItem.borderColor",
|
|
5196
|
+
backgroundColor: "kitt.uiBackgroundLight",
|
|
5197
|
+
borderTopWidth: borders === 'top' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
5198
|
+
borderBottomWidth: borders === 'bottom' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
5272
5199
|
...containerProps,
|
|
5273
5200
|
children: [left ? /*#__PURE__*/jsxRuntime.jsx(ListItemSideContainer, {
|
|
5274
5201
|
side: "left",
|
|
@@ -5633,142 +5560,6 @@ function Message({
|
|
|
5633
5560
|
});
|
|
5634
5561
|
}
|
|
5635
5562
|
|
|
5636
|
-
const BodyView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
5637
|
-
displayName: "Body__BodyView",
|
|
5638
|
-
componentId: "kitt-universal__sc-17fwpo4-0"
|
|
5639
|
-
})(["padding:", "px ", "px;"], ({
|
|
5640
|
-
theme
|
|
5641
|
-
}) => theme.kitt.spacing * 6, ({
|
|
5642
|
-
theme
|
|
5643
|
-
}) => theme.kitt.spacing * 4);
|
|
5644
|
-
function ModalBody({
|
|
5645
|
-
children
|
|
5646
|
-
}) {
|
|
5647
|
-
return /*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.ScrollView, {
|
|
5648
|
-
children: /*#__PURE__*/jsxRuntime.jsx(BodyView, {
|
|
5649
|
-
children: children
|
|
5650
|
-
})
|
|
5651
|
-
});
|
|
5652
|
-
}
|
|
5653
|
-
|
|
5654
|
-
const FooterView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
5655
|
-
displayName: "Footer__FooterView",
|
|
5656
|
-
componentId: "kitt-universal__sc-1ujq2dc-0"
|
|
5657
|
-
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], ({
|
|
5658
|
-
theme
|
|
5659
|
-
}) => theme.kitt.spacing * 4, ({
|
|
5660
|
-
theme
|
|
5661
|
-
}) => theme.kitt.colors.separator);
|
|
5662
|
-
function ModalFooter({
|
|
5663
|
-
children
|
|
5664
|
-
}) {
|
|
5665
|
-
return /*#__PURE__*/jsxRuntime.jsx(FooterView, {
|
|
5666
|
-
children: children
|
|
5667
|
-
});
|
|
5668
|
-
}
|
|
5669
|
-
|
|
5670
|
-
const OnCloseContext = /*#__PURE__*/react.createContext(() => {});
|
|
5671
|
-
|
|
5672
|
-
const HeaderView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
5673
|
-
displayName: "Header__HeaderView",
|
|
5674
|
-
componentId: "kitt-universal__sc-1iwabch-0"
|
|
5675
|
-
})(["position:relative;padding:", "px;display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;align-items:center;border-bottom-width:1px;border-bottom-color:", ";min-height:57px;"], ({
|
|
5676
|
-
theme
|
|
5677
|
-
}) => theme.kitt.spacing * 2, ({
|
|
5678
|
-
theme
|
|
5679
|
-
}) => theme.kitt.colors.separator);
|
|
5680
|
-
const LeftIconView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
5681
|
-
displayName: "Header__LeftIconView",
|
|
5682
|
-
componentId: "kitt-universal__sc-1iwabch-1"
|
|
5683
|
-
})(["align-self:flex-start;margin-right:", "px;"], ({
|
|
5684
|
-
theme
|
|
5685
|
-
}) => theme.kitt.spacing * 2);
|
|
5686
|
-
const RightIconView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
5687
|
-
displayName: "Header__RightIconView",
|
|
5688
|
-
componentId: "kitt-universal__sc-1iwabch-2"
|
|
5689
|
-
})(["align-self:flex-start;margin-left:", "px;"], ({
|
|
5690
|
-
theme
|
|
5691
|
-
}) => theme.kitt.spacing * 2);
|
|
5692
|
-
const TitleView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
5693
|
-
displayName: "Header__TitleView",
|
|
5694
|
-
componentId: "kitt-universal__sc-1iwabch-3"
|
|
5695
|
-
})(["padding-left:", "px;flex-shrink:1;"], ({
|
|
5696
|
-
theme,
|
|
5697
|
-
isIconLeft
|
|
5698
|
-
}) => isIconLeft ? 0 : theme.kitt.spacing * 2);
|
|
5699
|
-
function ModalHeader({
|
|
5700
|
-
left,
|
|
5701
|
-
right,
|
|
5702
|
-
children
|
|
5703
|
-
}) {
|
|
5704
|
-
const onClose = react.useContext(OnCloseContext);
|
|
5705
|
-
const isIconLeft = !!left;
|
|
5706
|
-
return /*#__PURE__*/jsxRuntime.jsxs(HeaderView, {
|
|
5707
|
-
children: [isIconLeft && /*#__PURE__*/jsxRuntime.jsx(LeftIconView, {
|
|
5708
|
-
children: left
|
|
5709
|
-
}), /*#__PURE__*/jsxRuntime.jsx(TitleView, {
|
|
5710
|
-
isIconLeft: isIconLeft,
|
|
5711
|
-
children: children
|
|
5712
|
-
}), right !== undefined ? right : /*#__PURE__*/jsxRuntime.jsx(RightIconView, {
|
|
5713
|
-
children: /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
5714
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.XIcon, {}),
|
|
5715
|
-
onPress: onClose
|
|
5716
|
-
})
|
|
5717
|
-
})]
|
|
5718
|
-
});
|
|
5719
|
-
}
|
|
5720
|
-
|
|
5721
|
-
const ModalView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
5722
|
-
displayName: "Modal__ModalView",
|
|
5723
|
-
componentId: "kitt-universal__sc-1xy2w5u-0"
|
|
5724
|
-
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], ({
|
|
5725
|
-
theme
|
|
5726
|
-
}) => theme.kitt.spacing * 20, ({
|
|
5727
|
-
theme
|
|
5728
|
-
}) => theme.kitt.spacing * 4);
|
|
5729
|
-
const ContentView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
5730
|
-
displayName: "Modal__ContentView",
|
|
5731
|
-
componentId: "kitt-universal__sc-1xy2w5u-1"
|
|
5732
|
-
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], ({
|
|
5733
|
-
theme
|
|
5734
|
-
}) => theme.kitt.card.borderRadius, ({
|
|
5735
|
-
theme
|
|
5736
|
-
}) => theme.kitt.colors.uiBackgroundLight);
|
|
5737
|
-
|
|
5738
|
-
/**
|
|
5739
|
-
* @deprecated This component will be deleted in a later Kitt Universal version. Use CardModal instead
|
|
5740
|
-
*/
|
|
5741
|
-
function Modal({
|
|
5742
|
-
visible,
|
|
5743
|
-
children,
|
|
5744
|
-
onClose,
|
|
5745
|
-
onEntered,
|
|
5746
|
-
onExited
|
|
5747
|
-
}) {
|
|
5748
|
-
return /*#__PURE__*/jsxRuntime.jsx(OnCloseContext.Provider, {
|
|
5749
|
-
value: onClose,
|
|
5750
|
-
children: /*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.Modal, {
|
|
5751
|
-
transparent: true,
|
|
5752
|
-
animationType: "fade",
|
|
5753
|
-
supportedOrientations: ['landscape', 'portrait'],
|
|
5754
|
-
visible: visible,
|
|
5755
|
-
onShow: onEntered,
|
|
5756
|
-
onDismiss: onExited,
|
|
5757
|
-
onRequestClose: onClose,
|
|
5758
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(ModalView, {
|
|
5759
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
5760
|
-
onPress: onClose
|
|
5761
|
-
}), /*#__PURE__*/jsxRuntime.jsx(ContentView, {
|
|
5762
|
-
children: children
|
|
5763
|
-
})]
|
|
5764
|
-
})
|
|
5765
|
-
})
|
|
5766
|
-
});
|
|
5767
|
-
}
|
|
5768
|
-
Modal.Header = ModalHeader;
|
|
5769
|
-
Modal.Body = ModalBody;
|
|
5770
|
-
Modal.Footer = ModalFooter;
|
|
5771
|
-
|
|
5772
5563
|
const createKittSpaces = spacing => {
|
|
5773
5564
|
const sizes = {
|
|
5774
5565
|
positive: {},
|
|
@@ -5921,6 +5712,71 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
5921
5712
|
'subtle-dark': theme.button['subtle-dark'],
|
|
5922
5713
|
disabled: theme.button.disabled
|
|
5923
5714
|
},
|
|
5715
|
+
choices: {
|
|
5716
|
+
item: {
|
|
5717
|
+
default: {
|
|
5718
|
+
backgroundColor: theme.choices.item.backgroundColor.default
|
|
5719
|
+
},
|
|
5720
|
+
disabled: {
|
|
5721
|
+
backgroundColor: theme.choices.item.backgroundColor.disabled,
|
|
5722
|
+
borderColor: theme.choices.item.disabled.border.color
|
|
5723
|
+
},
|
|
5724
|
+
selected: {
|
|
5725
|
+
backgroundColor: theme.choices.item.backgroundColor.selected
|
|
5726
|
+
},
|
|
5727
|
+
pressed: {
|
|
5728
|
+
backgroundColor: theme.choices.item.backgroundColor.pressed
|
|
5729
|
+
},
|
|
5730
|
+
hover: {
|
|
5731
|
+
backgroundColor: theme.choices.item.backgroundColor.hover
|
|
5732
|
+
},
|
|
5733
|
+
hoverWhenSelected: {
|
|
5734
|
+
backgroundColor: theme.choices.item.backgroundColor.hoverWhenSelected
|
|
5735
|
+
}
|
|
5736
|
+
}
|
|
5737
|
+
},
|
|
5738
|
+
tag: {
|
|
5739
|
+
primary: {
|
|
5740
|
+
fill: {
|
|
5741
|
+
backgroundColor: theme.tag.primary.fill.backgroundColor,
|
|
5742
|
+
borderColor: theme.tag.primary.fill.borderColor
|
|
5743
|
+
},
|
|
5744
|
+
outline: {
|
|
5745
|
+
backgroundColor: theme.tag.primary.outline.backgroundColor,
|
|
5746
|
+
borderColor: theme.tag.primary.outline.borderColor
|
|
5747
|
+
}
|
|
5748
|
+
},
|
|
5749
|
+
default: {
|
|
5750
|
+
fill: {
|
|
5751
|
+
backgroundColor: theme.tag.default.fill.backgroundColor,
|
|
5752
|
+
borderColor: theme.tag.default.fill.borderColor
|
|
5753
|
+
},
|
|
5754
|
+
outline: {
|
|
5755
|
+
backgroundColor: theme.tag.default.outline.backgroundColor,
|
|
5756
|
+
borderColor: theme.tag.default.outline.borderColor
|
|
5757
|
+
}
|
|
5758
|
+
},
|
|
5759
|
+
danger: {
|
|
5760
|
+
fill: {
|
|
5761
|
+
backgroundColor: theme.tag.danger.fill.backgroundColor,
|
|
5762
|
+
borderColor: theme.tag.danger.fill.borderColor
|
|
5763
|
+
},
|
|
5764
|
+
outline: {
|
|
5765
|
+
backgroundColor: theme.tag.danger.outline.backgroundColor,
|
|
5766
|
+
borderColor: theme.tag.danger.outline.borderColor
|
|
5767
|
+
}
|
|
5768
|
+
},
|
|
5769
|
+
warn: {
|
|
5770
|
+
fill: {
|
|
5771
|
+
backgroundColor: theme.tag.warn.fill.backgroundColor,
|
|
5772
|
+
borderColor: theme.tag.warn.fill.borderColor
|
|
5773
|
+
},
|
|
5774
|
+
outline: {
|
|
5775
|
+
backgroundColor: theme.tag.warn.outline.backgroundColor,
|
|
5776
|
+
borderColor: theme.tag.warn.outline.borderColor
|
|
5777
|
+
}
|
|
5778
|
+
}
|
|
5779
|
+
},
|
|
5924
5780
|
tooltip: {
|
|
5925
5781
|
backgroundColor: theme.tooltip.backgroundColor
|
|
5926
5782
|
},
|
|
@@ -5944,6 +5800,17 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
5944
5800
|
input: {
|
|
5945
5801
|
states: theme.forms.input.states
|
|
5946
5802
|
},
|
|
5803
|
+
inputTag: {
|
|
5804
|
+
danger: {
|
|
5805
|
+
backgroundColor: theme.forms.inputTag.danger.backgroundColor
|
|
5806
|
+
},
|
|
5807
|
+
default: {
|
|
5808
|
+
backgroundColor: theme.forms.inputTag.default.backgroundColor
|
|
5809
|
+
},
|
|
5810
|
+
success: {
|
|
5811
|
+
backgroundColor: theme.forms.inputTag.success.backgroundColor
|
|
5812
|
+
}
|
|
5813
|
+
},
|
|
5947
5814
|
radioButtonGroup: {
|
|
5948
5815
|
item: {
|
|
5949
5816
|
borderColor: theme.forms.radioButtonGroup.item.borderColor,
|
|
@@ -6042,6 +5909,49 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6042
5909
|
dark: {
|
|
6043
5910
|
backgroundColor: theme.highlight.dark.backgroundColor
|
|
6044
5911
|
}
|
|
5912
|
+
},
|
|
5913
|
+
verticalSteps: {
|
|
5914
|
+
active: {
|
|
5915
|
+
icon: {
|
|
5916
|
+
backgroundColor: theme.verticalSteps.active.icon.backgroundColor,
|
|
5917
|
+
textColor: theme.verticalSteps.active.icon.textColor
|
|
5918
|
+
}
|
|
5919
|
+
},
|
|
5920
|
+
done: {
|
|
5921
|
+
icon: {
|
|
5922
|
+
backgroundColor: theme.verticalSteps.done.icon.backgroundColor,
|
|
5923
|
+
textColor: theme.verticalSteps.done.icon.textColor
|
|
5924
|
+
}
|
|
5925
|
+
},
|
|
5926
|
+
default: {
|
|
5927
|
+
icon: {
|
|
5928
|
+
backgroundColor: theme.verticalSteps.default.icon.backgroundColor,
|
|
5929
|
+
textColor: theme.verticalSteps.default.icon.textColor
|
|
5930
|
+
}
|
|
5931
|
+
}
|
|
5932
|
+
},
|
|
5933
|
+
listItem: {
|
|
5934
|
+
borderColor: theme.listItem.borderColor
|
|
5935
|
+
},
|
|
5936
|
+
picker: {
|
|
5937
|
+
ios: {
|
|
5938
|
+
item: {
|
|
5939
|
+
selected: {
|
|
5940
|
+
color: theme.picker.ios.selected.color
|
|
5941
|
+
}
|
|
5942
|
+
}
|
|
5943
|
+
},
|
|
5944
|
+
android: {
|
|
5945
|
+
item: {
|
|
5946
|
+
default: {
|
|
5947
|
+
backgroundColor: theme.picker.android.default.backgroundColor
|
|
5948
|
+
},
|
|
5949
|
+
selected: {
|
|
5950
|
+
color: theme.picker.android.selected.color,
|
|
5951
|
+
backgroundColor: theme.picker.android.selected.backgroundColor
|
|
5952
|
+
}
|
|
5953
|
+
}
|
|
5954
|
+
}
|
|
6045
5955
|
}
|
|
6046
5956
|
},
|
|
6047
5957
|
app: appTheme?.colors
|
|
@@ -6077,6 +5987,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6077
5987
|
cardModal: {
|
|
6078
5988
|
borderRadius: theme.cardModal.borderRadius
|
|
6079
5989
|
},
|
|
5990
|
+
choices: {
|
|
5991
|
+
item: {
|
|
5992
|
+
borderRadius: theme.choices.item.borderRadius
|
|
5993
|
+
}
|
|
5994
|
+
},
|
|
6080
5995
|
dialogModal: {
|
|
6081
5996
|
borderRadius: theme.dialogModal.borderRadius
|
|
6082
5997
|
},
|
|
@@ -6084,6 +5999,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6084
5999
|
input: {
|
|
6085
6000
|
borderRadius: theme.forms.input.borderRadius
|
|
6086
6001
|
},
|
|
6002
|
+
inputTag: {
|
|
6003
|
+
borderRadius: theme.forms.inputTag.borderRadius
|
|
6004
|
+
},
|
|
6087
6005
|
radioButtonGroup: {
|
|
6088
6006
|
item: {
|
|
6089
6007
|
borderRadius: theme.forms.radioButtonGroup.item.borderRadius
|
|
@@ -6105,6 +6023,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6105
6023
|
iconButton: {
|
|
6106
6024
|
borderRadius: theme.iconButton.borderRadius
|
|
6107
6025
|
},
|
|
6026
|
+
tag: {
|
|
6027
|
+
borderRadius: theme.tag.borderRadius
|
|
6028
|
+
},
|
|
6108
6029
|
tooltip: {
|
|
6109
6030
|
borderRadius: theme.tooltip.borderRadius
|
|
6110
6031
|
},
|
|
@@ -6216,6 +6137,13 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6216
6137
|
button: {
|
|
6217
6138
|
borderWidth: theme.button.borderWidth
|
|
6218
6139
|
},
|
|
6140
|
+
choices: {
|
|
6141
|
+
item: {
|
|
6142
|
+
disabled: {
|
|
6143
|
+
borderWidth: theme.choices.item.disabled.border.width
|
|
6144
|
+
}
|
|
6145
|
+
}
|
|
6146
|
+
},
|
|
6219
6147
|
iconButton: {
|
|
6220
6148
|
borderWidth: theme.iconButton.borderWidth
|
|
6221
6149
|
},
|
|
@@ -6242,6 +6170,43 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6242
6170
|
footer: {
|
|
6243
6171
|
borderWidth: theme.cardModal.footer.borderWidth
|
|
6244
6172
|
}
|
|
6173
|
+
},
|
|
6174
|
+
listItem: {
|
|
6175
|
+
borderWidth: theme.listItem.borderWidth
|
|
6176
|
+
},
|
|
6177
|
+
tag: {
|
|
6178
|
+
primary: {
|
|
6179
|
+
fill: {
|
|
6180
|
+
borderWidth: theme.tag.primary.fill.borderWidth
|
|
6181
|
+
},
|
|
6182
|
+
outline: {
|
|
6183
|
+
borderWidth: theme.tag.primary.outline.borderWidth
|
|
6184
|
+
}
|
|
6185
|
+
},
|
|
6186
|
+
default: {
|
|
6187
|
+
fill: {
|
|
6188
|
+
borderWidth: theme.tag.default.fill.borderWidth
|
|
6189
|
+
},
|
|
6190
|
+
outline: {
|
|
6191
|
+
borderWidth: theme.tag.default.outline.borderWidth
|
|
6192
|
+
}
|
|
6193
|
+
},
|
|
6194
|
+
danger: {
|
|
6195
|
+
fill: {
|
|
6196
|
+
borderWidth: theme.tag.danger.fill.borderWidth
|
|
6197
|
+
},
|
|
6198
|
+
outline: {
|
|
6199
|
+
borderWidth: theme.tag.danger.outline.borderWidth
|
|
6200
|
+
}
|
|
6201
|
+
},
|
|
6202
|
+
warn: {
|
|
6203
|
+
fill: {
|
|
6204
|
+
borderWidth: theme.tag.warn.fill.borderWidth
|
|
6205
|
+
},
|
|
6206
|
+
outline: {
|
|
6207
|
+
borderWidth: theme.tag.warn.outline.borderWidth
|
|
6208
|
+
}
|
|
6209
|
+
}
|
|
6245
6210
|
}
|
|
6246
6211
|
},
|
|
6247
6212
|
app: appTheme?.borderWidths
|
|
@@ -6316,6 +6281,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6316
6281
|
},
|
|
6317
6282
|
textArea: {
|
|
6318
6283
|
minHeight: theme.forms.textArea.minHeight
|
|
6284
|
+
},
|
|
6285
|
+
timePicker: {
|
|
6286
|
+
minWidth: theme.forms.timePicker.minWidth
|
|
6319
6287
|
}
|
|
6320
6288
|
},
|
|
6321
6289
|
iconButton: {
|
|
@@ -6328,6 +6296,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6328
6296
|
height: theme.fullscreenModal.header.height
|
|
6329
6297
|
}
|
|
6330
6298
|
},
|
|
6299
|
+
pageLoader: {
|
|
6300
|
+
size: theme.pageLoader.size
|
|
6301
|
+
},
|
|
6331
6302
|
tooltip: {
|
|
6332
6303
|
maxWidth: theme.tooltip.maxWidth,
|
|
6333
6304
|
arrow: {
|
|
@@ -6347,6 +6318,16 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6347
6318
|
size: theme.skeleton.shape.square.size
|
|
6348
6319
|
}
|
|
6349
6320
|
}
|
|
6321
|
+
},
|
|
6322
|
+
picker: {
|
|
6323
|
+
ios: {
|
|
6324
|
+
default: {
|
|
6325
|
+
height: theme.picker.ios.default.height
|
|
6326
|
+
},
|
|
6327
|
+
landscape: {
|
|
6328
|
+
height: theme.picker.ios.landscape.height
|
|
6329
|
+
}
|
|
6330
|
+
}
|
|
6350
6331
|
}
|
|
6351
6332
|
},
|
|
6352
6333
|
app: appTheme?.sizes
|
|
@@ -6395,10 +6376,26 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
6395
6376
|
highlight: {
|
|
6396
6377
|
padding: theme.highlight.padding
|
|
6397
6378
|
},
|
|
6379
|
+
listItem: {
|
|
6380
|
+
verticalPadding: theme.listItem.verticalPadding,
|
|
6381
|
+
horizontalPadding: theme.listItem.horizontalPadding
|
|
6382
|
+
},
|
|
6383
|
+
tag: {
|
|
6384
|
+
verticalPadding: theme.tag.verticalPadding,
|
|
6385
|
+
horizontalPadding: theme.tag.horizontalPadding
|
|
6386
|
+
},
|
|
6398
6387
|
tooltip: {
|
|
6399
6388
|
horizontalPadding: theme.tooltip.horizontalPadding,
|
|
6400
6389
|
verticalPadding: theme.tooltip.verticalPadding,
|
|
6401
6390
|
floatingPadding: theme.tooltip.floatingPadding
|
|
6391
|
+
},
|
|
6392
|
+
picker: {
|
|
6393
|
+
android: {
|
|
6394
|
+
item: {
|
|
6395
|
+
verticalPadding: theme.picker.android.verticalPadding,
|
|
6396
|
+
horizontalPadding: theme.picker.android.horizontalPadding
|
|
6397
|
+
}
|
|
6398
|
+
}
|
|
6402
6399
|
}
|
|
6403
6400
|
},
|
|
6404
6401
|
app: appTheme?.space
|
|
@@ -7105,71 +7102,11 @@ function Notification({
|
|
|
7105
7102
|
});
|
|
7106
7103
|
}
|
|
7107
7104
|
|
|
7108
|
-
const
|
|
7109
|
-
$circlePerimeter
|
|
7110
|
-
}) => $circlePerimeter * 0.2;
|
|
7111
|
-
const _exp5 = () => ({
|
|
7112
|
-
theme
|
|
7113
|
-
}) => theme.kitt.pageLoader.size;
|
|
7114
|
-
const _exp6 = () => ({
|
|
7115
|
-
theme
|
|
7116
|
-
}) => theme.kitt.pageLoader.strokeWidth;
|
|
7117
|
-
const _exp8 = () => ({
|
|
7118
|
-
$circlePerimeter
|
|
7119
|
-
}) => $circlePerimeter;
|
|
7120
|
-
const _exp9 = () => ({
|
|
7121
|
-
theme
|
|
7122
|
-
}) => theme.kitt.pageLoader.colors.base;
|
|
7123
|
-
const _exp10 = () => ({
|
|
7124
|
-
theme
|
|
7125
|
-
}) => {
|
|
7126
|
-
const {
|
|
7127
|
-
animation
|
|
7128
|
-
} = theme.kitt.pageLoader;
|
|
7129
|
-
const [x1, y1, x2, y2] = animation.fillEasingFunction;
|
|
7130
|
-
return `${animation.circleBackgroundFillDuration}ms cubic-bezier(${x1}, ${y1}, ${x2}, ${y2}) ${animation.delay}ms forwards`;
|
|
7131
|
-
};
|
|
7132
|
-
const _exp11 = () => ({
|
|
7133
|
-
theme
|
|
7134
|
-
}) => {
|
|
7135
|
-
const {
|
|
7136
|
-
animation
|
|
7137
|
-
} = theme.kitt.pageLoader;
|
|
7138
|
-
return `${animation.filledCircleFillDuration}ms linear ${animation.delay}ms infinite`;
|
|
7139
|
-
};
|
|
7140
|
-
const _exp12 = () => ({
|
|
7141
|
-
theme
|
|
7142
|
-
}) => theme.kitt.pageLoader.colors.fill;
|
|
7143
|
-
const _exp13 = () => ({
|
|
7144
|
-
theme
|
|
7145
|
-
}) => {
|
|
7146
|
-
const {
|
|
7147
|
-
animation
|
|
7148
|
-
} = theme.kitt.pageLoader;
|
|
7149
|
-
const [x1, y1, x2, y2] = animation.fillEasingFunction;
|
|
7150
|
-
const fillAnimation = `${animation.filledCircleFillDuration}ms cubic-bezier(${x1}, ${y1}, ${x2}, ${y2}) ${animation.delay}ms infinite alternate`;
|
|
7151
|
-
const rotationAnimation = `${animation.filledCircleRotationDuration}ms linear ${animation.delay}ms infinite`;
|
|
7152
|
-
return [fillAnimation, rotationAnimation].join(',');
|
|
7153
|
-
};
|
|
7154
|
-
const PageLoaderContainer = withTheme( /*#__PURE__*/react$1.styled('div')({
|
|
7155
|
-
name: "PageLoaderContainer",
|
|
7156
|
-
class: "kitt-u_PageLoaderContainer_ptkwz2j",
|
|
7157
|
-
propsAsIs: false,
|
|
7158
|
-
vars: {
|
|
7159
|
-
"ptkwz2j-0": [_exp8(), "px"],
|
|
7160
|
-
"ptkwz2j-1": [_exp3$1(), "px"],
|
|
7161
|
-
"ptkwz2j-2": [_exp5(), "px"],
|
|
7162
|
-
"ptkwz2j-3": [_exp6(), "px"],
|
|
7163
|
-
"ptkwz2j-4": [_exp9()],
|
|
7164
|
-
"ptkwz2j-5": [_exp10()],
|
|
7165
|
-
"ptkwz2j-6": [_exp11()],
|
|
7166
|
-
"ptkwz2j-7": [_exp12()],
|
|
7167
|
-
"ptkwz2j-8": [_exp13()]
|
|
7168
|
-
}
|
|
7169
|
-
}));
|
|
7105
|
+
const pageLoaderContainer = "kitt-u_pageLoaderContainer_ptkwz2j";
|
|
7170
7106
|
function PageLoader() {
|
|
7171
7107
|
const theme = useTheme();
|
|
7172
7108
|
const {
|
|
7109
|
+
colors,
|
|
7173
7110
|
size,
|
|
7174
7111
|
strokeWidth
|
|
7175
7112
|
} = theme.kitt.pageLoader;
|
|
@@ -7180,22 +7117,28 @@ function PageLoader() {
|
|
|
7180
7117
|
cx: center,
|
|
7181
7118
|
cy: center,
|
|
7182
7119
|
r: radius,
|
|
7183
|
-
fill: 'none'
|
|
7120
|
+
fill: 'none',
|
|
7121
|
+
strokeWidth,
|
|
7122
|
+
strokeDasharray: circlePerimeter,
|
|
7123
|
+
strokeDashoffset: circlePerimeter,
|
|
7124
|
+
strokeLinecap: 'round'
|
|
7184
7125
|
};
|
|
7185
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
7186
|
-
|
|
7126
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7127
|
+
className: pageLoaderContainer,
|
|
7187
7128
|
children: /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
7188
7129
|
width: size,
|
|
7189
7130
|
height: size,
|
|
7190
7131
|
children: [/*#__PURE__*/jsxRuntime.jsx("g", {
|
|
7191
7132
|
"data-large-loader": "base",
|
|
7192
7133
|
children: /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
7193
|
-
...sharedProps
|
|
7134
|
+
...sharedProps,
|
|
7135
|
+
stroke: colors.base
|
|
7194
7136
|
})
|
|
7195
7137
|
}), /*#__PURE__*/jsxRuntime.jsx("g", {
|
|
7196
7138
|
"data-large-loader": "fill",
|
|
7197
7139
|
children: /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
7198
|
-
...sharedProps
|
|
7140
|
+
...sharedProps,
|
|
7141
|
+
stroke: colors.fill
|
|
7199
7142
|
})
|
|
7200
7143
|
})]
|
|
7201
7144
|
})
|
|
@@ -7258,36 +7201,12 @@ function SegmentedProgressBar({
|
|
|
7258
7201
|
});
|
|
7259
7202
|
}
|
|
7260
7203
|
|
|
7261
|
-
const
|
|
7262
|
-
theme
|
|
7263
|
-
}) => theme.kitt.skeleton.backgroundColor;
|
|
7264
|
-
const _exp2$1 = () => ({
|
|
7265
|
-
$isLoading,
|
|
7266
|
-
theme
|
|
7267
|
-
}) => $isLoading ? `linear-gradient(
|
|
7268
|
-
-90deg,
|
|
7269
|
-
${theme.kitt.skeleton.backgroundColor},
|
|
7270
|
-
${theme.kitt.skeleton.flareColor} 50%,
|
|
7271
|
-
${theme.kitt.skeleton.backgroundColor} 100%
|
|
7272
|
-
)` : 'none';
|
|
7273
|
-
const _exp3 = () => ({
|
|
7274
|
-
$isLoading
|
|
7275
|
-
}) => $isLoading ? '1s ease-in-out infinite' : 'none';
|
|
7276
|
-
const StyledSkeleton = withTheme( /*#__PURE__*/react$1.styled('div')({
|
|
7277
|
-
name: "StyledSkeleton",
|
|
7278
|
-
class: "kitt-u_StyledSkeleton_sc3upcl",
|
|
7279
|
-
propsAsIs: false,
|
|
7280
|
-
vars: {
|
|
7281
|
-
"sc3upcl-0": [_exp$1()],
|
|
7282
|
-
"sc3upcl-1": [_exp2$1()],
|
|
7283
|
-
"sc3upcl-2": [_exp3()]
|
|
7284
|
-
}
|
|
7285
|
-
}));
|
|
7204
|
+
const skeleton = "kitt-u_skeleton_sc3upcl";
|
|
7286
7205
|
function SkeletonContent({
|
|
7287
7206
|
isLoading
|
|
7288
7207
|
}) {
|
|
7289
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
7290
|
-
|
|
7208
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7209
|
+
className: (skeleton ) + " " + ((!isLoading ? "skeletonWithoutAnimation" : "") || "")
|
|
7291
7210
|
});
|
|
7292
7211
|
}
|
|
7293
7212
|
|
|
@@ -7593,17 +7512,17 @@ StaticMap.Loader = StaticMapLoader;
|
|
|
7593
7512
|
StaticMap.Error = StaticMapError;
|
|
7594
7513
|
StaticMap.Marker = StaticMapMarker;
|
|
7595
7514
|
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
}
|
|
7515
|
+
function Flex({
|
|
7516
|
+
direction,
|
|
7517
|
+
wrap = 'wrap',
|
|
7518
|
+
...props
|
|
7519
|
+
}) {
|
|
7520
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7521
|
+
...props,
|
|
7522
|
+
flexDirection: direction,
|
|
7523
|
+
flexWrap: wrap
|
|
7524
|
+
});
|
|
7525
|
+
}
|
|
7607
7526
|
|
|
7608
7527
|
const storyPadding = 'kitt.4';
|
|
7609
7528
|
|
|
@@ -7887,26 +7806,6 @@ const StoryGrid = {
|
|
|
7887
7806
|
Col: StoryGridCol
|
|
7888
7807
|
};
|
|
7889
7808
|
|
|
7890
|
-
const Container = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
|
|
7891
|
-
displayName: "Tag__Container",
|
|
7892
|
-
componentId: "kitt-universal__sc-19jmowi-0"
|
|
7893
|
-
})(["background-color:", ";border-width:", "px;border-color:", ";padding:", ";border-radius:", "px;align-self:flex-start;"], ({
|
|
7894
|
-
theme,
|
|
7895
|
-
type,
|
|
7896
|
-
variant
|
|
7897
|
-
}) => theme.kitt.tag[type][variant].backgroundColor, ({
|
|
7898
|
-
theme,
|
|
7899
|
-
type,
|
|
7900
|
-
variant
|
|
7901
|
-
}) => theme.kitt.tag[type][variant].borderWidth, ({
|
|
7902
|
-
theme,
|
|
7903
|
-
type,
|
|
7904
|
-
variant
|
|
7905
|
-
}) => theme.kitt.tag[type][variant].borderColor, ({
|
|
7906
|
-
theme
|
|
7907
|
-
}) => theme.kitt.tag.padding, ({
|
|
7908
|
-
theme
|
|
7909
|
-
}) => theme.kitt.tag.borderRadius);
|
|
7910
7809
|
const getLabelColor = (type, variant) => {
|
|
7911
7810
|
switch (type) {
|
|
7912
7811
|
case 'danger':
|
|
@@ -7936,9 +7835,14 @@ function Tag({
|
|
|
7936
7835
|
type = 'default',
|
|
7937
7836
|
variant = 'fill'
|
|
7938
7837
|
}) {
|
|
7939
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
7940
|
-
|
|
7941
|
-
|
|
7838
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7839
|
+
alignSelf: "flex-start",
|
|
7840
|
+
borderRadius: "kitt.tag.borderRadius",
|
|
7841
|
+
paddingX: "kitt.tag.horizontalPadding",
|
|
7842
|
+
paddingY: "kitt.tag.verticalPadding",
|
|
7843
|
+
backgroundColor: `kitt.tag.${type}.${variant}.backgroundColor`,
|
|
7844
|
+
borderColor: `kitt.tag.${type}.${variant}.borderColor`,
|
|
7845
|
+
borderWidth: `kitt.tag.${type}.${variant}.borderWidth`,
|
|
7942
7846
|
children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
7943
7847
|
base: "body-xsmall",
|
|
7944
7848
|
color: getLabelColor(type, variant),
|
|
@@ -7947,10 +7851,90 @@ function Tag({
|
|
|
7947
7851
|
});
|
|
7948
7852
|
}
|
|
7949
7853
|
|
|
7950
|
-
function
|
|
7951
|
-
return
|
|
7952
|
-
|
|
7953
|
-
|
|
7854
|
+
function formatNumberToTimeString(time) {
|
|
7855
|
+
return `${String(time).padStart(2, '0')}`;
|
|
7856
|
+
}
|
|
7857
|
+
function formatDateToTimeString(date) {
|
|
7858
|
+
return `${formatNumberToTimeString(date.getHours())}:${formatNumberToTimeString(date.getMinutes())}`;
|
|
7859
|
+
}
|
|
7860
|
+
|
|
7861
|
+
function getCurrentInternalForcedState({
|
|
7862
|
+
isDisabled,
|
|
7863
|
+
isHoveredInternal,
|
|
7864
|
+
isFocusedInternal,
|
|
7865
|
+
isPressedInternal
|
|
7866
|
+
}) {
|
|
7867
|
+
if (isDisabled) return 'disabled';
|
|
7868
|
+
if (isHoveredInternal) return 'hover';
|
|
7869
|
+
if (isFocusedInternal) return 'focus';
|
|
7870
|
+
if (isPressedInternal) return 'hover';
|
|
7871
|
+
return 'default';
|
|
7872
|
+
}
|
|
7873
|
+
|
|
7874
|
+
function TimePickerPressable({
|
|
7875
|
+
testID,
|
|
7876
|
+
disabled,
|
|
7877
|
+
stretch,
|
|
7878
|
+
value,
|
|
7879
|
+
placeholder,
|
|
7880
|
+
isHoveredInternal,
|
|
7881
|
+
isFocusedInternal,
|
|
7882
|
+
isPressedInternal,
|
|
7883
|
+
onPress
|
|
7884
|
+
}) {
|
|
7885
|
+
return /*#__PURE__*/jsxRuntime.jsx(Pressable, {
|
|
7886
|
+
testID: testID,
|
|
7887
|
+
disabled: disabled,
|
|
7888
|
+
accessibilityRole: "button",
|
|
7889
|
+
width: createResponsiveStyleFromProp(stretch, '100%', 'kitt.forms.timePicker.minWidth'),
|
|
7890
|
+
onPress: onPress,
|
|
7891
|
+
children: ({
|
|
7892
|
+
isHovered,
|
|
7893
|
+
isFocused,
|
|
7894
|
+
isPressed
|
|
7895
|
+
}) => /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
7896
|
+
position: "relative",
|
|
7897
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(InputText, {
|
|
7898
|
+
internalForceState: getCurrentInternalForcedState({
|
|
7899
|
+
isDisabled: disabled,
|
|
7900
|
+
isHoveredInternal: isHovered || isHoveredInternal,
|
|
7901
|
+
isFocusedInternal: isFocused || isFocusedInternal,
|
|
7902
|
+
isPressedInternal: isPressed || isPressedInternal
|
|
7903
|
+
}),
|
|
7904
|
+
value: value ? formatDateToTimeString(value) : undefined,
|
|
7905
|
+
placeholder: placeholder,
|
|
7906
|
+
disabled: disabled,
|
|
7907
|
+
textAlign: "center"
|
|
7908
|
+
}), /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7909
|
+
position: "absolute",
|
|
7910
|
+
top: "0",
|
|
7911
|
+
left: "0",
|
|
7912
|
+
height: "100%",
|
|
7913
|
+
width: "100%"
|
|
7914
|
+
})]
|
|
7915
|
+
})
|
|
7916
|
+
});
|
|
7917
|
+
}
|
|
7918
|
+
|
|
7919
|
+
function TimePicker({
|
|
7920
|
+
testID,
|
|
7921
|
+
disabled,
|
|
7922
|
+
stretch,
|
|
7923
|
+
value,
|
|
7924
|
+
placeholder,
|
|
7925
|
+
isHoveredInternal,
|
|
7926
|
+
isFocusedInternal,
|
|
7927
|
+
isPressedInternal
|
|
7928
|
+
}) {
|
|
7929
|
+
return /*#__PURE__*/jsxRuntime.jsx(TimePickerPressable, {
|
|
7930
|
+
testID: testID,
|
|
7931
|
+
disabled: disabled,
|
|
7932
|
+
stretch: stretch,
|
|
7933
|
+
value: value,
|
|
7934
|
+
placeholder: placeholder,
|
|
7935
|
+
isHoveredInternal: isHoveredInternal,
|
|
7936
|
+
isFocusedInternal: isFocusedInternal,
|
|
7937
|
+
isPressedInternal: isPressedInternal
|
|
7954
7938
|
});
|
|
7955
7939
|
}
|
|
7956
7940
|
|
|
@@ -8282,34 +8266,19 @@ function TypographyEmoji({
|
|
|
8282
8266
|
});
|
|
8283
8267
|
}
|
|
8284
8268
|
|
|
8285
|
-
|
|
8286
|
-
|
|
8269
|
+
// overrides :global(a) in Link styles.module.css
|
|
8270
|
+
const displayUnderline = "kitt-u_displayUnderline_dch42t";
|
|
8271
|
+
const displayUnderlineWhenHovered = "kitt-u_displayUnderlineWhenHovered_d80w0t7";
|
|
8272
|
+
function TypographyLinkWebWrapper({
|
|
8287
8273
|
children,
|
|
8288
|
-
|
|
8274
|
+
hasNoUnderline
|
|
8289
8275
|
}) {
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
...props,
|
|
8276
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8277
|
+
className: (displayUnderline ) + " " + ((hasNoUnderline ? displayUnderlineWhenHovered : undefined) || ""),
|
|
8293
8278
|
children: children
|
|
8294
8279
|
});
|
|
8295
8280
|
}
|
|
8296
8281
|
|
|
8297
|
-
// overrides :global(a) in Link styles.module.css
|
|
8298
|
-
const _exp = () => ({
|
|
8299
|
-
$hasNoUnderline
|
|
8300
|
-
}) => $hasNoUnderline ? 'none' : 'underline';
|
|
8301
|
-
const _exp2 = () => ({
|
|
8302
|
-
$hasNoUnderline
|
|
8303
|
-
}) => $hasNoUnderline ? 'underline' : 'none';
|
|
8304
|
-
const TypographyLinkWebWrapper = /*#__PURE__*/react$1.styled('span')({
|
|
8305
|
-
name: "TypographyLinkWebWrapper",
|
|
8306
|
-
class: "kitt-u_TypographyLinkWebWrapper_tcwz3nt",
|
|
8307
|
-
propsAsIs: false,
|
|
8308
|
-
vars: {
|
|
8309
|
-
"tcwz3nt-0": [_exp()],
|
|
8310
|
-
"tcwz3nt-1": [_exp2()]
|
|
8311
|
-
}
|
|
8312
|
-
});
|
|
8313
8282
|
function TypographyLink({
|
|
8314
8283
|
children,
|
|
8315
8284
|
disabled,
|
|
@@ -8319,9 +8288,8 @@ function TypographyLink({
|
|
|
8319
8288
|
onPress,
|
|
8320
8289
|
...otherProps
|
|
8321
8290
|
}) {
|
|
8322
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
8323
|
-
|
|
8324
|
-
$hasNoUnderline: noUnderline,
|
|
8291
|
+
return /*#__PURE__*/jsxRuntime.jsx(TypographyLinkWebWrapper, {
|
|
8292
|
+
hasNoUnderline: noUnderline,
|
|
8325
8293
|
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
8326
8294
|
underline: !noUnderline,
|
|
8327
8295
|
color: disabled ? 'black-disabled' : undefined,
|
|
@@ -8353,38 +8321,12 @@ function TypographyLink({
|
|
|
8353
8321
|
});
|
|
8354
8322
|
}
|
|
8355
8323
|
|
|
8356
|
-
// eslint-disable-next-line no-restricted-imports
|
|
8357
|
-
/** @deprecated use native-base responsive props or `useBreakpointValue` or `useMatchWindowSize` instead */
|
|
8358
|
-
function createWindowSizeHelper(dimensions) {
|
|
8359
|
-
return {
|
|
8360
|
-
matchWindowSize: options => matchWindowSize(dimensions, options),
|
|
8361
|
-
ifWindowSizeMatches: (options, valueIfTrue, valueIfFalse) => matchWindowSize(dimensions, options) ? valueIfTrue : valueIfFalse,
|
|
8362
|
-
mapWindowWidth: (...widthList) => {
|
|
8363
|
-
if ((process.env.NODE_ENV !== "production")) {
|
|
8364
|
-
widthList.slice(1).forEach(([minWidth], index) => {
|
|
8365
|
-
const previousMinWidth = widthList[index][0];
|
|
8366
|
-
if (previousMinWidth > minWidth) {
|
|
8367
|
-
throw new Error(`mapWindowWidth: sort your values to be mobile first. ${minWidth} is < ${previousMinWidth}, so ${minWidth} should be before ${previousMinWidth}.`);
|
|
8368
|
-
}
|
|
8369
|
-
});
|
|
8370
|
-
}
|
|
8371
|
-
const found = widthList.find(([minWidth, value]) => matchWindowSize(dimensions, {
|
|
8372
|
-
minWidth: Number(minWidth)
|
|
8373
|
-
}));
|
|
8374
|
-
if (!found) return null;
|
|
8375
|
-
return found[1];
|
|
8376
|
-
}
|
|
8377
|
-
};
|
|
8378
|
-
}
|
|
8379
|
-
|
|
8380
8324
|
function useKittTheme() {
|
|
8381
|
-
const dimensions = BabelPluginStyledComponentsReactNative.useWindowDimensions();
|
|
8382
8325
|
return react.useMemo(() => {
|
|
8383
8326
|
return {
|
|
8384
|
-
kitt: theme
|
|
8385
|
-
responsive: createWindowSizeHelper(dimensions)
|
|
8327
|
+
kitt: theme
|
|
8386
8328
|
};
|
|
8387
|
-
}, [
|
|
8329
|
+
}, []);
|
|
8388
8330
|
}
|
|
8389
8331
|
|
|
8390
8332
|
function KittThemeProvider({
|
|
@@ -8393,14 +8335,11 @@ function KittThemeProvider({
|
|
|
8393
8335
|
appTheme
|
|
8394
8336
|
}) {
|
|
8395
8337
|
const theme = useKittTheme();
|
|
8396
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
8338
|
+
return /*#__PURE__*/jsxRuntime.jsx(KittNativeBaseProvider, {
|
|
8397
8339
|
theme: theme,
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
appTheme: appTheme,
|
|
8402
|
-
children: children
|
|
8403
|
-
})
|
|
8340
|
+
isSSR: isSSR,
|
|
8341
|
+
appTheme: appTheme,
|
|
8342
|
+
children: children
|
|
8404
8343
|
});
|
|
8405
8344
|
}
|
|
8406
8345
|
const KittThemeDecorator = addons.makeDecorator({
|
|
@@ -8417,6 +8356,21 @@ const KittThemeDecorator = addons.makeDecorator({
|
|
|
8417
8356
|
}
|
|
8418
8357
|
});
|
|
8419
8358
|
|
|
8359
|
+
/**
|
|
8360
|
+
* @deprecated Use react-native Platform instead
|
|
8361
|
+
*/
|
|
8362
|
+
function StyleWebWrapper({
|
|
8363
|
+
as,
|
|
8364
|
+
children,
|
|
8365
|
+
...props
|
|
8366
|
+
}) {
|
|
8367
|
+
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
8368
|
+
return /*#__PURE__*/jsxRuntime.jsx(as || 'div', {
|
|
8369
|
+
...props,
|
|
8370
|
+
children: children
|
|
8371
|
+
});
|
|
8372
|
+
}
|
|
8373
|
+
|
|
8420
8374
|
/**
|
|
8421
8375
|
* Display children if match window size options
|
|
8422
8376
|
*
|
|
@@ -8441,12 +8395,134 @@ function useCurrentBreakpointName() {
|
|
|
8441
8395
|
});
|
|
8442
8396
|
}
|
|
8443
8397
|
|
|
8398
|
+
const backgroundColors = {
|
|
8399
|
+
done: 'kitt.verticalSteps.done.icon.backgroundColor',
|
|
8400
|
+
active: 'kitt.verticalSteps.active.icon.backgroundColor',
|
|
8401
|
+
default: 'kitt.verticalSteps.default.icon.backgroundColor'
|
|
8402
|
+
};
|
|
8403
|
+
function IconStatus({
|
|
8404
|
+
state,
|
|
8405
|
+
index
|
|
8406
|
+
}) {
|
|
8407
|
+
if (state === 'done') {
|
|
8408
|
+
return /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
8409
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.CheckIcon, {}),
|
|
8410
|
+
color: "kitt.verticalSteps.done.icon.textColor"
|
|
8411
|
+
});
|
|
8412
|
+
}
|
|
8413
|
+
if (state === 'active') {
|
|
8414
|
+
return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
8415
|
+
textAlign: "center",
|
|
8416
|
+
variant: "bold",
|
|
8417
|
+
color: "kitt.verticalSteps.active.icon.textColor",
|
|
8418
|
+
children: index + 1
|
|
8419
|
+
});
|
|
8420
|
+
}
|
|
8421
|
+
return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
8422
|
+
textAlign: "center",
|
|
8423
|
+
variant: "bold",
|
|
8424
|
+
color: "kitt.verticalSteps.default.icon.textColor",
|
|
8425
|
+
children: index + 1
|
|
8426
|
+
});
|
|
8427
|
+
}
|
|
8428
|
+
function StepIcon({
|
|
8429
|
+
index,
|
|
8430
|
+
state = 'default'
|
|
8431
|
+
}) {
|
|
8432
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8433
|
+
justifyContent: "center",
|
|
8434
|
+
alignItems: "center",
|
|
8435
|
+
width: 30,
|
|
8436
|
+
height: 30,
|
|
8437
|
+
borderRadius: 15,
|
|
8438
|
+
backgroundColor: backgroundColors[state],
|
|
8439
|
+
children: /*#__PURE__*/jsxRuntime.jsx(IconStatus, {
|
|
8440
|
+
state: state,
|
|
8441
|
+
index: index
|
|
8442
|
+
})
|
|
8443
|
+
});
|
|
8444
|
+
}
|
|
8445
|
+
|
|
8446
|
+
function ExternalStep() {
|
|
8447
|
+
return null;
|
|
8448
|
+
}
|
|
8449
|
+
function Step({
|
|
8450
|
+
index = 0,
|
|
8451
|
+
children,
|
|
8452
|
+
state = 'default',
|
|
8453
|
+
isLast = false,
|
|
8454
|
+
shouldDisableNextLink = false
|
|
8455
|
+
}) {
|
|
8456
|
+
return /*#__PURE__*/jsxRuntime.jsxs(nativeBase.HStack, {
|
|
8457
|
+
space: "kitt.2",
|
|
8458
|
+
flexGrow: 1,
|
|
8459
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
8460
|
+
marginTop: "kitt.2",
|
|
8461
|
+
paddingY: "kitt.2",
|
|
8462
|
+
backgroundColor: "kitt.white",
|
|
8463
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(StepIcon, {
|
|
8464
|
+
state: state,
|
|
8465
|
+
index: index
|
|
8466
|
+
}), !isLast ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8467
|
+
backgroundColor: shouldDisableNextLink ? 'kitt.palettes.lateOcean.black100' : 'kitt.palettes.lateOcean.moonPurple',
|
|
8468
|
+
width: 1,
|
|
8469
|
+
position: "absolute",
|
|
8470
|
+
top: 46,
|
|
8471
|
+
left: 15,
|
|
8472
|
+
zIndex: -1,
|
|
8473
|
+
height: "100%"
|
|
8474
|
+
}) : null]
|
|
8475
|
+
}), /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8476
|
+
flexGrow: 1,
|
|
8477
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ActionCard, {
|
|
8478
|
+
variant: "primary",
|
|
8479
|
+
children: children
|
|
8480
|
+
})
|
|
8481
|
+
})]
|
|
8482
|
+
});
|
|
8483
|
+
}
|
|
8484
|
+
|
|
8485
|
+
function getStepState(index, activeIndex) {
|
|
8486
|
+
if (index === activeIndex) {
|
|
8487
|
+
return 'active';
|
|
8488
|
+
}
|
|
8489
|
+
if (index < activeIndex) {
|
|
8490
|
+
return 'done';
|
|
8491
|
+
}
|
|
8492
|
+
return 'default';
|
|
8493
|
+
}
|
|
8494
|
+
|
|
8495
|
+
function VerticalSteps({
|
|
8496
|
+
children,
|
|
8497
|
+
activeIndex,
|
|
8498
|
+
...props
|
|
8499
|
+
}) {
|
|
8500
|
+
return /*#__PURE__*/jsxRuntime.jsx(nativeBase.VStack, {
|
|
8501
|
+
space: "kitt.4",
|
|
8502
|
+
width: "100%",
|
|
8503
|
+
...props,
|
|
8504
|
+
children: react.Children.map(children, (child, index) => {
|
|
8505
|
+
if ((process.env.NODE_ENV !== "production") && child.type !== ExternalStep) {
|
|
8506
|
+
throw new Error('VerticalSteps only accepts VerticalSteps.Step as children');
|
|
8507
|
+
}
|
|
8508
|
+
const isLast = index === react.Children.count(children) - 1;
|
|
8509
|
+
return /*#__PURE__*/react.createElement(Step, {
|
|
8510
|
+
...child.props,
|
|
8511
|
+
index,
|
|
8512
|
+
isLast,
|
|
8513
|
+
state: getStepState(index, activeIndex)
|
|
8514
|
+
}, child.props.children);
|
|
8515
|
+
})
|
|
8516
|
+
});
|
|
8517
|
+
}
|
|
8518
|
+
VerticalSteps.Step = ExternalStep;
|
|
8519
|
+
|
|
8444
8520
|
exports.useBreakpointValue = nativeBase.useBreakpointValue;
|
|
8445
8521
|
exports.useClipboard = nativeBase.useClipboard;
|
|
8446
8522
|
exports.useMediaQuery = nativeBase.useMediaQuery;
|
|
8447
8523
|
exports.useSx = nativeBase.useSx;
|
|
8448
8524
|
exports.useToken = nativeBase.useToken;
|
|
8449
|
-
exports.useWindowSize =
|
|
8525
|
+
exports.useWindowSize = reactNative.useWindowDimensions;
|
|
8450
8526
|
exports.ActionCard = ActionCard;
|
|
8451
8527
|
exports.Actions = Actions;
|
|
8452
8528
|
exports.Avatar = Avatar;
|
|
@@ -8492,7 +8568,6 @@ exports.MapMarkerPosition = MapMarkerPosition;
|
|
|
8492
8568
|
exports.MapMarkerSimple = MapMarkerSimple;
|
|
8493
8569
|
exports.MatchWindowSize = MatchWindowSize;
|
|
8494
8570
|
exports.Message = Message;
|
|
8495
|
-
exports.Modal = Modal;
|
|
8496
8571
|
exports.ModalBehaviour = ModalBehaviour;
|
|
8497
8572
|
exports.NavigationModal = NavigationModal;
|
|
8498
8573
|
exports.Notification = Notification;
|
|
@@ -8527,10 +8602,10 @@ exports.TypographyEmoji = TypographyEmoji;
|
|
|
8527
8602
|
exports.TypographyIcon = TypographyIcon;
|
|
8528
8603
|
exports.TypographyLink = TypographyLink;
|
|
8529
8604
|
exports.VStack = VStack;
|
|
8605
|
+
exports.VerticalSteps = VerticalSteps;
|
|
8530
8606
|
exports.View = View;
|
|
8531
8607
|
exports.createChoicesComponent = createChoicesComponent;
|
|
8532
8608
|
exports.createResponsiveStyleFromProp = createResponsiveStyleFromProp;
|
|
8533
|
-
exports.createWindowSizeHelper = createWindowSizeHelper;
|
|
8534
8609
|
exports.getStaticMapImageUrl = getStaticMapImageUrl;
|
|
8535
8610
|
exports.hex2rgba = hex2rgba;
|
|
8536
8611
|
exports.matchWindowSize = matchWindowSize;
|
|
@@ -8544,7 +8619,6 @@ exports.useMatchWindowSize = useMatchWindowSize;
|
|
|
8544
8619
|
exports.useStaticBottomSheet = useStaticBottomSheet;
|
|
8545
8620
|
exports.useStoryBlockColor = useStoryBlockColor;
|
|
8546
8621
|
exports.useTheme = useTheme;
|
|
8547
|
-
exports.withTheme = withTheme;
|
|
8548
8622
|
for (const k in kittIcons) {
|
|
8549
8623
|
if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = kittIcons[k];
|
|
8550
8624
|
}
|