@ornikar/kitt-universal 27.9.1-canary.e79ce5a70db58d281f30a0e111ad7cf70d64cdb1.0 → 27.9.1-canary.f2c8ce09203150f3f2cb65aacb7c85ea25435b9f.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/CHANGELOG.md +10 -17
- package/dist/definitions/CardModal/CardModalBody.d.ts +1 -1
- package/dist/definitions/CardModal/CardModalBody.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalHeader.d.ts +3 -17
- package/dist/definitions/CardModal/CardModalHeader.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/Header.d.ts +3 -18
- package/dist/definitions/FullscreenModal/Header.d.ts.map +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts +6 -7
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts.map +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.web.d.ts +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.web.d.ts.map +1 -1
- package/dist/definitions/Picker/Picker.d.ts.map +1 -1
- package/dist/definitions/TopNavBar/TopNavBar.d.ts +5 -3
- package/dist/definitions/TopNavBar/TopNavBar.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/ModalPlatformDateTimePicker.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +4 -8
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +1 -1
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts +1 -1
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +6 -18
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +160 -278
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +160 -278
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +157 -267
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +148 -253
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +158 -268
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +149 -254
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +255 -373
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +286 -398
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +5 -5
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +5 -5
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +5 -5
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +5 -5
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +5 -5
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +5 -5
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +6 -6
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +6 -6
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +28 -28
package/dist/index.es.web.js
CHANGED
|
@@ -10,7 +10,7 @@ import _extends from '@babel/runtime/helpers/extends';
|
|
|
10
10
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
11
11
|
import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
|
|
12
12
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
13
|
-
import { SpinnerGapRegularIcon, UserRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon,
|
|
13
|
+
import { SpinnerGapRegularIcon, UserRegularIcon, XRegularIcon, ArrowLeftRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
|
|
14
14
|
import { createPortal } from 'react-dom';
|
|
15
15
|
import { CSSTransition } from 'react-transition-group';
|
|
16
16
|
import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
|
|
@@ -1816,12 +1816,12 @@ var fullscreenModal = {
|
|
|
1816
1816
|
header: {
|
|
1817
1817
|
height: 56
|
|
1818
1818
|
},
|
|
1819
|
-
|
|
1819
|
+
horizontalPadding: 16,
|
|
1820
1820
|
footer: {
|
|
1821
1821
|
verticalPadding: 12
|
|
1822
1822
|
},
|
|
1823
1823
|
body: {
|
|
1824
|
-
verticalPadding:
|
|
1824
|
+
verticalPadding: 16
|
|
1825
1825
|
},
|
|
1826
1826
|
animation: {
|
|
1827
1827
|
overlay: {
|
|
@@ -1909,8 +1909,8 @@ var icon = {
|
|
|
1909
1909
|
};
|
|
1910
1910
|
|
|
1911
1911
|
var iconButton = {
|
|
1912
|
-
width: button.height
|
|
1913
|
-
height: button.height
|
|
1912
|
+
width: button.height["default"],
|
|
1913
|
+
height: button.height["default"]
|
|
1914
1914
|
};
|
|
1915
1915
|
|
|
1916
1916
|
var listItem = {
|
|
@@ -2624,7 +2624,7 @@ var breakpoints = {
|
|
|
2624
2624
|
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
2625
2625
|
var theme = {
|
|
2626
2626
|
spacing: spacing,
|
|
2627
|
-
getSpacing: function (multiplier) {
|
|
2627
|
+
getSpacing: function getSpacing(multiplier) {
|
|
2628
2628
|
return spacing * multiplier;
|
|
2629
2629
|
},
|
|
2630
2630
|
colors: colors,
|
|
@@ -2643,8 +2643,8 @@ var theme = {
|
|
|
2643
2643
|
forms: forms,
|
|
2644
2644
|
highlight: highlight,
|
|
2645
2645
|
icon: icon,
|
|
2646
|
-
buttonBadge: buttonBadge,
|
|
2647
2646
|
iconButton: iconButton,
|
|
2647
|
+
buttonBadge: buttonBadge,
|
|
2648
2648
|
listItem: listItem,
|
|
2649
2649
|
pageLoader: pageLoader,
|
|
2650
2650
|
picker: picker,
|
|
@@ -2751,7 +2751,7 @@ function ActionCardDisabled(_ref) {
|
|
|
2751
2751
|
});
|
|
2752
2752
|
}
|
|
2753
2753
|
|
|
2754
|
-
var _excluded$
|
|
2754
|
+
var _excluded$Q = ["children", "variant", "borderVariant", "borderRadius", "disabled", "isHovered", "isPressed", "isFocused"];
|
|
2755
2755
|
function ActionCard(_ref) {
|
|
2756
2756
|
var children = _ref.children,
|
|
2757
2757
|
_ref$variant = _ref.variant,
|
|
@@ -2764,7 +2764,7 @@ function ActionCard(_ref) {
|
|
|
2764
2764
|
isHovered = _ref.isHovered,
|
|
2765
2765
|
isPressed = _ref.isPressed,
|
|
2766
2766
|
isFocused = _ref.isFocused,
|
|
2767
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2767
|
+
props = _objectWithoutProperties(_ref, _excluded$Q);
|
|
2768
2768
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
2769
2769
|
children: disabled ? /*#__PURE__*/jsx(ActionCardDisabled, {
|
|
2770
2770
|
borderRadius: borderRadius,
|
|
@@ -2812,7 +2812,7 @@ var ActionCardPressable = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
2812
2812
|
onPress: onPress,
|
|
2813
2813
|
onHoverIn: onHoverIn,
|
|
2814
2814
|
onHoverOut: onHoverOut,
|
|
2815
|
-
children: function (_ref3) {
|
|
2815
|
+
children: function children(_ref3) {
|
|
2816
2816
|
var isHovered = _ref3.isHovered,
|
|
2817
2817
|
isPressed = _ref3.isPressed,
|
|
2818
2818
|
isFocused = _ref3.isFocused;
|
|
@@ -3096,7 +3096,7 @@ var getTypographyTypeWithAncestorValue = function (type, typographyTypeInContext
|
|
|
3096
3096
|
return !!isAllValuesUndefined && !!typographyTypeInContext ? typographyTypeInContext : type;
|
|
3097
3097
|
};
|
|
3098
3098
|
|
|
3099
|
-
var _excluded$
|
|
3099
|
+
var _excluded$P = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
|
|
3100
3100
|
var TypographyFamilyContext = /*#__PURE__*/createContext(null);
|
|
3101
3101
|
var TypographyTypeContext = /*#__PURE__*/createContext(null);
|
|
3102
3102
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
@@ -3220,7 +3220,7 @@ function Typography(_ref2) {
|
|
|
3220
3220
|
} : _ref2$type,
|
|
3221
3221
|
variant = _ref2.variant,
|
|
3222
3222
|
color = _ref2.color,
|
|
3223
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded$
|
|
3223
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded$P);
|
|
3224
3224
|
var sx = useSx();
|
|
3225
3225
|
var typographyFamilyInContext = useContext(TypographyFamilyContext);
|
|
3226
3226
|
var typographyTypeInContext = useContext(TypographyTypeContext);
|
|
@@ -3362,12 +3362,12 @@ function Icon(_ref) {
|
|
|
3362
3362
|
});
|
|
3363
3363
|
}
|
|
3364
3364
|
|
|
3365
|
-
var _excluded$
|
|
3365
|
+
var _excluded$O = ["color", "size"],
|
|
3366
3366
|
_excluded2$6 = ["color"];
|
|
3367
3367
|
function TypographyIconSpecifiedColor(_ref) {
|
|
3368
3368
|
var color = _ref.color,
|
|
3369
3369
|
size = _ref.size,
|
|
3370
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3370
|
+
props = _objectWithoutProperties(_ref, _excluded$O);
|
|
3371
3371
|
var colorValue = getTypographyColorValue(color);
|
|
3372
3372
|
var sx = useSx();
|
|
3373
3373
|
var _sx = sx({
|
|
@@ -3407,7 +3407,7 @@ var getButtonTextColorByType = function (type, variant, isHovered, isPressed, is
|
|
|
3407
3407
|
return "".concat(baseKey, ".default");
|
|
3408
3408
|
};
|
|
3409
3409
|
|
|
3410
|
-
var _excluded$
|
|
3410
|
+
var _excluded$N = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing", "size"];
|
|
3411
3411
|
function ButtonContentChildren(_ref) {
|
|
3412
3412
|
var type = _ref.type,
|
|
3413
3413
|
icon = _ref.icon,
|
|
@@ -3507,7 +3507,7 @@ function ButtonContent(_ref2) {
|
|
|
3507
3507
|
_ref2.isFocused;
|
|
3508
3508
|
var innerSpacing = _ref2.innerSpacing,
|
|
3509
3509
|
size = _ref2.size,
|
|
3510
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
3510
|
+
props = _objectWithoutProperties(_ref2, _excluded$N);
|
|
3511
3511
|
var color = getButtonTextColorByType(type, variant, isHovered, isPressed, isDisabled);
|
|
3512
3512
|
return /*#__PURE__*/jsx(View, {
|
|
3513
3513
|
_web: {
|
|
@@ -3643,7 +3643,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3643
3643
|
onHoverOut: onHoverOut,
|
|
3644
3644
|
onFocus: onFocus,
|
|
3645
3645
|
onBlur: onBlur,
|
|
3646
|
-
children: function (_ref2) {
|
|
3646
|
+
children: function children(_ref2) {
|
|
3647
3647
|
var isHovered = _ref2.isHovered,
|
|
3648
3648
|
isPressed = _ref2.isPressed,
|
|
3649
3649
|
isFocused = _ref2.isFocused;
|
|
@@ -3706,7 +3706,7 @@ function LoaderIcon(_ref) {
|
|
|
3706
3706
|
});
|
|
3707
3707
|
}
|
|
3708
3708
|
|
|
3709
|
-
var _excluded$
|
|
3709
|
+
var _excluded$M = ["as", "onPress", "disabled", "icon", "stretch"];
|
|
3710
3710
|
var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
3711
3711
|
var as = _ref.as,
|
|
3712
3712
|
onPress = _ref.onPress,
|
|
@@ -3717,7 +3717,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3717
3717
|
base: true,
|
|
3718
3718
|
medium: false
|
|
3719
3719
|
} : _ref$stretch,
|
|
3720
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3720
|
+
props = _objectWithoutProperties(_ref, _excluded$M);
|
|
3721
3721
|
var _useState = useState(false),
|
|
3722
3722
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3723
3723
|
isLoading = _useState2[0],
|
|
@@ -3740,7 +3740,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3740
3740
|
stretch: stretch,
|
|
3741
3741
|
disabled: isLoading ? true : disabled,
|
|
3742
3742
|
icon: isLoading ? /*#__PURE__*/jsx(LoaderIcon, {}) : icon,
|
|
3743
|
-
onPress: function (e) {
|
|
3743
|
+
onPress: function handlePress(e) {
|
|
3744
3744
|
var callPressAndUpdateLoadingState = /*#__PURE__*/function () {
|
|
3745
3745
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3746
3746
|
return _regeneratorRuntime().wrap(function (_context) {
|
|
@@ -3795,7 +3795,7 @@ function ActionsButton(_ref) {
|
|
|
3795
3795
|
}, props));
|
|
3796
3796
|
}
|
|
3797
3797
|
|
|
3798
|
-
var _excluded$
|
|
3798
|
+
var _excluded$L = ["children", "layout", "reversed"];
|
|
3799
3799
|
function getCurrentLayout(layout) {
|
|
3800
3800
|
if (!layout) return {
|
|
3801
3801
|
base: 'stretch',
|
|
@@ -3827,7 +3827,7 @@ function Actions(_ref) {
|
|
|
3827
3827
|
reversed = _ref$reversed === void 0 ? {
|
|
3828
3828
|
base: false
|
|
3829
3829
|
} : _ref$reversed,
|
|
3830
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3830
|
+
props = _objectWithoutProperties(_ref, _excluded$L);
|
|
3831
3831
|
var shouldReverse = typeof reversed === 'boolean' ? {
|
|
3832
3832
|
base: !!reversed
|
|
3833
3833
|
} : createResponsiveStyleFromProp(reversed, true, false);
|
|
@@ -3880,7 +3880,7 @@ function getInitials(firstname, lastname) {
|
|
|
3880
3880
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
3881
3881
|
}
|
|
3882
3882
|
|
|
3883
|
-
var _excluded$
|
|
3883
|
+
var _excluded$K = ["size", "round", "light", "sizeVariant", "width", "height", "dark", "disabled"];
|
|
3884
3884
|
function AvatarContent(_ref) {
|
|
3885
3885
|
var size = _ref.size,
|
|
3886
3886
|
src = _ref.src,
|
|
@@ -3943,7 +3943,7 @@ function Avatar(_ref2) {
|
|
|
3943
3943
|
height = _ref2.height,
|
|
3944
3944
|
dark = _ref2.dark,
|
|
3945
3945
|
disabled = _ref2.disabled,
|
|
3946
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
3946
|
+
props = _objectWithoutProperties(_ref2, _excluded$K);
|
|
3947
3947
|
var currentSize = getCurrentSize({
|
|
3948
3948
|
size: size,
|
|
3949
3949
|
sizeVariant: sizeVariant
|
|
@@ -4069,7 +4069,7 @@ function CloseButton$1(_ref) {
|
|
|
4069
4069
|
onPress = _ref.onPress;
|
|
4070
4070
|
var onCloseContextCallback = useOnCloseModalBehaviour();
|
|
4071
4071
|
return /*#__PURE__*/cloneElement(children, {
|
|
4072
|
-
onPress: function () {
|
|
4072
|
+
onPress: function handleClose() {
|
|
4073
4073
|
if (onPress) onPress();
|
|
4074
4074
|
onCloseContextCallback();
|
|
4075
4075
|
}
|
|
@@ -4126,7 +4126,7 @@ function CardModalRotationContainer(props) {
|
|
|
4126
4126
|
}, props));
|
|
4127
4127
|
}
|
|
4128
4128
|
|
|
4129
|
-
var _excluded$
|
|
4129
|
+
var _excluded$J = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
|
|
4130
4130
|
var contentAnimationEnter$1 = "kitt-u_contentAnimationEnter_c11xxy4r";
|
|
4131
4131
|
var contentAnimatioEnterActive$1 = "kitt-u_contentAnimatioEnterActive_cl52117";
|
|
4132
4132
|
var contentAnimatioExit$1 = "kitt-u_contentAnimatioExit_cyjczep";
|
|
@@ -4165,7 +4165,7 @@ function CardModalAnimation(_ref) {
|
|
|
4165
4165
|
onExit = _ref.onExit,
|
|
4166
4166
|
onExited = _ref.onExited,
|
|
4167
4167
|
onClose = _ref.onClose,
|
|
4168
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4168
|
+
props = _objectWithoutProperties(_ref, _excluded$J);
|
|
4169
4169
|
var theme = useTheme();
|
|
4170
4170
|
var animation = theme.kitt.cardModal.animation;
|
|
4171
4171
|
var sharedProps = {
|
|
@@ -4198,13 +4198,13 @@ function CardModalAnimation(_ref) {
|
|
|
4198
4198
|
}));
|
|
4199
4199
|
}
|
|
4200
4200
|
|
|
4201
|
-
var _excluded$
|
|
4201
|
+
var _excluded$I = ["children", "visible", "onClose", "onExited"];
|
|
4202
4202
|
function CardModalBehaviour(_ref) {
|
|
4203
4203
|
var children = _ref.children,
|
|
4204
4204
|
visible = _ref.visible,
|
|
4205
4205
|
onClose = _ref.onClose,
|
|
4206
4206
|
onExited = _ref.onExited,
|
|
4207
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4207
|
+
props = _objectWithoutProperties(_ref, _excluded$I);
|
|
4208
4208
|
var _useState = useState(visible),
|
|
4209
4209
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4210
4210
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -4219,7 +4219,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4219
4219
|
onClose: onClose,
|
|
4220
4220
|
children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4221
4221
|
visible: visible,
|
|
4222
|
-
onExited: function () {
|
|
4222
|
+
onExited: function handleExitAnimationDone() {
|
|
4223
4223
|
if (onExited) onExited();
|
|
4224
4224
|
setIsModalBehaviourVisible(false);
|
|
4225
4225
|
},
|
|
@@ -4229,32 +4229,23 @@ function CardModalBehaviour(_ref) {
|
|
|
4229
4229
|
});
|
|
4230
4230
|
}
|
|
4231
4231
|
|
|
4232
|
-
var _excluded$
|
|
4232
|
+
var _excluded$H = ["children", "padding"];
|
|
4233
4233
|
function CardModalBody(_ref) {
|
|
4234
4234
|
var children = _ref.children,
|
|
4235
|
-
_ref$
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
medium: 'kitt.6'
|
|
4239
|
-
} : _ref$paddingX,
|
|
4240
|
-
_ref$paddingY = _ref.paddingY,
|
|
4241
|
-
paddingY = _ref$paddingY === void 0 ? {
|
|
4242
|
-
base: 'kitt.4',
|
|
4243
|
-
medium: 'kitt.6'
|
|
4244
|
-
} : _ref$paddingY,
|
|
4245
|
-
props = _objectWithoutProperties(_ref, _excluded$I);
|
|
4235
|
+
_ref$padding = _ref.padding,
|
|
4236
|
+
padding = _ref$padding === void 0 ? 'kitt.4' : _ref$padding,
|
|
4237
|
+
props = _objectWithoutProperties(_ref, _excluded$H);
|
|
4246
4238
|
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
4247
4239
|
showsVerticalScrollIndicator: false,
|
|
4248
4240
|
_contentContainerStyle: {
|
|
4249
|
-
|
|
4250
|
-
paddingY: paddingY
|
|
4241
|
+
padding: padding
|
|
4251
4242
|
}
|
|
4252
4243
|
}, props), {}, {
|
|
4253
4244
|
children: children
|
|
4254
4245
|
}));
|
|
4255
4246
|
}
|
|
4256
4247
|
|
|
4257
|
-
var _excluded$
|
|
4248
|
+
var _excluded$G = ["children", "padding", "hasSeparator"];
|
|
4258
4249
|
function CardModalFooter(_ref) {
|
|
4259
4250
|
var children = _ref.children,
|
|
4260
4251
|
_ref$padding = _ref.padding,
|
|
@@ -4264,7 +4255,7 @@ function CardModalFooter(_ref) {
|
|
|
4264
4255
|
} : _ref$padding,
|
|
4265
4256
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
4266
4257
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
4267
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4258
|
+
props = _objectWithoutProperties(_ref, _excluded$G);
|
|
4268
4259
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4269
4260
|
marginTop: "kitt.2",
|
|
4270
4261
|
padding: padding,
|
|
@@ -4278,58 +4269,152 @@ function CardModalFooter(_ref) {
|
|
|
4278
4269
|
}));
|
|
4279
4270
|
}
|
|
4280
4271
|
|
|
4281
|
-
var
|
|
4282
|
-
|
|
4283
|
-
|
|
4272
|
+
var getButtonTypeAndVariant = function (iconColor) {
|
|
4273
|
+
switch (iconColor) {
|
|
4274
|
+
case 'black':
|
|
4275
|
+
return {
|
|
4276
|
+
type: 'tertiary'
|
|
4277
|
+
};
|
|
4278
|
+
case 'secondary':
|
|
4279
|
+
return {
|
|
4280
|
+
type: 'secondary'
|
|
4281
|
+
};
|
|
4282
|
+
case 'primary':
|
|
4283
|
+
return {
|
|
4284
|
+
type: 'primary'
|
|
4285
|
+
};
|
|
4286
|
+
case 'primary-plain':
|
|
4287
|
+
return {
|
|
4288
|
+
type: 'primary'
|
|
4289
|
+
};
|
|
4290
|
+
case 'ghost':
|
|
4291
|
+
return {
|
|
4292
|
+
type: 'tertiary',
|
|
4293
|
+
variant: 'revert'
|
|
4294
|
+
};
|
|
4295
|
+
default:
|
|
4296
|
+
return {
|
|
4297
|
+
type: 'secondary'
|
|
4298
|
+
};
|
|
4299
|
+
}
|
|
4300
|
+
};
|
|
4301
|
+
|
|
4302
|
+
var _excluded$F = ["color", "ariaLabel"];
|
|
4303
|
+
/**
|
|
4304
|
+
* @deprecated IconButton should only be used as a navigation button
|
|
4305
|
+
* Other use cases should use a <Button> component with an icon
|
|
4306
|
+
*/
|
|
4307
|
+
function IconButton(_ref) {
|
|
4308
|
+
var _ref$color = _ref.color,
|
|
4309
|
+
color = _ref$color === void 0 ? 'black' : _ref$color;
|
|
4310
|
+
_ref.ariaLabel;
|
|
4311
|
+
var props = _objectWithoutProperties(_ref, _excluded$F);
|
|
4312
|
+
var _getButtonTypeAndVari = getButtonTypeAndVariant(color),
|
|
4313
|
+
legacyColorToType = _getButtonTypeAndVari.type,
|
|
4314
|
+
legacyColorToVariant = _getButtonTypeAndVari.variant;
|
|
4315
|
+
return /*#__PURE__*/jsx(Button, _objectSpread({
|
|
4316
|
+
variant: legacyColorToVariant,
|
|
4317
|
+
type: legacyColorToType
|
|
4318
|
+
}, props));
|
|
4319
|
+
}
|
|
4320
|
+
function CloseIconButton(props) {
|
|
4321
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4322
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
4323
|
+
}, props));
|
|
4324
|
+
}
|
|
4325
|
+
|
|
4326
|
+
function TopNavBar(_ref) {
|
|
4327
|
+
var left = _ref.left,
|
|
4328
|
+
right = _ref.right,
|
|
4284
4329
|
title = _ref.title,
|
|
4285
|
-
_ref$
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4330
|
+
_ref$titleAlign = _ref.titleAlign,
|
|
4331
|
+
titleAlign = _ref$titleAlign === void 0 ? 'center' : _ref$titleAlign,
|
|
4332
|
+
stickers = _ref.stickers,
|
|
4333
|
+
_ref$mode = _ref.mode,
|
|
4334
|
+
mode = _ref$mode === void 0 ? 'default' : _ref$mode,
|
|
4290
4335
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
4291
4336
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
var
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
padding: paddingBottom,
|
|
4301
|
-
borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4302
|
-
borderColor: "kitt.separator",
|
|
4303
|
-
justifyContent: "center",
|
|
4337
|
+
backgroundColor = _ref.backgroundColor,
|
|
4338
|
+
testID = _ref.testID;
|
|
4339
|
+
var isLargeTitleMode = mode === 'largeTitle';
|
|
4340
|
+
var leftEmptySpace = !left && titleAlign === 'left' ? null : /*#__PURE__*/jsx(View, {
|
|
4341
|
+
width: "kitt.iconButton.width"
|
|
4342
|
+
});
|
|
4343
|
+
return /*#__PURE__*/jsxs(VStack, {
|
|
4344
|
+
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
4304
4345
|
width: "100%",
|
|
4305
|
-
height:
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4346
|
+
height: mode === 'default' ? 56 : undefined,
|
|
4347
|
+
justifyContent: "center",
|
|
4348
|
+
paddingX: "kitt.2",
|
|
4349
|
+
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
4350
|
+
paddingBottom: "kitt.3",
|
|
4351
|
+
backgroundColor: backgroundColor,
|
|
4352
|
+
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
4353
|
+
borderColor: "kitt.separator",
|
|
4354
|
+
testID: testID,
|
|
4355
|
+
children: [/*#__PURE__*/jsxs(HStack, {
|
|
4309
4356
|
alignItems: "center",
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
children: [left ? /*#__PURE__*/jsx(View, {
|
|
4313
|
-
width: "kitt.iconButton.width",
|
|
4314
|
-
children: left
|
|
4315
|
-
}) : null, /*#__PURE__*/jsxs(View, {
|
|
4357
|
+
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
4358
|
+
children: [left !== null && left !== void 0 ? left : leftEmptySpace, mode === 'default' ? /*#__PURE__*/jsx(View, {
|
|
4316
4359
|
flexGrow: "1",
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4360
|
+
flexShrink: 1,
|
|
4361
|
+
paddingRight: "kitt.2",
|
|
4362
|
+
paddingLeft: "kitt.2",
|
|
4363
|
+
children: title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
4364
|
+
textAlign: titleAlign,
|
|
4321
4365
|
variant: "bold",
|
|
4366
|
+
ellipsizeMode: "tail",
|
|
4367
|
+
numberOfLines: 1,
|
|
4322
4368
|
children: title
|
|
4323
|
-
}) : null
|
|
4324
|
-
}), right ? /*#__PURE__*/jsx(View, {
|
|
4325
|
-
width: "kitt.iconButton.width"
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4369
|
+
}) : null
|
|
4370
|
+
}) : null, right !== null && right !== void 0 ? right : /*#__PURE__*/jsx(View, {
|
|
4371
|
+
width: "kitt.iconButton.width"
|
|
4372
|
+
})]
|
|
4373
|
+
}), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
|
|
4374
|
+
space: "kitt.4",
|
|
4375
|
+
paddingX: "kitt.2",
|
|
4376
|
+
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
4377
|
+
width: "100%",
|
|
4378
|
+
space: "kitt.1",
|
|
4379
|
+
flexShrink: 1,
|
|
4380
|
+
flexWrap: "wrap",
|
|
4381
|
+
style: {
|
|
4382
|
+
rowGap: theme.getSpacing(1)
|
|
4383
|
+
},
|
|
4384
|
+
children: stickers.map(function (sticker, index) {
|
|
4385
|
+
return (
|
|
4386
|
+
/*#__PURE__*/
|
|
4387
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
4388
|
+
jsx(View, {
|
|
4389
|
+
children: sticker
|
|
4390
|
+
}, index)
|
|
4391
|
+
);
|
|
4392
|
+
})
|
|
4393
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
4394
|
+
base: "heading-m",
|
|
4395
|
+
children: title
|
|
4396
|
+
})]
|
|
4397
|
+
}) : null]
|
|
4398
|
+
});
|
|
4330
4399
|
}
|
|
4400
|
+
function CloseButton(props) {
|
|
4401
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4402
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
4403
|
+
}, props));
|
|
4404
|
+
}
|
|
4405
|
+
function BackButton(props) {
|
|
4406
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4407
|
+
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
|
|
4408
|
+
}, props));
|
|
4409
|
+
}
|
|
4410
|
+
TopNavBar.CloseButton = CloseButton;
|
|
4411
|
+
TopNavBar.BackButton = BackButton;
|
|
4331
4412
|
|
|
4332
|
-
|
|
4413
|
+
function CardModalHeader(props) {
|
|
4414
|
+
return /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props));
|
|
4415
|
+
}
|
|
4416
|
+
|
|
4417
|
+
var _excluded$E = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
4333
4418
|
function CardModal(_ref) {
|
|
4334
4419
|
var _ref$backgroundColor = _ref.backgroundColor,
|
|
4335
4420
|
backgroundColor = _ref$backgroundColor === void 0 ? 'kitt.uiBackgroundLight' : _ref$backgroundColor,
|
|
@@ -4340,7 +4425,7 @@ function CardModal(_ref) {
|
|
|
4340
4425
|
header = _ref.header,
|
|
4341
4426
|
body = _ref.body,
|
|
4342
4427
|
footer = _ref.footer,
|
|
4343
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4428
|
+
props = _objectWithoutProperties(_ref, _excluded$E);
|
|
4344
4429
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4345
4430
|
overflow: "hidden",
|
|
4346
4431
|
backgroundColor: backgroundColor,
|
|
@@ -4427,8 +4512,8 @@ function AnimatedChoiceItemView(_ref) {
|
|
|
4427
4512
|
|
|
4428
4513
|
var useNativeAnimation$3 = function () {
|
|
4429
4514
|
return {
|
|
4430
|
-
onPressIn: function () {},
|
|
4431
|
-
onPressOut: function () {},
|
|
4515
|
+
onPressIn: function onPressIn() {},
|
|
4516
|
+
onPressOut: function onPressOut() {},
|
|
4432
4517
|
backgroundStyles: undefined
|
|
4433
4518
|
};
|
|
4434
4519
|
};
|
|
@@ -4485,7 +4570,7 @@ function ChoiceItem(_ref) {
|
|
|
4485
4570
|
style: style,
|
|
4486
4571
|
onBlur: onBlur,
|
|
4487
4572
|
onFocus: onFocus,
|
|
4488
|
-
onPress: function (e) {
|
|
4573
|
+
onPress: function handlePress(e) {
|
|
4489
4574
|
if (onFocus) onFocus(e);
|
|
4490
4575
|
if (onPress) onPress();
|
|
4491
4576
|
handleChange();
|
|
@@ -4493,7 +4578,7 @@ function ChoiceItem(_ref) {
|
|
|
4493
4578
|
},
|
|
4494
4579
|
onPressIn: onPressIn,
|
|
4495
4580
|
onPressOut: onPressOut,
|
|
4496
|
-
children: function (_ref2) {
|
|
4581
|
+
children: function children(_ref2) {
|
|
4497
4582
|
var isHovered = _ref2.isHovered,
|
|
4498
4583
|
isPressed = _ref2.isPressed;
|
|
4499
4584
|
var textColor = getCurrentTextColor$1({
|
|
@@ -4555,11 +4640,11 @@ function ChoiceItemContainer(_ref) {
|
|
|
4555
4640
|
}));
|
|
4556
4641
|
}
|
|
4557
4642
|
|
|
4558
|
-
var _excluded$
|
|
4643
|
+
var _excluded$D = ["direction", "contentContainerStyle"];
|
|
4559
4644
|
function ChoicesContainer(_ref) {
|
|
4560
4645
|
var direction = _ref.direction,
|
|
4561
4646
|
contentContainerStyle = _ref.contentContainerStyle,
|
|
4562
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4647
|
+
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
4563
4648
|
if (direction === 'row') {
|
|
4564
4649
|
return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
|
|
4565
4650
|
horizontal: true,
|
|
@@ -4597,7 +4682,7 @@ function Choices(_ref2) {
|
|
|
4597
4682
|
type: type,
|
|
4598
4683
|
disabled: disabled,
|
|
4599
4684
|
onPress: !isForm ? onPress : undefined,
|
|
4600
|
-
onChange: isForm ? function (newValue) {
|
|
4685
|
+
onChange: isForm ? function handleChange(newValue) {
|
|
4601
4686
|
setCurrentValue(newValue);
|
|
4602
4687
|
if (onChange) onChange(newValue);
|
|
4603
4688
|
} : undefined,
|
|
@@ -4634,7 +4719,7 @@ var ChoicesElements = {
|
|
|
4634
4719
|
ButtonChoices: ButtonChoices
|
|
4635
4720
|
};
|
|
4636
4721
|
|
|
4637
|
-
var _excluded$
|
|
4722
|
+
var _excluded$C = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
|
|
4638
4723
|
var contentAnimationEnter = "kitt-u_contentAnimationEnter_c1i0gle8";
|
|
4639
4724
|
var contentAnimatioEnterActive = "kitt-u_contentAnimatioEnterActive_c1jmfkjw";
|
|
4640
4725
|
var contentAnimatioExit = "kitt-u_contentAnimatioExit_cwjstxl";
|
|
@@ -4673,7 +4758,7 @@ function DialogModalAnimation(_ref) {
|
|
|
4673
4758
|
onExit = _ref.onExit,
|
|
4674
4759
|
onExited = _ref.onExited,
|
|
4675
4760
|
onClose = _ref.onClose,
|
|
4676
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4761
|
+
props = _objectWithoutProperties(_ref, _excluded$C);
|
|
4677
4762
|
var theme = useTheme();
|
|
4678
4763
|
var animation = theme.kitt.dialogModal.animation;
|
|
4679
4764
|
var sharedProps = {
|
|
@@ -4708,13 +4793,13 @@ function DialogModalAnimation(_ref) {
|
|
|
4708
4793
|
}));
|
|
4709
4794
|
}
|
|
4710
4795
|
|
|
4711
|
-
var _excluded$
|
|
4796
|
+
var _excluded$B = ["children", "visible", "onClose", "onExited"];
|
|
4712
4797
|
function DialogModalBehaviour(_ref) {
|
|
4713
4798
|
var children = _ref.children,
|
|
4714
4799
|
visible = _ref.visible,
|
|
4715
4800
|
onClose = _ref.onClose,
|
|
4716
4801
|
onExited = _ref.onExited,
|
|
4717
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4802
|
+
props = _objectWithoutProperties(_ref, _excluded$B);
|
|
4718
4803
|
var _useState = useState(visible),
|
|
4719
4804
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4720
4805
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -4734,7 +4819,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4734
4819
|
},
|
|
4735
4820
|
children: /*#__PURE__*/jsx(DialogModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4736
4821
|
visible: visible,
|
|
4737
|
-
onExited: function () {
|
|
4822
|
+
onExited: function handleExitAnimationDone() {
|
|
4738
4823
|
if (onExited) onExited();
|
|
4739
4824
|
setIsModalBehaviourVisible(false);
|
|
4740
4825
|
},
|
|
@@ -4745,7 +4830,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4745
4830
|
});
|
|
4746
4831
|
}
|
|
4747
4832
|
|
|
4748
|
-
var _excluded$
|
|
4833
|
+
var _excluded$A = ["stretch"];
|
|
4749
4834
|
function DialogModal(_ref) {
|
|
4750
4835
|
var illustration = _ref.illustration,
|
|
4751
4836
|
title = _ref.title,
|
|
@@ -4785,7 +4870,7 @@ DialogModal.ModalBehaviour = DialogModalBehaviour;
|
|
|
4785
4870
|
function DialogModalButton(_ref2) {
|
|
4786
4871
|
var _ref2$stretch = _ref2.stretch,
|
|
4787
4872
|
stretch = _ref2$stretch === void 0 ? true : _ref2$stretch,
|
|
4788
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
4873
|
+
props = _objectWithoutProperties(_ref2, _excluded$A);
|
|
4789
4874
|
return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
|
|
4790
4875
|
stretch: stretch
|
|
4791
4876
|
}, props));
|
|
@@ -4822,7 +4907,7 @@ function Emoji(_ref) {
|
|
|
4822
4907
|
});
|
|
4823
4908
|
}
|
|
4824
4909
|
|
|
4825
|
-
var _excluded$
|
|
4910
|
+
var _excluded$z = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
|
|
4826
4911
|
_excluded2$5 = ["phoneNumber", "children"],
|
|
4827
4912
|
_excluded3$4 = ["phoneNumber", "children"],
|
|
4828
4913
|
_excluded4$3 = ["emailAddress", "children"];
|
|
@@ -4832,7 +4917,7 @@ function ExternalAppLink(_ref) {
|
|
|
4832
4917
|
appValue = _ref.appValue,
|
|
4833
4918
|
onPress = _ref.onPress,
|
|
4834
4919
|
onOpenAppError = _ref.onOpenAppError,
|
|
4835
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
4920
|
+
rest = _objectWithoutProperties(_ref, _excluded$z);
|
|
4836
4921
|
var href = "".concat(appScheme, ":").concat(appValue);
|
|
4837
4922
|
var handleOnPress = /*#__PURE__*/function () {
|
|
4838
4923
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
@@ -4927,14 +5012,14 @@ var defaultOpenLinkBehavior = {
|
|
|
4927
5012
|
web: 'targetBlank'
|
|
4928
5013
|
};
|
|
4929
5014
|
|
|
4930
|
-
var _excluded$
|
|
5015
|
+
var _excluded$y = ["as", "href", "openLinkBehavior", "onPress"];
|
|
4931
5016
|
function ExternalLink(_ref) {
|
|
4932
5017
|
var Component = _ref.as,
|
|
4933
5018
|
href = _ref.href,
|
|
4934
5019
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
4935
5020
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
4936
5021
|
onPress = _ref.onPress,
|
|
4937
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5022
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
4938
5023
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
4939
5024
|
accessibilityRole: "link",
|
|
4940
5025
|
href: href,
|
|
@@ -5010,7 +5095,7 @@ function InputTextContainer(props) {
|
|
|
5010
5095
|
}, props));
|
|
5011
5096
|
}
|
|
5012
5097
|
|
|
5013
|
-
var _excluded$
|
|
5098
|
+
var _excluded$x = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "inputMode", "multiline", "height", "onSubmitEditing"];
|
|
5014
5099
|
var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5015
5100
|
var id = _ref.id,
|
|
5016
5101
|
right = _ref.right;
|
|
@@ -5031,7 +5116,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5031
5116
|
multiline = _ref.multiline,
|
|
5032
5117
|
height = _ref.height,
|
|
5033
5118
|
onSubmitEditing = _ref.onSubmitEditing,
|
|
5034
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5119
|
+
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
5035
5120
|
var theme = useTheme();
|
|
5036
5121
|
var fontSizeForNativeBase = createNativeBaseFontSize({
|
|
5037
5122
|
base: 'body-m'
|
|
@@ -5155,12 +5240,12 @@ function AutocompleteItemsListContainer(_ref) {
|
|
|
5155
5240
|
});
|
|
5156
5241
|
}
|
|
5157
5242
|
|
|
5158
|
-
var _excluded$
|
|
5243
|
+
var _excluded$w = ["children", "testID"];
|
|
5159
5244
|
function AutocompleteOption(_ref) {
|
|
5160
5245
|
var children = _ref.children,
|
|
5161
5246
|
_ref$testID = _ref.testID,
|
|
5162
5247
|
testID = _ref$testID === void 0 ? 'kitt.Autocomplete.option' : _ref$testID,
|
|
5163
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5248
|
+
props = _objectWithoutProperties(_ref, _excluded$w);
|
|
5164
5249
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
5165
5250
|
paddingX: {
|
|
5166
5251
|
base: 'kitt.2',
|
|
@@ -5173,7 +5258,7 @@ function AutocompleteOption(_ref) {
|
|
|
5173
5258
|
}));
|
|
5174
5259
|
}
|
|
5175
5260
|
|
|
5176
|
-
var _excluded$
|
|
5261
|
+
var _excluded$v = ["children", "name", "disabled", "placeholder", "isInitialOpen", "initialValue", "containerProps", "filterItemBasedOnCurrentInputValue", "checkSelectedItem", "itemToString", "right", "onChange", "onFocus", "onBlur", "onInputChange", "onSelectItem", "onOuterPress", "errorElement", "emptyResultsElement", "inputTestID", "listContainerTestID", "zIndex", "maxItemContainerHeight"],
|
|
5177
5262
|
_excluded2$4 = ["onClick", "onPress"],
|
|
5178
5263
|
_excluded3$3 = ["onKeyDown", "onFocus", "onBlur", "onChange"],
|
|
5179
5264
|
_excluded4$2 = ["onClick", "onPress", "role", "aria-selected"];
|
|
@@ -5181,7 +5266,7 @@ function isReactElement(element) {
|
|
|
5181
5266
|
return _typeof(element) === 'object' && element !== null && 'type' in element && 'props' in element;
|
|
5182
5267
|
}
|
|
5183
5268
|
function Autocomplete(_ref) {
|
|
5184
|
-
var
|
|
5269
|
+
var _children = _ref.children,
|
|
5185
5270
|
name = _ref.name,
|
|
5186
5271
|
disabled = _ref.disabled,
|
|
5187
5272
|
placeholder = _ref.placeholder,
|
|
@@ -5207,8 +5292,8 @@ function Autocomplete(_ref) {
|
|
|
5207
5292
|
_ref$zIndex = _ref.zIndex,
|
|
5208
5293
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5209
5294
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5210
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5211
|
-
var childrenArray = Children.toArray(
|
|
5295
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
5296
|
+
var childrenArray = Children.toArray(_children);
|
|
5212
5297
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5213
5298
|
return {
|
|
5214
5299
|
child: child,
|
|
@@ -5219,12 +5304,12 @@ function Autocomplete(_ref) {
|
|
|
5219
5304
|
defaultIsOpen: isInitialOpen,
|
|
5220
5305
|
initialSelectedItem: initialValue,
|
|
5221
5306
|
initialInputValue: initialValue ? itemToString(initialValue) : undefined,
|
|
5222
|
-
itemToString: function (item) {
|
|
5307
|
+
itemToString: function handleItemToString(item) {
|
|
5223
5308
|
// Prevents returning null values
|
|
5224
5309
|
if (!itemToString) return '';
|
|
5225
5310
|
return itemToString(item || undefined);
|
|
5226
5311
|
},
|
|
5227
|
-
stateReducer: function (state, changes) {
|
|
5312
|
+
stateReducer: function stateReducer(state, changes) {
|
|
5228
5313
|
switch (changes.type) {
|
|
5229
5314
|
case Downshift.stateChangeTypes.changeInput:
|
|
5230
5315
|
return _objectSpread(_objectSpread({}, changes), {}, {
|
|
@@ -5234,7 +5319,7 @@ function Autocomplete(_ref) {
|
|
|
5234
5319
|
return changes;
|
|
5235
5320
|
}
|
|
5236
5321
|
},
|
|
5237
|
-
onChange: function (selectedItem, stateAndHelpers) {
|
|
5322
|
+
onChange: function onChange(selectedItem, stateAndHelpers) {
|
|
5238
5323
|
if (_onChange) {
|
|
5239
5324
|
_onChange(selectedItem, stateAndHelpers);
|
|
5240
5325
|
}
|
|
@@ -5242,7 +5327,7 @@ function Autocomplete(_ref) {
|
|
|
5242
5327
|
onSelect: onSelectItem,
|
|
5243
5328
|
onOuterClick: onOuterPress,
|
|
5244
5329
|
onInputValueChange: onInputChange,
|
|
5245
|
-
children: function (_ref2) {
|
|
5330
|
+
children: function children(_ref2) {
|
|
5246
5331
|
var getRootProps = _ref2.getRootProps,
|
|
5247
5332
|
getInputProps = _ref2.getInputProps,
|
|
5248
5333
|
getMenuProps = _ref2.getMenuProps,
|
|
@@ -5294,20 +5379,20 @@ function Autocomplete(_ref) {
|
|
|
5294
5379
|
right: right || (canDisplayCollapseButton ? /*#__PURE__*/jsx(InputPressable, _objectSpread(_objectSpread({}, toggleProps), {}, {
|
|
5295
5380
|
testID: "kitt.Autocomplete.listToggle",
|
|
5296
5381
|
hitSlop: 40,
|
|
5297
|
-
onPress: function (e) {
|
|
5382
|
+
onPress: function handleTogglePress(e) {
|
|
5298
5383
|
onClickToggle(e);
|
|
5299
5384
|
},
|
|
5300
5385
|
children: /*#__PURE__*/jsx(InputIcon, {
|
|
5301
5386
|
icon: isCurrentlyOpen ? /*#__PURE__*/jsx(CaretUpFillIcon, {}) : /*#__PURE__*/jsx(CaretDownFillIcon, {})
|
|
5302
5387
|
})
|
|
5303
5388
|
})) : null),
|
|
5304
|
-
onFocus: function (e) {
|
|
5389
|
+
onFocus: function onFocus(e) {
|
|
5305
5390
|
openMenu();
|
|
5306
5391
|
/** @ts-expect-error onFocus wants web events */
|
|
5307
5392
|
if (onSearchInputFocus) onSearchInputFocus(e);
|
|
5308
5393
|
if (_onFocus) _onFocus(e);
|
|
5309
5394
|
},
|
|
5310
|
-
onBlur: function (e) {
|
|
5395
|
+
onBlur: function onBlur(e) {
|
|
5311
5396
|
/** @ts-expect-error onBlur wants web events */
|
|
5312
5397
|
if (onSearchInputBlur) onSearchInputBlur(e);
|
|
5313
5398
|
|
|
@@ -5343,10 +5428,10 @@ function Autocomplete(_ref) {
|
|
|
5343
5428
|
selected: ariaSelected
|
|
5344
5429
|
},
|
|
5345
5430
|
disabled: disabled,
|
|
5346
|
-
onPress: function (e) {
|
|
5431
|
+
onPress: function onPress(e) {
|
|
5347
5432
|
if (onClick) onClick(e);
|
|
5348
5433
|
},
|
|
5349
|
-
children: function (_ref5) {
|
|
5434
|
+
children: function children(_ref5) {
|
|
5350
5435
|
var isHovered = _ref5.isHovered,
|
|
5351
5436
|
isFocused = _ref5.isFocused,
|
|
5352
5437
|
isPressed = _ref5.isPressed;
|
|
@@ -5414,7 +5499,7 @@ function getBorderColor$1(_ref) {
|
|
|
5414
5499
|
return 'kitt.forms.checkbox.default.borderColor';
|
|
5415
5500
|
}
|
|
5416
5501
|
|
|
5417
|
-
var _excluded$
|
|
5502
|
+
var _excluded$u = ["checked", "hitSlop", "children", "disabled", "onChange", "onBlur", "onFocus"];
|
|
5418
5503
|
var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5419
5504
|
var checked = _ref.checked,
|
|
5420
5505
|
_ref$hitSlop = _ref.hitSlop,
|
|
@@ -5424,7 +5509,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5424
5509
|
onChange = _ref.onChange,
|
|
5425
5510
|
onBlur = _ref.onBlur,
|
|
5426
5511
|
onFocus = _ref.onFocus,
|
|
5427
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5512
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
5428
5513
|
var theme = useTheme();
|
|
5429
5514
|
return /*#__PURE__*/jsx(Pressable, _objectSpread(_objectSpread({
|
|
5430
5515
|
hitSlop: hitSlop
|
|
@@ -5436,12 +5521,12 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5436
5521
|
disabled: disabled
|
|
5437
5522
|
},
|
|
5438
5523
|
disabled: disabled,
|
|
5439
|
-
onPress: function (e) {
|
|
5524
|
+
onPress: function handlePress(e) {
|
|
5440
5525
|
if (onFocus) onFocus();
|
|
5441
5526
|
if (onChange) onChange(!checked, e);
|
|
5442
5527
|
if (onBlur) onBlur();
|
|
5443
5528
|
},
|
|
5444
|
-
children: function (_ref2) {
|
|
5529
|
+
children: function children(_ref2) {
|
|
5445
5530
|
var isHovered = _ref2.isHovered,
|
|
5446
5531
|
isPressed = _ref2.isPressed,
|
|
5447
5532
|
isFocused = _ref2.isFocused;
|
|
@@ -5740,7 +5825,7 @@ function PartContainer(_ref) {
|
|
|
5740
5825
|
});
|
|
5741
5826
|
}
|
|
5742
5827
|
|
|
5743
|
-
var _excluded$
|
|
5828
|
+
var _excluded$t = ["id", "value", "testID", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "enterKeyHint", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
|
|
5744
5829
|
var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5745
5830
|
var id = _ref.id,
|
|
5746
5831
|
value = _ref.value,
|
|
@@ -5758,7 +5843,7 @@ var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5758
5843
|
onBlur = _ref.onBlur,
|
|
5759
5844
|
onFocus = _ref.onFocus,
|
|
5760
5845
|
onSubmitEditing = _ref.onSubmitEditing;
|
|
5761
|
-
_objectWithoutProperties(_ref, _excluded$
|
|
5846
|
+
_objectWithoutProperties(_ref, _excluded$t);
|
|
5762
5847
|
var monthRef = useRef(null);
|
|
5763
5848
|
var yearRef = useRef(null);
|
|
5764
5849
|
var defaultValue = value;
|
|
@@ -5898,10 +5983,10 @@ var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5898
5983
|
});
|
|
5899
5984
|
});
|
|
5900
5985
|
|
|
5901
|
-
var _excluded$
|
|
5986
|
+
var _excluded$s = ["value"];
|
|
5902
5987
|
var DatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5903
5988
|
var value = _ref.value,
|
|
5904
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5989
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
5905
5990
|
// in apps, final-form can give a string value that will break the component
|
|
5906
5991
|
var currentValue = value || undefined;
|
|
5907
5992
|
return /*#__PURE__*/jsx(KeyboardDatePicker, _objectSpread(_objectSpread({
|
|
@@ -6250,10 +6335,10 @@ var GoogleMapsAutocompleteContext = /*#__PURE__*/createContext({
|
|
|
6250
6335
|
isLoadingResultDetails: false,
|
|
6251
6336
|
shouldDisplayEmptyStateWhenNoResults: false
|
|
6252
6337
|
},
|
|
6253
|
-
onInputChange: function () {
|
|
6338
|
+
onInputChange: function onInputChange() {
|
|
6254
6339
|
return Promise.resolve();
|
|
6255
6340
|
},
|
|
6256
|
-
onSelectItem: function () {}
|
|
6341
|
+
onSelectItem: function onSelectItem() {}
|
|
6257
6342
|
});
|
|
6258
6343
|
function GoogleMapsAutocompleteProvider(_ref) {
|
|
6259
6344
|
var children = _ref.children,
|
|
@@ -6485,7 +6570,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
|
|
|
6485
6570
|
};
|
|
6486
6571
|
}
|
|
6487
6572
|
|
|
6488
|
-
var _excluded$
|
|
6573
|
+
var _excluded$r = ["initialValue", "itemToString", "errorElement", "emptyResultsElement", "onChange"];
|
|
6489
6574
|
function InputAddress(_ref) {
|
|
6490
6575
|
var initialValue = _ref.initialValue,
|
|
6491
6576
|
_ref$itemToString = _ref.itemToString,
|
|
@@ -6493,7 +6578,7 @@ function InputAddress(_ref) {
|
|
|
6493
6578
|
errorElement = _ref.errorElement,
|
|
6494
6579
|
emptyResultsElement = _ref.emptyResultsElement,
|
|
6495
6580
|
_onChange = _ref.onChange,
|
|
6496
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6581
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
6497
6582
|
var _useGoogleMapsAutocom = useGoogleMapsAutocomplete(),
|
|
6498
6583
|
state = _useGoogleMapsAutocom.state,
|
|
6499
6584
|
_onInputChange = _useGoogleMapsAutocom.onInputChange,
|
|
@@ -6504,7 +6589,7 @@ function InputAddress(_ref) {
|
|
|
6504
6589
|
return /*#__PURE__*/jsx(Autocomplete, _objectSpread(_objectSpread({}, props), {}, {
|
|
6505
6590
|
itemToString: itemToString,
|
|
6506
6591
|
initialValue: formattedInitialValue,
|
|
6507
|
-
checkSelectedItem: function (selectedItem, item) {
|
|
6592
|
+
checkSelectedItem: function checkSelectedItem(selectedItem, item) {
|
|
6508
6593
|
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.place_id) === item.place_id;
|
|
6509
6594
|
},
|
|
6510
6595
|
right: state.isLoadingSearch || state.isLoadingResultDetails ? /*#__PURE__*/jsx(Icon, {
|
|
@@ -6513,10 +6598,10 @@ function InputAddress(_ref) {
|
|
|
6513
6598
|
}) : undefined,
|
|
6514
6599
|
errorElement: state.hasSearchError || state.hasSelectResultError ? errorElement : null,
|
|
6515
6600
|
emptyResultsElement: state.items.length === 0 ? emptyResultsElement : null,
|
|
6516
|
-
onInputChange: function (v) {
|
|
6601
|
+
onInputChange: function onInputChange(v) {
|
|
6517
6602
|
_onInputChange(v);
|
|
6518
6603
|
},
|
|
6519
|
-
onChange: function (v) {
|
|
6604
|
+
onChange: function onChange(v) {
|
|
6520
6605
|
onSelectItem(v, _onChange);
|
|
6521
6606
|
},
|
|
6522
6607
|
children: state.items.map(function (item) {
|
|
@@ -6590,15 +6675,15 @@ var InputIban = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6590
6675
|
}, props));
|
|
6591
6676
|
});
|
|
6592
6677
|
|
|
6593
|
-
var _excluded$
|
|
6678
|
+
var _excluded$q = ["onChange"];
|
|
6594
6679
|
var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
6595
6680
|
var onChange = _ref.onChange,
|
|
6596
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6681
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
6597
6682
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
6598
6683
|
ref: ref
|
|
6599
6684
|
}, props), {}, {
|
|
6600
6685
|
inputMode: "numeric",
|
|
6601
|
-
onChange: function (event) {
|
|
6686
|
+
onChange: function handleChange(event) {
|
|
6602
6687
|
if (!onChange) return;
|
|
6603
6688
|
var value = parseFloat(event.nativeEvent.text);
|
|
6604
6689
|
|
|
@@ -6610,11 +6695,11 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6610
6695
|
}));
|
|
6611
6696
|
});
|
|
6612
6697
|
|
|
6613
|
-
var _excluded$
|
|
6698
|
+
var _excluded$p = ["isPasswordDefaultVisible", "right"];
|
|
6614
6699
|
var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
6615
6700
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
6616
6701
|
right = _ref.right,
|
|
6617
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6702
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
6618
6703
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
6619
6704
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6620
6705
|
isVisible = _useState2[0],
|
|
@@ -6630,7 +6715,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6630
6715
|
testID: "kitt.InputPassword.passwordToggle",
|
|
6631
6716
|
hitSlop: 20,
|
|
6632
6717
|
accessibilityRole: "button",
|
|
6633
|
-
onPress: function () {
|
|
6718
|
+
onPress: function onPress() {
|
|
6634
6719
|
return setIsVisible(function (prev) {
|
|
6635
6720
|
return !prev;
|
|
6636
6721
|
});
|
|
@@ -6642,7 +6727,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6642
6727
|
}));
|
|
6643
6728
|
});
|
|
6644
6729
|
|
|
6645
|
-
var _excluded$
|
|
6730
|
+
var _excluded$o = ["enterKeyHint", "autoComplete", "phoneNumberLength", "onChange"];
|
|
6646
6731
|
function isPhoneNumberValid(number) {
|
|
6647
6732
|
return isValidNumber(number);
|
|
6648
6733
|
}
|
|
@@ -6656,7 +6741,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6656
6741
|
_ref$phoneNumberLengt = _ref.phoneNumberLength,
|
|
6657
6742
|
phoneNumberLength = _ref$phoneNumberLengt === void 0 ? 10 : _ref$phoneNumberLengt,
|
|
6658
6743
|
onChange = _ref.onChange,
|
|
6659
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6744
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
6660
6745
|
var currentEnterKeyHint = enterKeyHint ? getEnterKeyHintForNumericInput(enterKeyHint) : undefined;
|
|
6661
6746
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
6662
6747
|
ref: ref
|
|
@@ -6665,7 +6750,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6665
6750
|
enterKeyHint: currentEnterKeyHint,
|
|
6666
6751
|
autoComplete: autoComplete,
|
|
6667
6752
|
textContentType: "telephoneNumber",
|
|
6668
|
-
onChange: function (event) {
|
|
6753
|
+
onChange: function handleChange(event) {
|
|
6669
6754
|
var number = parseNumber(event.nativeEvent.text);
|
|
6670
6755
|
|
|
6671
6756
|
// When intl phone number is valid :
|
|
@@ -6857,14 +6942,14 @@ function Radio(_ref, ref) {
|
|
|
6857
6942
|
focusable: checked && !disabled,
|
|
6858
6943
|
flexDirection: "row",
|
|
6859
6944
|
alignItems: "center",
|
|
6860
|
-
onPress: function (event) {
|
|
6945
|
+
onPress: function handlePress(event) {
|
|
6861
6946
|
if (onFocus) onFocus();
|
|
6862
6947
|
if (onChange) onChange(value, event);
|
|
6863
6948
|
if (onBlur) onBlur();
|
|
6864
6949
|
},
|
|
6865
6950
|
onFocus: onFocus,
|
|
6866
6951
|
onBlur: onBlur,
|
|
6867
|
-
children: function (_ref2) {
|
|
6952
|
+
children: function children(_ref2) {
|
|
6868
6953
|
var isHovered = _ref2.isHovered,
|
|
6869
6954
|
isPressed = _ref2.isPressed,
|
|
6870
6955
|
isFocused = _ref2.isFocused;
|
|
@@ -7040,7 +7125,7 @@ function RadioButton(_ref) {
|
|
|
7040
7125
|
flexShrink: createResponsiveStyleFromProp(stretch, 1, undefined),
|
|
7041
7126
|
flexBasis: createResponsiveStyleFromProp(stretch, 0),
|
|
7042
7127
|
disabled: disabled,
|
|
7043
|
-
onPress: function (e) {
|
|
7128
|
+
onPress: function handlePress(e) {
|
|
7044
7129
|
if (onFocus) onFocus(e);
|
|
7045
7130
|
if (onChange) onChange(value);
|
|
7046
7131
|
if (onBlur) onBlur(e);
|
|
@@ -7049,7 +7134,7 @@ function RadioButton(_ref) {
|
|
|
7049
7134
|
onPressOut: onPressOut,
|
|
7050
7135
|
onFocus: onFocus,
|
|
7051
7136
|
onBlur: onBlur,
|
|
7052
|
-
children: function (_ref2) {
|
|
7137
|
+
children: function children(_ref2) {
|
|
7053
7138
|
var isHovered = _ref2.isHovered,
|
|
7054
7139
|
isPressed = _ref2.isPressed,
|
|
7055
7140
|
isFocused = _ref2.isFocused;
|
|
@@ -7092,7 +7177,7 @@ function RadioButton(_ref) {
|
|
|
7092
7177
|
});
|
|
7093
7178
|
}
|
|
7094
7179
|
|
|
7095
|
-
var _excluded$
|
|
7180
|
+
var _excluded$n = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
|
|
7096
7181
|
function RadioButtonGroupItem(_ref) {
|
|
7097
7182
|
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
7098
7183
|
return /*#__PURE__*/jsx(RadioButton, _objectSpread({}, props));
|
|
@@ -7105,7 +7190,7 @@ function RadioButtonGroup(_ref2) {
|
|
|
7105
7190
|
onFocus = _ref2.onFocus,
|
|
7106
7191
|
onBlur = _ref2.onBlur,
|
|
7107
7192
|
onChange = _ref2.onChange,
|
|
7108
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
7193
|
+
props = _objectWithoutProperties(_ref2, _excluded$n);
|
|
7109
7194
|
var _useState = useState(value),
|
|
7110
7195
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7111
7196
|
currentValue = _useState2[0],
|
|
@@ -7137,12 +7222,12 @@ function RadioButtonGroup(_ref2) {
|
|
|
7137
7222
|
}
|
|
7138
7223
|
RadioButtonGroup.RadioButton = RadioButtonGroupItem;
|
|
7139
7224
|
|
|
7140
|
-
var _excluded$
|
|
7225
|
+
var _excluded$m = ["helper", "limit"];
|
|
7141
7226
|
var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
7142
7227
|
var _props$value, _props$value2;
|
|
7143
7228
|
var helper = _ref.helper,
|
|
7144
7229
|
limit = _ref.limit,
|
|
7145
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7230
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
7146
7231
|
var shouldDisplayLimit = limit && limit > 0;
|
|
7147
7232
|
var isLimitReached = ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.length) === limit;
|
|
7148
7233
|
var limitContainerAnimatedStyle = useAnimatedStyle(function () {
|
|
@@ -7168,7 +7253,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7168
7253
|
textAlignVertical: "top",
|
|
7169
7254
|
minHeight: "kitt.forms.textArea.minHeight"
|
|
7170
7255
|
}, props), {}, {
|
|
7171
|
-
onChange: function (e) {
|
|
7256
|
+
onChange: function handleOnChange(e) {
|
|
7172
7257
|
if (!limit || e.nativeEvent.text.length <= limit) {
|
|
7173
7258
|
var _props$onChange;
|
|
7174
7259
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, e);
|
|
@@ -7301,7 +7386,7 @@ function ToggleAnimated(_ref) {
|
|
|
7301
7386
|
});
|
|
7302
7387
|
}
|
|
7303
7388
|
|
|
7304
|
-
var _excluded$
|
|
7389
|
+
var _excluded$l = ["isDisabled", "isHoveredInternal", "isFocusedInternal", "isPressedInternal", "label", "variant", "size", "value", "onChange"];
|
|
7305
7390
|
var getLabelTypographyType = function (size) {
|
|
7306
7391
|
return size === 'medium' ? 'body-m' : 'body-l';
|
|
7307
7392
|
};
|
|
@@ -7323,7 +7408,7 @@ function Toggle(_ref) {
|
|
|
7323
7408
|
value = _ref$value === void 0 ? false : _ref$value,
|
|
7324
7409
|
_ref$onChange = _ref.onChange,
|
|
7325
7410
|
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
7326
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7411
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
7327
7412
|
var theme = useKittTheme();
|
|
7328
7413
|
return /*#__PURE__*/jsxs(HStack, _objectSpread(_objectSpread({
|
|
7329
7414
|
alignItems: "center"
|
|
@@ -7331,10 +7416,10 @@ function Toggle(_ref) {
|
|
|
7331
7416
|
children: [/*#__PURE__*/jsx(Pressable, {
|
|
7332
7417
|
accessibilityRole: "togglebutton",
|
|
7333
7418
|
disabled: isDisabled,
|
|
7334
|
-
onPress: function () {
|
|
7419
|
+
onPress: function handlePress() {
|
|
7335
7420
|
onChange(!value);
|
|
7336
7421
|
},
|
|
7337
|
-
children: function (_ref2) {
|
|
7422
|
+
children: function children(_ref2) {
|
|
7338
7423
|
var isHovered = _ref2.isHovered,
|
|
7339
7424
|
isPressed = _ref2.isPressed,
|
|
7340
7425
|
isFocused = _ref2.isFocused;
|
|
@@ -7362,13 +7447,13 @@ function Toggle(_ref) {
|
|
|
7362
7447
|
}));
|
|
7363
7448
|
}
|
|
7364
7449
|
|
|
7365
|
-
var _excluded$
|
|
7450
|
+
var _excluded$k = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
|
|
7366
7451
|
function FullscreenModalBody(_ref) {
|
|
7367
7452
|
var children = _ref.children,
|
|
7368
7453
|
shouldHandleBottomNotch = _ref.shouldHandleBottomNotch,
|
|
7369
7454
|
style = _ref.style,
|
|
7370
7455
|
shouldHandleTopNotch = _ref.shouldHandleTopNotch,
|
|
7371
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7456
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
7372
7457
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7373
7458
|
bottom = _useSafeAreaInsets.bottom,
|
|
7374
7459
|
top = _useSafeAreaInsets.top;
|
|
@@ -7388,14 +7473,14 @@ function FullscreenModalBody(_ref) {
|
|
|
7388
7473
|
}));
|
|
7389
7474
|
}
|
|
7390
7475
|
|
|
7391
|
-
var _excluded$
|
|
7476
|
+
var _excluded$j = ["shouldHandleBottomNotch", "hasSeparator", "children"];
|
|
7392
7477
|
function FullscreenModalFooter(_ref) {
|
|
7393
7478
|
var _ref$shouldHandleBott = _ref.shouldHandleBottomNotch,
|
|
7394
7479
|
shouldHandleBottomNotch = _ref$shouldHandleBott === void 0 ? true : _ref$shouldHandleBott,
|
|
7395
7480
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
7396
7481
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
7397
7482
|
children = _ref.children,
|
|
7398
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7483
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
7399
7484
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7400
7485
|
bottom = _useSafeAreaInsets.bottom;
|
|
7401
7486
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
@@ -7412,7 +7497,7 @@ function FullscreenModalFooter(_ref) {
|
|
|
7412
7497
|
}));
|
|
7413
7498
|
}
|
|
7414
7499
|
|
|
7415
|
-
var _excluded$
|
|
7500
|
+
var _excluded$i = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
|
|
7416
7501
|
var slideInFromBottomEnter = "kitt-u_slideInFromBottomEnter_s1717rto";
|
|
7417
7502
|
var slideInFromBottomEnterActive = "kitt-u_slideInFromBottomEnterActive_sux6xgc";
|
|
7418
7503
|
var slideInFromBottomExit = "kitt-u_slideInFromBottomExit_sl0lsxt";
|
|
@@ -7451,7 +7536,7 @@ function FullscreenModalAnimation(_ref) {
|
|
|
7451
7536
|
onExit = _ref.onExit,
|
|
7452
7537
|
onExited = _ref.onExited,
|
|
7453
7538
|
onClose = _ref.onClose,
|
|
7454
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7539
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
7455
7540
|
var theme = useTheme();
|
|
7456
7541
|
var animation = theme.kitt.fullscreenModal.animation;
|
|
7457
7542
|
var sharedProps = {
|
|
@@ -7478,13 +7563,13 @@ function FullscreenModalAnimation(_ref) {
|
|
|
7478
7563
|
}));
|
|
7479
7564
|
}
|
|
7480
7565
|
|
|
7481
|
-
var _excluded$
|
|
7566
|
+
var _excluded$h = ["children", "visible", "onClose", "onExited"];
|
|
7482
7567
|
function FullscreenModalBehaviour(_ref) {
|
|
7483
7568
|
var children = _ref.children,
|
|
7484
7569
|
visible = _ref.visible,
|
|
7485
7570
|
onClose = _ref.onClose,
|
|
7486
7571
|
onExited = _ref.onExited,
|
|
7487
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7572
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
7488
7573
|
var _useState = useState(visible),
|
|
7489
7574
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7490
7575
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -7499,7 +7584,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
7499
7584
|
onClose: onClose,
|
|
7500
7585
|
children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
7501
7586
|
visible: visible,
|
|
7502
|
-
onExited: function () {
|
|
7587
|
+
onExited: function handleExitAnimationDone() {
|
|
7503
7588
|
if (onExited) onExited();
|
|
7504
7589
|
setIsModalBehaviourVisible(false);
|
|
7505
7590
|
},
|
|
@@ -7531,64 +7616,17 @@ function FullscreenModalContainer(_ref) {
|
|
|
7531
7616
|
});
|
|
7532
7617
|
}
|
|
7533
7618
|
|
|
7534
|
-
var _excluded$
|
|
7619
|
+
var _excluded$g = ["shouldHandleTopNotch"];
|
|
7535
7620
|
function FullscreenModalHeader(_ref) {
|
|
7536
|
-
var _ref$
|
|
7537
|
-
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
7538
|
-
isTransparent = _ref.isTransparent,
|
|
7539
|
-
title = _ref.title,
|
|
7540
|
-
children = _ref.children,
|
|
7541
|
-
right = _ref.right,
|
|
7542
|
-
left = _ref.left,
|
|
7543
|
-
_ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
|
|
7621
|
+
var _ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
|
|
7544
7622
|
shouldHandleTopNotch = _ref$shouldHandleTopN === void 0 ? true : _ref$shouldHandleTopN,
|
|
7545
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7623
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
7546
7624
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7547
7625
|
top = _useSafeAreaInsets.top;
|
|
7548
|
-
|
|
7549
|
-
var hasLeft = Boolean(left);
|
|
7550
|
-
var hasContent = Boolean(title || children);
|
|
7551
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
7552
|
-
backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
|
|
7553
|
-
minHeight: "kitt.fullscreenModal.header.height",
|
|
7554
|
-
width: "100%",
|
|
7555
|
-
justifyContent: "center",
|
|
7626
|
+
return /*#__PURE__*/jsx(View, {
|
|
7556
7627
|
paddingTop: shouldHandleTopNotch ? top : undefined,
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
borderBottomColor: "kitt.separator",
|
|
7560
|
-
borderBottomWidth: hasSeparator ? 1 : undefined
|
|
7561
|
-
}, props), {}, {
|
|
7562
|
-
children: /*#__PURE__*/jsxs(View, {
|
|
7563
|
-
flexDirection: "row",
|
|
7564
|
-
alignItems: "center",
|
|
7565
|
-
justifyContent: !hasContent && !hasLeft ? 'flex-end' : 'space-between',
|
|
7566
|
-
children: [left ? /*#__PURE__*/jsx(View, {
|
|
7567
|
-
width: "kitt.iconButton.width",
|
|
7568
|
-
children: left
|
|
7569
|
-
}) : null, title ? /*#__PURE__*/jsx(View, {
|
|
7570
|
-
flexGrow: 1,
|
|
7571
|
-
flexShrink: 1,
|
|
7572
|
-
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
7573
|
-
paddingRight: hasRight ? 'kitt.2' : 0,
|
|
7574
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
7575
|
-
variant: "bold",
|
|
7576
|
-
textAlign: !hasLeft && hasRight ? 'left' : 'center',
|
|
7577
|
-
children: title
|
|
7578
|
-
})
|
|
7579
|
-
}) : null, children ? /*#__PURE__*/jsx(View, {
|
|
7580
|
-
flexGrow: 1,
|
|
7581
|
-
flexShrink: 1,
|
|
7582
|
-
alignItems: "center",
|
|
7583
|
-
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
7584
|
-
paddingRight: hasRight ? 'kitt.2' : undefined,
|
|
7585
|
-
children: children
|
|
7586
|
-
}) : null, right || left ? /*#__PURE__*/jsx(View, {
|
|
7587
|
-
width: "kitt.iconButton.width",
|
|
7588
|
-
children: right
|
|
7589
|
-
}) : null]
|
|
7590
|
-
})
|
|
7591
|
-
}));
|
|
7628
|
+
children: /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props))
|
|
7629
|
+
});
|
|
7592
7630
|
}
|
|
7593
7631
|
|
|
7594
7632
|
function FullscreenModal(_ref) {
|
|
@@ -7798,13 +7836,13 @@ function Highlight(_ref) {
|
|
|
7798
7836
|
});
|
|
7799
7837
|
}
|
|
7800
7838
|
return /*#__PURE__*/jsx(Pressable, {
|
|
7801
|
-
onPress: function () {
|
|
7839
|
+
onPress: function handlePress() {
|
|
7802
7840
|
setIsExpanded(!isExpanded);
|
|
7803
7841
|
setIsInitialRender(false);
|
|
7804
7842
|
},
|
|
7805
7843
|
onPressIn: onPressIn,
|
|
7806
7844
|
onPressOut: onPressOut,
|
|
7807
|
-
children: function (_ref2) {
|
|
7845
|
+
children: function children(_ref2) {
|
|
7808
7846
|
var isHovered = _ref2.isHovered;
|
|
7809
7847
|
return /*#__PURE__*/jsxs(AnimatedContainer, {
|
|
7810
7848
|
isHovered: isHovered,
|
|
@@ -7858,60 +7896,6 @@ function Highlight(_ref) {
|
|
|
7858
7896
|
});
|
|
7859
7897
|
}
|
|
7860
7898
|
|
|
7861
|
-
var getButtonTypeAndVariant = function (iconColor) {
|
|
7862
|
-
switch (iconColor) {
|
|
7863
|
-
case 'black':
|
|
7864
|
-
return {
|
|
7865
|
-
type: 'tertiary'
|
|
7866
|
-
};
|
|
7867
|
-
case 'secondary':
|
|
7868
|
-
return {
|
|
7869
|
-
type: 'secondary'
|
|
7870
|
-
};
|
|
7871
|
-
case 'primary':
|
|
7872
|
-
return {
|
|
7873
|
-
type: 'primary'
|
|
7874
|
-
};
|
|
7875
|
-
case 'primary-plain':
|
|
7876
|
-
return {
|
|
7877
|
-
type: 'primary'
|
|
7878
|
-
};
|
|
7879
|
-
case 'ghost':
|
|
7880
|
-
return {
|
|
7881
|
-
type: 'tertiary',
|
|
7882
|
-
variant: 'revert'
|
|
7883
|
-
};
|
|
7884
|
-
default:
|
|
7885
|
-
return {
|
|
7886
|
-
type: 'secondary'
|
|
7887
|
-
};
|
|
7888
|
-
}
|
|
7889
|
-
};
|
|
7890
|
-
|
|
7891
|
-
var _excluded$g = ["color", "ariaLabel"];
|
|
7892
|
-
/**
|
|
7893
|
-
* @deprecated IconButton should only be used as a navigation button
|
|
7894
|
-
* Other use cases should use a <Button> component with an icon
|
|
7895
|
-
*/
|
|
7896
|
-
function IconButton(_ref) {
|
|
7897
|
-
var _ref$color = _ref.color,
|
|
7898
|
-
color = _ref$color === void 0 ? 'black' : _ref$color;
|
|
7899
|
-
_ref.ariaLabel;
|
|
7900
|
-
var props = _objectWithoutProperties(_ref, _excluded$g);
|
|
7901
|
-
var _getButtonTypeAndVari = getButtonTypeAndVariant(color),
|
|
7902
|
-
legacyColorToType = _getButtonTypeAndVari.type,
|
|
7903
|
-
legacyColorToVariant = _getButtonTypeAndVari.variant;
|
|
7904
|
-
return /*#__PURE__*/jsx(Button, _objectSpread({
|
|
7905
|
-
variant: legacyColorToVariant,
|
|
7906
|
-
type: legacyColorToType
|
|
7907
|
-
}, props));
|
|
7908
|
-
}
|
|
7909
|
-
function CloseIconButton(props) {
|
|
7910
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
7911
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
7912
|
-
}, props));
|
|
7913
|
-
}
|
|
7914
|
-
|
|
7915
7899
|
function InfoCard(_ref) {
|
|
7916
7900
|
var title = _ref.title,
|
|
7917
7901
|
action = _ref.action,
|
|
@@ -8279,7 +8263,7 @@ function MapMarker(_ref2) {
|
|
|
8279
8263
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
8280
8264
|
testID: testID,
|
|
8281
8265
|
onPress: onPress,
|
|
8282
|
-
children: function (_ref3) {
|
|
8266
|
+
children: function children(_ref3) {
|
|
8283
8267
|
var isHovered = _ref3.isHovered;
|
|
8284
8268
|
return /*#__PURE__*/jsx(StaticMapMarker$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
8285
8269
|
isHovered: isHovered
|
|
@@ -9722,9 +9706,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9722
9706
|
},
|
|
9723
9707
|
icon: theme.icon,
|
|
9724
9708
|
cardModal: {
|
|
9725
|
-
header: {
|
|
9726
|
-
height: theme.cardModal.header.height
|
|
9727
|
-
},
|
|
9728
9709
|
maxWidth: theme.cardModal.maxWidth,
|
|
9729
9710
|
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
|
|
9730
9711
|
minHeight: theme.cardModal.minHeight
|
|
@@ -10029,11 +10010,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10029
10010
|
width: theme.iconButton.width,
|
|
10030
10011
|
height: theme.iconButton.height
|
|
10031
10012
|
},
|
|
10032
|
-
fullscreenModal: {
|
|
10033
|
-
header: {
|
|
10034
|
-
height: theme.fullscreenModal.header.height
|
|
10035
|
-
}
|
|
10036
|
-
},
|
|
10037
10013
|
pageLoader: {
|
|
10038
10014
|
size: theme.pageLoader.size
|
|
10039
10015
|
},
|
|
@@ -10128,7 +10104,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10128
10104
|
}
|
|
10129
10105
|
},
|
|
10130
10106
|
fullscreenModal: {
|
|
10131
|
-
horizontalPadding: theme.fullscreenModal.
|
|
10107
|
+
horizontalPadding: theme.fullscreenModal.horizontalPadding,
|
|
10132
10108
|
body: {
|
|
10133
10109
|
verticalPadding: theme.fullscreenModal.body.verticalPadding
|
|
10134
10110
|
},
|
|
@@ -11028,19 +11004,19 @@ function NavigationModalBehaviour(_ref) {
|
|
|
11028
11004
|
children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
11029
11005
|
appear: shouldAppear,
|
|
11030
11006
|
visible: visible,
|
|
11031
|
-
onEnter: function () {
|
|
11007
|
+
onEnter: function handleEnter() {
|
|
11032
11008
|
if (onEnter) onEnter();
|
|
11033
11009
|
|
|
11034
11010
|
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
11035
11011
|
setShouldAppear(false);
|
|
11036
11012
|
},
|
|
11037
|
-
onExit: function () {
|
|
11013
|
+
onExit: function handleExit() {
|
|
11038
11014
|
if (onExit) onExit();
|
|
11039
11015
|
|
|
11040
11016
|
// Reset appear value to its original value for future modal display
|
|
11041
11017
|
setShouldAppear(appear);
|
|
11042
11018
|
},
|
|
11043
|
-
onExited: function () {
|
|
11019
|
+
onExited: function handleExitAnimationDone() {
|
|
11044
11020
|
if (onExited) onExited();
|
|
11045
11021
|
setIsModalBehaviourVisible(false);
|
|
11046
11022
|
},
|
|
@@ -11108,18 +11084,12 @@ function NavigationBottomSheet(_ref) {
|
|
|
11108
11084
|
})
|
|
11109
11085
|
});
|
|
11110
11086
|
}
|
|
11111
|
-
function NavigationBottomSheetHeader(
|
|
11112
|
-
|
|
11113
|
-
left = _ref2.left;
|
|
11114
|
-
return /*#__PURE__*/jsx(NavigationModal.Header, {
|
|
11115
|
-
title: children,
|
|
11116
|
-
left: left,
|
|
11087
|
+
function NavigationBottomSheetHeader(props) {
|
|
11088
|
+
return /*#__PURE__*/jsx(NavigationModal.Header, _objectSpread(_objectSpread({}, props), {}, {
|
|
11117
11089
|
right: /*#__PURE__*/jsx(ModalBehaviour.CloseButton, {
|
|
11118
|
-
children: /*#__PURE__*/jsx(
|
|
11119
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
11120
|
-
})
|
|
11090
|
+
children: /*#__PURE__*/jsx(TopNavBar.CloseButton, {})
|
|
11121
11091
|
})
|
|
11122
|
-
});
|
|
11092
|
+
}));
|
|
11123
11093
|
}
|
|
11124
11094
|
function NavigationBottomSheetBody(props) {
|
|
11125
11095
|
return /*#__PURE__*/jsx(NavigationModal.Body, _objectSpread({
|
|
@@ -11306,18 +11276,18 @@ function Picker(_ref) {
|
|
|
11306
11276
|
items: items,
|
|
11307
11277
|
initialSelectedItem: initialValueIndex > -1 ? items[initialValueIndex] : undefined,
|
|
11308
11278
|
initialIsOpen: isInitialOpen,
|
|
11309
|
-
stateReducer: function (state, actionAndChanges) {
|
|
11279
|
+
stateReducer: function stateReducer(state, actionAndChanges) {
|
|
11310
11280
|
return webUseSelectReducer(state, actionAndChanges, {
|
|
11311
11281
|
keepOpenOnChange: keepOpenOnChange
|
|
11312
11282
|
});
|
|
11313
11283
|
},
|
|
11314
11284
|
selectedItem: syncStateWithSourceValue ? sourceValue : undefined,
|
|
11315
|
-
onIsOpenChange: function (changes) {
|
|
11285
|
+
onIsOpenChange: function onIsOpenChange(changes) {
|
|
11316
11286
|
if (changes.isOpen === false) {
|
|
11317
11287
|
if (onClose) onClose();
|
|
11318
11288
|
}
|
|
11319
11289
|
},
|
|
11320
|
-
onSelectedItemChange: function (changes) {
|
|
11290
|
+
onSelectedItemChange: function onSelectedItemChange(changes) {
|
|
11321
11291
|
if (!onChange) return;
|
|
11322
11292
|
if (changes.selectedItem === null) {
|
|
11323
11293
|
onChange(undefined);
|
|
@@ -11537,7 +11507,7 @@ function Skeleton(_ref) {
|
|
|
11537
11507
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
11538
11508
|
overflow: "hidden",
|
|
11539
11509
|
style: style,
|
|
11540
|
-
onLayout: function (_ref2) {
|
|
11510
|
+
onLayout: function onLayout(_ref2) {
|
|
11541
11511
|
var nativeEvent = _ref2.nativeEvent;
|
|
11542
11512
|
return setWidth(nativeEvent.layout.width);
|
|
11543
11513
|
},
|
|
@@ -11763,7 +11733,7 @@ function StaticMap(_ref) {
|
|
|
11763
11733
|
position: "relative",
|
|
11764
11734
|
maxWidth: mapBoxMaxPictureWidth,
|
|
11765
11735
|
height: height,
|
|
11766
|
-
onLayout: function (event) {
|
|
11736
|
+
onLayout: function handleParentLayout(event) {
|
|
11767
11737
|
var nativeEvent = event.nativeEvent;
|
|
11768
11738
|
var rangedMapWidth = getPictureWidth(nativeEvent.layout.width);
|
|
11769
11739
|
setCurrentWidth(rangedMapWidth);
|
|
@@ -11775,11 +11745,11 @@ function StaticMap(_ref) {
|
|
|
11775
11745
|
width: currentWidth,
|
|
11776
11746
|
height: height,
|
|
11777
11747
|
alt: alt,
|
|
11778
|
-
onLoadEnd: function () {
|
|
11748
|
+
onLoadEnd: function handleImageLoadEnd() {
|
|
11779
11749
|
setIsLoading(false);
|
|
11780
11750
|
if (onLoaded) onLoaded();
|
|
11781
11751
|
},
|
|
11782
|
-
onError: function () {
|
|
11752
|
+
onError: function handleError() {
|
|
11783
11753
|
setHasError(true);
|
|
11784
11754
|
if (onError) onError();
|
|
11785
11755
|
}
|
|
@@ -11804,7 +11774,7 @@ function StaticMap(_ref) {
|
|
|
11804
11774
|
width: "100%",
|
|
11805
11775
|
height: "100%",
|
|
11806
11776
|
children: /*#__PURE__*/jsx(StaticMapError, {
|
|
11807
|
-
onReload: function () {
|
|
11777
|
+
onReload: function handleReload() {
|
|
11808
11778
|
setHasError(false);
|
|
11809
11779
|
setIsLoading(true);
|
|
11810
11780
|
setCurrentMapKey(function (prev) {
|
|
@@ -12046,7 +12016,7 @@ function StoryContainer(_ref) {
|
|
|
12046
12016
|
var StoryDecorator = makeDecorator({
|
|
12047
12017
|
name: 'StoryDecorator',
|
|
12048
12018
|
parameterName: 'storyDecorator',
|
|
12049
|
-
wrapper: function (storyFn, context) {
|
|
12019
|
+
wrapper: function wrapper(storyFn, context) {
|
|
12050
12020
|
var story = storyFn(context);
|
|
12051
12021
|
if (context.parameters.disableStoryContainer) {
|
|
12052
12022
|
return story;
|
|
@@ -12150,7 +12120,7 @@ function TabBarItem(_ref) {
|
|
|
12150
12120
|
disabled: disabled,
|
|
12151
12121
|
testID: testID,
|
|
12152
12122
|
onPress: onPress,
|
|
12153
|
-
children: function (_ref2) {
|
|
12123
|
+
children: function children(_ref2) {
|
|
12154
12124
|
var isHovered = _ref2.isHovered,
|
|
12155
12125
|
isPressed = _ref2.isPressed,
|
|
12156
12126
|
isFocused = _ref2.isFocused;
|
|
@@ -12239,7 +12209,7 @@ function TabBar(_ref) {
|
|
|
12239
12209
|
color: color,
|
|
12240
12210
|
variant: definedVariant,
|
|
12241
12211
|
type: type,
|
|
12242
|
-
onPress: function (event) {
|
|
12212
|
+
onPress: function onPress(event) {
|
|
12243
12213
|
var _child$props$onPress, _child$props;
|
|
12244
12214
|
onChangeTab({
|
|
12245
12215
|
tab: tab,
|
|
@@ -12418,7 +12388,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12418
12388
|
isFocusedInternal: isFocusedInternal,
|
|
12419
12389
|
isPressedInternal: isPressedInternal
|
|
12420
12390
|
}),
|
|
12421
|
-
onChange: function (event) {
|
|
12391
|
+
onChange: function handleInputChange(event) {
|
|
12422
12392
|
var currentValue = event.nativeEvent.text;
|
|
12423
12393
|
if (currentValue.length === 0) {
|
|
12424
12394
|
setInputValue(currentValue);
|
|
@@ -12469,7 +12439,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12469
12439
|
setInputValue(sanitizedValue);
|
|
12470
12440
|
handleChange(sanitizedValue);
|
|
12471
12441
|
},
|
|
12472
|
-
onBlur: function () {
|
|
12442
|
+
onBlur: function handleBlur() {
|
|
12473
12443
|
if (inputValue.indexOf(':') === 1) {
|
|
12474
12444
|
setInputValue("0".concat(inputValue));
|
|
12475
12445
|
}
|
|
@@ -12872,88 +12842,6 @@ function Tooltip(_ref) {
|
|
|
12872
12842
|
Tooltip.Arrow = Arrow;
|
|
12873
12843
|
Tooltip.Content = TooltipContent;
|
|
12874
12844
|
|
|
12875
|
-
function TopNavBar(_ref) {
|
|
12876
|
-
var left = _ref.left,
|
|
12877
|
-
right = _ref.right,
|
|
12878
|
-
title = _ref.title,
|
|
12879
|
-
_ref$titleAlign = _ref.titleAlign,
|
|
12880
|
-
titleAlign = _ref$titleAlign === void 0 ? 'center' : _ref$titleAlign,
|
|
12881
|
-
stickers = _ref.stickers,
|
|
12882
|
-
_ref$mode = _ref.mode,
|
|
12883
|
-
mode = _ref$mode === void 0 ? 'default' : _ref$mode,
|
|
12884
|
-
_ref$hasSeparator = _ref.hasSeparator,
|
|
12885
|
-
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator;
|
|
12886
|
-
var isLargeTitleMode = mode === 'largeTitle';
|
|
12887
|
-
return /*#__PURE__*/jsxs(VStack, {
|
|
12888
|
-
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
12889
|
-
width: "100%",
|
|
12890
|
-
height: mode === 'default' ? 56 : undefined,
|
|
12891
|
-
justifyContent: "center",
|
|
12892
|
-
paddingX: "kitt.2",
|
|
12893
|
-
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
12894
|
-
paddingBottom: "kitt.3",
|
|
12895
|
-
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
12896
|
-
borderColor: "kitt.separator",
|
|
12897
|
-
children: [/*#__PURE__*/jsxs(HStack, {
|
|
12898
|
-
alignItems: "center",
|
|
12899
|
-
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
12900
|
-
children: [left !== null && left !== void 0 ? left : /*#__PURE__*/jsx(View, {
|
|
12901
|
-
width: "kitt.button.minWidth"
|
|
12902
|
-
}), mode === 'default' ? /*#__PURE__*/jsx(View, {
|
|
12903
|
-
flexGrow: "1",
|
|
12904
|
-
flexShrink: 1,
|
|
12905
|
-
paddingRight: "kitt.2",
|
|
12906
|
-
paddingLeft: "kitt.2",
|
|
12907
|
-
children: title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
12908
|
-
textAlign: titleAlign,
|
|
12909
|
-
variant: "bold",
|
|
12910
|
-
ellipsizeMode: "tail",
|
|
12911
|
-
numberOfLines: 1,
|
|
12912
|
-
children: title
|
|
12913
|
-
}) : null
|
|
12914
|
-
}) : null, right !== null && right !== void 0 ? right : /*#__PURE__*/jsx(View, {
|
|
12915
|
-
width: "kitt.button.minWidth"
|
|
12916
|
-
})]
|
|
12917
|
-
}), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
|
|
12918
|
-
space: "kitt.4",
|
|
12919
|
-
paddingX: "kitt.2",
|
|
12920
|
-
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
12921
|
-
width: "100%",
|
|
12922
|
-
space: "kitt.1",
|
|
12923
|
-
flexShrink: 1,
|
|
12924
|
-
flexWrap: "wrap",
|
|
12925
|
-
style: {
|
|
12926
|
-
rowGap: theme.getSpacing(1)
|
|
12927
|
-
},
|
|
12928
|
-
children: stickers.map(function (sticker, index) {
|
|
12929
|
-
return (
|
|
12930
|
-
/*#__PURE__*/
|
|
12931
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
12932
|
-
jsx(View, {
|
|
12933
|
-
children: sticker
|
|
12934
|
-
}, index)
|
|
12935
|
-
);
|
|
12936
|
-
})
|
|
12937
|
-
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
12938
|
-
base: "heading-m",
|
|
12939
|
-
children: title
|
|
12940
|
-
})]
|
|
12941
|
-
}) : null]
|
|
12942
|
-
});
|
|
12943
|
-
}
|
|
12944
|
-
function CloseButton(props) {
|
|
12945
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
12946
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
12947
|
-
}, props));
|
|
12948
|
-
}
|
|
12949
|
-
function BackButton(props) {
|
|
12950
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
12951
|
-
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
|
|
12952
|
-
}, props));
|
|
12953
|
-
}
|
|
12954
|
-
TopNavBar.CloseButton = CloseButton;
|
|
12955
|
-
TopNavBar.BackButton = BackButton;
|
|
12956
|
-
|
|
12957
12845
|
function getTypographyTypeConfig(type, theme) {
|
|
12958
12846
|
var configs = theme.kitt.typography.types[getTypographyFamily(type)].configs;
|
|
12959
12847
|
return configs[type];
|
|
@@ -13106,7 +12994,7 @@ function KittThemeProvider(_ref) {
|
|
|
13106
12994
|
var KittThemeDecorator = makeDecorator({
|
|
13107
12995
|
name: 'ThemeDecorator',
|
|
13108
12996
|
parameterName: 'theme',
|
|
13109
|
-
wrapper: function (storyFn, context, _ref2) {
|
|
12997
|
+
wrapper: function wrapper(storyFn, context, _ref2) {
|
|
13110
12998
|
var _parameters$isSSR;
|
|
13111
12999
|
var _ref2$options = _ref2.options,
|
|
13112
13000
|
options = _ref2$options === void 0 ? {} : _ref2$options,
|