@pagamio/frontend-commons-lib 0.8.298 → 0.8.299

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.
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { InputProps } from '../../../types';
3
- declare const TimeInput: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const TimeInput: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
4
4
  export default TimeInput;
@@ -1,17 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { TimePicker } from '@mantine/dates';
2
+ import { TimeInput as MantineTimeInput } from '@mantine/dates';
3
3
  import React from 'react';
4
4
  const TimeInput = React.forwardRef(({ field, error, ...props }, ref) => {
5
5
  const { value, onChange, onBlur, name } = props;
6
- const handleChange = (newValue) => {
6
+ const handleChange = (event) => {
7
7
  if (onChange) {
8
- const syntheticEvent = {
9
- target: { value: newValue, name: name || field.name },
10
- currentTarget: { value: newValue, name: name || field.name },
11
- };
12
- onChange(syntheticEvent);
8
+ onChange(event);
13
9
  }
14
10
  };
15
- return (_jsx(TimePicker, { ref: ref, label: field.label, value: value ? String(value) : '', onChange: handleChange, onBlur: onBlur, name: name || field.name, error: error?.message, disabled: field.disabled, withDropdown: true, minutesStep: 5, clearable: true }));
11
+ return (_jsx(MantineTimeInput, { ref: ref, label: field.label, value: value ? String(value) : '', onChange: handleChange, onBlur: onBlur, name: name || field.name, error: error?.message, disabled: field.disabled }));
16
12
  });
17
13
  export default TimeInput;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pagamio/frontend-commons-lib",
3
3
  "description": "Pagamio library for Frontend reusable components like the form engine and table container",
4
- "version": "0.8.298",
4
+ "version": "0.8.299",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "provenance": false