@cypress-design/react-checkbox 0.2.2 → 0.3.0
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/CHANGELOG.md +6 -0
- package/Checkbox.tsx +22 -4
- package/dist/Checkbox.d.ts +22 -4
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @cypress-design/react-checkbox
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#44](https://github.com/cypress-io/cypress-design/pull/44) [`2fdaf6b`](https://github.com/cypress-io/cypress-design/commit/2fdaf6be6f81a2a851761258347ed213577c5b26) Thanks [@elevatebart](https://github.com/elevatebart)! - Add missing descriptions of props in button, tooltip, checkbox
|
|
8
|
+
|
|
3
9
|
## 0.2.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/Checkbox.tsx
CHANGED
|
@@ -5,12 +5,30 @@ import { IconCheckmarkSmall } from '@cypress-design/react-icon'
|
|
|
5
5
|
|
|
6
6
|
export interface CheckboxProps
|
|
7
7
|
extends Omit<HTMLProps<HTMLLabelElement>, 'label' | 'onChange'> {
|
|
8
|
+
/**
|
|
9
|
+
* A unique identifier for the checkbox on the whole page.
|
|
10
|
+
* It will be used to give match label with input for a11y.
|
|
11
|
+
*/
|
|
8
12
|
id?: string
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Is the checkbox checked when it is first rendered.
|
|
15
|
+
*/
|
|
16
|
+
checked?: boolean
|
|
17
|
+
/**
|
|
18
|
+
* The color of the background in the checkbox.
|
|
19
|
+
* The checkmark will always be white.
|
|
20
|
+
*/
|
|
21
|
+
color?: 'red' | 'indigo' | 'jade'
|
|
22
|
+
/**
|
|
23
|
+
* If the checkbox is disabled, it will not be clickable.
|
|
24
|
+
*/
|
|
13
25
|
disabled?: boolean
|
|
26
|
+
/**
|
|
27
|
+
* Label for the checkbox.
|
|
28
|
+
* It is very important to set this to make the checkbox accessible.
|
|
29
|
+
*/
|
|
30
|
+
label?: ReactNode
|
|
31
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void
|
|
14
32
|
}
|
|
15
33
|
|
|
16
34
|
export const Checkbox: FunctionComponent<CheckboxProps> = ({
|
package/dist/Checkbox.d.ts
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { FunctionComponent, HTMLProps, ReactNode } from 'react';
|
|
3
3
|
export interface CheckboxProps extends Omit<HTMLProps<HTMLLabelElement>, 'label' | 'onChange'> {
|
|
4
|
+
/**
|
|
5
|
+
* A unique identifier for the checkbox on the whole page.
|
|
6
|
+
* It will be used to give match label with input for a11y.
|
|
7
|
+
*/
|
|
4
8
|
id?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Is the checkbox checked when it is first rendered.
|
|
11
|
+
*/
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The color of the background in the checkbox.
|
|
15
|
+
* The checkmark will always be white.
|
|
16
|
+
*/
|
|
17
|
+
color?: 'red' | 'indigo' | 'jade';
|
|
18
|
+
/**
|
|
19
|
+
* If the checkbox is disabled, it will not be clickable.
|
|
20
|
+
*/
|
|
9
21
|
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Label for the checkbox.
|
|
24
|
+
* It is very important to set this to make the checkbox accessible.
|
|
25
|
+
*/
|
|
26
|
+
label?: ReactNode;
|
|
27
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
28
|
}
|
|
11
29
|
export declare const Checkbox: FunctionComponent<CheckboxProps>;
|
|
12
30
|
export default Checkbox;
|
package/dist/Checkbox.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGpE,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC/D,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGpE,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC/D;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;CAC/D;AAED,eAAO,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,CA6DrD,CAAA;AAED,eAAe,QAAQ,CAAA"}
|