@ornikar/kitt-universal 27.8.0 → 27.9.1-canary.4b911192ae095bb2eb65643367ed285b3f849cd8.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/definitions/CardModal/CardModalBody.d.ts +1 -1
  3. package/dist/definitions/CardModal/CardModalBody.d.ts.map +1 -1
  4. package/dist/definitions/CardModal/CardModalHeader.d.ts +3 -17
  5. package/dist/definitions/CardModal/CardModalHeader.d.ts.map +1 -1
  6. package/dist/definitions/FullscreenModal/Header.d.ts +3 -18
  7. package/dist/definitions/FullscreenModal/Header.d.ts.map +1 -1
  8. package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts +6 -7
  9. package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts.map +1 -1
  10. package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.web.d.ts +1 -1
  11. package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.web.d.ts.map +1 -1
  12. package/dist/definitions/Picker/Picker.d.ts.map +1 -1
  13. package/dist/definitions/TopNavBar/TopNavBar.d.ts +1 -1
  14. package/dist/definitions/TopNavBar/TopNavBar.d.ts.map +1 -1
  15. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/ModalPlatformDateTimePicker.d.ts.map +1 -1
  16. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +14 -12
  17. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  18. package/dist/definitions/story-components/StoryDecorator.d.ts +1 -1
  19. package/dist/definitions/story-components/StoryDecorator.d.ts.map +1 -1
  20. package/dist/definitions/themes/default.d.ts +0 -1
  21. package/dist/definitions/themes/default.d.ts.map +1 -1
  22. package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts +1 -1
  23. package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts.map +1 -1
  24. package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts +1 -1
  25. package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts.map +1 -1
  26. package/dist/index-metro.es.android.js +153 -285
  27. package/dist/index-metro.es.android.js.map +1 -1
  28. package/dist/index-metro.es.ios.js +153 -285
  29. package/dist/index-metro.es.ios.js.map +1 -1
  30. package/dist/index-node-22.17.cjs.js +151 -275
  31. package/dist/index-node-22.17.cjs.js.map +1 -1
  32. package/dist/index-node-22.17.cjs.web.js +142 -261
  33. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  34. package/dist/index-node-22.17.es.mjs +152 -276
  35. package/dist/index-node-22.17.es.mjs.map +1 -1
  36. package/dist/index-node-22.17.es.web.mjs +143 -262
  37. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  38. package/dist/index.es.js +159 -291
  39. package/dist/index.es.js.map +1 -1
  40. package/dist/index.es.web.js +219 -345
  41. package/dist/index.es.web.js.map +1 -1
  42. package/dist/linaria-themes-metro.es.android.js +2 -8
  43. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  44. package/dist/linaria-themes-metro.es.ios.js +2 -8
  45. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  46. package/dist/linaria-themes-node-22.17.cjs.js +2 -8
  47. package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
  48. package/dist/linaria-themes-node-22.17.cjs.web.js +2 -8
  49. package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
  50. package/dist/linaria-themes-node-22.17.es.mjs +2 -8
  51. package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
  52. package/dist/linaria-themes-node-22.17.es.web.mjs +2 -8
  53. package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
  54. package/dist/linaria-themes.es.js +2 -8
  55. package/dist/linaria-themes.es.js.map +1 -1
  56. package/dist/linaria-themes.es.web.js +2 -8
  57. package/dist/linaria-themes.es.web.js.map +1 -1
  58. package/dist/tsbuildinfo +1 -1
  59. package/package.json +3 -3
  60. package/scripts/codemods/__testfixtures__/csf1-csf2/decorator.input.tsx +11 -0
  61. package/scripts/codemods/__testfixtures__/csf1-csf2/decorator.output.tsx +17 -0
  62. package/scripts/codemods/__testfixtures__/csf1-csf2/default.input.tsx +88 -0
  63. package/scripts/codemods/__testfixtures__/csf1-csf2/default.output.tsx +94 -0
  64. package/scripts/codemods/__testfixtures__/csf1-csf2/multiple-add.input.tsx +77 -0
  65. package/scripts/codemods/__testfixtures__/csf1-csf2/multiple-add.output.tsx +92 -0
  66. package/scripts/codemods/__testfixtures__/csf1-csf2/parameters.input.tsx +21 -0
  67. package/scripts/codemods/__testfixtures__/csf1-csf2/parameters.output.tsx +28 -0
  68. package/scripts/codemods/__tests__/csf1-csf2.test.js +10 -0
  69. package/scripts/codemods/codemod-template.js +27 -0
  70. package/scripts/codemods/csf1-csf2.js +323 -0
  71. package/dist/definitions/themes/late-ocean/iconButton.d.ts +0 -6
  72. package/dist/definitions/themes/late-ocean/iconButton.d.ts.map +0 -1
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, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, XRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon, ArrowLeftRegularIcon } from '@ornikar/kitt-icons/phosphor';
16
+ 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';
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
- sharedHorizontalPadding: 16,
1823
+ horizontalPadding: 16,
1824
1824
  footer: {
1825
1825
  verticalPadding: 12
1826
1826
  },
1827
1827
  body: {
1828
- verticalPadding: 24
1828
+ verticalPadding: 16
1829
1829
  },
1830
1830
  animation: {
1831
1831
  overlay: {
@@ -1912,11 +1912,6 @@ var icon = {
1912
1912
  defaultSize: 20
1913
1913
  };
1914
1914
 
1915
- var iconButton = {
1916
- width: button.height.medium,
1917
- height: button.height.medium
1918
- };
1919
-
1920
1915
  var listItem = {
1921
1916
  padding: '12px 16px',
1922
1917
  verticalPadding: 12,
@@ -2648,7 +2643,6 @@ var theme = {
2648
2643
  highlight: highlight,
2649
2644
  icon: icon,
2650
2645
  buttonBadge: buttonBadge,
2651
- iconButton: iconButton,
2652
2646
  listItem: listItem,
2653
2647
  pageLoader: pageLoader,
2654
2648
  picker: picker,
@@ -4379,25 +4373,16 @@ function CardModalBehaviour(_ref) {
4379
4373
  });
4380
4374
  }
4381
4375
 
4382
- var _excluded$J = ["children", "paddingX", "paddingY"];
4376
+ var _excluded$J = ["children", "padding"];
4383
4377
  function CardModalBody(_ref) {
4384
4378
  var children = _ref.children,
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,
4379
+ _ref$padding = _ref.padding,
4380
+ padding = _ref$padding === void 0 ? 'kitt.4' : _ref$padding,
4395
4381
  props = _objectWithoutProperties(_ref, _excluded$J);
4396
4382
  return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
4397
4383
  showsVerticalScrollIndicator: false,
4398
4384
  _contentContainerStyle: {
4399
- paddingX: paddingX,
4400
- paddingY: paddingY
4385
+ padding: padding
4401
4386
  }
4402
4387
  }, props), {}, {
4403
4388
  children: children
@@ -4428,55 +4413,145 @@ function CardModalFooter(_ref) {
4428
4413
  }));
4429
4414
  }
4430
4415
 
4431
- var _excluded$H = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
4432
- function CardModalHeader(_ref) {
4433
- var children = _ref.children,
4416
+ var getButtonTypeAndVariant = function (iconColor) {
4417
+ switch (iconColor) {
4418
+ case 'black':
4419
+ return {
4420
+ type: 'tertiary'
4421
+ };
4422
+ case 'secondary':
4423
+ return {
4424
+ type: 'secondary'
4425
+ };
4426
+ case 'primary':
4427
+ return {
4428
+ type: 'primary'
4429
+ };
4430
+ case 'primary-plain':
4431
+ return {
4432
+ type: 'primary'
4433
+ };
4434
+ case 'ghost':
4435
+ return {
4436
+ type: 'tertiary',
4437
+ variant: 'revert'
4438
+ };
4439
+ default:
4440
+ return {
4441
+ type: 'secondary'
4442
+ };
4443
+ }
4444
+ };
4445
+
4446
+ var _excluded$H = ["color", "ariaLabel"];
4447
+ /**
4448
+ * @deprecated IconButton should only be used as a navigation button
4449
+ * Other use cases should use a <Button> component with an icon
4450
+ */
4451
+ function IconButton(_ref) {
4452
+ var _ref$color = _ref.color,
4453
+ color = _ref$color === void 0 ? 'black' : _ref$color;
4454
+ _ref.ariaLabel;
4455
+ var props = _objectWithoutProperties(_ref, _excluded$H);
4456
+ var _getButtonTypeAndVari = getButtonTypeAndVariant(color),
4457
+ legacyColorToType = _getButtonTypeAndVari.type,
4458
+ legacyColorToVariant = _getButtonTypeAndVari.variant;
4459
+ return /*#__PURE__*/jsx(Button, _objectSpread({
4460
+ variant: legacyColorToVariant,
4461
+ type: legacyColorToType
4462
+ }, props));
4463
+ }
4464
+ function CloseIconButton(props) {
4465
+ return /*#__PURE__*/jsx(IconButton, _objectSpread({
4466
+ icon: /*#__PURE__*/jsx(XRegularIcon, {})
4467
+ }, props));
4468
+ }
4469
+
4470
+ function TopNavBar(_ref) {
4471
+ var left = _ref.left,
4472
+ right = _ref.right,
4434
4473
  title = _ref.title,
4435
- _ref$paddingBottom = _ref.paddingBottom,
4436
- paddingBottom = _ref$paddingBottom === void 0 ? {
4437
- base: 'kitt.4',
4438
- medium: 'kitt.2'
4439
- } : _ref$paddingBottom,
4474
+ _ref$titleAlign = _ref.titleAlign,
4475
+ titleAlign = _ref$titleAlign === void 0 ? 'center' : _ref$titleAlign,
4476
+ stickers = _ref.stickers,
4477
+ _ref$mode = _ref.mode,
4478
+ mode = _ref$mode === void 0 ? 'default' : _ref$mode,
4440
4479
  _ref$hasSeparator = _ref.hasSeparator,
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,
4452
- borderColor: "kitt.separator",
4453
- justifyContent: "center",
4480
+ hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator;
4481
+ var isLargeTitleMode = mode === 'largeTitle';
4482
+ var leftEmptySpace = !left && titleAlign === 'left' ? null : /*#__PURE__*/jsx(View, {
4483
+ width: "kitt.button.minWidth"
4484
+ });
4485
+ return /*#__PURE__*/jsxs(VStack, {
4486
+ space: isLargeTitleMode ? 'kitt.2' : undefined,
4454
4487
  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, {
4488
+ height: mode === 'default' ? 56 : undefined,
4489
+ justifyContent: "center",
4490
+ paddingX: "kitt.2",
4491
+ paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
4492
+ paddingBottom: "kitt.3",
4493
+ borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
4494
+ borderColor: "kitt.separator",
4495
+ children: [/*#__PURE__*/jsxs(HStack, {
4459
4496
  alignItems: "center",
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, {
4497
+ justifyContent: !title && !left ? 'flex-end' : 'space-between',
4498
+ children: [left !== null && left !== void 0 ? left : leftEmptySpace, mode === 'default' ? /*#__PURE__*/jsx(View, {
4466
4499
  flexGrow: "1",
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',
4500
+ flexShrink: 1,
4501
+ paddingRight: "kitt.2",
4502
+ paddingLeft: "kitt.2",
4503
+ children: title ? /*#__PURE__*/jsx(Typography.Text, {
4504
+ textAlign: titleAlign,
4471
4505
  variant: "bold",
4506
+ ellipsizeMode: "tail",
4507
+ numberOfLines: 1,
4472
4508
  children: title
4473
- }) : null, children]
4474
- }), right ? /*#__PURE__*/jsx(View, {
4475
- width: "kitt.iconButton.width",
4476
- children: right
4477
- }) : null]
4478
- })
4479
- }));
4509
+ }) : null
4510
+ }) : null, right !== null && right !== void 0 ? right : /*#__PURE__*/jsx(View, {
4511
+ width: "kitt.button.minWidth"
4512
+ })]
4513
+ }), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
4514
+ space: "kitt.4",
4515
+ paddingX: "kitt.2",
4516
+ children: [stickers ? /*#__PURE__*/jsx(HStack, {
4517
+ width: "100%",
4518
+ space: "kitt.1",
4519
+ flexShrink: 1,
4520
+ flexWrap: "wrap",
4521
+ style: {
4522
+ rowGap: theme.getSpacing(1)
4523
+ },
4524
+ children: stickers.map(function (sticker, index) {
4525
+ return (
4526
+ /*#__PURE__*/
4527
+ // eslint-disable-next-line react/no-array-index-key
4528
+ jsx(View, {
4529
+ children: sticker
4530
+ }, index)
4531
+ );
4532
+ })
4533
+ }) : null, /*#__PURE__*/jsx(Typography.Text, {
4534
+ base: "heading-m",
4535
+ children: title
4536
+ })]
4537
+ }) : null]
4538
+ });
4539
+ }
4540
+ function CloseButton(props) {
4541
+ return /*#__PURE__*/jsx(IconButton, _objectSpread({
4542
+ icon: /*#__PURE__*/jsx(XRegularIcon, {})
4543
+ }, props));
4544
+ }
4545
+ function BackButton(props) {
4546
+ return /*#__PURE__*/jsx(IconButton, _objectSpread({
4547
+ icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
4548
+ }, props));
4549
+ }
4550
+ TopNavBar.CloseButton = CloseButton;
4551
+ TopNavBar.BackButton = BackButton;
4552
+
4553
+ function CardModalHeader(props) {
4554
+ return /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props));
4480
4555
  }
4481
4556
 
4482
4557
  var _excluded$G = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
@@ -6371,11 +6446,7 @@ var _excluded$u = ["title", "isVisible", "value", "validateButtonLabel", "onClos
6371
6446
  function ModalTitle(_ref) {
6372
6447
  var children = _ref.children;
6373
6448
  return /*#__PURE__*/jsx(CardModal.Header, {
6374
- children: /*#__PURE__*/jsx(Typography.Text, {
6375
- base: "body-m",
6376
- variant: "bold",
6377
- children: children
6378
- })
6449
+ title: children
6379
6450
  });
6380
6451
  }
6381
6452
  function ModalPlatformDateTimePicker(_ref2) {
@@ -8455,64 +8526,17 @@ function FullscreenModalContainer(_ref) {
8455
8526
  });
8456
8527
  }
8457
8528
 
8458
- var _excluded$c = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
8529
+ var _excluded$c = ["shouldHandleTopNotch"];
8459
8530
  function FullscreenModalHeader(_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,
8531
+ var _ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
8468
8532
  shouldHandleTopNotch = _ref$shouldHandleTopN === void 0 ? true : _ref$shouldHandleTopN,
8469
8533
  props = _objectWithoutProperties(_ref, _excluded$c);
8470
8534
  var _useSafeAreaInsets = useSafeAreaInsets(),
8471
8535
  top = _useSafeAreaInsets.top;
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",
8536
+ return /*#__PURE__*/jsx(View, {
8480
8537
  paddingTop: shouldHandleTopNotch ? top : undefined,
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
- }));
8538
+ children: /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props))
8539
+ });
8516
8540
  }
8517
8541
 
8518
8542
  function FullscreenModal(_ref) {
@@ -8811,60 +8835,6 @@ function Highlight(_ref) {
8811
8835
  });
8812
8836
  }
8813
8837
 
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
-
8868
8838
  function InfoCard(_ref) {
8869
8839
  var title = _ref.title,
8870
8840
  action = _ref.action,
@@ -9086,7 +9056,7 @@ var getBackgroundColor = function (_ref) {
9086
9056
  return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint["default"];
9087
9057
  };
9088
9058
 
9089
- var _excluded$a = ["onPress", "testID"];
9059
+ var _excluded$b = ["onPress", "testID"];
9090
9060
  function StaticMapMarker$1(_ref) {
9091
9061
  var variant = _ref.variant,
9092
9062
  isHovered = _ref.isHovered,
@@ -9145,7 +9115,7 @@ function StaticMapMarker$1(_ref) {
9145
9115
  function MapMarker(_ref2) {
9146
9116
  var onPress = _ref2.onPress,
9147
9117
  testID = _ref2.testID,
9148
- props = _objectWithoutProperties(_ref2, _excluded$a);
9118
+ props = _objectWithoutProperties(_ref2, _excluded$b);
9149
9119
  return /*#__PURE__*/jsx(Pressable$1, {
9150
9120
  testID: testID,
9151
9121
  onPress: onPress,
@@ -10592,9 +10562,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
10592
10562
  },
10593
10563
  icon: theme.icon,
10594
10564
  cardModal: {
10595
- header: {
10596
- height: theme.cardModal.header.height
10597
- },
10598
10565
  maxWidth: theme.cardModal.maxWidth,
10599
10566
  maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
10600
10567
  minHeight: theme.cardModal.minHeight
@@ -10895,15 +10862,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
10895
10862
  }
10896
10863
  }
10897
10864
  },
10898
- iconButton: {
10899
- width: theme.iconButton.width,
10900
- height: theme.iconButton.height
10901
- },
10902
- fullscreenModal: {
10903
- header: {
10904
- height: theme.fullscreenModal.header.height
10905
- }
10906
- },
10907
10865
  pageLoader: {
10908
10866
  size: theme.pageLoader.size
10909
10867
  },
@@ -10998,7 +10956,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
10998
10956
  }
10999
10957
  },
11000
10958
  fullscreenModal: {
11001
- horizontalPadding: theme.fullscreenModal.sharedHorizontalPadding,
10959
+ horizontalPadding: theme.fullscreenModal.horizontalPadding,
11002
10960
  body: {
11003
10961
  verticalPadding: theme.fullscreenModal.body.verticalPadding
11004
10962
  },
@@ -11819,6 +11777,7 @@ function KittNativeBaseProvider(_ref) {
11819
11777
  });
11820
11778
  }
11821
11779
 
11780
+ var _excluded$a = ["right"];
11822
11781
  function NavigationBottomSheet(_ref) {
11823
11782
  var children = _ref.children,
11824
11783
  hasScrollView = _ref.hasScrollView,
@@ -11857,19 +11816,15 @@ function NavigationBottomSheet(_ref) {
11857
11816
  })
11858
11817
  });
11859
11818
  }
11819
+
11820
+ /**
11821
+ * Web only: display right CloseButton
11822
+ */
11823
+
11860
11824
  function NavigationBottomSheetHeader(_ref2) {
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
- });
11825
+ _ref2.right;
11826
+ var props = _objectWithoutProperties(_ref2, _excluded$a);
11827
+ return /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props));
11873
11828
  }
11874
11829
  function NavigationBottomSheetBody(props) {
11875
11830
  return /*#__PURE__*/jsx(VStack, _objectSpread({
@@ -12313,14 +12268,9 @@ function Picker(_ref) {
12313
12268
  onClose: handleClose,
12314
12269
  children: /*#__PURE__*/jsxs(CardModal, {
12315
12270
  children: [/*#__PURE__*/jsx(CardModal.Header, {
12316
- right: /*#__PURE__*/jsx(IconButton, {
12317
- icon: /*#__PURE__*/jsx(XRegularIcon, {}),
12271
+ title: title,
12272
+ right: /*#__PURE__*/jsx(TopNavBar.CloseButton, {
12318
12273
  onPress: handleClose
12319
- }),
12320
- children: /*#__PURE__*/jsx(Typography.Text, {
12321
- base: "body-m",
12322
- variant: "bold",
12323
- children: title
12324
12274
  })
12325
12275
  }), Platform.OS === 'ios' && shouldDisplayNativePickerOnIOS ? /*#__PURE__*/jsx(Picker$1, {
12326
12276
  testID: testID,
@@ -13902,88 +13852,6 @@ function Tooltip(_ref) {
13902
13852
  Tooltip.Arrow = Arrow;
13903
13853
  Tooltip.Content = TooltipContent;
13904
13854
 
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
-
13987
13855
  function getTypographyTypeConfig(type, theme) {
13988
13856
  var configs = theme.kitt.typography.types[getTypographyFamily(type)].configs;
13989
13857
  return configs[type];