@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
|
@@ -16,6 +16,8 @@ const phosphor = require('@ornikar/kitt-icons/phosphor');
|
|
|
16
16
|
const Downshift = require('downshift');
|
|
17
17
|
const DateTimePicker = require('@react-native-community/datetimepicker');
|
|
18
18
|
const reactIntl = require('react-intl');
|
|
19
|
+
const expoDocumentPicker = require('expo-document-picker');
|
|
20
|
+
const expoImagePicker = require('expo-image-picker');
|
|
19
21
|
const useDebounce = require('use-debounce');
|
|
20
22
|
const libphonenumberJs = require('libphonenumber-js');
|
|
21
23
|
const Svg = require('react-native-svg');
|
|
@@ -1657,57 +1659,51 @@ const skeleton = {
|
|
|
1657
1659
|
};
|
|
1658
1660
|
|
|
1659
1661
|
const tag = {
|
|
1660
|
-
borderRadius:
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
fill: {
|
|
1666
|
-
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
1667
|
-
borderWidth: 0,
|
|
1668
|
-
borderColor: colors.transparent
|
|
1669
|
-
},
|
|
1670
|
-
outline: {
|
|
1671
|
-
backgroundColor: colors.transparent,
|
|
1672
|
-
borderWidth: 1,
|
|
1673
|
-
borderColor: colors.primary
|
|
1674
|
-
}
|
|
1662
|
+
borderRadius: 16,
|
|
1663
|
+
icon: {
|
|
1664
|
+
small: 16,
|
|
1665
|
+
medium: 16,
|
|
1666
|
+
large: 20
|
|
1675
1667
|
},
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1668
|
+
withIcon: {
|
|
1669
|
+
small: {
|
|
1670
|
+
paddingLeft: 2,
|
|
1671
|
+
paddingRight: 8,
|
|
1672
|
+
height: 20
|
|
1681
1673
|
},
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
}
|
|
1687
|
-
},
|
|
1688
|
-
danger: {
|
|
1689
|
-
fill: {
|
|
1690
|
-
backgroundColor: colors.danger,
|
|
1691
|
-
borderWidth: 0,
|
|
1692
|
-
borderColor: colors.transparent
|
|
1674
|
+
medium: {
|
|
1675
|
+
paddingLeft: 4,
|
|
1676
|
+
paddingRight: 8,
|
|
1677
|
+
height: 24
|
|
1693
1678
|
},
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1679
|
+
large: {
|
|
1680
|
+
paddingLeft: 6,
|
|
1681
|
+
paddingRight: 8,
|
|
1682
|
+
height: 32
|
|
1698
1683
|
}
|
|
1699
1684
|
},
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1685
|
+
withoutIcon: {
|
|
1686
|
+
small: {
|
|
1687
|
+
paddingLeft: 8,
|
|
1688
|
+
paddingRight: 8,
|
|
1689
|
+
height: 20
|
|
1705
1690
|
},
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1691
|
+
medium: {
|
|
1692
|
+
paddingLeft: 8,
|
|
1693
|
+
paddingRight: 8,
|
|
1694
|
+
height: 22
|
|
1695
|
+
},
|
|
1696
|
+
large: {
|
|
1697
|
+
paddingLeft: 8,
|
|
1698
|
+
paddingRight: 8,
|
|
1699
|
+
height: 28
|
|
1710
1700
|
}
|
|
1701
|
+
},
|
|
1702
|
+
fill: {
|
|
1703
|
+
borderWidth: 0
|
|
1704
|
+
},
|
|
1705
|
+
outline: {
|
|
1706
|
+
borderWidth: 1
|
|
1711
1707
|
}
|
|
1712
1708
|
};
|
|
1713
1709
|
|
|
@@ -5336,6 +5332,232 @@ const DatePicker = /*#__PURE__*/React.forwardRef(({
|
|
|
5336
5332
|
});
|
|
5337
5333
|
});
|
|
5338
5334
|
|
|
5335
|
+
function DocumentPicker({
|
|
5336
|
+
onDocumentUpload,
|
|
5337
|
+
children,
|
|
5338
|
+
disabled,
|
|
5339
|
+
documentPickerOptions
|
|
5340
|
+
}) {
|
|
5341
|
+
const childElement = React.Children.only(children);
|
|
5342
|
+
return /*#__PURE__*/React.cloneElement(childElement, {
|
|
5343
|
+
// ensure that the press event is not prevented by Button component
|
|
5344
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
5345
|
+
onPress: async () => {
|
|
5346
|
+
if (disabled) return;
|
|
5347
|
+
childElement.props.onPress?.();
|
|
5348
|
+
const result = await expoDocumentPicker.getDocumentAsync({
|
|
5349
|
+
...documentPickerOptions,
|
|
5350
|
+
multiple: false
|
|
5351
|
+
});
|
|
5352
|
+
if (!result.canceled && result.assets[0].file) {
|
|
5353
|
+
onDocumentUpload(result.assets[0].file);
|
|
5354
|
+
}
|
|
5355
|
+
},
|
|
5356
|
+
disabled
|
|
5357
|
+
});
|
|
5358
|
+
}
|
|
5359
|
+
|
|
5360
|
+
function ImagePicker({
|
|
5361
|
+
onImageSelected,
|
|
5362
|
+
children,
|
|
5363
|
+
disabled,
|
|
5364
|
+
imagePickerOptions
|
|
5365
|
+
}) {
|
|
5366
|
+
const childElement = React.Children.only(children);
|
|
5367
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
5368
|
+
children: /*#__PURE__*/React.cloneElement(childElement, {
|
|
5369
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
5370
|
+
onPress: async () => {
|
|
5371
|
+
if (disabled) return;
|
|
5372
|
+
childElement.props.onPress?.();
|
|
5373
|
+
|
|
5374
|
+
// No permissions request is necessary for launching the image library
|
|
5375
|
+
const result = await expoImagePicker.launchImageLibraryAsync({
|
|
5376
|
+
...imagePickerOptions,
|
|
5377
|
+
allowsMultipleSelection: false
|
|
5378
|
+
});
|
|
5379
|
+
if (!result.canceled) {
|
|
5380
|
+
onImageSelected(result.assets[0]);
|
|
5381
|
+
}
|
|
5382
|
+
},
|
|
5383
|
+
disabled
|
|
5384
|
+
})
|
|
5385
|
+
});
|
|
5386
|
+
}
|
|
5387
|
+
|
|
5388
|
+
function ListItemContent({
|
|
5389
|
+
children,
|
|
5390
|
+
...rest
|
|
5391
|
+
}) {
|
|
5392
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
5393
|
+
alignSelf: "center",
|
|
5394
|
+
flexBasis: "0%",
|
|
5395
|
+
flexGrow: 1,
|
|
5396
|
+
flexShrink: 0,
|
|
5397
|
+
...rest,
|
|
5398
|
+
children: children
|
|
5399
|
+
});
|
|
5400
|
+
}
|
|
5401
|
+
|
|
5402
|
+
// Handles the vertical alignment of the side elements of the list item
|
|
5403
|
+
function ListItemSideContainer({
|
|
5404
|
+
children,
|
|
5405
|
+
side = 'left',
|
|
5406
|
+
...rest
|
|
5407
|
+
}) {
|
|
5408
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
5409
|
+
flexDirection: "row",
|
|
5410
|
+
marginLeft: side === 'right' ? 'kitt.2' : undefined,
|
|
5411
|
+
marginRight: side === 'left' ? 'kitt.2' : undefined,
|
|
5412
|
+
...rest,
|
|
5413
|
+
children: children
|
|
5414
|
+
});
|
|
5415
|
+
}
|
|
5416
|
+
function ListItemSideContent({
|
|
5417
|
+
children,
|
|
5418
|
+
align = 'auto',
|
|
5419
|
+
...rest
|
|
5420
|
+
}) {
|
|
5421
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
5422
|
+
alignSelf: align,
|
|
5423
|
+
...rest,
|
|
5424
|
+
children: children
|
|
5425
|
+
});
|
|
5426
|
+
}
|
|
5427
|
+
|
|
5428
|
+
function ListItem({
|
|
5429
|
+
children,
|
|
5430
|
+
withPadding,
|
|
5431
|
+
borders,
|
|
5432
|
+
left,
|
|
5433
|
+
right,
|
|
5434
|
+
onPress,
|
|
5435
|
+
...rest
|
|
5436
|
+
}) {
|
|
5437
|
+
const Wrapper = onPress ? reactNative.Pressable : React.Fragment;
|
|
5438
|
+
const wrapperProps = onPress ? {
|
|
5439
|
+
accessibilityRole: 'button',
|
|
5440
|
+
onPress,
|
|
5441
|
+
...rest
|
|
5442
|
+
} : undefined;
|
|
5443
|
+
const containerProps = onPress ? undefined : rest;
|
|
5444
|
+
return /*#__PURE__*/jsxRuntime.jsx(Wrapper, {
|
|
5445
|
+
...wrapperProps,
|
|
5446
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
5447
|
+
flexDirection: "row",
|
|
5448
|
+
paddingX: withPadding ? 'kitt.listItem.horizontalPadding' : undefined,
|
|
5449
|
+
paddingY: withPadding ? 'kitt.listItem.verticalPadding' : undefined,
|
|
5450
|
+
borderColor: "kitt.listItem.borderColor",
|
|
5451
|
+
backgroundColor: "kitt.uiBackgroundLight",
|
|
5452
|
+
borderTopWidth: borders === 'top' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
5453
|
+
borderBottomWidth: borders === 'bottom' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
5454
|
+
...containerProps,
|
|
5455
|
+
children: [left ? /*#__PURE__*/jsxRuntime.jsx(ListItemSideContainer, {
|
|
5456
|
+
side: "left",
|
|
5457
|
+
children: left
|
|
5458
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsx(ListItemContent, {
|
|
5459
|
+
children: children
|
|
5460
|
+
}), right ? /*#__PURE__*/jsxRuntime.jsx(ListItemSideContainer, {
|
|
5461
|
+
side: "right",
|
|
5462
|
+
children: right
|
|
5463
|
+
}) : null]
|
|
5464
|
+
})
|
|
5465
|
+
});
|
|
5466
|
+
}
|
|
5467
|
+
ListItem.Content = ListItemContent;
|
|
5468
|
+
ListItem.SideContent = ListItemSideContent;
|
|
5469
|
+
ListItem.SideContainer = ListItemSideContainer;
|
|
5470
|
+
|
|
5471
|
+
function BottomSheetActionsItem({
|
|
5472
|
+
title,
|
|
5473
|
+
...props
|
|
5474
|
+
}) {
|
|
5475
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.Pressable, {
|
|
5476
|
+
...props,
|
|
5477
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ListItem, {
|
|
5478
|
+
withPadding: true,
|
|
5479
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
5480
|
+
variant: "bold",
|
|
5481
|
+
base: "body",
|
|
5482
|
+
children: title
|
|
5483
|
+
})
|
|
5484
|
+
})
|
|
5485
|
+
});
|
|
5486
|
+
}
|
|
5487
|
+
|
|
5488
|
+
function BottomSheetActions({
|
|
5489
|
+
onBottomSheetActionsChange,
|
|
5490
|
+
imagePickerOptions,
|
|
5491
|
+
documentPickerOptions,
|
|
5492
|
+
disabled
|
|
5493
|
+
}) {
|
|
5494
|
+
const isPlatformIOS = reactNative.Platform.OS === 'ios';
|
|
5495
|
+
return /*#__PURE__*/jsxRuntime.jsxs(VStack, {
|
|
5496
|
+
marginBottom: "kitt.8",
|
|
5497
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ImagePicker, {
|
|
5498
|
+
imagePickerOptions: imagePickerOptions,
|
|
5499
|
+
disabled: disabled,
|
|
5500
|
+
onImageSelected: onBottomSheetActionsChange,
|
|
5501
|
+
children: /*#__PURE__*/jsxRuntime.jsx(BottomSheetActionsItem, {
|
|
5502
|
+
title: /*#__PURE__*/jsxRuntime.jsx(reactIntl.FormattedMessage, {
|
|
5503
|
+
id: "account.BottomSheetActions.openLibrary",
|
|
5504
|
+
values: {
|
|
5505
|
+
isPlatformIOS
|
|
5506
|
+
}
|
|
5507
|
+
})
|
|
5508
|
+
})
|
|
5509
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DocumentPicker, {
|
|
5510
|
+
disabled: disabled,
|
|
5511
|
+
documentPickerOptions: documentPickerOptions,
|
|
5512
|
+
onDocumentUpload: onBottomSheetActionsChange,
|
|
5513
|
+
children: /*#__PURE__*/jsxRuntime.jsx(BottomSheetActionsItem, {
|
|
5514
|
+
title: /*#__PURE__*/jsxRuntime.jsx(reactIntl.FormattedMessage, {
|
|
5515
|
+
id: "account.BottomSheetActions.openFileExplorer",
|
|
5516
|
+
values: {
|
|
5517
|
+
isPlatformIOS
|
|
5518
|
+
}
|
|
5519
|
+
})
|
|
5520
|
+
})
|
|
5521
|
+
})]
|
|
5522
|
+
});
|
|
5523
|
+
}
|
|
5524
|
+
|
|
5525
|
+
function FilePicker({
|
|
5526
|
+
onFileSelected,
|
|
5527
|
+
children,
|
|
5528
|
+
disabled,
|
|
5529
|
+
imagePickerOptions,
|
|
5530
|
+
documentPickerOptions
|
|
5531
|
+
}) {
|
|
5532
|
+
const childElement = React.Children.only(children);
|
|
5533
|
+
const {
|
|
5534
|
+
bottomSheetRef,
|
|
5535
|
+
BottomSheet
|
|
5536
|
+
} = useStaticBottomSheet(BottomSheetActions);
|
|
5537
|
+
const {
|
|
5538
|
+
dismissAll
|
|
5539
|
+
} = bottomSheet$1.useBottomSheetModal();
|
|
5540
|
+
const handleBottomSheetActionsChange = file => {
|
|
5541
|
+
dismissAll();
|
|
5542
|
+
onFileSelected(file);
|
|
5543
|
+
};
|
|
5544
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5545
|
+
children: [/*#__PURE__*/React.cloneElement(childElement, {
|
|
5546
|
+
// ensure that the press event is not prevented by Button component
|
|
5547
|
+
onPress: () => {
|
|
5548
|
+
if (disabled) return;
|
|
5549
|
+
childElement.props.onPress?.();
|
|
5550
|
+
bottomSheetRef.current?.present({
|
|
5551
|
+
onBottomSheetActionsChange: handleBottomSheetActionsChange,
|
|
5552
|
+
imagePickerOptions,
|
|
5553
|
+
documentPickerOptions
|
|
5554
|
+
});
|
|
5555
|
+
},
|
|
5556
|
+
disabled
|
|
5557
|
+
}), /*#__PURE__*/jsxRuntime.jsx(BottomSheet, {})]
|
|
5558
|
+
});
|
|
5559
|
+
}
|
|
5560
|
+
|
|
5339
5561
|
const GoogleMapsApiKeyContext = /*#__PURE__*/React.createContext(undefined);
|
|
5340
5562
|
function GoogleMapsApiKeyProvider({
|
|
5341
5563
|
children,
|
|
@@ -7128,89 +7350,6 @@ function useKittMapConfig() {
|
|
|
7128
7350
|
return context;
|
|
7129
7351
|
}
|
|
7130
7352
|
|
|
7131
|
-
function ListItemContent({
|
|
7132
|
-
children,
|
|
7133
|
-
...rest
|
|
7134
|
-
}) {
|
|
7135
|
-
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7136
|
-
alignSelf: "center",
|
|
7137
|
-
flexBasis: "0%",
|
|
7138
|
-
flexGrow: 1,
|
|
7139
|
-
flexShrink: 0,
|
|
7140
|
-
...rest,
|
|
7141
|
-
children: children
|
|
7142
|
-
});
|
|
7143
|
-
}
|
|
7144
|
-
|
|
7145
|
-
// Handles the vertical alignment of the side elements of the list item
|
|
7146
|
-
function ListItemSideContainer({
|
|
7147
|
-
children,
|
|
7148
|
-
side = 'left',
|
|
7149
|
-
...rest
|
|
7150
|
-
}) {
|
|
7151
|
-
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7152
|
-
flexDirection: "row",
|
|
7153
|
-
marginLeft: side === 'right' ? 'kitt.2' : undefined,
|
|
7154
|
-
marginRight: side === 'left' ? 'kitt.2' : undefined,
|
|
7155
|
-
...rest,
|
|
7156
|
-
children: children
|
|
7157
|
-
});
|
|
7158
|
-
}
|
|
7159
|
-
function ListItemSideContent({
|
|
7160
|
-
children,
|
|
7161
|
-
align = 'auto',
|
|
7162
|
-
...rest
|
|
7163
|
-
}) {
|
|
7164
|
-
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7165
|
-
alignSelf: align,
|
|
7166
|
-
...rest,
|
|
7167
|
-
children: children
|
|
7168
|
-
});
|
|
7169
|
-
}
|
|
7170
|
-
|
|
7171
|
-
function ListItem({
|
|
7172
|
-
children,
|
|
7173
|
-
withPadding,
|
|
7174
|
-
borders,
|
|
7175
|
-
left,
|
|
7176
|
-
right,
|
|
7177
|
-
onPress,
|
|
7178
|
-
...rest
|
|
7179
|
-
}) {
|
|
7180
|
-
const Wrapper = onPress ? reactNative.Pressable : React.Fragment;
|
|
7181
|
-
const wrapperProps = onPress ? {
|
|
7182
|
-
accessibilityRole: 'button',
|
|
7183
|
-
onPress,
|
|
7184
|
-
...rest
|
|
7185
|
-
} : undefined;
|
|
7186
|
-
const containerProps = onPress ? undefined : rest;
|
|
7187
|
-
return /*#__PURE__*/jsxRuntime.jsx(Wrapper, {
|
|
7188
|
-
...wrapperProps,
|
|
7189
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
7190
|
-
flexDirection: "row",
|
|
7191
|
-
paddingX: withPadding ? 'kitt.listItem.horizontalPadding' : undefined,
|
|
7192
|
-
paddingY: withPadding ? 'kitt.listItem.verticalPadding' : undefined,
|
|
7193
|
-
borderColor: "kitt.listItem.borderColor",
|
|
7194
|
-
backgroundColor: "kitt.uiBackgroundLight",
|
|
7195
|
-
borderTopWidth: borders === 'top' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
7196
|
-
borderBottomWidth: borders === 'bottom' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
7197
|
-
...containerProps,
|
|
7198
|
-
children: [left ? /*#__PURE__*/jsxRuntime.jsx(ListItemSideContainer, {
|
|
7199
|
-
side: "left",
|
|
7200
|
-
children: left
|
|
7201
|
-
}) : null, /*#__PURE__*/jsxRuntime.jsx(ListItemContent, {
|
|
7202
|
-
children: children
|
|
7203
|
-
}), right ? /*#__PURE__*/jsxRuntime.jsx(ListItemSideContainer, {
|
|
7204
|
-
side: "right",
|
|
7205
|
-
children: right
|
|
7206
|
-
}) : null]
|
|
7207
|
-
})
|
|
7208
|
-
});
|
|
7209
|
-
}
|
|
7210
|
-
ListItem.Content = ListItemContent;
|
|
7211
|
-
ListItem.SideContent = ListItemSideContent;
|
|
7212
|
-
ListItem.SideContainer = ListItemSideContainer;
|
|
7213
|
-
|
|
7214
7353
|
const SvgMarkerLargeinline = props => /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
7215
7354
|
fill: "currentColor",
|
|
7216
7355
|
viewBox: "0 0 54 56",
|
|
@@ -7730,48 +7869,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7730
7869
|
}
|
|
7731
7870
|
}
|
|
7732
7871
|
},
|
|
7733
|
-
tag: {
|
|
7734
|
-
primary: {
|
|
7735
|
-
fill: {
|
|
7736
|
-
backgroundColor: theme.tag.primary.fill.backgroundColor,
|
|
7737
|
-
borderColor: theme.tag.primary.fill.borderColor
|
|
7738
|
-
},
|
|
7739
|
-
outline: {
|
|
7740
|
-
backgroundColor: theme.tag.primary.outline.backgroundColor,
|
|
7741
|
-
borderColor: theme.tag.primary.outline.borderColor
|
|
7742
|
-
}
|
|
7743
|
-
},
|
|
7744
|
-
default: {
|
|
7745
|
-
fill: {
|
|
7746
|
-
backgroundColor: theme.tag.default.fill.backgroundColor,
|
|
7747
|
-
borderColor: theme.tag.default.fill.borderColor
|
|
7748
|
-
},
|
|
7749
|
-
outline: {
|
|
7750
|
-
backgroundColor: theme.tag.default.outline.backgroundColor,
|
|
7751
|
-
borderColor: theme.tag.default.outline.borderColor
|
|
7752
|
-
}
|
|
7753
|
-
},
|
|
7754
|
-
danger: {
|
|
7755
|
-
fill: {
|
|
7756
|
-
backgroundColor: theme.tag.danger.fill.backgroundColor,
|
|
7757
|
-
borderColor: theme.tag.danger.fill.borderColor
|
|
7758
|
-
},
|
|
7759
|
-
outline: {
|
|
7760
|
-
backgroundColor: theme.tag.danger.outline.backgroundColor,
|
|
7761
|
-
borderColor: theme.tag.danger.outline.borderColor
|
|
7762
|
-
}
|
|
7763
|
-
},
|
|
7764
|
-
warn: {
|
|
7765
|
-
fill: {
|
|
7766
|
-
backgroundColor: theme.tag.warn.fill.backgroundColor,
|
|
7767
|
-
borderColor: theme.tag.warn.fill.borderColor
|
|
7768
|
-
},
|
|
7769
|
-
outline: {
|
|
7770
|
-
backgroundColor: theme.tag.warn.outline.backgroundColor,
|
|
7771
|
-
borderColor: theme.tag.warn.outline.borderColor
|
|
7772
|
-
}
|
|
7773
|
-
}
|
|
7774
|
-
},
|
|
7775
7872
|
tooltip: {
|
|
7776
7873
|
backgroundColor: theme.tooltip.backgroundColor
|
|
7777
7874
|
},
|
|
@@ -8260,37 +8357,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8260
8357
|
borderWidth: theme.listItem.borderWidth
|
|
8261
8358
|
},
|
|
8262
8359
|
tag: {
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
borderWidth: theme.tag.primary.fill.borderWidth
|
|
8266
|
-
},
|
|
8267
|
-
outline: {
|
|
8268
|
-
borderWidth: theme.tag.primary.outline.borderWidth
|
|
8269
|
-
}
|
|
8360
|
+
fill: {
|
|
8361
|
+
borderWidth: theme.tag.fill.borderWidth
|
|
8270
8362
|
},
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
borderWidth: theme.tag.default.fill.borderWidth
|
|
8274
|
-
},
|
|
8275
|
-
outline: {
|
|
8276
|
-
borderWidth: theme.tag.default.outline.borderWidth
|
|
8277
|
-
}
|
|
8278
|
-
},
|
|
8279
|
-
danger: {
|
|
8280
|
-
fill: {
|
|
8281
|
-
borderWidth: theme.tag.danger.fill.borderWidth
|
|
8282
|
-
},
|
|
8283
|
-
outline: {
|
|
8284
|
-
borderWidth: theme.tag.danger.outline.borderWidth
|
|
8285
|
-
}
|
|
8286
|
-
},
|
|
8287
|
-
warn: {
|
|
8288
|
-
fill: {
|
|
8289
|
-
borderWidth: theme.tag.warn.fill.borderWidth
|
|
8290
|
-
},
|
|
8291
|
-
outline: {
|
|
8292
|
-
borderWidth: theme.tag.warn.outline.borderWidth
|
|
8293
|
-
}
|
|
8363
|
+
outline: {
|
|
8364
|
+
borderWidth: theme.tag.outline.borderWidth
|
|
8294
8365
|
}
|
|
8295
8366
|
}
|
|
8296
8367
|
},
|
|
@@ -8388,6 +8459,39 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8388
8459
|
pageLoader: {
|
|
8389
8460
|
size: theme.pageLoader.size
|
|
8390
8461
|
},
|
|
8462
|
+
tag: {
|
|
8463
|
+
small: {
|
|
8464
|
+
iconSize: theme.tag.icon.small
|
|
8465
|
+
},
|
|
8466
|
+
medium: {
|
|
8467
|
+
iconSize: theme.tag.icon.medium
|
|
8468
|
+
},
|
|
8469
|
+
large: {
|
|
8470
|
+
iconSize: theme.tag.icon.large
|
|
8471
|
+
},
|
|
8472
|
+
withIcon: {
|
|
8473
|
+
small: {
|
|
8474
|
+
height: theme.tag.withIcon.small.height
|
|
8475
|
+
},
|
|
8476
|
+
medium: {
|
|
8477
|
+
height: theme.tag.withIcon.medium.height
|
|
8478
|
+
},
|
|
8479
|
+
large: {
|
|
8480
|
+
height: theme.tag.withIcon.large.height
|
|
8481
|
+
}
|
|
8482
|
+
},
|
|
8483
|
+
withoutIcon: {
|
|
8484
|
+
small: {
|
|
8485
|
+
height: theme.tag.withoutIcon.small.height
|
|
8486
|
+
},
|
|
8487
|
+
medium: {
|
|
8488
|
+
height: theme.tag.withoutIcon.medium.height
|
|
8489
|
+
},
|
|
8490
|
+
large: {
|
|
8491
|
+
height: theme.tag.withoutIcon.large.height
|
|
8492
|
+
}
|
|
8493
|
+
}
|
|
8494
|
+
},
|
|
8391
8495
|
tooltip: {
|
|
8392
8496
|
maxWidth: theme.tooltip.maxWidth,
|
|
8393
8497
|
arrow: {
|
|
@@ -8480,8 +8584,34 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8480
8584
|
horizontalPadding: theme.listItem.horizontalPadding
|
|
8481
8585
|
},
|
|
8482
8586
|
tag: {
|
|
8483
|
-
|
|
8484
|
-
|
|
8587
|
+
withoutIcon: {
|
|
8588
|
+
small: {
|
|
8589
|
+
paddingLeft: theme.tag.withoutIcon.small.paddingLeft,
|
|
8590
|
+
paddingRight: theme.tag.withoutIcon.small.paddingRight
|
|
8591
|
+
},
|
|
8592
|
+
medium: {
|
|
8593
|
+
paddingLeft: theme.tag.withoutIcon.medium.paddingLeft,
|
|
8594
|
+
paddingRight: theme.tag.withoutIcon.medium.paddingRight
|
|
8595
|
+
},
|
|
8596
|
+
large: {
|
|
8597
|
+
paddingLeft: theme.tag.withoutIcon.large.paddingLeft,
|
|
8598
|
+
paddingRight: theme.tag.withoutIcon.large.paddingRight
|
|
8599
|
+
}
|
|
8600
|
+
},
|
|
8601
|
+
withIcon: {
|
|
8602
|
+
small: {
|
|
8603
|
+
paddingLeft: theme.tag.withIcon.small.paddingLeft,
|
|
8604
|
+
paddingRight: theme.tag.withIcon.small.paddingRight
|
|
8605
|
+
},
|
|
8606
|
+
medium: {
|
|
8607
|
+
paddingLeft: theme.tag.withIcon.medium.paddingLeft,
|
|
8608
|
+
paddingRight: theme.tag.withIcon.medium.paddingRight
|
|
8609
|
+
},
|
|
8610
|
+
large: {
|
|
8611
|
+
paddingLeft: theme.tag.withIcon.large.paddingLeft,
|
|
8612
|
+
paddingRight: theme.tag.withIcon.large.paddingRight
|
|
8613
|
+
}
|
|
8614
|
+
}
|
|
8485
8615
|
},
|
|
8486
8616
|
tooltip: {
|
|
8487
8617
|
horizontalPadding: theme.tooltip.horizontalPadding,
|
|
@@ -10462,48 +10592,68 @@ const StoryGrid = {
|
|
|
10462
10592
|
Col: StoryGridCol
|
|
10463
10593
|
};
|
|
10464
10594
|
|
|
10465
|
-
|
|
10595
|
+
function useKittTheme() {
|
|
10596
|
+
return React.useMemo(() => {
|
|
10597
|
+
return {
|
|
10598
|
+
kitt: theme
|
|
10599
|
+
};
|
|
10600
|
+
}, []);
|
|
10601
|
+
}
|
|
10602
|
+
|
|
10603
|
+
const getTypography = size => {
|
|
10604
|
+
switch (size) {
|
|
10605
|
+
case 'small':
|
|
10606
|
+
return 'body-xs';
|
|
10607
|
+
case 'medium':
|
|
10608
|
+
return 'body-s';
|
|
10609
|
+
case 'large':
|
|
10610
|
+
default:
|
|
10611
|
+
return 'body-m';
|
|
10612
|
+
}
|
|
10613
|
+
};
|
|
10614
|
+
const typeToColor = (color, type) => {
|
|
10615
|
+
if (color) return color;
|
|
10466
10616
|
switch (type) {
|
|
10467
|
-
case 'danger':
|
|
10468
|
-
{
|
|
10469
|
-
return variant === 'outline' ? 'danger' : 'black';
|
|
10470
|
-
}
|
|
10471
|
-
case 'warn':
|
|
10472
|
-
{
|
|
10473
|
-
return variant === 'outline' ? 'warning' : 'black';
|
|
10474
|
-
}
|
|
10475
10617
|
case 'primary':
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10618
|
+
return 'violine';
|
|
10619
|
+
case 'warn':
|
|
10620
|
+
return 'sun';
|
|
10621
|
+
case 'danger':
|
|
10622
|
+
return 'coral';
|
|
10479
10623
|
case 'default':
|
|
10480
|
-
{
|
|
10481
|
-
return 'black';
|
|
10482
|
-
}
|
|
10483
10624
|
default:
|
|
10484
|
-
|
|
10485
|
-
return 'black';
|
|
10486
|
-
}
|
|
10625
|
+
return 'eggshell';
|
|
10487
10626
|
}
|
|
10488
10627
|
};
|
|
10489
10628
|
function Tag({
|
|
10490
10629
|
label,
|
|
10491
|
-
|
|
10630
|
+
icon,
|
|
10631
|
+
color,
|
|
10632
|
+
type,
|
|
10633
|
+
size = 'medium',
|
|
10492
10634
|
variant = 'fill'
|
|
10493
10635
|
}) {
|
|
10494
|
-
|
|
10636
|
+
const kittTheme = useKittTheme();
|
|
10637
|
+
const tagColor = typeToColor(color, type);
|
|
10638
|
+
return /*#__PURE__*/jsxRuntime.jsxs(HStack, {
|
|
10495
10639
|
alignSelf: "flex-start",
|
|
10496
10640
|
borderRadius: "kitt.tag.borderRadius",
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10641
|
+
height: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.height`,
|
|
10642
|
+
paddingLeft: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingLeft`,
|
|
10643
|
+
paddingRight: `kitt.tag.${icon ? 'withIcon' : 'withoutIcon'}.${size}.paddingRight`,
|
|
10644
|
+
backgroundColor: variant === 'fill' ? kittTheme.kitt.palettes.lateOcean[`${tagColor}.4`] : 'kitt.transparent',
|
|
10645
|
+
borderColor: kittTheme.kitt.palettes.lateOcean[`${tagColor}.6`],
|
|
10646
|
+
borderWidth: `kitt.tag.${variant}.borderWidth`,
|
|
10647
|
+
space: "kitt.1",
|
|
10648
|
+
alignItems: "center",
|
|
10649
|
+
children: [icon ? /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
10650
|
+
icon: icon,
|
|
10651
|
+
size: `kitt.tag.${size}.iconSize`
|
|
10652
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
10653
|
+
base: getTypography(size),
|
|
10654
|
+
color: "black",
|
|
10505
10655
|
children: label
|
|
10506
|
-
})
|
|
10656
|
+
})]
|
|
10507
10657
|
});
|
|
10508
10658
|
}
|
|
10509
10659
|
|
|
@@ -11071,14 +11221,6 @@ function TypographyLink({
|
|
|
11071
11221
|
});
|
|
11072
11222
|
}
|
|
11073
11223
|
|
|
11074
|
-
function useKittTheme() {
|
|
11075
|
-
return React.useMemo(() => {
|
|
11076
|
-
return {
|
|
11077
|
-
kitt: theme
|
|
11078
|
-
};
|
|
11079
|
-
}, []);
|
|
11080
|
-
}
|
|
11081
|
-
|
|
11082
11224
|
function KittThemeProvider({
|
|
11083
11225
|
isSSR,
|
|
11084
11226
|
children,
|
|
@@ -11324,9 +11466,11 @@ exports.ChoicesElements = ChoicesElements;
|
|
|
11324
11466
|
exports.CloseIconButton = CloseIconButton;
|
|
11325
11467
|
exports.DatePicker = DatePicker;
|
|
11326
11468
|
exports.DialogModal = DialogModal;
|
|
11469
|
+
exports.DocumentPicker = DocumentPicker;
|
|
11327
11470
|
exports.Emoji = Emoji;
|
|
11328
11471
|
exports.ExternalAppLink = ExternalAppLink;
|
|
11329
11472
|
exports.ExternalLink = ExternalLink;
|
|
11473
|
+
exports.FilePicker = FilePicker;
|
|
11330
11474
|
exports.FlatList = FlatList;
|
|
11331
11475
|
exports.Flex = Flex;
|
|
11332
11476
|
exports.FullscreenModal = FullscreenModal;
|
|
@@ -11337,6 +11481,7 @@ exports.Highlight = Highlight;
|
|
|
11337
11481
|
exports.Icon = Icon;
|
|
11338
11482
|
exports.IconButton = IconButton;
|
|
11339
11483
|
exports.Image = Image;
|
|
11484
|
+
exports.ImagePicker = ImagePicker;
|
|
11340
11485
|
exports.InputAddress = InputAddress;
|
|
11341
11486
|
exports.InputEmail = InputEmail;
|
|
11342
11487
|
exports.InputFeedback = InputFeedback;
|