@ornikar/kitt-universal 23.0.2 → 23.2.1
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/CHANGELOG.md +26 -0
- package/dist/definitions/Highlight/AnimatedCaret/AnimatedCaret.d.ts +11 -0
- package/dist/definitions/Highlight/AnimatedCaret/AnimatedCaret.d.ts.map +1 -0
- package/dist/definitions/Highlight/AnimatedCaret/AnimatedCaret.web.d.ts +4 -0
- package/dist/definitions/Highlight/AnimatedCaret/AnimatedCaret.web.d.ts.map +1 -0
- package/dist/definitions/Highlight/AnimatedContainer/AnimatedContainer.d.ts +13 -0
- package/dist/definitions/Highlight/AnimatedContainer/AnimatedContainer.d.ts.map +1 -0
- package/dist/definitions/Highlight/AnimatedContainer/AnimatedContainer.web.d.ts +4 -0
- package/dist/definitions/Highlight/AnimatedContainer/AnimatedContainer.web.d.ts.map +1 -0
- package/dist/definitions/Highlight/AnimatedContent/AnimatedContent.d.ts +12 -0
- package/dist/definitions/Highlight/AnimatedContent/AnimatedContent.d.ts.map +1 -0
- package/dist/definitions/Highlight/AnimatedContent/AnimatedContent.web.d.ts +4 -0
- package/dist/definitions/Highlight/AnimatedContent/AnimatedContent.web.d.ts.map +1 -0
- package/dist/definitions/Highlight/Highlight.d.ts +10 -5
- package/dist/definitions/Highlight/Highlight.d.ts.map +1 -1
- package/dist/definitions/Highlight/hooks/useNativeAnimation.d.ts +18 -0
- package/dist/definitions/Highlight/hooks/useNativeAnimation.d.ts.map +1 -0
- package/dist/definitions/Highlight/hooks/useNativeAnimation.web.d.ts +3 -0
- package/dist/definitions/Highlight/hooks/useNativeAnimation.web.d.ts.map +1 -0
- package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts +4 -1
- package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts.map +1 -1
- package/dist/definitions/TimePicker/TimePicker.d.ts +2 -0
- package/dist/definitions/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +37 -11
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +1 -4
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/forms.d.ts +1 -4
- package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/highlight.d.ts +11 -2
- package/dist/definitions/themes/late-ocean/highlight.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/input.d.ts +2 -2
- package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/inputField.d.ts +1 -4
- package/dist/definitions/themes/late-ocean/inputField.d.ts.map +1 -1
- package/dist/definitions/utils/windowSize/MatchWindowSize.d.ts +1 -1
- package/dist/definitions/utils/windowSize/MatchWindowSize.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +487 -205
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +487 -205
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +486 -204
- package/dist/index-node-20.10.cjs.js.map +1 -1
- package/dist/index-node-20.10.cjs.web.css +1 -1
- package/dist/index-node-20.10.cjs.web.js +451 -203
- package/dist/index-node-20.10.cjs.web.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +487 -205
- package/dist/index-node-20.10.es.mjs.map +1 -1
- package/dist/index-node-20.10.es.web.css +1 -1
- package/dist/index-node-20.10.es.web.mjs +452 -204
- package/dist/index-node-20.10.es.web.mjs.map +1 -1
- package/dist/index.es.js +501 -212
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +467 -211
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +212 -183
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +212 -183
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-20.10.cjs.js +212 -183
- package/dist/linaria-themes-node-20.10.cjs.js.map +1 -1
- package/dist/linaria-themes-node-20.10.cjs.web.js +212 -183
- package/dist/linaria-themes-node-20.10.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-20.10.es.mjs +212 -183
- package/dist/linaria-themes-node-20.10.es.mjs.map +1 -1
- package/dist/linaria-themes-node-20.10.es.web.mjs +212 -183
- package/dist/linaria-themes-node-20.10.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +218 -189
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +218 -189
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -19,7 +19,7 @@ import { BottomSheetScrollView, BottomSheetView, useBottomSheetDynamicSnapPoints
|
|
|
19
19
|
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
20
20
|
import { parse } from 'twemoji-parser';
|
|
21
21
|
import * as WebBrowser from 'expo-web-browser';
|
|
22
|
-
import { CaretUpFillIcon, CaretDownFillIcon, EyeClosedRegularIcon, EyeRegularIcon, XRegularIcon } from '@ornikar/kitt-icons/phosphor';
|
|
22
|
+
import { CaretUpFillIcon, CaretDownFillIcon, EyeClosedRegularIcon, EyeRegularIcon, CaretDownRegularIcon, XRegularIcon } from '@ornikar/kitt-icons/phosphor';
|
|
23
23
|
import Downshift from 'downshift';
|
|
24
24
|
import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/datetimepicker';
|
|
25
25
|
import { FormattedMessage } from 'react-intl';
|
|
@@ -984,215 +984,64 @@ var datePicker = {
|
|
|
984
984
|
}
|
|
985
985
|
};
|
|
986
986
|
|
|
987
|
-
var calcLineHeight = function (fontSize, lineHeightMultiplier) {
|
|
988
|
-
return Math.round(fontSize * lineHeightMultiplier);
|
|
989
|
-
};
|
|
990
|
-
/** @deprecated legacy typography type config is deprecated. */
|
|
991
|
-
var createLegacyTypographyTypeConfig = function (lineHeightMultiplierBaseAndSmall, baseAndSmallFontSize) {
|
|
992
|
-
var mediumAndWideFontSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : baseAndSmallFontSize;
|
|
993
|
-
var lineHeightMultiplierMediumAndWide = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : lineHeightMultiplierBaseAndSmall;
|
|
994
|
-
return {
|
|
995
|
-
baseAndSmall: {
|
|
996
|
-
fontSize: baseAndSmallFontSize,
|
|
997
|
-
lineHeight: calcLineHeight(baseAndSmallFontSize, lineHeightMultiplierBaseAndSmall)
|
|
998
|
-
},
|
|
999
|
-
mediumAndWide: {
|
|
1000
|
-
fontSize: mediumAndWideFontSize,
|
|
1001
|
-
lineHeight: calcLineHeight(mediumAndWideFontSize, lineHeightMultiplierMediumAndWide)
|
|
1002
|
-
}
|
|
1003
|
-
};
|
|
1004
|
-
};
|
|
1005
|
-
var createTypographyConfig = function (fontSize, lineHeightMultiplier) {
|
|
1006
|
-
var config = {
|
|
1007
|
-
fontSize: fontSize,
|
|
1008
|
-
lineHeight: calcLineHeight(fontSize, lineHeightMultiplier)
|
|
1009
|
-
};
|
|
1010
|
-
return {
|
|
1011
|
-
baseAndSmall: config,
|
|
1012
|
-
mediumAndWide: config
|
|
1013
|
-
};
|
|
1014
|
-
};
|
|
1015
|
-
var typography = {
|
|
1016
|
-
colors: {
|
|
1017
|
-
black: colors.black,
|
|
1018
|
-
'black-anthracite': colors.blackAnthracite,
|
|
1019
|
-
'black-disabled': lateOceanColorPalette.black400,
|
|
1020
|
-
'black-light': lateOceanColorPalette.black555,
|
|
1021
|
-
white: colors.white,
|
|
1022
|
-
'white-light': colors.white,
|
|
1023
|
-
primary: colors.primary,
|
|
1024
|
-
'primary-light': colors.primaryLight,
|
|
1025
|
-
accent: colors.accent,
|
|
1026
|
-
success: colors.success,
|
|
1027
|
-
danger: colors.danger,
|
|
1028
|
-
warning: colors.warning
|
|
1029
|
-
},
|
|
1030
|
-
types: {
|
|
1031
|
-
headings: {
|
|
1032
|
-
fontFamily: {
|
|
1033
|
-
"native": {
|
|
1034
|
-
regular: 'Moderat-Bold',
|
|
1035
|
-
bold: 'Moderat-Bold'
|
|
1036
|
-
},
|
|
1037
|
-
web: {
|
|
1038
|
-
regular: 'Moderat',
|
|
1039
|
-
bold: 'Moderat'
|
|
1040
|
-
}
|
|
1041
|
-
},
|
|
1042
|
-
fontWeight: {
|
|
1043
|
-
regular: 400,
|
|
1044
|
-
bold: 700
|
|
1045
|
-
},
|
|
1046
|
-
fontStyle: 'normal',
|
|
1047
|
-
configs: {
|
|
1048
|
-
/* legacy */
|
|
1049
|
-
header1: createLegacyTypographyTypeConfig(1.1, 40, 56),
|
|
1050
|
-
header2: createLegacyTypographyTypeConfig(1.2, 32, 48, 1.1),
|
|
1051
|
-
header3: createLegacyTypographyTypeConfig(1.2, 24, 40, 1.1),
|
|
1052
|
-
header4: createLegacyTypographyTypeConfig(1.3, 18, 24, 1.2),
|
|
1053
|
-
header5: createLegacyTypographyTypeConfig(1.3, 18, 18),
|
|
1054
|
-
/* latest */
|
|
1055
|
-
'heading-xxl': createTypographyConfig(56, 1.1),
|
|
1056
|
-
'heading-xl': createTypographyConfig(48, 1.1),
|
|
1057
|
-
'heading-l': createTypographyConfig(40, 1.1),
|
|
1058
|
-
'heading-m': createTypographyConfig(32, 1.2),
|
|
1059
|
-
'heading-s': createTypographyConfig(24, 1.2),
|
|
1060
|
-
'heading-xs': createTypographyConfig(18, 1.3),
|
|
1061
|
-
'heading-xxs': createTypographyConfig(16, 1.3)
|
|
1062
|
-
}
|
|
1063
|
-
},
|
|
1064
|
-
'headings-impact': {
|
|
1065
|
-
fontFamily: {
|
|
1066
|
-
"native": {
|
|
1067
|
-
regular: 'Transducer-Black',
|
|
1068
|
-
bold: 'Transducer-Black'
|
|
1069
|
-
},
|
|
1070
|
-
web: {
|
|
1071
|
-
regular: 'TransducerBlack',
|
|
1072
|
-
bold: 'TransducerBlack'
|
|
1073
|
-
}
|
|
1074
|
-
},
|
|
1075
|
-
fontWeight: 900,
|
|
1076
|
-
fontStyle: 'normal',
|
|
1077
|
-
configs: {
|
|
1078
|
-
/* legacy */
|
|
1079
|
-
'header-impact-xxl': createLegacyTypographyTypeConfig(1.2, 56, 56),
|
|
1080
|
-
'header-impact-xl': createLegacyTypographyTypeConfig(1.2, 48, 48),
|
|
1081
|
-
'header-impact-l': createLegacyTypographyTypeConfig(1.2, 40, 40),
|
|
1082
|
-
'header-impact-m': createLegacyTypographyTypeConfig(1.2, 32, 32),
|
|
1083
|
-
'header-impact-s': createLegacyTypographyTypeConfig(1.2, 24, 24),
|
|
1084
|
-
'header-impact-xs': createLegacyTypographyTypeConfig(1.2, 18, 18),
|
|
1085
|
-
'header-impact-xxs': createLegacyTypographyTypeConfig(1.2, 16, 16),
|
|
1086
|
-
'header-impact-xxxs': createLegacyTypographyTypeConfig(1.2, 14, 14),
|
|
1087
|
-
/* latest */
|
|
1088
|
-
'heading-impact-xxl': createTypographyConfig(56, 1.2),
|
|
1089
|
-
'heading-impact-xl': createTypographyConfig(48, 1.2),
|
|
1090
|
-
'heading-impact-l': createTypographyConfig(40, 1.2),
|
|
1091
|
-
'heading-impact-m': createTypographyConfig(32, 1.2),
|
|
1092
|
-
'heading-impact-s': createTypographyConfig(24, 1.2),
|
|
1093
|
-
'heading-impact-xs': createTypographyConfig(18, 1.2),
|
|
1094
|
-
'heading-impact-xxs': createTypographyConfig(16, 1.2),
|
|
1095
|
-
'heading-impact-xxxs': createTypographyConfig(14, 1.2)
|
|
1096
|
-
}
|
|
1097
|
-
},
|
|
1098
|
-
bodies: {
|
|
1099
|
-
fontFamily: {
|
|
1100
|
-
web: {
|
|
1101
|
-
regular: 'Moderat',
|
|
1102
|
-
bold: 'Moderat'
|
|
1103
|
-
},
|
|
1104
|
-
"native": {
|
|
1105
|
-
regular: 'Moderat-Regular',
|
|
1106
|
-
bold: 'Moderat-Bold'
|
|
1107
|
-
}
|
|
1108
|
-
},
|
|
1109
|
-
fontWeight: {
|
|
1110
|
-
regular: 400,
|
|
1111
|
-
bold: 700
|
|
1112
|
-
},
|
|
1113
|
-
fontStyle: {
|
|
1114
|
-
regular: 'normal',
|
|
1115
|
-
bold: 'normal'
|
|
1116
|
-
},
|
|
1117
|
-
configs: {
|
|
1118
|
-
/* legacy */
|
|
1119
|
-
'body-large': createLegacyTypographyTypeConfig(1.4, 18, 24),
|
|
1120
|
-
'body-medium': createLegacyTypographyTypeConfig(1.4, 18, 18),
|
|
1121
|
-
body: createLegacyTypographyTypeConfig(1.4, 16, 16),
|
|
1122
|
-
'body-small': createLegacyTypographyTypeConfig(1.4, 14, 14),
|
|
1123
|
-
'body-xsmall': createLegacyTypographyTypeConfig(1.4, 12, 12),
|
|
1124
|
-
/* latest */
|
|
1125
|
-
'body-xl': createTypographyConfig(24, 1.4),
|
|
1126
|
-
'body-l': createTypographyConfig(18, 1.4),
|
|
1127
|
-
'body-m': createTypographyConfig(16, 1.4),
|
|
1128
|
-
'body-s': createTypographyConfig(14, 1.4),
|
|
1129
|
-
'body-xs': createTypographyConfig(12, 1.4)
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
},
|
|
1133
|
-
link: {
|
|
1134
|
-
/** @deprecated not used in kitt anymore, use Typography instead */
|
|
1135
|
-
disabledColor: colors.blackDisabled
|
|
1136
|
-
}
|
|
1137
|
-
};
|
|
1138
|
-
|
|
1139
987
|
var inputStatesStyle = {
|
|
1140
988
|
"default": {
|
|
1141
|
-
backgroundColor:
|
|
1142
|
-
borderColor:
|
|
1143
|
-
color:
|
|
989
|
+
backgroundColor: lateOceanColorPalette.white,
|
|
990
|
+
borderColor: lateOceanColorPalette['eggshell.4'],
|
|
991
|
+
color: lateOceanColorPalette.black
|
|
1144
992
|
},
|
|
1145
993
|
pending: {
|
|
1146
|
-
backgroundColor:
|
|
1147
|
-
borderColor:
|
|
1148
|
-
color:
|
|
994
|
+
backgroundColor: lateOceanColorPalette.white,
|
|
995
|
+
borderColor: lateOceanColorPalette['eggshell.3'],
|
|
996
|
+
color: lateOceanColorPalette.black
|
|
1149
997
|
},
|
|
1150
998
|
valid: {
|
|
1151
|
-
backgroundColor:
|
|
1152
|
-
borderColor: lateOceanColorPalette.
|
|
1153
|
-
color:
|
|
999
|
+
backgroundColor: lateOceanColorPalette.white,
|
|
1000
|
+
borderColor: lateOceanColorPalette['eggshell.4'],
|
|
1001
|
+
color: lateOceanColorPalette.black
|
|
1154
1002
|
},
|
|
1155
1003
|
hover: {
|
|
1156
|
-
|
|
1157
|
-
|
|
1004
|
+
backgroundColor: lateOceanColorPalette['eggshell.1'],
|
|
1005
|
+
borderColor: lateOceanColorPalette['eggshell.5'],
|
|
1006
|
+
color: lateOceanColorPalette.black
|
|
1158
1007
|
},
|
|
1159
1008
|
focus: {
|
|
1160
|
-
borderColor:
|
|
1161
|
-
color:
|
|
1009
|
+
borderColor: lateOceanColorPalette['violine.9'],
|
|
1010
|
+
color: lateOceanColorPalette.black
|
|
1162
1011
|
},
|
|
1163
1012
|
disabled: {
|
|
1164
|
-
backgroundColor:
|
|
1165
|
-
borderColor:
|
|
1166
|
-
color:
|
|
1013
|
+
backgroundColor: lateOceanColorPalette['eggshell.2'],
|
|
1014
|
+
borderColor: lateOceanColorPalette['eggshell.4'],
|
|
1015
|
+
color: lateOceanColorPalette['eggshell.6']
|
|
1167
1016
|
},
|
|
1168
1017
|
invalid: {
|
|
1169
|
-
borderColor:
|
|
1170
|
-
color:
|
|
1018
|
+
borderColor: lateOceanColorPalette['eggshell.3'],
|
|
1019
|
+
color: lateOceanColorPalette.black
|
|
1171
1020
|
}
|
|
1172
1021
|
};
|
|
1173
1022
|
var webAnimationDuration = '200ms';
|
|
1174
1023
|
var webAnimationTimingFunction = 'ease-in-out';
|
|
1175
|
-
var
|
|
1024
|
+
var webAnimationProperties = ['border-color', 'background-color'];
|
|
1176
1025
|
var input = {
|
|
1177
1026
|
minHeight: 40,
|
|
1178
1027
|
color: {
|
|
1179
|
-
selection:
|
|
1180
|
-
placeholder:
|
|
1028
|
+
selection: lateOceanColorPalette['violine.9'],
|
|
1029
|
+
placeholder: lateOceanColorPalette['eggshell.9']
|
|
1181
1030
|
},
|
|
1182
|
-
borderWidth:
|
|
1183
|
-
borderRadius:
|
|
1031
|
+
borderWidth: 1,
|
|
1032
|
+
borderRadius: 8,
|
|
1184
1033
|
icon: {
|
|
1185
1034
|
size: 20
|
|
1186
1035
|
},
|
|
1187
1036
|
rightContainer: {
|
|
1188
|
-
padding:
|
|
1037
|
+
padding: 16
|
|
1189
1038
|
},
|
|
1190
1039
|
padding: {
|
|
1191
1040
|
horizontal: 16,
|
|
1192
|
-
vertical:
|
|
1041
|
+
vertical: 0
|
|
1193
1042
|
},
|
|
1194
1043
|
transition: {
|
|
1195
|
-
|
|
1044
|
+
properties: webAnimationProperties,
|
|
1196
1045
|
duration: webAnimationDuration,
|
|
1197
1046
|
timingFunction: webAnimationTimingFunction
|
|
1198
1047
|
},
|
|
@@ -1202,11 +1051,8 @@ var input = {
|
|
|
1202
1051
|
var inputField = {
|
|
1203
1052
|
containerPaddingTop: 5,
|
|
1204
1053
|
containerPaddingBottom: 10,
|
|
1205
|
-
feedbackPaddingTop:
|
|
1206
|
-
|
|
1207
|
-
small: 10
|
|
1208
|
-
},
|
|
1209
|
-
labelContainerPaddingBottom: 5,
|
|
1054
|
+
feedbackPaddingTop: 4,
|
|
1055
|
+
labelContainerPaddingBottom: 4,
|
|
1210
1056
|
labelFeedbackMarginLeft: 6
|
|
1211
1057
|
};
|
|
1212
1058
|
|
|
@@ -1338,21 +1184,52 @@ var fullscreenModal = {
|
|
|
1338
1184
|
};
|
|
1339
1185
|
|
|
1340
1186
|
var highlight = {
|
|
1341
|
-
borderRadius: spacing *
|
|
1187
|
+
borderRadius: spacing * 2,
|
|
1342
1188
|
/** @deprecated use primary instead */
|
|
1343
1189
|
regular: {
|
|
1344
|
-
|
|
1190
|
+
"default": {
|
|
1191
|
+
backgroundColor: colors.accentLight
|
|
1192
|
+
},
|
|
1193
|
+
hover: {
|
|
1194
|
+
backgroundColor: colors.accentLight
|
|
1195
|
+
}
|
|
1345
1196
|
},
|
|
1346
1197
|
primary: {
|
|
1347
|
-
|
|
1198
|
+
"default": {
|
|
1199
|
+
backgroundColor: lateOceanColorPalette['lavender.3']
|
|
1200
|
+
},
|
|
1201
|
+
hover: {
|
|
1202
|
+
backgroundColor: lateOceanColorPalette['lavender.5']
|
|
1203
|
+
}
|
|
1348
1204
|
},
|
|
1349
1205
|
secondary: {
|
|
1350
|
-
|
|
1206
|
+
"default": {
|
|
1207
|
+
backgroundColor: lateOceanColorPalette['violine.2']
|
|
1208
|
+
},
|
|
1209
|
+
hover: {
|
|
1210
|
+
backgroundColor: lateOceanColorPalette['violine.4']
|
|
1211
|
+
}
|
|
1212
|
+
},
|
|
1213
|
+
ghost: {
|
|
1214
|
+
"default": {
|
|
1215
|
+
backgroundColor: lateOceanColorPalette.white
|
|
1216
|
+
},
|
|
1217
|
+
hover: {
|
|
1218
|
+
backgroundColor: lateOceanColorPalette['eggshell.2']
|
|
1219
|
+
}
|
|
1351
1220
|
},
|
|
1352
1221
|
dark: {
|
|
1353
|
-
|
|
1222
|
+
"default": {
|
|
1223
|
+
backgroundColor: lateOceanColorPalette['eggshell.3']
|
|
1224
|
+
},
|
|
1225
|
+
hover: {
|
|
1226
|
+
backgroundColor: lateOceanColorPalette['eggshell.2']
|
|
1227
|
+
}
|
|
1354
1228
|
},
|
|
1355
|
-
padding:
|
|
1229
|
+
padding: {
|
|
1230
|
+
medium: spacing * 4,
|
|
1231
|
+
large: spacing * 6
|
|
1232
|
+
}
|
|
1356
1233
|
};
|
|
1357
1234
|
|
|
1358
1235
|
var getIconSizeFromFontSize = function (fontSize) {
|
|
@@ -1475,6 +1352,158 @@ var pageLoader = {
|
|
|
1475
1352
|
}
|
|
1476
1353
|
};
|
|
1477
1354
|
|
|
1355
|
+
var calcLineHeight = function (fontSize, lineHeightMultiplier) {
|
|
1356
|
+
return Math.round(fontSize * lineHeightMultiplier);
|
|
1357
|
+
};
|
|
1358
|
+
/** @deprecated legacy typography type config is deprecated. */
|
|
1359
|
+
var createLegacyTypographyTypeConfig = function (lineHeightMultiplierBaseAndSmall, baseAndSmallFontSize) {
|
|
1360
|
+
var mediumAndWideFontSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : baseAndSmallFontSize;
|
|
1361
|
+
var lineHeightMultiplierMediumAndWide = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : lineHeightMultiplierBaseAndSmall;
|
|
1362
|
+
return {
|
|
1363
|
+
baseAndSmall: {
|
|
1364
|
+
fontSize: baseAndSmallFontSize,
|
|
1365
|
+
lineHeight: calcLineHeight(baseAndSmallFontSize, lineHeightMultiplierBaseAndSmall)
|
|
1366
|
+
},
|
|
1367
|
+
mediumAndWide: {
|
|
1368
|
+
fontSize: mediumAndWideFontSize,
|
|
1369
|
+
lineHeight: calcLineHeight(mediumAndWideFontSize, lineHeightMultiplierMediumAndWide)
|
|
1370
|
+
}
|
|
1371
|
+
};
|
|
1372
|
+
};
|
|
1373
|
+
var createTypographyConfig = function (fontSize, lineHeightMultiplier) {
|
|
1374
|
+
var config = {
|
|
1375
|
+
fontSize: fontSize,
|
|
1376
|
+
lineHeight: calcLineHeight(fontSize, lineHeightMultiplier)
|
|
1377
|
+
};
|
|
1378
|
+
return {
|
|
1379
|
+
baseAndSmall: config,
|
|
1380
|
+
mediumAndWide: config
|
|
1381
|
+
};
|
|
1382
|
+
};
|
|
1383
|
+
var typography = {
|
|
1384
|
+
colors: {
|
|
1385
|
+
black: colors.black,
|
|
1386
|
+
'black-anthracite': colors.blackAnthracite,
|
|
1387
|
+
'black-disabled': lateOceanColorPalette.black400,
|
|
1388
|
+
'black-light': lateOceanColorPalette.black555,
|
|
1389
|
+
white: colors.white,
|
|
1390
|
+
'white-light': colors.white,
|
|
1391
|
+
primary: colors.primary,
|
|
1392
|
+
'primary-light': colors.primaryLight,
|
|
1393
|
+
accent: colors.accent,
|
|
1394
|
+
success: colors.success,
|
|
1395
|
+
danger: colors.danger,
|
|
1396
|
+
warning: colors.warning
|
|
1397
|
+
},
|
|
1398
|
+
types: {
|
|
1399
|
+
headings: {
|
|
1400
|
+
fontFamily: {
|
|
1401
|
+
"native": {
|
|
1402
|
+
regular: 'Moderat-Bold',
|
|
1403
|
+
bold: 'Moderat-Bold'
|
|
1404
|
+
},
|
|
1405
|
+
web: {
|
|
1406
|
+
regular: 'Moderat',
|
|
1407
|
+
bold: 'Moderat'
|
|
1408
|
+
}
|
|
1409
|
+
},
|
|
1410
|
+
fontWeight: {
|
|
1411
|
+
regular: 400,
|
|
1412
|
+
bold: 700
|
|
1413
|
+
},
|
|
1414
|
+
fontStyle: 'normal',
|
|
1415
|
+
configs: {
|
|
1416
|
+
/* legacy */
|
|
1417
|
+
header1: createLegacyTypographyTypeConfig(1.1, 40, 56),
|
|
1418
|
+
header2: createLegacyTypographyTypeConfig(1.2, 32, 48, 1.1),
|
|
1419
|
+
header3: createLegacyTypographyTypeConfig(1.2, 24, 40, 1.1),
|
|
1420
|
+
header4: createLegacyTypographyTypeConfig(1.3, 18, 24, 1.2),
|
|
1421
|
+
header5: createLegacyTypographyTypeConfig(1.3, 18, 18),
|
|
1422
|
+
/* latest */
|
|
1423
|
+
'heading-xxl': createTypographyConfig(56, 1.1),
|
|
1424
|
+
'heading-xl': createTypographyConfig(48, 1.1),
|
|
1425
|
+
'heading-l': createTypographyConfig(40, 1.1),
|
|
1426
|
+
'heading-m': createTypographyConfig(32, 1.2),
|
|
1427
|
+
'heading-s': createTypographyConfig(24, 1.2),
|
|
1428
|
+
'heading-xs': createTypographyConfig(18, 1.3),
|
|
1429
|
+
'heading-xxs': createTypographyConfig(16, 1.3)
|
|
1430
|
+
}
|
|
1431
|
+
},
|
|
1432
|
+
'headings-impact': {
|
|
1433
|
+
fontFamily: {
|
|
1434
|
+
"native": {
|
|
1435
|
+
regular: 'Transducer-Black',
|
|
1436
|
+
bold: 'Transducer-Black'
|
|
1437
|
+
},
|
|
1438
|
+
web: {
|
|
1439
|
+
regular: 'TransducerBlack',
|
|
1440
|
+
bold: 'TransducerBlack'
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
fontWeight: 900,
|
|
1444
|
+
fontStyle: 'normal',
|
|
1445
|
+
configs: {
|
|
1446
|
+
/* legacy */
|
|
1447
|
+
'header-impact-xxl': createLegacyTypographyTypeConfig(1.2, 56, 56),
|
|
1448
|
+
'header-impact-xl': createLegacyTypographyTypeConfig(1.2, 48, 48),
|
|
1449
|
+
'header-impact-l': createLegacyTypographyTypeConfig(1.2, 40, 40),
|
|
1450
|
+
'header-impact-m': createLegacyTypographyTypeConfig(1.2, 32, 32),
|
|
1451
|
+
'header-impact-s': createLegacyTypographyTypeConfig(1.2, 24, 24),
|
|
1452
|
+
'header-impact-xs': createLegacyTypographyTypeConfig(1.2, 18, 18),
|
|
1453
|
+
'header-impact-xxs': createLegacyTypographyTypeConfig(1.2, 16, 16),
|
|
1454
|
+
'header-impact-xxxs': createLegacyTypographyTypeConfig(1.2, 14, 14),
|
|
1455
|
+
/* latest */
|
|
1456
|
+
'heading-impact-xxl': createTypographyConfig(56, 1.2),
|
|
1457
|
+
'heading-impact-xl': createTypographyConfig(48, 1.2),
|
|
1458
|
+
'heading-impact-l': createTypographyConfig(40, 1.2),
|
|
1459
|
+
'heading-impact-m': createTypographyConfig(32, 1.2),
|
|
1460
|
+
'heading-impact-s': createTypographyConfig(24, 1.2),
|
|
1461
|
+
'heading-impact-xs': createTypographyConfig(18, 1.2),
|
|
1462
|
+
'heading-impact-xxs': createTypographyConfig(16, 1.2),
|
|
1463
|
+
'heading-impact-xxxs': createTypographyConfig(14, 1.2)
|
|
1464
|
+
}
|
|
1465
|
+
},
|
|
1466
|
+
bodies: {
|
|
1467
|
+
fontFamily: {
|
|
1468
|
+
web: {
|
|
1469
|
+
regular: 'Moderat',
|
|
1470
|
+
bold: 'Moderat'
|
|
1471
|
+
},
|
|
1472
|
+
"native": {
|
|
1473
|
+
regular: 'Moderat-Regular',
|
|
1474
|
+
bold: 'Moderat-Bold'
|
|
1475
|
+
}
|
|
1476
|
+
},
|
|
1477
|
+
fontWeight: {
|
|
1478
|
+
regular: 400,
|
|
1479
|
+
bold: 700
|
|
1480
|
+
},
|
|
1481
|
+
fontStyle: {
|
|
1482
|
+
regular: 'normal',
|
|
1483
|
+
bold: 'normal'
|
|
1484
|
+
},
|
|
1485
|
+
configs: {
|
|
1486
|
+
/* legacy */
|
|
1487
|
+
'body-large': createLegacyTypographyTypeConfig(1.4, 18, 24),
|
|
1488
|
+
'body-medium': createLegacyTypographyTypeConfig(1.4, 18, 18),
|
|
1489
|
+
body: createLegacyTypographyTypeConfig(1.4, 16, 16),
|
|
1490
|
+
'body-small': createLegacyTypographyTypeConfig(1.4, 14, 14),
|
|
1491
|
+
'body-xsmall': createLegacyTypographyTypeConfig(1.4, 12, 12),
|
|
1492
|
+
/* latest */
|
|
1493
|
+
'body-xl': createTypographyConfig(24, 1.4),
|
|
1494
|
+
'body-l': createTypographyConfig(18, 1.4),
|
|
1495
|
+
'body-m': createTypographyConfig(16, 1.4),
|
|
1496
|
+
'body-s': createTypographyConfig(14, 1.4),
|
|
1497
|
+
'body-xs': createTypographyConfig(12, 1.4)
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
link: {
|
|
1502
|
+
/** @deprecated not used in kitt anymore, use Typography instead */
|
|
1503
|
+
disabledColor: colors.blackDisabled
|
|
1504
|
+
}
|
|
1505
|
+
};
|
|
1506
|
+
|
|
1478
1507
|
var picker = {
|
|
1479
1508
|
ios: {
|
|
1480
1509
|
"default": _objectSpread(_objectSpread({
|
|
@@ -1993,7 +2022,7 @@ function getCurrentBackgroundColorForNativeBaseTheme(_ref) {
|
|
|
1993
2022
|
return "".concat(baseKey, ".backgroundColor");
|
|
1994
2023
|
}
|
|
1995
2024
|
|
|
1996
|
-
function AnimatedContainer$
|
|
2025
|
+
function AnimatedContainer$2(_ref) {
|
|
1997
2026
|
var disabled = _ref.disabled,
|
|
1998
2027
|
animatedStyles = _ref.animatedStyles,
|
|
1999
2028
|
children = _ref.children,
|
|
@@ -2523,7 +2552,7 @@ function getVariantValuesIfExist(theme, type, variant) {
|
|
|
2523
2552
|
return theme.kitt.button[type]["default"];
|
|
2524
2553
|
}
|
|
2525
2554
|
|
|
2526
|
-
var useNativeAnimation$
|
|
2555
|
+
var useNativeAnimation$4 = function (_ref) {
|
|
2527
2556
|
var type = _ref.type,
|
|
2528
2557
|
variant = _ref.variant,
|
|
2529
2558
|
isPressedInternal = _ref.isPressedInternal;
|
|
@@ -2592,7 +2621,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2592
2621
|
onHoverOut = _ref.onHoverOut,
|
|
2593
2622
|
onFocus = _ref.onFocus,
|
|
2594
2623
|
onBlur = _ref.onBlur;
|
|
2595
|
-
var _useNativeAnimation = useNativeAnimation$
|
|
2624
|
+
var _useNativeAnimation = useNativeAnimation$4({
|
|
2596
2625
|
type: type,
|
|
2597
2626
|
variant: variant
|
|
2598
2627
|
}),
|
|
@@ -2634,7 +2663,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2634
2663
|
var isHovered = _ref2.isHovered,
|
|
2635
2664
|
isPressed = _ref2.isPressed,
|
|
2636
2665
|
isFocused = _ref2.isFocused;
|
|
2637
|
-
return /*#__PURE__*/jsx(AnimatedContainer$
|
|
2666
|
+
return /*#__PURE__*/jsx(AnimatedContainer$2, {
|
|
2638
2667
|
animatedStyles: animatedStyles,
|
|
2639
2668
|
type: type,
|
|
2640
2669
|
isHovered: isHovered || isHoveredInternal,
|
|
@@ -3474,7 +3503,7 @@ function AnimatedChoiceItemView(_ref) {
|
|
|
3474
3503
|
});
|
|
3475
3504
|
}
|
|
3476
3505
|
|
|
3477
|
-
var useNativeAnimation$
|
|
3506
|
+
var useNativeAnimation$3 = function (_ref) {
|
|
3478
3507
|
var selected = _ref.selected,
|
|
3479
3508
|
disabled = _ref.disabled,
|
|
3480
3509
|
isPressedInternal = _ref.isPressedInternal;
|
|
@@ -3538,7 +3567,7 @@ function ChoiceItem(_ref) {
|
|
|
3538
3567
|
onBlur = _ref.onBlur,
|
|
3539
3568
|
onFocus = _ref.onFocus,
|
|
3540
3569
|
size = _ref.size;
|
|
3541
|
-
var _useNativeAnimation = useNativeAnimation$
|
|
3570
|
+
var _useNativeAnimation = useNativeAnimation$3({
|
|
3542
3571
|
selected: selected,
|
|
3543
3572
|
disabled: disabled,
|
|
3544
3573
|
isPressedInternal: isPressedInternal
|
|
@@ -6258,7 +6287,7 @@ var Radio = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6258
6287
|
});
|
|
6259
6288
|
});
|
|
6260
6289
|
|
|
6261
|
-
function AnimatedContainer(_ref) {
|
|
6290
|
+
function AnimatedContainer$1(_ref) {
|
|
6262
6291
|
var children = _ref.children,
|
|
6263
6292
|
isFirst = _ref.isFirst,
|
|
6264
6293
|
isLast = _ref.isLast,
|
|
@@ -6311,7 +6340,7 @@ function HoverBorder(_ref) {
|
|
|
6311
6340
|
});
|
|
6312
6341
|
}
|
|
6313
6342
|
|
|
6314
|
-
var useNativeAnimation$
|
|
6343
|
+
var useNativeAnimation$2 = function (_ref) {
|
|
6315
6344
|
var isDisabled = _ref.isDisabled,
|
|
6316
6345
|
isSelected = _ref.isSelected,
|
|
6317
6346
|
isPressedInternal = _ref.isPressedInternal;
|
|
@@ -6383,7 +6412,7 @@ function RadioButton(_ref) {
|
|
|
6383
6412
|
onChange = _ref.onChange,
|
|
6384
6413
|
onFocus = _ref.onFocus,
|
|
6385
6414
|
onBlur = _ref.onBlur;
|
|
6386
|
-
var _useNativeAnimation = useNativeAnimation$
|
|
6415
|
+
var _useNativeAnimation = useNativeAnimation$2({
|
|
6387
6416
|
isDisabled: disabled,
|
|
6388
6417
|
isSelected: selected,
|
|
6389
6418
|
isPressedInternal: isPressedInternal
|
|
@@ -6413,7 +6442,7 @@ function RadioButton(_ref) {
|
|
|
6413
6442
|
var isHovered = _ref2.isHovered,
|
|
6414
6443
|
isPressed = _ref2.isPressed,
|
|
6415
6444
|
isFocused = _ref2.isFocused;
|
|
6416
|
-
return /*#__PURE__*/jsx(AnimatedContainer, {
|
|
6445
|
+
return /*#__PURE__*/jsx(AnimatedContainer$1, {
|
|
6417
6446
|
animatedStyles: animatedStyles,
|
|
6418
6447
|
isFocused: isFocused || isFocusedInternal,
|
|
6419
6448
|
isPressed: isPressed || isPressedInternal,
|
|
@@ -6833,15 +6862,235 @@ FullscreenModal.Footer = FullscreenModalFooter;
|
|
|
6833
6862
|
FullscreenModal.Body = FullscreenModalBody;
|
|
6834
6863
|
FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
|
|
6835
6864
|
|
|
6865
|
+
function AnimatedCaret(_ref) {
|
|
6866
|
+
var children = _ref.children,
|
|
6867
|
+
animatedStyles = _ref.animatedStyles;
|
|
6868
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
6869
|
+
style: [animatedStyles],
|
|
6870
|
+
children: children
|
|
6871
|
+
});
|
|
6872
|
+
}
|
|
6873
|
+
|
|
6874
|
+
function AnimatedContainer(_ref) {
|
|
6875
|
+
var children = _ref.children,
|
|
6876
|
+
size = _ref.size,
|
|
6877
|
+
animatedStyles = _ref.animatedStyles;
|
|
6878
|
+
var sx = useSx();
|
|
6879
|
+
var theme = useTheme();
|
|
6880
|
+
var styles = sx({
|
|
6881
|
+
borderRadius: theme.kitt.highlight.borderRadius,
|
|
6882
|
+
padding: theme.kitt.highlight.padding[size]
|
|
6883
|
+
});
|
|
6884
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
6885
|
+
style: [styles, animatedStyles],
|
|
6886
|
+
children: children
|
|
6887
|
+
});
|
|
6888
|
+
}
|
|
6889
|
+
|
|
6890
|
+
function AnimatedContent(_ref) {
|
|
6891
|
+
var children = _ref.children,
|
|
6892
|
+
animatedStyles = _ref.animatedStyles;
|
|
6893
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
6894
|
+
style: [{
|
|
6895
|
+
overflow: 'hidden'
|
|
6896
|
+
}, animatedStyles],
|
|
6897
|
+
children: children
|
|
6898
|
+
});
|
|
6899
|
+
}
|
|
6900
|
+
|
|
6901
|
+
var withTimingConfig = {
|
|
6902
|
+
duration: 100,
|
|
6903
|
+
easing: Easing$1.ease
|
|
6904
|
+
};
|
|
6905
|
+
var useNativeAnimation$1 = function (_ref) {
|
|
6906
|
+
var variant = _ref.variant,
|
|
6907
|
+
isExpanded = _ref.isExpanded,
|
|
6908
|
+
isInitialRender = _ref.isInitialRender,
|
|
6909
|
+
contentHeight = _ref.contentHeight;
|
|
6910
|
+
var theme = useTheme();
|
|
6911
|
+
var color = useSharedValue(0);
|
|
6912
|
+
var rotation = useSharedValue(0);
|
|
6913
|
+
var translate = useSharedValue(0);
|
|
6914
|
+
var containerAnimatedStyles = useAnimatedStyle(function () {
|
|
6915
|
+
return {
|
|
6916
|
+
backgroundColor: interpolateColor(color.value, [0, 1], [theme.kitt.highlight[variant]["default"].backgroundColor, theme.kitt.highlight[variant].hover.backgroundColor])
|
|
6917
|
+
};
|
|
6918
|
+
});
|
|
6919
|
+
var caretAnimatedStyles = useAnimatedStyle(function () {
|
|
6920
|
+
rotation.value = withTiming(isExpanded ? 180 : 0, {
|
|
6921
|
+
duration: 300,
|
|
6922
|
+
easing: Easing$1.ease
|
|
6923
|
+
});
|
|
6924
|
+
return {
|
|
6925
|
+
transform: [{
|
|
6926
|
+
rotate: "".concat(rotation.value, "deg")
|
|
6927
|
+
}, {
|
|
6928
|
+
translateY: translate.value
|
|
6929
|
+
}]
|
|
6930
|
+
};
|
|
6931
|
+
});
|
|
6932
|
+
var contentAnimatedStyles = useAnimatedStyle(function () {
|
|
6933
|
+
return {
|
|
6934
|
+
height: withTiming(isExpanded ? contentHeight : 0, {
|
|
6935
|
+
duration: isInitialRender ? 0 : 300,
|
|
6936
|
+
easing: Easing$1.ease
|
|
6937
|
+
})
|
|
6938
|
+
};
|
|
6939
|
+
});
|
|
6940
|
+
return {
|
|
6941
|
+
onPressIn: function handleHoverIn() {
|
|
6942
|
+
color.value = withTiming(1, withTimingConfig);
|
|
6943
|
+
translate.value = withTiming(2, withTimingConfig);
|
|
6944
|
+
},
|
|
6945
|
+
onPressOut: function handleHoverOut() {
|
|
6946
|
+
color.value = withTiming(0, withTimingConfig);
|
|
6947
|
+
translate.value = withTiming(0, withTimingConfig);
|
|
6948
|
+
},
|
|
6949
|
+
containerAnimatedStyles: containerAnimatedStyles,
|
|
6950
|
+
caretAnimatedStyles: caretAnimatedStyles,
|
|
6951
|
+
contentAnimatedStyles: contentAnimatedStyles
|
|
6952
|
+
};
|
|
6953
|
+
};
|
|
6954
|
+
|
|
6836
6955
|
function Highlight(_ref) {
|
|
6837
6956
|
var _ref$variant = _ref.variant,
|
|
6838
|
-
variant = _ref$variant === void 0 ? '
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6957
|
+
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
6958
|
+
_ref$canCollapse = _ref.canCollapse,
|
|
6959
|
+
canCollapse = _ref$canCollapse === void 0 ? false : _ref$canCollapse,
|
|
6960
|
+
_ref$isInitialCollaps = _ref.isInitialCollapsed,
|
|
6961
|
+
isInitialCollapsed = _ref$isInitialCollaps === void 0 ? true : _ref$isInitialCollaps,
|
|
6962
|
+
title = _ref.title,
|
|
6963
|
+
_ref$icon = _ref.icon,
|
|
6964
|
+
icon = _ref$icon === void 0 ? null : _ref$icon,
|
|
6965
|
+
_ref$size = _ref.size,
|
|
6966
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
6967
|
+
_children = _ref.children;
|
|
6968
|
+
var theme = useTheme();
|
|
6969
|
+
var _useState = useState(!isInitialCollapsed),
|
|
6970
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
6971
|
+
isExpanded = _useState2[0],
|
|
6972
|
+
setIsExpanded = _useState2[1];
|
|
6973
|
+
var _useState3 = useState(0),
|
|
6974
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
6975
|
+
contentHeight = _useState4[0],
|
|
6976
|
+
setContentHeight = _useState4[1];
|
|
6977
|
+
var _useState5 = useState(true),
|
|
6978
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
6979
|
+
isInitialRender = _useState6[0],
|
|
6980
|
+
setIsInitialRender = _useState6[1];
|
|
6981
|
+
var highlightStyle = {
|
|
6982
|
+
medium: {
|
|
6983
|
+
marginBottom: 'kitt.1',
|
|
6984
|
+
spaceBetween: 'kitt.2',
|
|
6985
|
+
contentMarginY: 8
|
|
6986
|
+
},
|
|
6987
|
+
large: {
|
|
6988
|
+
marginBottom: 'kitt.2',
|
|
6989
|
+
spaceBetween: 'kitt.4',
|
|
6990
|
+
contentMarginY: 16
|
|
6991
|
+
}
|
|
6992
|
+
};
|
|
6993
|
+
var _useNativeAnimation = useNativeAnimation$1({
|
|
6994
|
+
variant: variant,
|
|
6995
|
+
isExpanded: isExpanded,
|
|
6996
|
+
isInitialRender: isInitialRender,
|
|
6997
|
+
contentHeight: contentHeight
|
|
6998
|
+
}),
|
|
6999
|
+
containerAnimatedStyles = _useNativeAnimation.containerAnimatedStyles,
|
|
7000
|
+
caretAnimatedStyles = _useNativeAnimation.caretAnimatedStyles,
|
|
7001
|
+
contentAnimatedStyles = _useNativeAnimation.contentAnimatedStyles,
|
|
7002
|
+
onPressIn = _useNativeAnimation.onPressIn,
|
|
7003
|
+
onPressOut = _useNativeAnimation.onPressOut;
|
|
7004
|
+
var handleLayout = function (event) {
|
|
7005
|
+
var layoutHeight = event.nativeEvent.layout.height;
|
|
7006
|
+
var newContentHeight = layoutHeight + highlightStyle[size].contentMarginY;
|
|
7007
|
+
if (layoutHeight > 0 && newContentHeight !== contentHeight) {
|
|
7008
|
+
setContentHeight(newContentHeight);
|
|
7009
|
+
}
|
|
7010
|
+
};
|
|
7011
|
+
if (!canCollapse) {
|
|
7012
|
+
return /*#__PURE__*/jsx(View, {
|
|
7013
|
+
borderRadius: "kitt.highlight.borderRadius",
|
|
7014
|
+
padding: theme.kitt.highlight.padding[size],
|
|
7015
|
+
backgroundColor: "kitt.highlight.".concat(variant, ".default.backgroundColor"),
|
|
7016
|
+
children: /*#__PURE__*/jsxs(HStack, {
|
|
7017
|
+
space: highlightStyle[size].spaceBetween,
|
|
7018
|
+
children: [icon && /*#__PURE__*/jsx(View, {
|
|
7019
|
+
children: icon
|
|
7020
|
+
}), /*#__PURE__*/jsxs(View, {
|
|
7021
|
+
flexGrow: 1,
|
|
7022
|
+
flexShrink: 1,
|
|
7023
|
+
children: [title && /*#__PURE__*/jsx(View, {
|
|
7024
|
+
marginBottom: highlightStyle[size].marginBottom,
|
|
7025
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
7026
|
+
variant: "bold",
|
|
7027
|
+
base: "body",
|
|
7028
|
+
ellipsizeMode: "clip",
|
|
7029
|
+
children: title
|
|
7030
|
+
})
|
|
7031
|
+
}), _children]
|
|
7032
|
+
})]
|
|
7033
|
+
})
|
|
7034
|
+
});
|
|
7035
|
+
}
|
|
7036
|
+
return /*#__PURE__*/jsx(Pressable, {
|
|
7037
|
+
onPress: function handlePress() {
|
|
7038
|
+
setIsExpanded(!isExpanded);
|
|
7039
|
+
setIsInitialRender(false);
|
|
7040
|
+
},
|
|
7041
|
+
onPressIn: onPressIn,
|
|
7042
|
+
onPressOut: onPressOut,
|
|
7043
|
+
children: function children(_ref2) {
|
|
7044
|
+
var isHovered = _ref2.isHovered;
|
|
7045
|
+
return /*#__PURE__*/jsxs(AnimatedContainer, {
|
|
7046
|
+
isHovered: isHovered,
|
|
7047
|
+
size: size,
|
|
7048
|
+
variant: variant,
|
|
7049
|
+
animatedStyles: containerAnimatedStyles,
|
|
7050
|
+
children: [title && /*#__PURE__*/jsxs(HStack, {
|
|
7051
|
+
space: highlightStyle[size].spaceBetween,
|
|
7052
|
+
alignItems: "center",
|
|
7053
|
+
children: [icon && /*#__PURE__*/jsx(View, {
|
|
7054
|
+
flexGrow: 1,
|
|
7055
|
+
children: icon
|
|
7056
|
+
}), /*#__PURE__*/jsx(View, {
|
|
7057
|
+
flexGrow: 1,
|
|
7058
|
+
flexShrink: 1,
|
|
7059
|
+
width: "100%",
|
|
7060
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
7061
|
+
variant: "bold",
|
|
7062
|
+
base: "body",
|
|
7063
|
+
ellipsizeMode: "clip",
|
|
7064
|
+
children: title
|
|
7065
|
+
})
|
|
7066
|
+
}), /*#__PURE__*/jsx(View, {
|
|
7067
|
+
flexGrow: 2,
|
|
7068
|
+
flexShrink: 2,
|
|
7069
|
+
alignItems: "center",
|
|
7070
|
+
justifyContent: "center",
|
|
7071
|
+
children: /*#__PURE__*/jsx(AnimatedCaret, {
|
|
7072
|
+
isHovered: isHovered,
|
|
7073
|
+
isExpanded: isExpanded,
|
|
7074
|
+
animatedStyles: caretAnimatedStyles,
|
|
7075
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
7076
|
+
icon: /*#__PURE__*/jsx(CaretDownRegularIcon, {})
|
|
7077
|
+
})
|
|
7078
|
+
})
|
|
7079
|
+
})]
|
|
7080
|
+
}), /*#__PURE__*/jsx(AnimatedContent, {
|
|
7081
|
+
isExpanded: isExpanded,
|
|
7082
|
+
isInitialRender: isInitialRender,
|
|
7083
|
+
contentHeight: contentHeight,
|
|
7084
|
+
animatedStyles: contentAnimatedStyles,
|
|
7085
|
+
children: /*#__PURE__*/jsx(View, {
|
|
7086
|
+
marginTop: highlightStyle[size].contentMarginY,
|
|
7087
|
+
position: "absolute",
|
|
7088
|
+
onLayout: handleLayout,
|
|
7089
|
+
children: _children
|
|
7090
|
+
})
|
|
7091
|
+
})]
|
|
7092
|
+
});
|
|
7093
|
+
}
|
|
6845
7094
|
});
|
|
6846
7095
|
}
|
|
6847
7096
|
|
|
@@ -7865,16 +8114,44 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7865
8114
|
},
|
|
7866
8115
|
highlight: {
|
|
7867
8116
|
regular: {
|
|
7868
|
-
|
|
8117
|
+
"default": {
|
|
8118
|
+
backgroundColor: theme.highlight.regular["default"].backgroundColor
|
|
8119
|
+
},
|
|
8120
|
+
hover: {
|
|
8121
|
+
backgroundColor: theme.highlight.regular.hover.backgroundColor
|
|
8122
|
+
}
|
|
7869
8123
|
},
|
|
7870
8124
|
primary: {
|
|
7871
|
-
|
|
8125
|
+
"default": {
|
|
8126
|
+
backgroundColor: theme.highlight.primary["default"].backgroundColor
|
|
8127
|
+
},
|
|
8128
|
+
hover: {
|
|
8129
|
+
backgroundColor: theme.highlight.primary.hover.backgroundColor
|
|
8130
|
+
}
|
|
7872
8131
|
},
|
|
7873
8132
|
secondary: {
|
|
7874
|
-
|
|
8133
|
+
"default": {
|
|
8134
|
+
backgroundColor: theme.highlight.secondary["default"].backgroundColor
|
|
8135
|
+
},
|
|
8136
|
+
hover: {
|
|
8137
|
+
backgroundColor: theme.highlight.secondary.hover.backgroundColor
|
|
8138
|
+
}
|
|
7875
8139
|
},
|
|
7876
8140
|
dark: {
|
|
7877
|
-
|
|
8141
|
+
"default": {
|
|
8142
|
+
backgroundColor: theme.highlight.dark["default"].backgroundColor
|
|
8143
|
+
},
|
|
8144
|
+
hover: {
|
|
8145
|
+
backgroundColor: theme.highlight.dark.hover.backgroundColor
|
|
8146
|
+
}
|
|
8147
|
+
},
|
|
8148
|
+
ghost: {
|
|
8149
|
+
"default": {
|
|
8150
|
+
backgroundColor: theme.highlight.ghost["default"].backgroundColor
|
|
8151
|
+
},
|
|
8152
|
+
hover: {
|
|
8153
|
+
backgroundColor: theme.highlight.ghost.hover.backgroundColor
|
|
8154
|
+
}
|
|
7878
8155
|
}
|
|
7879
8156
|
},
|
|
7880
8157
|
verticalSteps: {
|
|
@@ -8380,7 +8657,12 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8380
8657
|
}
|
|
8381
8658
|
},
|
|
8382
8659
|
highlight: {
|
|
8383
|
-
|
|
8660
|
+
medium: {
|
|
8661
|
+
padding: theme.highlight.padding.medium
|
|
8662
|
+
},
|
|
8663
|
+
large: {
|
|
8664
|
+
padding: theme.highlight.padding.large
|
|
8665
|
+
}
|
|
8384
8666
|
},
|
|
8385
8667
|
listItem: {
|
|
8386
8668
|
verticalPadding: theme.listItem.verticalPadding,
|
|
@@ -9011,9 +9293,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9011
9293
|
borderColor: theme.forms.input.states["default"].borderColor,
|
|
9012
9294
|
bg: theme.forms.input.states["default"].backgroundColor,
|
|
9013
9295
|
_hover: {
|
|
9296
|
+
bg: theme.forms.input.states.hover.backgroundColor,
|
|
9014
9297
|
borderColor: theme.forms.input.states.hover.borderColor,
|
|
9015
9298
|
color: theme.forms.input.states.hover.color,
|
|
9016
9299
|
_focus: {
|
|
9300
|
+
bg: theme.forms.input.states["default"].backgroundColor,
|
|
9017
9301
|
borderColor: theme.forms.input.states.focus.borderColor,
|
|
9018
9302
|
color: theme.forms.input.states.focus.color
|
|
9019
9303
|
}
|
|
@@ -10357,6 +10641,7 @@ function ModalDateTimePicker(_ref) {
|
|
|
10357
10641
|
var title = _ref.title,
|
|
10358
10642
|
visible = _ref.visible,
|
|
10359
10643
|
value = _ref.value,
|
|
10644
|
+
minuteInterval = _ref.minuteInterval,
|
|
10360
10645
|
validateButtonLabel = _ref.validateButtonLabel,
|
|
10361
10646
|
testID = _ref.testID,
|
|
10362
10647
|
pickerTestID = _ref.pickerTestID,
|
|
@@ -10393,6 +10678,7 @@ function ModalDateTimePicker(_ref) {
|
|
|
10393
10678
|
}) : null, /*#__PURE__*/jsx(CardModal.Body, {
|
|
10394
10679
|
children: /*#__PURE__*/jsx(DateTimePicker, {
|
|
10395
10680
|
is24Hour: true,
|
|
10681
|
+
minuteInterval: minuteInterval,
|
|
10396
10682
|
testID: pickerTestID,
|
|
10397
10683
|
value: currentValue,
|
|
10398
10684
|
mode: "time",
|
|
@@ -10488,6 +10774,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
10488
10774
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
10489
10775
|
stretch = _ref.stretch,
|
|
10490
10776
|
value = _ref.value,
|
|
10777
|
+
minuteInterval = _ref.minuteInterval,
|
|
10491
10778
|
validateButtonLabel = _ref.validateButtonLabel,
|
|
10492
10779
|
isDefaultVisible = _ref.isDefaultVisible,
|
|
10493
10780
|
_ref$placeholder = _ref.placeholder,
|
|
@@ -10534,6 +10821,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
10534
10821
|
is24Hour: true,
|
|
10535
10822
|
testID: pickerTestID,
|
|
10536
10823
|
value: pickerValue,
|
|
10824
|
+
minuteInterval: minuteInterval,
|
|
10537
10825
|
mode: "time",
|
|
10538
10826
|
display: "default",
|
|
10539
10827
|
onChange: function (event, date) {
|
|
@@ -10541,6 +10829,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
10541
10829
|
}
|
|
10542
10830
|
}) : null, Platform.OS !== 'android' ? /*#__PURE__*/jsx(ModalDateTimePicker, {
|
|
10543
10831
|
visible: isPickerVisible,
|
|
10832
|
+
minuteInterval: minuteInterval,
|
|
10544
10833
|
title: title,
|
|
10545
10834
|
testID: modalTestID,
|
|
10546
10835
|
pickerTestID: pickerTestID,
|