@cypress-design/vue-icon 0.19.2 → 0.20.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/.gitignore CHANGED
@@ -1 +1 @@
1
- TreeShakableIcons.ts
1
+ _TreeShakableIcons.ts
@@ -0,0 +1,15 @@
1
+ $ yarn build:codegen && yarn build:module && yarn build:types
2
+ $ node ./generate-icons.js
3
+ $ yarn vite build
4
+ $ /home/runner/work/cypress-design/cypress-design/node_modules/.bin/vite build
5
+ vite v4.2.1 building for production...
6
+ transforming...
7
+ ✓ 4 modules transformed.
8
+ rendering chunks...
9
+ computing gzip size...
10
+ dist/index.es.mjs 246.76 kB │ gzip: 48.31 kB │ map: 393.55 kB
11
+ Entry module "index.ts" is using named and default exports together. Consumers of your bundle will have to use `Icon.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
12
+ dist/index.umd.js 230.09 kB │ gzip: 48.39 kB │ map: 385.74 kB
13
+ ✓ built in 9.53s
14
+ $ yarn tsc --project ./tsconfig.build.json
15
+ $ /home/runner/work/cypress-design/cypress-design/node_modules/.bin/tsc --project ./tsconfig.build.json
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @cypress-design/vue-icon
2
2
 
3
+ ## 0.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#167](https://github.com/cypress-io/cypress-design/pull/167) [`18399c7`](https://github.com/cypress-io/cypress-design/commit/18399c72a52288c67af0935384430d4e4cd24251) Thanks [@elevatebart](https://github.com/elevatebart)! - add icons shape pieces of heaven (sun & moon)
8
+
9
+ - [#178](https://github.com/cypress-io/cypress-design/pull/178) [`d0de778`](https://github.com/cypress-io/cypress-design/commit/d0de77843adb87d8f4804219c6dca8f45b15c650) Thanks [@elevatebart](https://github.com/elevatebart)! - deliver new docs and improved components
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [[`18399c7`](https://github.com/cypress-io/cypress-design/commit/18399c72a52288c67af0935384430d4e4cd24251), [`d0de778`](https://github.com/cypress-io/cypress-design/commit/d0de77843adb87d8f4804219c6dca8f45b15c650)]:
14
+ - @cypress-design/icon-registry@0.21.0
15
+
3
16
  ## 0.19.2
4
17
 
5
18
  ### Patch Changes
package/ReadMe.md CHANGED
@@ -1,8 +1,16 @@
1
1
  # Icon
2
2
 
3
- ## Summary
3
+ ## Install
4
4
 
5
- Use the `<icon>` component to display an icon from the cypress figma library.
5
+ ```bash
6
+ npm install @cypress-design/vue-icon
7
+ ```
8
+
9
+ or with yarn
10
+
11
+ ```bash
12
+ yarn add @cypress-design/vue-icon
13
+ ```
6
14
 
7
15
  ## Usage
8
16
 
@@ -14,12 +22,13 @@ The recommended:
14
22
  - Complete proper TS validation of all props inline
15
23
  - No auto-importation of the component in the template
16
24
 
17
- ```vue
25
+ ```vue live
18
26
  <script setup>
19
- import { IconBookCode } from @cypress-design/vue-icon
27
+ import { IconObjectBookCode } from '@cypress-design/vue-icon'
20
28
  </script>
29
+
21
30
  <template>
22
- <IconBookCode />
31
+ <IconObjectBookCode />
23
32
  </template>
24
33
  ```
25
34
 
@@ -31,12 +40,13 @@ The simplest:
31
40
  - It use TypeScript to validate sizes and colors but with a twist:
32
41
  - If the size of the icon is not available for the icon selected and is available for another, the error will appear on the icon component instead of on the size prop.
33
42
 
34
- ```vue
43
+ ```vue live
35
44
  <script setup>
36
- import Icon from @cypress-design/vue-icon
45
+ import Icon from '@cypress-design/vue-icon'
37
46
  </script>
47
+
38
48
  <template>
39
- <Icon name="book-code" />
49
+ <Icon name="object-book-code" />
40
50
  </template>
41
51
  ```
42
52
 
@@ -44,13 +54,14 @@ Should you need to change the color of the icon on `hover` or `focus` prefix the
44
54
 
45
55
  Here, the `strokeColor` will change on hover from indigo to jade
46
56
 
47
- ```vue
57
+ ```vue live
48
58
  <script setup>
49
- import { IconBook } from '@cypress-design/vue-icon'
59
+ import { IconObjectBook } from '@cypress-design/vue-icon'
50
60
  </script>
61
+
51
62
  <template>
52
- <button>
53
- <IconBook
63
+ <button class="flex items-center gap-[8px]">
64
+ <IconObjectBook
54
65
  size="16"
55
66
  strokeColor="blue-600"
56
67
  hoverStrokeColor="jade-600"
@@ -64,13 +75,14 @@ This prop will change all the pseudo prefixes to be group focused instead of tri
64
75
 
65
76
  To achieve the same goal, in WindiCSS, we would use `group-hover:` instead of `hover:`.
66
77
 
67
- ```vue
78
+ ```vue live
68
79
  <script setup>
69
- import { IconBook } from '@cypress-design/vue-icon'
80
+ import { IconObjectBook } from '@cypress-design/vue-icon'
70
81
  </script>
82
+
71
83
  <template>
72
- <button class="group hover:text-jade-800">
73
- <IconBook
84
+ <button class="group hover:text-jade-800 flex items-center gap-[8px]">
85
+ <IconObjectBook
74
86
  size="16"
75
87
  strokeColor="blue-600"
76
88
  hoverStrokeColor="jade-600"
@@ -79,15 +91,3 @@ import { IconBook } from '@cypress-design/vue-icon'
79
91
  </button>
80
92
  </template>
81
93
  ```
82
-
83
- ## install
84
-
85
- ```bash
86
- npm install @cypress-design/vue-icon
87
- ```
88
-
89
- or with yarn
90
-
91
- ```bash
92
- yarn add @cypress-design/vue-icon
93
- ```