@cypress-design/react-icon 0.31.0 → 0.32.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 (45) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +14 -0
  3. package/IconReact.cy.tsx +11 -3
  4. package/_TreeShakableIcons.ts +47 -2
  5. package/animated/_IconGeneralChatBubble.cy.tsx +6 -0
  6. package/animated/_IconGeneralChatBubble.tsx +31 -0
  7. package/animated/_IconObjectGear.cy.tsx +6 -0
  8. package/animated/_IconObjectGear.tsx +28 -0
  9. package/animated/_IconTechnologyGitBranches.cy.tsx +6 -0
  10. package/animated/_IconTechnologyGitBranches.tsx +31 -0
  11. package/animated/_IconTechnologyServer.cy.tsx +6 -0
  12. package/animated/_IconTechnologyServer.tsx +46 -0
  13. package/animated/_IconViewChart.cy.tsx +6 -0
  14. package/animated/_IconViewChart.tsx +38 -0
  15. package/animated/_Morphers.tsx +54 -0
  16. package/animated/_testUtils.tsx +69 -0
  17. package/animated/index.ts +5 -0
  18. package/compileProperties.ts +7 -1
  19. package/dist/_TreeShakableIcons.d.ts +4 -0
  20. package/dist/_TreeShakableIcons.d.ts.map +1 -1
  21. package/dist/animated/_IconGeneralChatBubble.d.ts +6 -0
  22. package/dist/animated/_IconGeneralChatBubble.d.ts.map +1 -0
  23. package/dist/animated/_IconObjectGear.d.ts +6 -0
  24. package/dist/animated/_IconObjectGear.d.ts.map +1 -0
  25. package/dist/animated/_IconTechnologyGitBranches.d.ts +6 -0
  26. package/dist/animated/_IconTechnologyGitBranches.d.ts.map +1 -0
  27. package/dist/animated/_IconTechnologyServer.d.ts +6 -0
  28. package/dist/animated/_IconTechnologyServer.d.ts.map +1 -0
  29. package/dist/animated/_IconViewChart.d.ts +6 -0
  30. package/dist/animated/_IconViewChart.d.ts.map +1 -0
  31. package/dist/animated/_Morphers.d.ts +10 -0
  32. package/dist/animated/_Morphers.d.ts.map +1 -0
  33. package/dist/animated/index.d.ts +6 -0
  34. package/dist/animated/index.d.ts.map +1 -0
  35. package/dist/compileProperties.d.ts +2 -1
  36. package/dist/compileProperties.d.ts.map +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.es.mjs +160 -8
  40. package/dist/index.es.mjs.map +1 -1
  41. package/dist/index.umd.js +169 -9
  42. package/dist/index.umd.js.map +1 -1
  43. package/generate-icons.js +3 -3
  44. package/index.ts +1 -0
  45. package/package.json +3 -2
@@ -9,5 +9,5 @@ $ rollup -c ./rollup.config.mjs
9
9
  index.ts
10
10
 
11
11
  Consumers of your bundle will have to use chunk.default to access their default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
12
- created ./dist/index.umd.js, ./dist/index.es.mjs in 9.4s
12
+ created ./dist/index.umd.js, ./dist/index.es.mjs in 10.7s
13
13
  $ tsc --project ./tsconfig.build.json
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @cypress-design/react-icon
2
2
 
3
+ ## 0.32.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.31.0
4
18
 
5
19
  ### Minor Changes
package/IconReact.cy.tsx CHANGED
@@ -8,7 +8,7 @@ import Icon, {
8
8
  } from './index'
9
9
 
10
10
  describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
11
- it('renders correctly', () => {
11
+ it('renders correctly', { viewportWidth: 500, viewportHeight: 500 }, () => {
12
12
  mount(
13
13
  <ul className="m-4">
14
14
  <li className="flex items-center px-2 mb-3">
@@ -37,7 +37,7 @@ describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
37
37
  Add a new icon
38
38
  </button>
39
39
  </li>
40
- </ul>
40
+ </ul>,
41
41
  )
42
42
  })
43
43
 
@@ -53,7 +53,15 @@ describe('Icon', { viewportWidth: 80, viewportHeight: 80 }, () => {
53
53
  <div className="p-2">
54
54
  <IconBrowserWebkit className="w-16 h-16 hidden" />
55
55
  <IconBrowserWebkit className="w-16 h-16" />
56
- </div>
56
+ </div>,
57
57
  )
58
58
  })
59
+
60
+ it('renders a title element when passed an alt prop', () => {
61
+ mount(
62
+ <IconBrowserWebkit className="w-16 h-16" alt="This is a <b>title</b>" />,
63
+ )
64
+
65
+ cy.get('svg title').should('have.text', 'This is a <b>title</b>')
66
+ })
59
67
  })
@@ -946,8 +946,11 @@ export const IconGeneralChatBubble: React.FC<
946
946
  > = (props) => React.createElement('svg', useIconProps(props, {
947
947
  "16": {
948
948
  "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\"/>"
949
+ },
950
+ "24": {
951
+ "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\"/>"
949
952
  }
950
- }, ["16"], "general-chat-bubble"))
953
+ }, ["16","24"], "general-chat-bubble"))
951
954
 
952
955
 
953
956
  export const IconGeneralClipboard: React.FC<
@@ -1282,8 +1285,11 @@ export const IconObjectBugSmall: React.FC<
1282
1285
  > = (props) => React.createElement('svg', useIconProps(props, {
1283
1286
  "16": {
1284
1287
  "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\"/>"
1288
+ },
1289
+ "24": {
1290
+ "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\"/>"
1285
1291
  }
1286
- }, ["16"], "object-bug-small"))
1292
+ }, ["16","24"], "object-bug-small"))
1287
1293
 
1288
1294
 
1289
1295
  export const IconObjectBug: React.FC<
@@ -2120,6 +2126,15 @@ export const IconTechnologyElementSelector: React.FC<
2120
2126
  }, ["16"], "technology-element-selector"))
2121
2127
 
2122
2128
 
2129
+ export const IconTechnologyGitBranches: React.FC<
2130
+ Omit<iconsRegistry.IconTechnologyGitBranchesProps, 'name'> & React.SVGProps<SVGSVGElement>
2131
+ > = (props) => React.createElement('svg', useIconProps(props, {
2132
+ "24": {
2133
+ "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\"/>"
2134
+ }
2135
+ }, ["24"], "technology-git-branches"))
2136
+
2137
+
2123
2138
  export const IconTechnologyImageScreenshot: React.FC<
2124
2139
  Omit<iconsRegistry.IconTechnologyImageScreenshotProps, 'name'> & React.SVGProps<SVGSVGElement>
2125
2140
  > = (props) => React.createElement('svg', useIconProps(props, {
@@ -2174,6 +2189,15 @@ export const IconTechnologyPullRequest: React.FC<
2174
2189
  }, ["16"], "technology-pull-request"))
2175
2190
 
2176
2191
 
2192
+ export const IconTechnologyServerAlt: React.FC<
2193
+ Omit<iconsRegistry.IconTechnologyServerAltProps, 'name'> & React.SVGProps<SVGSVGElement>
2194
+ > = (props) => React.createElement('svg', useIconProps(props, {
2195
+ "24": {
2196
+ "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\"/>"
2197
+ }
2198
+ }, ["24"], "technology-server-alt"))
2199
+
2200
+
2177
2201
  export const IconTechnologyServer: React.FC<
2178
2202
  Omit<iconsRegistry.IconTechnologyServerProps, 'name'> & React.SVGProps<SVGSVGElement>
2179
2203
  > = (props) => React.createElement('svg', useIconProps(props, {
@@ -2333,6 +2357,15 @@ export const IconViewList: React.FC<
2333
2357
  }, ["16"], "view-list"))
2334
2358
 
2335
2359
 
2360
+ export const IconViewPieChartAlt: React.FC<
2361
+ Omit<iconsRegistry.IconViewPieChartAltProps, 'name'> & React.SVGProps<SVGSVGElement>
2362
+ > = (props) => React.createElement('svg', useIconProps(props, {
2363
+ "24": {
2364
+ "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\"/>"
2365
+ }
2366
+ }, ["24"], "view-pie-chart-alt"))
2367
+
2368
+
2336
2369
  export const IconViewPieChart: React.FC<
2337
2370
  Omit<iconsRegistry.IconViewPieChartProps, 'name'> & React.SVGProps<SVGSVGElement>
2338
2371
  > = (props) => React.createElement('svg', useIconProps(props, {
@@ -2370,3 +2403,15 @@ export const IconWarning: React.FC<
2370
2403
  "body": "<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M4 0a1 1 0 0 1 1 1v3a1 1 0 0 1-2 0V1a1 1 0 0 1 1-1\" class=\"icon-dark\" clip-rule=\"evenodd\"/><path fill=\"currentColor\" d=\"M5 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" class=\"icon-dark\"/>"
2371
2404
  }
2372
2405
  }, ["8"], "warning"))
2406
+
2407
+
2408
+ export const IconWindowCodeEditor: React.FC<
2409
+ Omit<iconsRegistry.IconWindowCodeEditorProps, 'name'> & React.SVGProps<SVGSVGElement>
2410
+ > = (props) => React.createElement('svg', useIconProps(props, {
2411
+ "16": {
2412
+ "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\"/>"
2413
+ },
2414
+ "24": {
2415
+ "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\"/>"
2416
+ }
2417
+ }, ["16","24"], "window-code-editor"))
@@ -0,0 +1,6 @@
1
+ import IconGeneralChatBubble from './_IconGeneralChatBubble'
2
+ import { iconTests } from './_testUtils'
3
+
4
+ describe('<IconGeneralChatBubble />', () => {
5
+ iconTests(IconGeneralChatBubble)
6
+ })
@@ -0,0 +1,31 @@
1
+ import * as React from 'react'
2
+ import { iconGeneralChatBubble } from '@cypress-design/constants-icon'
3
+ import { PathMorpher } from './_Morphers'
4
+
5
+ const IconGeneralChatBubble: React.FC<
6
+ React.SVGProps<SVGSVGElement> & { animated: boolean }
7
+ > = ({ animated, ...rest }) => {
8
+ return (
9
+ <svg
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ fill="none"
12
+ viewBox="0 0 24 24"
13
+ {...rest}
14
+ >
15
+ <PathMorpher
16
+ className="icon-dark"
17
+ fill="#1B1E2E"
18
+ {...iconGeneralChatBubble.small}
19
+ animated={animated}
20
+ />
21
+ <PathMorpher
22
+ className="icon-light"
23
+ fill="#1B1E2E"
24
+ {...iconGeneralChatBubble.big}
25
+ animated={animated}
26
+ />
27
+ </svg>
28
+ )
29
+ }
30
+
31
+ export default IconGeneralChatBubble
@@ -0,0 +1,6 @@
1
+ import IconObjectGear from './_IconObjectGear'
2
+ import { iconTests } from './_testUtils'
3
+
4
+ describe('<IconObjectGear />', () => {
5
+ iconTests(IconObjectGear)
6
+ })
@@ -0,0 +1,28 @@
1
+ import * as React from 'react'
2
+ import { iconObjectGear } from '@cypress-design/constants-icon'
3
+ import { PathMorpher } from './_Morphers'
4
+
5
+ const IconObjectGear: React.FC<
6
+ React.SVGProps<SVGSVGElement> & { animated: boolean }
7
+ > = ({ animated, ...rest }) => {
8
+ return (
9
+ <svg
10
+ viewBox="0 0 24 24"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ {...rest}
14
+ >
15
+ <PathMorpher
16
+ fillRule="evenodd"
17
+ clipRule="evenodd"
18
+ {...iconObjectGear}
19
+ fill="#1B1E2E"
20
+ animated={animated}
21
+ className="icon-light"
22
+ />
23
+ <circle cx="12" cy="12" r="2" fill="#9095AD" className="icon-dark" />
24
+ </svg>
25
+ )
26
+ }
27
+
28
+ export default IconObjectGear
@@ -0,0 +1,6 @@
1
+ import IconTechnologyGitBranches from './_IconTechnologyGitBranches'
2
+ import { iconTests } from './_testUtils'
3
+
4
+ describe('<IconTechnologyGitBranches />', () => {
5
+ iconTests(IconTechnologyGitBranches)
6
+ })
@@ -0,0 +1,31 @@
1
+ import * as React from 'react'
2
+ import { iconTechnologyGitBranches } from '@cypress-design/constants-icon'
3
+ import { PathMorpher } from './_Morphers'
4
+
5
+ const IconViewChart: React.FC<
6
+ React.SVGProps<SVGSVGElement> & { animated: boolean }
7
+ > = ({ animated, ...rest }) => {
8
+ return (
9
+ <svg
10
+ viewBox="0 0 24 24"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ {...rest}
14
+ >
15
+ <PathMorpher
16
+ {...iconTechnologyGitBranches.left}
17
+ fill="#1B1E2E"
18
+ className="icon-light"
19
+ animated={animated}
20
+ />
21
+ <PathMorpher
22
+ {...iconTechnologyGitBranches.right}
23
+ fill="#747994"
24
+ className="icon-dark"
25
+ animated={animated}
26
+ />
27
+ </svg>
28
+ )
29
+ }
30
+
31
+ export default IconViewChart
@@ -0,0 +1,6 @@
1
+ import IconTechnologyServer from './_IconTechnologyServer'
2
+ import { iconTests } from './_testUtils'
3
+
4
+ describe('<IconTechnologyServer />', () => {
5
+ iconTests(IconTechnologyServer)
6
+ })
@@ -0,0 +1,46 @@
1
+ import * as React from 'react'
2
+ import { iconTechnologyServer } from '@cypress-design/constants-icon'
3
+ import { PathMorpher } from './_Morphers'
4
+
5
+ const IconTechServer: React.FC<
6
+ React.SVGProps<SVGSVGElement> & { animated: boolean }
7
+ > = ({ animated, ...rest }) => {
8
+ return (
9
+ <svg
10
+ width="24"
11
+ height="24"
12
+ fill="none"
13
+ viewBox="0 0 24 24"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ {...rest}
16
+ >
17
+ <PathMorpher
18
+ fillRule="evenodd"
19
+ clipRule="evenodd"
20
+ {...iconTechnologyServer.top}
21
+ animated={animated}
22
+ fill="#1B1E2E"
23
+ className="icon-light"
24
+ />
25
+ <PathMorpher
26
+ fillRule="evenodd"
27
+ clipRule="evenodd"
28
+ {...iconTechnologyServer.middle}
29
+ animated={animated}
30
+ fill="#9095AD"
31
+ className="icon-dark"
32
+ />
33
+
34
+ <PathMorpher
35
+ fillRule="evenodd"
36
+ clipRule="evenodd"
37
+ {...iconTechnologyServer.bottom}
38
+ animated={animated}
39
+ fill="#9095AD"
40
+ className="icon-dark"
41
+ />
42
+ </svg>
43
+ )
44
+ }
45
+
46
+ export default IconTechServer
@@ -0,0 +1,6 @@
1
+ import IconViewChart from './_IconViewChart'
2
+ import { iconTests } from './_testUtils'
3
+
4
+ describe('<IconViewChart />', () => {
5
+ iconTests(IconViewChart)
6
+ })
@@ -0,0 +1,38 @@
1
+ import * as React from 'react'
2
+ import { iconViewChart } from '@cypress-design/constants-icon'
3
+ import { PathMorpher } from './_Morphers'
4
+
5
+ const IconViewChart: React.FC<
6
+ React.SVGProps<SVGSVGElement> & { animated: boolean }
7
+ > = ({ animated, ...rest }) => {
8
+ return (
9
+ <svg
10
+ viewBox="0 0 24 24"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ {...rest}
14
+ >
15
+ <PathMorpher
16
+ {...iconViewChart.topRight}
17
+ fill="#AFB3C7"
18
+ className="icon-light"
19
+ animated={animated}
20
+ />
21
+ <PathMorpher
22
+ {...iconViewChart.left}
23
+ fill="#1B1E2E"
24
+ className="icon-dark-secondary"
25
+ animated={animated}
26
+ />
27
+ <PathMorpher
28
+ {...iconViewChart.bottom}
29
+ fill="#747994"
30
+ className="icon-dark"
31
+ animated={animated}
32
+ shapeRendering="geometricPrecision"
33
+ />
34
+ </svg>
35
+ )
36
+ }
37
+
38
+ export default IconViewChart
@@ -0,0 +1,54 @@
1
+ import React from 'react'
2
+
3
+ interface PathMorpherProps extends React.SVGProps<SVGPathElement> {
4
+ d: string
5
+ dAnimated: string
6
+ dur?: number
7
+ animated?: boolean
8
+ }
9
+
10
+ function useAnimatedEffect(animated: boolean, dur: number) {
11
+ const [prevAnimated, setPrevAnimated] = React.useState(animated)
12
+ const animateRef = React.useRef<SVGAnimateTransformElement>(null)
13
+ React.useEffect(() => {
14
+ if (prevAnimated === animated) {
15
+ animateRef.current?.endElement()
16
+ } else {
17
+ animateRef.current?.beginElement()
18
+ setTimeout(() => {
19
+ setPrevAnimated(animated)
20
+ }, dur - 30)
21
+ }
22
+ })
23
+ return { prevAnimated, animateRef }
24
+ }
25
+
26
+ export const PathMorpher: React.FC<PathMorpherProps> = ({
27
+ d,
28
+ dAnimated,
29
+ dur = 150,
30
+ animated = false,
31
+
32
+ ...props
33
+ }) => {
34
+ const { prevAnimated, animateRef } = useAnimatedEffect(animated, dur)
35
+
36
+ return (
37
+ <path d={prevAnimated ? dAnimated : d} {...props}>
38
+ <animate
39
+ ref={animateRef}
40
+ attributeName="d"
41
+ dur={`${dur}ms`}
42
+ repeatCount="1"
43
+ values={
44
+ prevAnimated === animated
45
+ ? undefined
46
+ : prevAnimated
47
+ ? [dAnimated, d].join(';')
48
+ : [d, dAnimated].join(';')
49
+ }
50
+ restart="always"
51
+ />
52
+ </path>
53
+ )
54
+ }
@@ -0,0 +1,69 @@
1
+ import * as React from 'react'
2
+ import { mount } from 'cypress/react18'
3
+
4
+ export function iconTests(
5
+ Icon: React.FC<
6
+ React.SVGProps<SVGSVGElement> & {
7
+ animated: boolean
8
+ }
9
+ >,
10
+ ) {
11
+ it('renders', () => {
12
+ mount(
13
+ <Icon
14
+ animated={false}
15
+ width={400}
16
+ height={400}
17
+ className="icon-dark-secondary-indigo-500 icon-light-indigo-300 icon-dark-indigo-400"
18
+ />,
19
+ )
20
+ })
21
+
22
+ it('renders active', () => {
23
+ const SUT = () => {
24
+ const [isActive, setIsActive] = React.useState(false)
25
+ return (
26
+ <>
27
+ <pre>{isActive ? 'active' : 'not active'}</pre>
28
+ <Icon
29
+ animated={isActive}
30
+ width={400}
31
+ height={400}
32
+ className="icon-dark-secondary-indigo-500 icon-light-indigo-300 icon-dark-indigo-400 m-[50px]"
33
+ onClick={() => setIsActive(!isActive)}
34
+ />
35
+ </>
36
+ )
37
+ }
38
+ mount(<SUT />)
39
+
40
+ cy.get('svg').click()
41
+ })
42
+
43
+ it('renders both side by side', { viewportWidth: 900 }, () => {
44
+ mount(
45
+ <div className="bg-black flex gap-4 text-center text-2xl">
46
+ <div>
47
+ <h2 className="text-indigo-200 drop-shadow-md font-bold">
48
+ not animated
49
+ </h2>
50
+ <Icon
51
+ animated={false}
52
+ width={400}
53
+ height={400}
54
+ className="icon-dark-secondary-indigo-500 icon-light-indigo-300 icon-dark-indigo-400"
55
+ />
56
+ </div>
57
+ <div>
58
+ <h2 className="text-indigo-200 drop-shadow-md font-bold">animated</h2>
59
+ <Icon
60
+ animated={true}
61
+ width={400}
62
+ height={400}
63
+ className="icon-dark-secondary-indigo-500 icon-light-indigo-300 icon-dark-indigo-400"
64
+ />
65
+ </div>
66
+ </div>,
67
+ )
68
+ })
69
+ }
@@ -0,0 +1,5 @@
1
+ export { default as IconAnimatedGeneralChatBubble } from './_IconGeneralChatBubble'
2
+ export { default as IconAnimatedTechnologyGitBranches } from './_IconTechnologyGitBranches'
3
+ export { default as IconAnimatedTechnologyServer } from './_IconTechnologyServer'
4
+ export { default as IconAnimatedViewChart } from './_IconViewChart'
5
+ export { default as IconAnimatedObjectGear } from './_IconObjectGear'
@@ -8,9 +8,11 @@ export const compileReactIconProperties = ({
8
8
  compiledClasses,
9
9
  size,
10
10
  name,
11
+ alt,
11
12
  ...attributes
12
13
  }: {
13
14
  body: string
15
+ alt?: string
14
16
  defs?: string
15
17
  compiledClasses: string[]
16
18
  size: string
@@ -60,7 +62,11 @@ export const compileReactIconProperties = ({
60
62
  viewBox: `0 0 ${size} ${size}`,
61
63
  fill: 'none',
62
64
  dangerouslySetInnerHTML: {
63
- __html: body,
65
+ __html: alt
66
+ ? `<title>${alt.replace(/[><]/g, (s) => {
67
+ return s === '>' ? '&gt;' : '&lt;'
68
+ })}</title>${body}`
69
+ : body,
64
70
  },
65
71
  className: undefined as string | undefined,
66
72
  ...filteredAttributes, // add all standard attributes back to the svg tag
@@ -206,11 +206,13 @@ export declare const IconTechnologyDashboardRunning: React.FC<Omit<iconsRegistry
206
206
  export declare const IconTechnologyDollar: React.FC<Omit<iconsRegistry.IconTechnologyDollarProps, 'name'> & React.SVGProps<SVGSVGElement>>;
207
207
  export declare const IconTechnologyDragProject: React.FC<Omit<iconsRegistry.IconTechnologyDragProjectProps, 'name'> & React.SVGProps<SVGSVGElement>>;
208
208
  export declare const IconTechnologyElementSelector: React.FC<Omit<iconsRegistry.IconTechnologyElementSelectorProps, 'name'> & React.SVGProps<SVGSVGElement>>;
209
+ export declare const IconTechnologyGitBranches: React.FC<Omit<iconsRegistry.IconTechnologyGitBranchesProps, 'name'> & React.SVGProps<SVGSVGElement>>;
209
210
  export declare const IconTechnologyImageScreenshot: React.FC<Omit<iconsRegistry.IconTechnologyImageScreenshotProps, 'name'> & React.SVGProps<SVGSVGElement>>;
210
211
  export declare const IconTechnologyInfinityLoop: React.FC<Omit<iconsRegistry.IconTechnologyInfinityLoopProps, 'name'> & React.SVGProps<SVGSVGElement>>;
211
212
  export declare const IconTechnologyLockedProject: React.FC<Omit<iconsRegistry.IconTechnologyLockedProjectProps, 'name'> & React.SVGProps<SVGSVGElement>>;
212
213
  export declare const IconTechnologyOctothorpe: React.FC<Omit<iconsRegistry.IconTechnologyOctothorpeProps, 'name'> & React.SVGProps<SVGSVGElement>>;
213
214
  export declare const IconTechnologyPullRequest: React.FC<Omit<iconsRegistry.IconTechnologyPullRequestProps, 'name'> & React.SVGProps<SVGSVGElement>>;
215
+ export declare const IconTechnologyServerAlt: React.FC<Omit<iconsRegistry.IconTechnologyServerAltProps, 'name'> & React.SVGProps<SVGSVGElement>>;
214
216
  export declare const IconTechnologyServer: React.FC<Omit<iconsRegistry.IconTechnologyServerProps, 'name'> & React.SVGProps<SVGSVGElement>>;
215
217
  export declare const IconTechnologyTerminalLog: React.FC<Omit<iconsRegistry.IconTechnologyTerminalLogProps, 'name'> & React.SVGProps<SVGSVGElement>>;
216
218
  export declare const IconTechnologyTerminal: React.FC<Omit<iconsRegistry.IconTechnologyTerminalProps, 'name'> & React.SVGProps<SVGSVGElement>>;
@@ -226,8 +228,10 @@ export declare const IconTimeStopwatch: React.FC<Omit<iconsRegistry.IconTimeStop
226
228
  export declare const IconUserGeneralOutline: React.FC<Omit<iconsRegistry.IconUserGeneralOutlineProps, 'name'> & React.SVGProps<SVGSVGElement>>;
227
229
  export declare const IconUserGeneralSolid: React.FC<Omit<iconsRegistry.IconUserGeneralSolidProps, 'name'> & React.SVGProps<SVGSVGElement>>;
228
230
  export declare const IconViewList: React.FC<Omit<iconsRegistry.IconViewListProps, 'name'> & React.SVGProps<SVGSVGElement>>;
231
+ export declare const IconViewPieChartAlt: React.FC<Omit<iconsRegistry.IconViewPieChartAltProps, 'name'> & React.SVGProps<SVGSVGElement>>;
229
232
  export declare const IconViewPieChart: React.FC<Omit<iconsRegistry.IconViewPieChartProps, 'name'> & React.SVGProps<SVGSVGElement>>;
230
233
  export declare const IconViewTreeAlt: React.FC<Omit<iconsRegistry.IconViewTreeAltProps, 'name'> & React.SVGProps<SVGSVGElement>>;
231
234
  export declare const IconWarningCircle: React.FC<Omit<iconsRegistry.IconWarningCircleProps, 'name'> & React.SVGProps<SVGSVGElement>>;
232
235
  export declare const IconWarning: React.FC<Omit<iconsRegistry.IconWarningProps, 'name'> & React.SVGProps<SVGSVGElement>>;
236
+ export declare const IconWindowCodeEditor: React.FC<Omit<iconsRegistry.IconWindowCodeEditorProps, 'name'> & React.SVGProps<SVGSVGElement>>;
233
237
  //# sourceMappingURL=_TreeShakableIcons.d.ts.map