@ornikar/kitt-universal 3.9.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.
- package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +1 -1
- package/dist/definitions/IconButton/IconButton.d.ts +5 -1
- package/dist/definitions/IconButton/IconButton.d.ts.map +1 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts +4 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts.map +1 -1
- package/dist/definitions/TimePicker/TimePicker.d.ts +1 -1
- package/dist/definitions/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/definitions/TimePicker/useTimePicker.d.ts +2 -4
- package/dist/definitions/TimePicker/useTimePicker.d.ts.map +1 -1
- package/dist/definitions/forms/InputFeedback/InputFeedback.d.ts +1 -1
- package/dist/definitions/forms/InputFeedback/InputFeedback.d.ts.map +1 -1
- package/dist/definitions/forms/InputIcon/InputIcon.d.ts +9 -0
- package/dist/definitions/forms/InputIcon/InputIcon.d.ts.map +1 -0
- package/dist/definitions/forms/InputPassword/InputPassword.d.ts +7 -0
- package/dist/definitions/forms/InputPassword/InputPassword.d.ts.map +1 -0
- package/dist/definitions/forms/InputPressable/InputPressable.d.ts +6 -0
- package/dist/definitions/forms/InputPressable/InputPressable.d.ts.map +1 -0
- package/dist/definitions/forms/InputText/InputText.d.ts +4 -12
- package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
- package/dist/definitions/forms/TextArea/TextArea.d.ts +1 -1
- package/dist/definitions/forms/TextArea/TextArea.d.ts.map +1 -1
- package/dist/definitions/forms/styledTextInputMixin.d.ts +7 -0
- package/dist/definitions/forms/styledTextInputMixin.d.ts.map +1 -0
- package/dist/definitions/forms/utils.d.ts +10 -0
- package/dist/definitions/forms/utils.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +10 -2
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +2 -13
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/forms.d.ts +26 -0
- package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -0
- package/dist/definitions/themes/late-ocean/input.d.ts +26 -0
- package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -0
- package/dist/definitions/themes/late-ocean/textArea.d.ts +5 -0
- package/dist/definitions/themes/late-ocean/textArea.d.ts.map +1 -0
- package/dist/index-browser-all.es.android.js +330 -291
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +330 -291
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +330 -291
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +328 -295
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +249 -211
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +240 -207
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +119 -106
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +119 -106
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +119 -106
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +119 -106
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +115 -102
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +115 -102
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/definitions/forms/InputFormState.d.ts +0 -2
- package/dist/definitions/forms/InputFormState.d.ts.map +0 -1
- package/dist/definitions/forms/InputText/useInputText.d.ts +0 -8
- package/dist/definitions/forms/InputText/useInputText.d.ts.map +0 -1
- package/dist/definitions/themes/late-ocean/formLateOceanTheme.d.ts +0 -37
- package/dist/definitions/themes/late-ocean/formLateOceanTheme.d.ts.map +0 -1
- package/dist/definitions/themes/late-ocean/inputLateOceanTheme.d.ts +0 -23
- package/dist/definitions/themes/late-ocean/inputLateOceanTheme.d.ts.map +0 -1
|
@@ -777,7 +777,7 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
777
777
|
});
|
|
778
778
|
});
|
|
779
779
|
|
|
780
|
-
const Container$
|
|
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$
|
|
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
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
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
|
-
|
|
954
|
-
|
|
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
|
-
}) =>
|
|
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
|
|
970
|
-
displayName: "
|
|
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
|
-
})(["
|
|
973
|
-
|
|
974
|
-
|
|
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:
|
|
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
|
|
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(
|
|
1044
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
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:
|
|
1049
|
-
autoCompleteType:
|
|
1050
|
-
autoCorrect:
|
|
1051
|
-
minHeight: minHeight,
|
|
1052
|
-
textContentType:
|
|
1053
|
-
placeholderTextColor: theme.kitt.
|
|
1054
|
-
selectionColor: theme.kitt.forms.input.
|
|
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
|
-
|
|
1056
|
+
setIsFocused(true);
|
|
1060
1057
|
if (onFocus) onFocus(e);
|
|
1061
1058
|
},
|
|
1062
1059
|
onBlur: e => {
|
|
1063
|
-
|
|
1060
|
+
setIsFocused(false);
|
|
1064
1061
|
if (onBlur) onBlur(e);
|
|
1065
1062
|
}
|
|
1066
|
-
}),
|
|
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:
|
|
1069
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
1070
|
-
icon:
|
|
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
|
-
|
|
1179
|
-
|
|
1180
|
-
minHeight: theme.kitt.forms.input.textAreaMinHeight
|
|
1190
|
+
minHeight: theme.kitt.forms.textArea.minHeight,
|
|
1191
|
+
...props
|
|
1181
1192
|
});
|
|
1182
1193
|
}
|
|
1183
1194
|
|
|
@@ -1468,11 +1479,17 @@ function IconButton({
|
|
|
1468
1479
|
icon,
|
|
1469
1480
|
color,
|
|
1470
1481
|
disabled,
|
|
1482
|
+
testID,
|
|
1483
|
+
accessibilityLabel,
|
|
1484
|
+
accessibilityRole,
|
|
1471
1485
|
onPress
|
|
1472
1486
|
}) {
|
|
1473
1487
|
return /*#__PURE__*/jsxRuntime.jsx(PressableAnimatedContainer, {
|
|
1474
1488
|
color: color,
|
|
1475
1489
|
disabled: disabled,
|
|
1490
|
+
testID: testID,
|
|
1491
|
+
accessibilityLabel: accessibilityLabel,
|
|
1492
|
+
accessibilityRole: accessibilityRole,
|
|
1476
1493
|
onPress: onPress,
|
|
1477
1494
|
children: /*#__PURE__*/jsxRuntime.jsx(IconButtonContent, {
|
|
1478
1495
|
disabled: disabled,
|
|
@@ -2567,54 +2584,133 @@ const feedbackMessageLateOceanTheme = {
|
|
|
2567
2584
|
}
|
|
2568
2585
|
};
|
|
2569
2586
|
|
|
2570
|
-
const
|
|
2571
|
-
|
|
2572
|
-
|
|
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
|
+
}
|
|
2573
2656
|
};
|
|
2574
2657
|
|
|
2575
2658
|
const inputStatesStyle = {
|
|
2576
2659
|
default: {
|
|
2577
|
-
backgroundColor:
|
|
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,
|
|
2578
2671
|
borderColor: lateOceanColorPalette.black100,
|
|
2579
|
-
color: 'black'
|
|
2580
|
-
passwordButtonIconColor: 'black'
|
|
2672
|
+
color: 'black'
|
|
2581
2673
|
},
|
|
2582
2674
|
hover: {
|
|
2583
2675
|
borderColor: lateOceanColorPalette.black200,
|
|
2584
|
-
color: 'black'
|
|
2585
|
-
passwordButtonIconColor: 'black'
|
|
2676
|
+
color: 'black'
|
|
2586
2677
|
},
|
|
2587
2678
|
focus: {
|
|
2588
|
-
borderColor:
|
|
2589
|
-
color: 'black'
|
|
2590
|
-
passwordButtonIconColor: 'black'
|
|
2679
|
+
borderColor: colorsLateOceanTheme.primary,
|
|
2680
|
+
color: 'black'
|
|
2591
2681
|
},
|
|
2592
2682
|
disabled: {
|
|
2593
|
-
backgroundColor:
|
|
2594
|
-
borderColor:
|
|
2595
|
-
color: 'black-light'
|
|
2596
|
-
passwordButtonIconColor: 'black-light'
|
|
2683
|
+
backgroundColor: colorsLateOceanTheme.disabled,
|
|
2684
|
+
borderColor: colorsLateOceanTheme.separator,
|
|
2685
|
+
color: 'black-light'
|
|
2597
2686
|
},
|
|
2598
2687
|
invalid: {
|
|
2599
|
-
borderColor:
|
|
2600
|
-
color: 'black'
|
|
2601
|
-
passwordButtonIconColor: 'black'
|
|
2688
|
+
borderColor: colorsLateOceanTheme.danger,
|
|
2689
|
+
color: 'black'
|
|
2602
2690
|
}
|
|
2603
2691
|
};
|
|
2604
|
-
const
|
|
2605
|
-
|
|
2606
|
-
|
|
2692
|
+
const input = {
|
|
2693
|
+
color: {
|
|
2694
|
+
selection: colorsLateOceanTheme.primary,
|
|
2695
|
+
placeholder: typographyLateOceanTheme.colors['black-light']
|
|
2696
|
+
},
|
|
2607
2697
|
borderWidth: '2px',
|
|
2608
2698
|
borderRadius: '10px',
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2699
|
+
icon: {
|
|
2700
|
+
size: 20
|
|
2701
|
+
},
|
|
2702
|
+
padding: {
|
|
2703
|
+
default: '7px 16px',
|
|
2704
|
+
iOSSingleLine: '12px 16px'
|
|
2705
|
+
},
|
|
2615
2706
|
states: inputStatesStyle
|
|
2616
2707
|
};
|
|
2617
2708
|
|
|
2709
|
+
const inputFieldLateOceanTheme = {
|
|
2710
|
+
labelContainerPaddingBottom: 5,
|
|
2711
|
+
iconMarginLeft: 6
|
|
2712
|
+
};
|
|
2713
|
+
|
|
2618
2714
|
const radioLateOceanTheme = {
|
|
2619
2715
|
size: 18,
|
|
2620
2716
|
unchecked: {
|
|
@@ -2633,10 +2729,15 @@ const radioLateOceanTheme = {
|
|
|
2633
2729
|
}
|
|
2634
2730
|
};
|
|
2635
2731
|
|
|
2636
|
-
const
|
|
2637
|
-
|
|
2732
|
+
const textArea = {
|
|
2733
|
+
minHeight: 120
|
|
2734
|
+
};
|
|
2735
|
+
|
|
2736
|
+
const forms = {
|
|
2737
|
+
input,
|
|
2638
2738
|
radio: radioLateOceanTheme,
|
|
2639
|
-
inputField: inputFieldLateOceanTheme
|
|
2739
|
+
inputField: inputFieldLateOceanTheme,
|
|
2740
|
+
textArea
|
|
2640
2741
|
};
|
|
2641
2742
|
|
|
2642
2743
|
const fullScreenModalLateOceanTheme = {
|
|
@@ -2749,77 +2850,6 @@ const tooltip = {
|
|
|
2749
2850
|
floatingPadding: 8
|
|
2750
2851
|
};
|
|
2751
2852
|
|
|
2752
|
-
const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
|
|
2753
|
-
const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
|
|
2754
|
-
baseAndSmall: {
|
|
2755
|
-
fontSize: `${baseAndSmallFontSize}px`,
|
|
2756
|
-
lineHeight: `${calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)}px`
|
|
2757
|
-
},
|
|
2758
|
-
mediumAndWide: {
|
|
2759
|
-
fontSize: `${mediumAndWideFontSize}px`,
|
|
2760
|
-
lineHeight: `${calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)}px`
|
|
2761
|
-
}
|
|
2762
|
-
});
|
|
2763
|
-
const typographyLateOceanTheme = {
|
|
2764
|
-
colors: {
|
|
2765
|
-
black: lateOceanColorPalette.black1000,
|
|
2766
|
-
'black-light': lateOceanColorPalette.black555,
|
|
2767
|
-
white: lateOceanColorPalette.white,
|
|
2768
|
-
'white-light': lateOceanColorPalette.white,
|
|
2769
|
-
primary: lateOceanColorPalette.lateOcean,
|
|
2770
|
-
'primary-light': lateOceanColorPalette.lateOceanLight1,
|
|
2771
|
-
accent: lateOceanColorPalette.warmEmbrace,
|
|
2772
|
-
success: lateOceanColorPalette.viride,
|
|
2773
|
-
danger: lateOceanColorPalette.englishVermillon
|
|
2774
|
-
},
|
|
2775
|
-
types: {
|
|
2776
|
-
headers: {
|
|
2777
|
-
fontFamily: {
|
|
2778
|
-
regular: 'Moderat',
|
|
2779
|
-
bold: 'Moderat'
|
|
2780
|
-
},
|
|
2781
|
-
fontWeight: 400,
|
|
2782
|
-
fontStyle: 'normal',
|
|
2783
|
-
configs: {
|
|
2784
|
-
// also known as xxlarge
|
|
2785
|
-
header1: createTypographyTypeConfig(1.3, 38, 62),
|
|
2786
|
-
// also known as xlarge
|
|
2787
|
-
header2: createTypographyTypeConfig(1.3, 32, 48),
|
|
2788
|
-
// also known as medium
|
|
2789
|
-
header3: createTypographyTypeConfig(1.3, 24, 36),
|
|
2790
|
-
// also known as xsmall
|
|
2791
|
-
header4: createTypographyTypeConfig(1.3, 18, 24),
|
|
2792
|
-
// also known as xxsmall
|
|
2793
|
-
header5: createTypographyTypeConfig(1.3, 18, 18)
|
|
2794
|
-
}
|
|
2795
|
-
},
|
|
2796
|
-
bodies: {
|
|
2797
|
-
fontFamily: {
|
|
2798
|
-
regular: 'Noto Sans',
|
|
2799
|
-
bold: 'Noto Sans'
|
|
2800
|
-
},
|
|
2801
|
-
fontWeight: {
|
|
2802
|
-
regular: 400,
|
|
2803
|
-
bold: 700
|
|
2804
|
-
},
|
|
2805
|
-
fontStyle: {
|
|
2806
|
-
regular: 'normal',
|
|
2807
|
-
bold: 'normal'
|
|
2808
|
-
},
|
|
2809
|
-
configs: {
|
|
2810
|
-
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
2811
|
-
'body-medium': createTypographyTypeConfig(1.6, 18, 18),
|
|
2812
|
-
body: createTypographyTypeConfig(1.6, 16, 16),
|
|
2813
|
-
'body-small': createTypographyTypeConfig(1.6, 14, 14),
|
|
2814
|
-
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
2815
|
-
}
|
|
2816
|
-
}
|
|
2817
|
-
},
|
|
2818
|
-
link: {
|
|
2819
|
-
disabledColor: lateOceanColorPalette.black200
|
|
2820
|
-
}
|
|
2821
|
-
};
|
|
2822
|
-
|
|
2823
2853
|
const breakpoints = {
|
|
2824
2854
|
values: {
|
|
2825
2855
|
base: 0,
|
|
@@ -2853,7 +2883,7 @@ const theme = {
|
|
|
2853
2883
|
button: buttonLateOceanTheme,
|
|
2854
2884
|
card: cardLateOceanTheme,
|
|
2855
2885
|
feedbackMessage: feedbackMessageLateOceanTheme,
|
|
2856
|
-
forms
|
|
2886
|
+
forms,
|
|
2857
2887
|
typography: typographyLateOceanTheme,
|
|
2858
2888
|
tag: tagLateOceanTheme,
|
|
2859
2889
|
shadows: shadowsLateOceanTheme,
|
|
@@ -3275,6 +3305,9 @@ exports.Icon = Icon;
|
|
|
3275
3305
|
exports.IconButton = IconButton;
|
|
3276
3306
|
exports.InputFeedback = InputFeedback;
|
|
3277
3307
|
exports.InputField = InputField;
|
|
3308
|
+
exports.InputIcon = InputIcon;
|
|
3309
|
+
exports.InputPassword = InputPassword;
|
|
3310
|
+
exports.InputPressable = InputPressable;
|
|
3278
3311
|
exports.InputText = InputText;
|
|
3279
3312
|
exports.KittBreakpoints = KittBreakpoints;
|
|
3280
3313
|
exports.KittBreakpointsMax = KittBreakpointsMax;
|