@ornikar/kitt-universal 27.9.1-canary.4b911192ae095bb2eb65643367ed285b3f849cd8.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 -7
- 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 +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/index-metro.es.android.js +285 -153
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +285 -153
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +275 -151
- 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 +276 -152
- 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 +291 -159
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +345 -219
- 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 +8 -2
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +8 -2
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -9,7 +9,7 @@ import _extends from '@babel/runtime/helpers/extends';
|
|
|
9
9
|
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate } from 'react-native-reanimated';
|
|
10
10
|
import { Platform, Animated as Animated$1, Easing, StyleSheet, Modal, ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, Keyboard, Text as Text$1, useWindowDimensions, PixelRatio } from 'react-native';
|
|
11
11
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
12
|
-
import { SpinnerGapRegularIcon, UserRegularIcon,
|
|
12
|
+
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';
|
|
13
13
|
import { BottomSheetView, BottomSheetScrollView, BottomSheetSectionList, BottomSheetFlatList, BottomSheetHandle, BottomSheetBackdrop, BottomSheetFooter, BottomSheetTextInput, BottomSheetModal, useBottomSheetModal } from '@gorhom/bottom-sheet';
|
|
14
14
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
15
15
|
import { parse } from '@twemoji/parser';
|
|
@@ -1805,12 +1805,12 @@ const fullscreenModal = {
|
|
|
1805
1805
|
header: {
|
|
1806
1806
|
height: 56
|
|
1807
1807
|
},
|
|
1808
|
-
|
|
1808
|
+
sharedHorizontalPadding: 16,
|
|
1809
1809
|
footer: {
|
|
1810
1810
|
verticalPadding: 12
|
|
1811
1811
|
},
|
|
1812
1812
|
body: {
|
|
1813
|
-
verticalPadding:
|
|
1813
|
+
verticalPadding: 24
|
|
1814
1814
|
},
|
|
1815
1815
|
animation: {
|
|
1816
1816
|
overlay: {
|
|
@@ -1897,6 +1897,11 @@ const icon = {
|
|
|
1897
1897
|
defaultSize: 20
|
|
1898
1898
|
};
|
|
1899
1899
|
|
|
1900
|
+
const iconButton = {
|
|
1901
|
+
width: button.height.medium,
|
|
1902
|
+
height: button.height.medium
|
|
1903
|
+
};
|
|
1904
|
+
|
|
1900
1905
|
const listItem = {
|
|
1901
1906
|
padding: '12px 16px',
|
|
1902
1907
|
verticalPadding: 12,
|
|
@@ -2626,6 +2631,7 @@ const theme = {
|
|
|
2626
2631
|
highlight,
|
|
2627
2632
|
icon,
|
|
2628
2633
|
buttonBadge,
|
|
2634
|
+
iconButton,
|
|
2629
2635
|
listItem,
|
|
2630
2636
|
pageLoader,
|
|
2631
2637
|
picker,
|
|
@@ -4326,17 +4332,25 @@ function CardModalBehaviour(_ref) {
|
|
|
4326
4332
|
});
|
|
4327
4333
|
}
|
|
4328
4334
|
|
|
4329
|
-
const _excluded$J = ["children", "
|
|
4335
|
+
const _excluded$J = ["children", "paddingX", "paddingY"];
|
|
4330
4336
|
function CardModalBody(_ref) {
|
|
4331
4337
|
let {
|
|
4332
4338
|
children,
|
|
4333
|
-
|
|
4339
|
+
paddingX = {
|
|
4340
|
+
base: 'kitt.4',
|
|
4341
|
+
medium: 'kitt.6'
|
|
4342
|
+
},
|
|
4343
|
+
paddingY = {
|
|
4344
|
+
base: 'kitt.4',
|
|
4345
|
+
medium: 'kitt.6'
|
|
4346
|
+
}
|
|
4334
4347
|
} = _ref,
|
|
4335
4348
|
props = _objectWithoutProperties(_ref, _excluded$J);
|
|
4336
4349
|
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
4337
4350
|
showsVerticalScrollIndicator: false,
|
|
4338
4351
|
_contentContainerStyle: {
|
|
4339
|
-
|
|
4352
|
+
paddingX,
|
|
4353
|
+
paddingY
|
|
4340
4354
|
}
|
|
4341
4355
|
}, props), {}, {
|
|
4342
4356
|
children: children
|
|
@@ -4367,142 +4381,55 @@ function CardModalFooter(_ref) {
|
|
|
4367
4381
|
}));
|
|
4368
4382
|
}
|
|
4369
4383
|
|
|
4370
|
-
const
|
|
4371
|
-
|
|
4372
|
-
case 'black':
|
|
4373
|
-
return {
|
|
4374
|
-
type: 'tertiary'
|
|
4375
|
-
};
|
|
4376
|
-
case 'secondary':
|
|
4377
|
-
return {
|
|
4378
|
-
type: 'secondary'
|
|
4379
|
-
};
|
|
4380
|
-
case 'primary':
|
|
4381
|
-
return {
|
|
4382
|
-
type: 'primary'
|
|
4383
|
-
};
|
|
4384
|
-
case 'primary-plain':
|
|
4385
|
-
return {
|
|
4386
|
-
type: 'primary'
|
|
4387
|
-
};
|
|
4388
|
-
case 'ghost':
|
|
4389
|
-
return {
|
|
4390
|
-
type: 'tertiary',
|
|
4391
|
-
variant: 'revert'
|
|
4392
|
-
};
|
|
4393
|
-
default:
|
|
4394
|
-
return {
|
|
4395
|
-
type: 'secondary'
|
|
4396
|
-
};
|
|
4397
|
-
}
|
|
4398
|
-
};
|
|
4399
|
-
|
|
4400
|
-
const _excluded$H = ["color", "ariaLabel"];
|
|
4401
|
-
/**
|
|
4402
|
-
* @deprecated IconButton should only be used as a navigation button
|
|
4403
|
-
* Other use cases should use a <Button> component with an icon
|
|
4404
|
-
*/
|
|
4405
|
-
function IconButton(_ref) {
|
|
4384
|
+
const _excluded$H = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
|
|
4385
|
+
function CardModalHeader(_ref) {
|
|
4406
4386
|
let {
|
|
4407
|
-
|
|
4408
|
-
|
|
4387
|
+
children,
|
|
4388
|
+
title,
|
|
4389
|
+
paddingBottom = {
|
|
4390
|
+
base: 'kitt.4',
|
|
4391
|
+
medium: 'kitt.2'
|
|
4392
|
+
},
|
|
4393
|
+
hasSeparator = true,
|
|
4394
|
+
right,
|
|
4395
|
+
left
|
|
4409
4396
|
} = _ref,
|
|
4410
4397
|
props = _objectWithoutProperties(_ref, _excluded$H);
|
|
4411
|
-
const {
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
}
|
|
4415
|
-
return /*#__PURE__*/jsx(
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
}, props));
|
|
4419
|
-
}
|
|
4420
|
-
function CloseIconButton(props) {
|
|
4421
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4422
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
4423
|
-
}, props));
|
|
4424
|
-
}
|
|
4425
|
-
|
|
4426
|
-
function TopNavBar({
|
|
4427
|
-
left,
|
|
4428
|
-
right,
|
|
4429
|
-
title,
|
|
4430
|
-
titleAlign = 'center',
|
|
4431
|
-
stickers,
|
|
4432
|
-
mode = 'default',
|
|
4433
|
-
hasSeparator = true
|
|
4434
|
-
}) {
|
|
4435
|
-
const isLargeTitleMode = mode === 'largeTitle';
|
|
4436
|
-
const leftEmptySpace = !left && titleAlign === 'left' ? null : /*#__PURE__*/jsx(View, {
|
|
4437
|
-
width: "kitt.button.minWidth"
|
|
4438
|
-
});
|
|
4439
|
-
return /*#__PURE__*/jsxs(VStack, {
|
|
4440
|
-
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
4441
|
-
width: "100%",
|
|
4442
|
-
height: mode === 'default' ? 56 : undefined,
|
|
4443
|
-
justifyContent: "center",
|
|
4444
|
-
paddingX: "kitt.2",
|
|
4445
|
-
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
4446
|
-
paddingBottom: "kitt.3",
|
|
4447
|
-
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
4398
|
+
const defaultContainerPadding = {
|
|
4399
|
+
base: 'kitt.4',
|
|
4400
|
+
medium: 'kitt.6'
|
|
4401
|
+
};
|
|
4402
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4403
|
+
padding: paddingBottom,
|
|
4404
|
+
borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4448
4405
|
borderColor: "kitt.separator",
|
|
4449
|
-
|
|
4406
|
+
justifyContent: "center",
|
|
4407
|
+
width: "100%",
|
|
4408
|
+
height: "kitt.cardModal.header.height",
|
|
4409
|
+
paddingRight: right ? 'kitt.2' : defaultContainerPadding,
|
|
4410
|
+
paddingLeft: left ? 'kitt.2' : defaultContainerPadding,
|
|
4411
|
+
children: /*#__PURE__*/jsxs(View, {
|
|
4450
4412
|
alignItems: "center",
|
|
4451
|
-
|
|
4452
|
-
|
|
4413
|
+
flexDirection: "row",
|
|
4414
|
+
justifyContent: !children && !left ? 'flex-end' : 'space-between',
|
|
4415
|
+
children: [left ? /*#__PURE__*/jsx(View, {
|
|
4416
|
+
width: "kitt.iconButton.width",
|
|
4417
|
+
children: left
|
|
4418
|
+
}) : null, /*#__PURE__*/jsxs(View, {
|
|
4453
4419
|
flexGrow: "1",
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
textAlign: titleAlign,
|
|
4420
|
+
paddingRight: right ? 'kitt.2' : 0,
|
|
4421
|
+
paddingLeft: left ? 'kitt.2' : 0,
|
|
4422
|
+
children: [title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
4423
|
+
textAlign: !left && right ? 'left' : 'center',
|
|
4459
4424
|
variant: "bold",
|
|
4460
|
-
ellipsizeMode: "tail",
|
|
4461
|
-
numberOfLines: 1,
|
|
4462
4425
|
children: title
|
|
4463
|
-
}) : null
|
|
4464
|
-
})
|
|
4465
|
-
width: "kitt.
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
4471
|
-
width: "100%",
|
|
4472
|
-
space: "kitt.1",
|
|
4473
|
-
flexShrink: 1,
|
|
4474
|
-
flexWrap: "wrap",
|
|
4475
|
-
style: {
|
|
4476
|
-
rowGap: theme.getSpacing(1)
|
|
4477
|
-
},
|
|
4478
|
-
children: stickers.map((sticker, index) =>
|
|
4479
|
-
/*#__PURE__*/
|
|
4480
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
4481
|
-
jsx(View, {
|
|
4482
|
-
children: sticker
|
|
4483
|
-
}, index))
|
|
4484
|
-
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
4485
|
-
base: "heading-m",
|
|
4486
|
-
children: title
|
|
4487
|
-
})]
|
|
4488
|
-
}) : null]
|
|
4489
|
-
});
|
|
4490
|
-
}
|
|
4491
|
-
function CloseButton(props) {
|
|
4492
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4493
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
4494
|
-
}, props));
|
|
4495
|
-
}
|
|
4496
|
-
function BackButton(props) {
|
|
4497
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4498
|
-
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
|
|
4499
|
-
}, props));
|
|
4500
|
-
}
|
|
4501
|
-
TopNavBar.CloseButton = CloseButton;
|
|
4502
|
-
TopNavBar.BackButton = BackButton;
|
|
4503
|
-
|
|
4504
|
-
function CardModalHeader(props) {
|
|
4505
|
-
return /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props));
|
|
4426
|
+
}) : null, children]
|
|
4427
|
+
}), right ? /*#__PURE__*/jsx(View, {
|
|
4428
|
+
width: "kitt.iconButton.width",
|
|
4429
|
+
children: right
|
|
4430
|
+
}) : null]
|
|
4431
|
+
})
|
|
4432
|
+
}));
|
|
4506
4433
|
}
|
|
4507
4434
|
|
|
4508
4435
|
const _excluded$G = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
@@ -6360,7 +6287,11 @@ function ModalTitle({
|
|
|
6360
6287
|
children
|
|
6361
6288
|
}) {
|
|
6362
6289
|
return /*#__PURE__*/jsx(CardModal.Header, {
|
|
6363
|
-
|
|
6290
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
6291
|
+
base: "body-m",
|
|
6292
|
+
variant: "bold",
|
|
6293
|
+
children: children
|
|
6294
|
+
})
|
|
6364
6295
|
});
|
|
6365
6296
|
}
|
|
6366
6297
|
function ModalPlatformDateTimePicker(_ref) {
|
|
@@ -8309,19 +8240,65 @@ function FullscreenModalContainer({
|
|
|
8309
8240
|
});
|
|
8310
8241
|
}
|
|
8311
8242
|
|
|
8312
|
-
const _excluded$c = ["shouldHandleTopNotch"];
|
|
8243
|
+
const _excluded$c = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
|
|
8313
8244
|
function FullscreenModalHeader(_ref) {
|
|
8314
8245
|
let {
|
|
8246
|
+
hasSeparator = true,
|
|
8247
|
+
isTransparent,
|
|
8248
|
+
title,
|
|
8249
|
+
children,
|
|
8250
|
+
right,
|
|
8251
|
+
left,
|
|
8315
8252
|
shouldHandleTopNotch = true
|
|
8316
8253
|
} = _ref,
|
|
8317
8254
|
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
8318
8255
|
const {
|
|
8319
8256
|
top
|
|
8320
8257
|
} = useSafeAreaInsets();
|
|
8321
|
-
|
|
8258
|
+
const hasRight = Boolean(right);
|
|
8259
|
+
const hasLeft = Boolean(left);
|
|
8260
|
+
const hasContent = Boolean(title || children);
|
|
8261
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
8262
|
+
backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
|
|
8263
|
+
minHeight: "kitt.fullscreenModal.header.height",
|
|
8264
|
+
width: "100%",
|
|
8265
|
+
justifyContent: "center",
|
|
8322
8266
|
paddingTop: shouldHandleTopNotch ? top : undefined,
|
|
8323
|
-
|
|
8324
|
-
|
|
8267
|
+
paddingRight: hasRight ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
8268
|
+
paddingLeft: hasLeft ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
8269
|
+
borderBottomColor: "kitt.separator",
|
|
8270
|
+
borderBottomWidth: hasSeparator ? 1 : undefined
|
|
8271
|
+
}, props), {}, {
|
|
8272
|
+
children: /*#__PURE__*/jsxs(View, {
|
|
8273
|
+
flexDirection: "row",
|
|
8274
|
+
alignItems: "center",
|
|
8275
|
+
justifyContent: !hasContent && !hasLeft ? 'flex-end' : 'space-between',
|
|
8276
|
+
children: [left ? /*#__PURE__*/jsx(View, {
|
|
8277
|
+
width: "kitt.iconButton.width",
|
|
8278
|
+
children: left
|
|
8279
|
+
}) : null, title ? /*#__PURE__*/jsx(View, {
|
|
8280
|
+
flexGrow: 1,
|
|
8281
|
+
flexShrink: 1,
|
|
8282
|
+
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
8283
|
+
paddingRight: hasRight ? 'kitt.2' : 0,
|
|
8284
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
8285
|
+
variant: "bold",
|
|
8286
|
+
textAlign: !hasLeft && hasRight ? 'left' : 'center',
|
|
8287
|
+
children: title
|
|
8288
|
+
})
|
|
8289
|
+
}) : null, children ? /*#__PURE__*/jsx(View, {
|
|
8290
|
+
flexGrow: 1,
|
|
8291
|
+
flexShrink: 1,
|
|
8292
|
+
alignItems: "center",
|
|
8293
|
+
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
8294
|
+
paddingRight: hasRight ? 'kitt.2' : undefined,
|
|
8295
|
+
children: children
|
|
8296
|
+
}) : null, right || left ? /*#__PURE__*/jsx(View, {
|
|
8297
|
+
width: "kitt.iconButton.width",
|
|
8298
|
+
children: right
|
|
8299
|
+
}) : null]
|
|
8300
|
+
})
|
|
8301
|
+
}));
|
|
8325
8302
|
}
|
|
8326
8303
|
|
|
8327
8304
|
function FullscreenModal({
|
|
@@ -8615,6 +8592,62 @@ function Highlight({
|
|
|
8615
8592
|
});
|
|
8616
8593
|
}
|
|
8617
8594
|
|
|
8595
|
+
const getButtonTypeAndVariant = iconColor => {
|
|
8596
|
+
switch (iconColor) {
|
|
8597
|
+
case 'black':
|
|
8598
|
+
return {
|
|
8599
|
+
type: 'tertiary'
|
|
8600
|
+
};
|
|
8601
|
+
case 'secondary':
|
|
8602
|
+
return {
|
|
8603
|
+
type: 'secondary'
|
|
8604
|
+
};
|
|
8605
|
+
case 'primary':
|
|
8606
|
+
return {
|
|
8607
|
+
type: 'primary'
|
|
8608
|
+
};
|
|
8609
|
+
case 'primary-plain':
|
|
8610
|
+
return {
|
|
8611
|
+
type: 'primary'
|
|
8612
|
+
};
|
|
8613
|
+
case 'ghost':
|
|
8614
|
+
return {
|
|
8615
|
+
type: 'tertiary',
|
|
8616
|
+
variant: 'revert'
|
|
8617
|
+
};
|
|
8618
|
+
default:
|
|
8619
|
+
return {
|
|
8620
|
+
type: 'secondary'
|
|
8621
|
+
};
|
|
8622
|
+
}
|
|
8623
|
+
};
|
|
8624
|
+
|
|
8625
|
+
const _excluded$b = ["color", "ariaLabel"];
|
|
8626
|
+
/**
|
|
8627
|
+
* @deprecated IconButton should only be used as a navigation button
|
|
8628
|
+
* Other use cases should use a <Button> component with an icon
|
|
8629
|
+
*/
|
|
8630
|
+
function IconButton(_ref) {
|
|
8631
|
+
let {
|
|
8632
|
+
color = 'black',
|
|
8633
|
+
ariaLabel
|
|
8634
|
+
} = _ref,
|
|
8635
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
8636
|
+
const {
|
|
8637
|
+
type: legacyColorToType,
|
|
8638
|
+
variant: legacyColorToVariant
|
|
8639
|
+
} = getButtonTypeAndVariant(color);
|
|
8640
|
+
return /*#__PURE__*/jsx(Button, _objectSpread({
|
|
8641
|
+
variant: legacyColorToVariant,
|
|
8642
|
+
type: legacyColorToType
|
|
8643
|
+
}, props));
|
|
8644
|
+
}
|
|
8645
|
+
function CloseIconButton(props) {
|
|
8646
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
8647
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
8648
|
+
}, props));
|
|
8649
|
+
}
|
|
8650
|
+
|
|
8618
8651
|
function InfoCard({
|
|
8619
8652
|
title,
|
|
8620
8653
|
action,
|
|
@@ -8829,7 +8862,7 @@ const getBackgroundColor = ({
|
|
|
8829
8862
|
return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint.default;
|
|
8830
8863
|
};
|
|
8831
8864
|
|
|
8832
|
-
const _excluded$
|
|
8865
|
+
const _excluded$a = ["onPress", "testID"];
|
|
8833
8866
|
function StaticMapMarker$1({
|
|
8834
8867
|
variant,
|
|
8835
8868
|
isHovered,
|
|
@@ -8892,7 +8925,7 @@ function MapMarker(_ref) {
|
|
|
8892
8925
|
onPress,
|
|
8893
8926
|
testID
|
|
8894
8927
|
} = _ref,
|
|
8895
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8928
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
8896
8929
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
8897
8930
|
testID: testID,
|
|
8898
8931
|
onPress: onPress,
|
|
@@ -10337,6 +10370,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10337
10370
|
},
|
|
10338
10371
|
icon: theme.icon,
|
|
10339
10372
|
cardModal: {
|
|
10373
|
+
header: {
|
|
10374
|
+
height: theme.cardModal.header.height
|
|
10375
|
+
},
|
|
10340
10376
|
maxWidth: theme.cardModal.maxWidth,
|
|
10341
10377
|
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
|
|
10342
10378
|
minHeight: theme.cardModal.minHeight
|
|
@@ -10637,6 +10673,15 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10637
10673
|
}
|
|
10638
10674
|
}
|
|
10639
10675
|
},
|
|
10676
|
+
iconButton: {
|
|
10677
|
+
width: theme.iconButton.width,
|
|
10678
|
+
height: theme.iconButton.height
|
|
10679
|
+
},
|
|
10680
|
+
fullscreenModal: {
|
|
10681
|
+
header: {
|
|
10682
|
+
height: theme.fullscreenModal.header.height
|
|
10683
|
+
}
|
|
10684
|
+
},
|
|
10640
10685
|
pageLoader: {
|
|
10641
10686
|
size: theme.pageLoader.size
|
|
10642
10687
|
},
|
|
@@ -10731,7 +10776,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10731
10776
|
}
|
|
10732
10777
|
},
|
|
10733
10778
|
fullscreenModal: {
|
|
10734
|
-
horizontalPadding: theme.fullscreenModal.
|
|
10779
|
+
horizontalPadding: theme.fullscreenModal.sharedHorizontalPadding,
|
|
10735
10780
|
body: {
|
|
10736
10781
|
verticalPadding: theme.fullscreenModal.body.verticalPadding
|
|
10737
10782
|
},
|
|
@@ -11549,7 +11594,6 @@ function KittNativeBaseProvider({
|
|
|
11549
11594
|
});
|
|
11550
11595
|
}
|
|
11551
11596
|
|
|
11552
|
-
const _excluded$a = ["right"];
|
|
11553
11597
|
function NavigationBottomSheet({
|
|
11554
11598
|
children,
|
|
11555
11599
|
hasScrollView,
|
|
@@ -11589,14 +11633,20 @@ function NavigationBottomSheet({
|
|
|
11589
11633
|
})
|
|
11590
11634
|
});
|
|
11591
11635
|
}
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
11636
|
+
function NavigationBottomSheetHeader({
|
|
11637
|
+
children,
|
|
11638
|
+
left
|
|
11639
|
+
}) {
|
|
11640
|
+
return /*#__PURE__*/jsx(HStack, {
|
|
11641
|
+
marginBottom: "kitt.6",
|
|
11642
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
11643
|
+
flexGrow: 1,
|
|
11644
|
+
flexShrink: 1,
|
|
11645
|
+
variant: "bold",
|
|
11646
|
+
textAlign: "center",
|
|
11647
|
+
children: children
|
|
11648
|
+
})
|
|
11649
|
+
});
|
|
11600
11650
|
}
|
|
11601
11651
|
function NavigationBottomSheetBody(props) {
|
|
11602
11652
|
return /*#__PURE__*/jsx(VStack, _objectSpread({
|
|
@@ -12038,9 +12088,14 @@ function Picker({
|
|
|
12038
12088
|
onClose: handleClose,
|
|
12039
12089
|
children: /*#__PURE__*/jsxs(CardModal, {
|
|
12040
12090
|
children: [/*#__PURE__*/jsx(CardModal.Header, {
|
|
12041
|
-
|
|
12042
|
-
|
|
12091
|
+
right: /*#__PURE__*/jsx(IconButton, {
|
|
12092
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {}),
|
|
12043
12093
|
onPress: handleClose
|
|
12094
|
+
}),
|
|
12095
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
12096
|
+
base: "body-m",
|
|
12097
|
+
variant: "bold",
|
|
12098
|
+
children: title
|
|
12044
12099
|
})
|
|
12045
12100
|
}), Platform.OS === 'ios' && shouldDisplayNativePickerOnIOS ? /*#__PURE__*/jsx(Picker$1, {
|
|
12046
12101
|
testID: testID,
|
|
@@ -13599,6 +13654,83 @@ function Tooltip({
|
|
|
13599
13654
|
Tooltip.Arrow = Arrow;
|
|
13600
13655
|
Tooltip.Content = TooltipContent;
|
|
13601
13656
|
|
|
13657
|
+
function TopNavBar({
|
|
13658
|
+
left,
|
|
13659
|
+
right,
|
|
13660
|
+
title,
|
|
13661
|
+
titleAlign = 'center',
|
|
13662
|
+
stickers,
|
|
13663
|
+
mode = 'default',
|
|
13664
|
+
hasSeparator = true
|
|
13665
|
+
}) {
|
|
13666
|
+
const isLargeTitleMode = mode === 'largeTitle';
|
|
13667
|
+
return /*#__PURE__*/jsxs(VStack, {
|
|
13668
|
+
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
13669
|
+
width: "100%",
|
|
13670
|
+
height: mode === 'default' ? 56 : undefined,
|
|
13671
|
+
justifyContent: "center",
|
|
13672
|
+
paddingX: "kitt.2",
|
|
13673
|
+
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
13674
|
+
paddingBottom: "kitt.3",
|
|
13675
|
+
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
13676
|
+
borderColor: "kitt.separator",
|
|
13677
|
+
children: [/*#__PURE__*/jsxs(HStack, {
|
|
13678
|
+
alignItems: "center",
|
|
13679
|
+
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
13680
|
+
children: [left !== null && left !== void 0 ? left : /*#__PURE__*/jsx(View, {
|
|
13681
|
+
width: "kitt.button.minWidth"
|
|
13682
|
+
}), mode === 'default' ? /*#__PURE__*/jsx(View, {
|
|
13683
|
+
flexGrow: "1",
|
|
13684
|
+
flexShrink: 1,
|
|
13685
|
+
paddingRight: "kitt.2",
|
|
13686
|
+
paddingLeft: "kitt.2",
|
|
13687
|
+
children: title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
13688
|
+
textAlign: titleAlign,
|
|
13689
|
+
variant: "bold",
|
|
13690
|
+
ellipsizeMode: "tail",
|
|
13691
|
+
numberOfLines: 1,
|
|
13692
|
+
children: title
|
|
13693
|
+
}) : null
|
|
13694
|
+
}) : null, right !== null && right !== void 0 ? right : /*#__PURE__*/jsx(View, {
|
|
13695
|
+
width: "kitt.button.minWidth"
|
|
13696
|
+
})]
|
|
13697
|
+
}), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
|
|
13698
|
+
space: "kitt.4",
|
|
13699
|
+
paddingX: "kitt.2",
|
|
13700
|
+
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
13701
|
+
width: "100%",
|
|
13702
|
+
space: "kitt.1",
|
|
13703
|
+
flexShrink: 1,
|
|
13704
|
+
flexWrap: "wrap",
|
|
13705
|
+
style: {
|
|
13706
|
+
rowGap: theme.getSpacing(1)
|
|
13707
|
+
},
|
|
13708
|
+
children: stickers.map((sticker, index) =>
|
|
13709
|
+
/*#__PURE__*/
|
|
13710
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
13711
|
+
jsx(View, {
|
|
13712
|
+
children: sticker
|
|
13713
|
+
}, index))
|
|
13714
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
13715
|
+
base: "heading-m",
|
|
13716
|
+
children: title
|
|
13717
|
+
})]
|
|
13718
|
+
}) : null]
|
|
13719
|
+
});
|
|
13720
|
+
}
|
|
13721
|
+
function CloseButton(props) {
|
|
13722
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
13723
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
13724
|
+
}, props));
|
|
13725
|
+
}
|
|
13726
|
+
function BackButton(props) {
|
|
13727
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
13728
|
+
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
|
|
13729
|
+
}, props));
|
|
13730
|
+
}
|
|
13731
|
+
TopNavBar.CloseButton = CloseButton;
|
|
13732
|
+
TopNavBar.BackButton = BackButton;
|
|
13733
|
+
|
|
13602
13734
|
function getTypographyTypeConfig(type, theme) {
|
|
13603
13735
|
const {
|
|
13604
13736
|
configs
|