@cypress-design/react-checkbox 0.5.0 → 1.0.1

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/package.json CHANGED
@@ -1,26 +1,31 @@
1
1
  {
2
2
  "name": "@cypress-design/react-checkbox",
3
- "version": "0.5.0",
3
+ "version": "1.0.1",
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.js",
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/react-icon": "*",
23
- "clsx": "*"
23
+ "@cypress-design/constants-checkbox": "^1.0.0",
24
+ "@cypress-design/react-icon": "^1.1.0",
25
+ "clsx": "^2.1.1"
26
+ },
27
+ "devDependencies": {
28
+ "@cypress-design/rollup-plugin-tailwind-keep": "*"
24
29
  },
25
30
  "license": "MIT"
26
31
  }
@@ -0,0 +1,7 @@
1
+ import rootRollupConfig from '../../root.rollup.config.mjs'
2
+ import pkg from './package.json' assert { type: 'json' }
3
+
4
+ export default rootRollupConfig({
5
+ input: './index.ts',
6
+ external: Object.keys(pkg.dependencies),
7
+ })
@@ -2,6 +2,7 @@
2
2
  "extends": "../../../tsconfig.react.build.json",
3
3
  "include": ["./Checkbox.tsx", "./index.ts"],
4
4
  "compilerOptions": {
5
+ "sourceRoot": "./",
5
6
  "outDir": "dist"
6
7
  }
7
8
  }
@@ -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
@@ -1,3 +0,0 @@
1
- import rootRollupConfig from '../../root.rollup.config'
2
-
3
- export default rootRollupConfig({ input: './index.ts' })
package/tsconfig.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.react.json",
3
- "include": ["*.tsx", "*.ts", "../*.ts", "../../../cypress/support/*.ts"]
4
- }