@ornikar/kitt-universal 27.9.1-canary.51004cd27185355acc481c9933556ade7509bc80.0 → 27.9.1-canary.7887d5a9313c31fdf8e4d5a4b645a75389e9e991.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 +3 -8
- 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 -6
- 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 +8 -4
- 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/index-metro.es.android.js +276 -154
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +276 -154
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +266 -152
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +252 -143
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +267 -153
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +253 -144
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +282 -160
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +336 -220
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +3 -3
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +3 -3
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +3 -3
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +3 -3
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +3 -3
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +3 -3
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +3 -3
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +3 -3
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -13,7 +13,7 @@ export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
|
13
13
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
14
14
|
import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
|
|
15
15
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
16
|
-
import { SpinnerGapRegularIcon, UserRegularIcon,
|
|
16
|
+
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';
|
|
17
17
|
import { BottomSheetView, BottomSheetScrollView, BottomSheetSectionList, BottomSheetFlatList, BottomSheetHandle, BottomSheetBackdrop, BottomSheetFooter, BottomSheetTextInput, BottomSheetModal, useBottomSheetModal } from '@gorhom/bottom-sheet';
|
|
18
18
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
19
19
|
import { parse } from '@twemoji/parser';
|
|
@@ -1820,12 +1820,12 @@ var fullscreenModal = {
|
|
|
1820
1820
|
header: {
|
|
1821
1821
|
height: 56
|
|
1822
1822
|
},
|
|
1823
|
-
|
|
1823
|
+
sharedHorizontalPadding: 16,
|
|
1824
1824
|
footer: {
|
|
1825
1825
|
verticalPadding: 12
|
|
1826
1826
|
},
|
|
1827
1827
|
body: {
|
|
1828
|
-
verticalPadding:
|
|
1828
|
+
verticalPadding: 24
|
|
1829
1829
|
},
|
|
1830
1830
|
animation: {
|
|
1831
1831
|
overlay: {
|
|
@@ -2647,8 +2647,8 @@ var theme = {
|
|
|
2647
2647
|
forms: forms,
|
|
2648
2648
|
highlight: highlight,
|
|
2649
2649
|
icon: icon,
|
|
2650
|
-
iconButton: iconButton,
|
|
2651
2650
|
buttonBadge: buttonBadge,
|
|
2651
|
+
iconButton: iconButton,
|
|
2652
2652
|
listItem: listItem,
|
|
2653
2653
|
pageLoader: pageLoader,
|
|
2654
2654
|
picker: picker,
|
|
@@ -4379,16 +4379,25 @@ function CardModalBehaviour(_ref) {
|
|
|
4379
4379
|
});
|
|
4380
4380
|
}
|
|
4381
4381
|
|
|
4382
|
-
var _excluded$J = ["children", "
|
|
4382
|
+
var _excluded$J = ["children", "paddingX", "paddingY"];
|
|
4383
4383
|
function CardModalBody(_ref) {
|
|
4384
4384
|
var children = _ref.children,
|
|
4385
|
-
_ref$
|
|
4386
|
-
|
|
4385
|
+
_ref$paddingX = _ref.paddingX,
|
|
4386
|
+
paddingX = _ref$paddingX === void 0 ? {
|
|
4387
|
+
base: 'kitt.4',
|
|
4388
|
+
medium: 'kitt.6'
|
|
4389
|
+
} : _ref$paddingX,
|
|
4390
|
+
_ref$paddingY = _ref.paddingY,
|
|
4391
|
+
paddingY = _ref$paddingY === void 0 ? {
|
|
4392
|
+
base: 'kitt.4',
|
|
4393
|
+
medium: 'kitt.6'
|
|
4394
|
+
} : _ref$paddingY,
|
|
4387
4395
|
props = _objectWithoutProperties(_ref, _excluded$J);
|
|
4388
4396
|
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
4389
4397
|
showsVerticalScrollIndicator: false,
|
|
4390
4398
|
_contentContainerStyle: {
|
|
4391
|
-
|
|
4399
|
+
paddingX: paddingX,
|
|
4400
|
+
paddingY: paddingY
|
|
4392
4401
|
}
|
|
4393
4402
|
}, props), {}, {
|
|
4394
4403
|
children: children
|
|
@@ -4419,145 +4428,55 @@ function CardModalFooter(_ref) {
|
|
|
4419
4428
|
}));
|
|
4420
4429
|
}
|
|
4421
4430
|
|
|
4422
|
-
var
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
return {
|
|
4426
|
-
type: 'tertiary'
|
|
4427
|
-
};
|
|
4428
|
-
case 'secondary':
|
|
4429
|
-
return {
|
|
4430
|
-
type: 'secondary'
|
|
4431
|
-
};
|
|
4432
|
-
case 'primary':
|
|
4433
|
-
return {
|
|
4434
|
-
type: 'primary'
|
|
4435
|
-
};
|
|
4436
|
-
case 'primary-plain':
|
|
4437
|
-
return {
|
|
4438
|
-
type: 'primary'
|
|
4439
|
-
};
|
|
4440
|
-
case 'ghost':
|
|
4441
|
-
return {
|
|
4442
|
-
type: 'tertiary',
|
|
4443
|
-
variant: 'revert'
|
|
4444
|
-
};
|
|
4445
|
-
default:
|
|
4446
|
-
return {
|
|
4447
|
-
type: 'secondary'
|
|
4448
|
-
};
|
|
4449
|
-
}
|
|
4450
|
-
};
|
|
4451
|
-
|
|
4452
|
-
var _excluded$H = ["color", "ariaLabel"];
|
|
4453
|
-
/**
|
|
4454
|
-
* @deprecated IconButton should only be used as a navigation button
|
|
4455
|
-
* Other use cases should use a <Button> component with an icon
|
|
4456
|
-
*/
|
|
4457
|
-
function IconButton(_ref) {
|
|
4458
|
-
var _ref$color = _ref.color,
|
|
4459
|
-
color = _ref$color === void 0 ? 'black' : _ref$color;
|
|
4460
|
-
_ref.ariaLabel;
|
|
4461
|
-
var props = _objectWithoutProperties(_ref, _excluded$H);
|
|
4462
|
-
var _getButtonTypeAndVari = getButtonTypeAndVariant(color),
|
|
4463
|
-
legacyColorToType = _getButtonTypeAndVari.type,
|
|
4464
|
-
legacyColorToVariant = _getButtonTypeAndVari.variant;
|
|
4465
|
-
return /*#__PURE__*/jsx(Button, _objectSpread({
|
|
4466
|
-
variant: legacyColorToVariant,
|
|
4467
|
-
type: legacyColorToType
|
|
4468
|
-
}, props));
|
|
4469
|
-
}
|
|
4470
|
-
function CloseIconButton(props) {
|
|
4471
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4472
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
4473
|
-
}, props));
|
|
4474
|
-
}
|
|
4475
|
-
|
|
4476
|
-
function TopNavBar(_ref) {
|
|
4477
|
-
var left = _ref.left,
|
|
4478
|
-
right = _ref.right,
|
|
4431
|
+
var _excluded$H = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
|
|
4432
|
+
function CardModalHeader(_ref) {
|
|
4433
|
+
var children = _ref.children,
|
|
4479
4434
|
title = _ref.title,
|
|
4480
|
-
_ref$
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4435
|
+
_ref$paddingBottom = _ref.paddingBottom,
|
|
4436
|
+
paddingBottom = _ref$paddingBottom === void 0 ? {
|
|
4437
|
+
base: 'kitt.4',
|
|
4438
|
+
medium: 'kitt.2'
|
|
4439
|
+
} : _ref$paddingBottom,
|
|
4485
4440
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
4486
|
-
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
4498
|
-
paddingBottom: "kitt.3",
|
|
4499
|
-
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
4441
|
+
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
4442
|
+
right = _ref.right,
|
|
4443
|
+
left = _ref.left,
|
|
4444
|
+
props = _objectWithoutProperties(_ref, _excluded$H);
|
|
4445
|
+
var defaultContainerPadding = {
|
|
4446
|
+
base: 'kitt.4',
|
|
4447
|
+
medium: 'kitt.6'
|
|
4448
|
+
};
|
|
4449
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4450
|
+
padding: paddingBottom,
|
|
4451
|
+
borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4500
4452
|
borderColor: "kitt.separator",
|
|
4501
|
-
|
|
4453
|
+
justifyContent: "center",
|
|
4454
|
+
width: "100%",
|
|
4455
|
+
height: "kitt.cardModal.header.height",
|
|
4456
|
+
paddingRight: right ? 'kitt.2' : defaultContainerPadding,
|
|
4457
|
+
paddingLeft: left ? 'kitt.2' : defaultContainerPadding,
|
|
4458
|
+
children: /*#__PURE__*/jsxs(View, {
|
|
4502
4459
|
alignItems: "center",
|
|
4503
|
-
|
|
4504
|
-
|
|
4460
|
+
flexDirection: "row",
|
|
4461
|
+
justifyContent: !children && !left ? 'flex-end' : 'space-between',
|
|
4462
|
+
children: [left ? /*#__PURE__*/jsx(View, {
|
|
4463
|
+
width: "kitt.iconButton.width",
|
|
4464
|
+
children: left
|
|
4465
|
+
}) : null, /*#__PURE__*/jsxs(View, {
|
|
4505
4466
|
flexGrow: "1",
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
textAlign: titleAlign,
|
|
4467
|
+
paddingRight: right ? 'kitt.2' : 0,
|
|
4468
|
+
paddingLeft: left ? 'kitt.2' : 0,
|
|
4469
|
+
children: [title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
4470
|
+
textAlign: !left && right ? 'left' : 'center',
|
|
4511
4471
|
variant: "bold",
|
|
4512
|
-
ellipsizeMode: "tail",
|
|
4513
|
-
numberOfLines: 1,
|
|
4514
4472
|
children: title
|
|
4515
|
-
}) : null
|
|
4516
|
-
})
|
|
4517
|
-
width: "kitt.iconButton.width"
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
4523
|
-
width: "100%",
|
|
4524
|
-
space: "kitt.1",
|
|
4525
|
-
flexShrink: 1,
|
|
4526
|
-
flexWrap: "wrap",
|
|
4527
|
-
style: {
|
|
4528
|
-
rowGap: theme.getSpacing(1)
|
|
4529
|
-
},
|
|
4530
|
-
children: stickers.map(function (sticker, index) {
|
|
4531
|
-
return (
|
|
4532
|
-
/*#__PURE__*/
|
|
4533
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
4534
|
-
jsx(View, {
|
|
4535
|
-
children: sticker
|
|
4536
|
-
}, index)
|
|
4537
|
-
);
|
|
4538
|
-
})
|
|
4539
|
-
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
4540
|
-
base: "heading-m",
|
|
4541
|
-
children: title
|
|
4542
|
-
})]
|
|
4543
|
-
}) : null]
|
|
4544
|
-
});
|
|
4545
|
-
}
|
|
4546
|
-
function CloseButton(props) {
|
|
4547
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4548
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
4549
|
-
}, props));
|
|
4550
|
-
}
|
|
4551
|
-
function BackButton(props) {
|
|
4552
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4553
|
-
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
|
|
4554
|
-
}, props));
|
|
4555
|
-
}
|
|
4556
|
-
TopNavBar.CloseButton = CloseButton;
|
|
4557
|
-
TopNavBar.BackButton = BackButton;
|
|
4558
|
-
|
|
4559
|
-
function CardModalHeader(props) {
|
|
4560
|
-
return /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props));
|
|
4473
|
+
}) : null, children]
|
|
4474
|
+
}), right ? /*#__PURE__*/jsx(View, {
|
|
4475
|
+
width: "kitt.iconButton.width",
|
|
4476
|
+
children: right
|
|
4477
|
+
}) : null]
|
|
4478
|
+
})
|
|
4479
|
+
}));
|
|
4561
4480
|
}
|
|
4562
4481
|
|
|
4563
4482
|
var _excluded$G = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
@@ -6452,7 +6371,11 @@ var _excluded$u = ["title", "isVisible", "value", "validateButtonLabel", "onClos
|
|
|
6452
6371
|
function ModalTitle(_ref) {
|
|
6453
6372
|
var children = _ref.children;
|
|
6454
6373
|
return /*#__PURE__*/jsx(CardModal.Header, {
|
|
6455
|
-
|
|
6374
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
6375
|
+
base: "body-m",
|
|
6376
|
+
variant: "bold",
|
|
6377
|
+
children: children
|
|
6378
|
+
})
|
|
6456
6379
|
});
|
|
6457
6380
|
}
|
|
6458
6381
|
function ModalPlatformDateTimePicker(_ref2) {
|
|
@@ -8532,17 +8455,64 @@ function FullscreenModalContainer(_ref) {
|
|
|
8532
8455
|
});
|
|
8533
8456
|
}
|
|
8534
8457
|
|
|
8535
|
-
var _excluded$c = ["shouldHandleTopNotch"];
|
|
8458
|
+
var _excluded$c = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
|
|
8536
8459
|
function FullscreenModalHeader(_ref) {
|
|
8537
|
-
var _ref$
|
|
8460
|
+
var _ref$hasSeparator = _ref.hasSeparator,
|
|
8461
|
+
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
8462
|
+
isTransparent = _ref.isTransparent,
|
|
8463
|
+
title = _ref.title,
|
|
8464
|
+
children = _ref.children,
|
|
8465
|
+
right = _ref.right,
|
|
8466
|
+
left = _ref.left,
|
|
8467
|
+
_ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
|
|
8538
8468
|
shouldHandleTopNotch = _ref$shouldHandleTopN === void 0 ? true : _ref$shouldHandleTopN,
|
|
8539
8469
|
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
8540
8470
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
8541
8471
|
top = _useSafeAreaInsets.top;
|
|
8542
|
-
|
|
8472
|
+
var hasRight = Boolean(right);
|
|
8473
|
+
var hasLeft = Boolean(left);
|
|
8474
|
+
var hasContent = Boolean(title || children);
|
|
8475
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
8476
|
+
backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
|
|
8477
|
+
minHeight: "kitt.fullscreenModal.header.height",
|
|
8478
|
+
width: "100%",
|
|
8479
|
+
justifyContent: "center",
|
|
8543
8480
|
paddingTop: shouldHandleTopNotch ? top : undefined,
|
|
8544
|
-
|
|
8545
|
-
|
|
8481
|
+
paddingRight: hasRight ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
8482
|
+
paddingLeft: hasLeft ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
8483
|
+
borderBottomColor: "kitt.separator",
|
|
8484
|
+
borderBottomWidth: hasSeparator ? 1 : undefined
|
|
8485
|
+
}, props), {}, {
|
|
8486
|
+
children: /*#__PURE__*/jsxs(View, {
|
|
8487
|
+
flexDirection: "row",
|
|
8488
|
+
alignItems: "center",
|
|
8489
|
+
justifyContent: !hasContent && !hasLeft ? 'flex-end' : 'space-between',
|
|
8490
|
+
children: [left ? /*#__PURE__*/jsx(View, {
|
|
8491
|
+
width: "kitt.iconButton.width",
|
|
8492
|
+
children: left
|
|
8493
|
+
}) : null, title ? /*#__PURE__*/jsx(View, {
|
|
8494
|
+
flexGrow: 1,
|
|
8495
|
+
flexShrink: 1,
|
|
8496
|
+
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
8497
|
+
paddingRight: hasRight ? 'kitt.2' : 0,
|
|
8498
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
8499
|
+
variant: "bold",
|
|
8500
|
+
textAlign: !hasLeft && hasRight ? 'left' : 'center',
|
|
8501
|
+
children: title
|
|
8502
|
+
})
|
|
8503
|
+
}) : null, children ? /*#__PURE__*/jsx(View, {
|
|
8504
|
+
flexGrow: 1,
|
|
8505
|
+
flexShrink: 1,
|
|
8506
|
+
alignItems: "center",
|
|
8507
|
+
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
8508
|
+
paddingRight: hasRight ? 'kitt.2' : undefined,
|
|
8509
|
+
children: children
|
|
8510
|
+
}) : null, right || left ? /*#__PURE__*/jsx(View, {
|
|
8511
|
+
width: "kitt.iconButton.width",
|
|
8512
|
+
children: right
|
|
8513
|
+
}) : null]
|
|
8514
|
+
})
|
|
8515
|
+
}));
|
|
8546
8516
|
}
|
|
8547
8517
|
|
|
8548
8518
|
function FullscreenModal(_ref) {
|
|
@@ -8841,6 +8811,60 @@ function Highlight(_ref) {
|
|
|
8841
8811
|
});
|
|
8842
8812
|
}
|
|
8843
8813
|
|
|
8814
|
+
var getButtonTypeAndVariant = function (iconColor) {
|
|
8815
|
+
switch (iconColor) {
|
|
8816
|
+
case 'black':
|
|
8817
|
+
return {
|
|
8818
|
+
type: 'tertiary'
|
|
8819
|
+
};
|
|
8820
|
+
case 'secondary':
|
|
8821
|
+
return {
|
|
8822
|
+
type: 'secondary'
|
|
8823
|
+
};
|
|
8824
|
+
case 'primary':
|
|
8825
|
+
return {
|
|
8826
|
+
type: 'primary'
|
|
8827
|
+
};
|
|
8828
|
+
case 'primary-plain':
|
|
8829
|
+
return {
|
|
8830
|
+
type: 'primary'
|
|
8831
|
+
};
|
|
8832
|
+
case 'ghost':
|
|
8833
|
+
return {
|
|
8834
|
+
type: 'tertiary',
|
|
8835
|
+
variant: 'revert'
|
|
8836
|
+
};
|
|
8837
|
+
default:
|
|
8838
|
+
return {
|
|
8839
|
+
type: 'secondary'
|
|
8840
|
+
};
|
|
8841
|
+
}
|
|
8842
|
+
};
|
|
8843
|
+
|
|
8844
|
+
var _excluded$b = ["color", "ariaLabel"];
|
|
8845
|
+
/**
|
|
8846
|
+
* @deprecated IconButton should only be used as a navigation button
|
|
8847
|
+
* Other use cases should use a <Button> component with an icon
|
|
8848
|
+
*/
|
|
8849
|
+
function IconButton(_ref) {
|
|
8850
|
+
var _ref$color = _ref.color,
|
|
8851
|
+
color = _ref$color === void 0 ? 'black' : _ref$color;
|
|
8852
|
+
_ref.ariaLabel;
|
|
8853
|
+
var props = _objectWithoutProperties(_ref, _excluded$b);
|
|
8854
|
+
var _getButtonTypeAndVari = getButtonTypeAndVariant(color),
|
|
8855
|
+
legacyColorToType = _getButtonTypeAndVari.type,
|
|
8856
|
+
legacyColorToVariant = _getButtonTypeAndVari.variant;
|
|
8857
|
+
return /*#__PURE__*/jsx(Button, _objectSpread({
|
|
8858
|
+
variant: legacyColorToVariant,
|
|
8859
|
+
type: legacyColorToType
|
|
8860
|
+
}, props));
|
|
8861
|
+
}
|
|
8862
|
+
function CloseIconButton(props) {
|
|
8863
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
8864
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
8865
|
+
}, props));
|
|
8866
|
+
}
|
|
8867
|
+
|
|
8844
8868
|
function InfoCard(_ref) {
|
|
8845
8869
|
var title = _ref.title,
|
|
8846
8870
|
action = _ref.action,
|
|
@@ -9062,7 +9086,7 @@ var getBackgroundColor = function (_ref) {
|
|
|
9062
9086
|
return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint["default"];
|
|
9063
9087
|
};
|
|
9064
9088
|
|
|
9065
|
-
var _excluded$
|
|
9089
|
+
var _excluded$a = ["onPress", "testID"];
|
|
9066
9090
|
function StaticMapMarker$1(_ref) {
|
|
9067
9091
|
var variant = _ref.variant,
|
|
9068
9092
|
isHovered = _ref.isHovered,
|
|
@@ -9121,7 +9145,7 @@ function StaticMapMarker$1(_ref) {
|
|
|
9121
9145
|
function MapMarker(_ref2) {
|
|
9122
9146
|
var onPress = _ref2.onPress,
|
|
9123
9147
|
testID = _ref2.testID,
|
|
9124
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
9148
|
+
props = _objectWithoutProperties(_ref2, _excluded$a);
|
|
9125
9149
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
9126
9150
|
testID: testID,
|
|
9127
9151
|
onPress: onPress,
|
|
@@ -10568,6 +10592,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10568
10592
|
},
|
|
10569
10593
|
icon: theme.icon,
|
|
10570
10594
|
cardModal: {
|
|
10595
|
+
header: {
|
|
10596
|
+
height: theme.cardModal.header.height
|
|
10597
|
+
},
|
|
10571
10598
|
maxWidth: theme.cardModal.maxWidth,
|
|
10572
10599
|
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
|
|
10573
10600
|
minHeight: theme.cardModal.minHeight
|
|
@@ -10872,6 +10899,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10872
10899
|
width: theme.iconButton.width,
|
|
10873
10900
|
height: theme.iconButton.height
|
|
10874
10901
|
},
|
|
10902
|
+
fullscreenModal: {
|
|
10903
|
+
header: {
|
|
10904
|
+
height: theme.fullscreenModal.header.height
|
|
10905
|
+
}
|
|
10906
|
+
},
|
|
10875
10907
|
pageLoader: {
|
|
10876
10908
|
size: theme.pageLoader.size
|
|
10877
10909
|
},
|
|
@@ -10966,7 +10998,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10966
10998
|
}
|
|
10967
10999
|
},
|
|
10968
11000
|
fullscreenModal: {
|
|
10969
|
-
horizontalPadding: theme.fullscreenModal.
|
|
11001
|
+
horizontalPadding: theme.fullscreenModal.sharedHorizontalPadding,
|
|
10970
11002
|
body: {
|
|
10971
11003
|
verticalPadding: theme.fullscreenModal.body.verticalPadding
|
|
10972
11004
|
},
|
|
@@ -11787,7 +11819,6 @@ function KittNativeBaseProvider(_ref) {
|
|
|
11787
11819
|
});
|
|
11788
11820
|
}
|
|
11789
11821
|
|
|
11790
|
-
var _excluded$a = ["right"];
|
|
11791
11822
|
function NavigationBottomSheet(_ref) {
|
|
11792
11823
|
var children = _ref.children,
|
|
11793
11824
|
hasScrollView = _ref.hasScrollView,
|
|
@@ -11826,15 +11857,19 @@ function NavigationBottomSheet(_ref) {
|
|
|
11826
11857
|
})
|
|
11827
11858
|
});
|
|
11828
11859
|
}
|
|
11829
|
-
|
|
11830
|
-
/**
|
|
11831
|
-
* Web only: display right CloseButton
|
|
11832
|
-
*/
|
|
11833
|
-
|
|
11834
11860
|
function NavigationBottomSheetHeader(_ref2) {
|
|
11835
|
-
_ref2.
|
|
11836
|
-
|
|
11837
|
-
return /*#__PURE__*/jsx(
|
|
11861
|
+
var children = _ref2.children;
|
|
11862
|
+
_ref2.left;
|
|
11863
|
+
return /*#__PURE__*/jsx(HStack, {
|
|
11864
|
+
marginBottom: "kitt.6",
|
|
11865
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
11866
|
+
flexGrow: 1,
|
|
11867
|
+
flexShrink: 1,
|
|
11868
|
+
variant: "bold",
|
|
11869
|
+
textAlign: "center",
|
|
11870
|
+
children: children
|
|
11871
|
+
})
|
|
11872
|
+
});
|
|
11838
11873
|
}
|
|
11839
11874
|
function NavigationBottomSheetBody(props) {
|
|
11840
11875
|
return /*#__PURE__*/jsx(VStack, _objectSpread({
|
|
@@ -12278,9 +12313,14 @@ function Picker(_ref) {
|
|
|
12278
12313
|
onClose: handleClose,
|
|
12279
12314
|
children: /*#__PURE__*/jsxs(CardModal, {
|
|
12280
12315
|
children: [/*#__PURE__*/jsx(CardModal.Header, {
|
|
12281
|
-
|
|
12282
|
-
|
|
12316
|
+
right: /*#__PURE__*/jsx(IconButton, {
|
|
12317
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {}),
|
|
12283
12318
|
onPress: handleClose
|
|
12319
|
+
}),
|
|
12320
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
12321
|
+
base: "body-m",
|
|
12322
|
+
variant: "bold",
|
|
12323
|
+
children: title
|
|
12284
12324
|
})
|
|
12285
12325
|
}), Platform.OS === 'ios' && shouldDisplayNativePickerOnIOS ? /*#__PURE__*/jsx(Picker$1, {
|
|
12286
12326
|
testID: testID,
|
|
@@ -13862,6 +13902,88 @@ function Tooltip(_ref) {
|
|
|
13862
13902
|
Tooltip.Arrow = Arrow;
|
|
13863
13903
|
Tooltip.Content = TooltipContent;
|
|
13864
13904
|
|
|
13905
|
+
function TopNavBar(_ref) {
|
|
13906
|
+
var left = _ref.left,
|
|
13907
|
+
right = _ref.right,
|
|
13908
|
+
title = _ref.title,
|
|
13909
|
+
_ref$titleAlign = _ref.titleAlign,
|
|
13910
|
+
titleAlign = _ref$titleAlign === void 0 ? 'center' : _ref$titleAlign,
|
|
13911
|
+
stickers = _ref.stickers,
|
|
13912
|
+
_ref$mode = _ref.mode,
|
|
13913
|
+
mode = _ref$mode === void 0 ? 'default' : _ref$mode,
|
|
13914
|
+
_ref$hasSeparator = _ref.hasSeparator,
|
|
13915
|
+
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator;
|
|
13916
|
+
var isLargeTitleMode = mode === 'largeTitle';
|
|
13917
|
+
return /*#__PURE__*/jsxs(VStack, {
|
|
13918
|
+
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
13919
|
+
width: "100%",
|
|
13920
|
+
height: mode === 'default' ? 56 : undefined,
|
|
13921
|
+
justifyContent: "center",
|
|
13922
|
+
paddingX: "kitt.2",
|
|
13923
|
+
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
13924
|
+
paddingBottom: "kitt.3",
|
|
13925
|
+
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
13926
|
+
borderColor: "kitt.separator",
|
|
13927
|
+
children: [/*#__PURE__*/jsxs(HStack, {
|
|
13928
|
+
alignItems: "center",
|
|
13929
|
+
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
13930
|
+
children: [left !== null && left !== void 0 ? left : /*#__PURE__*/jsx(View, {
|
|
13931
|
+
width: "kitt.button.minWidth"
|
|
13932
|
+
}), mode === 'default' ? /*#__PURE__*/jsx(View, {
|
|
13933
|
+
flexGrow: "1",
|
|
13934
|
+
flexShrink: 1,
|
|
13935
|
+
paddingRight: "kitt.2",
|
|
13936
|
+
paddingLeft: "kitt.2",
|
|
13937
|
+
children: title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
13938
|
+
textAlign: titleAlign,
|
|
13939
|
+
variant: "bold",
|
|
13940
|
+
ellipsizeMode: "tail",
|
|
13941
|
+
numberOfLines: 1,
|
|
13942
|
+
children: title
|
|
13943
|
+
}) : null
|
|
13944
|
+
}) : null, right !== null && right !== void 0 ? right : /*#__PURE__*/jsx(View, {
|
|
13945
|
+
width: "kitt.button.minWidth"
|
|
13946
|
+
})]
|
|
13947
|
+
}), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
|
|
13948
|
+
space: "kitt.4",
|
|
13949
|
+
paddingX: "kitt.2",
|
|
13950
|
+
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
13951
|
+
width: "100%",
|
|
13952
|
+
space: "kitt.1",
|
|
13953
|
+
flexShrink: 1,
|
|
13954
|
+
flexWrap: "wrap",
|
|
13955
|
+
style: {
|
|
13956
|
+
rowGap: theme.getSpacing(1)
|
|
13957
|
+
},
|
|
13958
|
+
children: stickers.map(function (sticker, index) {
|
|
13959
|
+
return (
|
|
13960
|
+
/*#__PURE__*/
|
|
13961
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
13962
|
+
jsx(View, {
|
|
13963
|
+
children: sticker
|
|
13964
|
+
}, index)
|
|
13965
|
+
);
|
|
13966
|
+
})
|
|
13967
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
13968
|
+
base: "heading-m",
|
|
13969
|
+
children: title
|
|
13970
|
+
})]
|
|
13971
|
+
}) : null]
|
|
13972
|
+
});
|
|
13973
|
+
}
|
|
13974
|
+
function CloseButton(props) {
|
|
13975
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
13976
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
13977
|
+
}, props));
|
|
13978
|
+
}
|
|
13979
|
+
function BackButton(props) {
|
|
13980
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
13981
|
+
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
|
|
13982
|
+
}, props));
|
|
13983
|
+
}
|
|
13984
|
+
TopNavBar.CloseButton = CloseButton;
|
|
13985
|
+
TopNavBar.BackButton = BackButton;
|
|
13986
|
+
|
|
13865
13987
|
function getTypographyTypeConfig(type, theme) {
|
|
13866
13988
|
var configs = theme.kitt.typography.types[getTypographyFamily(type)].configs;
|
|
13867
13989
|
return configs[type];
|