@cypress-design/vue-icon 0.22.2 → 0.22.3

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.
@@ -7,9 +7,9 @@ transforming...
7
7
  ✓ 4 modules transformed.
8
8
  rendering chunks...
9
9
  computing gzip size...
10
- dist/index.es.mjs 249.74 kB │ gzip: 48.77 kB │ map: 397.30 kB
10
+ dist/index.es.mjs 270.24 kB │ gzip: 49.28 kB │ map: 441.25 kB
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
- dist/index.umd.js 233.00 kB │ gzip: 48.84 kB │ map: 389.46 kB
13
- ✓ built in 23.64s
12
+ dist/index.umd.js 248.08 kB │ gzip: 49.27 kB │ map: 429.09 kB
13
+ ✓ built in 16.39s
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,14 @@
1
1
  # @cypress-design/vue-icon
2
2
 
3
+ ## 0.22.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#219](https://github.com/cypress-io/cypress-design/pull/219) [`0a4ce3b`](https://github.com/cypress-io/cypress-design/commit/0a4ce3bb55b9ab0510f7fb9ba207d5fdc3cb723f) Thanks [@elevatebart](https://github.com/elevatebart)! - refactor some typings so eslint passes without warning
8
+
9
+ - Updated dependencies [[`0a4ce3b`](https://github.com/cypress-io/cypress-design/commit/0a4ce3bb55b9ab0510f7fb9ba207d5fdc3cb723f)]:
10
+ - @cypress-design/icon-registry@0.22.2
11
+
3
12
  ## 0.22.2
4
13
 
5
14
  ### Patch Changes
package/Icon.ts CHANGED
@@ -1,9 +1,18 @@
1
1
  import { compileIcon } from '@cypress-design/icon-registry'
2
- import type { IconProps } from '@cypress-design/icon-registry'
2
+ import type { OpenIconProps, IconProps } from '@cypress-design/icon-registry'
3
3
  import { h } from 'vue'
4
4
  import type { SVGAttributes } from 'vue'
5
5
  import { compileVueIconProperties } from './compileProperties'
6
6
 
7
- export default (props: IconProps & Omit<SVGAttributes, 'name'>) => {
8
- return h('svg', compileVueIconProperties(compileIcon(props)))
7
+ export default (
8
+ // the OpenIconProps helps volar extract the documentation from the props
9
+ // since the IconProps are more restrictive, it will not change the use behavior
10
+ props: OpenIconProps & Pick<IconProps, 'name'> & Omit<SVGAttributes, 'name'>
11
+ ) => {
12
+ const { class: className, ...otherProps } = props
13
+ const properties = compileVueIconProperties(compileIcon(otherProps))
14
+ return h('svg', {
15
+ ...properties,
16
+ class: [className, properties.class],
17
+ })
9
18
  }
package/IconVue.cy.tsx CHANGED
@@ -1,7 +1,8 @@
1
- import { IconObjectBookCode } from './index'
1
+ import assertions from '../assertions'
2
+ import Icon, { IconDocumentBlank, IconObjectBookCode } from './index'
2
3
  import { mount } from 'cypress/vue'
3
4
 
4
- describe('Icon', () => {
5
+ describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
5
6
  it('renders correctly', () => {
6
7
  mount(() => (
7
8
  <IconObjectBookCode
@@ -12,4 +13,11 @@ describe('Icon', () => {
12
13
  />
13
14
  ))
14
15
  })
16
+
17
+ assertions((props) => {
18
+ if (props.name) {
19
+ return mount(() => <Icon {...props} />)
20
+ }
21
+ mount(() => <IconDocumentBlank {...props} />)
22
+ })
15
23
  })
package/ReadMe.md CHANGED
@@ -104,115 +104,3 @@ import { IconObjectBook } from '@cypress-design/vue-icon'
104
104
  </button>
105
105
  </template>
106
106
  ```
107
-
108
- <!-- props are hardcoded here since volar (vue-component-meta) breaks before getting to generate a proper doc for it -->
109
-
110
- ## Props
111
-
112
- ### size
113
-
114
- <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>
115
-
116
- Size of the icons canvas (in px)
117
-
118
- ### interactiveColorsOnGroup
119
-
120
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">boolean</code> (optional)</p>
121
-
122
- Should the interactive variants `hover` and `focus`<br/>be applied on the icon itself or on the parent<br/>group defined in windiCSS
123
-
124
- ### strokeColor
125
-
126
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
127
-
128
- Color of the stroke
129
-
130
- ### hoverStrokeColor
131
-
132
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
133
-
134
- Color of the stroke when hovered
135
-
136
- ### focusStrokeColor
137
-
138
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
139
-
140
- Color of the stroke when focused
141
-
142
- ### hocusStrokeColor
143
-
144
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
145
-
146
- Color of the stroke when both focused and hovered
147
-
148
- ### fillColor
149
-
150
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
151
-
152
- Color of the fill
153
-
154
- ### hoverFillColor
155
-
156
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
157
-
158
- Color of the fill when hovered
159
-
160
- ### focusFillColor
161
-
162
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
163
-
164
- Color of the fill when focused
165
-
166
- ### hocusFillColor
167
-
168
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
169
-
170
- Color of the fill when both focused and hovered
171
-
172
- ### secondaryStrokeColor
173
-
174
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
175
-
176
- Color of the secondary stroke
177
-
178
- ### hoverSecondaryStrokeColor
179
-
180
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
181
-
182
- Color of the secondary stroke when hovered
183
-
184
- ### focusSecondaryStrokeColor
185
-
186
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
187
-
188
- Color of the secondary stroke when focused
189
-
190
- ### hocusSecondaryStrokeColor
191
-
192
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
193
-
194
- Color of the secondary stroke when both focused and hovered
195
-
196
- ### secondaryFillColor
197
-
198
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
199
-
200
- Color of the secondary fill
201
-
202
- ### hoverSecondaryFillColor
203
-
204
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
205
-
206
- Color of the secondary fill when hovered
207
-
208
- ### focusSecondaryFillColor
209
-
210
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
211
-
212
- Color of the secondary fill when focused
213
-
214
- ### hocusSecondaryFillColor
215
-
216
- <p><b>type</b> <code class="bg-gray-50 dark:bg-gray-800 py-[2px] px-[4px]">WindiColor</code> (optional)</p>
217
-
218
- Color of the secondary fill when both focused and hovered