@ornikar/kitt-universal 3.9.0 → 4.2.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/BaseMessage/BaseMessage.d.ts +16 -0
- package/dist/definitions/BaseMessage/BaseMessage.d.ts.map +1 -0
- package/dist/definitions/BaseMessage/IconContent.d.ts +10 -0
- package/dist/definitions/BaseMessage/IconContent.d.ts.map +1 -0
- package/dist/definitions/BaseMessage/helper.d.ts +6 -0
- package/dist/definitions/BaseMessage/helper.d.ts.map +1 -0
- 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/Message/Message.d.ts +4 -12
- package/dist/definitions/Message/Message.d.ts.map +1 -1
- package/dist/definitions/Notification/Notification.d.ts +8 -8
- package/dist/definitions/Notification/Notification.d.ts.map +1 -1
- package/dist/definitions/Skeleton/Skeleton.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/Tooltip/TooltipView.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 +6 -22
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/{buttonLateOceanTheme.d.ts → button.d.ts} +2 -2
- package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -0
- package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts +2 -0
- package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/feedbackMessage.d.ts +11 -0
- package/dist/definitions/themes/late-ocean/feedbackMessage.d.ts.map +1 -0
- 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 +500 -435
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +500 -435
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +500 -435
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +508 -447
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +430 -346
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +421 -342
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +140 -119
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +140 -119
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +140 -119
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +140 -119
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +136 -115
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +136 -115
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -3
- 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/buttonLateOceanTheme.d.ts.map +0 -1
- package/dist/definitions/themes/late-ocean/feedbackMessageLateOceanTheme.d.ts +0 -9
- package/dist/definitions/themes/late-ocean/feedbackMessageLateOceanTheme.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
|
@@ -57,7 +57,7 @@ function SpinningIcon({
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
const IconContainer
|
|
60
|
+
const IconContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
61
61
|
displayName: "Icon__IconContainer",
|
|
62
62
|
componentId: "kitt-universal__sc-usm0ol-0"
|
|
63
63
|
})(["color:", ";width:", "px;height:", "px;align-self:", ";"], ({
|
|
@@ -79,7 +79,7 @@ function Icon({
|
|
|
79
79
|
const clonedIcon = /*#__PURE__*/react.cloneElement(icon, {
|
|
80
80
|
color
|
|
81
81
|
});
|
|
82
|
-
return /*#__PURE__*/jsxRuntime.jsx(IconContainer
|
|
82
|
+
return /*#__PURE__*/jsxRuntime.jsx(IconContainer, {
|
|
83
83
|
align: align,
|
|
84
84
|
size: size,
|
|
85
85
|
color: color,
|
|
@@ -612,7 +612,7 @@ const StyledButtonText = /*#__PURE__*/styled__default(Typography.Text).withConfi
|
|
|
612
612
|
if (reactNative.Platform.OS !== 'web' || $isDisabled || !isSubtle($type)) return undefined;
|
|
613
613
|
return 'color: inherit';
|
|
614
614
|
});
|
|
615
|
-
const StyledIconContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
615
|
+
const StyledIconContainer$1 = /*#__PURE__*/styled__default.View.withConfig({
|
|
616
616
|
displayName: "ButtonContent__StyledIconContainer",
|
|
617
617
|
componentId: "kitt-universal__sc-dnyw3n-1"
|
|
618
618
|
})(["", ""], ({
|
|
@@ -635,7 +635,7 @@ function ButtonIcon({
|
|
|
635
635
|
iconPosition,
|
|
636
636
|
testID
|
|
637
637
|
}) {
|
|
638
|
-
return /*#__PURE__*/jsxRuntime.jsx(StyledIconContainer, {
|
|
638
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledIconContainer$1, {
|
|
639
639
|
$iconPosition: iconPosition,
|
|
640
640
|
children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
641
641
|
icon: icon,
|
|
@@ -801,7 +801,7 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
801
801
|
});
|
|
802
802
|
});
|
|
803
803
|
|
|
804
|
-
const Container$
|
|
804
|
+
const Container$5 = /*#__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$5, {
|
|
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,
|
|
@@ -1173,7 +1185,7 @@ const SelectedInnerRadio = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
1173
1185
|
}) => theme.kitt.forms.radio.checked.innerSize, ({
|
|
1174
1186
|
theme
|
|
1175
1187
|
}) => theme.kitt.forms.radio.checked.innerSize / 2);
|
|
1176
|
-
const Container$
|
|
1188
|
+
const Container$4 = /*#__PURE__*/styled__default.Pressable.withConfig({
|
|
1177
1189
|
displayName: "Radio__Container",
|
|
1178
1190
|
componentId: "kitt-universal__sc-1mdgr2o-3"
|
|
1179
1191
|
})(["flex-direction:row;align-items:center;"]);
|
|
@@ -1191,7 +1203,7 @@ function Radio({
|
|
|
1191
1203
|
disabled = false,
|
|
1192
1204
|
children
|
|
1193
1205
|
}) {
|
|
1194
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Container$
|
|
1206
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Container$4, {
|
|
1195
1207
|
nativeID: id,
|
|
1196
1208
|
disabled: disabled,
|
|
1197
1209
|
accessibilityRole: "radio",
|
|
@@ -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
|
|
|
@@ -1359,7 +1370,7 @@ function FullScreenModalHeader({
|
|
|
1359
1370
|
});
|
|
1360
1371
|
}
|
|
1361
1372
|
|
|
1362
|
-
const Container$
|
|
1373
|
+
const Container$3 = /*#__PURE__*/styled__default.View.withConfig({
|
|
1363
1374
|
displayName: "FullScreenModal__Container",
|
|
1364
1375
|
componentId: "kitt-universal__sc-11qpbe3-0"
|
|
1365
1376
|
})(["flex:1;background-color:", ";"], ({
|
|
@@ -1368,7 +1379,7 @@ const Container$4 = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
1368
1379
|
function FullScreenModal({
|
|
1369
1380
|
children
|
|
1370
1381
|
}) {
|
|
1371
|
-
return /*#__PURE__*/jsxRuntime.jsx(Container$
|
|
1382
|
+
return /*#__PURE__*/jsxRuntime.jsx(Container$3, {
|
|
1372
1383
|
children: children
|
|
1373
1384
|
});
|
|
1374
1385
|
}
|
|
@@ -1518,6 +1529,9 @@ const AnimatedViewContainer = /*#__PURE__*/styled__default(Animated__default.Vie
|
|
|
1518
1529
|
function PressableAnimatedContainer({
|
|
1519
1530
|
disabled,
|
|
1520
1531
|
color = 'black',
|
|
1532
|
+
testID,
|
|
1533
|
+
accessibilityRole = 'button',
|
|
1534
|
+
accessibilityLabel,
|
|
1521
1535
|
children,
|
|
1522
1536
|
onPress
|
|
1523
1537
|
}) {
|
|
@@ -1536,7 +1550,7 @@ function PressableAnimatedContainer({
|
|
|
1536
1550
|
};
|
|
1537
1551
|
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1538
1552
|
_f.__workletHash = 10645190329247;
|
|
1539
|
-
_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)";
|
|
1540
1554
|
_f.__optimalization = 2;
|
|
1541
1555
|
|
|
1542
1556
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1570,7 +1584,7 @@ function PressableAnimatedContainer({
|
|
|
1570
1584
|
};
|
|
1571
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)}]};}}";
|
|
1572
1586
|
_f.__workletHash = 13861998831411;
|
|
1573
|
-
_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)";
|
|
1574
1588
|
_f.__optimalization = 2;
|
|
1575
1589
|
|
|
1576
1590
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1578,9 +1592,11 @@ function PressableAnimatedContainer({
|
|
|
1578
1592
|
return _f;
|
|
1579
1593
|
}());
|
|
1580
1594
|
return /*#__PURE__*/jsxRuntime.jsx(PressableIconButton, {
|
|
1581
|
-
accessibilityRole:
|
|
1595
|
+
accessibilityRole: accessibilityRole,
|
|
1582
1596
|
disabled: disabled,
|
|
1583
1597
|
color: color,
|
|
1598
|
+
testID: testID,
|
|
1599
|
+
accessibilityLabel: accessibilityLabel,
|
|
1584
1600
|
onPress: onPress,
|
|
1585
1601
|
onPressIn: () => {
|
|
1586
1602
|
pressed.value = true;
|
|
@@ -1639,11 +1655,17 @@ function IconButton({
|
|
|
1639
1655
|
icon,
|
|
1640
1656
|
color,
|
|
1641
1657
|
disabled,
|
|
1658
|
+
testID,
|
|
1659
|
+
accessibilityLabel,
|
|
1660
|
+
accessibilityRole,
|
|
1642
1661
|
onPress
|
|
1643
1662
|
}) {
|
|
1644
1663
|
return /*#__PURE__*/jsxRuntime.jsx(PressableAnimatedContainer, {
|
|
1645
1664
|
color: color,
|
|
1646
1665
|
disabled: disabled,
|
|
1666
|
+
testID: testID,
|
|
1667
|
+
accessibilityLabel: accessibilityLabel,
|
|
1668
|
+
accessibilityRole: accessibilityRole,
|
|
1647
1669
|
onPress: onPress,
|
|
1648
1670
|
children: /*#__PURE__*/jsxRuntime.jsx(IconButtonContent, {
|
|
1649
1671
|
disabled: disabled,
|
|
@@ -1802,47 +1824,32 @@ function LargeLoader({
|
|
|
1802
1824
|
});
|
|
1803
1825
|
}
|
|
1804
1826
|
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
})
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
})
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
}) => theme.kitt.spacing * 4, ({
|
|
1832
|
-
theme
|
|
1833
|
-
}) => theme.kitt.spacing);
|
|
1834
|
-
const IconContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
1835
|
-
displayName: "Message__IconContainer",
|
|
1836
|
-
componentId: "kitt-universal__sc-c6400e-2"
|
|
1837
|
-
})(["margin-right:", "px;"], ({
|
|
1838
|
-
theme
|
|
1839
|
-
}) => theme.kitt.spacing * 4);
|
|
1840
|
-
const Content = /*#__PURE__*/styled__default.Text.withConfig({
|
|
1841
|
-
displayName: "Message__Content",
|
|
1842
|
-
componentId: "kitt-universal__sc-c6400e-3"
|
|
1843
|
-
})(["text-align:", ";flex:1;"], ({
|
|
1844
|
-
centeredText
|
|
1845
|
-
}) => centeredText ? 'center' : 'left');
|
|
1827
|
+
function IconContent({
|
|
1828
|
+
type,
|
|
1829
|
+
color
|
|
1830
|
+
}) {
|
|
1831
|
+
switch (type) {
|
|
1832
|
+
case 'warning':
|
|
1833
|
+
return /*#__PURE__*/jsxRuntime.jsx(kittIcons.AlertCircleIcon, {
|
|
1834
|
+
color: color
|
|
1835
|
+
});
|
|
1836
|
+
|
|
1837
|
+
case 'success':
|
|
1838
|
+
return /*#__PURE__*/jsxRuntime.jsx(kittIcons.CheckIcon, {
|
|
1839
|
+
color: color
|
|
1840
|
+
});
|
|
1841
|
+
|
|
1842
|
+
case 'danger':
|
|
1843
|
+
return /*#__PURE__*/jsxRuntime.jsx(kittIcons.AlertTriangleIcon, {
|
|
1844
|
+
color: color
|
|
1845
|
+
});
|
|
1846
|
+
|
|
1847
|
+
default:
|
|
1848
|
+
return /*#__PURE__*/jsxRuntime.jsx(kittIcons.InfoIcon, {
|
|
1849
|
+
color: color
|
|
1850
|
+
});
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1846
1853
|
|
|
1847
1854
|
const getColorByType = type => {
|
|
1848
1855
|
switch (type) {
|
|
@@ -1857,61 +1864,125 @@ const getColorByType = type => {
|
|
|
1857
1864
|
return 'black';
|
|
1858
1865
|
}
|
|
1859
1866
|
};
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
switch (type) {
|
|
1863
|
-
case 'warning':
|
|
1864
|
-
return /*#__PURE__*/jsxRuntime.jsx(kittIcons.AlertCircleIcon, {});
|
|
1865
|
-
|
|
1867
|
+
const getIconButtonColor = messageType => {
|
|
1868
|
+
switch (messageType) {
|
|
1866
1869
|
case 'success':
|
|
1867
|
-
return /*#__PURE__*/jsxRuntime.jsx(kittIcons.CheckIcon, {});
|
|
1868
|
-
|
|
1869
1870
|
case 'danger':
|
|
1870
|
-
return
|
|
1871
|
+
return 'white';
|
|
1871
1872
|
|
|
1873
|
+
case 'warning':
|
|
1872
1874
|
default:
|
|
1873
|
-
return
|
|
1875
|
+
return 'black';
|
|
1874
1876
|
}
|
|
1875
|
-
}
|
|
1877
|
+
};
|
|
1876
1878
|
|
|
1877
|
-
|
|
1879
|
+
const StyledMessageContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
1880
|
+
displayName: "BaseMessage__StyledMessageContainer",
|
|
1881
|
+
componentId: "kitt-universal__sc-eepeiz-0"
|
|
1882
|
+
})(["flex-direction:row;align-items:flex-start;justify-content:space-between;min-height:60px;padding-top:", "px;border-radius:", "px;background-color:", ";"], ({
|
|
1883
|
+
$insets
|
|
1884
|
+
}) => $insets?.top ?? 0, ({
|
|
1885
|
+
theme,
|
|
1886
|
+
$hasNoRadius
|
|
1887
|
+
}) => $hasNoRadius ? 0 : theme.kitt.spacing * 5, ({
|
|
1888
|
+
theme,
|
|
1889
|
+
$type
|
|
1890
|
+
}) => theme.kitt.feedbackMessage[$type].backgroundColor);
|
|
1891
|
+
const StyledDismissWrapper = /*#__PURE__*/styled__default.View.withConfig({
|
|
1892
|
+
displayName: "BaseMessage__StyledDismissWrapper",
|
|
1893
|
+
componentId: "kitt-universal__sc-eepeiz-1"
|
|
1894
|
+
})(["align-items:center;align-items:flex-start;margin:", ";"], ({
|
|
1895
|
+
theme
|
|
1896
|
+
}) => {
|
|
1897
|
+
const {
|
|
1898
|
+
spacing
|
|
1899
|
+
} = theme.kitt;
|
|
1900
|
+
return `${spacing * 2.5}px ${spacing * 2}px 0 ${spacing * 5}px`;
|
|
1901
|
+
});
|
|
1902
|
+
const StyledIconContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
1903
|
+
displayName: "BaseMessage__StyledIconContainer",
|
|
1904
|
+
componentId: "kitt-universal__sc-eepeiz-2"
|
|
1905
|
+
})(["margin:", ";"], ({
|
|
1906
|
+
theme
|
|
1907
|
+
}) => {
|
|
1908
|
+
const {
|
|
1909
|
+
spacing
|
|
1910
|
+
} = theme.kitt;
|
|
1911
|
+
return `${spacing}px ${spacing * 5}px 0 0`;
|
|
1912
|
+
});
|
|
1913
|
+
const StyledTextContent = /*#__PURE__*/styled__default(Typography.Text).withConfig({
|
|
1914
|
+
displayName: "BaseMessage__StyledTextContent",
|
|
1915
|
+
componentId: "kitt-universal__sc-eepeiz-3"
|
|
1916
|
+
})(["flex:1;text-align:", ";"], ({
|
|
1917
|
+
$isCenteredText
|
|
1918
|
+
}) => $isCenteredText ? 'center' : 'left');
|
|
1919
|
+
const StyledMessageContent = /*#__PURE__*/styled__default.View.withConfig({
|
|
1920
|
+
displayName: "BaseMessage__StyledMessageContent",
|
|
1921
|
+
componentId: "kitt-universal__sc-eepeiz-4"
|
|
1922
|
+
})(["display:flex;flex-direction:row;flex-grow:1;align-self:center;align-items:flex-start;flex-shrink:1;padding:", ";"], ({
|
|
1923
|
+
theme
|
|
1924
|
+
}) => {
|
|
1925
|
+
const {
|
|
1926
|
+
spacing
|
|
1927
|
+
} = theme.kitt;
|
|
1928
|
+
return `${spacing * 4}px ${spacing * 5}px`;
|
|
1929
|
+
});
|
|
1930
|
+
function BaseMessage({
|
|
1878
1931
|
type = 'info',
|
|
1879
1932
|
children,
|
|
1880
|
-
|
|
1881
|
-
centeredText
|
|
1882
|
-
|
|
1883
|
-
|
|
1933
|
+
hasNoRadius,
|
|
1934
|
+
centeredText,
|
|
1935
|
+
insets,
|
|
1936
|
+
onDismiss
|
|
1884
1937
|
}) {
|
|
1885
1938
|
const color = getColorByType(type);
|
|
1886
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
1887
|
-
type: type,
|
|
1888
|
-
|
|
1889
|
-
insets: insets,
|
|
1890
|
-
children: [
|
|
1891
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1939
|
+
return /*#__PURE__*/jsxRuntime.jsxs(StyledMessageContainer, {
|
|
1940
|
+
$type: type,
|
|
1941
|
+
$hasNoRadius: hasNoRadius,
|
|
1942
|
+
$insets: insets,
|
|
1943
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(StyledMessageContent, {
|
|
1944
|
+
children: [centeredText ? null : /*#__PURE__*/jsxRuntime.jsx(StyledIconContainer, {
|
|
1945
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
1946
|
+
color: color,
|
|
1947
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(IconContent, {
|
|
1948
|
+
type: type,
|
|
1949
|
+
color: color
|
|
1950
|
+
})
|
|
1951
|
+
})
|
|
1952
|
+
}), /*#__PURE__*/jsxRuntime.jsx(StyledTextContent, {
|
|
1953
|
+
$isCenteredText: centeredText,
|
|
1954
|
+
base: "body",
|
|
1901
1955
|
color: color,
|
|
1902
1956
|
children: children
|
|
1903
|
-
})
|
|
1904
|
-
}), onDismiss ? /*#__PURE__*/jsxRuntime.jsx(
|
|
1905
|
-
|
|
1906
|
-
|
|
1957
|
+
})]
|
|
1958
|
+
}), onDismiss ? /*#__PURE__*/jsxRuntime.jsx(StyledDismissWrapper, {
|
|
1959
|
+
children: /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
1960
|
+
color: getIconButtonColor(type),
|
|
1907
1961
|
icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.XIcon, {}),
|
|
1908
|
-
|
|
1909
|
-
color: color
|
|
1962
|
+
onPress: onDismiss
|
|
1910
1963
|
})
|
|
1911
1964
|
}) : null]
|
|
1912
1965
|
});
|
|
1913
1966
|
}
|
|
1914
1967
|
|
|
1968
|
+
function Message({
|
|
1969
|
+
type = 'info',
|
|
1970
|
+
children,
|
|
1971
|
+
hasNoRadius,
|
|
1972
|
+
centeredText,
|
|
1973
|
+
insets,
|
|
1974
|
+
onDismiss
|
|
1975
|
+
}) {
|
|
1976
|
+
return /*#__PURE__*/jsxRuntime.jsx(BaseMessage, {
|
|
1977
|
+
insets: insets,
|
|
1978
|
+
hasNoRadius: hasNoRadius,
|
|
1979
|
+
type: type,
|
|
1980
|
+
centeredText: centeredText,
|
|
1981
|
+
onDismiss: onDismiss,
|
|
1982
|
+
children: children
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1915
1986
|
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
1916
1987
|
const OverlayPressable = /*#__PURE__*/styled__default(reactNative.Pressable).withConfig({
|
|
1917
1988
|
displayName: "Overlay__OverlayPressable",
|
|
@@ -2067,19 +2138,22 @@ function Notification({
|
|
|
2067
2138
|
type,
|
|
2068
2139
|
children,
|
|
2069
2140
|
centeredText,
|
|
2070
|
-
|
|
2141
|
+
insets,
|
|
2142
|
+
onDelete,
|
|
2143
|
+
onDismiss
|
|
2071
2144
|
}) {
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2145
|
+
if ((process.env.NODE_ENV !== "production")) {
|
|
2146
|
+
if (onDelete) {
|
|
2147
|
+
throw new Error('onDelete is deprecated us onDismiss instead');
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
return /*#__PURE__*/jsxRuntime.jsx(BaseMessage, {
|
|
2152
|
+
hasNoRadius: true,
|
|
2077
2153
|
type: type,
|
|
2078
2154
|
centeredText: centeredText,
|
|
2079
|
-
insets:
|
|
2080
|
-
|
|
2081
|
-
},
|
|
2082
|
-
onDismiss: onDelete,
|
|
2155
|
+
insets: insets,
|
|
2156
|
+
onDismiss: onDismiss,
|
|
2083
2157
|
children: children
|
|
2084
2158
|
});
|
|
2085
2159
|
}
|
|
@@ -2147,12 +2221,16 @@ function SkeletonContent({
|
|
|
2147
2221
|
});
|
|
2148
2222
|
}
|
|
2149
2223
|
|
|
2224
|
+
const SkeletonContainer = /*#__PURE__*/styled__default(reactNative.View).withConfig({
|
|
2225
|
+
displayName: "Skeleton__SkeletonContainer",
|
|
2226
|
+
componentId: "kitt-universal__sc-1w5cm3i-0"
|
|
2227
|
+
})(["overflow:hidden;"]);
|
|
2150
2228
|
function Skeleton({
|
|
2151
2229
|
isLoading,
|
|
2152
2230
|
style
|
|
2153
2231
|
}) {
|
|
2154
2232
|
const [width, setWidth] = react.useState(0);
|
|
2155
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
2233
|
+
return /*#__PURE__*/jsxRuntime.jsx(SkeletonContainer, {
|
|
2156
2234
|
style: style,
|
|
2157
2235
|
onLayout: ({
|
|
2158
2236
|
nativeEvent
|
|
@@ -2165,16 +2243,16 @@ function Skeleton({
|
|
|
2165
2243
|
}
|
|
2166
2244
|
const Bar = /*#__PURE__*/styled__default(Skeleton).withConfig({
|
|
2167
2245
|
displayName: "Skeleton__Bar",
|
|
2168
|
-
componentId: "kitt-universal__sc-1w5cm3i-
|
|
2169
|
-
})(["width:100%;height:", "px;border-radius:", "px;
|
|
2246
|
+
componentId: "kitt-universal__sc-1w5cm3i-1"
|
|
2247
|
+
})(["width:100%;height:", "px;border-radius:", "px;"], ({
|
|
2170
2248
|
theme
|
|
2171
2249
|
}) => theme.kitt.spacing * 2, ({
|
|
2172
2250
|
theme
|
|
2173
2251
|
}) => theme.kitt.spacing * 2);
|
|
2174
2252
|
const Circle = /*#__PURE__*/styled__default(Skeleton).withConfig({
|
|
2175
2253
|
displayName: "Skeleton__Circle",
|
|
2176
|
-
componentId: "kitt-universal__sc-1w5cm3i-
|
|
2177
|
-
})(["width:", "px;height:", "px;border-radius:", "px;
|
|
2254
|
+
componentId: "kitt-universal__sc-1w5cm3i-2"
|
|
2255
|
+
})(["width:", "px;height:", "px;border-radius:", "px;"], ({
|
|
2178
2256
|
theme
|
|
2179
2257
|
}) => theme.kitt.spacing * 12, ({
|
|
2180
2258
|
theme
|
|
@@ -2183,8 +2261,8 @@ const Circle = /*#__PURE__*/styled__default(Skeleton).withConfig({
|
|
|
2183
2261
|
}) => theme.kitt.spacing * 6);
|
|
2184
2262
|
const Square = /*#__PURE__*/styled__default(Skeleton).withConfig({
|
|
2185
2263
|
displayName: "Skeleton__Square",
|
|
2186
|
-
componentId: "kitt-universal__sc-1w5cm3i-
|
|
2187
|
-
})(["width:", "px;height:", "px;border-radius:", "px;
|
|
2264
|
+
componentId: "kitt-universal__sc-1w5cm3i-3"
|
|
2265
|
+
})(["width:", "px;height:", "px;border-radius:", "px;"], ({
|
|
2188
2266
|
theme
|
|
2189
2267
|
}) => theme.kitt.spacing * 12, ({
|
|
2190
2268
|
theme
|
|
@@ -2628,6 +2706,8 @@ const colorsLateOceanTheme = {
|
|
|
2628
2706
|
success: lateOceanColorPalette.viride,
|
|
2629
2707
|
correct: lateOceanColorPalette.viride,
|
|
2630
2708
|
danger: lateOceanColorPalette.englishVermillon,
|
|
2709
|
+
info: lateOceanColorPalette.aero,
|
|
2710
|
+
warning: lateOceanColorPalette.goldCrayola,
|
|
2631
2711
|
separator: lateOceanColorPalette.black100,
|
|
2632
2712
|
hover: lateOceanColorPalette.black100,
|
|
2633
2713
|
black: lateOceanColorPalette.black1000,
|
|
@@ -2652,7 +2732,7 @@ const avatar = {
|
|
|
2652
2732
|
}
|
|
2653
2733
|
};
|
|
2654
2734
|
|
|
2655
|
-
const
|
|
2735
|
+
const button = {
|
|
2656
2736
|
borderRadius: '30px',
|
|
2657
2737
|
borderWidth: {
|
|
2658
2738
|
disabled: '2px',
|
|
@@ -2743,63 +2823,148 @@ const cardLateOceanTheme = {
|
|
|
2743
2823
|
}
|
|
2744
2824
|
};
|
|
2745
2825
|
|
|
2746
|
-
const
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2826
|
+
const feedbackMessage = {
|
|
2827
|
+
danger: {
|
|
2828
|
+
backgroundColor: colorsLateOceanTheme.danger
|
|
2829
|
+
},
|
|
2830
|
+
success: {
|
|
2831
|
+
backgroundColor: colorsLateOceanTheme.success
|
|
2832
|
+
},
|
|
2833
|
+
info: {
|
|
2834
|
+
backgroundColor: colorsLateOceanTheme.info
|
|
2835
|
+
},
|
|
2836
|
+
warning: {
|
|
2837
|
+
backgroundColor: colorsLateOceanTheme.warning
|
|
2752
2838
|
}
|
|
2753
2839
|
};
|
|
2754
2840
|
|
|
2755
|
-
const
|
|
2756
|
-
|
|
2757
|
-
|
|
2841
|
+
const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
|
|
2842
|
+
const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
|
|
2843
|
+
baseAndSmall: {
|
|
2844
|
+
fontSize: `${baseAndSmallFontSize}px`,
|
|
2845
|
+
lineHeight: `${calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)}px`
|
|
2846
|
+
},
|
|
2847
|
+
mediumAndWide: {
|
|
2848
|
+
fontSize: `${mediumAndWideFontSize}px`,
|
|
2849
|
+
lineHeight: `${calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)}px`
|
|
2850
|
+
}
|
|
2851
|
+
});
|
|
2852
|
+
const typographyLateOceanTheme = {
|
|
2853
|
+
colors: {
|
|
2854
|
+
black: lateOceanColorPalette.black1000,
|
|
2855
|
+
'black-light': lateOceanColorPalette.black555,
|
|
2856
|
+
white: lateOceanColorPalette.white,
|
|
2857
|
+
'white-light': lateOceanColorPalette.white,
|
|
2858
|
+
primary: lateOceanColorPalette.lateOcean,
|
|
2859
|
+
'primary-light': lateOceanColorPalette.lateOceanLight1,
|
|
2860
|
+
accent: lateOceanColorPalette.warmEmbrace,
|
|
2861
|
+
success: lateOceanColorPalette.viride,
|
|
2862
|
+
danger: lateOceanColorPalette.englishVermillon
|
|
2863
|
+
},
|
|
2864
|
+
types: {
|
|
2865
|
+
headers: {
|
|
2866
|
+
fontFamily: {
|
|
2867
|
+
regular: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold',
|
|
2868
|
+
bold: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
2869
|
+
},
|
|
2870
|
+
fontWeight: 400,
|
|
2871
|
+
fontStyle: 'normal',
|
|
2872
|
+
configs: {
|
|
2873
|
+
// also known as xxlarge
|
|
2874
|
+
header1: createTypographyTypeConfig(1.3, 38, 62),
|
|
2875
|
+
// also known as xlarge
|
|
2876
|
+
header2: createTypographyTypeConfig(1.3, 32, 48),
|
|
2877
|
+
// also known as medium
|
|
2878
|
+
header3: createTypographyTypeConfig(1.3, 24, 36),
|
|
2879
|
+
// also known as xsmall
|
|
2880
|
+
header4: createTypographyTypeConfig(1.3, 18, 24),
|
|
2881
|
+
// also known as xxsmall
|
|
2882
|
+
header5: createTypographyTypeConfig(1.3, 18, 18)
|
|
2883
|
+
}
|
|
2884
|
+
},
|
|
2885
|
+
bodies: {
|
|
2886
|
+
fontFamily: {
|
|
2887
|
+
regular: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans',
|
|
2888
|
+
bold: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold'
|
|
2889
|
+
},
|
|
2890
|
+
fontWeight: {
|
|
2891
|
+
regular: 400,
|
|
2892
|
+
bold: 700
|
|
2893
|
+
},
|
|
2894
|
+
fontStyle: {
|
|
2895
|
+
regular: 'normal',
|
|
2896
|
+
bold: 'normal'
|
|
2897
|
+
},
|
|
2898
|
+
configs: {
|
|
2899
|
+
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
2900
|
+
'body-medium': createTypographyTypeConfig(1.6, 18, 18),
|
|
2901
|
+
body: createTypographyTypeConfig(1.6, 16, 16),
|
|
2902
|
+
'body-small': createTypographyTypeConfig(1.6, 14, 14),
|
|
2903
|
+
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
2904
|
+
}
|
|
2905
|
+
}
|
|
2906
|
+
},
|
|
2907
|
+
link: {
|
|
2908
|
+
disabledColor: lateOceanColorPalette.black200
|
|
2909
|
+
}
|
|
2758
2910
|
};
|
|
2759
2911
|
|
|
2760
2912
|
const inputStatesStyle = {
|
|
2761
2913
|
default: {
|
|
2762
|
-
backgroundColor:
|
|
2914
|
+
backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
|
|
2915
|
+
borderColor: colorsLateOceanTheme.separator,
|
|
2916
|
+
color: 'black'
|
|
2917
|
+
},
|
|
2918
|
+
pending: {
|
|
2919
|
+
backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
|
|
2920
|
+
borderColor: colorsLateOceanTheme.separator,
|
|
2921
|
+
color: 'black'
|
|
2922
|
+
},
|
|
2923
|
+
valid: {
|
|
2924
|
+
backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
|
|
2763
2925
|
borderColor: lateOceanColorPalette.black100,
|
|
2764
|
-
color: 'black'
|
|
2765
|
-
passwordButtonIconColor: 'black'
|
|
2926
|
+
color: 'black'
|
|
2766
2927
|
},
|
|
2767
2928
|
hover: {
|
|
2768
2929
|
borderColor: lateOceanColorPalette.black200,
|
|
2769
|
-
color: 'black'
|
|
2770
|
-
passwordButtonIconColor: 'black'
|
|
2930
|
+
color: 'black'
|
|
2771
2931
|
},
|
|
2772
2932
|
focus: {
|
|
2773
|
-
borderColor:
|
|
2774
|
-
color: 'black'
|
|
2775
|
-
passwordButtonIconColor: 'black'
|
|
2933
|
+
borderColor: colorsLateOceanTheme.primary,
|
|
2934
|
+
color: 'black'
|
|
2776
2935
|
},
|
|
2777
2936
|
disabled: {
|
|
2778
|
-
backgroundColor:
|
|
2779
|
-
borderColor:
|
|
2780
|
-
color: 'black-light'
|
|
2781
|
-
passwordButtonIconColor: 'black-light'
|
|
2937
|
+
backgroundColor: colorsLateOceanTheme.disabled,
|
|
2938
|
+
borderColor: colorsLateOceanTheme.separator,
|
|
2939
|
+
color: 'black-light'
|
|
2782
2940
|
},
|
|
2783
2941
|
invalid: {
|
|
2784
|
-
borderColor:
|
|
2785
|
-
color: 'black'
|
|
2786
|
-
passwordButtonIconColor: 'black'
|
|
2942
|
+
borderColor: colorsLateOceanTheme.separator,
|
|
2943
|
+
color: 'black'
|
|
2787
2944
|
}
|
|
2788
2945
|
};
|
|
2789
|
-
const
|
|
2790
|
-
|
|
2791
|
-
|
|
2946
|
+
const input = {
|
|
2947
|
+
color: {
|
|
2948
|
+
selection: colorsLateOceanTheme.primary,
|
|
2949
|
+
placeholder: typographyLateOceanTheme.colors['black-light']
|
|
2950
|
+
},
|
|
2792
2951
|
borderWidth: '2px',
|
|
2793
2952
|
borderRadius: '10px',
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2953
|
+
icon: {
|
|
2954
|
+
size: 20
|
|
2955
|
+
},
|
|
2956
|
+
padding: {
|
|
2957
|
+
default: '7px 16px',
|
|
2958
|
+
iOSSingleLine: '12px 16px'
|
|
2959
|
+
},
|
|
2800
2960
|
states: inputStatesStyle
|
|
2801
2961
|
};
|
|
2802
2962
|
|
|
2963
|
+
const inputFieldLateOceanTheme = {
|
|
2964
|
+
labelContainerPaddingBottom: 5,
|
|
2965
|
+
iconMarginLeft: 6
|
|
2966
|
+
};
|
|
2967
|
+
|
|
2803
2968
|
const radioLateOceanTheme = {
|
|
2804
2969
|
size: 18,
|
|
2805
2970
|
unchecked: {
|
|
@@ -2818,10 +2983,15 @@ const radioLateOceanTheme = {
|
|
|
2818
2983
|
}
|
|
2819
2984
|
};
|
|
2820
2985
|
|
|
2821
|
-
const
|
|
2822
|
-
|
|
2986
|
+
const textArea = {
|
|
2987
|
+
minHeight: 120
|
|
2988
|
+
};
|
|
2989
|
+
|
|
2990
|
+
const forms = {
|
|
2991
|
+
input,
|
|
2823
2992
|
radio: radioLateOceanTheme,
|
|
2824
|
-
inputField: inputFieldLateOceanTheme
|
|
2993
|
+
inputField: inputFieldLateOceanTheme,
|
|
2994
|
+
textArea
|
|
2825
2995
|
};
|
|
2826
2996
|
|
|
2827
2997
|
const fullScreenModalLateOceanTheme = {
|
|
@@ -2856,14 +3026,14 @@ const iconButton = {
|
|
|
2856
3026
|
},
|
|
2857
3027
|
disabled: {
|
|
2858
3028
|
scale: 1,
|
|
2859
|
-
backgroundColor:
|
|
2860
|
-
borderColor:
|
|
3029
|
+
backgroundColor: button.disabled.backgroundColor,
|
|
3030
|
+
borderColor: button.disabled.borderColor
|
|
2861
3031
|
},
|
|
2862
3032
|
default: {
|
|
2863
|
-
pressedBackgroundColor:
|
|
3033
|
+
pressedBackgroundColor: button.default.pressedBackgroundColor
|
|
2864
3034
|
},
|
|
2865
3035
|
white: {
|
|
2866
|
-
pressedBackgroundColor:
|
|
3036
|
+
pressedBackgroundColor: button.white.hoverBackgroundColor
|
|
2867
3037
|
}
|
|
2868
3038
|
};
|
|
2869
3039
|
|
|
@@ -2934,77 +3104,6 @@ const tooltip = {
|
|
|
2934
3104
|
floatingPadding: 8
|
|
2935
3105
|
};
|
|
2936
3106
|
|
|
2937
|
-
const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
|
|
2938
|
-
const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
|
|
2939
|
-
baseAndSmall: {
|
|
2940
|
-
fontSize: `${baseAndSmallFontSize}px`,
|
|
2941
|
-
lineHeight: `${calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)}px`
|
|
2942
|
-
},
|
|
2943
|
-
mediumAndWide: {
|
|
2944
|
-
fontSize: `${mediumAndWideFontSize}px`,
|
|
2945
|
-
lineHeight: `${calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)}px`
|
|
2946
|
-
}
|
|
2947
|
-
});
|
|
2948
|
-
const typographyLateOceanTheme = {
|
|
2949
|
-
colors: {
|
|
2950
|
-
black: lateOceanColorPalette.black1000,
|
|
2951
|
-
'black-light': lateOceanColorPalette.black555,
|
|
2952
|
-
white: lateOceanColorPalette.white,
|
|
2953
|
-
'white-light': lateOceanColorPalette.white,
|
|
2954
|
-
primary: lateOceanColorPalette.lateOcean,
|
|
2955
|
-
'primary-light': lateOceanColorPalette.lateOceanLight1,
|
|
2956
|
-
accent: lateOceanColorPalette.warmEmbrace,
|
|
2957
|
-
success: lateOceanColorPalette.viride,
|
|
2958
|
-
danger: lateOceanColorPalette.englishVermillon
|
|
2959
|
-
},
|
|
2960
|
-
types: {
|
|
2961
|
-
headers: {
|
|
2962
|
-
fontFamily: {
|
|
2963
|
-
regular: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold',
|
|
2964
|
-
bold: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
2965
|
-
},
|
|
2966
|
-
fontWeight: 400,
|
|
2967
|
-
fontStyle: 'normal',
|
|
2968
|
-
configs: {
|
|
2969
|
-
// also known as xxlarge
|
|
2970
|
-
header1: createTypographyTypeConfig(1.3, 38, 62),
|
|
2971
|
-
// also known as xlarge
|
|
2972
|
-
header2: createTypographyTypeConfig(1.3, 32, 48),
|
|
2973
|
-
// also known as medium
|
|
2974
|
-
header3: createTypographyTypeConfig(1.3, 24, 36),
|
|
2975
|
-
// also known as xsmall
|
|
2976
|
-
header4: createTypographyTypeConfig(1.3, 18, 24),
|
|
2977
|
-
// also known as xxsmall
|
|
2978
|
-
header5: createTypographyTypeConfig(1.3, 18, 18)
|
|
2979
|
-
}
|
|
2980
|
-
},
|
|
2981
|
-
bodies: {
|
|
2982
|
-
fontFamily: {
|
|
2983
|
-
regular: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans',
|
|
2984
|
-
bold: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold'
|
|
2985
|
-
},
|
|
2986
|
-
fontWeight: {
|
|
2987
|
-
regular: 400,
|
|
2988
|
-
bold: 700
|
|
2989
|
-
},
|
|
2990
|
-
fontStyle: {
|
|
2991
|
-
regular: 'normal',
|
|
2992
|
-
bold: 'normal'
|
|
2993
|
-
},
|
|
2994
|
-
configs: {
|
|
2995
|
-
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
2996
|
-
'body-medium': createTypographyTypeConfig(1.6, 18, 18),
|
|
2997
|
-
body: createTypographyTypeConfig(1.6, 16, 16),
|
|
2998
|
-
'body-small': createTypographyTypeConfig(1.6, 14, 14),
|
|
2999
|
-
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
3000
|
-
}
|
|
3001
|
-
}
|
|
3002
|
-
},
|
|
3003
|
-
link: {
|
|
3004
|
-
disabledColor: lateOceanColorPalette.black200
|
|
3005
|
-
}
|
|
3006
|
-
};
|
|
3007
|
-
|
|
3008
3107
|
const breakpoints = {
|
|
3009
3108
|
values: {
|
|
3010
3109
|
base: 0,
|
|
@@ -3035,10 +3134,10 @@ const theme = {
|
|
|
3035
3134
|
lateOcean: lateOceanColorPalette
|
|
3036
3135
|
},
|
|
3037
3136
|
avatar,
|
|
3038
|
-
button
|
|
3137
|
+
button,
|
|
3039
3138
|
card: cardLateOceanTheme,
|
|
3040
|
-
feedbackMessage
|
|
3041
|
-
forms
|
|
3139
|
+
feedbackMessage,
|
|
3140
|
+
forms,
|
|
3042
3141
|
typography: typographyLateOceanTheme,
|
|
3043
3142
|
tag: tagLateOceanTheme,
|
|
3044
3143
|
shadows: shadowsLateOceanTheme,
|
|
@@ -3169,7 +3268,7 @@ function TimePicker({
|
|
|
3169
3268
|
isTimePickerModalVisible
|
|
3170
3269
|
} = useTimePicker(value || null, onChange, onBlur, disabled, forceDefaultValue);
|
|
3171
3270
|
return /*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
3172
|
-
state: timePickerState === 'default' ? state : timePickerState,
|
|
3271
|
+
$state: timePickerState === 'default' ? state : timePickerState,
|
|
3173
3272
|
accessibilityRole: "button",
|
|
3174
3273
|
onPress: handleInputPress,
|
|
3175
3274
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
@@ -3194,24 +3293,6 @@ function TimePicker({
|
|
|
3194
3293
|
});
|
|
3195
3294
|
}
|
|
3196
3295
|
|
|
3197
|
-
var Arrow = function (props) {
|
|
3198
|
-
return /*#__PURE__*/jsxRuntime.jsx("svg", { ...props,
|
|
3199
|
-
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
3200
|
-
fillRule: "evenodd",
|
|
3201
|
-
clipRule: "evenodd",
|
|
3202
|
-
d: "M22.399 6.128C20.939 7.722 19.767 9 18 9s-2.938-1.278-4.399-2.872C11.187 3.494 7.984 0 0 0h36c-7.984 0-11.187 3.494-13.601 6.128z",
|
|
3203
|
-
fill: "currentColor"
|
|
3204
|
-
})
|
|
3205
|
-
});
|
|
3206
|
-
};
|
|
3207
|
-
|
|
3208
|
-
Arrow.defaultProps = {
|
|
3209
|
-
width: "36",
|
|
3210
|
-
height: "8",
|
|
3211
|
-
viewBox: "0 0 36 9",
|
|
3212
|
-
fill: "none",
|
|
3213
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
3214
|
-
};
|
|
3215
3296
|
const StyledTooltipView = /*#__PURE__*/styled__default.View.withConfig({
|
|
3216
3297
|
displayName: "TooltipView__StyledTooltipView",
|
|
3217
3298
|
componentId: "kitt-universal__sc-156zm6m-0"
|
|
@@ -3232,7 +3313,7 @@ const StyledTooltipContent = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
3232
3313
|
function ArrowView(props) {
|
|
3233
3314
|
const theme = /*#__PURE__*/styled.useTheme();
|
|
3234
3315
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, { ...props,
|
|
3235
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
3316
|
+
children: /*#__PURE__*/jsxRuntime.jsx(kittIcons.TooltipArrowIcon, {
|
|
3236
3317
|
color: theme.kitt.tooltip.backgroundColor
|
|
3237
3318
|
})
|
|
3238
3319
|
});
|
|
@@ -3581,6 +3662,9 @@ exports.Icon = Icon;
|
|
|
3581
3662
|
exports.IconButton = IconButton;
|
|
3582
3663
|
exports.InputFeedback = InputFeedback;
|
|
3583
3664
|
exports.InputField = InputField;
|
|
3665
|
+
exports.InputIcon = InputIcon;
|
|
3666
|
+
exports.InputPassword = InputPassword;
|
|
3667
|
+
exports.InputPressable = InputPressable;
|
|
3584
3668
|
exports.InputText = InputText;
|
|
3585
3669
|
exports.KittBreakpoints = KittBreakpoints;
|
|
3586
3670
|
exports.KittBreakpointsMax = KittBreakpointsMax;
|