@cypress-design/vue-icon 0.20.0 → 0.22.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 +2 -2
- package/CHANGELOG.md +17 -0
- package/ReadMe.md +127 -6
- package/package.json +31 -30
- package/tsconfig.json +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -2,7 +2,7 @@ $ yarn build:codegen && yarn build:module && yarn build:types
|
|
|
2
2
|
$ node ./generate-icons.js
|
|
3
3
|
$ yarn vite build
|
|
4
4
|
$ /home/runner/work/cypress-design/cypress-design/node_modules/.bin/vite build
|
|
5
|
-
[36mvite v4.2.
|
|
5
|
+
[36mvite v4.2.2 [32mbuilding for production...[36m[39m
|
|
6
6
|
transforming...
|
|
7
7
|
[32m✓[39m 4 modules transformed.
|
|
8
8
|
rendering chunks...
|
|
@@ -10,6 +10,6 @@ computing gzip size...
|
|
|
10
10
|
[2mdist/[22m[36mindex.es.mjs [39m[1m[2m246.76 kB[22m[1m[22m[2m │ gzip: 48.31 kB[22m[2m │ map: 393.55 kB[22m
|
|
11
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
12
|
[2mdist/[22m[36mindex.umd.js [39m[1m[2m230.09 kB[22m[1m[22m[2m │ gzip: 48.39 kB[22m[2m │ map: 385.74 kB[22m
|
|
13
|
-
[32m✓[39m built in
|
|
13
|
+
[32m✓[39m built in 8.76s
|
|
14
14
|
$ yarn tsc --project ./tsconfig.build.json
|
|
15
15
|
$ /home/runner/work/cypress-design/cypress-design/node_modules/.bin/tsc --project ./tsconfig.build.json
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @cypress-design/vue-icon
|
|
2
2
|
|
|
3
|
+
## 0.22.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#207](https://github.com/cypress-io/cypress-design/pull/207) [`bc28be1`](https://github.com/cypress-io/cypress-design/commit/bc28be1760cf7183bbfb6d66f5362ad10ce22d34) Thanks [@elevatebart](https://github.com/elevatebart)! - add focus-within to each icon
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`bc28be1`](https://github.com/cypress-io/cypress-design/commit/bc28be1760cf7183bbfb6d66f5362ad10ce22d34)]:
|
|
12
|
+
- @cypress-design/icon-registry@0.22.0
|
|
13
|
+
|
|
14
|
+
## 0.21.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [#196](https://github.com/cypress-io/cypress-design/pull/196) [`fc6d9e4`](https://github.com/cypress-io/cypress-design/commit/fc6d9e4fedcc01fa8e01b868b0fa66d8895c37d0) Thanks [@elevatebart](https://github.com/elevatebart)! - refactor: avoid constants relative imports
|
|
19
|
+
|
|
3
20
|
## 0.20.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/ReadMe.md
CHANGED
|
@@ -14,13 +14,15 @@ yarn add @cypress-design/vue-icon
|
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
|
+
### Import
|
|
18
|
+
|
|
17
19
|
2 methods exist to load this component:
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
Use named imports of each icon you plan on using.
|
|
22
|
+
I **recommend** this method because:
|
|
20
23
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
- No auto-importation of the component in the template
|
|
24
|
+
- It's tree shakable: Only the icons you use will end up in your bundle
|
|
25
|
+
- You get TS validation of color props: if a color is not available, squigles will appear in your editor
|
|
24
26
|
|
|
25
27
|
```vue live
|
|
26
28
|
<script setup>
|
|
@@ -32,12 +34,17 @@ import { IconObjectBookCode } from '@cypress-design/vue-icon'
|
|
|
32
34
|
</template>
|
|
33
35
|
```
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
Import the default `Icon` component and pass the name of the icon. It can be useful but you should avoid it in production unless you know what you are doing.
|
|
38
|
+
|
|
39
|
+
It has advantages:
|
|
36
40
|
|
|
37
41
|
- Allows for quick browsing of the available icons right in the template
|
|
38
42
|
- Allows passing ids around and delegating color and size until the implementation.
|
|
43
|
+
|
|
44
|
+
But drawbacks too:
|
|
45
|
+
|
|
39
46
|
- it prevents tree shaking.
|
|
40
|
-
- It
|
|
47
|
+
- It uses TypeScript to check sizes and colors but with a twist:
|
|
41
48
|
- 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.
|
|
42
49
|
|
|
43
50
|
```vue live
|
|
@@ -50,6 +57,8 @@ import Icon from '@cypress-design/vue-icon'
|
|
|
50
57
|
</template>
|
|
51
58
|
```
|
|
52
59
|
|
|
60
|
+
### Colors
|
|
61
|
+
|
|
53
62
|
Should you need to change the color of the icon on `hover` or `focus` prefix the props with these words.
|
|
54
63
|
|
|
55
64
|
Here, the `strokeColor` will change on hover from indigo to jade
|
|
@@ -91,3 +100,115 @@ import { IconObjectBook } from '@cypress-design/vue-icon'
|
|
|
91
100
|
</button>
|
|
92
101
|
</template>
|
|
93
102
|
```
|
|
103
|
+
|
|
104
|
+
<!-- props are hardcoded here since volar (vue-component-meta) breaks before getting to generate a proper doc for it -->
|
|
105
|
+
|
|
106
|
+
## Props
|
|
107
|
+
|
|
108
|
+
### size
|
|
109
|
+
|
|
110
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">"4" | "8" | "12" | "16" | "20" | "24" | "48" | "64"</code></p>
|
|
111
|
+
|
|
112
|
+
Size of the icons canvas (in px)
|
|
113
|
+
|
|
114
|
+
### interactiveColorsOnGroup
|
|
115
|
+
|
|
116
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">boolean</code> (optional)</p>
|
|
117
|
+
|
|
118
|
+
Should the interactive variants `hover` and `focus`<br/>be applied on the icon itself or on the parent<br/>group defined in windiCSS
|
|
119
|
+
|
|
120
|
+
### strokeColor
|
|
121
|
+
|
|
122
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
123
|
+
|
|
124
|
+
Color of the stroke
|
|
125
|
+
|
|
126
|
+
### hoverStrokeColor
|
|
127
|
+
|
|
128
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
129
|
+
|
|
130
|
+
Color of the stroke when hovered
|
|
131
|
+
|
|
132
|
+
### focusStrokeColor
|
|
133
|
+
|
|
134
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
135
|
+
|
|
136
|
+
Color of the stroke when focused
|
|
137
|
+
|
|
138
|
+
### hocusStrokeColor
|
|
139
|
+
|
|
140
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
141
|
+
|
|
142
|
+
Color of the stroke when both focused and hovered
|
|
143
|
+
|
|
144
|
+
### fillColor
|
|
145
|
+
|
|
146
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
147
|
+
|
|
148
|
+
Color of the fill
|
|
149
|
+
|
|
150
|
+
### hoverFillColor
|
|
151
|
+
|
|
152
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
153
|
+
|
|
154
|
+
Color of the fill when hovered
|
|
155
|
+
|
|
156
|
+
### focusFillColor
|
|
157
|
+
|
|
158
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
159
|
+
|
|
160
|
+
Color of the fill when focused
|
|
161
|
+
|
|
162
|
+
### hocusFillColor
|
|
163
|
+
|
|
164
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
165
|
+
|
|
166
|
+
Color of the fill when both focused and hovered
|
|
167
|
+
|
|
168
|
+
### secondaryStrokeColor
|
|
169
|
+
|
|
170
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
171
|
+
|
|
172
|
+
Color of the secondary stroke
|
|
173
|
+
|
|
174
|
+
### hoverSecondaryStrokeColor
|
|
175
|
+
|
|
176
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
177
|
+
|
|
178
|
+
Color of the secondary stroke when hovered
|
|
179
|
+
|
|
180
|
+
### focusSecondaryStrokeColor
|
|
181
|
+
|
|
182
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
183
|
+
|
|
184
|
+
Color of the secondary stroke when focused
|
|
185
|
+
|
|
186
|
+
### hocusSecondaryStrokeColor
|
|
187
|
+
|
|
188
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
189
|
+
|
|
190
|
+
Color of the secondary stroke when both focused and hovered
|
|
191
|
+
|
|
192
|
+
### secondaryFillColor
|
|
193
|
+
|
|
194
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
195
|
+
|
|
196
|
+
Color of the secondary fill
|
|
197
|
+
|
|
198
|
+
### hoverSecondaryFillColor
|
|
199
|
+
|
|
200
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
201
|
+
|
|
202
|
+
Color of the secondary fill when hovered
|
|
203
|
+
|
|
204
|
+
### focusSecondaryFillColor
|
|
205
|
+
|
|
206
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
207
|
+
|
|
208
|
+
Color of the secondary fill when focused
|
|
209
|
+
|
|
210
|
+
### hocusSecondaryFillColor
|
|
211
|
+
|
|
212
|
+
<p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
|
|
213
|
+
|
|
214
|
+
Color of the secondary fill when both focused and hovered
|
package/package.json
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
2
|
+
"name": "@cypress-design/vue-icon",
|
|
3
|
+
"version": "0.22.0",
|
|
4
|
+
"files": [
|
|
5
|
+
"*"
|
|
6
|
+
],
|
|
7
|
+
"typings": "./dist/index.d.ts",
|
|
8
|
+
"main": "./dist/index.umd.js",
|
|
9
|
+
"module": "./dist/index.es.mjs",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.es.mjs",
|
|
13
|
+
"require": "./dist/index.umd.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "yarn build:codegen && yarn build:module && yarn build:types",
|
|
19
|
+
"build:codegen": "node ./generate-icons.js",
|
|
20
|
+
"build:module": "yarn vite build",
|
|
21
|
+
"build:types": "yarn tsc --project ./tsconfig.build.json"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@cypress-design/icon-registry": "^0.22.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@cypress-design/css": "*",
|
|
28
|
+
"@types/lodash": "^4.14.194",
|
|
29
|
+
"lodash": "^4.17.21",
|
|
30
|
+
"dedent": "^0.7.0"
|
|
31
|
+
},
|
|
32
|
+
"license": "MIT"
|
|
32
33
|
}
|