@qasa/qds-ui 0.10.0-next.7 → 0.10.0-next.9
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/cjs/index.js +1322 -1322
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/checkbox/checkbox.d.ts +70 -0
- package/dist/cjs/types/components/checkbox/index.d.ts +1 -0
- package/dist/cjs/types/components/index.d.ts +1 -0
- package/dist/cjs/types/styles/common-styles.d.ts +1 -1
- package/dist/cjs/types/utils/html-attributes.d.ts +1 -0
- package/dist/esm/index.js +1322 -1322
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/checkbox/checkbox.d.ts +70 -0
- package/dist/esm/types/components/checkbox/index.d.ts +1 -0
- package/dist/esm/types/components/index.d.ts +1 -0
- package/dist/esm/types/styles/common-styles.d.ts +1 -1
- package/dist/esm/types/utils/html-attributes.d.ts +1 -0
- package/dist/index.d.ts +72 -3
- package/package.json +2 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
interface CheckboxOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The label for the checkbox. Accepts a string, or a React component for rendering links within the label.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```jsx
|
|
9
|
+
* <Checkbox label="I agree to the terms and conditions" />
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```jsx
|
|
14
|
+
* <Checkbox
|
|
15
|
+
* label={
|
|
16
|
+
* <>
|
|
17
|
+
* I agree to <Link href="/terms">the terms and conditions</Link>
|
|
18
|
+
* </>
|
|
19
|
+
* }
|
|
20
|
+
* />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
label: string | ReactElement<unknown>;
|
|
24
|
+
/**
|
|
25
|
+
* The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.
|
|
26
|
+
*/
|
|
27
|
+
isDefaultChecked?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.
|
|
30
|
+
*/
|
|
31
|
+
defaultChecked?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The controlled checked state of the checkbox. Must be used in conjunction with `onCheckedChange`.
|
|
34
|
+
*/
|
|
35
|
+
isChecked?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The controlled checked state of the checkbox. Must be used in conjunction with `onCheckedChange`.
|
|
38
|
+
*/
|
|
39
|
+
checked?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Event handler called when the checked state of the checkbox changes.
|
|
42
|
+
*/
|
|
43
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
44
|
+
/**
|
|
45
|
+
* If `true` the checkbox will render in its invalid state.
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
isInvalid?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* If `true` it prevents the user from interacting with the checkbox.
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
isDisabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* If `true` the user must check the checkbox before the owning form can be submitted.
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
isRequired?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* The name of the checkbox. Submitted with its owning form as part of a name/value pair.
|
|
61
|
+
*/
|
|
62
|
+
name?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The value given as data when submitted with a `name`.
|
|
65
|
+
*/
|
|
66
|
+
value?: string;
|
|
67
|
+
}
|
|
68
|
+
export declare type CheckboxProps = Omit<CheckboxPrimitive.CheckboxProps, 'asChild' | 'children' | 'checked' | 'defaultChecked' | keyof CheckboxOptions> & CheckboxOptions;
|
|
69
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps, "children" | "asChild" | keyof CheckboxOptions> & CheckboxOptions & import("react").RefAttributes<HTMLButtonElement>>;
|
|
70
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './checkbox';
|
|
@@ -408,7 +408,7 @@ export declare const getFormFieldBaseStyles: (theme: {
|
|
|
408
408
|
borderColor: string;
|
|
409
409
|
boxShadow: `0 0 0 1px ${string}`;
|
|
410
410
|
};
|
|
411
|
-
'&[aria-invalid=true]': {
|
|
411
|
+
'&[aria-invalid="true"]': {
|
|
412
412
|
borderColor: string;
|
|
413
413
|
'&:focus': {
|
|
414
414
|
boxShadow: `0 0 0 1px ${string}`;
|