ddingdong-design-system 0.3.1 → 0.3.2
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/ddingdong-design-system.es.js +4 -4
- package/dist/ddingdong-design-system.es.js.map +1 -1
- package/dist/ddingdong-design-system.umd.js +1 -1
- package/dist/ddingdong-design-system.umd.js.map +1 -1
- package/dist/shared/ui/Checkbox/Checkbox.d.ts +24 -0
- package/dist/shared/ui/Checkbox/index.d.ts +1 -0
- package/dist/shared/ui/Radio/Radio.context.d.ts +10 -0
- package/dist/shared/ui/Radio/RadioItem.d.ts +8 -0
- package/dist/shared/ui/Radio/RadioRoot.d.ts +38 -0
- package/dist/shared/ui/Radio/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
/**
|
|
3
|
+
* additional className.
|
|
4
|
+
*/
|
|
5
|
+
className?: string;
|
|
6
|
+
/**
|
|
7
|
+
* checked state of the checkbox.
|
|
8
|
+
*/
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* default checked state of the checkbox.
|
|
12
|
+
*/
|
|
13
|
+
defaultChecked?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* disabled state of the checkbox.
|
|
16
|
+
*/
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* callback function when checked state is changed.
|
|
20
|
+
*/
|
|
21
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
22
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'checked' | 'defaultChecked'>;
|
|
23
|
+
export declare function Checkbox({ checked: controlledValue, defaultChecked, onCheckedChange, disabled, className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Checkbox } from './Checkbox';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InputValue } from './RadioRoot';
|
|
2
|
+
type RadioGroupContextType = {
|
|
3
|
+
name?: string;
|
|
4
|
+
value: InputValue;
|
|
5
|
+
onChange: (value: InputValue) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
size: 'md' | 'lg';
|
|
8
|
+
};
|
|
9
|
+
export declare const RadioGroupContext: import('react').Context<RadioGroupContextType | undefined>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
/**
|
|
3
|
+
* size of the radio button.
|
|
4
|
+
*/
|
|
5
|
+
size?: 'md' | 'lg';
|
|
6
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'name'>;
|
|
7
|
+
export declare function RadioItem({ value, id, className, disabled, onChange, size: sizeProp, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type InputValue = React.InputHTMLAttributes<HTMLInputElement>['value'];
|
|
2
|
+
type Props = {
|
|
3
|
+
/**
|
|
4
|
+
* content of the Radio, typically RadioItem components.
|
|
5
|
+
*/
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* value of the Radio.
|
|
9
|
+
*/
|
|
10
|
+
value?: InputValue;
|
|
11
|
+
/**
|
|
12
|
+
* defaultValue of the Radio.
|
|
13
|
+
*/
|
|
14
|
+
defaultValue?: InputValue;
|
|
15
|
+
/**
|
|
16
|
+
* callback function when value is changed.
|
|
17
|
+
*/
|
|
18
|
+
onValueChange?: (value: InputValue) => void;
|
|
19
|
+
/**
|
|
20
|
+
* disabled state of the Radio.
|
|
21
|
+
*/
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* additional className.
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* size of the radio button.
|
|
29
|
+
* @default 'md'
|
|
30
|
+
*/
|
|
31
|
+
size?: 'md' | 'lg';
|
|
32
|
+
/**
|
|
33
|
+
* name of the Radio.
|
|
34
|
+
*/
|
|
35
|
+
name?: string;
|
|
36
|
+
};
|
|
37
|
+
export declare function RadioRoot({ value: controlledValue, defaultValue, onValueChange, children, disabled, size, name, className, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export {};
|