@goodhood-web/ui 3.0.0-development.56 → 3.0.0-development.57

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.
@@ -3,6 +3,9 @@ import { AriaRole, ForwardedRef, MouseEvent, ReactElement, ReactNode } from 'rea
3
3
  import { IconProps } from '../../../Base/Icon/Icon.types';
4
4
  interface CommonProps {
5
5
  ariaDescribedBy?: string;
6
+ ariaDisabled?: boolean;
7
+ ariaExpanded?: boolean;
8
+ ariaHaspopup?: boolean;
6
9
  ariaLabel?: string;
7
10
  ariaLabelledBy?: string;
8
11
  className?: string;
@@ -1,10 +1,10 @@
1
1
  import { Icon16, Icon24, Icon32 } from '../../../Base/Icon/Icon.types';
2
2
  import { ButtonProps } from '../Button/Button.types';
3
- type BaseIconButtonProps = Omit<ButtonProps, 'children' | 'ref' | 'className'> & ({
4
- ariaLabel: string;
5
- } | {
6
- ariaLabelledBy: string;
7
- }) & {
3
+ type BaseIconButtonProps = Omit<ButtonProps, 'children' | 'ref' | 'className'> & {
4
+ ariaExpanded?: boolean;
5
+ ariaHaspopup?: boolean;
6
+ ariaLabel?: string;
7
+ ariaLabelledBy?: string;
8
8
  className?: string;
9
9
  iconClassName?: string;
10
10
  loading?: boolean;
@@ -0,0 +1,3 @@
1
+ import { default as DateInputProps } from './DateInput.types';
2
+ declare const DateInput: ({ dateFormat, label, minDate, onChange, size, withPortal, }: DateInputProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default DateInput;
@@ -0,0 +1,9 @@
1
+ import { TextInputProps } from '../../TextInput/TextInput.types';
2
+ export default interface DateInputProps {
3
+ dateFormat?: 'dd. MMMM' | 'dd. MMMM YYYY' | 'dd.MM.' | 'dd.MM.YY' | 'dd.MM.YYYY';
4
+ label: string;
5
+ minDate?: Date;
6
+ onChange?: (date: Date) => void;
7
+ size?: TextInputProps['size'];
8
+ withPortal?: boolean;
9
+ }
@@ -0,0 +1,3 @@
1
+ import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
2
+ declare const CustomHeader: ({ decreaseMonth, increaseMonth, monthDate, prevMonthButtonDisabled, }: ReactDatePickerCustomHeaderProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default CustomHeader;
@@ -0,0 +1 @@
1
+ export declare const addKeyboardNavigation: (event: React.KeyboardEvent<HTMLElement>) => void;
@@ -0,0 +1,3 @@
1
+ import { DateTimeInputProps } from './DateTimeInput.types';
2
+ declare const DateTimeInput: ({ type, ...props }: DateTimeInputProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default DateTimeInput;
@@ -0,0 +1,7 @@
1
+ import { default as DateInputProps } from './DateInput/DateInput.types';
2
+ import { default as TimeInputProps } from './TimeInput/TimeInput.types';
3
+ type CommonProps = {
4
+ type: 'time' | 'date';
5
+ };
6
+ export type DateTimeInputProps = (CommonProps & DateInputProps) | (CommonProps & TimeInputProps);
7
+ export {};
@@ -0,0 +1,3 @@
1
+ import { default as TimeInputProps } from './TimeInput.types';
2
+ declare const TimeInput: ({ interval, label, minDate, onChange, size, withPortal, }: TimeInputProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default TimeInput;
@@ -0,0 +1,10 @@
1
+ import { NearestMinutes } from 'date-fns';
2
+ import { TextInputProps } from '../../TextInput/TextInput.types';
3
+ export default interface TimeInputProps {
4
+ interval?: Extract<NearestMinutes, 15 | 30>;
5
+ label: string;
6
+ minDate?: Date;
7
+ onChange?: (date: Date) => void;
8
+ size?: TextInputProps['size'];
9
+ withPortal?: boolean;
10
+ }
@@ -1,3 +1,3 @@
1
1
  import { TextInputProps } from './TextInput.types';
2
- declare const TextInput: ({ ariaDescribedby, charLimit, colorScheme, errorText, hintText, icon, id, inputFieldType, label, name, ref, showInputHints, size, textButton, ...props }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const TextInput: ({ ariaDescribedby, ariaExpanded, charLimit, colorScheme, errorText, hintText, icon, iconButton, id, inputFieldType, label, name, onClick, onKeyDown, readonly, ref, role, showInputHints, size, ...props }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default TextInput;
@@ -1,9 +1,10 @@
1
1
  import { UseInputParameters } from '@mui/base';
2
- import { ForwardedRef, HTMLInputTypeAttribute } from 'react';
2
+ import { ForwardedRef, HTMLInputTypeAttribute, KeyboardEventHandler } from 'react';
3
3
  import { IconProps } from '../../../Base/Icon/Icon.types';
4
4
  import { IconButtonIcon24Props } from '../../Buttons/IconButton/IconButton.types';
5
5
  export interface CommonTextInputProps extends UseInputParameters {
6
6
  ariaDescribedby?: string;
7
+ ariaExpanded?: boolean;
7
8
  charLimit?: number;
8
9
  colorScheme?: 'outline' | 'filled';
9
10
  errorText?: string;
@@ -11,12 +12,19 @@ export interface CommonTextInputProps extends UseInputParameters {
11
12
  id: string;
12
13
  label: string;
13
14
  name?: string;
15
+ onKeyDown?: KeyboardEventHandler;
16
+ readonly?: boolean;
14
17
  ref?: ForwardedRef<null>;
18
+ role?: 'combobox';
15
19
  showInputHints?: boolean;
16
20
  }
17
21
  export interface TextInputProps extends CommonTextInputProps {
18
22
  icon?: IconProps;
23
+ iconButton?: IconButtonIcon24Props & {
24
+ ariaExpanded?: boolean;
25
+ ariaHaspopup?: boolean;
26
+ ref?: ForwardedRef<null>;
27
+ };
19
28
  inputFieldType?: HTMLInputTypeAttribute;
20
29
  size: 'medium' | 'large' | 'small';
21
- textButton?: IconButtonIcon24Props;
22
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/ui",
3
- "version": "3.0.0-development.56",
3
+ "version": "3.0.0-development.57",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",