@cypress-design/react-checkbox 0.4.6 → 1.0.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/.turbo/turbo-build.log +6 -0
- package/CHANGELOG.md +87 -0
- package/Checkbox.rootstory.tsx +17 -0
- package/Checkbox.tsx +11 -17
- package/CheckboxReact.cy.tsx +18 -7
- package/ReadMe.md +19 -0
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.mjs +84 -32
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +90 -42
- package/dist/index.umd.js.map +1 -1
- package/package.json +11 -6
- package/rollup.config.mjs +3 -0
- package/tsconfig.build.json +1 -0
- package/Checkbox.stories.mdx +0 -67
- package/rollup.config.js +0 -3
- package/tsconfig.json +0 -4
package/package.json
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cypress-design/react-checkbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"*"
|
|
6
6
|
],
|
|
7
7
|
"typings": "./dist/index.d.ts",
|
|
8
|
-
"main": "./dist/index.umd.js",
|
|
9
8
|
"module": "./dist/index.es.mjs",
|
|
9
|
+
"main": "./dist/index.umd.js",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"import": "./dist/index.es.mjs",
|
|
13
|
-
"require": "./dist/index.umd.js"
|
|
13
|
+
"require": "./dist/index.umd.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
14
15
|
}
|
|
15
16
|
},
|
|
16
17
|
"scripts": {
|
|
17
18
|
"build": "yarn build:module && yarn build:types",
|
|
18
|
-
"build:module": "rollup -c ./rollup.config.
|
|
19
|
+
"build:module": "rollup -c ./rollup.config.mjs",
|
|
19
20
|
"build:types": "tsc --project ./tsconfig.build.json"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"@cypress-design/
|
|
23
|
-
"
|
|
23
|
+
"@cypress-design/constants-checkbox": "^1.0.0",
|
|
24
|
+
"@cypress-design/react-icon": "^1.0.0",
|
|
25
|
+
"clsx": "^2.1.1"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@cypress-design/rollup-plugin-tailwind-keep": "*"
|
|
24
29
|
},
|
|
25
30
|
"license": "MIT"
|
|
26
31
|
}
|
package/tsconfig.build.json
CHANGED
package/Checkbox.stories.mdx
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { ArgsTable, Canvas, Meta, Story, Description } from '@storybook/addon-docs'
|
|
2
|
-
import { version } from "./package.json"
|
|
3
|
-
import changelog from "./CHANGELOG.md"
|
|
4
|
-
|
|
5
|
-
import { Checkbox } from './Checkbox'
|
|
6
|
-
|
|
7
|
-
<h1>Checkbox<span className="text-lg font-normal"> - v{version}</span></h1>
|
|
8
|
-
|
|
9
|
-
<Meta title="Checkbox" component={Checkbox}
|
|
10
|
-
argTypes={{
|
|
11
|
-
color: {
|
|
12
|
-
control: {
|
|
13
|
-
type: 'select',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
}}
|
|
17
|
-
parameters={{
|
|
18
|
-
design: {
|
|
19
|
-
type: "figma",
|
|
20
|
-
url: 'https://www.figma.com/file/1WJ3GVQyMV5e7xVxPg3yID/Design-System?node-id=1027%3A9825',
|
|
21
|
-
}
|
|
22
|
-
}} />
|
|
23
|
-
|
|
24
|
-
<Canvas withSource="none">
|
|
25
|
-
<Story name="Checkbox">
|
|
26
|
-
{args =>
|
|
27
|
-
(<>
|
|
28
|
-
<Checkbox {...args} checked label="Checked" />
|
|
29
|
-
<br />
|
|
30
|
-
<Checkbox {...args} label="Unchecked" />
|
|
31
|
-
<br />
|
|
32
|
-
<Checkbox {...args} checked disabled label="Disabled & checked" />
|
|
33
|
-
<br />
|
|
34
|
-
<Checkbox {...args} disabled label="Disabled & unchecked" />
|
|
35
|
-
</>)}
|
|
36
|
-
</Story>
|
|
37
|
-
</Canvas>
|
|
38
|
-
|
|
39
|
-
<ArgsTable />
|
|
40
|
-
|
|
41
|
-
## Usage
|
|
42
|
-
|
|
43
|
-
Install the component
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
yarn add @cypress-design/react-checkbox
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
In the script, import the component
|
|
50
|
-
|
|
51
|
-
```js
|
|
52
|
-
import Checkbox from '@cypress-design/react-checkbox'
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
then in your render function, use it
|
|
56
|
-
|
|
57
|
-
```jsx
|
|
58
|
-
export const MyComp = () => {
|
|
59
|
-
return (<div>
|
|
60
|
-
<Checkbox checked={checked} label="Checked" color="indigo" onChange={setChecked}/>
|
|
61
|
-
</div>)
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
<Description>
|
|
66
|
-
{changelog.replace(/^# .+/, '## Changelog')}
|
|
67
|
-
</Description>
|
package/rollup.config.js
DELETED
package/tsconfig.json
DELETED