@ornikar/kitt-universal 9.5.0 → 9.6.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/Choices/ChoiceItem.d.ts.map +1 -1
- package/dist/definitions/Choices/hooks/useNativeAnimation.d.ts +14 -0
- package/dist/definitions/Choices/hooks/useNativeAnimation.d.ts.map +1 -0
- package/dist/definitions/Choices/hooks/useNativeAnimation.web.d.ts +7 -0
- package/dist/definitions/Choices/hooks/useNativeAnimation.web.d.ts.map +1 -0
- package/dist/definitions/forms/InputField/InputField.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +1 -1
- package/dist/definitions/themes/default.d.ts +7 -1
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/forms.d.ts +7 -1
- package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/inputField.d.ts +7 -1
- package/dist/definitions/themes/late-ocean/inputField.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +117 -106
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +117 -106
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +117 -106
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +38 -111
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +115 -104
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +35 -106
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +7 -1
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +7 -1
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +7 -1
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +7 -1
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +7 -1
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +7 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +27 -2
|
@@ -1048,6 +1048,88 @@ function Card(_ref6) {
|
|
|
1048
1048
|
});
|
|
1049
1049
|
}
|
|
1050
1050
|
|
|
1051
|
+
var useNativeAnimation = function (_ref) {
|
|
1052
|
+
var selected = _ref.selected,
|
|
1053
|
+
disabled = _ref.disabled,
|
|
1054
|
+
isPressedInternal = _ref.isPressedInternal;
|
|
1055
|
+
var theme = /*#__PURE__*/useTheme();
|
|
1056
|
+
var pressed = useSharedValue(Boolean(isPressedInternal));
|
|
1057
|
+
var progress = useDerivedValue(function () {
|
|
1058
|
+
var _f = function () {
|
|
1059
|
+
return withTiming(pressed.value ? 1 : 0, {
|
|
1060
|
+
duration: theme.kitt.choices.item.transition.duration
|
|
1061
|
+
});
|
|
1062
|
+
};
|
|
1063
|
+
|
|
1064
|
+
_f._closure = {
|
|
1065
|
+
withTiming: withTiming,
|
|
1066
|
+
pressed: pressed,
|
|
1067
|
+
theme: {
|
|
1068
|
+
kitt: {
|
|
1069
|
+
choices: {
|
|
1070
|
+
item: {
|
|
1071
|
+
transition: {
|
|
1072
|
+
duration: theme.kitt.choices.item.transition.duration
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
};
|
|
1079
|
+
_f.asString = "function _f(){const{withTiming,pressed,theme}=jsThis._closure;{return withTiming(pressed.value?1:0,{duration:theme.kitt.choices.item.transition.duration});}}";
|
|
1080
|
+
_f.__workletHash = 1120030177160;
|
|
1081
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Choices/hooks/useNativeAnimation.tsx (31:35)";
|
|
1082
|
+
return _f;
|
|
1083
|
+
}());
|
|
1084
|
+
var backgroundStyles = useAnimatedStyle(function () {
|
|
1085
|
+
var _f = function () {
|
|
1086
|
+
var _theme$kitt$choices$i = theme.kitt.choices.item.backgroundColor,
|
|
1087
|
+
defaultBg = _theme$kitt$choices$i["default"],
|
|
1088
|
+
pressedBg = _theme$kitt$choices$i.pressed,
|
|
1089
|
+
selectedBg = _theme$kitt$choices$i.selected,
|
|
1090
|
+
disabledBg = _theme$kitt$choices$i.disabled;
|
|
1091
|
+
if (disabled) return {
|
|
1092
|
+
backgroundColor: disabledBg
|
|
1093
|
+
};
|
|
1094
|
+
if (selected) return {
|
|
1095
|
+
backgroundColor: selectedBg
|
|
1096
|
+
};
|
|
1097
|
+
return {
|
|
1098
|
+
backgroundColor: interpolateColor(progress.value, [0, 1], [defaultBg, pressedBg])
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1102
|
+
_f._closure = {
|
|
1103
|
+
theme: {
|
|
1104
|
+
kitt: {
|
|
1105
|
+
choices: {
|
|
1106
|
+
item: {
|
|
1107
|
+
backgroundColor: theme.kitt.choices.item.backgroundColor
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
},
|
|
1112
|
+
disabled: disabled,
|
|
1113
|
+
selected: selected,
|
|
1114
|
+
interpolateColor: interpolateColor,
|
|
1115
|
+
progress: progress
|
|
1116
|
+
};
|
|
1117
|
+
_f.asString = "function _f(){const{theme,disabled,selected,interpolateColor,progress}=jsThis._closure;{const{default:defaultBg,pressed:pressedBg,selected:selectedBg,disabled:disabledBg}=theme.kitt.choices.item.backgroundColor;if(disabled)return{backgroundColor:disabledBg};if(selected)return{backgroundColor:selectedBg};return{backgroundColor:interpolateColor(progress.value,[0,1],[defaultBg,pressedBg])};}}";
|
|
1118
|
+
_f.__workletHash = 15506726129309;
|
|
1119
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Choices/hooks/useNativeAnimation.tsx (35:44)";
|
|
1120
|
+
return _f;
|
|
1121
|
+
}());
|
|
1122
|
+
return {
|
|
1123
|
+
onPressIn: function onPressIn() {
|
|
1124
|
+
pressed.value = true;
|
|
1125
|
+
},
|
|
1126
|
+
onPressOut: function onPressOut() {
|
|
1127
|
+
pressed.value = false;
|
|
1128
|
+
},
|
|
1129
|
+
backgroundStyles: backgroundStyles
|
|
1130
|
+
};
|
|
1131
|
+
};
|
|
1132
|
+
|
|
1051
1133
|
function getCurrentTextColor(_ref) {
|
|
1052
1134
|
var isDisabled = _ref.isDisabled,
|
|
1053
1135
|
isSelected = _ref.isSelected,
|
|
@@ -1079,7 +1161,7 @@ var DisabledBorder = /*#__PURE__*/styled(View$2).withConfig({
|
|
|
1079
1161
|
color = _theme$kitt$choices$i.color;
|
|
1080
1162
|
return css(["border:", "px solid ", ";"], width, color);
|
|
1081
1163
|
});
|
|
1082
|
-
var ChoiceItemView = /*#__PURE__*/styled(Animated.View).withConfig({
|
|
1164
|
+
var ChoiceItemView = /*#__PURE__*/styled(Platform.OS === 'web' ? View$2 : Animated.View).withConfig({
|
|
1083
1165
|
displayName: "ChoiceItem__ChoiceItemView"
|
|
1084
1166
|
})(["position:relative;border-radius:", "px;background-color:", ";", ";", ""], function (_ref4) {
|
|
1085
1167
|
var theme = _ref4.theme,
|
|
@@ -1135,73 +1217,15 @@ function ChoiceItem(_ref8) {
|
|
|
1135
1217
|
onChange = _ref8.onChange,
|
|
1136
1218
|
onBlur = _ref8.onBlur,
|
|
1137
1219
|
onFocus = _ref8.onFocus;
|
|
1138
|
-
var theme = /*#__PURE__*/useTheme();
|
|
1139
|
-
var pressed = useSharedValue(Boolean(isPressedInternal));
|
|
1140
|
-
var progress = useDerivedValue(function () {
|
|
1141
|
-
var _f = function () {
|
|
1142
|
-
return withTiming(pressed.value ? 1 : 0, {
|
|
1143
|
-
duration: theme.kitt.choices.item.transition.duration
|
|
1144
|
-
});
|
|
1145
|
-
};
|
|
1146
|
-
|
|
1147
|
-
_f._closure = {
|
|
1148
|
-
withTiming: withTiming,
|
|
1149
|
-
pressed: pressed,
|
|
1150
|
-
theme: {
|
|
1151
|
-
kitt: {
|
|
1152
|
-
choices: {
|
|
1153
|
-
item: {
|
|
1154
|
-
transition: {
|
|
1155
|
-
duration: theme.kitt.choices.item.transition.duration
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
};
|
|
1162
|
-
_f.asString = "function _f(){const{withTiming,pressed,theme}=jsThis._closure;{return withTiming(pressed.value?1:0,{duration:theme.kitt.choices.item.transition.duration});}}";
|
|
1163
|
-
_f.__workletHash = 1120030177160;
|
|
1164
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Choices/ChoiceItem.tsx (180:35)";
|
|
1165
|
-
return _f;
|
|
1166
|
-
}());
|
|
1167
|
-
var backgroundStyles = useAnimatedStyle(function () {
|
|
1168
|
-
var _f = function () {
|
|
1169
|
-
var _theme$kitt$choices$i5 = theme.kitt.choices.item.backgroundColor,
|
|
1170
|
-
defaultBg = _theme$kitt$choices$i5["default"],
|
|
1171
|
-
pressedBg = _theme$kitt$choices$i5.pressed,
|
|
1172
|
-
selectedBg = _theme$kitt$choices$i5.selected,
|
|
1173
|
-
disabledBg = _theme$kitt$choices$i5.disabled;
|
|
1174
|
-
if (disabled) return {
|
|
1175
|
-
backgroundColor: disabledBg
|
|
1176
|
-
};
|
|
1177
|
-
if (selected) return {
|
|
1178
|
-
backgroundColor: selectedBg
|
|
1179
|
-
};
|
|
1180
|
-
return {
|
|
1181
|
-
backgroundColor: interpolateColor(progress.value, [0, 1], [defaultBg, pressedBg])
|
|
1182
|
-
};
|
|
1183
|
-
};
|
|
1184
1220
|
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
}
|
|
1194
|
-
},
|
|
1195
|
-
disabled: disabled,
|
|
1196
|
-
selected: selected,
|
|
1197
|
-
interpolateColor: interpolateColor,
|
|
1198
|
-
progress: progress
|
|
1199
|
-
};
|
|
1200
|
-
_f.asString = "function _f(){const{theme,disabled,selected,interpolateColor,progress}=jsThis._closure;{const{default:defaultBg,pressed:pressedBg,selected:selectedBg,disabled:disabledBg}=theme.kitt.choices.item.backgroundColor;if(disabled)return{backgroundColor:disabledBg};if(selected)return{backgroundColor:selectedBg};return{backgroundColor:interpolateColor(progress.value,[0,1],[defaultBg,pressedBg])};}}";
|
|
1201
|
-
_f.__workletHash = 15506726129309;
|
|
1202
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Choices/ChoiceItem.tsx (184:44)";
|
|
1203
|
-
return _f;
|
|
1204
|
-
}());
|
|
1221
|
+
var _useNativeAnimation = useNativeAnimation({
|
|
1222
|
+
selected: selected,
|
|
1223
|
+
disabled: disabled,
|
|
1224
|
+
isPressedInternal: isPressedInternal
|
|
1225
|
+
}),
|
|
1226
|
+
onPressIn = _useNativeAnimation.onPressIn,
|
|
1227
|
+
onPressOut = _useNativeAnimation.onPressOut,
|
|
1228
|
+
backgroundStyles = _useNativeAnimation.backgroundStyles;
|
|
1205
1229
|
|
|
1206
1230
|
var handleChange = function () {
|
|
1207
1231
|
if (!onChange) return; // Checkbox can be toggled
|
|
@@ -1228,12 +1252,8 @@ function ChoiceItem(_ref8) {
|
|
|
1228
1252
|
handleChange();
|
|
1229
1253
|
if (onBlur) onBlur(e);
|
|
1230
1254
|
},
|
|
1231
|
-
onPressIn:
|
|
1232
|
-
|
|
1233
|
-
},
|
|
1234
|
-
onPressOut: function onPressOut() {
|
|
1235
|
-
pressed.value = false;
|
|
1236
|
-
},
|
|
1255
|
+
onPressIn: onPressIn,
|
|
1256
|
+
onPressOut: onPressOut,
|
|
1237
1257
|
children: function children(_ref9) {
|
|
1238
1258
|
var isHovered = _ref9.isHovered,
|
|
1239
1259
|
isPressed = _ref9.isPressed;
|
|
@@ -1947,8 +1967,14 @@ var input = {
|
|
|
1947
1967
|
};
|
|
1948
1968
|
|
|
1949
1969
|
var inputField = {
|
|
1970
|
+
containerPaddingTop: 5,
|
|
1971
|
+
containerPaddingBottom: 10,
|
|
1972
|
+
feedbackPaddingTop: {
|
|
1973
|
+
base: 5,
|
|
1974
|
+
small: 10
|
|
1975
|
+
},
|
|
1950
1976
|
labelContainerPaddingBottom: 5,
|
|
1951
|
-
|
|
1977
|
+
labelFeedbackMarginLeft: 6
|
|
1952
1978
|
};
|
|
1953
1979
|
|
|
1954
1980
|
var inputTag = {
|
|
@@ -3208,40 +3234,25 @@ function InputFeedback(_ref) {
|
|
|
3208
3234
|
});
|
|
3209
3235
|
}
|
|
3210
3236
|
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
return theme.kitt.forms.inputField.labelContainerPaddingBottom;
|
|
3227
|
-
});
|
|
3228
|
-
var LabelContainer = /*#__PURE__*/styled.View.withConfig({
|
|
3229
|
-
displayName: "InputField__LabelContainer"
|
|
3230
|
-
})(["margin-right:", "px;"], function (_ref3) {
|
|
3231
|
-
var theme = _ref3.theme;
|
|
3232
|
-
return theme.kitt.forms.inputField.iconMarginLeft;
|
|
3233
|
-
});
|
|
3234
|
-
function InputField(_ref4) {
|
|
3235
|
-
var label = _ref4.label,
|
|
3236
|
-
labelFeedback = _ref4.labelFeedback,
|
|
3237
|
-
input = _ref4.input,
|
|
3238
|
-
feedback = _ref4.feedback;
|
|
3239
|
-
return /*#__PURE__*/jsxs(FieldContainer, {
|
|
3240
|
-
children: [label ? /*#__PURE__*/jsxs(FieldLabelContainer, {
|
|
3241
|
-
children: [/*#__PURE__*/jsx(LabelContainer, {
|
|
3237
|
+
function InputField(_ref) {
|
|
3238
|
+
var label = _ref.label,
|
|
3239
|
+
labelFeedback = _ref.labelFeedback,
|
|
3240
|
+
input = _ref.input,
|
|
3241
|
+
feedback = _ref.feedback;
|
|
3242
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3243
|
+
return /*#__PURE__*/jsxs(View, {
|
|
3244
|
+
paddingTop: theme.kitt.forms.inputField.containerPaddingTop,
|
|
3245
|
+
paddingBottom: theme.kitt.forms.inputField.containerPaddingBottom,
|
|
3246
|
+
children: [label ? /*#__PURE__*/jsxs(View, {
|
|
3247
|
+
flexDirection: "row",
|
|
3248
|
+
alignItems: "center",
|
|
3249
|
+
paddingBottom: theme.kitt.forms.inputField.labelContainerPaddingBottom,
|
|
3250
|
+
children: [/*#__PURE__*/jsx(View, {
|
|
3251
|
+
marginRight: theme.kitt.forms.inputField.labelFeedbackMarginLeft,
|
|
3242
3252
|
children: label
|
|
3243
3253
|
}), labelFeedback]
|
|
3244
|
-
}) : null, input, feedback ? /*#__PURE__*/jsx(
|
|
3254
|
+
}) : null, input, feedback ? /*#__PURE__*/jsx(View, {
|
|
3255
|
+
paddingTop: theme.kitt.forms.inputField.feedbackPaddingTop,
|
|
3245
3256
|
children: feedback
|
|
3246
3257
|
}) : null]
|
|
3247
3258
|
});
|