jy-headless 0.2.34 → 0.2.35
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/cjs/inputs/checkboxList/index.d.ts +5 -0
- package/cjs/types/inputs/index.d.ts +13 -0
- package/cjs/utils/MessageUtils.d.ts +1 -0
- package/inputs/checkboxList/index.d.ts +5 -0
- package/package.json +1 -1
- package/types/inputs/index.d.ts +13 -0
- package/utils/MessageUtils.d.ts +1 -0
- package/version.txt +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CheckboxItemProps, CheckboxProps } from '../../types';
|
|
2
|
+
declare const CheckboxList: (<T>({ children, values, onChange, max, ...props }: CheckboxProps<T>) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
|
+
Item: <T>({ value, children, id, ...props }: CheckboxItemProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
};
|
|
5
|
+
export default CheckboxList;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent, CSSProperties, InputHTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { DivAttribute } from '../common';
|
|
2
3
|
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
4
|
suffixElement?: ReactElement | ReactNode;
|
|
4
5
|
prefixElement?: ReactElement | ReactNode;
|
|
@@ -21,3 +22,15 @@ export interface ImageInputProps extends Omit<InputHTMLAttributes<HTMLInputEleme
|
|
|
21
22
|
onChange?: (file: File) => void;
|
|
22
23
|
value?: File;
|
|
23
24
|
}
|
|
25
|
+
export interface CheckboxProps<T> extends Omit<DivAttribute<T>, 'onChange'> {
|
|
26
|
+
values: T[];
|
|
27
|
+
onChange: (newValue: T[]) => void;
|
|
28
|
+
max?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface CheckboxItemProps<T> extends DivAttribute<T> {
|
|
31
|
+
value: T;
|
|
32
|
+
}
|
|
33
|
+
export interface CheckboxContextData<T> {
|
|
34
|
+
onToggle: (newValue: T, isCheck: boolean) => void;
|
|
35
|
+
values: T[];
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare const logCannotFindContextError: (componentName: string) => never;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CheckboxItemProps, CheckboxProps } from '../../types';
|
|
2
|
+
declare const CheckboxList: (<T>({ children, values, onChange, max, ...props }: CheckboxProps<T>) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
|
+
Item: <T>({ value, children, id, ...props }: CheckboxItemProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
};
|
|
5
|
+
export default CheckboxList;
|
package/package.json
CHANGED
package/types/inputs/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent, CSSProperties, InputHTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { DivAttribute } from '../common';
|
|
2
3
|
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
4
|
suffixElement?: ReactElement | ReactNode;
|
|
4
5
|
prefixElement?: ReactElement | ReactNode;
|
|
@@ -21,3 +22,15 @@ export interface ImageInputProps extends Omit<InputHTMLAttributes<HTMLInputEleme
|
|
|
21
22
|
onChange?: (file: File) => void;
|
|
22
23
|
value?: File;
|
|
23
24
|
}
|
|
25
|
+
export interface CheckboxProps<T> extends Omit<DivAttribute<T>, 'onChange'> {
|
|
26
|
+
values: T[];
|
|
27
|
+
onChange: (newValue: T[]) => void;
|
|
28
|
+
max?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface CheckboxItemProps<T> extends DivAttribute<T> {
|
|
31
|
+
value: T;
|
|
32
|
+
}
|
|
33
|
+
export interface CheckboxContextData<T> {
|
|
34
|
+
onToggle: (newValue: T, isCheck: boolean) => void;
|
|
35
|
+
values: T[];
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare const logCannotFindContextError: (componentName: string) => never;
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.35
|