@ornikar/kitt-universal 7.0.0 → 7.0.3

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.
@@ -328,7 +328,7 @@ function AvatarContent({
328
328
 
329
329
  if (firstname && lastname) {
330
330
  return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
331
- base: sizeVariant === 'large' ? 'body-large' : 'body',
331
+ base: sizeVariant === 'large' ? 'body-large' : 'body-small',
332
332
  variant: sizeVariant === 'large' ? 'bold' : 'regular',
333
333
  color: isLight ? 'black' : 'white',
334
334
  children: getInitials(firstname, lastname)
@@ -1775,13 +1775,11 @@ const OverlayPressable = /*#__PURE__*/styled__default(reactNative.Pressable).wit
1775
1775
  backgroundColor: theme.kitt.colors.overlay.dark
1776
1776
  }));
1777
1777
  function Overlay({
1778
- onPress,
1779
- children
1778
+ onPress
1780
1779
  }) {
1781
1780
  return /*#__PURE__*/jsxRuntime.jsx(OverlayPressable, {
1782
1781
  accessibilityRole: "none",
1783
- onPress: onPress,
1784
- children: children
1782
+ onPress: onPress
1785
1783
  });
1786
1784
  }
1787
1785
 
@@ -3838,6 +3836,8 @@ function ModalDateTimePicker({
3838
3836
  }
3839
3837
 
3840
3838
  const timePickerPlaceholder = '--:--';
3839
+ const formatNumberToTimeString = time => `${String(time).padStart(2, '0')}`;
3840
+ const formatDateToTimeString = date => `${formatNumberToTimeString(date.getHours())}:${formatNumberToTimeString(date.getMinutes())}`;
3841
3841
  const useTimePicker = (value, onChange, onBlur, disabled, defaultValue) => {
3842
3842
  const [isTimePickerModalVisible, setIsTimePickerModalVisible] = react.useState(false);
3843
3843
  const todayAtNoon = react.useMemo(() => {
@@ -3846,10 +3846,7 @@ const useTimePicker = (value, onChange, onBlur, disabled, defaultValue) => {
3846
3846
  }, []);
3847
3847
  const defaultDate = defaultValue || todayAtNoon;
3848
3848
  const dateTimePickerValue = value || defaultDate;
3849
- const displayedValue = value === null ? timePickerPlaceholder : Intl.DateTimeFormat('fr-FR', {
3850
- minute: 'numeric',
3851
- hour: 'numeric'
3852
- }).format(dateTimePickerValue);
3849
+ const displayedValue = value === null ? timePickerPlaceholder : formatDateToTimeString(dateTimePickerValue);
3853
3850
  const timePickerState = isTimePickerModalVisible ? 'focus' : 'default';
3854
3851
  return {
3855
3852
  dateTimePickerValue,