@cypress-design/vue-icon 0.23.2 → 0.24.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/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +17 -0
- package/Icon.ts +8 -4
- package/IconVue.cy.tsx +25 -5
- package/_TreeShakableIcons.ts +242 -221
- package/compileProperties.ts +10 -5
- package/dist/Icon.d.ts +1 -1
- package/dist/Icon.d.ts.map +1 -1
- package/dist/_TreeShakableIcons.d.ts +223 -220
- package/dist/_TreeShakableIcons.d.ts.map +1 -1
- package/dist/compileProperties.d.ts +1 -0
- package/dist/compileProperties.d.ts.map +1 -1
- package/dist/index.es.mjs +407 -392
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/generate-icons.js +5 -5
- package/package.json +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -2,14 +2,14 @@ $ 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.
|
|
5
|
+
[36mvite v4.4.6 [32mbuilding for production...[36m[39m
|
|
6
6
|
transforming...
|
|
7
7
|
[32m✓[39m 4 modules transformed.
|
|
8
8
|
rendering chunks...
|
|
9
9
|
computing gzip size...
|
|
10
|
-
[2mdist/[22m[36mindex.es.mjs [39m[1m[
|
|
10
|
+
[2mdist/[22m[36mindex.es.mjs [39m[1m[2m263.56 kB[22m[1m[22m[2m │ gzip: 51.64 kB[22m[2m │ map: 444.18 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
|
-
[2mdist/[22m[36mindex.umd.js [39m[1m[2m228.
|
|
13
|
-
[32m✓ built in
|
|
12
|
+
[2mdist/[22m[36mindex.umd.js [39m[1m[2m228.88 kB[22m[1m[22m[2m │ gzip: 51.08 kB[22m[2m │ map: 431.95 kB[22m
|
|
13
|
+
[32m✓ built in 9.56s[39m
|
|
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.24.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#290](https://github.com/cypress-io/cypress-design/pull/290) [`b3b4fbc`](https://github.com/cypress-io/cypress-design/commit/b3b4fbc189457a311abaf93959ec211067957a5c) Thanks [@elevatebart](https://github.com/elevatebart)! - fix: types of class attribute in icon
|
|
8
|
+
|
|
9
|
+
## 0.24.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#280](https://github.com/cypress-io/cypress-design/pull/280) [`e390827`](https://github.com/cypress-io/cypress-design/commit/e3908270ece513886c64cebcb78cebe0cd0d8c3d) Thanks [@dkasper-was-taken](https://github.com/dkasper-was-taken)! - adding icon for test replay initiative
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`e390827`](https://github.com/cypress-io/cypress-design/commit/e3908270ece513886c64cebcb78cebe0cd0d8c3d)]:
|
|
18
|
+
- @cypress-design/icon-registry@0.25.0
|
|
19
|
+
|
|
3
20
|
## 0.23.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/Icon.ts
CHANGED
|
@@ -14,8 +14,12 @@ export default defineComponent(
|
|
|
14
14
|
(
|
|
15
15
|
// the OpenIconProps helps volar extract the documentation from the props
|
|
16
16
|
// since the IconProps are more restrictive, it will not change the use behavior
|
|
17
|
-
props: OpenIconProps &
|
|
18
|
-
|
|
17
|
+
props: OpenIconProps &
|
|
18
|
+
Pick<IconProps, 'name'> & {
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
+
class?: any
|
|
21
|
+
},
|
|
22
|
+
{ attrs }: { attrs: Omit<SVGAttributes, 'name' | 'class'> },
|
|
19
23
|
) => {
|
|
20
24
|
const ret = computed(() => {
|
|
21
25
|
const { class: className, ...otherProps } = props
|
|
@@ -24,7 +28,7 @@ export default defineComponent(
|
|
|
24
28
|
})
|
|
25
29
|
|
|
26
30
|
const { componentProps, defs } = compileVueIconProperties(
|
|
27
|
-
computed(() => ret.value.iconProps)
|
|
31
|
+
computed(() => ret.value.iconProps),
|
|
28
32
|
)
|
|
29
33
|
|
|
30
34
|
const { shouldRenderDefs } = useShouldRenderDefs(props.name, defs)
|
|
@@ -65,5 +69,5 @@ export default defineComponent(
|
|
|
65
69
|
'name',
|
|
66
70
|
'class',
|
|
67
71
|
],
|
|
68
|
-
}
|
|
72
|
+
},
|
|
69
73
|
)
|
package/IconVue.cy.tsx
CHANGED
|
@@ -26,7 +26,27 @@ describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
|
|
|
26
26
|
mount(() => <IconDocumentBlank {...props} />)
|
|
27
27
|
})
|
|
28
28
|
|
|
29
|
-
it('renders
|
|
29
|
+
it('renders correctly with array classes', () => {
|
|
30
|
+
mount(() => (
|
|
31
|
+
<IconObjectBookCode
|
|
32
|
+
class={[
|
|
33
|
+
'text-red-100',
|
|
34
|
+
'text-red-500',
|
|
35
|
+
{ 'text-indigo-100': true, 'text-indigo-600': true },
|
|
36
|
+
]}
|
|
37
|
+
fillColor="red-100"
|
|
38
|
+
strokeColor="red-500"
|
|
39
|
+
secondaryFillColor="indigo-100"
|
|
40
|
+
secondaryStrokeColor="indigo-600"
|
|
41
|
+
/>
|
|
42
|
+
))
|
|
43
|
+
|
|
44
|
+
cy.get('svg')
|
|
45
|
+
.should('have.class', 'text-red-100')
|
|
46
|
+
.and('have.class', 'text-red-500')
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
it('renders multiple times an icon with defs with the generic Icon component', () => {
|
|
30
50
|
mount(() => (
|
|
31
51
|
<div class="p-2">
|
|
32
52
|
<Icon name="browser-webkit" class="w-16 h-16 hidden" />
|
|
@@ -80,9 +100,9 @@ describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
|
|
|
80
100
|
cy.get('button').click()
|
|
81
101
|
})
|
|
82
102
|
|
|
83
|
-
it('renders multiple times an icon with defs with the Icon
|
|
103
|
+
it('renders multiple times an icon with defs with the Icon component and toggle it', () => {
|
|
84
104
|
cy.viewport(200, 200)
|
|
85
|
-
const iconName = ref<'browser-
|
|
105
|
+
const iconName = ref<'browser-edge' | 'browser-safari'>('browser-safari')
|
|
86
106
|
mount(() => (
|
|
87
107
|
<div class="p-2 flex flex-col h-screen items-center justify-center">
|
|
88
108
|
<Icon name={iconName.value} class="w-16 h-16 hidden" />
|
|
@@ -90,9 +110,9 @@ describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
|
|
|
90
110
|
<button
|
|
91
111
|
onClick={() =>
|
|
92
112
|
(iconName.value =
|
|
93
|
-
iconName.value === 'browser-
|
|
113
|
+
iconName.value === 'browser-edge'
|
|
94
114
|
? 'browser-safari'
|
|
95
|
-
: 'browser-
|
|
115
|
+
: 'browser-edge')
|
|
96
116
|
}
|
|
97
117
|
>
|
|
98
118
|
toggle
|