@ornikar/kitt-universal 7.0.1 → 7.0.4

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.
@@ -237,8 +237,9 @@ function TypographyText(props) {
237
237
  }
238
238
 
239
239
  function TypographyParagraph(props) {
240
+ // role 'paragraph' does not exist in native, it's a web feature only.
240
241
  return /*#__PURE__*/jsxRuntime.jsx(Typography, {
241
- accessibilityRole: "paragraph",
242
+ accessibilityRole: reactNative.Platform.OS === 'web' ? 'paragraph' : null,
242
243
  ...props
243
244
  });
244
245
  }
@@ -328,7 +329,7 @@ function AvatarContent({
328
329
 
329
330
  if (firstname && lastname) {
330
331
  return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
331
- base: sizeVariant === 'large' ? 'body-large' : 'body',
332
+ base: sizeVariant === 'large' ? 'body-large' : 'body-small',
332
333
  variant: sizeVariant === 'large' ? 'bold' : 'regular',
333
334
  color: isLight ? 'black' : 'white',
334
335
  children: getInitials(firstname, lastname)
@@ -3836,6 +3837,8 @@ function ModalDateTimePicker({
3836
3837
  }
3837
3838
 
3838
3839
  const timePickerPlaceholder = '--:--';
3840
+ const formatNumberToTimeString = time => `${String(time).padStart(2, '0')}`;
3841
+ const formatDateToTimeString = date => `${formatNumberToTimeString(date.getHours())}:${formatNumberToTimeString(date.getMinutes())}`;
3839
3842
  const useTimePicker = (value, onChange, onBlur, disabled, defaultValue) => {
3840
3843
  const [isTimePickerModalVisible, setIsTimePickerModalVisible] = react.useState(false);
3841
3844
  const todayAtNoon = react.useMemo(() => {
@@ -3844,10 +3847,7 @@ const useTimePicker = (value, onChange, onBlur, disabled, defaultValue) => {
3844
3847
  }, []);
3845
3848
  const defaultDate = defaultValue || todayAtNoon;
3846
3849
  const dateTimePickerValue = value || defaultDate;
3847
- const displayedValue = value === null ? timePickerPlaceholder : Intl.DateTimeFormat('fr-FR', {
3848
- minute: 'numeric',
3849
- hour: 'numeric'
3850
- }).format(dateTimePickerValue);
3850
+ const displayedValue = value === null ? timePickerPlaceholder : formatDateToTimeString(dateTimePickerValue);
3851
3851
  const timePickerState = isTimePickerModalVisible ? 'focus' : 'default';
3852
3852
  return {
3853
3853
  dateTimePickerValue,