@ornikar/kitt-universal 23.2.7 → 23.4.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 +18 -0
- package/dist/definitions/BottomSheet/useStaticBottomSheet.d.ts +3 -3
- package/dist/definitions/BottomSheet/useStaticBottomSheet.d.ts.map +1 -1
- package/dist/definitions/Tag/Tag.d.ts +10 -6
- package/dist/definitions/Tag/Tag.d.ts.map +1 -1
- package/dist/definitions/forms/DocumentPicker/DocumentPicker.d.ts +15 -0
- package/dist/definitions/forms/DocumentPicker/DocumentPicker.d.ts.map +1 -0
- package/dist/definitions/forms/FilePicker/BottomSheetActions/BottomSheetActions.d.ts +13 -0
- package/dist/definitions/forms/FilePicker/BottomSheetActions/BottomSheetActions.d.ts.map +1 -0
- package/dist/definitions/forms/FilePicker/BottomSheetActions/BottomSheetActionsItem.d.ts +7 -0
- package/dist/definitions/forms/FilePicker/BottomSheetActions/BottomSheetActionsItem.d.ts.map +1 -0
- package/dist/definitions/forms/FilePicker/FilePicker.d.ts +17 -0
- package/dist/definitions/forms/FilePicker/FilePicker.d.ts.map +1 -0
- package/dist/definitions/forms/FilePicker/FilePicker.web.d.ts +4 -0
- package/dist/definitions/forms/FilePicker/FilePicker.web.d.ts.map +1 -0
- package/dist/definitions/forms/ImagePicker/ImagePicker.d.ts +15 -0
- package/dist/definitions/forms/ImagePicker/ImagePicker.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +7 -2
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +43 -78
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/tag.d.ts +22 -14
- package/dist/definitions/themes/late-ocean/tag.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +463 -319
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +463 -319
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +383 -238
- package/dist/index-node-20.10.cjs.js.map +1 -1
- package/dist/index-node-20.10.cjs.web.js +214 -155
- package/dist/index-node-20.10.cjs.web.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +383 -241
- package/dist/index-node-20.10.es.mjs.map +1 -1
- package/dist/index-node-20.10.es.web.mjs +212 -156
- package/dist/index-node-20.10.es.web.mjs.map +1 -1
- package/dist/index.es.js +496 -314
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +257 -157
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +38 -44
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +38 -44
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-20.10.cjs.js +38 -44
- package/dist/linaria-themes-node-20.10.cjs.js.map +1 -1
- package/dist/linaria-themes-node-20.10.cjs.web.js +38 -44
- package/dist/linaria-themes-node-20.10.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-20.10.es.mjs +38 -44
- package/dist/linaria-themes-node-20.10.es.mjs.map +1 -1
- package/dist/linaria-themes-node-20.10.es.web.mjs +38 -44
- package/dist/linaria-themes-node-20.10.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +38 -44
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +38 -44
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +5 -2
- package/translations/fr-FR.json +2 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext, createContext, forwardRef, cloneElement, useRef, useEffect, useState, useMemo, Children, useReducer,
|
|
1
|
+
import React, { useContext, createContext, forwardRef, cloneElement, useRef, useEffect, useState, useMemo, Children, useReducer, Fragment as Fragment$1, useCallback, createElement } from 'react';
|
|
2
2
|
import { View as View$1, ScrollView as ScrollView$1, Pressable as Pressable$1, Image as Image$1, FlatList as FlatList$1, SectionList as SectionList$1, Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, Center as Center$1, useSx, Text, Input, useBreakpointValue as useBreakpointValue$1, NativeBaseProvider, extendTheme, useMediaQuery } from 'native-base';
|
|
3
3
|
export { useClipboard, useMediaQuery, useSx, useToken } from 'native-base';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -7,7 +7,7 @@ import { Platform, Animated as Animated$1, Easing, StyleSheet, Modal, ScrollView
|
|
|
7
7
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
8
8
|
import { ArcIcon, UserIcon, MapPinIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, XIcon, RotateCCWIcon } from '@ornikar/kitt-icons';
|
|
9
9
|
export * from '@ornikar/kitt-icons';
|
|
10
|
-
import { BottomSheetScrollView, BottomSheetView, useBottomSheetDynamicSnapPoints, BottomSheetModal, BottomSheetHandle, BottomSheetBackdrop } from '@gorhom/bottom-sheet';
|
|
10
|
+
import { BottomSheetScrollView, BottomSheetView, useBottomSheetDynamicSnapPoints, BottomSheetModal, BottomSheetHandle, BottomSheetBackdrop, useBottomSheetModal } from '@gorhom/bottom-sheet';
|
|
11
11
|
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
12
12
|
import { parse } from 'twemoji-parser';
|
|
13
13
|
import * as WebBrowser from 'expo-web-browser';
|
|
@@ -15,6 +15,8 @@ import { CaretUpFillIcon, CaretDownFillIcon, EyeClosedRegularIcon, EyeRegularIco
|
|
|
15
15
|
import Downshift from 'downshift';
|
|
16
16
|
import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/datetimepicker';
|
|
17
17
|
import { FormattedMessage } from 'react-intl';
|
|
18
|
+
import { getDocumentAsync } from 'expo-document-picker';
|
|
19
|
+
import { launchImageLibraryAsync } from 'expo-image-picker';
|
|
18
20
|
import { useDebouncedCallback } from 'use-debounce';
|
|
19
21
|
import { parseNumber, getCountryCallingCode, isValidNumber } from 'libphonenumber-js';
|
|
20
22
|
import Svg, { Circle as Circle$1 } from 'react-native-svg';
|
|
@@ -1635,57 +1637,51 @@ const skeleton = {
|
|
|
1635
1637
|
};
|
|
1636
1638
|
|
|
1637
1639
|
const tag = {
|
|
1638
|
-
borderRadius:
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
fill: {
|
|
1644
|
-
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
1645
|
-
borderWidth: 0,
|
|
1646
|
-
borderColor: colors.transparent
|
|
1647
|
-
},
|
|
1648
|
-
outline: {
|
|
1649
|
-
backgroundColor: colors.transparent,
|
|
1650
|
-
borderWidth: 1,
|
|
1651
|
-
borderColor: colors.primary
|
|
1652
|
-
}
|
|
1640
|
+
borderRadius: 16,
|
|
1641
|
+
icon: {
|
|
1642
|
+
small: 16,
|
|
1643
|
+
medium: 16,
|
|
1644
|
+
large: 20
|
|
1653
1645
|
},
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1646
|
+
withIcon: {
|
|
1647
|
+
small: {
|
|
1648
|
+
paddingLeft: 2,
|
|
1649
|
+
paddingRight: 8,
|
|
1650
|
+
height: 20
|
|
1659
1651
|
},
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
}
|
|
1665
|
-
},
|
|
1666
|
-
danger: {
|
|
1667
|
-
fill: {
|
|
1668
|
-
backgroundColor: colors.danger,
|
|
1669
|
-
borderWidth: 0,
|
|
1670
|
-
borderColor: colors.transparent
|
|
1652
|
+
medium: {
|
|
1653
|
+
paddingLeft: 4,
|
|
1654
|
+
paddingRight: 8,
|
|
1655
|
+
height: 24
|
|
1671
1656
|
},
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1657
|
+
large: {
|
|
1658
|
+
paddingLeft: 6,
|
|
1659
|
+
paddingRight: 8,
|
|
1660
|
+
height: 32
|
|
1676
1661
|
}
|
|
1677
1662
|
},
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1663
|
+
withoutIcon: {
|
|
1664
|
+
small: {
|
|
1665
|
+
paddingLeft: 8,
|
|
1666
|
+
paddingRight: 8,
|
|
1667
|
+
height: 20
|
|
1683
1668
|
},
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1669
|
+
medium: {
|
|
1670
|
+
paddingLeft: 8,
|
|
1671
|
+
paddingRight: 8,
|
|
1672
|
+
height: 22
|
|
1673
|
+
},
|
|
1674
|
+
large: {
|
|
1675
|
+
paddingLeft: 8,
|
|
1676
|
+
paddingRight: 8,
|
|
1677
|
+
height: 28
|
|
1688
1678
|
}
|
|
1679
|
+
},
|
|
1680
|
+
fill: {
|
|
1681
|
+
borderWidth: 0
|
|
1682
|
+
},
|
|
1683
|
+
outline: {
|
|
1684
|
+
borderWidth: 1
|
|
1689
1685
|
}
|
|
1690
1686
|
};
|
|
1691
1687
|
|
|
@@ -5314,6 +5310,232 @@ const DatePicker = /*#__PURE__*/forwardRef(({
|
|
|
5314
5310
|
});
|
|
5315
5311
|
});
|
|
5316
5312
|
|
|
5313
|
+
function DocumentPicker({
|
|
5314
|
+
onDocumentUpload,
|
|
5315
|
+
children,
|
|
5316
|
+
disabled,
|
|
5317
|
+
documentPickerOptions
|
|
5318
|
+
}) {
|
|
5319
|
+
const childElement = Children.only(children);
|
|
5320
|
+
return /*#__PURE__*/cloneElement(childElement, {
|
|
5321
|
+
// ensure that the press event is not prevented by Button component
|
|
5322
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
5323
|
+
onPress: async () => {
|
|
5324
|
+
if (disabled) return;
|
|
5325
|
+
childElement.props.onPress?.();
|
|
5326
|
+
const result = await getDocumentAsync({
|
|
5327
|
+
...documentPickerOptions,
|
|
5328
|
+
multiple: false
|
|
5329
|
+
});
|
|
5330
|
+
if (!result.canceled && result.assets[0].file) {
|
|
5331
|
+
onDocumentUpload(result.assets[0].file);
|
|
5332
|
+
}
|
|
5333
|
+
},
|
|
5334
|
+
disabled
|
|
5335
|
+
});
|
|
5336
|
+
}
|
|
5337
|
+
|
|
5338
|
+
function ImagePicker({
|
|
5339
|
+
onImageSelected,
|
|
5340
|
+
children,
|
|
5341
|
+
disabled,
|
|
5342
|
+
imagePickerOptions
|
|
5343
|
+
}) {
|
|
5344
|
+
const childElement = Children.only(children);
|
|
5345
|
+
return /*#__PURE__*/jsx(View, {
|
|
5346
|
+
children: /*#__PURE__*/cloneElement(childElement, {
|
|
5347
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
5348
|
+
onPress: async () => {
|
|
5349
|
+
if (disabled) return;
|
|
5350
|
+
childElement.props.onPress?.();
|
|
5351
|
+
|
|
5352
|
+
// No permissions request is necessary for launching the image library
|
|
5353
|
+
const result = await launchImageLibraryAsync({
|
|
5354
|
+
...imagePickerOptions,
|
|
5355
|
+
allowsMultipleSelection: false
|
|
5356
|
+
});
|
|
5357
|
+
if (!result.canceled) {
|
|
5358
|
+
onImageSelected(result.assets[0]);
|
|
5359
|
+
}
|
|
5360
|
+
},
|
|
5361
|
+
disabled
|
|
5362
|
+
})
|
|
5363
|
+
});
|
|
5364
|
+
}
|
|
5365
|
+
|
|
5366
|
+
function ListItemContent({
|
|
5367
|
+
children,
|
|
5368
|
+
...rest
|
|
5369
|
+
}) {
|
|
5370
|
+
return /*#__PURE__*/jsx(View, {
|
|
5371
|
+
alignSelf: "center",
|
|
5372
|
+
flexBasis: "0%",
|
|
5373
|
+
flexGrow: 1,
|
|
5374
|
+
flexShrink: 0,
|
|
5375
|
+
...rest,
|
|
5376
|
+
children: children
|
|
5377
|
+
});
|
|
5378
|
+
}
|
|
5379
|
+
|
|
5380
|
+
// Handles the vertical alignment of the side elements of the list item
|
|
5381
|
+
function ListItemSideContainer({
|
|
5382
|
+
children,
|
|
5383
|
+
side = 'left',
|
|
5384
|
+
...rest
|
|
5385
|
+
}) {
|
|
5386
|
+
return /*#__PURE__*/jsx(View, {
|
|
5387
|
+
flexDirection: "row",
|
|
5388
|
+
marginLeft: side === 'right' ? 'kitt.2' : undefined,
|
|
5389
|
+
marginRight: side === 'left' ? 'kitt.2' : undefined,
|
|
5390
|
+
...rest,
|
|
5391
|
+
children: children
|
|
5392
|
+
});
|
|
5393
|
+
}
|
|
5394
|
+
function ListItemSideContent({
|
|
5395
|
+
children,
|
|
5396
|
+
align = 'auto',
|
|
5397
|
+
...rest
|
|
5398
|
+
}) {
|
|
5399
|
+
return /*#__PURE__*/jsx(View, {
|
|
5400
|
+
alignSelf: align,
|
|
5401
|
+
...rest,
|
|
5402
|
+
children: children
|
|
5403
|
+
});
|
|
5404
|
+
}
|
|
5405
|
+
|
|
5406
|
+
function ListItem({
|
|
5407
|
+
children,
|
|
5408
|
+
withPadding,
|
|
5409
|
+
borders,
|
|
5410
|
+
left,
|
|
5411
|
+
right,
|
|
5412
|
+
onPress,
|
|
5413
|
+
...rest
|
|
5414
|
+
}) {
|
|
5415
|
+
const Wrapper = onPress ? Pressable$2 : Fragment$1;
|
|
5416
|
+
const wrapperProps = onPress ? {
|
|
5417
|
+
accessibilityRole: 'button',
|
|
5418
|
+
onPress,
|
|
5419
|
+
...rest
|
|
5420
|
+
} : undefined;
|
|
5421
|
+
const containerProps = onPress ? undefined : rest;
|
|
5422
|
+
return /*#__PURE__*/jsx(Wrapper, {
|
|
5423
|
+
...wrapperProps,
|
|
5424
|
+
children: /*#__PURE__*/jsxs(View, {
|
|
5425
|
+
flexDirection: "row",
|
|
5426
|
+
paddingX: withPadding ? 'kitt.listItem.horizontalPadding' : undefined,
|
|
5427
|
+
paddingY: withPadding ? 'kitt.listItem.verticalPadding' : undefined,
|
|
5428
|
+
borderColor: "kitt.listItem.borderColor",
|
|
5429
|
+
backgroundColor: "kitt.uiBackgroundLight",
|
|
5430
|
+
borderTopWidth: borders === 'top' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
5431
|
+
borderBottomWidth: borders === 'bottom' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
5432
|
+
...containerProps,
|
|
5433
|
+
children: [left ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
5434
|
+
side: "left",
|
|
5435
|
+
children: left
|
|
5436
|
+
}) : null, /*#__PURE__*/jsx(ListItemContent, {
|
|
5437
|
+
children: children
|
|
5438
|
+
}), right ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
5439
|
+
side: "right",
|
|
5440
|
+
children: right
|
|
5441
|
+
}) : null]
|
|
5442
|
+
})
|
|
5443
|
+
});
|
|
5444
|
+
}
|
|
5445
|
+
ListItem.Content = ListItemContent;
|
|
5446
|
+
ListItem.SideContent = ListItemSideContent;
|
|
5447
|
+
ListItem.SideContainer = ListItemSideContainer;
|
|
5448
|
+
|
|
5449
|
+
function BottomSheetActionsItem({
|
|
5450
|
+
title,
|
|
5451
|
+
...props
|
|
5452
|
+
}) {
|
|
5453
|
+
return /*#__PURE__*/jsx(Pressable$2, {
|
|
5454
|
+
...props,
|
|
5455
|
+
children: /*#__PURE__*/jsx(ListItem, {
|
|
5456
|
+
withPadding: true,
|
|
5457
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
5458
|
+
variant: "bold",
|
|
5459
|
+
base: "body",
|
|
5460
|
+
children: title
|
|
5461
|
+
})
|
|
5462
|
+
})
|
|
5463
|
+
});
|
|
5464
|
+
}
|
|
5465
|
+
|
|
5466
|
+
function BottomSheetActions({
|
|
5467
|
+
onBottomSheetActionsChange,
|
|
5468
|
+
imagePickerOptions,
|
|
5469
|
+
documentPickerOptions,
|
|
5470
|
+
disabled
|
|
5471
|
+
}) {
|
|
5472
|
+
const isPlatformIOS = Platform.OS === 'ios';
|
|
5473
|
+
return /*#__PURE__*/jsxs(VStack, {
|
|
5474
|
+
marginBottom: "kitt.8",
|
|
5475
|
+
children: [/*#__PURE__*/jsx(ImagePicker, {
|
|
5476
|
+
imagePickerOptions: imagePickerOptions,
|
|
5477
|
+
disabled: disabled,
|
|
5478
|
+
onImageSelected: onBottomSheetActionsChange,
|
|
5479
|
+
children: /*#__PURE__*/jsx(BottomSheetActionsItem, {
|
|
5480
|
+
title: /*#__PURE__*/jsx(FormattedMessage, {
|
|
5481
|
+
id: "account.BottomSheetActions.openLibrary",
|
|
5482
|
+
values: {
|
|
5483
|
+
isPlatformIOS
|
|
5484
|
+
}
|
|
5485
|
+
})
|
|
5486
|
+
})
|
|
5487
|
+
}), /*#__PURE__*/jsx(DocumentPicker, {
|
|
5488
|
+
disabled: disabled,
|
|
5489
|
+
documentPickerOptions: documentPickerOptions,
|
|
5490
|
+
onDocumentUpload: onBottomSheetActionsChange,
|
|
5491
|
+
children: /*#__PURE__*/jsx(BottomSheetActionsItem, {
|
|
5492
|
+
title: /*#__PURE__*/jsx(FormattedMessage, {
|
|
5493
|
+
id: "account.BottomSheetActions.openFileExplorer",
|
|
5494
|
+
values: {
|
|
5495
|
+
isPlatformIOS
|
|
5496
|
+
}
|
|
5497
|
+
})
|
|
5498
|
+
})
|
|
5499
|
+
})]
|
|
5500
|
+
});
|
|
5501
|
+
}
|
|
5502
|
+
|
|
5503
|
+
function FilePicker({
|
|
5504
|
+
onFileSelected,
|
|
5505
|
+
children,
|
|
5506
|
+
disabled,
|
|
5507
|
+
imagePickerOptions,
|
|
5508
|
+
documentPickerOptions
|
|
5509
|
+
}) {
|
|
5510
|
+
const childElement = Children.only(children);
|
|
5511
|
+
const {
|
|
5512
|
+
bottomSheetRef,
|
|
5513
|
+
BottomSheet
|
|
5514
|
+
} = useStaticBottomSheet(BottomSheetActions);
|
|
5515
|
+
const {
|
|
5516
|
+
dismissAll
|
|
5517
|
+
} = useBottomSheetModal();
|
|
5518
|
+
const handleBottomSheetActionsChange = file => {
|
|
5519
|
+
dismissAll();
|
|
5520
|
+
onFileSelected(file);
|
|
5521
|
+
};
|
|
5522
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
5523
|
+
children: [/*#__PURE__*/cloneElement(childElement, {
|
|
5524
|
+
// ensure that the press event is not prevented by Button component
|
|
5525
|
+
onPress: () => {
|
|
5526
|
+
if (disabled) return;
|
|
5527
|
+
childElement.props.onPress?.();
|
|
5528
|
+
bottomSheetRef.current?.present({
|
|
5529
|
+
onBottomSheetActionsChange: handleBottomSheetActionsChange,
|
|
5530
|
+
imagePickerOptions,
|
|
5531
|
+
documentPickerOptions
|
|
5532
|
+
});
|
|
5533
|
+
},
|
|
5534
|
+
disabled
|
|
5535
|
+
}), /*#__PURE__*/jsx(BottomSheet, {})]
|
|
5536
|
+
});
|
|
5537
|
+
}
|
|
5538
|
+
|
|
5317
5539
|
const GoogleMapsApiKeyContext = /*#__PURE__*/createContext(undefined);
|
|
5318
5540
|
function GoogleMapsApiKeyProvider({
|
|
5319
5541
|
children,
|
|
@@ -7106,89 +7328,6 @@ function useKittMapConfig() {
|
|
|
7106
7328
|
return context;
|
|
7107
7329
|
}
|
|
7108
7330
|
|
|
7109
|
-
function ListItemContent({
|
|
7110
|
-
children,
|
|
7111
|
-
...rest
|
|
7112
|
-
}) {
|
|
7113
|
-
return /*#__PURE__*/jsx(View, {
|
|
7114
|
-
alignSelf: "center",
|
|
7115
|
-
flexBasis: "0%",
|
|
7116
|
-
flexGrow: 1,
|
|
7117
|
-
flexShrink: 0,
|
|
7118
|
-
...rest,
|
|
7119
|
-
children: children
|
|
7120
|
-
});
|
|
7121
|
-
}
|
|
7122
|
-
|
|
7123
|
-
// Handles the vertical alignment of the side elements of the list item
|
|
7124
|
-
function ListItemSideContainer({
|
|
7125
|
-
children,
|
|
7126
|
-
side = 'left',
|
|
7127
|
-
...rest
|
|
7128
|
-
}) {
|
|
7129
|
-
return /*#__PURE__*/jsx(View, {
|
|
7130
|
-
flexDirection: "row",
|
|
7131
|
-
marginLeft: side === 'right' ? 'kitt.2' : undefined,
|
|
7132
|
-
marginRight: side === 'left' ? 'kitt.2' : undefined,
|
|
7133
|
-
...rest,
|
|
7134
|
-
children: children
|
|
7135
|
-
});
|
|
7136
|
-
}
|
|
7137
|
-
function ListItemSideContent({
|
|
7138
|
-
children,
|
|
7139
|
-
align = 'auto',
|
|
7140
|
-
...rest
|
|
7141
|
-
}) {
|
|
7142
|
-
return /*#__PURE__*/jsx(View, {
|
|
7143
|
-
alignSelf: align,
|
|
7144
|
-
...rest,
|
|
7145
|
-
children: children
|
|
7146
|
-
});
|
|
7147
|
-
}
|
|
7148
|
-
|
|
7149
|
-
function ListItem({
|
|
7150
|
-
children,
|
|
7151
|
-
withPadding,
|
|
7152
|
-
borders,
|
|
7153
|
-
left,
|
|
7154
|
-
right,
|
|
7155
|
-
onPress,
|
|
7156
|
-
...rest
|
|
7157
|
-
}) {
|
|
7158
|
-
const Wrapper = onPress ? Pressable$2 : Fragment$1;
|
|
7159
|
-
const wrapperProps = onPress ? {
|
|
7160
|
-
accessibilityRole: 'button',
|
|
7161
|
-
onPress,
|
|
7162
|
-
...rest
|
|
7163
|
-
} : undefined;
|
|
7164
|
-
const containerProps = onPress ? undefined : rest;
|
|
7165
|
-
return /*#__PURE__*/jsx(Wrapper, {
|
|
7166
|
-
...wrapperProps,
|
|
7167
|
-
children: /*#__PURE__*/jsxs(View, {
|
|
7168
|
-
flexDirection: "row",
|
|
7169
|
-
paddingX: withPadding ? 'kitt.listItem.horizontalPadding' : undefined,
|
|
7170
|
-
paddingY: withPadding ? 'kitt.listItem.verticalPadding' : undefined,
|
|
7171
|
-
borderColor: "kitt.listItem.borderColor",
|
|
7172
|
-
backgroundColor: "kitt.uiBackgroundLight",
|
|
7173
|
-
borderTopWidth: borders === 'top' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
7174
|
-
borderBottomWidth: borders === 'bottom' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
7175
|
-
...containerProps,
|
|
7176
|
-
children: [left ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
7177
|
-
side: "left",
|
|
7178
|
-
children: left
|
|
7179
|
-
}) : null, /*#__PURE__*/jsx(ListItemContent, {
|
|
7180
|
-
children: children
|
|
7181
|
-
}), right ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
7182
|
-
side: "right",
|
|
7183
|
-
children: right
|
|
7184
|
-
}) : null]
|
|
7185
|
-
})
|
|
7186
|
-
});
|
|
7187
|
-
}
|
|
7188
|
-
ListItem.Content = ListItemContent;
|
|
7189
|
-
ListItem.SideContent = ListItemSideContent;
|
|
7190
|
-
ListItem.SideContainer = ListItemSideContainer;
|
|
7191
|
-
|
|
7192
7331
|
const SvgMarkerLargeinline = props => /*#__PURE__*/jsxs("svg", {
|
|
7193
7332
|
fill: "currentColor",
|
|
7194
7333
|
viewBox: "0 0 54 56",
|
|
@@ -7708,48 +7847,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7708
7847
|
}
|
|
7709
7848
|
}
|
|
7710
7849
|
},
|
|
7711
|
-
tag: {
|
|
7712
|
-
primary: {
|
|
7713
|
-
fill: {
|
|
7714
|
-
backgroundColor: theme.tag.primary.fill.backgroundColor,
|
|
7715
|
-
borderColor: theme.tag.primary.fill.borderColor
|
|
7716
|
-
},
|
|
7717
|
-
outline: {
|
|
7718
|
-
backgroundColor: theme.tag.primary.outline.backgroundColor,
|
|
7719
|
-
borderColor: theme.tag.primary.outline.borderColor
|
|
7720
|
-
}
|
|
7721
|
-
},
|
|
7722
|
-
default: {
|
|
7723
|
-
fill: {
|
|
7724
|
-
backgroundColor: theme.tag.default.fill.backgroundColor,
|
|
7725
|
-
borderColor: theme.tag.default.fill.borderColor
|
|
7726
|
-
},
|
|
7727
|
-
outline: {
|
|
7728
|
-
backgroundColor: theme.tag.default.outline.backgroundColor,
|
|
7729
|
-
borderColor: theme.tag.default.outline.borderColor
|
|
7730
|
-
}
|
|
7731
|
-
},
|
|
7732
|
-
danger: {
|
|
7733
|
-
fill: {
|
|
7734
|
-
backgroundColor: theme.tag.danger.fill.backgroundColor,
|
|
7735
|
-
borderColor: theme.tag.danger.fill.borderColor
|
|
7736
|
-
},
|
|
7737
|
-
outline: {
|
|
7738
|
-
backgroundColor: theme.tag.danger.outline.backgroundColor,
|
|
7739
|
-
borderColor: theme.tag.danger.outline.borderColor
|
|
7740
|
-
}
|
|
7741
|
-
},
|
|
7742
|
-
warn: {
|
|
7743
|
-
fill: {
|
|
7744
|
-
backgroundColor: theme.tag.warn.fill.backgroundColor,
|
|
7745
|
-
borderColor: theme.tag.warn.fill.borderColor
|
|
7746
|
-
},
|
|
7747
|
-
outline: {
|
|
7748
|
-
backgroundColor: theme.tag.warn.outline.backgroundColor,
|
|
7749
|
-
borderColor: theme.tag.warn.outline.borderColor
|
|
7750
|
-
}
|
|
7751
|
-
}
|
|
7752
|
-
},
|
|
7753
7850
|
tooltip: {
|
|
7754
7851
|
backgroundColor: theme.tooltip.backgroundColor
|
|
7755
7852
|
},
|
|
@@ -8238,37 +8335,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8238
8335
|
borderWidth: theme.listItem.borderWidth
|
|
8239
8336
|
},
|
|
8240
8337
|
tag: {
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
borderWidth: theme.tag.primary.fill.borderWidth
|
|
8244
|
-
},
|
|
8245
|
-
outline: {
|
|
8246
|
-
borderWidth: theme.tag.primary.outline.borderWidth
|
|
8247
|
-
}
|
|
8338
|
+
fill: {
|
|
8339
|
+
borderWidth: theme.tag.fill.borderWidth
|
|
8248
8340
|
},
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
borderWidth: theme.tag.default.fill.borderWidth
|
|
8252
|
-
},
|
|
8253
|
-
outline: {
|
|
8254
|
-
borderWidth: theme.tag.default.outline.borderWidth
|
|
8255
|
-
}
|
|
8256
|
-
},
|
|
8257
|
-
danger: {
|
|
8258
|
-
fill: {
|
|
8259
|
-
borderWidth: theme.tag.danger.fill.borderWidth
|
|
8260
|
-
},
|
|
8261
|
-
outline: {
|
|
8262
|
-
borderWidth: theme.tag.danger.outline.borderWidth
|
|
8263
|
-
}
|
|
8264
|
-
},
|
|
8265
|
-
warn: {
|
|
8266
|
-
fill: {
|
|
8267
|
-
borderWidth: theme.tag.warn.fill.borderWidth
|
|
8268
|
-
},
|
|
8269
|
-
outline: {
|
|
8270
|
-
borderWidth: theme.tag.warn.outline.borderWidth
|
|
8271
|
-
}
|
|
8341
|
+
outline: {
|
|
8342
|
+
borderWidth: theme.tag.outline.borderWidth
|
|
8272
8343
|
}
|
|
8273
8344
|
}
|
|
8274
8345
|
},
|
|
@@ -8366,6 +8437,39 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8366
8437
|
pageLoader: {
|
|
8367
8438
|
size: theme.pageLoader.size
|
|
8368
8439
|
},
|
|
8440
|
+
tag: {
|
|
8441
|
+
small: {
|
|
8442
|
+
iconSize: theme.tag.icon.small
|
|
8443
|
+
},
|
|
8444
|
+
medium: {
|
|
8445
|
+
iconSize: theme.tag.icon.medium
|
|
8446
|
+
},
|
|
8447
|
+
large: {
|
|
8448
|
+
iconSize: theme.tag.icon.large
|
|
8449
|
+
},
|
|
8450
|
+
withIcon: {
|
|
8451
|
+
small: {
|
|
8452
|
+
height: theme.tag.withIcon.small.height
|
|
8453
|
+
},
|
|
8454
|
+
medium: {
|
|
8455
|
+
height: theme.tag.withIcon.medium.height
|
|
8456
|
+
},
|
|
8457
|
+
large: {
|
|
8458
|
+
height: theme.tag.withIcon.large.height
|
|
8459
|
+
}
|
|
8460
|
+
},
|
|
8461
|
+
withoutIcon: {
|
|
8462
|
+
small: {
|
|
8463
|
+
height: theme.tag.withoutIcon.small.height
|
|
8464
|
+
},
|
|
8465
|
+
medium: {
|
|
8466
|
+
height: theme.tag.withoutIcon.medium.height
|
|
8467
|
+
},
|
|
8468
|
+
large: {
|
|
8469
|
+
height: theme.tag.withoutIcon.large.height
|
|
8470
|
+
}
|
|
8471
|
+
}
|
|
8472
|
+
},
|
|
8369
8473
|
tooltip: {
|
|
8370
8474
|
maxWidth: theme.tooltip.maxWidth,
|
|
8371
8475
|
arrow: {
|
|
@@ -8458,8 +8562,34 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8458
8562
|
horizontalPadding: theme.listItem.horizontalPadding
|
|
8459
8563
|
},
|
|
8460
8564
|
tag: {
|
|
8461
|
-
|
|
8462
|
-
|
|
8565
|
+
withoutIcon: {
|
|
8566
|
+
small: {
|
|
8567
|
+
paddingLeft: theme.tag.withoutIcon.small.paddingLeft,
|
|
8568
|
+
paddingRight: theme.tag.withoutIcon.small.paddingRight
|
|
8569
|
+
},
|
|
8570
|
+
medium: {
|
|
8571
|
+
paddingLeft: theme.tag.withoutIcon.medium.paddingLeft,
|
|
8572
|
+
paddingRight: theme.tag.withoutIcon.medium.paddingRight
|
|
8573
|
+
},
|
|
8574
|
+
large: {
|
|
8575
|
+
paddingLeft: theme.tag.withoutIcon.large.paddingLeft,
|
|
8576
|
+
paddingRight: theme.tag.withoutIcon.large.paddingRight
|
|
8577
|
+
}
|
|
8578
|
+
},
|
|
8579
|
+
withIcon: {
|
|
8580
|
+
small: {
|
|
8581
|
+
paddingLeft: theme.tag.withIcon.small.paddingLeft,
|
|
8582
|
+
paddingRight: theme.tag.withIcon.small.paddingRight
|
|
8583
|
+
},
|
|
8584
|
+
medium: {
|
|
8585
|
+
paddingLeft: theme.tag.withIcon.medium.paddingLeft,
|
|
8586
|
+
paddingRight: theme.tag.withIcon.medium.paddingRight
|
|
8587
|
+
},
|
|
8588
|
+
large: {
|
|
8589
|
+
paddingLeft: theme.tag.withIcon.large.paddingLeft,
|
|
8590
|
+
paddingRight: theme.tag.withIcon.large.paddingRight
|
|
8591
|
+
}
|
|
8592
|
+
}
|
|
8463
8593
|
},
|
|
8464
8594
|
tooltip: {
|
|
8465
8595
|
horizontalPadding: theme.tooltip.horizontalPadding,
|
|
@@ -10440,48 +10570,68 @@ const StoryGrid = {
|
|
|
10440
10570
|
Col: StoryGridCol
|
|
10441
10571
|
};
|
|
10442
10572
|
|
|
10443
|
-
|
|
10573
|
+
function useKittTheme() {
|
|
10574
|
+
return useMemo(() => {
|
|
10575
|
+
return {
|
|
10576
|
+
kitt: theme
|
|
10577
|
+
};
|
|
10578
|
+
}, []);
|
|
10579
|
+
}
|
|
10580
|
+
|
|
10581
|
+
const getTypography = size => {
|
|
10582
|
+
switch (size) {
|
|
10583
|
+
case 'small':
|
|
10584
|
+
return 'body-xs';
|
|
10585
|
+
case 'medium':
|
|
10586
|
+
return 'body-s';
|
|
10587
|
+
case 'large':
|
|
10588
|
+
default:
|
|
10589
|
+
return 'body-m';
|
|
10590
|
+
}
|
|
10591
|
+
};
|
|
10592
|
+
const typeToColor = (color, type) => {
|
|
10593
|
+
if (color) return color;
|
|
10444
10594
|
switch (type) {
|
|
10445
|
-
case 'danger':
|
|
10446
|
-
{
|
|
10447
|
-
return variant === 'outline' ? 'danger' : 'black';
|
|
10448
|
-
}
|
|
10449
|
-
case 'warn':
|
|
10450
|
-
{
|
|
10451
|
-
return variant === 'outline' ? 'warning' : 'black';
|
|
10452
|
-
}
|
|
10453
10595
|
case 'primary':
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10596
|
+
return 'violine';
|
|
10597
|
+
case 'warn':
|
|
10598
|
+
return 'sun';
|
|
10599
|
+
case 'danger':
|
|
10600
|
+
return 'coral';
|
|
10457
10601
|
case 'default':
|
|
10458
|
-
{
|
|
10459
|
-
return 'black';
|
|
10460
|
-
}
|
|
10461
10602
|
default:
|
|
10462
|
-
|
|
10463
|
-
return 'black';
|
|
10464
|
-
}
|
|
10603
|
+
return 'eggshell';
|
|
10465
10604
|
}
|
|
10466
10605
|
};
|
|
10467
10606
|
function Tag({
|
|
10468
10607
|
label,
|
|
10469
|
-
|
|
10608
|
+
icon,
|
|
10609
|
+
color,
|
|
10610
|
+
type,
|
|
10611
|
+
size = 'medium',
|
|
10470
10612
|
variant = 'fill'
|
|
10471
10613
|
}) {
|
|
10472
|
-
|
|
10614
|
+
const kittTheme = useKittTheme();
|
|
10615
|
+
const tagColor = typeToColor(color, type);
|
|
10616
|
+
return /*#__PURE__*/jsxs(HStack, {
|
|
10473
10617
|
alignSelf: "flex-start",
|
|
10474
10618
|
borderRadius: "kitt.tag.borderRadius",
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10619
|
+
height: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.height`,
|
|
10620
|
+
paddingLeft: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingLeft`,
|
|
10621
|
+
paddingRight: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingRight`,
|
|
10622
|
+
backgroundColor: variant === 'fill' ? kittTheme.kitt.palettes.lateOcean[`${tagColor}.4`] : 'kitt.transparent',
|
|
10623
|
+
borderColor: kittTheme.kitt.palettes.lateOcean[`${tagColor}.6`],
|
|
10624
|
+
borderWidth: `kitt.tag.${variant}.borderWidth`,
|
|
10625
|
+
space: "kitt.1",
|
|
10626
|
+
alignItems: "center",
|
|
10627
|
+
children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
|
|
10628
|
+
icon: icon,
|
|
10629
|
+
size: `kitt.tag.${size}.iconSize`
|
|
10630
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
10631
|
+
base: getTypography(size),
|
|
10632
|
+
color: "black",
|
|
10483
10633
|
children: label
|
|
10484
|
-
})
|
|
10634
|
+
})]
|
|
10485
10635
|
});
|
|
10486
10636
|
}
|
|
10487
10637
|
|
|
@@ -11049,14 +11199,6 @@ function TypographyLink({
|
|
|
11049
11199
|
});
|
|
11050
11200
|
}
|
|
11051
11201
|
|
|
11052
|
-
function useKittTheme() {
|
|
11053
|
-
return useMemo(() => {
|
|
11054
|
-
return {
|
|
11055
|
-
kitt: theme
|
|
11056
|
-
};
|
|
11057
|
-
}, []);
|
|
11058
|
-
}
|
|
11059
|
-
|
|
11060
11202
|
function KittThemeProvider({
|
|
11061
11203
|
isSSR,
|
|
11062
11204
|
children,
|
|
@@ -11284,5 +11426,5 @@ function VerticalSteps({
|
|
|
11284
11426
|
}
|
|
11285
11427
|
VerticalSteps.Step = ExternalStep;
|
|
11286
11428
|
|
|
11287
|
-
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, Emoji, ExternalAppLink, ExternalLink, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, HStack, Highlight, Icon, IconButton, Image, InputAddress, InputEmail, InputFeedback, InputField, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarkerLarge, MapMarkerPosition, MapMarkerSimple, MatchWindowSize, Message, ModalBehaviour, FlatList as NativeOnlyFlatList, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
|
|
11429
|
+
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InputAddress, InputEmail, InputFeedback, InputField, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarkerLarge, MapMarkerPosition, MapMarkerSimple, MatchWindowSize, Message, ModalBehaviour, FlatList as NativeOnlyFlatList, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
|
|
11288
11430
|
//# sourceMappingURL=index-node-20.10.es.mjs.map
|