@cypress-design/vue-checkbox 0.5.0 → 1.1.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/package.json CHANGED
@@ -1,25 +1,30 @@
1
1
  {
2
2
  "name": "@cypress-design/vue-checkbox",
3
- "version": "0.5.0",
3
+ "version": "1.1.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": "yarn vite build",
19
- "build:types": "yarn vue-tsc --project ./tsconfig.build.json"
19
+ "build:module": "yarn exec vite build",
20
+ "build:types": "yarn exec vue-tsc --project ./tsconfig.build.json"
20
21
  },
21
22
  "dependencies": {
22
- "@cypress-design/vue-icon": "*"
23
+ "@cypress-design/vue-icon": "^3.3.2"
24
+ },
25
+ "devDependencies": {
26
+ "@cypress-design/constants-checkbox": "*",
27
+ "@cypress-design/rollup-plugin-tailwind-keep": "*"
23
28
  },
24
29
  "license": "MIT"
25
30
  }
@@ -1,7 +1,8 @@
1
1
  {
2
- "extends": "../../../tsconfig.vue.json",
2
+ "extends": "../../../tsconfig.vue.build.json",
3
3
  "include": ["./*.vue", "./index.ts"],
4
4
  "compilerOptions": {
5
- "outDir": "dist"
5
+ "outDir": "dist",
6
+ "composite": false
6
7
  }
7
8
  }
package/vite.config.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as path from 'path'
2
- import generateViteConfig from '../../root.vite.config'
2
+ import generateViteConfig from '../../vue.vite.config'
3
3
 
4
4
  export default generateViteConfig({
5
5
  entry: path.resolve(__dirname, './index.ts'),
@@ -1,75 +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?raw"
4
-
5
- import Checkbox from './Checkbox.vue'
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
- options: ['indigo', 'red', 'jade'],
13
- control: {
14
- type: 'select',
15
- },
16
- },
17
- }}
18
- parameters={{
19
- design: {
20
- type: "figma",
21
- url: 'https://www.figma.com/file/1WJ3GVQyMV5e7xVxPg3yID/Design-System?node-id=1027%3A9825',
22
- }
23
- }} />
24
-
25
- <Canvas withSource="none">
26
- <Story name="Checkbox">
27
- {({ color }) => ({
28
- template: `
29
- <Checkbox checked label="Checked" :color="color"/>
30
- <br />
31
- <Checkbox label="Unchecked" :color="color"/>
32
- <br />
33
- <Checkbox checked disabled label="Disabled & checked" :color="color"/>
34
- <br />
35
- <Checkbox disabled label="Disabled & unchecked" :color="color"/>
36
- `,
37
- components: { Checkbox },
38
- data: () => ({
39
- color
40
- })
41
- })}
42
- </Story>
43
- </Canvas>
44
-
45
- <ArgsTable />
46
-
47
- ## Usage
48
-
49
- Install the component
50
-
51
- ```
52
- yarn add @cypress-design/vue-checkbox
53
- ```
54
-
55
- In the script, import the component
56
-
57
- ```js
58
- import Checkbox from '@cypress-design/vue-checkbox'
59
- ```
60
-
61
- then in the template, use it
62
-
63
- ```html
64
- <Checkbox checked label="Checked" color="indigo"/>
65
- ```
66
-
67
- or with the v-model
68
-
69
- ```html
70
- <Checkbox v-model="checked" label="Checked" color="indigo"/>
71
- ```
72
-
73
- <Description>
74
- {changelog.replace(/^# .+/, '## Changelog')}
75
- </Description>
package/tsconfig.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.vue.json",
3
- "include": [
4
- "*.vue",
5
- "*.ts",
6
- "*.tsx",
7
- "../*.ts",
8
- "../../../cypress/support/*.ts"
9
- ]
10
- }