@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.
- 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/IconButton/PressableIconButton.d.ts +1 -1
- package/dist/definitions/IconButton/PressableIconButton.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 +336 -293
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +336 -293
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +348 -300
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +346 -304
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +265 -219
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +256 -215
- 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/linaria-themes.js +1 -1
- package/package.json +5 -2
- package/typings/react-native-web.d.ts +67 -0
- 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
- package/linaria-themes.web.js +0 -3
|
@@ -801,7 +801,7 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
801
801
|
});
|
|
802
802
|
});
|
|
803
803
|
|
|
804
|
-
const Container$
|
|
804
|
+
const Container$6 = /*#__PURE__*/styled__default.View.withConfig({
|
|
805
805
|
displayName: "Card__Container",
|
|
806
806
|
componentId: "kitt-universal__sc-1n9psug-0"
|
|
807
807
|
})(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], ({
|
|
@@ -821,7 +821,7 @@ function Card({
|
|
|
821
821
|
children,
|
|
822
822
|
type
|
|
823
823
|
}) {
|
|
824
|
-
return /*#__PURE__*/jsxRuntime.jsx(Container$
|
|
824
|
+
return /*#__PURE__*/jsxRuntime.jsx(Container$6, {
|
|
825
825
|
type: type,
|
|
826
826
|
children: children
|
|
827
827
|
});
|
|
@@ -901,6 +901,7 @@ const getColorFromState = state => {
|
|
|
901
901
|
case 'invalid':
|
|
902
902
|
return 'danger';
|
|
903
903
|
|
|
904
|
+
case 'valid':
|
|
904
905
|
default:
|
|
905
906
|
return 'black-light';
|
|
906
907
|
}
|
|
@@ -960,46 +961,87 @@ function InputField({
|
|
|
960
961
|
});
|
|
961
962
|
}
|
|
962
963
|
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
964
|
+
function getIconColor(state, disabled) {
|
|
965
|
+
if (disabled) return 'black-light';
|
|
966
|
+
|
|
967
|
+
switch (state) {
|
|
968
|
+
case 'invalid':
|
|
969
|
+
return 'danger';
|
|
970
|
+
|
|
971
|
+
case 'valid':
|
|
972
|
+
return 'success';
|
|
973
|
+
|
|
974
|
+
default:
|
|
975
|
+
return undefined;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
function InputIcon({
|
|
980
|
+
icon,
|
|
981
|
+
state,
|
|
982
|
+
disabled
|
|
983
|
+
}) {
|
|
984
|
+
const theme = /*#__PURE__*/styled.useTheme();
|
|
985
|
+
const color = getIconColor(state, disabled);
|
|
986
|
+
return /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
987
|
+
color: color,
|
|
988
|
+
icon: icon,
|
|
989
|
+
size: theme.kitt.forms.input.icon.size
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
function InputPressable({ ...props
|
|
994
|
+
}) {
|
|
995
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.Pressable, { ...props
|
|
996
|
+
});
|
|
997
|
+
}
|
|
974
998
|
|
|
975
999
|
const styledTextInputMixin = /*#__PURE__*/styled.css(["background-color:", ";border-width:", ";border-radius:", ";border-color:", ";font-size:", ";color:", ";font-family:", ";"], ({
|
|
976
1000
|
theme,
|
|
977
|
-
state
|
|
978
|
-
}) => state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states.default.backgroundColor, ({
|
|
1001
|
+
$state
|
|
1002
|
+
}) => $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states.default.backgroundColor, ({
|
|
979
1003
|
theme
|
|
980
1004
|
}) => theme.kitt.forms.input.borderWidth, ({
|
|
981
1005
|
theme
|
|
982
1006
|
}) => theme.kitt.forms.input.borderRadius, ({
|
|
983
1007
|
theme,
|
|
984
|
-
state
|
|
985
|
-
}) => theme.kitt.forms.input.states[state].borderColor, ({
|
|
1008
|
+
$state
|
|
1009
|
+
}) => theme.kitt.forms.input.states[$state].borderColor, ({
|
|
986
1010
|
theme
|
|
987
1011
|
}) => {
|
|
988
1012
|
const typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
989
1013
|
return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize;
|
|
990
1014
|
}, ({
|
|
991
1015
|
theme,
|
|
992
|
-
state
|
|
993
|
-
}) => theme.kitt.typography.colors[theme.kitt.forms.input.states[state].color], ({
|
|
1016
|
+
$state
|
|
1017
|
+
}) => theme.kitt.typography.colors[theme.kitt.forms.input.states[$state].color], ({
|
|
994
1018
|
theme
|
|
995
1019
|
}) => theme.kitt.typography.types.bodies.fontFamily.regular);
|
|
996
|
-
|
|
997
|
-
|
|
1020
|
+
|
|
1021
|
+
function getInputUIState({
|
|
1022
|
+
isFocused,
|
|
1023
|
+
isDisabled,
|
|
1024
|
+
formState
|
|
1025
|
+
}) {
|
|
1026
|
+
if (isDisabled) return 'disabled';
|
|
1027
|
+
if (isFocused) return 'focus';
|
|
1028
|
+
if (formState === 'invalid') return 'invalid';
|
|
1029
|
+
return 'default';
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
const StyledTextInput = /*#__PURE__*/styled__default(reactNative.TextInput).withConfig({
|
|
1033
|
+
displayName: "InputText__StyledTextInput",
|
|
998
1034
|
componentId: "kitt-universal__sc-uke279-0"
|
|
999
1035
|
})(["", " padding:", ";line-height:", ";min-height:", "px;"], styledTextInputMixin, ({
|
|
1000
1036
|
theme,
|
|
1001
1037
|
multiline
|
|
1002
|
-
}) =>
|
|
1038
|
+
}) => {
|
|
1039
|
+
if (!multiline && reactNative.Platform.OS === 'ios') {
|
|
1040
|
+
return theme.kitt.forms.input.padding.iOSSingleLine;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
return theme.kitt.forms.input.padding.default;
|
|
1044
|
+
}, ({
|
|
1003
1045
|
theme,
|
|
1004
1046
|
multiline
|
|
1005
1047
|
}) => {
|
|
@@ -1007,116 +1049,86 @@ const Input = /*#__PURE__*/styled__default(reactNative.TextInput).withConfig({
|
|
|
1007
1049
|
const typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
1008
1050
|
return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight;
|
|
1009
1051
|
}, ({
|
|
1010
|
-
minHeight
|
|
1011
|
-
}) => minHeight);
|
|
1012
|
-
const
|
|
1013
|
-
displayName: "
|
|
1052
|
+
$minHeight
|
|
1053
|
+
}) => $minHeight);
|
|
1054
|
+
const InputTextContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
1055
|
+
displayName: "InputText__InputTextContainer",
|
|
1014
1056
|
componentId: "kitt-universal__sc-uke279-1"
|
|
1015
|
-
})(["
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
theme
|
|
1019
|
-
}) => theme.kitt.forms.input.marginBottom);
|
|
1020
|
-
const PasswordButtonContainer = /*#__PURE__*/styled__default.Pressable.withConfig({
|
|
1021
|
-
displayName: "InputText__PasswordButtonContainer",
|
|
1057
|
+
})(["position:relative;"]);
|
|
1058
|
+
const RightInputContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
1059
|
+
displayName: "InputText__RightInputContainer",
|
|
1022
1060
|
componentId: "kitt-universal__sc-uke279-2"
|
|
1023
|
-
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:
|
|
1024
|
-
theme
|
|
1025
|
-
}) => theme.kitt.forms.input.passwordButtonIconSize / 2);
|
|
1026
|
-
|
|
1027
|
-
const getInputState = ({
|
|
1028
|
-
isDisabled,
|
|
1029
|
-
isFocused,
|
|
1030
|
-
formState
|
|
1031
|
-
}) => {
|
|
1032
|
-
if (isDisabled) return 'disabled';
|
|
1033
|
-
if (isFocused) return 'focus';
|
|
1034
|
-
if (formState === 'invalid') return 'invalid';
|
|
1035
|
-
return 'default';
|
|
1036
|
-
};
|
|
1037
|
-
|
|
1038
|
-
const keyboardTypeByTextInputType = {
|
|
1039
|
-
text: 'default',
|
|
1040
|
-
email: 'email-address',
|
|
1041
|
-
password: 'default',
|
|
1042
|
-
username: 'default'
|
|
1043
|
-
};
|
|
1044
|
-
const autoCompleteTypeByType = {
|
|
1045
|
-
text: 'off',
|
|
1046
|
-
email: 'email',
|
|
1047
|
-
password: 'password',
|
|
1048
|
-
username: 'name'
|
|
1049
|
-
};
|
|
1050
|
-
const autoCorrectByType = {
|
|
1051
|
-
text: true,
|
|
1052
|
-
email: false,
|
|
1053
|
-
password: false,
|
|
1054
|
-
username: false
|
|
1055
|
-
};
|
|
1056
|
-
const textContentTypeByType = {
|
|
1057
|
-
text: 'none',
|
|
1058
|
-
email: 'emailAddress',
|
|
1059
|
-
password: 'password',
|
|
1060
|
-
username: 'username'
|
|
1061
|
-
};
|
|
1061
|
+
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:10px;"]);
|
|
1062
1062
|
const InputText = /*#__PURE__*/react.forwardRef(({
|
|
1063
1063
|
id,
|
|
1064
|
+
right,
|
|
1064
1065
|
minHeight = 0,
|
|
1065
|
-
type,
|
|
1066
1066
|
state: formState,
|
|
1067
1067
|
internalForceState,
|
|
1068
1068
|
disabled = false,
|
|
1069
|
+
autoCorrect = true,
|
|
1070
|
+
textContentType = 'none',
|
|
1071
|
+
autoCompleteType = 'off',
|
|
1072
|
+
keyboardType = 'default',
|
|
1069
1073
|
onFocus,
|
|
1070
1074
|
onBlur,
|
|
1071
1075
|
...props
|
|
1072
1076
|
}, ref) => {
|
|
1073
|
-
const {
|
|
1074
|
-
isFocused,
|
|
1075
|
-
handleInputBlur,
|
|
1076
|
-
handleInputFocus,
|
|
1077
|
-
isPasswordVisible,
|
|
1078
|
-
togglePasswordVisibility
|
|
1079
|
-
} = useInputText();
|
|
1080
1077
|
const theme = /*#__PURE__*/styled.useTheme();
|
|
1081
|
-
const
|
|
1078
|
+
const [isFocused, setIsFocused] = react.useState(false);
|
|
1079
|
+
const state = internalForceState || getInputUIState({
|
|
1082
1080
|
isFocused,
|
|
1083
1081
|
isDisabled: disabled,
|
|
1084
1082
|
formState
|
|
1085
1083
|
});
|
|
1086
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
1087
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
1084
|
+
return /*#__PURE__*/jsxRuntime.jsxs(InputTextContainer, {
|
|
1085
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(StyledTextInput, {
|
|
1088
1086
|
ref: ref,
|
|
1089
1087
|
nativeID: id,
|
|
1090
1088
|
editable: !disabled,
|
|
1091
|
-
keyboardType:
|
|
1092
|
-
autoCompleteType:
|
|
1093
|
-
autoCorrect:
|
|
1094
|
-
minHeight: minHeight,
|
|
1095
|
-
textContentType:
|
|
1096
|
-
placeholderTextColor: theme.kitt.
|
|
1097
|
-
selectionColor: theme.kitt.forms.input.
|
|
1098
|
-
secureTextEntry: type === 'password' && !isPasswordVisible,
|
|
1089
|
+
keyboardType: keyboardType,
|
|
1090
|
+
autoCompleteType: autoCompleteType,
|
|
1091
|
+
autoCorrect: autoCorrect,
|
|
1092
|
+
$minHeight: minHeight,
|
|
1093
|
+
textContentType: textContentType,
|
|
1094
|
+
placeholderTextColor: theme.kitt.forms.input.color.placeholder,
|
|
1095
|
+
selectionColor: theme.kitt.forms.input.color.selection,
|
|
1099
1096
|
...props,
|
|
1100
|
-
state: state,
|
|
1097
|
+
$state: state,
|
|
1101
1098
|
onFocus: e => {
|
|
1102
|
-
|
|
1099
|
+
setIsFocused(true);
|
|
1103
1100
|
if (onFocus) onFocus(e);
|
|
1104
1101
|
},
|
|
1105
1102
|
onBlur: e => {
|
|
1106
|
-
|
|
1103
|
+
setIsFocused(false);
|
|
1107
1104
|
if (onBlur) onBlur(e);
|
|
1108
1105
|
}
|
|
1109
|
-
}),
|
|
1106
|
+
}), right ? /*#__PURE__*/jsxRuntime.jsx(RightInputContainer, {
|
|
1107
|
+
children: right
|
|
1108
|
+
}) : null]
|
|
1109
|
+
});
|
|
1110
|
+
});
|
|
1111
|
+
|
|
1112
|
+
function InputPassword({
|
|
1113
|
+
isPasswordDefaultVisible,
|
|
1114
|
+
right,
|
|
1115
|
+
...props
|
|
1116
|
+
}) {
|
|
1117
|
+
const [isVisible, setIsVisible] = react.useState(Boolean(isPasswordDefaultVisible));
|
|
1118
|
+
return /*#__PURE__*/jsxRuntime.jsx(InputText, { ...props,
|
|
1119
|
+
textContentType: "password",
|
|
1120
|
+
autoCompleteType: "password",
|
|
1121
|
+
autoCorrect: false,
|
|
1122
|
+
secureTextEntry: !isVisible,
|
|
1123
|
+
right: right || /*#__PURE__*/jsxRuntime.jsx(InputPressable, {
|
|
1110
1124
|
accessibilityRole: "button",
|
|
1111
|
-
onPress:
|
|
1112
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
1113
|
-
icon:
|
|
1114
|
-
size: theme.kitt.forms.input.passwordButtonIconSize,
|
|
1115
|
-
color: theme.kitt.forms.input.states[state].passwordButtonIconColor
|
|
1125
|
+
onPress: () => setIsVisible(prev => !prev),
|
|
1126
|
+
children: /*#__PURE__*/jsxRuntime.jsx(InputIcon, {
|
|
1127
|
+
icon: isVisible ? /*#__PURE__*/jsxRuntime.jsx(kittIcons.EyeOffIcon, {}) : /*#__PURE__*/jsxRuntime.jsx(kittIcons.EyeIcon, {})
|
|
1116
1128
|
})
|
|
1117
|
-
})
|
|
1129
|
+
})
|
|
1118
1130
|
});
|
|
1119
|
-
}
|
|
1131
|
+
}
|
|
1120
1132
|
|
|
1121
1133
|
function Label({
|
|
1122
1134
|
htmlFor,
|
|
@@ -1218,9 +1230,8 @@ function TextArea({ ...props
|
|
|
1218
1230
|
return /*#__PURE__*/jsxRuntime.jsx(InputText, {
|
|
1219
1231
|
multiline: true,
|
|
1220
1232
|
textAlignVertical: "top",
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
minHeight: theme.kitt.forms.input.textAreaMinHeight
|
|
1233
|
+
minHeight: theme.kitt.forms.textArea.minHeight,
|
|
1234
|
+
...props
|
|
1224
1235
|
});
|
|
1225
1236
|
}
|
|
1226
1237
|
|
|
@@ -1414,18 +1425,23 @@ const PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/react$1.styled("di
|
|
|
1414
1425
|
class: "p1nlccvg",
|
|
1415
1426
|
vars: {
|
|
1416
1427
|
"p1nlccvg-0": [({
|
|
1417
|
-
theme
|
|
1418
|
-
|
|
1428
|
+
theme,
|
|
1429
|
+
$isDisabled
|
|
1430
|
+
}) => $isDisabled ? 1 : theme.kitt.iconButton.scale.base.hover],
|
|
1419
1431
|
"p1nlccvg-2": [({
|
|
1420
|
-
theme
|
|
1421
|
-
|
|
1432
|
+
theme,
|
|
1433
|
+
$isDisabled
|
|
1434
|
+
}) => $isDisabled ? 1 : theme.kitt.iconButton.scale.medium.hover],
|
|
1422
1435
|
"p1nlccvg-3": [({
|
|
1423
|
-
theme
|
|
1424
|
-
|
|
1436
|
+
theme,
|
|
1437
|
+
$isDisabled
|
|
1438
|
+
}) => $isDisabled ? 1 : theme.kitt.iconButton.scale.base.active],
|
|
1425
1439
|
"p1nlccvg-4": [({
|
|
1426
1440
|
theme,
|
|
1427
|
-
$isWhite
|
|
1441
|
+
$isWhite,
|
|
1442
|
+
$isDisabled
|
|
1428
1443
|
}) => {
|
|
1444
|
+
if ($isDisabled) return theme.kitt.iconButton.disabled.backgroundColor;
|
|
1429
1445
|
const {
|
|
1430
1446
|
white,
|
|
1431
1447
|
default: defaultIconButton
|
|
@@ -1472,12 +1488,15 @@ const StyledPressableIconButton = /*#__PURE__*/styled__default.Pressable.withCon
|
|
|
1472
1488
|
});
|
|
1473
1489
|
function PressableIconButton({
|
|
1474
1490
|
color,
|
|
1491
|
+
disabled,
|
|
1475
1492
|
...props
|
|
1476
1493
|
}) {
|
|
1477
1494
|
return /*#__PURE__*/jsxRuntime.jsx(StyleWebWrapper, {
|
|
1478
1495
|
as: PressableIconButtonWebWrapper,
|
|
1479
1496
|
$isWhite: color === 'white',
|
|
1480
|
-
|
|
1497
|
+
$isDisabled: Boolean(disabled),
|
|
1498
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledPressableIconButton, { ...props,
|
|
1499
|
+
disabled: disabled
|
|
1481
1500
|
})
|
|
1482
1501
|
});
|
|
1483
1502
|
}
|
|
@@ -1510,6 +1529,9 @@ const AnimatedViewContainer = /*#__PURE__*/styled__default(Animated__default.Vie
|
|
|
1510
1529
|
function PressableAnimatedContainer({
|
|
1511
1530
|
disabled,
|
|
1512
1531
|
color = 'black',
|
|
1532
|
+
testID,
|
|
1533
|
+
accessibilityRole = 'button',
|
|
1534
|
+
accessibilityLabel,
|
|
1513
1535
|
children,
|
|
1514
1536
|
onPress
|
|
1515
1537
|
}) {
|
|
@@ -1528,7 +1550,7 @@ function PressableAnimatedContainer({
|
|
|
1528
1550
|
};
|
|
1529
1551
|
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1530
1552
|
_f.__workletHash = 10645190329247;
|
|
1531
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (
|
|
1553
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (60:41)";
|
|
1532
1554
|
_f.__optimalization = 2;
|
|
1533
1555
|
|
|
1534
1556
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1562,7 +1584,7 @@ function PressableAnimatedContainer({
|
|
|
1562
1584
|
};
|
|
1563
1585
|
_f.asString = "function _f(){const{withSpring,pressed,theme}=jsThis._closure;{return{transform:[{scale:withSpring(pressed.value?theme.kitt.iconButton.scale.base.active:theme.kitt.iconButton.scale.base.default)}]};}}";
|
|
1564
1586
|
_f.__workletHash = 13861998831411;
|
|
1565
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (
|
|
1587
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (66:39)";
|
|
1566
1588
|
_f.__optimalization = 2;
|
|
1567
1589
|
|
|
1568
1590
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1570,9 +1592,11 @@ function PressableAnimatedContainer({
|
|
|
1570
1592
|
return _f;
|
|
1571
1593
|
}());
|
|
1572
1594
|
return /*#__PURE__*/jsxRuntime.jsx(PressableIconButton, {
|
|
1573
|
-
accessibilityRole:
|
|
1595
|
+
accessibilityRole: accessibilityRole,
|
|
1574
1596
|
disabled: disabled,
|
|
1575
1597
|
color: color,
|
|
1598
|
+
testID: testID,
|
|
1599
|
+
accessibilityLabel: accessibilityLabel,
|
|
1576
1600
|
onPress: onPress,
|
|
1577
1601
|
onPressIn: () => {
|
|
1578
1602
|
pressed.value = true;
|
|
@@ -1631,11 +1655,17 @@ function IconButton({
|
|
|
1631
1655
|
icon,
|
|
1632
1656
|
color,
|
|
1633
1657
|
disabled,
|
|
1658
|
+
testID,
|
|
1659
|
+
accessibilityLabel,
|
|
1660
|
+
accessibilityRole,
|
|
1634
1661
|
onPress
|
|
1635
1662
|
}) {
|
|
1636
1663
|
return /*#__PURE__*/jsxRuntime.jsx(PressableAnimatedContainer, {
|
|
1637
1664
|
color: color,
|
|
1638
1665
|
disabled: disabled,
|
|
1666
|
+
testID: testID,
|
|
1667
|
+
accessibilityLabel: accessibilityLabel,
|
|
1668
|
+
accessibilityRole: accessibilityRole,
|
|
1639
1669
|
onPress: onPress,
|
|
1640
1670
|
children: /*#__PURE__*/jsxRuntime.jsx(IconButtonContent, {
|
|
1641
1671
|
disabled: disabled,
|
|
@@ -2744,54 +2774,133 @@ const feedbackMessageLateOceanTheme = {
|
|
|
2744
2774
|
}
|
|
2745
2775
|
};
|
|
2746
2776
|
|
|
2747
|
-
const
|
|
2748
|
-
|
|
2749
|
-
|
|
2777
|
+
const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
|
|
2778
|
+
const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
|
|
2779
|
+
baseAndSmall: {
|
|
2780
|
+
fontSize: `${baseAndSmallFontSize}px`,
|
|
2781
|
+
lineHeight: `${calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)}px`
|
|
2782
|
+
},
|
|
2783
|
+
mediumAndWide: {
|
|
2784
|
+
fontSize: `${mediumAndWideFontSize}px`,
|
|
2785
|
+
lineHeight: `${calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)}px`
|
|
2786
|
+
}
|
|
2787
|
+
});
|
|
2788
|
+
const typographyLateOceanTheme = {
|
|
2789
|
+
colors: {
|
|
2790
|
+
black: lateOceanColorPalette.black1000,
|
|
2791
|
+
'black-light': lateOceanColorPalette.black555,
|
|
2792
|
+
white: lateOceanColorPalette.white,
|
|
2793
|
+
'white-light': lateOceanColorPalette.white,
|
|
2794
|
+
primary: lateOceanColorPalette.lateOcean,
|
|
2795
|
+
'primary-light': lateOceanColorPalette.lateOceanLight1,
|
|
2796
|
+
accent: lateOceanColorPalette.warmEmbrace,
|
|
2797
|
+
success: lateOceanColorPalette.viride,
|
|
2798
|
+
danger: lateOceanColorPalette.englishVermillon
|
|
2799
|
+
},
|
|
2800
|
+
types: {
|
|
2801
|
+
headers: {
|
|
2802
|
+
fontFamily: {
|
|
2803
|
+
regular: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold',
|
|
2804
|
+
bold: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
2805
|
+
},
|
|
2806
|
+
fontWeight: 400,
|
|
2807
|
+
fontStyle: 'normal',
|
|
2808
|
+
configs: {
|
|
2809
|
+
// also known as xxlarge
|
|
2810
|
+
header1: createTypographyTypeConfig(1.3, 38, 62),
|
|
2811
|
+
// also known as xlarge
|
|
2812
|
+
header2: createTypographyTypeConfig(1.3, 32, 48),
|
|
2813
|
+
// also known as medium
|
|
2814
|
+
header3: createTypographyTypeConfig(1.3, 24, 36),
|
|
2815
|
+
// also known as xsmall
|
|
2816
|
+
header4: createTypographyTypeConfig(1.3, 18, 24),
|
|
2817
|
+
// also known as xxsmall
|
|
2818
|
+
header5: createTypographyTypeConfig(1.3, 18, 18)
|
|
2819
|
+
}
|
|
2820
|
+
},
|
|
2821
|
+
bodies: {
|
|
2822
|
+
fontFamily: {
|
|
2823
|
+
regular: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans',
|
|
2824
|
+
bold: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold'
|
|
2825
|
+
},
|
|
2826
|
+
fontWeight: {
|
|
2827
|
+
regular: 400,
|
|
2828
|
+
bold: 700
|
|
2829
|
+
},
|
|
2830
|
+
fontStyle: {
|
|
2831
|
+
regular: 'normal',
|
|
2832
|
+
bold: 'normal'
|
|
2833
|
+
},
|
|
2834
|
+
configs: {
|
|
2835
|
+
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
2836
|
+
'body-medium': createTypographyTypeConfig(1.6, 18, 18),
|
|
2837
|
+
body: createTypographyTypeConfig(1.6, 16, 16),
|
|
2838
|
+
'body-small': createTypographyTypeConfig(1.6, 14, 14),
|
|
2839
|
+
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
},
|
|
2843
|
+
link: {
|
|
2844
|
+
disabledColor: lateOceanColorPalette.black200
|
|
2845
|
+
}
|
|
2750
2846
|
};
|
|
2751
2847
|
|
|
2752
2848
|
const inputStatesStyle = {
|
|
2753
2849
|
default: {
|
|
2754
|
-
backgroundColor:
|
|
2850
|
+
backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
|
|
2851
|
+
borderColor: colorsLateOceanTheme.separator,
|
|
2852
|
+
color: 'black'
|
|
2853
|
+
},
|
|
2854
|
+
pending: {
|
|
2855
|
+
backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
|
|
2856
|
+
borderColor: colorsLateOceanTheme.separator,
|
|
2857
|
+
color: 'black'
|
|
2858
|
+
},
|
|
2859
|
+
valid: {
|
|
2860
|
+
backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
|
|
2755
2861
|
borderColor: lateOceanColorPalette.black100,
|
|
2756
|
-
color: 'black'
|
|
2757
|
-
passwordButtonIconColor: 'black'
|
|
2862
|
+
color: 'black'
|
|
2758
2863
|
},
|
|
2759
2864
|
hover: {
|
|
2760
2865
|
borderColor: lateOceanColorPalette.black200,
|
|
2761
|
-
color: 'black'
|
|
2762
|
-
passwordButtonIconColor: 'black'
|
|
2866
|
+
color: 'black'
|
|
2763
2867
|
},
|
|
2764
2868
|
focus: {
|
|
2765
|
-
borderColor:
|
|
2766
|
-
color: 'black'
|
|
2767
|
-
passwordButtonIconColor: 'black'
|
|
2869
|
+
borderColor: colorsLateOceanTheme.primary,
|
|
2870
|
+
color: 'black'
|
|
2768
2871
|
},
|
|
2769
2872
|
disabled: {
|
|
2770
|
-
backgroundColor:
|
|
2771
|
-
borderColor:
|
|
2772
|
-
color: 'black-light'
|
|
2773
|
-
passwordButtonIconColor: 'black-light'
|
|
2873
|
+
backgroundColor: colorsLateOceanTheme.disabled,
|
|
2874
|
+
borderColor: colorsLateOceanTheme.separator,
|
|
2875
|
+
color: 'black-light'
|
|
2774
2876
|
},
|
|
2775
2877
|
invalid: {
|
|
2776
|
-
borderColor:
|
|
2777
|
-
color: 'black'
|
|
2778
|
-
passwordButtonIconColor: 'black'
|
|
2878
|
+
borderColor: colorsLateOceanTheme.danger,
|
|
2879
|
+
color: 'black'
|
|
2779
2880
|
}
|
|
2780
2881
|
};
|
|
2781
|
-
const
|
|
2782
|
-
|
|
2783
|
-
|
|
2882
|
+
const input = {
|
|
2883
|
+
color: {
|
|
2884
|
+
selection: colorsLateOceanTheme.primary,
|
|
2885
|
+
placeholder: typographyLateOceanTheme.colors['black-light']
|
|
2886
|
+
},
|
|
2784
2887
|
borderWidth: '2px',
|
|
2785
2888
|
borderRadius: '10px',
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2889
|
+
icon: {
|
|
2890
|
+
size: 20
|
|
2891
|
+
},
|
|
2892
|
+
padding: {
|
|
2893
|
+
default: '7px 16px',
|
|
2894
|
+
iOSSingleLine: '12px 16px'
|
|
2895
|
+
},
|
|
2792
2896
|
states: inputStatesStyle
|
|
2793
2897
|
};
|
|
2794
2898
|
|
|
2899
|
+
const inputFieldLateOceanTheme = {
|
|
2900
|
+
labelContainerPaddingBottom: 5,
|
|
2901
|
+
iconMarginLeft: 6
|
|
2902
|
+
};
|
|
2903
|
+
|
|
2795
2904
|
const radioLateOceanTheme = {
|
|
2796
2905
|
size: 18,
|
|
2797
2906
|
unchecked: {
|
|
@@ -2810,10 +2919,15 @@ const radioLateOceanTheme = {
|
|
|
2810
2919
|
}
|
|
2811
2920
|
};
|
|
2812
2921
|
|
|
2813
|
-
const
|
|
2814
|
-
|
|
2922
|
+
const textArea = {
|
|
2923
|
+
minHeight: 120
|
|
2924
|
+
};
|
|
2925
|
+
|
|
2926
|
+
const forms = {
|
|
2927
|
+
input,
|
|
2815
2928
|
radio: radioLateOceanTheme,
|
|
2816
|
-
inputField: inputFieldLateOceanTheme
|
|
2929
|
+
inputField: inputFieldLateOceanTheme,
|
|
2930
|
+
textArea
|
|
2817
2931
|
};
|
|
2818
2932
|
|
|
2819
2933
|
const fullScreenModalLateOceanTheme = {
|
|
@@ -2926,77 +3040,6 @@ const tooltip = {
|
|
|
2926
3040
|
floatingPadding: 8
|
|
2927
3041
|
};
|
|
2928
3042
|
|
|
2929
|
-
const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
|
|
2930
|
-
const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
|
|
2931
|
-
baseAndSmall: {
|
|
2932
|
-
fontSize: `${baseAndSmallFontSize}px`,
|
|
2933
|
-
lineHeight: `${calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)}px`
|
|
2934
|
-
},
|
|
2935
|
-
mediumAndWide: {
|
|
2936
|
-
fontSize: `${mediumAndWideFontSize}px`,
|
|
2937
|
-
lineHeight: `${calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)}px`
|
|
2938
|
-
}
|
|
2939
|
-
});
|
|
2940
|
-
const typographyLateOceanTheme = {
|
|
2941
|
-
colors: {
|
|
2942
|
-
black: lateOceanColorPalette.black1000,
|
|
2943
|
-
'black-light': lateOceanColorPalette.black555,
|
|
2944
|
-
white: lateOceanColorPalette.white,
|
|
2945
|
-
'white-light': lateOceanColorPalette.white,
|
|
2946
|
-
primary: lateOceanColorPalette.lateOcean,
|
|
2947
|
-
'primary-light': lateOceanColorPalette.lateOceanLight1,
|
|
2948
|
-
accent: lateOceanColorPalette.warmEmbrace,
|
|
2949
|
-
success: lateOceanColorPalette.viride,
|
|
2950
|
-
danger: lateOceanColorPalette.englishVermillon
|
|
2951
|
-
},
|
|
2952
|
-
types: {
|
|
2953
|
-
headers: {
|
|
2954
|
-
fontFamily: {
|
|
2955
|
-
regular: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold',
|
|
2956
|
-
bold: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
2957
|
-
},
|
|
2958
|
-
fontWeight: 400,
|
|
2959
|
-
fontStyle: 'normal',
|
|
2960
|
-
configs: {
|
|
2961
|
-
// also known as xxlarge
|
|
2962
|
-
header1: createTypographyTypeConfig(1.3, 38, 62),
|
|
2963
|
-
// also known as xlarge
|
|
2964
|
-
header2: createTypographyTypeConfig(1.3, 32, 48),
|
|
2965
|
-
// also known as medium
|
|
2966
|
-
header3: createTypographyTypeConfig(1.3, 24, 36),
|
|
2967
|
-
// also known as xsmall
|
|
2968
|
-
header4: createTypographyTypeConfig(1.3, 18, 24),
|
|
2969
|
-
// also known as xxsmall
|
|
2970
|
-
header5: createTypographyTypeConfig(1.3, 18, 18)
|
|
2971
|
-
}
|
|
2972
|
-
},
|
|
2973
|
-
bodies: {
|
|
2974
|
-
fontFamily: {
|
|
2975
|
-
regular: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans',
|
|
2976
|
-
bold: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold'
|
|
2977
|
-
},
|
|
2978
|
-
fontWeight: {
|
|
2979
|
-
regular: 400,
|
|
2980
|
-
bold: 700
|
|
2981
|
-
},
|
|
2982
|
-
fontStyle: {
|
|
2983
|
-
regular: 'normal',
|
|
2984
|
-
bold: 'normal'
|
|
2985
|
-
},
|
|
2986
|
-
configs: {
|
|
2987
|
-
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
2988
|
-
'body-medium': createTypographyTypeConfig(1.6, 18, 18),
|
|
2989
|
-
body: createTypographyTypeConfig(1.6, 16, 16),
|
|
2990
|
-
'body-small': createTypographyTypeConfig(1.6, 14, 14),
|
|
2991
|
-
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
2992
|
-
}
|
|
2993
|
-
}
|
|
2994
|
-
},
|
|
2995
|
-
link: {
|
|
2996
|
-
disabledColor: lateOceanColorPalette.black200
|
|
2997
|
-
}
|
|
2998
|
-
};
|
|
2999
|
-
|
|
3000
3043
|
const breakpoints = {
|
|
3001
3044
|
values: {
|
|
3002
3045
|
base: 0,
|
|
@@ -3030,7 +3073,7 @@ const theme = {
|
|
|
3030
3073
|
button: buttonLateOceanTheme,
|
|
3031
3074
|
card: cardLateOceanTheme,
|
|
3032
3075
|
feedbackMessage: feedbackMessageLateOceanTheme,
|
|
3033
|
-
forms
|
|
3076
|
+
forms,
|
|
3034
3077
|
typography: typographyLateOceanTheme,
|
|
3035
3078
|
tag: tagLateOceanTheme,
|
|
3036
3079
|
shadows: shadowsLateOceanTheme,
|
|
@@ -3161,7 +3204,7 @@ function TimePicker({
|
|
|
3161
3204
|
isTimePickerModalVisible
|
|
3162
3205
|
} = useTimePicker(value || null, onChange, onBlur, disabled, forceDefaultValue);
|
|
3163
3206
|
return /*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
3164
|
-
state: timePickerState === 'default' ? state : timePickerState,
|
|
3207
|
+
$state: timePickerState === 'default' ? state : timePickerState,
|
|
3165
3208
|
accessibilityRole: "button",
|
|
3166
3209
|
onPress: handleInputPress,
|
|
3167
3210
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
@@ -3573,6 +3616,9 @@ exports.Icon = Icon;
|
|
|
3573
3616
|
exports.IconButton = IconButton;
|
|
3574
3617
|
exports.InputFeedback = InputFeedback;
|
|
3575
3618
|
exports.InputField = InputField;
|
|
3619
|
+
exports.InputIcon = InputIcon;
|
|
3620
|
+
exports.InputPassword = InputPassword;
|
|
3621
|
+
exports.InputPressable = InputPressable;
|
|
3576
3622
|
exports.InputText = InputText;
|
|
3577
3623
|
exports.KittBreakpoints = KittBreakpoints;
|
|
3578
3624
|
exports.KittBreakpointsMax = KittBreakpointsMax;
|