@delightui/components 0.1.0 → 0.1.1

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,10 @@
1
1
  import React from 'react';
2
- import type { InputProps } from './Input.types';
3
- declare const Input: (props: InputProps) => React.JSX.Element;
2
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "value"> & {
3
+ inputType?: import("./Input.types").InputTypeEnum;
4
+ value?: string;
5
+ onValueChanged?: (value: string) => void;
6
+ invalid?: boolean;
7
+ leadingIcon?: React.ReactNode;
8
+ trailingIcon?: React.ReactNode;
9
+ } & React.RefAttributes<HTMLInputElement>>;
4
10
  export default Input;
@@ -31,8 +31,4 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'v
31
31
  * Icon to be displayed after the input.
32
32
  */
33
33
  trailingIcon?: React.ReactNode;
34
- /**
35
- * Reference to the input element.
36
- */
37
- inputRef?: (node: HTMLInputElement | null) => void;
38
34
  };
@@ -1,4 +1,8 @@
1
1
  import React from 'react';
2
- import type { TextAreaProps } from './TextArea.types';
3
- declare const TextArea: (props: TextAreaProps) => React.JSX.Element;
2
+ declare const TextArea: React.ForwardRefExoticComponent<Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "value"> & {
3
+ value?: string;
4
+ onValueChanged?: (value: string) => void;
5
+ invalid?: boolean;
6
+ className?: string;
7
+ } & React.RefAttributes<HTMLTextAreaElement>>;
4
8
  export default TextArea;
@@ -49,7 +49,7 @@ export type ContextMenuProps = HTMLAttributes<HTMLUListElement> & {
49
49
  action?: ActionType;
50
50
  /**
51
51
  * Determines whether the context menu should be hidden when clicking away from it.
52
- * @default false
52
+ * @default true
53
53
  */
54
54
  hideOnClickAway?: boolean;
55
55
  /**
@@ -49,4 +49,8 @@ export type DatePickerProps = {
49
49
  * @param dateStr - String representation of the selected date(s). Will match the date format.
50
50
  */
51
51
  onClose?: (dates: Date[], dateStr: string) => void;
52
+ /**
53
+ * render date picker inline
54
+ */
55
+ inline?: boolean;
52
56
  };
@@ -46,7 +46,7 @@ export type PopoverProps = {
46
46
  direction?: OverlayDirectionEnum;
47
47
  /**
48
48
  * Indicates if Popover should hide on click away.
49
- * @default false
49
+ * @default true
50
50
  */
51
51
  hideOnClickAway?: boolean;
52
52
  /**
@@ -606,6 +606,7 @@
606
606
  }
607
607
  .Input-module_input__NAeHe .Input-module_inputElement__Tjw4v {
608
608
  flex: 1;
609
+ width: 100%;
609
610
  height: var(--input-inputElement-height);
610
611
  color: var(--input-text-color);
611
612
  font-size: var(--input-font-size);
@@ -1780,7 +1781,7 @@ span.flatpickr-weekday {
1780
1781
  --label-font-color: var(--text-primary);
1781
1782
  --message-font-color: var(--text-secondary);
1782
1783
  --message-icon-color: var(--text-secondary);
1783
- --error-font-color: var(--text-destructive);
1784
+ --error-font-color: var(--text-secondary);
1784
1785
  --error-icon-color: var(--icon-destructive);
1785
1786
  display: flex;
1786
1787
  flex-direction: column;
@@ -2017,6 +2018,7 @@ span.flatpickr-weekday {
2017
2018
  }
2018
2019
  .Select-module_select__sbUrw .Select-module_trigger__gyTSi {
2019
2020
  display: flex;
2021
+ justify-content: flex-start;
2020
2022
  align-items: center;
2021
2023
  width: 100%;
2022
2024
  height: 2rem;