@nulogy/components 10.0.2 → 10.1.0
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.
- package/dist/main.js +17848 -17837
- package/dist/main.module.js +17844 -17833
- package/dist/src/DatePicker/DatePicker.d.ts +15 -14
- package/dist/src/DatePicker/DatePickerInput.d.ts +11 -14
- package/dist/src/FieldLabel/FieldLabel.d.ts +1 -1
- package/dist/src/FieldLabel/FieldLabel.story.d.ts +5 -24
- package/dist/src/FieldLabel/FieldLabel.type.d.ts +4 -5
- package/dist/src/FieldLabel/FramedIcon.d.ts +11 -0
- package/dist/src/FieldLabel/Label.d.ts +6 -1
- package/dist/src/Input/InputField.d.ts +4 -4
- package/dist/src/TimePicker/TimePickerInput.d.ts +3 -3
- package/package.json +1 -1
- package/dist/src/Input/InputField.type.d.ts +0 -50
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { ReactDatePickerProps } from "react-datepicker";
|
|
3
|
-
import { FieldProps } from "../Form/Field";
|
|
4
3
|
import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
|
|
5
|
-
|
|
4
|
+
import { InputFieldProps } from "../Input/InputField";
|
|
5
|
+
import { FieldProps } from "../Form/Field";
|
|
6
|
+
type OmittedFieldProps = "size" | "onChange" | "onBlur" | "onFocus";
|
|
7
|
+
interface DatePickerProps extends Omit<FieldProps, OmittedFieldProps> {
|
|
6
8
|
size?: ComponentSize;
|
|
7
|
-
|
|
9
|
+
onChange?: (date: Date) => void;
|
|
10
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
11
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
8
12
|
dateFormat?: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
onFocus?: ReactDatePickerProps["onFocus"];
|
|
12
|
-
onInputChange?: (...args: any[]) => any;
|
|
13
|
-
inputProps?: any;
|
|
13
|
+
onInputChange?: (value: string) => void;
|
|
14
|
+
inputProps?: InputFieldProps;
|
|
14
15
|
errorMessage?: string;
|
|
15
16
|
errorList?: string[];
|
|
16
|
-
minDate?:
|
|
17
|
-
maxDate?:
|
|
18
|
-
highlightDates?:
|
|
17
|
+
minDate?: Date;
|
|
18
|
+
maxDate?: Date;
|
|
19
|
+
highlightDates?: ReactDatePickerProps["highlightDates"];
|
|
19
20
|
disableFlipping?: boolean;
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
declare const DatePicker: React.
|
|
21
|
+
selected?: Date;
|
|
22
|
+
}
|
|
23
|
+
declare const DatePicker: React.ForwardRefExoticComponent<Omit<DatePickerProps, "ref"> & React.RefAttributes<unknown>>;
|
|
23
24
|
export default DatePicker;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { InputFieldProps } from "../Input/InputField";
|
|
2
3
|
import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
|
|
3
|
-
|
|
4
|
+
interface InputProps extends InputFieldProps {
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
}
|
|
7
|
+
type DatePickerInputProps = Omit<React.ComponentPropsWithRef<"input">, "size"> & {
|
|
4
8
|
size?: ComponentSize;
|
|
5
|
-
onBlur?: React.ComponentPropsWithRef<"input">["onBlur"];
|
|
6
|
-
onFocus?: React.ComponentPropsWithRef<"input">["onFocus"];
|
|
7
|
-
onClick?: (...args: any[]) => any;
|
|
8
|
-
onChange?: (...args: any[]) => any;
|
|
9
|
-
onUpKeyPress?: (...args: any[]) => any;
|
|
10
|
-
onDownKeyPress?: (...args: any[]) => any;
|
|
11
|
-
onEnterKeyPress?: (...args: any[]) => any;
|
|
12
|
-
onSpaceKeyPress?: (...args: any[]) => any;
|
|
13
|
-
value?: string;
|
|
14
|
-
onInputChange: (...args: any[]) => any;
|
|
15
9
|
dateFormat?: string;
|
|
16
|
-
inputProps?:
|
|
17
|
-
|
|
10
|
+
inputProps?: InputProps;
|
|
11
|
+
onInputChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
onUpKeyPress: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
13
|
+
onDownKeyPress: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
14
|
+
onEnterKeyPress: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
18
15
|
};
|
|
19
|
-
declare const DatePickerInput: React.
|
|
16
|
+
declare const DatePickerInput: React.ForwardRefExoticComponent<Omit<DatePickerInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
20
17
|
export default DatePickerInput;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FieldLabelProps } from "./FieldLabel.type";
|
|
3
3
|
declare const FieldLabel: {
|
|
4
|
-
({ labelText, requirementText, helpText, children, ...props }: FieldLabelProps): React.JSX.Element;
|
|
4
|
+
({ labelText, requirementText, helpText, hint, children, ...props }: FieldLabelProps): React.JSX.Element;
|
|
5
5
|
defaultProps: {
|
|
6
6
|
children: any;
|
|
7
7
|
requirementText: any;
|
|
@@ -9,27 +9,8 @@ export declare const _FieldLabel: {
|
|
|
9
9
|
name: string;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
export declare const WithHelpText:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
export declare const WithRequirementText: {
|
|
19
|
-
(): React.JSX.Element;
|
|
20
|
-
story: {
|
|
21
|
-
name: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export declare const WithAllAdditionalText: {
|
|
25
|
-
(): React.JSX.Element;
|
|
26
|
-
story: {
|
|
27
|
-
name: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export declare const WithAssociatedCustomInputComponent: {
|
|
31
|
-
(): React.JSX.Element;
|
|
32
|
-
story: {
|
|
33
|
-
name: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
12
|
+
export declare const WithHelpText: () => React.JSX.Element;
|
|
13
|
+
export declare const WithRequirementText: () => React.JSX.Element;
|
|
14
|
+
export declare const WithAllAdditionalText: () => React.JSX.Element;
|
|
15
|
+
export declare const WithAssociatedCustomInputComponent: () => React.JSX.Element;
|
|
16
|
+
export declare const WithHint: () => React.JSX.Element;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
2
|
+
import type { LabelProps } from "./Label";
|
|
3
|
+
export interface FieldLabelProps extends LabelProps {
|
|
4
|
+
hint?: string;
|
|
4
5
|
labelText: string;
|
|
5
|
-
children?: React.ReactNode;
|
|
6
6
|
requirementText?: string;
|
|
7
7
|
helpText?: React.ReactNode;
|
|
8
|
-
|
|
9
|
-
};
|
|
8
|
+
}
|
|
10
9
|
export declare const FieldLabelDefaultProps: {
|
|
11
10
|
children: any;
|
|
12
11
|
requirementText: any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
interface FramedIconProps extends React.ComponentPropsWithoutRef<"svg"> {
|
|
3
|
+
iconSize: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
focusable?: boolean;
|
|
6
|
+
maxWidth?: string;
|
|
7
|
+
tooltip?: string | ReactElement;
|
|
8
|
+
isTooltipOpenByDefault?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export default function FramedIcon({ isTooltipOpenByDefault, tooltip, maxWidth, iconSize, ...iconProps }: FramedIconProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { DisplayProps } from "styled-system";
|
|
2
|
+
import type { SpaceProps } from "styled-system";
|
|
3
|
+
import type { ComponentPropsWithRef } from "react";
|
|
4
|
+
export interface LabelProps extends SpaceProps, DisplayProps, Omit<ComponentPropsWithRef<"label">, "color"> {
|
|
5
|
+
}
|
|
6
|
+
declare const Label: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, LabelProps, never>;
|
|
2
7
|
export default Label;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TextAlignProps } from "styled-system";
|
|
3
2
|
import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
|
|
4
3
|
type NativeInputProps = Omit<React.ComponentPropsWithRef<"input">, "size">;
|
|
5
4
|
export type InputFieldProps = NativeInputProps & {
|
|
@@ -9,15 +8,16 @@ export type InputFieldProps = NativeInputProps & {
|
|
|
9
8
|
error?: boolean;
|
|
10
9
|
labelText?: string;
|
|
11
10
|
requirementText?: string;
|
|
12
|
-
helpText?:
|
|
11
|
+
helpText?: string;
|
|
13
12
|
suffix?: string;
|
|
14
13
|
prefix?: string;
|
|
15
14
|
suffixWidth?: string;
|
|
16
15
|
prefixWidth?: string;
|
|
17
|
-
suffixAlignment?:
|
|
18
|
-
prefixAlignment?:
|
|
16
|
+
suffixAlignment?: "left" | "right";
|
|
17
|
+
prefixAlignment?: "left" | "right";
|
|
19
18
|
iconSize?: string;
|
|
20
19
|
inputWidth?: string;
|
|
21
20
|
};
|
|
22
21
|
export declare const InputField: React.FC<InputFieldProps>;
|
|
22
|
+
export declare const InputFieldDefaultProps: InputFieldProps;
|
|
23
23
|
export {};
|
|
@@ -301,13 +301,13 @@ declare const TimePickerInput: import("styled-components").StyledComponent<impor
|
|
|
301
301
|
error?: boolean;
|
|
302
302
|
labelText?: string;
|
|
303
303
|
requirementText?: string;
|
|
304
|
-
helpText?:
|
|
304
|
+
helpText?: string;
|
|
305
305
|
suffix?: string;
|
|
306
306
|
prefix?: string;
|
|
307
307
|
suffixWidth?: string;
|
|
308
308
|
prefixWidth?: string;
|
|
309
|
-
suffixAlignment?:
|
|
310
|
-
prefixAlignment?:
|
|
309
|
+
suffixAlignment?: "left" | "right";
|
|
310
|
+
prefixAlignment?: "left" | "right";
|
|
311
311
|
iconSize?: string;
|
|
312
312
|
inputWidth?: string;
|
|
313
313
|
} & {
|
package/package.json
CHANGED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export namespace InputFieldPropTypes {
|
|
2
|
-
const icon: PropTypes.Requireable<string>;
|
|
3
|
-
const disabled: PropTypes.Requireable<boolean>;
|
|
4
|
-
const error: PropTypes.Requireable<boolean>;
|
|
5
|
-
const required: PropTypes.Requireable<boolean>;
|
|
6
|
-
const labelText: PropTypes.Requireable<string>;
|
|
7
|
-
const requirementText: PropTypes.Requireable<string>;
|
|
8
|
-
const helpText: PropTypes.Requireable<string>;
|
|
9
|
-
const suffix: PropTypes.Requireable<string>;
|
|
10
|
-
const prefix: PropTypes.Requireable<string>;
|
|
11
|
-
const suffixWidth: PropTypes.Requireable<string>;
|
|
12
|
-
const prefixWidth: PropTypes.Requireable<string>;
|
|
13
|
-
const suffixAlignment: PropTypes.Requireable<string>;
|
|
14
|
-
const prefixAlignment: PropTypes.Requireable<string>;
|
|
15
|
-
const iconSize: PropTypes.Requireable<string>;
|
|
16
|
-
const inputWidth: PropTypes.Requireable<string>;
|
|
17
|
-
}
|
|
18
|
-
export namespace InputFieldDefaultProps {
|
|
19
|
-
const disabled_1: boolean;
|
|
20
|
-
export { disabled_1 as disabled };
|
|
21
|
-
const required_1: boolean;
|
|
22
|
-
export { required_1 as required };
|
|
23
|
-
const error_1: boolean;
|
|
24
|
-
export { error_1 as error };
|
|
25
|
-
const labelText_1: any;
|
|
26
|
-
export { labelText_1 as labelText };
|
|
27
|
-
const helpText_1: any;
|
|
28
|
-
export { helpText_1 as helpText };
|
|
29
|
-
const requirementText_1: any;
|
|
30
|
-
export { requirementText_1 as requirementText };
|
|
31
|
-
const suffix_1: any;
|
|
32
|
-
export { suffix_1 as suffix };
|
|
33
|
-
const suffixWidth_1: any;
|
|
34
|
-
export { suffixWidth_1 as suffixWidth };
|
|
35
|
-
const suffixAlignment_1: string;
|
|
36
|
-
export { suffixAlignment_1 as suffixAlignment };
|
|
37
|
-
const prefix_1: any;
|
|
38
|
-
export { prefix_1 as prefix };
|
|
39
|
-
const prefixWidth_1: any;
|
|
40
|
-
export { prefixWidth_1 as prefixWidth };
|
|
41
|
-
const prefixAlignment_1: string;
|
|
42
|
-
export { prefixAlignment_1 as prefixAlignment };
|
|
43
|
-
const icon_1: any;
|
|
44
|
-
export { icon_1 as icon };
|
|
45
|
-
const iconSize_1: any;
|
|
46
|
-
export { iconSize_1 as iconSize };
|
|
47
|
-
const inputWidth_1: any;
|
|
48
|
-
export { inputWidth_1 as inputWidth };
|
|
49
|
-
}
|
|
50
|
-
import PropTypes from "prop-types";
|