@cypress-design/vue-icon 0.32.0 → 0.33.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.
Files changed (48) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/CHANGELOG.md +14 -0
  3. package/Icon.ts +1 -0
  4. package/IconVue.cy.tsx +6 -0
  5. package/_TreeShakableIcons.ts +108 -3
  6. package/animated/_IconGeneralChatBubble.cy.tsx +6 -0
  7. package/animated/_IconGeneralChatBubble.vue +30 -0
  8. package/animated/_IconObjectGear.cy.tsx +6 -0
  9. package/animated/_IconObjectGear.vue +27 -0
  10. package/animated/_IconTechnologyGitBranches.cy.tsx +6 -0
  11. package/animated/_IconTechnologyGitBranches.vue +30 -0
  12. package/animated/_IconTechnologyServer.cy.tsx +6 -0
  13. package/animated/_IconTechnologyServer.vue +43 -0
  14. package/animated/_IconViewChart.cy.tsx +6 -0
  15. package/animated/_IconViewChart.vue +37 -0
  16. package/animated/_PathMorpher.vue +64 -0
  17. package/animated/_testUtils.tsx +62 -0
  18. package/animated/index.ts +5 -0
  19. package/compileProperties.ts +8 -3
  20. package/dist/Icon.d.ts +3 -0
  21. package/dist/Icon.d.ts.map +1 -1
  22. package/dist/_TreeShakableIcons.d.ts +12 -0
  23. package/dist/_TreeShakableIcons.d.ts.map +1 -1
  24. package/dist/animated/_IconGeneralChatBubble.vue.d.ts +30 -0
  25. package/dist/animated/_IconGeneralChatBubble.vue.d.ts.map +1 -0
  26. package/dist/animated/_IconObjectGear.vue.d.ts +30 -0
  27. package/dist/animated/_IconObjectGear.vue.d.ts.map +1 -0
  28. package/dist/animated/_IconTechnologyGitBranches.vue.d.ts +30 -0
  29. package/dist/animated/_IconTechnologyGitBranches.vue.d.ts.map +1 -0
  30. package/dist/animated/_IconTechnologyServer.vue.d.ts +30 -0
  31. package/dist/animated/_IconTechnologyServer.vue.d.ts.map +1 -0
  32. package/dist/animated/_IconViewChart.vue.d.ts +30 -0
  33. package/dist/animated/_IconViewChart.vue.d.ts.map +1 -0
  34. package/dist/animated/_PathMorpher.vue.d.ts +39 -0
  35. package/dist/animated/_PathMorpher.vue.d.ts.map +1 -0
  36. package/dist/animated/index.d.ts +6 -0
  37. package/dist/animated/index.d.ts.map +1 -0
  38. package/dist/compileProperties.d.ts +1 -0
  39. package/dist/compileProperties.d.ts.map +1 -1
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.es.mjs +1514 -1220
  43. package/dist/index.es.mjs.map +1 -1
  44. package/dist/index.umd.js +2 -2
  45. package/dist/index.umd.js.map +1 -1
  46. package/generate-icons.js +1 -1
  47. package/index.ts +1 -0
  48. package/package.json +3 -2
@@ -3,14 +3,14 @@ $ node ./generate-icons.js
3
3
  $ yarn vite build
4
4
  $ /home/runner/work/cypress-design/cypress-design/node_modules/.bin/vite build
5
5
  The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
6
- vite v5.0.11 building for production...
6
+ vite v5.1.4 building for production...
7
7
  transforming...
8
- ✓ 4 modules transformed.
8
+ ✓ 18 modules transformed.
9
9
  rendering chunks...
10
10
  computing gzip size...
11
- dist/index.es.mjs 252.85 kB │ gzip: 49.43 kB │ map: 466.10 kB
11
+ dist/index.es.mjs 274.12 kB │ gzip: 55.03 kB │ map: 489.89 kB
12
12
  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.
13
- dist/index.umd.js 228.59 kB │ gzip: 48.94 kB │ map: 454.77 kB
14
- ✓ built in 3.44s
13
+ dist/index.umd.js 248.21 kB │ gzip: 54.41 kB │ map: 477.96 kB
14
+ ✓ built in 4.23s
15
15
  $ yarn vue-tsc --project ./tsconfig.build.json
16
16
  $ /home/runner/work/cypress-design/cypress-design/node_modules/.bin/vue-tsc --project ./tsconfig.build.json
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @cypress-design/vue-icon
2
2
 
3
+ ## 0.33.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#391](https://github.com/cypress-io/cypress-design/pull/391) [`7f9ebbb`](https://github.com/cypress-io/cypress-design/commit/7f9ebbb83744d4109498f921f7de5539ccc3b479) Thanks [@elevatebart](https://github.com/elevatebart)! - feat: add alt prop to icons to make them accessible if not presentational
8
+
9
+ ### Patch Changes
10
+
11
+ - [#367](https://github.com/cypress-io/cypress-design/pull/367) [`2f984a0`](https://github.com/cypress-io/cypress-design/commit/2f984a02807f344a878ac65ac9fab62bc0c9442d) Thanks [@elevatebart](https://github.com/elevatebart)! - first creation of menu item
12
+
13
+ - Updated dependencies [[`7f9ebbb`](https://github.com/cypress-io/cypress-design/commit/7f9ebbb83744d4109498f921f7de5539ccc3b479), [`2f984a0`](https://github.com/cypress-io/cypress-design/commit/2f984a02807f344a878ac65ac9fab62bc0c9442d)]:
14
+ - @cypress-design/icon-registry@0.35.0
15
+ - @cypress-design/constants-icon@0.0.2
16
+
3
17
  ## 0.32.0
4
18
 
5
19
  ### Minor Changes
package/Icon.ts CHANGED
@@ -16,6 +16,7 @@ export default defineComponent({
16
16
  'interactiveColorsOnGroup',
17
17
  'size',
18
18
  'name',
19
+ 'alt',
19
20
  'class',
20
21
  ],
21
22
  setup(
package/IconVue.cy.tsx CHANGED
@@ -122,4 +122,10 @@ describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
122
122
 
123
123
  cy.get('button').click()
124
124
  })
125
+
126
+ it('renders a title element when passed an alt prop', () => {
127
+ mount(() => <IconBrowserWebkit class="w-16 h-16" alt="This is a title" />)
128
+
129
+ cy.get('svg title').should('have.text', 'This is a title')
130
+ })
125
131
  })
@@ -5,7 +5,7 @@ import * as iconsRegistry from '@cypress-design/icon-registry'
5
5
  import { compileVueIconProperties, useShouldRenderDefs } from './compileProperties'
6
6
 
7
7
  const __iconComponentOpts__ = {
8
- props: [...iconsRegistry.ICON_COLOR_PROP_NAMES, 'interactiveColorsOnGroup', 'size', 'class'] as string[],
8
+ props: [...iconsRegistry.ICON_COLOR_PROP_NAMES, 'interactiveColorsOnGroup', 'size', 'class', 'alt'] as string[],
9
9
  } as any
10
10
 
11
11
  function useIconProps(props: SVGAttributes & Omit<iconsRegistry.IconProps, 'name'>, iconBodiesAndDefs: Record<string, {body: string, defs?: string}>, availableSizes: string[], name: string) {
@@ -2397,8 +2397,11 @@ export const IconGeneralChatBubble = defineComponent<Omit<iconsRegistry.IconGene
2397
2397
  const iconPropsStep = useIconProps(props, {
2398
2398
  "16": {
2399
2399
  "body": "<path fill=\"#D0D2E0\" stroke=\"currentColor\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 3H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2v3l5-3h3a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z\" class=\"icon-dark-stroke icon-light-fill\"/>"
2400
+ },
2401
+ "24": {
2402
+ "body": "<path fill=\"#F3F4FA\" d=\"M19 18a3 3 0 0 0 3-3v-4a3 3 0 0 0-3-3h-6a3 3 0 0 0-3 3v4a3 3 0 0 0 3 3h1l3.915 1.957a.75.75 0 0 0 1.085-.67z\" class=\"icon-light-secondary\"/><path stroke=\"#1B1E2E\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20 18a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2l5 2.5V18z\" class=\"icon-dark\"/><path fill=\"#BFC2D4\" d=\"M17 7a3 3 0 0 0-3-3H5a3 3 0 0 0-3 3v4a3 3 0 0 0 3 3v1.287a.75.75 0 0 0 1.085.67L10 14h4a3 3 0 0 0 3-3z\" class=\"icon-light\"/><path stroke=\"#1B1E2E\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M17 6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h1v2.5l5-2.5h5a2 2 0 0 0 2-2z\" class=\"icon-dark\"/><path fill=\"#1B1E2E\" d=\"M7 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0M10.5 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0M14 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" class=\"icon-dark\"/>"
2400
2403
  }
2401
- }, ["16"], "general-chat-bubble")
2404
+ }, ["16","24"], "general-chat-bubble")
2402
2405
 
2403
2406
  const { componentProps, defs } = compileVueIconProperties(iconPropsStep)
2404
2407
 
@@ -3243,8 +3246,11 @@ export const IconObjectBugSmall = defineComponent<Omit<iconsRegistry.IconObjectB
3243
3246
  const iconPropsStep = useIconProps(props, {
3244
3247
  "16": {
3245
3248
  "body": "<path fill=\"#D0D2E0\" fill-rule=\"evenodd\" d=\"M6 7H5v4s1 2 3 2 3-2 3-2V7H6\" class=\"icon-light\" clip-rule=\"evenodd\"/><path fill=\"#D0D2E0\" d=\"M6 5v2h4V5a2 2 0 1 0-4 0\" class=\"icon-light\"/><path fill=\"currentColor\" d=\"M13 10a1 1 0 1 0 0-2zM3 8a1 1 0 0 0 0 2zm11-3a1 1 0 1 0-2 0zM4 5a1 1 0 0 0-2 0zm8 8a1 1 0 1 0 2 0zM2 13a1 1 0 1 0 2 0zm3-5h1V6H5zm2-1V5H5v2zM6 8h4V6H6zm4 0h1V6h-1zM9 5v2h2V5zm1 2v2h2V7zm1 3h2V8h-2zM6 9V7H4v2zM5 8H3v2h2zm5 1v2h2V9zm1 2-.894-.448v-.002l.002-.001v-.002l-.002.005a2 2 0 0 1-.126.206 3.6 3.6 0 0 1-.437.535C9.152 11.683 8.64 12 8 12v2c1.359 0 2.348-.684 2.957-1.293a5.6 5.6 0 0 0 .914-1.214l.015-.029.005-.01.002-.004v-.001l.001-.001zm-5 0V9H4v2zm2 1c-.641 0-1.152-.316-1.543-.707a3.6 3.6 0 0 1-.563-.741l-.002-.005v.002l.001.001v.002h.001L5 11l-.894.448.001.002.002.004.005.01a2 2 0 0 0 .065.118 5.555 5.555 0 0 0 .864 1.125C5.652 13.317 6.64 14 8 14zm0-8a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3zM7 5a1 1 0 0 1 1-1V2a3 3 0 0 0-3 3zm5 0a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3zM5 6a1 1 0 0 1-1-1H2a3 3 0 0 0 3 3zm6 6a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3zm-7 1a1 1 0 0 1 1-1v-2a3 3 0 0 0-3 3z\" class=\"icon-dark\"/>"
3249
+ },
3250
+ "24": {
3251
+ "body": "<path fill=\"#D0D2E0\" d=\"M15 10V7a3 3 0 1 0-6 0v3zM15 10H9a3.16 3.16 0 0 0-2 2v4a4.564 4.564 0 0 0 4.014 3.89l.685.076q.301.034.602 0l.685-.076A4.564 4.564 0 0 0 17 16v-4a3.16 3.16 0 0 0-2-2\" class=\"icon-light\"/><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"2\" d=\"M17 12v2m0-2 .265-.088A4 4 0 0 0 20 8.117V7m-3 5v0a3.16 3.16 0 0 0-2-2v0m0 0V7a3 3 0 0 0-3-3v0a3 3 0 0 0-3 3v3m6 0H9m0 0v0a3.16 3.16 0 0 0-2 2v0m0 0v2m0-2-.265-.088A4 4 0 0 1 4 8.117V7m13 7h3m-3 0v2M7 14H4m3 0v2m10 0v0a4.564 4.564 0 0 1-4.014 3.89l-.685.076q-.301.034-.602 0l-.685-.076A4.564 4.564 0 0 1 7 16v0m10 0 .265.088A4 4 0 0 1 20 19.883V21M7 16l-.265.088A4 4 0 0 0 4 19.883V21\" class=\"icon-dark\"/>"
3246
3252
  }
3247
- }, ["16"], "object-bug-small")
3253
+ }, ["16","24"], "object-bug-small")
3248
3254
 
3249
3255
  const { componentProps, defs } = compileVueIconProperties(iconPropsStep)
3250
3256
 
@@ -5246,6 +5252,30 @@ export const IconTechnologyElementSelector = defineComponent<Omit<iconsRegistry.
5246
5252
  })
5247
5253
 
5248
5254
 
5255
+ export const IconTechnologyGitBranches = defineComponent<Omit<iconsRegistry.IconTechnologyGitBranchesProps, 'name'> & {
5256
+ class?: any
5257
+ }>({
5258
+ ...__iconComponentOpts__,
5259
+ setup(props: Omit<iconsRegistry.IconTechnologyGitBranchesProps, 'name'> & {
5260
+ class?: any
5261
+ }, { attrs }: { attrs: Omit<SVGAttributes, 'name' | 'class'> }) {
5262
+ const iconPropsStep = useIconProps(props, {
5263
+ "24": {
5264
+ "body": "<path fill=\"#D0D2E0\" d=\"M11 4a1 1 0 0 0-1-1H6a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h4.026a.974.974 0 0 0 .974-.974 2 2 0 0 0-.824-1.616l-3.029-2.203A4 4 0 0 1 5.5 12.972V12.5a1 1 0 1 1 2 0v.472a2 2 0 0 0 .824 1.618L11 16.536v-3.538c0-.628-.297-1.22-.8-1.598l-1.6-1.2A4 4 0 0 1 7 7v-.5a1 1 0 0 1 2 0V7a2 2 0 0 0 .8 1.6l1.2.9z\" class=\"icon-light-secondary\"/><path fill=\"#E1E3ED\" d=\"M13 20a1 1 0 0 0 1 1h4a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3h-4a1 1 0 0 0-1 1v8.955l1.728-1.344a2 2 0 0 0 .772-1.578V9.5a1 1 0 1 1 2 0v.533a4 4 0 0 1-1.544 3.157l-2.184 1.699A2 2 0 0 0 13 16.466z\" class=\"icon-light\"/><path fill=\"#1B1E2E\" d=\"M16.5 10.033h1zm1-.533a1 1 0 1 0-2 0zm-6.7 1.1.6-.8zM9.2 9.4l-.6.8zM9 6.5a1 1 0 0 0-2 0zm1.765 11.102-.589.808zm-3.03-2.203-.588.808zM7.5 12.5a1 1 0 1 0-2 0zm7.842-.1-.614-.789zm-2.184 1.7.614.789zM6 3v1zm12 0V2zm2 3v12h2V6zM4 18V6H2v12zm13.5-7.967V9.5h-2v.533zM11.4 9.8 9.8 8.6l-1.2 1.6 1.6 1.2zM9 7v-.5H7V7zm2.353 9.793-3.03-2.203-1.176 1.617 3.03 2.203zM7.5 12.973V12.5h-2v.472zm7.228-1.362-2.184 1.699 1.228 1.579 2.184-1.699zM13 12.997V3h-2v9.998zm-.456.313A4 4 0 0 0 11 16.466h2a2 2 0 0 1 .772-1.578zm-4.22 1.28a2 2 0 0 1-.824-1.618h-2a4 4 0 0 0 1.647 3.235zM9.8 8.6A2 2 0 0 1 9 7H7a4 4 0 0 0 1.6 3.2zm.376 9.81A2 2 0 0 1 11 20.026l2-.001a4 4 0 0 0-1.647-3.232zm5.324-8.377a2 2 0 0 1-.772 1.579l1.228 1.578a4 4 0 0 0 1.544-3.157zM10.2 11.4a2 2 0 0 1 .8 1.598l2-.001A4 4 0 0 0 11.4 9.8zm.8 5.066v3.56h2v-3.56zM13 21v-.975h-2V21zm0-4.534v-3.469h-2v3.47zM6 4h6V2H6zm6 0h6V2h-6zm6 16h-6v2h6zm-6 0H6v2h6zM4 6a2 2 0 0 1 2-2V2a4 4 0 0 0-4 4zM2 18a4 4 0 0 0 4 4v-2a2 2 0 0 1-2-2zm18 0a2 2 0 0 1-2 2v2a4 4 0 0 0 4-4zm2-12a4 4 0 0 0-4-4v2a2 2 0 0 1 2 2z\" class=\"icon-dark\"/>"
5265
+ }
5266
+ }, ["24"], "technology-git-branches")
5267
+
5268
+ const { componentProps, defs } = compileVueIconProperties(iconPropsStep)
5269
+
5270
+ const { shouldRenderDefs } = useShouldRenderDefs(
5271
+ "technology-git-branches",
5272
+ defs)
5273
+
5274
+ return () => hyperSVG(componentProps, defs, shouldRenderDefs, attrs, props.class)
5275
+ },
5276
+ })
5277
+
5278
+
5249
5279
  export const IconTechnologyImageScreenshot = defineComponent<Omit<iconsRegistry.IconTechnologyImageScreenshotProps, 'name'> & {
5250
5280
  class?: any
5251
5281
  }>({
@@ -5375,6 +5405,30 @@ export const IconTechnologyPullRequest = defineComponent<Omit<iconsRegistry.Icon
5375
5405
  })
5376
5406
 
5377
5407
 
5408
+ export const IconTechnologyServerAlt = defineComponent<Omit<iconsRegistry.IconTechnologyServerAltProps, 'name'> & {
5409
+ class?: any
5410
+ }>({
5411
+ ...__iconComponentOpts__,
5412
+ setup(props: Omit<iconsRegistry.IconTechnologyServerAltProps, 'name'> & {
5413
+ class?: any
5414
+ }, { attrs }: { attrs: Omit<SVGAttributes, 'name' | 'class'> }) {
5415
+ const iconPropsStep = useIconProps(props, {
5416
+ "24": {
5417
+ "body": "<rect width=\"20\" height=\"6\" x=\"2\" y=\"9\" fill=\"#D0D2E0\" class=\"icon-light\" rx=\"2\"/><path fill=\"#1B1E2E\" fill-rule=\"evenodd\" d=\"M1 17a3 3 0 0 1 3-3h16a3 3 0 0 1 3 3v2a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3zm3-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm3 2a1 1 0 0 1 1-1h4a1 1 0 1 1 0 2H8a1 1 0 0 1-1-1m-2 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2\" class=\"icon-dark\" clip-rule=\"evenodd\"/><path fill=\"#1B1E2E\" fill-rule=\"evenodd\" d=\"M1 11a3 3 0 0 1 3-3h16a3 3 0 0 1 3 3v2a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3zm3-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm3 2a1 1 0 0 1 1-1h11a1 1 0 1 1 0 2H8a1 1 0 0 1-1-1m-2 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2\" class=\"icon-dark\" clip-rule=\"evenodd\"/><path fill=\"#1B1E2E\" fill-rule=\"evenodd\" d=\"M1 5a3 3 0 0 1 3-3h16a3 3 0 0 1 3 3v2a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3zm3-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1zm3 2a1 1 0 0 1 1-1h7a1 1 0 1 1 0 2H8a1 1 0 0 1-1-1M5 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2\" class=\"icon-dark\" clip-rule=\"evenodd\"/>"
5418
+ }
5419
+ }, ["24"], "technology-server-alt")
5420
+
5421
+ const { componentProps, defs } = compileVueIconProperties(iconPropsStep)
5422
+
5423
+ const { shouldRenderDefs } = useShouldRenderDefs(
5424
+ "technology-server-alt",
5425
+ defs)
5426
+
5427
+ return () => hyperSVG(componentProps, defs, shouldRenderDefs, attrs, props.class)
5428
+ },
5429
+ })
5430
+
5431
+
5378
5432
  export const IconTechnologyServer = defineComponent<Omit<iconsRegistry.IconTechnologyServerProps, 'name'> & {
5379
5433
  class?: any
5380
5434
  }>({
@@ -5759,6 +5813,30 @@ export const IconViewList = defineComponent<Omit<iconsRegistry.IconViewListProps
5759
5813
  })
5760
5814
 
5761
5815
 
5816
+ export const IconViewPieChartAlt = defineComponent<Omit<iconsRegistry.IconViewPieChartAltProps, 'name'> & {
5817
+ class?: any
5818
+ }>({
5819
+ ...__iconComponentOpts__,
5820
+ setup(props: Omit<iconsRegistry.IconViewPieChartAltProps, 'name'> & {
5821
+ class?: any
5822
+ }, { attrs }: { attrs: Omit<SVGAttributes, 'name' | 'class'> }) {
5823
+ const iconPropsStep = useIconProps(props, {
5824
+ "24": {
5825
+ "body": "<path fill=\"#D0D2E0\" d=\"M20.97 12.75a9 9 0 0 1-14.782 6.122c-.316-.268-.315-.745-.022-1.038l5.541-5.541a1 1 0 0 1 .707-.293h7.836c.414 0 .753.337.72.75\" class=\"icon-light\"/><path fill=\"#BFC2D4\" d=\"M5.128 17.812A8.96 8.96 0 0 1 3 12a8.97 8.97 0 0 1 2.636-6.364 8.97 8.97 0 0 1 5.615-2.605c.413-.034.749.305.749.719v7.836a1 1 0 0 1-.293.707l-5.54 5.54c-.294.294-.771.295-1.039-.02\" class=\"icon-light-secondary\"/><path fill=\"#9095AD\" d=\"M12 3.75c0-.414.337-.753.75-.72a9 9 0 0 1 8.22 8.22c.033.413-.306.75-.72.75h-7.5a.75.75 0 0 1-.75-.75z\" class=\"icon-dark-secondary\"/><path stroke=\"#1B1E2E\" stroke-width=\"2\" d=\"M21 12a9 9 0 0 1-15.364 6.364M21 12a9 9 0 0 0-9-9m9 9h-9m0-9a9 9 0 0 0-6.364 15.364M12 3v9m0 0-6.364 6.364\" class=\"icon-dark\"/>"
5826
+ }
5827
+ }, ["24"], "view-pie-chart-alt")
5828
+
5829
+ const { componentProps, defs } = compileVueIconProperties(iconPropsStep)
5830
+
5831
+ const { shouldRenderDefs } = useShouldRenderDefs(
5832
+ "view-pie-chart-alt",
5833
+ defs)
5834
+
5835
+ return () => hyperSVG(componentProps, defs, shouldRenderDefs, attrs, props.class)
5836
+ },
5837
+ })
5838
+
5839
+
5762
5840
  export const IconViewPieChart = defineComponent<Omit<iconsRegistry.IconViewPieChartProps, 'name'> & {
5763
5841
  class?: any
5764
5842
  }>({
@@ -5856,3 +5934,30 @@ export const IconWarning = defineComponent<Omit<iconsRegistry.IconWarningProps,
5856
5934
  return () => hyperSVG(componentProps, defs, shouldRenderDefs, attrs, props.class)
5857
5935
  },
5858
5936
  })
5937
+
5938
+
5939
+ export const IconWindowCodeEditor = defineComponent<Omit<iconsRegistry.IconWindowCodeEditorProps, 'name'> & {
5940
+ class?: any
5941
+ }>({
5942
+ ...__iconComponentOpts__,
5943
+ setup(props: Omit<iconsRegistry.IconWindowCodeEditorProps, 'name'> & {
5944
+ class?: any
5945
+ }, { attrs }: { attrs: Omit<SVGAttributes, 'name' | 'class'> }) {
5946
+ const iconPropsStep = useIconProps(props, {
5947
+ "16": {
5948
+ "body": "<path fill=\"#D0D2E0\" fill-rule=\"evenodd\" d=\"M15 3a2 2 0 0 0-2-2H3a2 2 0 0 0-2 2v1h14z\" class=\"icon-light\" clip-rule=\"evenodd\"/><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M1 4v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4M1 4V3a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v1M1 4h14m-5 4 1.5 1.5L10 11M6 8 4.5 9.5 6 11\" class=\"icon-dark\"/>"
5949
+ },
5950
+ "24": {
5951
+ "body": "<path fill=\"#D0D2E0\" fill-rule=\"evenodd\" d=\"M21 6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2h18z\" class=\"icon-light\" clip-rule=\"evenodd\"/><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 8v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8M3 8V6a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v2M3 8h18m-7 4 2 2-2 2m-4-4-2 1.929 2 1.928\" class=\"icon-dark\"/>"
5952
+ }
5953
+ }, ["16","24"], "window-code-editor")
5954
+
5955
+ const { componentProps, defs } = compileVueIconProperties(iconPropsStep)
5956
+
5957
+ const { shouldRenderDefs } = useShouldRenderDefs(
5958
+ "window-code-editor",
5959
+ defs)
5960
+
5961
+ return () => hyperSVG(componentProps, defs, shouldRenderDefs, attrs, props.class)
5962
+ },
5963
+ })
@@ -0,0 +1,6 @@
1
+ import IconGeneralChatBubble from './_IconGeneralChatBubble.vue'
2
+ import { iconTests } from './_testUtils'
3
+
4
+ describe('<IconGeneralChatBubble />', () => {
5
+ iconTests(IconGeneralChatBubble)
6
+ })
@@ -0,0 +1,30 @@
1
+ <script lang="ts" setup>
2
+ import PathMorpher from './_PathMorpher.vue'
3
+ import { iconGeneralChatBubble } from '@cypress-design/constants-icon'
4
+
5
+ withDefaults(
6
+ defineProps<{
7
+ animated?: boolean
8
+ }>(),
9
+ {
10
+ animated: false,
11
+ },
12
+ )
13
+ </script>
14
+
15
+ <template>
16
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
17
+ <PathMorpher
18
+ class="icon-dark"
19
+ fill="#1B1E2E"
20
+ v-bind="iconGeneralChatBubble.small"
21
+ :animated="animated"
22
+ />
23
+ <PathMorpher
24
+ class="icon-light"
25
+ fill="#1B1E2E"
26
+ v-bind="iconGeneralChatBubble.big"
27
+ :animated="animated"
28
+ />
29
+ </svg>
30
+ </template>
@@ -0,0 +1,6 @@
1
+ import IconObjectGear from './_IconObjectGear.vue'
2
+ import { iconTests } from './_testUtils'
3
+
4
+ describe('<IconObjectGear />', () => {
5
+ iconTests(IconObjectGear)
6
+ })
@@ -0,0 +1,27 @@
1
+ <script lang="ts" setup>
2
+ import PathMorpher from './_PathMorpher.vue'
3
+ import { iconObjectGear } from '@cypress-design/constants-icon'
4
+
5
+ withDefaults(
6
+ defineProps<{
7
+ animated?: boolean
8
+ }>(),
9
+ {
10
+ animated: false,
11
+ },
12
+ )
13
+ </script>
14
+
15
+ <template>
16
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
17
+ <PathMorpher
18
+ v-bind="iconObjectGear"
19
+ fill-rule="evenodd"
20
+ clip-rule="evenodd"
21
+ class="icon-light"
22
+ fill="#1B1E2E"
23
+ :animated="animated"
24
+ />
25
+ <circle cx="12" cy="12" r="2" fill="#9095AD" class="icon-dark" />
26
+ </svg>
27
+ </template>
@@ -0,0 +1,6 @@
1
+ import IconTechnologyGitBranches from './_IconTechnologyGitBranches.vue'
2
+ import { iconTests } from './_testUtils'
3
+
4
+ describe('<IconTechnologyGitBranches />', () => {
5
+ iconTests(IconTechnologyGitBranches)
6
+ })
@@ -0,0 +1,30 @@
1
+ <script lang="ts" setup>
2
+ import { iconTechnologyGitBranches } from '@cypress-design/constants-icon'
3
+ import PathMorpher from './_PathMorpher.vue'
4
+
5
+ withDefaults(
6
+ defineProps<{
7
+ animated?: boolean
8
+ }>(),
9
+ {
10
+ animated: false,
11
+ },
12
+ )
13
+ </script>
14
+
15
+ <template>
16
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
17
+ <PathMorpher
18
+ v-bind="iconTechnologyGitBranches.left"
19
+ fill="#1B1E2E"
20
+ class="icon-light"
21
+ :animated="animated"
22
+ />
23
+ <PathMorpher
24
+ v-bind="iconTechnologyGitBranches.right"
25
+ fill="#747994"
26
+ class="icon-dark"
27
+ :animated="animated"
28
+ />
29
+ </svg>
30
+ </template>
@@ -0,0 +1,6 @@
1
+ import IconTechnologyServer from './_IconTechnologyServer.vue'
2
+ import { iconTests } from './_testUtils'
3
+
4
+ describe('<IconTechnologyServer />', () => {
5
+ iconTests(IconTechnologyServer)
6
+ })
@@ -0,0 +1,43 @@
1
+ <script lang="ts" setup>
2
+ import { iconTechnologyServer } from '@cypress-design/constants-icon'
3
+ import PathMorpher from './_PathMorpher.vue'
4
+
5
+ withDefaults(
6
+ defineProps<{
7
+ animated?: boolean
8
+ }>(),
9
+ {
10
+ animated: false,
11
+ },
12
+ )
13
+ </script>
14
+
15
+ <template>
16
+ <svg fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
17
+ <PathMorpher
18
+ fill-rule="evenodd"
19
+ clip-rule="evenodd"
20
+ v-bind="iconTechnologyServer.top"
21
+ :animated="animated"
22
+ fill="#1B1E2E"
23
+ class="icon-light"
24
+ />
25
+ <PathMorpher
26
+ fill-rule="evenodd"
27
+ clip-rule="evenodd"
28
+ v-bind="iconTechnologyServer.middle"
29
+ :animated="animated"
30
+ fill="#9095AD"
31
+ class="icon-dark"
32
+ />
33
+
34
+ <PathMorpher
35
+ fill-rule="evenodd"
36
+ clip-rule="evenodd"
37
+ v-bind="iconTechnologyServer.bottom"
38
+ :animated="animated"
39
+ fill="#9095AD"
40
+ class="icon-dark"
41
+ />
42
+ </svg>
43
+ </template>
@@ -0,0 +1,6 @@
1
+ import IconViewChart from './_IconViewChart.vue'
2
+ import { iconTests } from './_testUtils'
3
+
4
+ describe('<IconViewChart />', () => {
5
+ iconTests(IconViewChart)
6
+ })
@@ -0,0 +1,37 @@
1
+ <script lang="ts" setup>
2
+ import { iconViewChart } from '@cypress-design/constants-icon'
3
+ import PathMorpher from './_PathMorpher.vue'
4
+
5
+ withDefaults(
6
+ defineProps<{
7
+ animated?: boolean
8
+ }>(),
9
+ {
10
+ animated: false,
11
+ },
12
+ )
13
+ </script>
14
+
15
+ <template>
16
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
17
+ <PathMorpher
18
+ v-bind="iconViewChart.topRight"
19
+ fill="#AFB3C7"
20
+ class="icon-light"
21
+ :animated="animated"
22
+ />
23
+ <PathMorpher
24
+ v-bind="iconViewChart.left"
25
+ fill="#747994"
26
+ class="icon-dark-secondary"
27
+ :animated="animated"
28
+ />
29
+ <PathMorpher
30
+ v-bind="iconViewChart.bottom"
31
+ fill="#1B1E2E"
32
+ class="icon-dark"
33
+ :animated="animated"
34
+ shapeRendering="geometricPrecision"
35
+ />
36
+ </svg>
37
+ </template>
@@ -0,0 +1,64 @@
1
+ <script lang="ts">
2
+ import { ref, watch } from 'vue'
3
+
4
+ function useAnimatedEffect(animated: () => boolean, dur: number) {
5
+ const prevAnimated = ref(animated())
6
+ const animateRef = ref<SVGAnimateElement | null>(null)
7
+
8
+ watch(animated, (newVal) => {
9
+ if (prevAnimated.value === newVal) {
10
+ animateRef.value?.endElement()
11
+ } else {
12
+ animateRef.value?.beginElement()
13
+ setTimeout(() => {
14
+ prevAnimated.value = newVal
15
+ }, dur - 30)
16
+ }
17
+ })
18
+
19
+ return { prevAnimated, animateRef }
20
+ }
21
+ </script>
22
+
23
+ <script setup lang="ts">
24
+ const props = withDefaults(
25
+ defineProps<{
26
+ d: string
27
+ dAnimated: string
28
+ animated?: boolean
29
+ dur?: number
30
+ }>(),
31
+ {
32
+ animated: false,
33
+ dur: 150,
34
+ },
35
+ )
36
+
37
+ const { prevAnimated, animateRef } = useAnimatedEffect(
38
+ () => props.animated,
39
+ props.dur,
40
+ )
41
+ </script>
42
+
43
+ <template>
44
+ <path :d="prevAnimated ? props.dAnimated : props.d">
45
+ <animate
46
+ :ref="
47
+ (r) => {
48
+ animateRef = r as any
49
+ }
50
+ "
51
+ attributeName="d"
52
+ :dur="`${props.dur}ms`"
53
+ repeatCount="1"
54
+ :values="
55
+ prevAnimated === props.animated
56
+ ? undefined
57
+ : prevAnimated
58
+ ? [props.dAnimated, props.d].join(';')
59
+ : [props.d, props.dAnimated].join(';')
60
+ "
61
+ restart="always"
62
+ />
63
+ </path>
64
+ </template>
@@ -0,0 +1,62 @@
1
+ import { DefineComponent, ref } from 'vue'
2
+ import { mount } from 'cypress/vue'
3
+
4
+ export function iconTests(Icon: any) {
5
+ it('renders', () => {
6
+ mount(() => (
7
+ <Icon
8
+ animated={false}
9
+ width={400}
10
+ height={400}
11
+ class="icon-dark-secondary-indigo-500 icon-light-indigo-300 icon-dark-indigo-400"
12
+ />
13
+ ))
14
+ })
15
+
16
+ it('renders active', { viewportHeight: 550 }, () => {
17
+ const isAnimated = ref(false)
18
+
19
+ mount(() => (
20
+ <>
21
+ <pre>{isAnimated.value ? 'animated' : 'not animated'}</pre>
22
+
23
+ <Icon
24
+ animated={isAnimated.value}
25
+ width={400}
26
+ height={400}
27
+ class="icon-dark-secondary-indigo-500 icon-light-indigo-300 icon-dark-indigo-400 m-[50px]"
28
+ onClick={() => {
29
+ isAnimated.value = !isAnimated.value
30
+ }}
31
+ />
32
+ </>
33
+ ))
34
+
35
+ cy.get('svg').click()
36
+ })
37
+
38
+ it('renders both side by side', { viewportWidth: 900 }, () => {
39
+ mount(() => (
40
+ <div class="bg-black flex gap-4 text-center text-2xl">
41
+ <div>
42
+ <h2 class="text-indigo-200 font-bold">not animated</h2>
43
+ <Icon
44
+ animated={false}
45
+ width={400}
46
+ height={400}
47
+ class="icon-dark-secondary-indigo-500 icon-light-indigo-300 icon-dark-indigo-400"
48
+ />
49
+ </div>
50
+ <div>
51
+ <h2 class="text-indigo-200 font-bold">animated</h2>
52
+ <Icon
53
+ animated={true}
54
+ width={400}
55
+ height={400}
56
+ class="icon-dark-secondary-indigo-500 icon-light-indigo-300 icon-dark-indigo-400"
57
+ />
58
+ </div>
59
+ </div>
60
+ ))
61
+ })
62
+ }
@@ -0,0 +1,5 @@
1
+ export { default as IconAnimatedGeneralChatBubble } from './_IconGeneralChatBubble.vue'
2
+ export { default as IconAnimatedObjectGear } from './_IconObjectGear.vue'
3
+ export { default as IconAnimatedTechnologyGitBranches } from './_IconTechnologyGitBranches.vue'
4
+ export { default as IconAnimatedTechnologyServer } from './_IconTechnologyServer.vue'
5
+ export { default as IconAnimatedViewChart } from './_IconViewChart.vue'
@@ -76,6 +76,7 @@ export const compileVueIconProperties = (
76
76
  defs?: string
77
77
  compiledClasses: string[]
78
78
  size: string
79
+ alt?: string
79
80
  interactiveColorsOnGroup?: boolean
80
81
  }
81
82
  >,
@@ -87,6 +88,7 @@ export const compileVueIconProperties = (
87
88
  defs,
88
89
  compiledClasses,
89
90
  size,
91
+ alt,
90
92
  ...attributes
91
93
  } = opts.value
92
94
  const filteredAttributes = Object.keys(attributes).reduce(
@@ -98,8 +100,7 @@ export const compileVueIconProperties = (
98
100
  attrName !== 'name'
99
101
  ) {
100
102
  // @ts-expect-error - TS doesn't know that attrName is a key of SVGAttributes
101
- newAttributes[attrName] =
102
- attributes[attrName as keyof typeof attributes]
103
+ newAttributes[attrName] = attributes[attrName]
103
104
  }
104
105
  return newAttributes
105
106
  },
@@ -113,7 +114,11 @@ export const compileVueIconProperties = (
113
114
  height: size,
114
115
  viewBox: `0 0 ${size} ${size}`,
115
116
  fill: 'none',
116
- innerHTML: body,
117
+ innerHTML: alt
118
+ ? `<title>${alt.replace(/[><]/g, (s) => {
119
+ return s === '>' ? '&gt;' : '&lt;'
120
+ })}</title>${body}`
121
+ : body,
117
122
  class: undefined as string | undefined,
118
123
  ...filteredAttributes, // add all standard attributes back to the svg tag
119
124
  }
package/dist/Icon.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  declare const _default: import("vue").DefineComponent<Readonly<{
2
2
  size?: any;
3
+ alt?: any;
3
4
  name?: any;
4
5
  interactiveColorsOnGroup?: any;
5
6
  focusWithinStrokeColor?: any;
@@ -49,6 +50,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
49
50
  [key: string]: any;
50
51
  }>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
51
52
  size?: any;
53
+ alt?: any;
52
54
  name?: any;
53
55
  interactiveColorsOnGroup?: any;
54
56
  focusWithinStrokeColor?: any;
@@ -94,6 +96,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
94
96
  "secondary-stroke-color"?: any;
95
97
  }>>>, {
96
98
  readonly size?: any;
99
+ readonly alt?: any;
97
100
  readonly name?: any;
98
101
  readonly interactiveColorsOnGroup?: any;
99
102
  readonly focusWithinStrokeColor?: any;
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../Icon.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,wBAyDE"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../Icon.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,wBA0DE"}