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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jy-headless",
3
- "version": "0.2.34",
3
+ "version": "0.2.35",
4
4
  "description": "A lightweight and customizable headless UI library for React components",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/yCZwIqY/jy-headless",
@@ -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.34
1
+ 0.2.35