@ornikar/kitt-universal 27.9.1-canary.e79ce5a70db58d281f30a0e111ad7cf70d64cdb1.0 → 27.9.1-canary.f2c8ce09203150f3f2cb65aacb7c85ea25435b9f.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -17
- package/dist/definitions/CardModal/CardModalBody.d.ts +1 -1
- package/dist/definitions/CardModal/CardModalBody.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalHeader.d.ts +3 -17
- package/dist/definitions/CardModal/CardModalHeader.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/Header.d.ts +3 -18
- package/dist/definitions/FullscreenModal/Header.d.ts.map +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts +6 -7
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts.map +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.web.d.ts +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.web.d.ts.map +1 -1
- package/dist/definitions/Picker/Picker.d.ts.map +1 -1
- package/dist/definitions/TopNavBar/TopNavBar.d.ts +5 -3
- package/dist/definitions/TopNavBar/TopNavBar.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/ModalPlatformDateTimePicker.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +4 -8
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +1 -1
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts +1 -1
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +6 -18
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +160 -278
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +160 -278
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +157 -267
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +148 -253
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +158 -268
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +149 -254
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +255 -373
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +286 -398
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +5 -5
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +5 -5
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +5 -5
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +5 -5
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +5 -5
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +5 -5
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +6 -6
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +6 -6
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +28 -28
|
@@ -5,7 +5,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
5
5
|
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate } from 'react-native-reanimated';
|
|
6
6
|
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';
|
|
7
7
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
8
|
-
import { SpinnerGapRegularIcon, UserRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon,
|
|
8
|
+
import { SpinnerGapRegularIcon, UserRegularIcon, XRegularIcon, ArrowLeftRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
|
|
9
9
|
import { BottomSheetView, BottomSheetScrollView, BottomSheetSectionList, BottomSheetFlatList, BottomSheetHandle, BottomSheetBackdrop, BottomSheetFooter, BottomSheetTextInput, BottomSheetModal, useBottomSheetModal } from '@gorhom/bottom-sheet';
|
|
10
10
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
11
11
|
import { parse } from '@twemoji/parser';
|
|
@@ -1802,12 +1802,12 @@ const fullscreenModal = {
|
|
|
1802
1802
|
header: {
|
|
1803
1803
|
height: 56
|
|
1804
1804
|
},
|
|
1805
|
-
|
|
1805
|
+
horizontalPadding: 16,
|
|
1806
1806
|
footer: {
|
|
1807
1807
|
verticalPadding: 12
|
|
1808
1808
|
},
|
|
1809
1809
|
body: {
|
|
1810
|
-
verticalPadding:
|
|
1810
|
+
verticalPadding: 16
|
|
1811
1811
|
},
|
|
1812
1812
|
animation: {
|
|
1813
1813
|
overlay: {
|
|
@@ -1895,8 +1895,8 @@ const icon = {
|
|
|
1895
1895
|
};
|
|
1896
1896
|
|
|
1897
1897
|
const iconButton = {
|
|
1898
|
-
width: button.height.
|
|
1899
|
-
height: button.height.
|
|
1898
|
+
width: button.height.default,
|
|
1899
|
+
height: button.height.default
|
|
1900
1900
|
};
|
|
1901
1901
|
|
|
1902
1902
|
const listItem = {
|
|
@@ -2627,8 +2627,8 @@ const theme = {
|
|
|
2627
2627
|
forms,
|
|
2628
2628
|
highlight,
|
|
2629
2629
|
icon,
|
|
2630
|
-
buttonBadge,
|
|
2631
2630
|
iconButton,
|
|
2631
|
+
buttonBadge,
|
|
2632
2632
|
listItem,
|
|
2633
2633
|
pageLoader,
|
|
2634
2634
|
picker,
|
|
@@ -4335,21 +4335,13 @@ function CardModalBehaviour({
|
|
|
4335
4335
|
|
|
4336
4336
|
function CardModalBody({
|
|
4337
4337
|
children,
|
|
4338
|
-
|
|
4339
|
-
base: 'kitt.4',
|
|
4340
|
-
medium: 'kitt.6'
|
|
4341
|
-
},
|
|
4342
|
-
paddingY = {
|
|
4343
|
-
base: 'kitt.4',
|
|
4344
|
-
medium: 'kitt.6'
|
|
4345
|
-
},
|
|
4338
|
+
padding = 'kitt.4',
|
|
4346
4339
|
...props
|
|
4347
4340
|
}) {
|
|
4348
4341
|
return /*#__PURE__*/jsx(ScrollView, {
|
|
4349
4342
|
showsVerticalScrollIndicator: false,
|
|
4350
4343
|
_contentContainerStyle: {
|
|
4351
|
-
|
|
4352
|
-
paddingY
|
|
4344
|
+
padding
|
|
4353
4345
|
},
|
|
4354
4346
|
...props,
|
|
4355
4347
|
children: children
|
|
@@ -4379,53 +4371,149 @@ function CardModalFooter({
|
|
|
4379
4371
|
});
|
|
4380
4372
|
}
|
|
4381
4373
|
|
|
4382
|
-
|
|
4383
|
-
|
|
4374
|
+
const getButtonTypeAndVariant = iconColor => {
|
|
4375
|
+
switch (iconColor) {
|
|
4376
|
+
case 'black':
|
|
4377
|
+
return {
|
|
4378
|
+
type: 'tertiary'
|
|
4379
|
+
};
|
|
4380
|
+
case 'secondary':
|
|
4381
|
+
return {
|
|
4382
|
+
type: 'secondary'
|
|
4383
|
+
};
|
|
4384
|
+
case 'primary':
|
|
4385
|
+
return {
|
|
4386
|
+
type: 'primary'
|
|
4387
|
+
};
|
|
4388
|
+
case 'primary-plain':
|
|
4389
|
+
return {
|
|
4390
|
+
type: 'primary'
|
|
4391
|
+
};
|
|
4392
|
+
case 'ghost':
|
|
4393
|
+
return {
|
|
4394
|
+
type: 'tertiary',
|
|
4395
|
+
variant: 'revert'
|
|
4396
|
+
};
|
|
4397
|
+
default:
|
|
4398
|
+
return {
|
|
4399
|
+
type: 'secondary'
|
|
4400
|
+
};
|
|
4401
|
+
}
|
|
4402
|
+
};
|
|
4403
|
+
|
|
4404
|
+
/**
|
|
4405
|
+
* @deprecated IconButton should only be used as a navigation button
|
|
4406
|
+
* Other use cases should use a <Button> component with an icon
|
|
4407
|
+
*/
|
|
4408
|
+
function IconButton({
|
|
4409
|
+
color = 'black',
|
|
4410
|
+
ariaLabel,
|
|
4411
|
+
...props
|
|
4412
|
+
}) {
|
|
4413
|
+
const {
|
|
4414
|
+
type: legacyColorToType,
|
|
4415
|
+
variant: legacyColorToVariant
|
|
4416
|
+
} = getButtonTypeAndVariant(color);
|
|
4417
|
+
return /*#__PURE__*/jsx(Button, {
|
|
4418
|
+
variant: legacyColorToVariant,
|
|
4419
|
+
type: legacyColorToType,
|
|
4420
|
+
...props
|
|
4421
|
+
});
|
|
4422
|
+
}
|
|
4423
|
+
function CloseIconButton(props) {
|
|
4424
|
+
return /*#__PURE__*/jsx(IconButton, {
|
|
4425
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {}),
|
|
4426
|
+
...props
|
|
4427
|
+
});
|
|
4428
|
+
}
|
|
4429
|
+
|
|
4430
|
+
function TopNavBar({
|
|
4431
|
+
left,
|
|
4432
|
+
right,
|
|
4384
4433
|
title,
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
},
|
|
4434
|
+
titleAlign = 'center',
|
|
4435
|
+
stickers,
|
|
4436
|
+
mode = 'default',
|
|
4389
4437
|
hasSeparator = true,
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
...props
|
|
4438
|
+
backgroundColor,
|
|
4439
|
+
testID
|
|
4393
4440
|
}) {
|
|
4394
|
-
const
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
};
|
|
4398
|
-
return /*#__PURE__*/
|
|
4399
|
-
|
|
4400
|
-
padding: paddingBottom,
|
|
4401
|
-
borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4402
|
-
borderColor: "kitt.separator",
|
|
4403
|
-
justifyContent: "center",
|
|
4441
|
+
const isLargeTitleMode = mode === 'largeTitle';
|
|
4442
|
+
const leftEmptySpace = !left && titleAlign === 'left' ? null : /*#__PURE__*/jsx(View, {
|
|
4443
|
+
width: "kitt.iconButton.width"
|
|
4444
|
+
});
|
|
4445
|
+
return /*#__PURE__*/jsxs(VStack, {
|
|
4446
|
+
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
4404
4447
|
width: "100%",
|
|
4405
|
-
height:
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4448
|
+
height: mode === 'default' ? 56 : undefined,
|
|
4449
|
+
justifyContent: "center",
|
|
4450
|
+
paddingX: "kitt.2",
|
|
4451
|
+
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
4452
|
+
paddingBottom: "kitt.3",
|
|
4453
|
+
backgroundColor: backgroundColor,
|
|
4454
|
+
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
4455
|
+
borderColor: "kitt.separator",
|
|
4456
|
+
testID: testID,
|
|
4457
|
+
children: [/*#__PURE__*/jsxs(HStack, {
|
|
4409
4458
|
alignItems: "center",
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
children: [left ? /*#__PURE__*/jsx(View, {
|
|
4413
|
-
width: "kitt.iconButton.width",
|
|
4414
|
-
children: left
|
|
4415
|
-
}) : null, /*#__PURE__*/jsxs(View, {
|
|
4459
|
+
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
4460
|
+
children: [left ?? leftEmptySpace, mode === 'default' ? /*#__PURE__*/jsx(View, {
|
|
4416
4461
|
flexGrow: "1",
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4462
|
+
flexShrink: 1,
|
|
4463
|
+
paddingRight: "kitt.2",
|
|
4464
|
+
paddingLeft: "kitt.2",
|
|
4465
|
+
children: title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
4466
|
+
textAlign: titleAlign,
|
|
4421
4467
|
variant: "bold",
|
|
4468
|
+
ellipsizeMode: "tail",
|
|
4469
|
+
numberOfLines: 1,
|
|
4422
4470
|
children: title
|
|
4423
|
-
}) : null
|
|
4424
|
-
}), right
|
|
4425
|
-
width: "kitt.iconButton.width"
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4471
|
+
}) : null
|
|
4472
|
+
}) : null, right ?? /*#__PURE__*/jsx(View, {
|
|
4473
|
+
width: "kitt.iconButton.width"
|
|
4474
|
+
})]
|
|
4475
|
+
}), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
|
|
4476
|
+
space: "kitt.4",
|
|
4477
|
+
paddingX: "kitt.2",
|
|
4478
|
+
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
4479
|
+
width: "100%",
|
|
4480
|
+
space: "kitt.1",
|
|
4481
|
+
flexShrink: 1,
|
|
4482
|
+
flexWrap: "wrap",
|
|
4483
|
+
style: {
|
|
4484
|
+
rowGap: theme.getSpacing(1)
|
|
4485
|
+
},
|
|
4486
|
+
children: stickers.map((sticker, index) =>
|
|
4487
|
+
/*#__PURE__*/
|
|
4488
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
4489
|
+
jsx(View, {
|
|
4490
|
+
children: sticker
|
|
4491
|
+
}, index))
|
|
4492
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
4493
|
+
base: "heading-m",
|
|
4494
|
+
children: title
|
|
4495
|
+
})]
|
|
4496
|
+
}) : null]
|
|
4497
|
+
});
|
|
4498
|
+
}
|
|
4499
|
+
function CloseButton(props) {
|
|
4500
|
+
return /*#__PURE__*/jsx(IconButton, {
|
|
4501
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {}),
|
|
4502
|
+
...props
|
|
4503
|
+
});
|
|
4504
|
+
}
|
|
4505
|
+
function BackButton(props) {
|
|
4506
|
+
return /*#__PURE__*/jsx(IconButton, {
|
|
4507
|
+
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {}),
|
|
4508
|
+
...props
|
|
4509
|
+
});
|
|
4510
|
+
}
|
|
4511
|
+
TopNavBar.CloseButton = CloseButton;
|
|
4512
|
+
TopNavBar.BackButton = BackButton;
|
|
4513
|
+
|
|
4514
|
+
function CardModalHeader(props) {
|
|
4515
|
+
return /*#__PURE__*/jsx(TopNavBar, {
|
|
4516
|
+
...props
|
|
4429
4517
|
});
|
|
4430
4518
|
}
|
|
4431
4519
|
|
|
@@ -6277,11 +6365,7 @@ function ModalTitle({
|
|
|
6277
6365
|
children
|
|
6278
6366
|
}) {
|
|
6279
6367
|
return /*#__PURE__*/jsx(CardModal.Header, {
|
|
6280
|
-
|
|
6281
|
-
base: "body-m",
|
|
6282
|
-
variant: "bold",
|
|
6283
|
-
children: children
|
|
6284
|
-
})
|
|
6368
|
+
title: children
|
|
6285
6369
|
});
|
|
6286
6370
|
}
|
|
6287
6371
|
function ModalPlatformDateTimePicker({
|
|
@@ -8213,60 +8297,16 @@ function FullscreenModalContainer({
|
|
|
8213
8297
|
}
|
|
8214
8298
|
|
|
8215
8299
|
function FullscreenModalHeader({
|
|
8216
|
-
hasSeparator = true,
|
|
8217
|
-
isTransparent,
|
|
8218
|
-
title,
|
|
8219
|
-
children,
|
|
8220
|
-
right,
|
|
8221
|
-
left,
|
|
8222
8300
|
shouldHandleTopNotch = true,
|
|
8223
8301
|
...props
|
|
8224
8302
|
}) {
|
|
8225
8303
|
const {
|
|
8226
8304
|
top
|
|
8227
8305
|
} = useSafeAreaInsets();
|
|
8228
|
-
const hasRight = Boolean(right);
|
|
8229
|
-
const hasLeft = Boolean(left);
|
|
8230
|
-
const hasContent = Boolean(title || children);
|
|
8231
8306
|
return /*#__PURE__*/jsx(View, {
|
|
8232
|
-
backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
|
|
8233
|
-
minHeight: "kitt.fullscreenModal.header.height",
|
|
8234
|
-
width: "100%",
|
|
8235
|
-
justifyContent: "center",
|
|
8236
8307
|
paddingTop: shouldHandleTopNotch ? top : undefined,
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
borderBottomColor: "kitt.separator",
|
|
8240
|
-
borderBottomWidth: hasSeparator ? 1 : undefined,
|
|
8241
|
-
...props,
|
|
8242
|
-
children: /*#__PURE__*/jsxs(View, {
|
|
8243
|
-
flexDirection: "row",
|
|
8244
|
-
alignItems: "center",
|
|
8245
|
-
justifyContent: !hasContent && !hasLeft ? 'flex-end' : 'space-between',
|
|
8246
|
-
children: [left ? /*#__PURE__*/jsx(View, {
|
|
8247
|
-
width: "kitt.iconButton.width",
|
|
8248
|
-
children: left
|
|
8249
|
-
}) : null, title ? /*#__PURE__*/jsx(View, {
|
|
8250
|
-
flexGrow: 1,
|
|
8251
|
-
flexShrink: 1,
|
|
8252
|
-
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
8253
|
-
paddingRight: hasRight ? 'kitt.2' : 0,
|
|
8254
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
8255
|
-
variant: "bold",
|
|
8256
|
-
textAlign: !hasLeft && hasRight ? 'left' : 'center',
|
|
8257
|
-
children: title
|
|
8258
|
-
})
|
|
8259
|
-
}) : null, children ? /*#__PURE__*/jsx(View, {
|
|
8260
|
-
flexGrow: 1,
|
|
8261
|
-
flexShrink: 1,
|
|
8262
|
-
alignItems: "center",
|
|
8263
|
-
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
8264
|
-
paddingRight: hasRight ? 'kitt.2' : undefined,
|
|
8265
|
-
children: children
|
|
8266
|
-
}) : null, right || left ? /*#__PURE__*/jsx(View, {
|
|
8267
|
-
width: "kitt.iconButton.width",
|
|
8268
|
-
children: right
|
|
8269
|
-
}) : null]
|
|
8308
|
+
children: /*#__PURE__*/jsx(TopNavBar, {
|
|
8309
|
+
...props
|
|
8270
8310
|
})
|
|
8271
8311
|
});
|
|
8272
8312
|
}
|
|
@@ -8562,62 +8602,6 @@ function Highlight({
|
|
|
8562
8602
|
});
|
|
8563
8603
|
}
|
|
8564
8604
|
|
|
8565
|
-
const getButtonTypeAndVariant = iconColor => {
|
|
8566
|
-
switch (iconColor) {
|
|
8567
|
-
case 'black':
|
|
8568
|
-
return {
|
|
8569
|
-
type: 'tertiary'
|
|
8570
|
-
};
|
|
8571
|
-
case 'secondary':
|
|
8572
|
-
return {
|
|
8573
|
-
type: 'secondary'
|
|
8574
|
-
};
|
|
8575
|
-
case 'primary':
|
|
8576
|
-
return {
|
|
8577
|
-
type: 'primary'
|
|
8578
|
-
};
|
|
8579
|
-
case 'primary-plain':
|
|
8580
|
-
return {
|
|
8581
|
-
type: 'primary'
|
|
8582
|
-
};
|
|
8583
|
-
case 'ghost':
|
|
8584
|
-
return {
|
|
8585
|
-
type: 'tertiary',
|
|
8586
|
-
variant: 'revert'
|
|
8587
|
-
};
|
|
8588
|
-
default:
|
|
8589
|
-
return {
|
|
8590
|
-
type: 'secondary'
|
|
8591
|
-
};
|
|
8592
|
-
}
|
|
8593
|
-
};
|
|
8594
|
-
|
|
8595
|
-
/**
|
|
8596
|
-
* @deprecated IconButton should only be used as a navigation button
|
|
8597
|
-
* Other use cases should use a <Button> component with an icon
|
|
8598
|
-
*/
|
|
8599
|
-
function IconButton({
|
|
8600
|
-
color = 'black',
|
|
8601
|
-
ariaLabel,
|
|
8602
|
-
...props
|
|
8603
|
-
}) {
|
|
8604
|
-
const {
|
|
8605
|
-
type: legacyColorToType,
|
|
8606
|
-
variant: legacyColorToVariant
|
|
8607
|
-
} = getButtonTypeAndVariant(color);
|
|
8608
|
-
return /*#__PURE__*/jsx(Button, {
|
|
8609
|
-
variant: legacyColorToVariant,
|
|
8610
|
-
type: legacyColorToType,
|
|
8611
|
-
...props
|
|
8612
|
-
});
|
|
8613
|
-
}
|
|
8614
|
-
function CloseIconButton(props) {
|
|
8615
|
-
return /*#__PURE__*/jsx(IconButton, {
|
|
8616
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {}),
|
|
8617
|
-
...props
|
|
8618
|
-
});
|
|
8619
|
-
}
|
|
8620
|
-
|
|
8621
8605
|
function InfoCard({
|
|
8622
8606
|
title,
|
|
8623
8607
|
action,
|
|
@@ -10343,9 +10327,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10343
10327
|
},
|
|
10344
10328
|
icon: theme.icon,
|
|
10345
10329
|
cardModal: {
|
|
10346
|
-
header: {
|
|
10347
|
-
height: theme.cardModal.header.height
|
|
10348
|
-
},
|
|
10349
10330
|
maxWidth: theme.cardModal.maxWidth,
|
|
10350
10331
|
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
|
|
10351
10332
|
minHeight: theme.cardModal.minHeight
|
|
@@ -10650,11 +10631,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10650
10631
|
width: theme.iconButton.width,
|
|
10651
10632
|
height: theme.iconButton.height
|
|
10652
10633
|
},
|
|
10653
|
-
fullscreenModal: {
|
|
10654
|
-
header: {
|
|
10655
|
-
height: theme.fullscreenModal.header.height
|
|
10656
|
-
}
|
|
10657
|
-
},
|
|
10658
10634
|
pageLoader: {
|
|
10659
10635
|
size: theme.pageLoader.size
|
|
10660
10636
|
},
|
|
@@ -10752,7 +10728,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10752
10728
|
}
|
|
10753
10729
|
},
|
|
10754
10730
|
fullscreenModal: {
|
|
10755
|
-
horizontalPadding: theme.fullscreenModal.
|
|
10731
|
+
horizontalPadding: theme.fullscreenModal.horizontalPadding,
|
|
10756
10732
|
body: {
|
|
10757
10733
|
verticalPadding: theme.fullscreenModal.body.verticalPadding
|
|
10758
10734
|
},
|
|
@@ -11608,19 +11584,17 @@ function NavigationBottomSheet({
|
|
|
11608
11584
|
})
|
|
11609
11585
|
});
|
|
11610
11586
|
}
|
|
11587
|
+
|
|
11588
|
+
/**
|
|
11589
|
+
* Web only: display right CloseButton
|
|
11590
|
+
*/
|
|
11591
|
+
|
|
11611
11592
|
function NavigationBottomSheetHeader({
|
|
11612
|
-
|
|
11613
|
-
|
|
11593
|
+
right,
|
|
11594
|
+
...props
|
|
11614
11595
|
}) {
|
|
11615
|
-
return /*#__PURE__*/jsx(
|
|
11616
|
-
|
|
11617
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
11618
|
-
flexGrow: 1,
|
|
11619
|
-
flexShrink: 1,
|
|
11620
|
-
variant: "bold",
|
|
11621
|
-
textAlign: "center",
|
|
11622
|
-
children: children
|
|
11623
|
-
})
|
|
11596
|
+
return /*#__PURE__*/jsx(TopNavBar, {
|
|
11597
|
+
...props
|
|
11624
11598
|
});
|
|
11625
11599
|
}
|
|
11626
11600
|
function NavigationBottomSheetBody(props) {
|
|
@@ -12075,14 +12049,9 @@ function Picker({
|
|
|
12075
12049
|
onClose: handleClose,
|
|
12076
12050
|
children: /*#__PURE__*/jsxs(CardModal, {
|
|
12077
12051
|
children: [/*#__PURE__*/jsx(CardModal.Header, {
|
|
12078
|
-
|
|
12079
|
-
|
|
12052
|
+
title: title,
|
|
12053
|
+
right: /*#__PURE__*/jsx(TopNavBar.CloseButton, {
|
|
12080
12054
|
onPress: handleClose
|
|
12081
|
-
}),
|
|
12082
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
12083
|
-
base: "body-m",
|
|
12084
|
-
variant: "bold",
|
|
12085
|
-
children: title
|
|
12086
12055
|
})
|
|
12087
12056
|
}), Platform.OS === 'ios' && shouldDisplayNativePickerOnIOS ? /*#__PURE__*/jsx(Picker$1, {
|
|
12088
12057
|
testID: testID,
|
|
@@ -13626,85 +13595,6 @@ function Tooltip({
|
|
|
13626
13595
|
Tooltip.Arrow = Arrow;
|
|
13627
13596
|
Tooltip.Content = TooltipContent;
|
|
13628
13597
|
|
|
13629
|
-
function TopNavBar({
|
|
13630
|
-
left,
|
|
13631
|
-
right,
|
|
13632
|
-
title,
|
|
13633
|
-
titleAlign = 'center',
|
|
13634
|
-
stickers,
|
|
13635
|
-
mode = 'default',
|
|
13636
|
-
hasSeparator = true
|
|
13637
|
-
}) {
|
|
13638
|
-
const isLargeTitleMode = mode === 'largeTitle';
|
|
13639
|
-
return /*#__PURE__*/jsxs(VStack, {
|
|
13640
|
-
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
13641
|
-
width: "100%",
|
|
13642
|
-
height: mode === 'default' ? 56 : undefined,
|
|
13643
|
-
justifyContent: "center",
|
|
13644
|
-
paddingX: "kitt.2",
|
|
13645
|
-
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
13646
|
-
paddingBottom: "kitt.3",
|
|
13647
|
-
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
13648
|
-
borderColor: "kitt.separator",
|
|
13649
|
-
children: [/*#__PURE__*/jsxs(HStack, {
|
|
13650
|
-
alignItems: "center",
|
|
13651
|
-
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
13652
|
-
children: [left ?? /*#__PURE__*/jsx(View, {
|
|
13653
|
-
width: "kitt.button.minWidth"
|
|
13654
|
-
}), mode === 'default' ? /*#__PURE__*/jsx(View, {
|
|
13655
|
-
flexGrow: "1",
|
|
13656
|
-
flexShrink: 1,
|
|
13657
|
-
paddingRight: "kitt.2",
|
|
13658
|
-
paddingLeft: "kitt.2",
|
|
13659
|
-
children: title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
13660
|
-
textAlign: titleAlign,
|
|
13661
|
-
variant: "bold",
|
|
13662
|
-
ellipsizeMode: "tail",
|
|
13663
|
-
numberOfLines: 1,
|
|
13664
|
-
children: title
|
|
13665
|
-
}) : null
|
|
13666
|
-
}) : null, right ?? /*#__PURE__*/jsx(View, {
|
|
13667
|
-
width: "kitt.button.minWidth"
|
|
13668
|
-
})]
|
|
13669
|
-
}), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
|
|
13670
|
-
space: "kitt.4",
|
|
13671
|
-
paddingX: "kitt.2",
|
|
13672
|
-
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
13673
|
-
width: "100%",
|
|
13674
|
-
space: "kitt.1",
|
|
13675
|
-
flexShrink: 1,
|
|
13676
|
-
flexWrap: "wrap",
|
|
13677
|
-
style: {
|
|
13678
|
-
rowGap: theme.getSpacing(1)
|
|
13679
|
-
},
|
|
13680
|
-
children: stickers.map((sticker, index) =>
|
|
13681
|
-
/*#__PURE__*/
|
|
13682
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
13683
|
-
jsx(View, {
|
|
13684
|
-
children: sticker
|
|
13685
|
-
}, index))
|
|
13686
|
-
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
13687
|
-
base: "heading-m",
|
|
13688
|
-
children: title
|
|
13689
|
-
})]
|
|
13690
|
-
}) : null]
|
|
13691
|
-
});
|
|
13692
|
-
}
|
|
13693
|
-
function CloseButton(props) {
|
|
13694
|
-
return /*#__PURE__*/jsx(IconButton, {
|
|
13695
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {}),
|
|
13696
|
-
...props
|
|
13697
|
-
});
|
|
13698
|
-
}
|
|
13699
|
-
function BackButton(props) {
|
|
13700
|
-
return /*#__PURE__*/jsx(IconButton, {
|
|
13701
|
-
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {}),
|
|
13702
|
-
...props
|
|
13703
|
-
});
|
|
13704
|
-
}
|
|
13705
|
-
TopNavBar.CloseButton = CloseButton;
|
|
13706
|
-
TopNavBar.BackButton = BackButton;
|
|
13707
|
-
|
|
13708
13598
|
function getTypographyTypeConfig(type, theme) {
|
|
13709
13599
|
const {
|
|
13710
13600
|
configs
|