@cypress-design/vue-icon 3.3.2 → 3.4.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.
@@ -4,7 +4,7 @@ transforming...
4
4
  ✓ 17 modules transformed.
5
5
  rendering chunks...
6
6
  computing gzip size...
7
- dist/index.es.mjs 478.80 kB │ gzip: 95.07 kB │ map: 803.51 kB
7
+ dist/index.es.mjs 478.80 kB │ gzip: 95.07 kB │ map: 803.38 kB
8
8
  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.
9
- dist/index.umd.js 434.59 kB │ gzip: 93.68 kB │ map: 784.06 kB
10
- ✓ built in 10.77s
9
+ dist/index.umd.js 434.59 kB │ gzip: 93.68 kB │ map: 783.93 kB
10
+ ✓ built in 11.61s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @cypress-design/vue-icon
2
2
 
3
+ ## 3.4.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @cypress-design/icon-registry@3.4.0
9
+
3
10
  ## 3.3.2
4
11
 
5
12
  ### Patch Changes
package/IconVue.cy.tsx CHANGED
@@ -49,17 +49,17 @@ describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
49
49
  it('renders multiple times an icon with defs with the generic Icon component', () => {
50
50
  mount(() => (
51
51
  <div class="p-2">
52
- <Icon name="browser-webkit" class="w-16 h-16 hidden" />
53
- <Icon name="browser-webkit" class="w-16 h-16" />
52
+ <Icon name="browser-webkit" class="hidden h-16 w-16" />
53
+ <Icon name="browser-webkit" class="h-16 w-16" />
54
54
  </div>
55
55
  ))
56
56
  })
57
57
 
58
58
  it('renders multiple times an icon with defs', () => {
59
59
  mount(() => (
60
- <div class="p-2 flex">
61
- <IconBrowserWebkit class="w-16 h-16 hidden" />
62
- <IconBrowserWebkit class="w-16 h-16" />
60
+ <div class="flex p-2">
61
+ <IconBrowserWebkit class="hidden h-16 w-16" />
62
+ <IconBrowserWebkit class="h-16 w-16" />
63
63
  </div>
64
64
  ))
65
65
  })
@@ -68,9 +68,9 @@ describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
68
68
  cy.viewport(200, 100)
69
69
  const iconVisible = ref(true)
70
70
  mount(() => (
71
- <div class="p-2 flex">
72
- {iconVisible.value ? <IconBrowserWebkit class="w-16 h-16" /> : null}
73
- <IconBrowserWebkit class="w-16 h-16" />
71
+ <div class="flex p-2">
72
+ {iconVisible.value ? <IconBrowserWebkit class="h-16 w-16" /> : null}
73
+ <IconBrowserWebkit class="h-16 w-16" />
74
74
  <button onClick={() => (iconVisible.value = !iconVisible.value)}>
75
75
  toggle
76
76
  </button>
@@ -86,11 +86,11 @@ describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
86
86
  cy.viewport(200, 100)
87
87
  const iconVisible = ref(true)
88
88
  mount(() => (
89
- <div class="p-2 flex">
89
+ <div class="flex p-2">
90
90
  <IconBrowserWebkit
91
- class={`w-16 h-16 ${iconVisible.value ? '' : 'hidden'}`}
91
+ class={`h-16 w-16 ${iconVisible.value ? '' : 'hidden'}`}
92
92
  />
93
- <IconBrowserWebkit class="w-16 h-16" />
93
+ <IconBrowserWebkit class="h-16 w-16" />
94
94
  <button onClick={() => (iconVisible.value = !iconVisible.value)}>
95
95
  toggle
96
96
  </button>
@@ -104,9 +104,9 @@ describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
104
104
  cy.viewport(200, 200)
105
105
  const iconName = ref<'browser-edge' | 'browser-safari'>('browser-safari')
106
106
  mount(() => (
107
- <div class="p-2 flex flex-col h-screen items-center justify-center">
108
- <Icon name={iconName.value} class="w-16 h-16 hidden" />
109
- <Icon name={iconName.value} class="w-16 h-16" />
107
+ <div class="flex h-screen flex-col items-center justify-center p-2">
108
+ <Icon name={iconName.value} class="hidden h-16 w-16" />
109
+ <Icon name={iconName.value} class="h-16 w-16" />
110
110
  <button
111
111
  onClick={() =>
112
112
  (iconName.value =
@@ -124,14 +124,14 @@ describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
124
124
  })
125
125
 
126
126
  it('renders a title element when passed an alt prop', () => {
127
- mount(() => <IconBrowserWebkit class="w-16 h-16" alt="This is a title" />)
127
+ mount(() => <IconBrowserWebkit class="h-16 w-16" alt="This is a title" />)
128
128
 
129
129
  cy.get('svg title').should('have.text', 'This is a title')
130
130
  })
131
131
 
132
132
  it('renders class passed only once', () => {
133
- mount(() => <IconBrowserWebkit class="w-16 h-16" />)
133
+ mount(() => <IconBrowserWebkit class="h-16 w-16" />)
134
134
 
135
- cy.get('svg[width="16"]').should('have.attr', 'class', 'w-16 h-16')
135
+ cy.get('svg[width="16"]').should('have.attr', 'class', 'h-16 w-16')
136
136
  })
137
137
  })
package/ReadMe.md CHANGED
@@ -94,7 +94,7 @@ import { IconObjectBook } from '@cypress-design/vue-icon'
94
94
  </script>
95
95
 
96
96
  <template>
97
- <button class="group hover:text-jade-800 flex items-center gap-[8px]">
97
+ <button class="group flex items-center gap-[8px] hover:text-jade-800">
98
98
  <IconObjectBook
99
99
  size="16"
100
100
  strokeColor="blue-600"
@@ -1,4 +1,4 @@
1
- import { DefineComponent, ref } from 'vue'
1
+ import { ref } from 'vue'
2
2
  import { mount } from 'cypress/vue'
3
3
 
4
4
  export function iconTests(Icon: any) {
@@ -8,7 +8,7 @@ export function iconTests(Icon: any) {
8
8
  animated={false}
9
9
  width={400}
10
10
  height={400}
11
- class="icon-dark-secondary-indigo-500 icon-light-indigo-300 icon-dark-indigo-400"
11
+ class="icon-light-indigo-300 icon-dark-indigo-400 icon-dark-secondary-indigo-500"
12
12
  />
13
13
  ))
14
14
  })
@@ -24,7 +24,7 @@ export function iconTests(Icon: any) {
24
24
  animated={isAnimated.value}
25
25
  width={400}
26
26
  height={400}
27
- class="icon-dark-secondary-indigo-500 icon-light-indigo-300 icon-dark-indigo-400 m-[50px]"
27
+ class="icon-light-indigo-300 icon-dark-indigo-400 icon-dark-secondary-indigo-500 m-[50px]"
28
28
  onClick={() => {
29
29
  isAnimated.value = !isAnimated.value
30
30
  }}
@@ -61,23 +61,23 @@ export function iconTests(Icon: any) {
61
61
 
62
62
  it('renders both side by side', { viewportWidth: 900 }, () => {
63
63
  mount(() => (
64
- <div class="bg-black flex gap-4 text-center text-2xl">
64
+ <div class="flex gap-4 bg-black text-center text-2xl">
65
65
  <div>
66
- <h2 class="text-indigo-200 font-bold">not animated</h2>
66
+ <h2 class="font-bold text-indigo-200">not animated</h2>
67
67
  <Icon
68
68
  animated={false}
69
69
  width={400}
70
70
  height={400}
71
- class="icon-dark-secondary-indigo-500 icon-light-indigo-300 icon-dark-indigo-400"
71
+ class="icon-light-indigo-300 icon-dark-indigo-400 icon-dark-secondary-indigo-500"
72
72
  />
73
73
  </div>
74
74
  <div>
75
- <h2 class="text-indigo-200 font-bold">animated</h2>
75
+ <h2 class="font-bold text-indigo-200">animated</h2>
76
76
  <Icon
77
77
  animated={true}
78
78
  width={400}
79
79
  height={400}
80
- class="icon-dark-secondary-indigo-500 icon-light-indigo-300 icon-dark-indigo-400"
80
+ class="icon-light-indigo-300 icon-dark-indigo-400 icon-dark-secondary-indigo-500"
81
81
  />
82
82
  </div>
83
83
  </div>
@@ -10,11 +10,6 @@ import {
10
10
  } from 'vue'
11
11
  import type { SVGAttributes } from 'vue'
12
12
 
13
- export type VueComponentClassObject =
14
- | Record<string, boolean>
15
- | string
16
- | Array<Record<string, boolean> | string>
17
-
18
13
  /**
19
14
  * Icon names of the SVGs whose defs already appear in the DOM
20
15
  */
@@ -1,7 +1,6 @@
1
1
  import type { OpenIconProps } from '@cypress-design/icon-registry';
2
2
  import { ComputedRef, Ref } from 'vue';
3
3
  import type { SVGAttributes } from 'vue';
4
- export type VueComponentClassObject = Record<string, boolean> | string | Array<Record<string, boolean> | string>;
5
4
  /**
6
5
  * There is a bug in the chrome renderer
7
6
  * If an svg containing defs is twice on the page
@@ -1 +1 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