@xsolla/xui-checkbox 0.64.0-pr56.1768440195
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/native/index.d.mts +44 -0
- package/native/index.d.ts +44 -0
- package/native/index.js +755 -0
- package/native/index.js.map +1 -0
- package/native/index.mjs +727 -0
- package/native/index.mjs.map +1 -0
- package/package.json +57 -0
- package/web/index.d.mts +44 -0
- package/web/index.d.ts +44 -0
- package/web/index.js +743 -0
- package/web/index.js.map +1 -0
- package/web/index.mjs +711 -0
- package/web/index.mjs.map +1 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type ComponentSize = "s" | "m" | "l" | "xl";
|
|
4
|
+
interface CheckboxProps {
|
|
5
|
+
/** Content/label to display next to the checkbox */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/** Size of the checkbox */
|
|
8
|
+
size?: ComponentSize;
|
|
9
|
+
/** Whether the checkbox is checked */
|
|
10
|
+
checked?: boolean;
|
|
11
|
+
/** The indeterminate checked state of checkbox */
|
|
12
|
+
indeterminate?: boolean;
|
|
13
|
+
/** Additional descriptive text below the label */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Error message to display (also highlights control as invalid) */
|
|
16
|
+
errorMessage?: string;
|
|
17
|
+
/** Highlight control as invalid without message */
|
|
18
|
+
error?: boolean;
|
|
19
|
+
/** Whether the checkbox is disabled */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Name attribute for the checkbox */
|
|
22
|
+
name?: string;
|
|
23
|
+
/** Value attribute for the checkbox */
|
|
24
|
+
value?: string;
|
|
25
|
+
/** Callback when the checkbox value changes */
|
|
26
|
+
onChange?: (e: {
|
|
27
|
+
target: {
|
|
28
|
+
checked: boolean;
|
|
29
|
+
name?: string;
|
|
30
|
+
value?: string;
|
|
31
|
+
};
|
|
32
|
+
}) => void;
|
|
33
|
+
/** Unique identifier for the checkbox */
|
|
34
|
+
id?: string;
|
|
35
|
+
/** Accessible label for screen readers when no visible label */
|
|
36
|
+
"aria-label"?: string;
|
|
37
|
+
}
|
|
38
|
+
interface CheckboxRef {
|
|
39
|
+
focus: () => void;
|
|
40
|
+
blur: () => void;
|
|
41
|
+
}
|
|
42
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<CheckboxRef>>;
|
|
43
|
+
|
|
44
|
+
export { Checkbox, type CheckboxProps, type CheckboxRef };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type ComponentSize = "s" | "m" | "l" | "xl";
|
|
4
|
+
interface CheckboxProps {
|
|
5
|
+
/** Content/label to display next to the checkbox */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/** Size of the checkbox */
|
|
8
|
+
size?: ComponentSize;
|
|
9
|
+
/** Whether the checkbox is checked */
|
|
10
|
+
checked?: boolean;
|
|
11
|
+
/** The indeterminate checked state of checkbox */
|
|
12
|
+
indeterminate?: boolean;
|
|
13
|
+
/** Additional descriptive text below the label */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Error message to display (also highlights control as invalid) */
|
|
16
|
+
errorMessage?: string;
|
|
17
|
+
/** Highlight control as invalid without message */
|
|
18
|
+
error?: boolean;
|
|
19
|
+
/** Whether the checkbox is disabled */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Name attribute for the checkbox */
|
|
22
|
+
name?: string;
|
|
23
|
+
/** Value attribute for the checkbox */
|
|
24
|
+
value?: string;
|
|
25
|
+
/** Callback when the checkbox value changes */
|
|
26
|
+
onChange?: (e: {
|
|
27
|
+
target: {
|
|
28
|
+
checked: boolean;
|
|
29
|
+
name?: string;
|
|
30
|
+
value?: string;
|
|
31
|
+
};
|
|
32
|
+
}) => void;
|
|
33
|
+
/** Unique identifier for the checkbox */
|
|
34
|
+
id?: string;
|
|
35
|
+
/** Accessible label for screen readers when no visible label */
|
|
36
|
+
"aria-label"?: string;
|
|
37
|
+
}
|
|
38
|
+
interface CheckboxRef {
|
|
39
|
+
focus: () => void;
|
|
40
|
+
blur: () => void;
|
|
41
|
+
}
|
|
42
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<CheckboxRef>>;
|
|
43
|
+
|
|
44
|
+
export { Checkbox, type CheckboxProps, type CheckboxRef };
|