@ornikar/kitt-universal 3.8.0 → 4.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.
Files changed (74) hide show
  1. package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +1 -1
  2. package/dist/definitions/IconButton/IconButton.d.ts +5 -1
  3. package/dist/definitions/IconButton/IconButton.d.ts.map +1 -1
  4. package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts +4 -1
  5. package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts.map +1 -1
  6. package/dist/definitions/IconButton/PressableIconButton.d.ts +1 -1
  7. package/dist/definitions/IconButton/PressableIconButton.d.ts.map +1 -1
  8. package/dist/definitions/TimePicker/TimePicker.d.ts +1 -1
  9. package/dist/definitions/TimePicker/TimePicker.d.ts.map +1 -1
  10. package/dist/definitions/TimePicker/useTimePicker.d.ts +2 -4
  11. package/dist/definitions/TimePicker/useTimePicker.d.ts.map +1 -1
  12. package/dist/definitions/forms/InputFeedback/InputFeedback.d.ts +1 -1
  13. package/dist/definitions/forms/InputFeedback/InputFeedback.d.ts.map +1 -1
  14. package/dist/definitions/forms/InputIcon/InputIcon.d.ts +9 -0
  15. package/dist/definitions/forms/InputIcon/InputIcon.d.ts.map +1 -0
  16. package/dist/definitions/forms/InputPassword/InputPassword.d.ts +7 -0
  17. package/dist/definitions/forms/InputPassword/InputPassword.d.ts.map +1 -0
  18. package/dist/definitions/forms/InputPressable/InputPressable.d.ts +6 -0
  19. package/dist/definitions/forms/InputPressable/InputPressable.d.ts.map +1 -0
  20. package/dist/definitions/forms/InputText/InputText.d.ts +4 -12
  21. package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
  22. package/dist/definitions/forms/TextArea/TextArea.d.ts +1 -1
  23. package/dist/definitions/forms/TextArea/TextArea.d.ts.map +1 -1
  24. package/dist/definitions/forms/styledTextInputMixin.d.ts +7 -0
  25. package/dist/definitions/forms/styledTextInputMixin.d.ts.map +1 -0
  26. package/dist/definitions/forms/utils.d.ts +10 -0
  27. package/dist/definitions/forms/utils.d.ts.map +1 -0
  28. package/dist/definitions/index.d.ts +10 -2
  29. package/dist/definitions/index.d.ts.map +1 -1
  30. package/dist/definitions/themes/default.d.ts +2 -13
  31. package/dist/definitions/themes/default.d.ts.map +1 -1
  32. package/dist/definitions/themes/late-ocean/forms.d.ts +26 -0
  33. package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -0
  34. package/dist/definitions/themes/late-ocean/input.d.ts +26 -0
  35. package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -0
  36. package/dist/definitions/themes/late-ocean/textArea.d.ts +5 -0
  37. package/dist/definitions/themes/late-ocean/textArea.d.ts.map +1 -0
  38. package/dist/index-browser-all.es.android.js +336 -293
  39. package/dist/index-browser-all.es.android.js.map +1 -1
  40. package/dist/index-browser-all.es.ios.js +336 -293
  41. package/dist/index-browser-all.es.ios.js.map +1 -1
  42. package/dist/index-browser-all.es.js +348 -300
  43. package/dist/index-browser-all.es.js.map +1 -1
  44. package/dist/index-browser-all.es.web.js +346 -304
  45. package/dist/index-browser-all.es.web.js.map +1 -1
  46. package/dist/index-node-14.17.cjs.js +265 -219
  47. package/dist/index-node-14.17.cjs.js.map +1 -1
  48. package/dist/index-node-14.17.cjs.web.js +256 -215
  49. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  50. package/dist/linaria-themes-browser-all.es.android.js +119 -106
  51. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  52. package/dist/linaria-themes-browser-all.es.ios.js +119 -106
  53. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  54. package/dist/linaria-themes-browser-all.es.js +119 -106
  55. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  56. package/dist/linaria-themes-browser-all.es.web.js +119 -106
  57. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  58. package/dist/linaria-themes-node-14.17.cjs.js +115 -102
  59. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  60. package/dist/linaria-themes-node-14.17.cjs.web.js +115 -102
  61. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  62. package/dist/tsbuildinfo +1 -1
  63. package/linaria-themes.js +1 -1
  64. package/package.json +5 -2
  65. package/typings/react-native-web.d.ts +67 -0
  66. package/dist/definitions/forms/InputFormState.d.ts +0 -2
  67. package/dist/definitions/forms/InputFormState.d.ts.map +0 -1
  68. package/dist/definitions/forms/InputText/useInputText.d.ts +0 -8
  69. package/dist/definitions/forms/InputText/useInputText.d.ts.map +0 -1
  70. package/dist/definitions/themes/late-ocean/formLateOceanTheme.d.ts +0 -37
  71. package/dist/definitions/themes/late-ocean/formLateOceanTheme.d.ts.map +0 -1
  72. package/dist/definitions/themes/late-ocean/inputLateOceanTheme.d.ts +0 -23
  73. package/dist/definitions/themes/late-ocean/inputLateOceanTheme.d.ts.map +0 -1
  74. package/linaria-themes.web.js +0 -3
@@ -777,7 +777,7 @@ const Button = /*#__PURE__*/react.forwardRef(({
777
777
  });
778
778
  });
779
779
 
780
- const Container$5 = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
780
+ const Container$4 = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
781
781
  displayName: "Card__Container",
782
782
  componentId: "kitt-universal__sc-1n9psug-0"
783
783
  })(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], ({
@@ -797,7 +797,7 @@ function Card({
797
797
  children,
798
798
  type
799
799
  }) {
800
- return /*#__PURE__*/jsxRuntime.jsx(Container$5, {
800
+ return /*#__PURE__*/jsxRuntime.jsx(Container$4, {
801
801
  type: type,
802
802
  children: children
803
803
  });
@@ -858,6 +858,7 @@ const getColorFromState = state => {
858
858
  case 'invalid':
859
859
  return 'danger';
860
860
 
861
+ case 'valid':
861
862
  default:
862
863
  return 'black-light';
863
864
  }
@@ -917,46 +918,87 @@ function InputField({
917
918
  });
918
919
  }
919
920
 
920
- const useInputText = () => {
921
- const [isFocused, setIsFocused] = react.useState(false);
922
- const [isPasswordVisible, setIsPasswordVisible] = react.useState(false);
923
- return {
924
- isFocused,
925
- handleInputFocus: () => setIsFocused(true),
926
- handleInputBlur: () => setIsFocused(false),
927
- togglePasswordVisibility: () => setIsPasswordVisible(isVisible => !isVisible),
928
- isPasswordVisible
929
- };
930
- };
921
+ function getIconColor(state, disabled) {
922
+ if (disabled) return 'black-light';
923
+
924
+ switch (state) {
925
+ case 'invalid':
926
+ return 'danger';
927
+
928
+ case 'valid':
929
+ return 'success';
930
+
931
+ default:
932
+ return undefined;
933
+ }
934
+ }
935
+
936
+ function InputIcon({
937
+ icon,
938
+ state,
939
+ disabled
940
+ }) {
941
+ const theme = /*#__PURE__*/styled.useTheme();
942
+ const color = getIconColor(state, disabled);
943
+ return /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
944
+ color: color,
945
+ icon: icon,
946
+ size: theme.kitt.forms.input.icon.size
947
+ });
948
+ }
949
+
950
+ function InputPressable({ ...props
951
+ }) {
952
+ return /*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.Pressable, { ...props
953
+ });
954
+ }
931
955
 
932
956
  const styledTextInputMixin = /*#__PURE__*/styled.css(["background-color:", ";border-width:", ";border-radius:", ";border-color:", ";font-size:", ";color:", ";font-family:", ";"], ({
933
957
  theme,
934
- state
935
- }) => state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states.default.backgroundColor, ({
958
+ $state
959
+ }) => $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states.default.backgroundColor, ({
936
960
  theme
937
961
  }) => theme.kitt.forms.input.borderWidth, ({
938
962
  theme
939
963
  }) => theme.kitt.forms.input.borderRadius, ({
940
964
  theme,
941
- state
942
- }) => theme.kitt.forms.input.states[state].borderColor, ({
965
+ $state
966
+ }) => theme.kitt.forms.input.states[$state].borderColor, ({
943
967
  theme
944
968
  }) => {
945
969
  const typeConfigKey = getTypographyTypeConfigKey(theme);
946
970
  return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize;
947
971
  }, ({
948
972
  theme,
949
- state
950
- }) => theme.kitt.typography.colors[theme.kitt.forms.input.states[state].color], ({
973
+ $state
974
+ }) => theme.kitt.typography.colors[theme.kitt.forms.input.states[$state].color], ({
951
975
  theme
952
976
  }) => theme.kitt.typography.types.bodies.fontFamily.regular);
953
- const Input = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.TextInput).withConfig({
954
- displayName: "InputText__Input",
977
+
978
+ function getInputUIState({
979
+ isFocused,
980
+ isDisabled,
981
+ formState
982
+ }) {
983
+ if (isDisabled) return 'disabled';
984
+ if (isFocused) return 'focus';
985
+ if (formState === 'invalid') return 'invalid';
986
+ return 'default';
987
+ }
988
+
989
+ const StyledTextInput = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.TextInput).withConfig({
990
+ displayName: "InputText__StyledTextInput",
955
991
  componentId: "kitt-universal__sc-uke279-0"
956
992
  })(["", " padding:", ";line-height:", ";min-height:", "px;"], styledTextInputMixin, ({
957
993
  theme,
958
994
  multiline
959
- }) => !multiline && "web" === 'ios' ? theme.kitt.forms.input.paddingSingleLineIOS : theme.kitt.forms.input.padding, ({
995
+ }) => {
996
+ if (!multiline && "web" === 'ios') {
997
+ return theme.kitt.forms.input.padding.iOSSingleLine;
998
+ }
999
+
1000
+ return theme.kitt.forms.input.padding.default;
1001
+ }, ({
960
1002
  theme,
961
1003
  multiline
962
1004
  }) => {
@@ -964,116 +1006,86 @@ const Input = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNativ
964
1006
  const typeConfigKey = getTypographyTypeConfigKey(theme);
965
1007
  return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight;
966
1008
  }, ({
967
- minHeight
968
- }) => minHeight);
969
- const Container$4 = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
970
- displayName: "InputText__Container",
1009
+ $minHeight
1010
+ }) => $minHeight);
1011
+ const InputTextContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1012
+ displayName: "InputText__InputTextContainer",
971
1013
  componentId: "kitt-universal__sc-uke279-1"
972
- })(["margin-top:", ";margin-bottom:", ";"], ({
973
- theme
974
- }) => theme.kitt.forms.input.marginTop, ({
975
- theme
976
- }) => theme.kitt.forms.input.marginBottom);
977
- const PasswordButtonContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.Pressable).withConfig({
978
- displayName: "InputText__PasswordButtonContainer",
1014
+ })(["position:relative;"]);
1015
+ const RightInputContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1016
+ displayName: "InputText__RightInputContainer",
979
1017
  componentId: "kitt-universal__sc-uke279-2"
980
- })(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:", "px;"], ({
981
- theme
982
- }) => theme.kitt.forms.input.passwordButtonIconSize / 2);
983
-
984
- const getInputState = ({
985
- isDisabled,
986
- isFocused,
987
- formState
988
- }) => {
989
- if (isDisabled) return 'disabled';
990
- if (isFocused) return 'focus';
991
- if (formState === 'invalid') return 'invalid';
992
- return 'default';
993
- };
994
-
995
- const keyboardTypeByTextInputType = {
996
- text: 'default',
997
- email: 'email-address',
998
- password: 'default',
999
- username: 'default'
1000
- };
1001
- const autoCompleteTypeByType = {
1002
- text: 'off',
1003
- email: 'email',
1004
- password: 'password',
1005
- username: 'name'
1006
- };
1007
- const autoCorrectByType = {
1008
- text: true,
1009
- email: false,
1010
- password: false,
1011
- username: false
1012
- };
1013
- const textContentTypeByType = {
1014
- text: 'none',
1015
- email: 'emailAddress',
1016
- password: 'password',
1017
- username: 'username'
1018
- };
1018
+ })(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:10px;"]);
1019
1019
  const InputText = /*#__PURE__*/react.forwardRef(({
1020
1020
  id,
1021
+ right,
1021
1022
  minHeight = 0,
1022
- type,
1023
1023
  state: formState,
1024
1024
  internalForceState,
1025
1025
  disabled = false,
1026
+ autoCorrect = true,
1027
+ textContentType = 'none',
1028
+ autoCompleteType = 'off',
1029
+ keyboardType = 'default',
1026
1030
  onFocus,
1027
1031
  onBlur,
1028
1032
  ...props
1029
1033
  }, ref) => {
1030
- const {
1031
- isFocused,
1032
- handleInputBlur,
1033
- handleInputFocus,
1034
- isPasswordVisible,
1035
- togglePasswordVisibility
1036
- } = useInputText();
1037
1034
  const theme = /*#__PURE__*/styled.useTheme();
1038
- const state = internalForceState || getInputState({
1035
+ const [isFocused, setIsFocused] = react.useState(false);
1036
+ const state = internalForceState || getInputUIState({
1039
1037
  isFocused,
1040
1038
  isDisabled: disabled,
1041
1039
  formState
1042
1040
  });
1043
- return /*#__PURE__*/jsxRuntime.jsxs(Container$4, {
1044
- children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
1041
+ return /*#__PURE__*/jsxRuntime.jsxs(InputTextContainer, {
1042
+ children: [/*#__PURE__*/jsxRuntime.jsx(StyledTextInput, {
1045
1043
  ref: ref,
1046
1044
  nativeID: id,
1047
1045
  editable: !disabled,
1048
- keyboardType: keyboardTypeByTextInputType[type],
1049
- autoCompleteType: autoCompleteTypeByType[type],
1050
- autoCorrect: autoCorrectByType[type],
1051
- minHeight: minHeight,
1052
- textContentType: textContentTypeByType[type],
1053
- placeholderTextColor: theme.kitt.typography.colors[theme.kitt.forms.input.placeholderColor],
1054
- selectionColor: theme.kitt.forms.input.selectionColor,
1055
- secureTextEntry: type === 'password' && !isPasswordVisible,
1046
+ keyboardType: keyboardType,
1047
+ autoCompleteType: autoCompleteType,
1048
+ autoCorrect: autoCorrect,
1049
+ $minHeight: minHeight,
1050
+ textContentType: textContentType,
1051
+ placeholderTextColor: theme.kitt.forms.input.color.placeholder,
1052
+ selectionColor: theme.kitt.forms.input.color.selection,
1056
1053
  ...props,
1057
- state: state,
1054
+ $state: state,
1058
1055
  onFocus: e => {
1059
- handleInputFocus();
1056
+ setIsFocused(true);
1060
1057
  if (onFocus) onFocus(e);
1061
1058
  },
1062
1059
  onBlur: e => {
1063
- handleInputBlur();
1060
+ setIsFocused(false);
1064
1061
  if (onBlur) onBlur(e);
1065
1062
  }
1066
- }), type === 'password' && !disabled && /*#__PURE__*/jsxRuntime.jsx(PasswordButtonContainer, {
1063
+ }), right ? /*#__PURE__*/jsxRuntime.jsx(RightInputContainer, {
1064
+ children: right
1065
+ }) : null]
1066
+ });
1067
+ });
1068
+
1069
+ function InputPassword({
1070
+ isPasswordDefaultVisible,
1071
+ right,
1072
+ ...props
1073
+ }) {
1074
+ const [isVisible, setIsVisible] = react.useState(Boolean(isPasswordDefaultVisible));
1075
+ return /*#__PURE__*/jsxRuntime.jsx(InputText, { ...props,
1076
+ textContentType: "password",
1077
+ autoCompleteType: "password",
1078
+ autoCorrect: false,
1079
+ secureTextEntry: !isVisible,
1080
+ right: right || /*#__PURE__*/jsxRuntime.jsx(InputPressable, {
1067
1081
  accessibilityRole: "button",
1068
- onPress: togglePasswordVisibility,
1069
- children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
1070
- icon: isPasswordVisible ? /*#__PURE__*/jsxRuntime.jsx(kittIcons.EyeIcon, {}) : /*#__PURE__*/jsxRuntime.jsx(kittIcons.EyeOffIcon, {}),
1071
- size: theme.kitt.forms.input.passwordButtonIconSize,
1072
- color: theme.kitt.forms.input.states[state].passwordButtonIconColor
1082
+ onPress: () => setIsVisible(prev => !prev),
1083
+ children: /*#__PURE__*/jsxRuntime.jsx(InputIcon, {
1084
+ icon: isVisible ? /*#__PURE__*/jsxRuntime.jsx(kittIcons.EyeOffIcon, {}) : /*#__PURE__*/jsxRuntime.jsx(kittIcons.EyeIcon, {})
1073
1085
  })
1074
- })]
1086
+ })
1075
1087
  });
1076
- });
1088
+ }
1077
1089
 
1078
1090
  function Label({
1079
1091
  htmlFor,
@@ -1175,9 +1187,8 @@ function TextArea({ ...props
1175
1187
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
1176
1188
  multiline: true,
1177
1189
  textAlignVertical: "top",
1178
- ...props,
1179
- type: "text",
1180
- minHeight: theme.kitt.forms.input.textAreaMinHeight
1190
+ minHeight: theme.kitt.forms.textArea.minHeight,
1191
+ ...props
1181
1192
  });
1182
1193
  }
1183
1194
 
@@ -1348,18 +1359,23 @@ const PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/react$1.styled("di
1348
1359
  class: "p1nlccvg",
1349
1360
  vars: {
1350
1361
  "p1nlccvg-0": [({
1351
- theme
1352
- }) => theme.kitt.iconButton.scale.base.hover],
1362
+ theme,
1363
+ $isDisabled
1364
+ }) => $isDisabled ? 1 : theme.kitt.iconButton.scale.base.hover],
1353
1365
  "p1nlccvg-2": [({
1354
- theme
1355
- }) => theme.kitt.iconButton.scale.medium.hover],
1366
+ theme,
1367
+ $isDisabled
1368
+ }) => $isDisabled ? 1 : theme.kitt.iconButton.scale.medium.hover],
1356
1369
  "p1nlccvg-3": [({
1357
- theme
1358
- }) => theme.kitt.iconButton.scale.base.active],
1370
+ theme,
1371
+ $isDisabled
1372
+ }) => $isDisabled ? 1 : theme.kitt.iconButton.scale.base.active],
1359
1373
  "p1nlccvg-4": [({
1360
1374
  theme,
1361
- $isWhite
1375
+ $isWhite,
1376
+ $isDisabled
1362
1377
  }) => {
1378
+ if ($isDisabled) return theme.kitt.iconButton.disabled.backgroundColor;
1363
1379
  const {
1364
1380
  white,
1365
1381
  default: defaultIconButton
@@ -1401,12 +1417,15 @@ const StyledPressableIconButton = /*#__PURE__*/styled__default(BabelPluginStyled
1401
1417
  });
1402
1418
  function PressableIconButton({
1403
1419
  color,
1420
+ disabled,
1404
1421
  ...props
1405
1422
  }) {
1406
1423
  return /*#__PURE__*/jsxRuntime.jsx(StyleWebWrapper, {
1407
1424
  as: PressableIconButtonWebWrapper,
1408
1425
  $isWhite: color === 'white',
1409
- children: /*#__PURE__*/jsxRuntime.jsx(StyledPressableIconButton, { ...props
1426
+ $isDisabled: Boolean(disabled),
1427
+ children: /*#__PURE__*/jsxRuntime.jsx(StyledPressableIconButton, { ...props,
1428
+ disabled: disabled
1410
1429
  })
1411
1430
  });
1412
1431
  }
@@ -1460,11 +1479,17 @@ function IconButton({
1460
1479
  icon,
1461
1480
  color,
1462
1481
  disabled,
1482
+ testID,
1483
+ accessibilityLabel,
1484
+ accessibilityRole,
1463
1485
  onPress
1464
1486
  }) {
1465
1487
  return /*#__PURE__*/jsxRuntime.jsx(PressableAnimatedContainer, {
1466
1488
  color: color,
1467
1489
  disabled: disabled,
1490
+ testID: testID,
1491
+ accessibilityLabel: accessibilityLabel,
1492
+ accessibilityRole: accessibilityRole,
1468
1493
  onPress: onPress,
1469
1494
  children: /*#__PURE__*/jsxRuntime.jsx(IconButtonContent, {
1470
1495
  disabled: disabled,
@@ -2559,54 +2584,133 @@ const feedbackMessageLateOceanTheme = {
2559
2584
  }
2560
2585
  };
2561
2586
 
2562
- const inputFieldLateOceanTheme = {
2563
- labelContainerPaddingBottom: 5,
2564
- iconMarginLeft: 6
2587
+ const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
2588
+ const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
2589
+ baseAndSmall: {
2590
+ fontSize: `${baseAndSmallFontSize}px`,
2591
+ lineHeight: `${calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)}px`
2592
+ },
2593
+ mediumAndWide: {
2594
+ fontSize: `${mediumAndWideFontSize}px`,
2595
+ lineHeight: `${calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)}px`
2596
+ }
2597
+ });
2598
+ const typographyLateOceanTheme = {
2599
+ colors: {
2600
+ black: lateOceanColorPalette.black1000,
2601
+ 'black-light': lateOceanColorPalette.black555,
2602
+ white: lateOceanColorPalette.white,
2603
+ 'white-light': lateOceanColorPalette.white,
2604
+ primary: lateOceanColorPalette.lateOcean,
2605
+ 'primary-light': lateOceanColorPalette.lateOceanLight1,
2606
+ accent: lateOceanColorPalette.warmEmbrace,
2607
+ success: lateOceanColorPalette.viride,
2608
+ danger: lateOceanColorPalette.englishVermillon
2609
+ },
2610
+ types: {
2611
+ headers: {
2612
+ fontFamily: {
2613
+ regular: 'Moderat',
2614
+ bold: 'Moderat'
2615
+ },
2616
+ fontWeight: 400,
2617
+ fontStyle: 'normal',
2618
+ configs: {
2619
+ // also known as xxlarge
2620
+ header1: createTypographyTypeConfig(1.3, 38, 62),
2621
+ // also known as xlarge
2622
+ header2: createTypographyTypeConfig(1.3, 32, 48),
2623
+ // also known as medium
2624
+ header3: createTypographyTypeConfig(1.3, 24, 36),
2625
+ // also known as xsmall
2626
+ header4: createTypographyTypeConfig(1.3, 18, 24),
2627
+ // also known as xxsmall
2628
+ header5: createTypographyTypeConfig(1.3, 18, 18)
2629
+ }
2630
+ },
2631
+ bodies: {
2632
+ fontFamily: {
2633
+ regular: 'Noto Sans',
2634
+ bold: 'Noto Sans'
2635
+ },
2636
+ fontWeight: {
2637
+ regular: 400,
2638
+ bold: 700
2639
+ },
2640
+ fontStyle: {
2641
+ regular: 'normal',
2642
+ bold: 'normal'
2643
+ },
2644
+ configs: {
2645
+ 'body-large': createTypographyTypeConfig(1.6, 18, 24),
2646
+ 'body-medium': createTypographyTypeConfig(1.6, 18, 18),
2647
+ body: createTypographyTypeConfig(1.6, 16, 16),
2648
+ 'body-small': createTypographyTypeConfig(1.6, 14, 14),
2649
+ 'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
2650
+ }
2651
+ }
2652
+ },
2653
+ link: {
2654
+ disabledColor: lateOceanColorPalette.black200
2655
+ }
2565
2656
  };
2566
2657
 
2567
2658
  const inputStatesStyle = {
2568
2659
  default: {
2569
- backgroundColor: lateOceanColorPalette.white,
2660
+ backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
2661
+ borderColor: colorsLateOceanTheme.separator,
2662
+ color: 'black'
2663
+ },
2664
+ pending: {
2665
+ backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
2666
+ borderColor: colorsLateOceanTheme.separator,
2667
+ color: 'black'
2668
+ },
2669
+ valid: {
2670
+ backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
2570
2671
  borderColor: lateOceanColorPalette.black100,
2571
- color: 'black',
2572
- passwordButtonIconColor: 'black'
2672
+ color: 'black'
2573
2673
  },
2574
2674
  hover: {
2575
2675
  borderColor: lateOceanColorPalette.black200,
2576
- color: 'black',
2577
- passwordButtonIconColor: 'black'
2676
+ color: 'black'
2578
2677
  },
2579
2678
  focus: {
2580
- borderColor: lateOceanColorPalette.lateOcean,
2581
- color: 'black',
2582
- passwordButtonIconColor: 'black'
2679
+ borderColor: colorsLateOceanTheme.primary,
2680
+ color: 'black'
2583
2681
  },
2584
2682
  disabled: {
2585
- backgroundColor: lateOceanColorPalette.black50,
2586
- borderColor: lateOceanColorPalette.black100,
2587
- color: 'black-light',
2588
- passwordButtonIconColor: 'black-light'
2683
+ backgroundColor: colorsLateOceanTheme.disabled,
2684
+ borderColor: colorsLateOceanTheme.separator,
2685
+ color: 'black-light'
2589
2686
  },
2590
2687
  invalid: {
2591
- borderColor: lateOceanColorPalette.englishVermillon,
2592
- color: 'black',
2593
- passwordButtonIconColor: 'black'
2688
+ borderColor: colorsLateOceanTheme.danger,
2689
+ color: 'black'
2594
2690
  }
2595
2691
  };
2596
- const inputLateOceanTheme = {
2597
- marginTop: '2px',
2598
- marginBottom: '4px',
2692
+ const input = {
2693
+ color: {
2694
+ selection: colorsLateOceanTheme.primary,
2695
+ placeholder: typographyLateOceanTheme.colors['black-light']
2696
+ },
2599
2697
  borderWidth: '2px',
2600
2698
  borderRadius: '10px',
2601
- passwordButtonIconSize: 20,
2602
- padding: '7px 16px',
2603
- paddingSingleLineIOS: '12px 16px',
2604
- selectionColor: lateOceanColorPalette.lateOcean,
2605
- placeholderColor: 'black-light',
2606
- textAreaMinHeight: 120,
2699
+ icon: {
2700
+ size: 20
2701
+ },
2702
+ padding: {
2703
+ default: '7px 16px',
2704
+ iOSSingleLine: '12px 16px'
2705
+ },
2607
2706
  states: inputStatesStyle
2608
2707
  };
2609
2708
 
2709
+ const inputFieldLateOceanTheme = {
2710
+ labelContainerPaddingBottom: 5,
2711
+ iconMarginLeft: 6
2712
+ };
2713
+
2610
2714
  const radioLateOceanTheme = {
2611
2715
  size: 18,
2612
2716
  unchecked: {
@@ -2625,10 +2729,15 @@ const radioLateOceanTheme = {
2625
2729
  }
2626
2730
  };
2627
2731
 
2628
- const formsLateOceanTheme = {
2629
- input: inputLateOceanTheme,
2732
+ const textArea = {
2733
+ minHeight: 120
2734
+ };
2735
+
2736
+ const forms = {
2737
+ input,
2630
2738
  radio: radioLateOceanTheme,
2631
- inputField: inputFieldLateOceanTheme
2739
+ inputField: inputFieldLateOceanTheme,
2740
+ textArea
2632
2741
  };
2633
2742
 
2634
2743
  const fullScreenModalLateOceanTheme = {
@@ -2741,77 +2850,6 @@ const tooltip = {
2741
2850
  floatingPadding: 8
2742
2851
  };
2743
2852
 
2744
- const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
2745
- const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
2746
- baseAndSmall: {
2747
- fontSize: `${baseAndSmallFontSize}px`,
2748
- lineHeight: `${calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)}px`
2749
- },
2750
- mediumAndWide: {
2751
- fontSize: `${mediumAndWideFontSize}px`,
2752
- lineHeight: `${calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)}px`
2753
- }
2754
- });
2755
- const typographyLateOceanTheme = {
2756
- colors: {
2757
- black: lateOceanColorPalette.black1000,
2758
- 'black-light': lateOceanColorPalette.black555,
2759
- white: lateOceanColorPalette.white,
2760
- 'white-light': lateOceanColorPalette.white,
2761
- primary: lateOceanColorPalette.lateOcean,
2762
- 'primary-light': lateOceanColorPalette.lateOceanLight1,
2763
- accent: lateOceanColorPalette.warmEmbrace,
2764
- success: lateOceanColorPalette.viride,
2765
- danger: lateOceanColorPalette.englishVermillon
2766
- },
2767
- types: {
2768
- headers: {
2769
- fontFamily: {
2770
- regular: 'Moderat',
2771
- bold: 'Moderat'
2772
- },
2773
- fontWeight: 400,
2774
- fontStyle: 'normal',
2775
- configs: {
2776
- // also known as xxlarge
2777
- header1: createTypographyTypeConfig(1.3, 38, 62),
2778
- // also known as xlarge
2779
- header2: createTypographyTypeConfig(1.3, 32, 48),
2780
- // also known as medium
2781
- header3: createTypographyTypeConfig(1.3, 24, 36),
2782
- // also known as xsmall
2783
- header4: createTypographyTypeConfig(1.3, 18, 24),
2784
- // also known as xxsmall
2785
- header5: createTypographyTypeConfig(1.3, 18, 18)
2786
- }
2787
- },
2788
- bodies: {
2789
- fontFamily: {
2790
- regular: 'Noto Sans',
2791
- bold: 'Noto Sans'
2792
- },
2793
- fontWeight: {
2794
- regular: 400,
2795
- bold: 700
2796
- },
2797
- fontStyle: {
2798
- regular: 'normal',
2799
- bold: 'normal'
2800
- },
2801
- configs: {
2802
- 'body-large': createTypographyTypeConfig(1.6, 18, 24),
2803
- 'body-medium': createTypographyTypeConfig(1.6, 18, 18),
2804
- body: createTypographyTypeConfig(1.6, 16, 16),
2805
- 'body-small': createTypographyTypeConfig(1.6, 14, 14),
2806
- 'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
2807
- }
2808
- }
2809
- },
2810
- link: {
2811
- disabledColor: lateOceanColorPalette.black200
2812
- }
2813
- };
2814
-
2815
2853
  const breakpoints = {
2816
2854
  values: {
2817
2855
  base: 0,
@@ -2845,7 +2883,7 @@ const theme = {
2845
2883
  button: buttonLateOceanTheme,
2846
2884
  card: cardLateOceanTheme,
2847
2885
  feedbackMessage: feedbackMessageLateOceanTheme,
2848
- forms: formsLateOceanTheme,
2886
+ forms,
2849
2887
  typography: typographyLateOceanTheme,
2850
2888
  tag: tagLateOceanTheme,
2851
2889
  shadows: shadowsLateOceanTheme,
@@ -3267,6 +3305,9 @@ exports.Icon = Icon;
3267
3305
  exports.IconButton = IconButton;
3268
3306
  exports.InputFeedback = InputFeedback;
3269
3307
  exports.InputField = InputField;
3308
+ exports.InputIcon = InputIcon;
3309
+ exports.InputPassword = InputPassword;
3310
+ exports.InputPressable = InputPressable;
3270
3311
  exports.InputText = InputText;
3271
3312
  exports.KittBreakpoints = KittBreakpoints;
3272
3313
  exports.KittBreakpointsMax = KittBreakpointsMax;