@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
|
@@ -9,7 +9,6 @@ const BabelPluginStyledComponentsReactNative = require('react-native');
|
|
|
9
9
|
const styled = require('styled-components/native');
|
|
10
10
|
const jsxRuntime = require('react/jsx-runtime');
|
|
11
11
|
const kittIcons = require('@ornikar/kitt-icons');
|
|
12
|
-
const Animated = require('react-native-reanimated');
|
|
13
12
|
const twemojiParser = require('twemoji-parser');
|
|
14
13
|
const reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
15
14
|
const reactPortal = require('react-portal');
|
|
@@ -19,7 +18,6 @@ const addons = require('@storybook/addons');
|
|
|
19
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
|
|
20
19
|
|
|
21
20
|
const styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
22
|
-
const Animated__default = /*#__PURE__*/_interopDefaultLegacy(Animated);
|
|
23
21
|
|
|
24
22
|
const Stack = nativeBase.Stack;
|
|
25
23
|
const VStack = nativeBase.VStack;
|
|
@@ -997,6 +995,14 @@ function Card({
|
|
|
997
995
|
});
|
|
998
996
|
}
|
|
999
997
|
|
|
998
|
+
const useNativeAnimation = () => {
|
|
999
|
+
return {
|
|
1000
|
+
onPressIn: () => {},
|
|
1001
|
+
onPressOut: () => {},
|
|
1002
|
+
backgroundStyles: undefined
|
|
1003
|
+
};
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1000
1006
|
function getCurrentTextColor({
|
|
1001
1007
|
isDisabled,
|
|
1002
1008
|
isSelected,
|
|
@@ -1031,7 +1037,7 @@ const DisabledBorder = /*#__PURE__*/styled__default(BabelPluginStyledComponentsR
|
|
|
1031
1037
|
} = theme.kitt.choices.item.disabled.border;
|
|
1032
1038
|
return styled.css(["border:", "px solid ", ";"], width, color);
|
|
1033
1039
|
});
|
|
1034
|
-
const ChoiceItemView = /*#__PURE__*/styled__default(
|
|
1040
|
+
const ChoiceItemView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
1035
1041
|
displayName: "ChoiceItem__ChoiceItemView",
|
|
1036
1042
|
componentId: "kitt-universal__sc-wuv3y6-1"
|
|
1037
1043
|
})(["position:relative;border-radius:", "px;background-color:", ";", ";", ""], ({
|
|
@@ -1092,74 +1098,11 @@ function ChoiceItem({
|
|
|
1092
1098
|
onBlur,
|
|
1093
1099
|
onFocus
|
|
1094
1100
|
}) {
|
|
1095
|
-
const
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
duration: theme.kitt.choices.item.transition.duration
|
|
1101
|
-
});
|
|
1102
|
-
};
|
|
1103
|
-
|
|
1104
|
-
_f._closure = {
|
|
1105
|
-
withTiming: Animated.withTiming,
|
|
1106
|
-
pressed,
|
|
1107
|
-
theme: {
|
|
1108
|
-
kitt: {
|
|
1109
|
-
choices: {
|
|
1110
|
-
item: {
|
|
1111
|
-
transition: {
|
|
1112
|
-
duration: theme.kitt.choices.item.transition.duration
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
|
-
}
|
|
1118
|
-
};
|
|
1119
|
-
_f.asString = "function _f(){const{withTiming,pressed,theme}=jsThis._closure;{return withTiming(pressed.value?1:0,{duration:theme.kitt.choices.item.transition.duration});}}";
|
|
1120
|
-
_f.__workletHash = 1120030177160;
|
|
1121
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Choices/ChoiceItem.tsx (180:35)";
|
|
1122
|
-
return _f;
|
|
1123
|
-
}());
|
|
1124
|
-
Animated.useAnimatedStyle(function () {
|
|
1125
|
-
const _f = function () {
|
|
1126
|
-
const {
|
|
1127
|
-
default: defaultBg,
|
|
1128
|
-
pressed: pressedBg,
|
|
1129
|
-
selected: selectedBg,
|
|
1130
|
-
disabled: disabledBg
|
|
1131
|
-
} = theme.kitt.choices.item.backgroundColor;
|
|
1132
|
-
if (disabled) return {
|
|
1133
|
-
backgroundColor: disabledBg
|
|
1134
|
-
};
|
|
1135
|
-
if (selected) return {
|
|
1136
|
-
backgroundColor: selectedBg
|
|
1137
|
-
};
|
|
1138
|
-
return {
|
|
1139
|
-
backgroundColor: Animated.interpolateColor(progress.value, [0, 1], [defaultBg, pressedBg])
|
|
1140
|
-
};
|
|
1141
|
-
};
|
|
1142
|
-
|
|
1143
|
-
_f._closure = {
|
|
1144
|
-
theme: {
|
|
1145
|
-
kitt: {
|
|
1146
|
-
choices: {
|
|
1147
|
-
item: {
|
|
1148
|
-
backgroundColor: theme.kitt.choices.item.backgroundColor
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
},
|
|
1153
|
-
disabled,
|
|
1154
|
-
selected,
|
|
1155
|
-
interpolateColor: Animated.interpolateColor,
|
|
1156
|
-
progress
|
|
1157
|
-
};
|
|
1158
|
-
_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])};}}";
|
|
1159
|
-
_f.__workletHash = 15506726129309;
|
|
1160
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Choices/ChoiceItem.tsx (184:44)";
|
|
1161
|
-
return _f;
|
|
1162
|
-
}());
|
|
1101
|
+
const {
|
|
1102
|
+
onPressIn,
|
|
1103
|
+
onPressOut,
|
|
1104
|
+
backgroundStyles
|
|
1105
|
+
} = useNativeAnimation();
|
|
1163
1106
|
|
|
1164
1107
|
const handleChange = () => {
|
|
1165
1108
|
if (!onChange) return; // Checkbox can be toggled
|
|
@@ -1186,12 +1129,8 @@ function ChoiceItem({
|
|
|
1186
1129
|
handleChange();
|
|
1187
1130
|
if (onBlur) onBlur(e);
|
|
1188
1131
|
},
|
|
1189
|
-
onPressIn:
|
|
1190
|
-
|
|
1191
|
-
},
|
|
1192
|
-
onPressOut: () => {
|
|
1193
|
-
pressed.value = false;
|
|
1194
|
-
},
|
|
1132
|
+
onPressIn: onPressIn,
|
|
1133
|
+
onPressOut: onPressOut,
|
|
1195
1134
|
children: ({
|
|
1196
1135
|
isHovered,
|
|
1197
1136
|
isPressed
|
|
@@ -1818,8 +1757,14 @@ const input = {
|
|
|
1818
1757
|
};
|
|
1819
1758
|
|
|
1820
1759
|
const inputField = {
|
|
1760
|
+
containerPaddingTop: 5,
|
|
1761
|
+
containerPaddingBottom: 10,
|
|
1762
|
+
feedbackPaddingTop: {
|
|
1763
|
+
base: 5,
|
|
1764
|
+
small: 10
|
|
1765
|
+
},
|
|
1821
1766
|
labelContainerPaddingBottom: 5,
|
|
1822
|
-
|
|
1767
|
+
labelFeedbackMarginLeft: 6
|
|
1823
1768
|
};
|
|
1824
1769
|
|
|
1825
1770
|
const inputTag = {
|
|
@@ -2492,42 +2437,26 @@ function InputFeedback({
|
|
|
2492
2437
|
});
|
|
2493
2438
|
}
|
|
2494
2439
|
|
|
2495
|
-
const FieldContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
2496
|
-
displayName: "InputField__FieldContainer",
|
|
2497
|
-
componentId: "kitt-universal__sc-13fkixs-0"
|
|
2498
|
-
})(["padding:5px 0 10px;"]);
|
|
2499
|
-
const FeedbackContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
2500
|
-
displayName: "InputField__FeedbackContainer",
|
|
2501
|
-
componentId: "kitt-universal__sc-13fkixs-1"
|
|
2502
|
-
})(["", ";"], ({
|
|
2503
|
-
theme
|
|
2504
|
-
}) => theme.responsive.ifWindowSizeMatches({
|
|
2505
|
-
minWidth: KittBreakpoints.SMALL
|
|
2506
|
-
}, 'padding-top: 10px', 'padding-top: 5px'));
|
|
2507
|
-
const FieldLabelContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
2508
|
-
displayName: "InputField__FieldLabelContainer",
|
|
2509
|
-
componentId: "kitt-universal__sc-13fkixs-2"
|
|
2510
|
-
})(["flex-direction:row;align-items:center;padding-bottom:", "px;"], ({
|
|
2511
|
-
theme
|
|
2512
|
-
}) => theme.kitt.forms.inputField.labelContainerPaddingBottom);
|
|
2513
|
-
const LabelContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
2514
|
-
displayName: "InputField__LabelContainer",
|
|
2515
|
-
componentId: "kitt-universal__sc-13fkixs-3"
|
|
2516
|
-
})(["margin-right:", "px;"], ({
|
|
2517
|
-
theme
|
|
2518
|
-
}) => theme.kitt.forms.inputField.iconMarginLeft);
|
|
2519
2440
|
function InputField({
|
|
2520
2441
|
label,
|
|
2521
2442
|
labelFeedback,
|
|
2522
2443
|
input,
|
|
2523
2444
|
feedback
|
|
2524
2445
|
}) {
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2446
|
+
const theme = /*#__PURE__*/styled.useTheme();
|
|
2447
|
+
return /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
2448
|
+
paddingTop: theme.kitt.forms.inputField.containerPaddingTop,
|
|
2449
|
+
paddingBottom: theme.kitt.forms.inputField.containerPaddingBottom,
|
|
2450
|
+
children: [label ? /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
2451
|
+
flexDirection: "row",
|
|
2452
|
+
alignItems: "center",
|
|
2453
|
+
paddingBottom: theme.kitt.forms.inputField.labelContainerPaddingBottom,
|
|
2454
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(View, {
|
|
2455
|
+
marginRight: theme.kitt.forms.inputField.labelFeedbackMarginLeft,
|
|
2528
2456
|
children: label
|
|
2529
2457
|
}), labelFeedback]
|
|
2530
|
-
}) : null, input, feedback ? /*#__PURE__*/jsxRuntime.jsx(
|
|
2458
|
+
}) : null, input, feedback ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
2459
|
+
paddingTop: theme.kitt.forms.inputField.feedbackPaddingTop,
|
|
2531
2460
|
children: feedback
|
|
2532
2461
|
}) : null]
|
|
2533
2462
|
});
|