@ornikar/kitt-universal 27.9.1-canary.b005d681364bb7e16454f696f46b5af55d721a97.0 → 27.9.1-canary.e79ce5a70db58d281f30a0e111ad7cf70d64cdb1.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 +17 -5
- 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 +17 -3
- package/dist/definitions/CardModal/CardModalHeader.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/Header.d.ts +18 -3
- package/dist/definitions/FullscreenModal/Header.d.ts.map +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts +7 -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 +1 -1
- 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 +12 -14
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +1 -0
- package/dist/definitions/themes/default.d.ts.map +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/themes/late-ocean/iconButton.d.ts +6 -0
- package/dist/definitions/themes/late-ocean/iconButton.d.ts.map +1 -0
- package/dist/definitions/typography/Typography.d.ts +18 -6
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +366 -232
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +366 -232
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +277 -150
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +261 -142
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +278 -151
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +262 -143
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +462 -327
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +406 -280
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +8 -2
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +8 -2
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +8 -2
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +8 -2
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +8 -2
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +8 -2
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +9 -3
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +9 -3
- 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,
|
|
13
|
+
import { SpinnerGapRegularIcon, UserRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, XRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon, ArrowLeftRegularIcon } 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
|
+
sharedHorizontalPadding: 16,
|
|
1820
1820
|
footer: {
|
|
1821
1821
|
verticalPadding: 12
|
|
1822
1822
|
},
|
|
1823
1823
|
body: {
|
|
1824
|
-
verticalPadding:
|
|
1824
|
+
verticalPadding: 24
|
|
1825
1825
|
},
|
|
1826
1826
|
animation: {
|
|
1827
1827
|
overlay: {
|
|
@@ -1908,6 +1908,11 @@ var icon = {
|
|
|
1908
1908
|
defaultSize: 20
|
|
1909
1909
|
};
|
|
1910
1910
|
|
|
1911
|
+
var iconButton = {
|
|
1912
|
+
width: button.height.medium,
|
|
1913
|
+
height: button.height.medium
|
|
1914
|
+
};
|
|
1915
|
+
|
|
1911
1916
|
var listItem = {
|
|
1912
1917
|
padding: '12px 16px',
|
|
1913
1918
|
verticalPadding: 12,
|
|
@@ -2619,7 +2624,7 @@ var breakpoints = {
|
|
|
2619
2624
|
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
2620
2625
|
var theme = {
|
|
2621
2626
|
spacing: spacing,
|
|
2622
|
-
getSpacing: function
|
|
2627
|
+
getSpacing: function (multiplier) {
|
|
2623
2628
|
return spacing * multiplier;
|
|
2624
2629
|
},
|
|
2625
2630
|
colors: colors,
|
|
@@ -2639,6 +2644,7 @@ var theme = {
|
|
|
2639
2644
|
highlight: highlight,
|
|
2640
2645
|
icon: icon,
|
|
2641
2646
|
buttonBadge: buttonBadge,
|
|
2647
|
+
iconButton: iconButton,
|
|
2642
2648
|
listItem: listItem,
|
|
2643
2649
|
pageLoader: pageLoader,
|
|
2644
2650
|
picker: picker,
|
|
@@ -2745,7 +2751,7 @@ function ActionCardDisabled(_ref) {
|
|
|
2745
2751
|
});
|
|
2746
2752
|
}
|
|
2747
2753
|
|
|
2748
|
-
var _excluded$
|
|
2754
|
+
var _excluded$R = ["children", "variant", "borderVariant", "borderRadius", "disabled", "isHovered", "isPressed", "isFocused"];
|
|
2749
2755
|
function ActionCard(_ref) {
|
|
2750
2756
|
var children = _ref.children,
|
|
2751
2757
|
_ref$variant = _ref.variant,
|
|
@@ -2758,7 +2764,7 @@ function ActionCard(_ref) {
|
|
|
2758
2764
|
isHovered = _ref.isHovered,
|
|
2759
2765
|
isPressed = _ref.isPressed,
|
|
2760
2766
|
isFocused = _ref.isFocused,
|
|
2761
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2767
|
+
props = _objectWithoutProperties(_ref, _excluded$R);
|
|
2762
2768
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
2763
2769
|
children: disabled ? /*#__PURE__*/jsx(ActionCardDisabled, {
|
|
2764
2770
|
borderRadius: borderRadius,
|
|
@@ -2806,7 +2812,7 @@ var ActionCardPressable = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
2806
2812
|
onPress: onPress,
|
|
2807
2813
|
onHoverIn: onHoverIn,
|
|
2808
2814
|
onHoverOut: onHoverOut,
|
|
2809
|
-
children: function
|
|
2815
|
+
children: function (_ref3) {
|
|
2810
2816
|
var isHovered = _ref3.isHovered,
|
|
2811
2817
|
isPressed = _ref3.isPressed,
|
|
2812
2818
|
isFocused = _ref3.isFocused;
|
|
@@ -3090,7 +3096,7 @@ var getTypographyTypeWithAncestorValue = function (type, typographyTypeInContext
|
|
|
3090
3096
|
return !!isAllValuesUndefined && !!typographyTypeInContext ? typographyTypeInContext : type;
|
|
3091
3097
|
};
|
|
3092
3098
|
|
|
3093
|
-
var _excluded$
|
|
3099
|
+
var _excluded$Q = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
|
|
3094
3100
|
var TypographyFamilyContext = /*#__PURE__*/createContext(null);
|
|
3095
3101
|
var TypographyTypeContext = /*#__PURE__*/createContext(null);
|
|
3096
3102
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
@@ -3214,7 +3220,7 @@ function Typography(_ref2) {
|
|
|
3214
3220
|
} : _ref2$type,
|
|
3215
3221
|
variant = _ref2.variant,
|
|
3216
3222
|
color = _ref2.color,
|
|
3217
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded$
|
|
3223
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded$Q);
|
|
3218
3224
|
var sx = useSx();
|
|
3219
3225
|
var typographyFamilyInContext = useContext(TypographyFamilyContext);
|
|
3220
3226
|
var typographyTypeInContext = useContext(TypographyTypeContext);
|
|
@@ -3356,12 +3362,12 @@ function Icon(_ref) {
|
|
|
3356
3362
|
});
|
|
3357
3363
|
}
|
|
3358
3364
|
|
|
3359
|
-
var _excluded$
|
|
3365
|
+
var _excluded$P = ["color", "size"],
|
|
3360
3366
|
_excluded2$6 = ["color"];
|
|
3361
3367
|
function TypographyIconSpecifiedColor(_ref) {
|
|
3362
3368
|
var color = _ref.color,
|
|
3363
3369
|
size = _ref.size,
|
|
3364
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3370
|
+
props = _objectWithoutProperties(_ref, _excluded$P);
|
|
3365
3371
|
var colorValue = getTypographyColorValue(color);
|
|
3366
3372
|
var sx = useSx();
|
|
3367
3373
|
var _sx = sx({
|
|
@@ -3401,7 +3407,7 @@ var getButtonTextColorByType = function (type, variant, isHovered, isPressed, is
|
|
|
3401
3407
|
return "".concat(baseKey, ".default");
|
|
3402
3408
|
};
|
|
3403
3409
|
|
|
3404
|
-
var _excluded$
|
|
3410
|
+
var _excluded$O = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing", "size"];
|
|
3405
3411
|
function ButtonContentChildren(_ref) {
|
|
3406
3412
|
var type = _ref.type,
|
|
3407
3413
|
icon = _ref.icon,
|
|
@@ -3501,7 +3507,7 @@ function ButtonContent(_ref2) {
|
|
|
3501
3507
|
_ref2.isFocused;
|
|
3502
3508
|
var innerSpacing = _ref2.innerSpacing,
|
|
3503
3509
|
size = _ref2.size,
|
|
3504
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
3510
|
+
props = _objectWithoutProperties(_ref2, _excluded$O);
|
|
3505
3511
|
var color = getButtonTextColorByType(type, variant, isHovered, isPressed, isDisabled);
|
|
3506
3512
|
return /*#__PURE__*/jsx(View, {
|
|
3507
3513
|
_web: {
|
|
@@ -3637,7 +3643,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3637
3643
|
onHoverOut: onHoverOut,
|
|
3638
3644
|
onFocus: onFocus,
|
|
3639
3645
|
onBlur: onBlur,
|
|
3640
|
-
children: function
|
|
3646
|
+
children: function (_ref2) {
|
|
3641
3647
|
var isHovered = _ref2.isHovered,
|
|
3642
3648
|
isPressed = _ref2.isPressed,
|
|
3643
3649
|
isFocused = _ref2.isFocused;
|
|
@@ -3700,7 +3706,7 @@ function LoaderIcon(_ref) {
|
|
|
3700
3706
|
});
|
|
3701
3707
|
}
|
|
3702
3708
|
|
|
3703
|
-
var _excluded$
|
|
3709
|
+
var _excluded$N = ["as", "onPress", "disabled", "icon", "stretch"];
|
|
3704
3710
|
var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
3705
3711
|
var as = _ref.as,
|
|
3706
3712
|
onPress = _ref.onPress,
|
|
@@ -3711,7 +3717,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3711
3717
|
base: true,
|
|
3712
3718
|
medium: false
|
|
3713
3719
|
} : _ref$stretch,
|
|
3714
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3720
|
+
props = _objectWithoutProperties(_ref, _excluded$N);
|
|
3715
3721
|
var _useState = useState(false),
|
|
3716
3722
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3717
3723
|
isLoading = _useState2[0],
|
|
@@ -3734,7 +3740,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3734
3740
|
stretch: stretch,
|
|
3735
3741
|
disabled: isLoading ? true : disabled,
|
|
3736
3742
|
icon: isLoading ? /*#__PURE__*/jsx(LoaderIcon, {}) : icon,
|
|
3737
|
-
onPress: function
|
|
3743
|
+
onPress: function (e) {
|
|
3738
3744
|
var callPressAndUpdateLoadingState = /*#__PURE__*/function () {
|
|
3739
3745
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3740
3746
|
return _regeneratorRuntime().wrap(function (_context) {
|
|
@@ -3789,7 +3795,7 @@ function ActionsButton(_ref) {
|
|
|
3789
3795
|
}, props));
|
|
3790
3796
|
}
|
|
3791
3797
|
|
|
3792
|
-
var _excluded$
|
|
3798
|
+
var _excluded$M = ["children", "layout", "reversed"];
|
|
3793
3799
|
function getCurrentLayout(layout) {
|
|
3794
3800
|
if (!layout) return {
|
|
3795
3801
|
base: 'stretch',
|
|
@@ -3821,7 +3827,7 @@ function Actions(_ref) {
|
|
|
3821
3827
|
reversed = _ref$reversed === void 0 ? {
|
|
3822
3828
|
base: false
|
|
3823
3829
|
} : _ref$reversed,
|
|
3824
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3830
|
+
props = _objectWithoutProperties(_ref, _excluded$M);
|
|
3825
3831
|
var shouldReverse = typeof reversed === 'boolean' ? {
|
|
3826
3832
|
base: !!reversed
|
|
3827
3833
|
} : createResponsiveStyleFromProp(reversed, true, false);
|
|
@@ -3874,7 +3880,7 @@ function getInitials(firstname, lastname) {
|
|
|
3874
3880
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
3875
3881
|
}
|
|
3876
3882
|
|
|
3877
|
-
var _excluded$
|
|
3883
|
+
var _excluded$L = ["size", "round", "light", "sizeVariant", "width", "height", "dark", "disabled"];
|
|
3878
3884
|
function AvatarContent(_ref) {
|
|
3879
3885
|
var size = _ref.size,
|
|
3880
3886
|
src = _ref.src,
|
|
@@ -3937,7 +3943,7 @@ function Avatar(_ref2) {
|
|
|
3937
3943
|
height = _ref2.height,
|
|
3938
3944
|
dark = _ref2.dark,
|
|
3939
3945
|
disabled = _ref2.disabled,
|
|
3940
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
3946
|
+
props = _objectWithoutProperties(_ref2, _excluded$L);
|
|
3941
3947
|
var currentSize = getCurrentSize({
|
|
3942
3948
|
size: size,
|
|
3943
3949
|
sizeVariant: sizeVariant
|
|
@@ -4063,7 +4069,7 @@ function CloseButton$1(_ref) {
|
|
|
4063
4069
|
onPress = _ref.onPress;
|
|
4064
4070
|
var onCloseContextCallback = useOnCloseModalBehaviour();
|
|
4065
4071
|
return /*#__PURE__*/cloneElement(children, {
|
|
4066
|
-
onPress: function
|
|
4072
|
+
onPress: function () {
|
|
4067
4073
|
if (onPress) onPress();
|
|
4068
4074
|
onCloseContextCallback();
|
|
4069
4075
|
}
|
|
@@ -4120,7 +4126,7 @@ function CardModalRotationContainer(props) {
|
|
|
4120
4126
|
}, props));
|
|
4121
4127
|
}
|
|
4122
4128
|
|
|
4123
|
-
var _excluded$
|
|
4129
|
+
var _excluded$K = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
|
|
4124
4130
|
var contentAnimationEnter$1 = "kitt-u_contentAnimationEnter_c11xxy4r";
|
|
4125
4131
|
var contentAnimatioEnterActive$1 = "kitt-u_contentAnimatioEnterActive_cl52117";
|
|
4126
4132
|
var contentAnimatioExit$1 = "kitt-u_contentAnimatioExit_cyjczep";
|
|
@@ -4159,7 +4165,7 @@ function CardModalAnimation(_ref) {
|
|
|
4159
4165
|
onExit = _ref.onExit,
|
|
4160
4166
|
onExited = _ref.onExited,
|
|
4161
4167
|
onClose = _ref.onClose,
|
|
4162
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4168
|
+
props = _objectWithoutProperties(_ref, _excluded$K);
|
|
4163
4169
|
var theme = useTheme();
|
|
4164
4170
|
var animation = theme.kitt.cardModal.animation;
|
|
4165
4171
|
var sharedProps = {
|
|
@@ -4192,13 +4198,13 @@ function CardModalAnimation(_ref) {
|
|
|
4192
4198
|
}));
|
|
4193
4199
|
}
|
|
4194
4200
|
|
|
4195
|
-
var _excluded$
|
|
4201
|
+
var _excluded$J = ["children", "visible", "onClose", "onExited"];
|
|
4196
4202
|
function CardModalBehaviour(_ref) {
|
|
4197
4203
|
var children = _ref.children,
|
|
4198
4204
|
visible = _ref.visible,
|
|
4199
4205
|
onClose = _ref.onClose,
|
|
4200
4206
|
onExited = _ref.onExited,
|
|
4201
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4207
|
+
props = _objectWithoutProperties(_ref, _excluded$J);
|
|
4202
4208
|
var _useState = useState(visible),
|
|
4203
4209
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4204
4210
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -4213,7 +4219,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4213
4219
|
onClose: onClose,
|
|
4214
4220
|
children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4215
4221
|
visible: visible,
|
|
4216
|
-
onExited: function
|
|
4222
|
+
onExited: function () {
|
|
4217
4223
|
if (onExited) onExited();
|
|
4218
4224
|
setIsModalBehaviourVisible(false);
|
|
4219
4225
|
},
|
|
@@ -4223,23 +4229,32 @@ function CardModalBehaviour(_ref) {
|
|
|
4223
4229
|
});
|
|
4224
4230
|
}
|
|
4225
4231
|
|
|
4226
|
-
var _excluded$
|
|
4232
|
+
var _excluded$I = ["children", "paddingX", "paddingY"];
|
|
4227
4233
|
function CardModalBody(_ref) {
|
|
4228
4234
|
var children = _ref.children,
|
|
4229
|
-
_ref$
|
|
4230
|
-
|
|
4231
|
-
|
|
4235
|
+
_ref$paddingX = _ref.paddingX,
|
|
4236
|
+
paddingX = _ref$paddingX === void 0 ? {
|
|
4237
|
+
base: 'kitt.4',
|
|
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);
|
|
4232
4246
|
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
4233
4247
|
showsVerticalScrollIndicator: false,
|
|
4234
4248
|
_contentContainerStyle: {
|
|
4235
|
-
|
|
4249
|
+
paddingX: paddingX,
|
|
4250
|
+
paddingY: paddingY
|
|
4236
4251
|
}
|
|
4237
4252
|
}, props), {}, {
|
|
4238
4253
|
children: children
|
|
4239
4254
|
}));
|
|
4240
4255
|
}
|
|
4241
4256
|
|
|
4242
|
-
var _excluded$
|
|
4257
|
+
var _excluded$H = ["children", "padding", "hasSeparator"];
|
|
4243
4258
|
function CardModalFooter(_ref) {
|
|
4244
4259
|
var children = _ref.children,
|
|
4245
4260
|
_ref$padding = _ref.padding,
|
|
@@ -4249,7 +4264,7 @@ function CardModalFooter(_ref) {
|
|
|
4249
4264
|
} : _ref$padding,
|
|
4250
4265
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
4251
4266
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
4252
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4267
|
+
props = _objectWithoutProperties(_ref, _excluded$H);
|
|
4253
4268
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4254
4269
|
marginTop: "kitt.2",
|
|
4255
4270
|
padding: padding,
|
|
@@ -4263,148 +4278,58 @@ function CardModalFooter(_ref) {
|
|
|
4263
4278
|
}));
|
|
4264
4279
|
}
|
|
4265
4280
|
|
|
4266
|
-
var
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
return {
|
|
4270
|
-
type: 'tertiary'
|
|
4271
|
-
};
|
|
4272
|
-
case 'secondary':
|
|
4273
|
-
return {
|
|
4274
|
-
type: 'secondary'
|
|
4275
|
-
};
|
|
4276
|
-
case 'primary':
|
|
4277
|
-
return {
|
|
4278
|
-
type: 'primary'
|
|
4279
|
-
};
|
|
4280
|
-
case 'primary-plain':
|
|
4281
|
-
return {
|
|
4282
|
-
type: 'primary'
|
|
4283
|
-
};
|
|
4284
|
-
case 'ghost':
|
|
4285
|
-
return {
|
|
4286
|
-
type: 'tertiary',
|
|
4287
|
-
variant: 'revert'
|
|
4288
|
-
};
|
|
4289
|
-
default:
|
|
4290
|
-
return {
|
|
4291
|
-
type: 'secondary'
|
|
4292
|
-
};
|
|
4293
|
-
}
|
|
4294
|
-
};
|
|
4295
|
-
|
|
4296
|
-
var _excluded$F = ["color", "ariaLabel"];
|
|
4297
|
-
/**
|
|
4298
|
-
* @deprecated IconButton should only be used as a navigation button
|
|
4299
|
-
* Other use cases should use a <Button> component with an icon
|
|
4300
|
-
*/
|
|
4301
|
-
function IconButton(_ref) {
|
|
4302
|
-
var _ref$color = _ref.color,
|
|
4303
|
-
color = _ref$color === void 0 ? 'black' : _ref$color;
|
|
4304
|
-
_ref.ariaLabel;
|
|
4305
|
-
var props = _objectWithoutProperties(_ref, _excluded$F);
|
|
4306
|
-
var _getButtonTypeAndVari = getButtonTypeAndVariant(color),
|
|
4307
|
-
legacyColorToType = _getButtonTypeAndVari.type,
|
|
4308
|
-
legacyColorToVariant = _getButtonTypeAndVari.variant;
|
|
4309
|
-
return /*#__PURE__*/jsx(Button, _objectSpread({
|
|
4310
|
-
variant: legacyColorToVariant,
|
|
4311
|
-
type: legacyColorToType
|
|
4312
|
-
}, props));
|
|
4313
|
-
}
|
|
4314
|
-
function CloseIconButton(props) {
|
|
4315
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4316
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
4317
|
-
}, props));
|
|
4318
|
-
}
|
|
4319
|
-
|
|
4320
|
-
function TopNavBar(_ref) {
|
|
4321
|
-
var left = _ref.left,
|
|
4322
|
-
right = _ref.right,
|
|
4281
|
+
var _excluded$G = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
|
|
4282
|
+
function CardModalHeader(_ref) {
|
|
4283
|
+
var children = _ref.children,
|
|
4323
4284
|
title = _ref.title,
|
|
4324
|
-
_ref$
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4285
|
+
_ref$paddingBottom = _ref.paddingBottom,
|
|
4286
|
+
paddingBottom = _ref$paddingBottom === void 0 ? {
|
|
4287
|
+
base: 'kitt.4',
|
|
4288
|
+
medium: 'kitt.2'
|
|
4289
|
+
} : _ref$paddingBottom,
|
|
4329
4290
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
4330
|
-
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
4342
|
-
paddingBottom: "kitt.3",
|
|
4343
|
-
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
4291
|
+
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
4292
|
+
right = _ref.right,
|
|
4293
|
+
left = _ref.left,
|
|
4294
|
+
props = _objectWithoutProperties(_ref, _excluded$G);
|
|
4295
|
+
var defaultContainerPadding = {
|
|
4296
|
+
base: 'kitt.4',
|
|
4297
|
+
medium: 'kitt.6'
|
|
4298
|
+
};
|
|
4299
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4300
|
+
padding: paddingBottom,
|
|
4301
|
+
borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4344
4302
|
borderColor: "kitt.separator",
|
|
4345
|
-
|
|
4303
|
+
justifyContent: "center",
|
|
4304
|
+
width: "100%",
|
|
4305
|
+
height: "kitt.cardModal.header.height",
|
|
4306
|
+
paddingRight: right ? 'kitt.2' : defaultContainerPadding,
|
|
4307
|
+
paddingLeft: left ? 'kitt.2' : defaultContainerPadding,
|
|
4308
|
+
children: /*#__PURE__*/jsxs(View, {
|
|
4346
4309
|
alignItems: "center",
|
|
4347
|
-
|
|
4348
|
-
|
|
4310
|
+
flexDirection: "row",
|
|
4311
|
+
justifyContent: !children && !left ? 'flex-end' : 'space-between',
|
|
4312
|
+
children: [left ? /*#__PURE__*/jsx(View, {
|
|
4313
|
+
width: "kitt.iconButton.width",
|
|
4314
|
+
children: left
|
|
4315
|
+
}) : null, /*#__PURE__*/jsxs(View, {
|
|
4349
4316
|
flexGrow: "1",
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
textAlign: titleAlign,
|
|
4317
|
+
paddingRight: right ? 'kitt.2' : 0,
|
|
4318
|
+
paddingLeft: left ? 'kitt.2' : 0,
|
|
4319
|
+
children: [title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
4320
|
+
textAlign: !left && right ? 'left' : 'center',
|
|
4355
4321
|
variant: "bold",
|
|
4356
|
-
ellipsizeMode: "tail",
|
|
4357
|
-
numberOfLines: 1,
|
|
4358
4322
|
children: title
|
|
4359
|
-
}) : null
|
|
4360
|
-
})
|
|
4361
|
-
width: "kitt.
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
4367
|
-
width: "100%",
|
|
4368
|
-
space: "kitt.1",
|
|
4369
|
-
flexShrink: 1,
|
|
4370
|
-
flexWrap: "wrap",
|
|
4371
|
-
style: {
|
|
4372
|
-
rowGap: theme.getSpacing(1)
|
|
4373
|
-
},
|
|
4374
|
-
children: stickers.map(function (sticker, index) {
|
|
4375
|
-
return (
|
|
4376
|
-
/*#__PURE__*/
|
|
4377
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
4378
|
-
jsx(View, {
|
|
4379
|
-
children: sticker
|
|
4380
|
-
}, index)
|
|
4381
|
-
);
|
|
4382
|
-
})
|
|
4383
|
-
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
4384
|
-
base: "heading-m",
|
|
4385
|
-
children: title
|
|
4386
|
-
})]
|
|
4387
|
-
}) : null]
|
|
4388
|
-
});
|
|
4389
|
-
}
|
|
4390
|
-
function CloseButton(props) {
|
|
4391
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4392
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
4393
|
-
}, props));
|
|
4394
|
-
}
|
|
4395
|
-
function BackButton(props) {
|
|
4396
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4397
|
-
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
|
|
4398
|
-
}, props));
|
|
4399
|
-
}
|
|
4400
|
-
TopNavBar.CloseButton = CloseButton;
|
|
4401
|
-
TopNavBar.BackButton = BackButton;
|
|
4402
|
-
|
|
4403
|
-
function CardModalHeader(props) {
|
|
4404
|
-
return /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props));
|
|
4323
|
+
}) : null, children]
|
|
4324
|
+
}), right ? /*#__PURE__*/jsx(View, {
|
|
4325
|
+
width: "kitt.iconButton.width",
|
|
4326
|
+
children: right
|
|
4327
|
+
}) : null]
|
|
4328
|
+
})
|
|
4329
|
+
}));
|
|
4405
4330
|
}
|
|
4406
4331
|
|
|
4407
|
-
var _excluded$
|
|
4332
|
+
var _excluded$F = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
4408
4333
|
function CardModal(_ref) {
|
|
4409
4334
|
var _ref$backgroundColor = _ref.backgroundColor,
|
|
4410
4335
|
backgroundColor = _ref$backgroundColor === void 0 ? 'kitt.uiBackgroundLight' : _ref$backgroundColor,
|
|
@@ -4415,7 +4340,7 @@ function CardModal(_ref) {
|
|
|
4415
4340
|
header = _ref.header,
|
|
4416
4341
|
body = _ref.body,
|
|
4417
4342
|
footer = _ref.footer,
|
|
4418
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4343
|
+
props = _objectWithoutProperties(_ref, _excluded$F);
|
|
4419
4344
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4420
4345
|
overflow: "hidden",
|
|
4421
4346
|
backgroundColor: backgroundColor,
|
|
@@ -4502,8 +4427,8 @@ function AnimatedChoiceItemView(_ref) {
|
|
|
4502
4427
|
|
|
4503
4428
|
var useNativeAnimation$3 = function () {
|
|
4504
4429
|
return {
|
|
4505
|
-
onPressIn: function
|
|
4506
|
-
onPressOut: function
|
|
4430
|
+
onPressIn: function () {},
|
|
4431
|
+
onPressOut: function () {},
|
|
4507
4432
|
backgroundStyles: undefined
|
|
4508
4433
|
};
|
|
4509
4434
|
};
|
|
@@ -4560,7 +4485,7 @@ function ChoiceItem(_ref) {
|
|
|
4560
4485
|
style: style,
|
|
4561
4486
|
onBlur: onBlur,
|
|
4562
4487
|
onFocus: onFocus,
|
|
4563
|
-
onPress: function
|
|
4488
|
+
onPress: function (e) {
|
|
4564
4489
|
if (onFocus) onFocus(e);
|
|
4565
4490
|
if (onPress) onPress();
|
|
4566
4491
|
handleChange();
|
|
@@ -4568,7 +4493,7 @@ function ChoiceItem(_ref) {
|
|
|
4568
4493
|
},
|
|
4569
4494
|
onPressIn: onPressIn,
|
|
4570
4495
|
onPressOut: onPressOut,
|
|
4571
|
-
children: function
|
|
4496
|
+
children: function (_ref2) {
|
|
4572
4497
|
var isHovered = _ref2.isHovered,
|
|
4573
4498
|
isPressed = _ref2.isPressed;
|
|
4574
4499
|
var textColor = getCurrentTextColor$1({
|
|
@@ -4630,11 +4555,11 @@ function ChoiceItemContainer(_ref) {
|
|
|
4630
4555
|
}));
|
|
4631
4556
|
}
|
|
4632
4557
|
|
|
4633
|
-
var _excluded$
|
|
4558
|
+
var _excluded$E = ["direction", "contentContainerStyle"];
|
|
4634
4559
|
function ChoicesContainer(_ref) {
|
|
4635
4560
|
var direction = _ref.direction,
|
|
4636
4561
|
contentContainerStyle = _ref.contentContainerStyle,
|
|
4637
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4562
|
+
props = _objectWithoutProperties(_ref, _excluded$E);
|
|
4638
4563
|
if (direction === 'row') {
|
|
4639
4564
|
return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
|
|
4640
4565
|
horizontal: true,
|
|
@@ -4672,7 +4597,7 @@ function Choices(_ref2) {
|
|
|
4672
4597
|
type: type,
|
|
4673
4598
|
disabled: disabled,
|
|
4674
4599
|
onPress: !isForm ? onPress : undefined,
|
|
4675
|
-
onChange: isForm ? function
|
|
4600
|
+
onChange: isForm ? function (newValue) {
|
|
4676
4601
|
setCurrentValue(newValue);
|
|
4677
4602
|
if (onChange) onChange(newValue);
|
|
4678
4603
|
} : undefined,
|
|
@@ -4709,7 +4634,7 @@ var ChoicesElements = {
|
|
|
4709
4634
|
ButtonChoices: ButtonChoices
|
|
4710
4635
|
};
|
|
4711
4636
|
|
|
4712
|
-
var _excluded$
|
|
4637
|
+
var _excluded$D = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
|
|
4713
4638
|
var contentAnimationEnter = "kitt-u_contentAnimationEnter_c1i0gle8";
|
|
4714
4639
|
var contentAnimatioEnterActive = "kitt-u_contentAnimatioEnterActive_c1jmfkjw";
|
|
4715
4640
|
var contentAnimatioExit = "kitt-u_contentAnimatioExit_cwjstxl";
|
|
@@ -4748,7 +4673,7 @@ function DialogModalAnimation(_ref) {
|
|
|
4748
4673
|
onExit = _ref.onExit,
|
|
4749
4674
|
onExited = _ref.onExited,
|
|
4750
4675
|
onClose = _ref.onClose,
|
|
4751
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4676
|
+
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
4752
4677
|
var theme = useTheme();
|
|
4753
4678
|
var animation = theme.kitt.dialogModal.animation;
|
|
4754
4679
|
var sharedProps = {
|
|
@@ -4783,13 +4708,13 @@ function DialogModalAnimation(_ref) {
|
|
|
4783
4708
|
}));
|
|
4784
4709
|
}
|
|
4785
4710
|
|
|
4786
|
-
var _excluded$
|
|
4711
|
+
var _excluded$C = ["children", "visible", "onClose", "onExited"];
|
|
4787
4712
|
function DialogModalBehaviour(_ref) {
|
|
4788
4713
|
var children = _ref.children,
|
|
4789
4714
|
visible = _ref.visible,
|
|
4790
4715
|
onClose = _ref.onClose,
|
|
4791
4716
|
onExited = _ref.onExited,
|
|
4792
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4717
|
+
props = _objectWithoutProperties(_ref, _excluded$C);
|
|
4793
4718
|
var _useState = useState(visible),
|
|
4794
4719
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4795
4720
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -4809,7 +4734,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4809
4734
|
},
|
|
4810
4735
|
children: /*#__PURE__*/jsx(DialogModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4811
4736
|
visible: visible,
|
|
4812
|
-
onExited: function
|
|
4737
|
+
onExited: function () {
|
|
4813
4738
|
if (onExited) onExited();
|
|
4814
4739
|
setIsModalBehaviourVisible(false);
|
|
4815
4740
|
},
|
|
@@ -4820,7 +4745,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4820
4745
|
});
|
|
4821
4746
|
}
|
|
4822
4747
|
|
|
4823
|
-
var _excluded$
|
|
4748
|
+
var _excluded$B = ["stretch"];
|
|
4824
4749
|
function DialogModal(_ref) {
|
|
4825
4750
|
var illustration = _ref.illustration,
|
|
4826
4751
|
title = _ref.title,
|
|
@@ -4860,7 +4785,7 @@ DialogModal.ModalBehaviour = DialogModalBehaviour;
|
|
|
4860
4785
|
function DialogModalButton(_ref2) {
|
|
4861
4786
|
var _ref2$stretch = _ref2.stretch,
|
|
4862
4787
|
stretch = _ref2$stretch === void 0 ? true : _ref2$stretch,
|
|
4863
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
4788
|
+
props = _objectWithoutProperties(_ref2, _excluded$B);
|
|
4864
4789
|
return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
|
|
4865
4790
|
stretch: stretch
|
|
4866
4791
|
}, props));
|
|
@@ -4897,7 +4822,7 @@ function Emoji(_ref) {
|
|
|
4897
4822
|
});
|
|
4898
4823
|
}
|
|
4899
4824
|
|
|
4900
|
-
var _excluded$
|
|
4825
|
+
var _excluded$A = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
|
|
4901
4826
|
_excluded2$5 = ["phoneNumber", "children"],
|
|
4902
4827
|
_excluded3$4 = ["phoneNumber", "children"],
|
|
4903
4828
|
_excluded4$3 = ["emailAddress", "children"];
|
|
@@ -4907,7 +4832,7 @@ function ExternalAppLink(_ref) {
|
|
|
4907
4832
|
appValue = _ref.appValue,
|
|
4908
4833
|
onPress = _ref.onPress,
|
|
4909
4834
|
onOpenAppError = _ref.onOpenAppError,
|
|
4910
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
4835
|
+
rest = _objectWithoutProperties(_ref, _excluded$A);
|
|
4911
4836
|
var href = "".concat(appScheme, ":").concat(appValue);
|
|
4912
4837
|
var handleOnPress = /*#__PURE__*/function () {
|
|
4913
4838
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
@@ -5002,14 +4927,14 @@ var defaultOpenLinkBehavior = {
|
|
|
5002
4927
|
web: 'targetBlank'
|
|
5003
4928
|
};
|
|
5004
4929
|
|
|
5005
|
-
var _excluded$
|
|
4930
|
+
var _excluded$z = ["as", "href", "openLinkBehavior", "onPress"];
|
|
5006
4931
|
function ExternalLink(_ref) {
|
|
5007
4932
|
var Component = _ref.as,
|
|
5008
4933
|
href = _ref.href,
|
|
5009
4934
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
5010
4935
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
5011
4936
|
onPress = _ref.onPress,
|
|
5012
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
4937
|
+
rest = _objectWithoutProperties(_ref, _excluded$z);
|
|
5013
4938
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
5014
4939
|
accessibilityRole: "link",
|
|
5015
4940
|
href: href,
|
|
@@ -5085,7 +5010,7 @@ function InputTextContainer(props) {
|
|
|
5085
5010
|
}, props));
|
|
5086
5011
|
}
|
|
5087
5012
|
|
|
5088
|
-
var _excluded$
|
|
5013
|
+
var _excluded$y = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "inputMode", "multiline", "height", "onSubmitEditing"];
|
|
5089
5014
|
var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5090
5015
|
var id = _ref.id,
|
|
5091
5016
|
right = _ref.right;
|
|
@@ -5106,7 +5031,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5106
5031
|
multiline = _ref.multiline,
|
|
5107
5032
|
height = _ref.height,
|
|
5108
5033
|
onSubmitEditing = _ref.onSubmitEditing,
|
|
5109
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5034
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
5110
5035
|
var theme = useTheme();
|
|
5111
5036
|
var fontSizeForNativeBase = createNativeBaseFontSize({
|
|
5112
5037
|
base: 'body-m'
|
|
@@ -5230,12 +5155,12 @@ function AutocompleteItemsListContainer(_ref) {
|
|
|
5230
5155
|
});
|
|
5231
5156
|
}
|
|
5232
5157
|
|
|
5233
|
-
var _excluded$
|
|
5158
|
+
var _excluded$x = ["children", "testID"];
|
|
5234
5159
|
function AutocompleteOption(_ref) {
|
|
5235
5160
|
var children = _ref.children,
|
|
5236
5161
|
_ref$testID = _ref.testID,
|
|
5237
5162
|
testID = _ref$testID === void 0 ? 'kitt.Autocomplete.option' : _ref$testID,
|
|
5238
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5163
|
+
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
5239
5164
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
5240
5165
|
paddingX: {
|
|
5241
5166
|
base: 'kitt.2',
|
|
@@ -5248,7 +5173,7 @@ function AutocompleteOption(_ref) {
|
|
|
5248
5173
|
}));
|
|
5249
5174
|
}
|
|
5250
5175
|
|
|
5251
|
-
var _excluded$
|
|
5176
|
+
var _excluded$w = ["children", "name", "disabled", "placeholder", "isInitialOpen", "initialValue", "containerProps", "filterItemBasedOnCurrentInputValue", "checkSelectedItem", "itemToString", "right", "onChange", "onFocus", "onBlur", "onInputChange", "onSelectItem", "onOuterPress", "errorElement", "emptyResultsElement", "inputTestID", "listContainerTestID", "zIndex", "maxItemContainerHeight"],
|
|
5252
5177
|
_excluded2$4 = ["onClick", "onPress"],
|
|
5253
5178
|
_excluded3$3 = ["onKeyDown", "onFocus", "onBlur", "onChange"],
|
|
5254
5179
|
_excluded4$2 = ["onClick", "onPress", "role", "aria-selected"];
|
|
@@ -5256,7 +5181,7 @@ function isReactElement(element) {
|
|
|
5256
5181
|
return _typeof(element) === 'object' && element !== null && 'type' in element && 'props' in element;
|
|
5257
5182
|
}
|
|
5258
5183
|
function Autocomplete(_ref) {
|
|
5259
|
-
var
|
|
5184
|
+
var children = _ref.children,
|
|
5260
5185
|
name = _ref.name,
|
|
5261
5186
|
disabled = _ref.disabled,
|
|
5262
5187
|
placeholder = _ref.placeholder,
|
|
@@ -5282,8 +5207,8 @@ function Autocomplete(_ref) {
|
|
|
5282
5207
|
_ref$zIndex = _ref.zIndex,
|
|
5283
5208
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5284
5209
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5285
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5286
|
-
var childrenArray = Children.toArray(
|
|
5210
|
+
props = _objectWithoutProperties(_ref, _excluded$w);
|
|
5211
|
+
var childrenArray = Children.toArray(children);
|
|
5287
5212
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5288
5213
|
return {
|
|
5289
5214
|
child: child,
|
|
@@ -5294,12 +5219,12 @@ function Autocomplete(_ref) {
|
|
|
5294
5219
|
defaultIsOpen: isInitialOpen,
|
|
5295
5220
|
initialSelectedItem: initialValue,
|
|
5296
5221
|
initialInputValue: initialValue ? itemToString(initialValue) : undefined,
|
|
5297
|
-
itemToString: function
|
|
5222
|
+
itemToString: function (item) {
|
|
5298
5223
|
// Prevents returning null values
|
|
5299
5224
|
if (!itemToString) return '';
|
|
5300
5225
|
return itemToString(item || undefined);
|
|
5301
5226
|
},
|
|
5302
|
-
stateReducer: function
|
|
5227
|
+
stateReducer: function (state, changes) {
|
|
5303
5228
|
switch (changes.type) {
|
|
5304
5229
|
case Downshift.stateChangeTypes.changeInput:
|
|
5305
5230
|
return _objectSpread(_objectSpread({}, changes), {}, {
|
|
@@ -5309,7 +5234,7 @@ function Autocomplete(_ref) {
|
|
|
5309
5234
|
return changes;
|
|
5310
5235
|
}
|
|
5311
5236
|
},
|
|
5312
|
-
onChange: function
|
|
5237
|
+
onChange: function (selectedItem, stateAndHelpers) {
|
|
5313
5238
|
if (_onChange) {
|
|
5314
5239
|
_onChange(selectedItem, stateAndHelpers);
|
|
5315
5240
|
}
|
|
@@ -5317,7 +5242,7 @@ function Autocomplete(_ref) {
|
|
|
5317
5242
|
onSelect: onSelectItem,
|
|
5318
5243
|
onOuterClick: onOuterPress,
|
|
5319
5244
|
onInputValueChange: onInputChange,
|
|
5320
|
-
children: function
|
|
5245
|
+
children: function (_ref2) {
|
|
5321
5246
|
var getRootProps = _ref2.getRootProps,
|
|
5322
5247
|
getInputProps = _ref2.getInputProps,
|
|
5323
5248
|
getMenuProps = _ref2.getMenuProps,
|
|
@@ -5369,20 +5294,20 @@ function Autocomplete(_ref) {
|
|
|
5369
5294
|
right: right || (canDisplayCollapseButton ? /*#__PURE__*/jsx(InputPressable, _objectSpread(_objectSpread({}, toggleProps), {}, {
|
|
5370
5295
|
testID: "kitt.Autocomplete.listToggle",
|
|
5371
5296
|
hitSlop: 40,
|
|
5372
|
-
onPress: function
|
|
5297
|
+
onPress: function (e) {
|
|
5373
5298
|
onClickToggle(e);
|
|
5374
5299
|
},
|
|
5375
5300
|
children: /*#__PURE__*/jsx(InputIcon, {
|
|
5376
5301
|
icon: isCurrentlyOpen ? /*#__PURE__*/jsx(CaretUpFillIcon, {}) : /*#__PURE__*/jsx(CaretDownFillIcon, {})
|
|
5377
5302
|
})
|
|
5378
5303
|
})) : null),
|
|
5379
|
-
onFocus: function
|
|
5304
|
+
onFocus: function (e) {
|
|
5380
5305
|
openMenu();
|
|
5381
5306
|
/** @ts-expect-error onFocus wants web events */
|
|
5382
5307
|
if (onSearchInputFocus) onSearchInputFocus(e);
|
|
5383
5308
|
if (_onFocus) _onFocus(e);
|
|
5384
5309
|
},
|
|
5385
|
-
onBlur: function
|
|
5310
|
+
onBlur: function (e) {
|
|
5386
5311
|
/** @ts-expect-error onBlur wants web events */
|
|
5387
5312
|
if (onSearchInputBlur) onSearchInputBlur(e);
|
|
5388
5313
|
|
|
@@ -5418,10 +5343,10 @@ function Autocomplete(_ref) {
|
|
|
5418
5343
|
selected: ariaSelected
|
|
5419
5344
|
},
|
|
5420
5345
|
disabled: disabled,
|
|
5421
|
-
onPress: function
|
|
5346
|
+
onPress: function (e) {
|
|
5422
5347
|
if (onClick) onClick(e);
|
|
5423
5348
|
},
|
|
5424
|
-
children: function
|
|
5349
|
+
children: function (_ref5) {
|
|
5425
5350
|
var isHovered = _ref5.isHovered,
|
|
5426
5351
|
isFocused = _ref5.isFocused,
|
|
5427
5352
|
isPressed = _ref5.isPressed;
|
|
@@ -5489,7 +5414,7 @@ function getBorderColor$1(_ref) {
|
|
|
5489
5414
|
return 'kitt.forms.checkbox.default.borderColor';
|
|
5490
5415
|
}
|
|
5491
5416
|
|
|
5492
|
-
var _excluded$
|
|
5417
|
+
var _excluded$v = ["checked", "hitSlop", "children", "disabled", "onChange", "onBlur", "onFocus"];
|
|
5493
5418
|
var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5494
5419
|
var checked = _ref.checked,
|
|
5495
5420
|
_ref$hitSlop = _ref.hitSlop,
|
|
@@ -5499,7 +5424,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5499
5424
|
onChange = _ref.onChange,
|
|
5500
5425
|
onBlur = _ref.onBlur,
|
|
5501
5426
|
onFocus = _ref.onFocus,
|
|
5502
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5427
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
5503
5428
|
var theme = useTheme();
|
|
5504
5429
|
return /*#__PURE__*/jsx(Pressable, _objectSpread(_objectSpread({
|
|
5505
5430
|
hitSlop: hitSlop
|
|
@@ -5511,12 +5436,12 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5511
5436
|
disabled: disabled
|
|
5512
5437
|
},
|
|
5513
5438
|
disabled: disabled,
|
|
5514
|
-
onPress: function
|
|
5439
|
+
onPress: function (e) {
|
|
5515
5440
|
if (onFocus) onFocus();
|
|
5516
5441
|
if (onChange) onChange(!checked, e);
|
|
5517
5442
|
if (onBlur) onBlur();
|
|
5518
5443
|
},
|
|
5519
|
-
children: function
|
|
5444
|
+
children: function (_ref2) {
|
|
5520
5445
|
var isHovered = _ref2.isHovered,
|
|
5521
5446
|
isPressed = _ref2.isPressed,
|
|
5522
5447
|
isFocused = _ref2.isFocused;
|
|
@@ -5815,7 +5740,7 @@ function PartContainer(_ref) {
|
|
|
5815
5740
|
});
|
|
5816
5741
|
}
|
|
5817
5742
|
|
|
5818
|
-
var _excluded$
|
|
5743
|
+
var _excluded$u = ["id", "value", "testID", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "enterKeyHint", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
|
|
5819
5744
|
var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5820
5745
|
var id = _ref.id,
|
|
5821
5746
|
value = _ref.value,
|
|
@@ -5833,7 +5758,7 @@ var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5833
5758
|
onBlur = _ref.onBlur,
|
|
5834
5759
|
onFocus = _ref.onFocus,
|
|
5835
5760
|
onSubmitEditing = _ref.onSubmitEditing;
|
|
5836
|
-
_objectWithoutProperties(_ref, _excluded$
|
|
5761
|
+
_objectWithoutProperties(_ref, _excluded$u);
|
|
5837
5762
|
var monthRef = useRef(null);
|
|
5838
5763
|
var yearRef = useRef(null);
|
|
5839
5764
|
var defaultValue = value;
|
|
@@ -5973,10 +5898,10 @@ var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5973
5898
|
});
|
|
5974
5899
|
});
|
|
5975
5900
|
|
|
5976
|
-
var _excluded$
|
|
5901
|
+
var _excluded$t = ["value"];
|
|
5977
5902
|
var DatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5978
5903
|
var value = _ref.value,
|
|
5979
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5904
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
5980
5905
|
// in apps, final-form can give a string value that will break the component
|
|
5981
5906
|
var currentValue = value || undefined;
|
|
5982
5907
|
return /*#__PURE__*/jsx(KeyboardDatePicker, _objectSpread(_objectSpread({
|
|
@@ -6325,10 +6250,10 @@ var GoogleMapsAutocompleteContext = /*#__PURE__*/createContext({
|
|
|
6325
6250
|
isLoadingResultDetails: false,
|
|
6326
6251
|
shouldDisplayEmptyStateWhenNoResults: false
|
|
6327
6252
|
},
|
|
6328
|
-
onInputChange: function
|
|
6253
|
+
onInputChange: function () {
|
|
6329
6254
|
return Promise.resolve();
|
|
6330
6255
|
},
|
|
6331
|
-
onSelectItem: function
|
|
6256
|
+
onSelectItem: function () {}
|
|
6332
6257
|
});
|
|
6333
6258
|
function GoogleMapsAutocompleteProvider(_ref) {
|
|
6334
6259
|
var children = _ref.children,
|
|
@@ -6560,7 +6485,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
|
|
|
6560
6485
|
};
|
|
6561
6486
|
}
|
|
6562
6487
|
|
|
6563
|
-
var _excluded$
|
|
6488
|
+
var _excluded$s = ["initialValue", "itemToString", "errorElement", "emptyResultsElement", "onChange"];
|
|
6564
6489
|
function InputAddress(_ref) {
|
|
6565
6490
|
var initialValue = _ref.initialValue,
|
|
6566
6491
|
_ref$itemToString = _ref.itemToString,
|
|
@@ -6568,7 +6493,7 @@ function InputAddress(_ref) {
|
|
|
6568
6493
|
errorElement = _ref.errorElement,
|
|
6569
6494
|
emptyResultsElement = _ref.emptyResultsElement,
|
|
6570
6495
|
_onChange = _ref.onChange,
|
|
6571
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6496
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
6572
6497
|
var _useGoogleMapsAutocom = useGoogleMapsAutocomplete(),
|
|
6573
6498
|
state = _useGoogleMapsAutocom.state,
|
|
6574
6499
|
_onInputChange = _useGoogleMapsAutocom.onInputChange,
|
|
@@ -6579,7 +6504,7 @@ function InputAddress(_ref) {
|
|
|
6579
6504
|
return /*#__PURE__*/jsx(Autocomplete, _objectSpread(_objectSpread({}, props), {}, {
|
|
6580
6505
|
itemToString: itemToString,
|
|
6581
6506
|
initialValue: formattedInitialValue,
|
|
6582
|
-
checkSelectedItem: function
|
|
6507
|
+
checkSelectedItem: function (selectedItem, item) {
|
|
6583
6508
|
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.place_id) === item.place_id;
|
|
6584
6509
|
},
|
|
6585
6510
|
right: state.isLoadingSearch || state.isLoadingResultDetails ? /*#__PURE__*/jsx(Icon, {
|
|
@@ -6588,10 +6513,10 @@ function InputAddress(_ref) {
|
|
|
6588
6513
|
}) : undefined,
|
|
6589
6514
|
errorElement: state.hasSearchError || state.hasSelectResultError ? errorElement : null,
|
|
6590
6515
|
emptyResultsElement: state.items.length === 0 ? emptyResultsElement : null,
|
|
6591
|
-
onInputChange: function
|
|
6516
|
+
onInputChange: function (v) {
|
|
6592
6517
|
_onInputChange(v);
|
|
6593
6518
|
},
|
|
6594
|
-
onChange: function
|
|
6519
|
+
onChange: function (v) {
|
|
6595
6520
|
onSelectItem(v, _onChange);
|
|
6596
6521
|
},
|
|
6597
6522
|
children: state.items.map(function (item) {
|
|
@@ -6665,15 +6590,15 @@ var InputIban = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6665
6590
|
}, props));
|
|
6666
6591
|
});
|
|
6667
6592
|
|
|
6668
|
-
var _excluded$
|
|
6593
|
+
var _excluded$r = ["onChange"];
|
|
6669
6594
|
var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
6670
6595
|
var onChange = _ref.onChange,
|
|
6671
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6596
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
6672
6597
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
6673
6598
|
ref: ref
|
|
6674
6599
|
}, props), {}, {
|
|
6675
6600
|
inputMode: "numeric",
|
|
6676
|
-
onChange: function
|
|
6601
|
+
onChange: function (event) {
|
|
6677
6602
|
if (!onChange) return;
|
|
6678
6603
|
var value = parseFloat(event.nativeEvent.text);
|
|
6679
6604
|
|
|
@@ -6685,11 +6610,11 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6685
6610
|
}));
|
|
6686
6611
|
});
|
|
6687
6612
|
|
|
6688
|
-
var _excluded$
|
|
6613
|
+
var _excluded$q = ["isPasswordDefaultVisible", "right"];
|
|
6689
6614
|
var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
6690
6615
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
6691
6616
|
right = _ref.right,
|
|
6692
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6617
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
6693
6618
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
6694
6619
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6695
6620
|
isVisible = _useState2[0],
|
|
@@ -6705,7 +6630,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6705
6630
|
testID: "kitt.InputPassword.passwordToggle",
|
|
6706
6631
|
hitSlop: 20,
|
|
6707
6632
|
accessibilityRole: "button",
|
|
6708
|
-
onPress: function
|
|
6633
|
+
onPress: function () {
|
|
6709
6634
|
return setIsVisible(function (prev) {
|
|
6710
6635
|
return !prev;
|
|
6711
6636
|
});
|
|
@@ -6717,7 +6642,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6717
6642
|
}));
|
|
6718
6643
|
});
|
|
6719
6644
|
|
|
6720
|
-
var _excluded$
|
|
6645
|
+
var _excluded$p = ["enterKeyHint", "autoComplete", "phoneNumberLength", "onChange"];
|
|
6721
6646
|
function isPhoneNumberValid(number) {
|
|
6722
6647
|
return isValidNumber(number);
|
|
6723
6648
|
}
|
|
@@ -6731,7 +6656,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6731
6656
|
_ref$phoneNumberLengt = _ref.phoneNumberLength,
|
|
6732
6657
|
phoneNumberLength = _ref$phoneNumberLengt === void 0 ? 10 : _ref$phoneNumberLengt,
|
|
6733
6658
|
onChange = _ref.onChange,
|
|
6734
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6659
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
6735
6660
|
var currentEnterKeyHint = enterKeyHint ? getEnterKeyHintForNumericInput(enterKeyHint) : undefined;
|
|
6736
6661
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
6737
6662
|
ref: ref
|
|
@@ -6740,7 +6665,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6740
6665
|
enterKeyHint: currentEnterKeyHint,
|
|
6741
6666
|
autoComplete: autoComplete,
|
|
6742
6667
|
textContentType: "telephoneNumber",
|
|
6743
|
-
onChange: function
|
|
6668
|
+
onChange: function (event) {
|
|
6744
6669
|
var number = parseNumber(event.nativeEvent.text);
|
|
6745
6670
|
|
|
6746
6671
|
// When intl phone number is valid :
|
|
@@ -6932,14 +6857,14 @@ function Radio(_ref, ref) {
|
|
|
6932
6857
|
focusable: checked && !disabled,
|
|
6933
6858
|
flexDirection: "row",
|
|
6934
6859
|
alignItems: "center",
|
|
6935
|
-
onPress: function
|
|
6860
|
+
onPress: function (event) {
|
|
6936
6861
|
if (onFocus) onFocus();
|
|
6937
6862
|
if (onChange) onChange(value, event);
|
|
6938
6863
|
if (onBlur) onBlur();
|
|
6939
6864
|
},
|
|
6940
6865
|
onFocus: onFocus,
|
|
6941
6866
|
onBlur: onBlur,
|
|
6942
|
-
children: function
|
|
6867
|
+
children: function (_ref2) {
|
|
6943
6868
|
var isHovered = _ref2.isHovered,
|
|
6944
6869
|
isPressed = _ref2.isPressed,
|
|
6945
6870
|
isFocused = _ref2.isFocused;
|
|
@@ -7115,7 +7040,7 @@ function RadioButton(_ref) {
|
|
|
7115
7040
|
flexShrink: createResponsiveStyleFromProp(stretch, 1, undefined),
|
|
7116
7041
|
flexBasis: createResponsiveStyleFromProp(stretch, 0),
|
|
7117
7042
|
disabled: disabled,
|
|
7118
|
-
onPress: function
|
|
7043
|
+
onPress: function (e) {
|
|
7119
7044
|
if (onFocus) onFocus(e);
|
|
7120
7045
|
if (onChange) onChange(value);
|
|
7121
7046
|
if (onBlur) onBlur(e);
|
|
@@ -7124,7 +7049,7 @@ function RadioButton(_ref) {
|
|
|
7124
7049
|
onPressOut: onPressOut,
|
|
7125
7050
|
onFocus: onFocus,
|
|
7126
7051
|
onBlur: onBlur,
|
|
7127
|
-
children: function
|
|
7052
|
+
children: function (_ref2) {
|
|
7128
7053
|
var isHovered = _ref2.isHovered,
|
|
7129
7054
|
isPressed = _ref2.isPressed,
|
|
7130
7055
|
isFocused = _ref2.isFocused;
|
|
@@ -7167,7 +7092,7 @@ function RadioButton(_ref) {
|
|
|
7167
7092
|
});
|
|
7168
7093
|
}
|
|
7169
7094
|
|
|
7170
|
-
var _excluded$
|
|
7095
|
+
var _excluded$o = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
|
|
7171
7096
|
function RadioButtonGroupItem(_ref) {
|
|
7172
7097
|
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
7173
7098
|
return /*#__PURE__*/jsx(RadioButton, _objectSpread({}, props));
|
|
@@ -7180,7 +7105,7 @@ function RadioButtonGroup(_ref2) {
|
|
|
7180
7105
|
onFocus = _ref2.onFocus,
|
|
7181
7106
|
onBlur = _ref2.onBlur,
|
|
7182
7107
|
onChange = _ref2.onChange,
|
|
7183
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
7108
|
+
props = _objectWithoutProperties(_ref2, _excluded$o);
|
|
7184
7109
|
var _useState = useState(value),
|
|
7185
7110
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7186
7111
|
currentValue = _useState2[0],
|
|
@@ -7212,12 +7137,12 @@ function RadioButtonGroup(_ref2) {
|
|
|
7212
7137
|
}
|
|
7213
7138
|
RadioButtonGroup.RadioButton = RadioButtonGroupItem;
|
|
7214
7139
|
|
|
7215
|
-
var _excluded$
|
|
7140
|
+
var _excluded$n = ["helper", "limit"];
|
|
7216
7141
|
var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
7217
7142
|
var _props$value, _props$value2;
|
|
7218
7143
|
var helper = _ref.helper,
|
|
7219
7144
|
limit = _ref.limit,
|
|
7220
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7145
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
7221
7146
|
var shouldDisplayLimit = limit && limit > 0;
|
|
7222
7147
|
var isLimitReached = ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.length) === limit;
|
|
7223
7148
|
var limitContainerAnimatedStyle = useAnimatedStyle(function () {
|
|
@@ -7243,7 +7168,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7243
7168
|
textAlignVertical: "top",
|
|
7244
7169
|
minHeight: "kitt.forms.textArea.minHeight"
|
|
7245
7170
|
}, props), {}, {
|
|
7246
|
-
onChange: function
|
|
7171
|
+
onChange: function (e) {
|
|
7247
7172
|
if (!limit || e.nativeEvent.text.length <= limit) {
|
|
7248
7173
|
var _props$onChange;
|
|
7249
7174
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, e);
|
|
@@ -7376,7 +7301,7 @@ function ToggleAnimated(_ref) {
|
|
|
7376
7301
|
});
|
|
7377
7302
|
}
|
|
7378
7303
|
|
|
7379
|
-
var _excluded$
|
|
7304
|
+
var _excluded$m = ["isDisabled", "isHoveredInternal", "isFocusedInternal", "isPressedInternal", "label", "variant", "size", "value", "onChange"];
|
|
7380
7305
|
var getLabelTypographyType = function (size) {
|
|
7381
7306
|
return size === 'medium' ? 'body-m' : 'body-l';
|
|
7382
7307
|
};
|
|
@@ -7398,7 +7323,7 @@ function Toggle(_ref) {
|
|
|
7398
7323
|
value = _ref$value === void 0 ? false : _ref$value,
|
|
7399
7324
|
_ref$onChange = _ref.onChange,
|
|
7400
7325
|
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
7401
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7326
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
7402
7327
|
var theme = useKittTheme();
|
|
7403
7328
|
return /*#__PURE__*/jsxs(HStack, _objectSpread(_objectSpread({
|
|
7404
7329
|
alignItems: "center"
|
|
@@ -7406,10 +7331,10 @@ function Toggle(_ref) {
|
|
|
7406
7331
|
children: [/*#__PURE__*/jsx(Pressable, {
|
|
7407
7332
|
accessibilityRole: "togglebutton",
|
|
7408
7333
|
disabled: isDisabled,
|
|
7409
|
-
onPress: function
|
|
7334
|
+
onPress: function () {
|
|
7410
7335
|
onChange(!value);
|
|
7411
7336
|
},
|
|
7412
|
-
children: function
|
|
7337
|
+
children: function (_ref2) {
|
|
7413
7338
|
var isHovered = _ref2.isHovered,
|
|
7414
7339
|
isPressed = _ref2.isPressed,
|
|
7415
7340
|
isFocused = _ref2.isFocused;
|
|
@@ -7437,13 +7362,13 @@ function Toggle(_ref) {
|
|
|
7437
7362
|
}));
|
|
7438
7363
|
}
|
|
7439
7364
|
|
|
7440
|
-
var _excluded$
|
|
7365
|
+
var _excluded$l = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
|
|
7441
7366
|
function FullscreenModalBody(_ref) {
|
|
7442
7367
|
var children = _ref.children,
|
|
7443
7368
|
shouldHandleBottomNotch = _ref.shouldHandleBottomNotch,
|
|
7444
7369
|
style = _ref.style,
|
|
7445
7370
|
shouldHandleTopNotch = _ref.shouldHandleTopNotch,
|
|
7446
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7371
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
7447
7372
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7448
7373
|
bottom = _useSafeAreaInsets.bottom,
|
|
7449
7374
|
top = _useSafeAreaInsets.top;
|
|
@@ -7463,14 +7388,14 @@ function FullscreenModalBody(_ref) {
|
|
|
7463
7388
|
}));
|
|
7464
7389
|
}
|
|
7465
7390
|
|
|
7466
|
-
var _excluded$
|
|
7391
|
+
var _excluded$k = ["shouldHandleBottomNotch", "hasSeparator", "children"];
|
|
7467
7392
|
function FullscreenModalFooter(_ref) {
|
|
7468
7393
|
var _ref$shouldHandleBott = _ref.shouldHandleBottomNotch,
|
|
7469
7394
|
shouldHandleBottomNotch = _ref$shouldHandleBott === void 0 ? true : _ref$shouldHandleBott,
|
|
7470
7395
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
7471
7396
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
7472
7397
|
children = _ref.children,
|
|
7473
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7398
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
7474
7399
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7475
7400
|
bottom = _useSafeAreaInsets.bottom;
|
|
7476
7401
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
@@ -7487,7 +7412,7 @@ function FullscreenModalFooter(_ref) {
|
|
|
7487
7412
|
}));
|
|
7488
7413
|
}
|
|
7489
7414
|
|
|
7490
|
-
var _excluded$
|
|
7415
|
+
var _excluded$j = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
|
|
7491
7416
|
var slideInFromBottomEnter = "kitt-u_slideInFromBottomEnter_s1717rto";
|
|
7492
7417
|
var slideInFromBottomEnterActive = "kitt-u_slideInFromBottomEnterActive_sux6xgc";
|
|
7493
7418
|
var slideInFromBottomExit = "kitt-u_slideInFromBottomExit_sl0lsxt";
|
|
@@ -7526,7 +7451,7 @@ function FullscreenModalAnimation(_ref) {
|
|
|
7526
7451
|
onExit = _ref.onExit,
|
|
7527
7452
|
onExited = _ref.onExited,
|
|
7528
7453
|
onClose = _ref.onClose,
|
|
7529
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7454
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
7530
7455
|
var theme = useTheme();
|
|
7531
7456
|
var animation = theme.kitt.fullscreenModal.animation;
|
|
7532
7457
|
var sharedProps = {
|
|
@@ -7553,13 +7478,13 @@ function FullscreenModalAnimation(_ref) {
|
|
|
7553
7478
|
}));
|
|
7554
7479
|
}
|
|
7555
7480
|
|
|
7556
|
-
var _excluded$
|
|
7481
|
+
var _excluded$i = ["children", "visible", "onClose", "onExited"];
|
|
7557
7482
|
function FullscreenModalBehaviour(_ref) {
|
|
7558
7483
|
var children = _ref.children,
|
|
7559
7484
|
visible = _ref.visible,
|
|
7560
7485
|
onClose = _ref.onClose,
|
|
7561
7486
|
onExited = _ref.onExited,
|
|
7562
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7487
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
7563
7488
|
var _useState = useState(visible),
|
|
7564
7489
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7565
7490
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -7574,7 +7499,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
7574
7499
|
onClose: onClose,
|
|
7575
7500
|
children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
7576
7501
|
visible: visible,
|
|
7577
|
-
onExited: function
|
|
7502
|
+
onExited: function () {
|
|
7578
7503
|
if (onExited) onExited();
|
|
7579
7504
|
setIsModalBehaviourVisible(false);
|
|
7580
7505
|
},
|
|
@@ -7606,17 +7531,64 @@ function FullscreenModalContainer(_ref) {
|
|
|
7606
7531
|
});
|
|
7607
7532
|
}
|
|
7608
7533
|
|
|
7609
|
-
var _excluded$
|
|
7534
|
+
var _excluded$h = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
|
|
7610
7535
|
function FullscreenModalHeader(_ref) {
|
|
7611
|
-
var _ref$
|
|
7536
|
+
var _ref$hasSeparator = _ref.hasSeparator,
|
|
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,
|
|
7612
7544
|
shouldHandleTopNotch = _ref$shouldHandleTopN === void 0 ? true : _ref$shouldHandleTopN,
|
|
7613
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7545
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
7614
7546
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7615
7547
|
top = _useSafeAreaInsets.top;
|
|
7616
|
-
|
|
7548
|
+
var hasRight = Boolean(right);
|
|
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",
|
|
7617
7556
|
paddingTop: shouldHandleTopNotch ? top : undefined,
|
|
7618
|
-
|
|
7619
|
-
|
|
7557
|
+
paddingRight: hasRight ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
7558
|
+
paddingLeft: hasLeft ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
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
|
+
}));
|
|
7620
7592
|
}
|
|
7621
7593
|
|
|
7622
7594
|
function FullscreenModal(_ref) {
|
|
@@ -7826,13 +7798,13 @@ function Highlight(_ref) {
|
|
|
7826
7798
|
});
|
|
7827
7799
|
}
|
|
7828
7800
|
return /*#__PURE__*/jsx(Pressable, {
|
|
7829
|
-
onPress: function
|
|
7801
|
+
onPress: function () {
|
|
7830
7802
|
setIsExpanded(!isExpanded);
|
|
7831
7803
|
setIsInitialRender(false);
|
|
7832
7804
|
},
|
|
7833
7805
|
onPressIn: onPressIn,
|
|
7834
7806
|
onPressOut: onPressOut,
|
|
7835
|
-
children: function
|
|
7807
|
+
children: function (_ref2) {
|
|
7836
7808
|
var isHovered = _ref2.isHovered;
|
|
7837
7809
|
return /*#__PURE__*/jsxs(AnimatedContainer, {
|
|
7838
7810
|
isHovered: isHovered,
|
|
@@ -7886,6 +7858,60 @@ function Highlight(_ref) {
|
|
|
7886
7858
|
});
|
|
7887
7859
|
}
|
|
7888
7860
|
|
|
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
|
+
|
|
7889
7915
|
function InfoCard(_ref) {
|
|
7890
7916
|
var title = _ref.title,
|
|
7891
7917
|
action = _ref.action,
|
|
@@ -8253,7 +8279,7 @@ function MapMarker(_ref2) {
|
|
|
8253
8279
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
8254
8280
|
testID: testID,
|
|
8255
8281
|
onPress: onPress,
|
|
8256
|
-
children: function
|
|
8282
|
+
children: function (_ref3) {
|
|
8257
8283
|
var isHovered = _ref3.isHovered;
|
|
8258
8284
|
return /*#__PURE__*/jsx(StaticMapMarker$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
8259
8285
|
isHovered: isHovered
|
|
@@ -9696,6 +9722,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9696
9722
|
},
|
|
9697
9723
|
icon: theme.icon,
|
|
9698
9724
|
cardModal: {
|
|
9725
|
+
header: {
|
|
9726
|
+
height: theme.cardModal.header.height
|
|
9727
|
+
},
|
|
9699
9728
|
maxWidth: theme.cardModal.maxWidth,
|
|
9700
9729
|
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
|
|
9701
9730
|
minHeight: theme.cardModal.minHeight
|
|
@@ -9996,6 +10025,15 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9996
10025
|
}
|
|
9997
10026
|
}
|
|
9998
10027
|
},
|
|
10028
|
+
iconButton: {
|
|
10029
|
+
width: theme.iconButton.width,
|
|
10030
|
+
height: theme.iconButton.height
|
|
10031
|
+
},
|
|
10032
|
+
fullscreenModal: {
|
|
10033
|
+
header: {
|
|
10034
|
+
height: theme.fullscreenModal.header.height
|
|
10035
|
+
}
|
|
10036
|
+
},
|
|
9999
10037
|
pageLoader: {
|
|
10000
10038
|
size: theme.pageLoader.size
|
|
10001
10039
|
},
|
|
@@ -10090,7 +10128,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10090
10128
|
}
|
|
10091
10129
|
},
|
|
10092
10130
|
fullscreenModal: {
|
|
10093
|
-
horizontalPadding: theme.fullscreenModal.
|
|
10131
|
+
horizontalPadding: theme.fullscreenModal.sharedHorizontalPadding,
|
|
10094
10132
|
body: {
|
|
10095
10133
|
verticalPadding: theme.fullscreenModal.body.verticalPadding
|
|
10096
10134
|
},
|
|
@@ -10990,19 +11028,19 @@ function NavigationModalBehaviour(_ref) {
|
|
|
10990
11028
|
children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
10991
11029
|
appear: shouldAppear,
|
|
10992
11030
|
visible: visible,
|
|
10993
|
-
onEnter: function
|
|
11031
|
+
onEnter: function () {
|
|
10994
11032
|
if (onEnter) onEnter();
|
|
10995
11033
|
|
|
10996
11034
|
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
10997
11035
|
setShouldAppear(false);
|
|
10998
11036
|
},
|
|
10999
|
-
onExit: function
|
|
11037
|
+
onExit: function () {
|
|
11000
11038
|
if (onExit) onExit();
|
|
11001
11039
|
|
|
11002
11040
|
// Reset appear value to its original value for future modal display
|
|
11003
11041
|
setShouldAppear(appear);
|
|
11004
11042
|
},
|
|
11005
|
-
onExited: function
|
|
11043
|
+
onExited: function () {
|
|
11006
11044
|
if (onExited) onExited();
|
|
11007
11045
|
setIsModalBehaviourVisible(false);
|
|
11008
11046
|
},
|
|
@@ -11070,12 +11108,18 @@ function NavigationBottomSheet(_ref) {
|
|
|
11070
11108
|
})
|
|
11071
11109
|
});
|
|
11072
11110
|
}
|
|
11073
|
-
function NavigationBottomSheetHeader(
|
|
11074
|
-
|
|
11111
|
+
function NavigationBottomSheetHeader(_ref2) {
|
|
11112
|
+
var children = _ref2.children,
|
|
11113
|
+
left = _ref2.left;
|
|
11114
|
+
return /*#__PURE__*/jsx(NavigationModal.Header, {
|
|
11115
|
+
title: children,
|
|
11116
|
+
left: left,
|
|
11075
11117
|
right: /*#__PURE__*/jsx(ModalBehaviour.CloseButton, {
|
|
11076
|
-
children: /*#__PURE__*/jsx(
|
|
11118
|
+
children: /*#__PURE__*/jsx(IconButton, {
|
|
11119
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
11120
|
+
})
|
|
11077
11121
|
})
|
|
11078
|
-
})
|
|
11122
|
+
});
|
|
11079
11123
|
}
|
|
11080
11124
|
function NavigationBottomSheetBody(props) {
|
|
11081
11125
|
return /*#__PURE__*/jsx(NavigationModal.Body, _objectSpread({
|
|
@@ -11262,18 +11306,18 @@ function Picker(_ref) {
|
|
|
11262
11306
|
items: items,
|
|
11263
11307
|
initialSelectedItem: initialValueIndex > -1 ? items[initialValueIndex] : undefined,
|
|
11264
11308
|
initialIsOpen: isInitialOpen,
|
|
11265
|
-
stateReducer: function
|
|
11309
|
+
stateReducer: function (state, actionAndChanges) {
|
|
11266
11310
|
return webUseSelectReducer(state, actionAndChanges, {
|
|
11267
11311
|
keepOpenOnChange: keepOpenOnChange
|
|
11268
11312
|
});
|
|
11269
11313
|
},
|
|
11270
11314
|
selectedItem: syncStateWithSourceValue ? sourceValue : undefined,
|
|
11271
|
-
onIsOpenChange: function
|
|
11315
|
+
onIsOpenChange: function (changes) {
|
|
11272
11316
|
if (changes.isOpen === false) {
|
|
11273
11317
|
if (onClose) onClose();
|
|
11274
11318
|
}
|
|
11275
11319
|
},
|
|
11276
|
-
onSelectedItemChange: function
|
|
11320
|
+
onSelectedItemChange: function (changes) {
|
|
11277
11321
|
if (!onChange) return;
|
|
11278
11322
|
if (changes.selectedItem === null) {
|
|
11279
11323
|
onChange(undefined);
|
|
@@ -11493,7 +11537,7 @@ function Skeleton(_ref) {
|
|
|
11493
11537
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
11494
11538
|
overflow: "hidden",
|
|
11495
11539
|
style: style,
|
|
11496
|
-
onLayout: function
|
|
11540
|
+
onLayout: function (_ref2) {
|
|
11497
11541
|
var nativeEvent = _ref2.nativeEvent;
|
|
11498
11542
|
return setWidth(nativeEvent.layout.width);
|
|
11499
11543
|
},
|
|
@@ -11719,7 +11763,7 @@ function StaticMap(_ref) {
|
|
|
11719
11763
|
position: "relative",
|
|
11720
11764
|
maxWidth: mapBoxMaxPictureWidth,
|
|
11721
11765
|
height: height,
|
|
11722
|
-
onLayout: function
|
|
11766
|
+
onLayout: function (event) {
|
|
11723
11767
|
var nativeEvent = event.nativeEvent;
|
|
11724
11768
|
var rangedMapWidth = getPictureWidth(nativeEvent.layout.width);
|
|
11725
11769
|
setCurrentWidth(rangedMapWidth);
|
|
@@ -11731,11 +11775,11 @@ function StaticMap(_ref) {
|
|
|
11731
11775
|
width: currentWidth,
|
|
11732
11776
|
height: height,
|
|
11733
11777
|
alt: alt,
|
|
11734
|
-
onLoadEnd: function
|
|
11778
|
+
onLoadEnd: function () {
|
|
11735
11779
|
setIsLoading(false);
|
|
11736
11780
|
if (onLoaded) onLoaded();
|
|
11737
11781
|
},
|
|
11738
|
-
onError: function
|
|
11782
|
+
onError: function () {
|
|
11739
11783
|
setHasError(true);
|
|
11740
11784
|
if (onError) onError();
|
|
11741
11785
|
}
|
|
@@ -11760,7 +11804,7 @@ function StaticMap(_ref) {
|
|
|
11760
11804
|
width: "100%",
|
|
11761
11805
|
height: "100%",
|
|
11762
11806
|
children: /*#__PURE__*/jsx(StaticMapError, {
|
|
11763
|
-
onReload: function
|
|
11807
|
+
onReload: function () {
|
|
11764
11808
|
setHasError(false);
|
|
11765
11809
|
setIsLoading(true);
|
|
11766
11810
|
setCurrentMapKey(function (prev) {
|
|
@@ -12002,7 +12046,7 @@ function StoryContainer(_ref) {
|
|
|
12002
12046
|
var StoryDecorator = makeDecorator({
|
|
12003
12047
|
name: 'StoryDecorator',
|
|
12004
12048
|
parameterName: 'storyDecorator',
|
|
12005
|
-
wrapper: function
|
|
12049
|
+
wrapper: function (storyFn, context) {
|
|
12006
12050
|
var story = storyFn(context);
|
|
12007
12051
|
if (context.parameters.disableStoryContainer) {
|
|
12008
12052
|
return story;
|
|
@@ -12106,7 +12150,7 @@ function TabBarItem(_ref) {
|
|
|
12106
12150
|
disabled: disabled,
|
|
12107
12151
|
testID: testID,
|
|
12108
12152
|
onPress: onPress,
|
|
12109
|
-
children: function
|
|
12153
|
+
children: function (_ref2) {
|
|
12110
12154
|
var isHovered = _ref2.isHovered,
|
|
12111
12155
|
isPressed = _ref2.isPressed,
|
|
12112
12156
|
isFocused = _ref2.isFocused;
|
|
@@ -12195,7 +12239,7 @@ function TabBar(_ref) {
|
|
|
12195
12239
|
color: color,
|
|
12196
12240
|
variant: definedVariant,
|
|
12197
12241
|
type: type,
|
|
12198
|
-
onPress: function
|
|
12242
|
+
onPress: function (event) {
|
|
12199
12243
|
var _child$props$onPress, _child$props;
|
|
12200
12244
|
onChangeTab({
|
|
12201
12245
|
tab: tab,
|
|
@@ -12374,7 +12418,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12374
12418
|
isFocusedInternal: isFocusedInternal,
|
|
12375
12419
|
isPressedInternal: isPressedInternal
|
|
12376
12420
|
}),
|
|
12377
|
-
onChange: function
|
|
12421
|
+
onChange: function (event) {
|
|
12378
12422
|
var currentValue = event.nativeEvent.text;
|
|
12379
12423
|
if (currentValue.length === 0) {
|
|
12380
12424
|
setInputValue(currentValue);
|
|
@@ -12425,7 +12469,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12425
12469
|
setInputValue(sanitizedValue);
|
|
12426
12470
|
handleChange(sanitizedValue);
|
|
12427
12471
|
},
|
|
12428
|
-
onBlur: function
|
|
12472
|
+
onBlur: function () {
|
|
12429
12473
|
if (inputValue.indexOf(':') === 1) {
|
|
12430
12474
|
setInputValue("0".concat(inputValue));
|
|
12431
12475
|
}
|
|
@@ -12828,6 +12872,88 @@ function Tooltip(_ref) {
|
|
|
12828
12872
|
Tooltip.Arrow = Arrow;
|
|
12829
12873
|
Tooltip.Content = TooltipContent;
|
|
12830
12874
|
|
|
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
|
+
|
|
12831
12957
|
function getTypographyTypeConfig(type, theme) {
|
|
12832
12958
|
var configs = theme.kitt.typography.types[getTypographyFamily(type)].configs;
|
|
12833
12959
|
return configs[type];
|
|
@@ -12980,7 +13106,7 @@ function KittThemeProvider(_ref) {
|
|
|
12980
13106
|
var KittThemeDecorator = makeDecorator({
|
|
12981
13107
|
name: 'ThemeDecorator',
|
|
12982
13108
|
parameterName: 'theme',
|
|
12983
|
-
wrapper: function
|
|
13109
|
+
wrapper: function (storyFn, context, _ref2) {
|
|
12984
13110
|
var _parameters$isSSR;
|
|
12985
13111
|
var _ref2$options = _ref2.options,
|
|
12986
13112
|
options = _ref2$options === void 0 ? {} : _ref2$options,
|