@cypress-design/vue-icon 0.34.1 → 0.36.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 (33) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/CHANGELOG.md +22 -0
  3. package/Icon.ts +12 -7
  4. package/_TreeShakableIcons.ts +329 -326
  5. package/animated/_IconGeneralChatBubble.vue +32 -8
  6. package/animated/_IconObjectGear.vue +31 -7
  7. package/animated/_IconTechnologyGitBranches.vue +33 -8
  8. package/animated/_IconTechnologyServer.vue +33 -9
  9. package/animated/_IconViewChart.vue +35 -9
  10. package/animated/_testUtils.tsx +24 -0
  11. package/dist/Icon.d.ts +4 -140
  12. package/dist/Icon.d.ts.map +1 -1
  13. package/dist/_TreeShakableIcons.d.ts +940 -470
  14. package/dist/_TreeShakableIcons.d.ts.map +1 -1
  15. package/dist/animated/_IconGeneralChatBubble.vue.d.ts +16 -13
  16. package/dist/animated/_IconGeneralChatBubble.vue.d.ts.map +1 -1
  17. package/dist/animated/_IconObjectGear.vue.d.ts +16 -13
  18. package/dist/animated/_IconObjectGear.vue.d.ts.map +1 -1
  19. package/dist/animated/_IconTechnologyGitBranches.vue.d.ts +16 -13
  20. package/dist/animated/_IconTechnologyGitBranches.vue.d.ts.map +1 -1
  21. package/dist/animated/_IconTechnologyServer.vue.d.ts +16 -13
  22. package/dist/animated/_IconTechnologyServer.vue.d.ts.map +1 -1
  23. package/dist/animated/_IconViewChart.vue.d.ts +16 -13
  24. package/dist/animated/_IconViewChart.vue.d.ts.map +1 -1
  25. package/dist/animated/_PathMorpher.vue.d.ts +12 -12
  26. package/dist/animated/_PathMorpher.vue.d.ts.map +1 -1
  27. package/dist/compileProperties.d.ts +25 -25
  28. package/dist/index.es.mjs +2215 -2155
  29. package/dist/index.es.mjs.map +1 -1
  30. package/dist/index.umd.js +2 -2
  31. package/dist/index.umd.js.map +1 -1
  32. package/package.json +3 -4
  33. package/tsconfig.build.json +1 -1
@@ -1,29 +1,53 @@
1
1
  <script lang="ts" setup>
2
2
  import PathMorpher from './_PathMorpher.vue'
3
- import { iconGeneralChatBubble } from '@cypress-design/constants-icon'
3
+ import { iconAnimatedGeneralChatBubble } from '@cypress-design/icon-registry'
4
+ import {
5
+ getComponentAttributes,
6
+ type HasStrokeColor,
7
+ type HasFillColor,
8
+ } from '@cypress-design/icon-registry'
9
+ import { computed } from 'vue'
4
10
 
5
- withDefaults(
6
- defineProps<{
7
- animated?: boolean
8
- }>(),
11
+ const props = withDefaults(
12
+ defineProps<
13
+ {
14
+ animated?: boolean
15
+ interactiveColorsOnGroup?: boolean
16
+ } & HasStrokeColor &
17
+ HasFillColor
18
+ >(),
9
19
  {
10
20
  animated: false,
11
21
  },
12
22
  )
23
+
24
+ const compiledClasses = computed(
25
+ () =>
26
+ getComponentAttributes({
27
+ ...props,
28
+ availableSizes: ['24'],
29
+ interactiveColorsOnGroup: props.interactiveColorsOnGroup,
30
+ }).compiledClasses,
31
+ )
13
32
  </script>
14
33
 
15
34
  <template>
16
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
35
+ <svg
36
+ xmlns="http://www.w3.org/2000/svg"
37
+ fill="none"
38
+ viewBox="0 0 24 24"
39
+ :class="compiledClasses"
40
+ >
17
41
  <PathMorpher
18
42
  class="icon-dark"
19
43
  fill="#1B1E2E"
20
- v-bind="iconGeneralChatBubble.small"
44
+ v-bind="iconAnimatedGeneralChatBubble.small"
21
45
  :animated="animated"
22
46
  />
23
47
  <PathMorpher
24
48
  class="icon-light"
25
49
  fill="#1B1E2E"
26
- v-bind="iconGeneralChatBubble.big"
50
+ v-bind="iconAnimatedGeneralChatBubble.big"
27
51
  :animated="animated"
28
52
  />
29
53
  </svg>
@@ -1,21 +1,45 @@
1
1
  <script lang="ts" setup>
2
2
  import PathMorpher from './_PathMorpher.vue'
3
- import { iconObjectGear } from '@cypress-design/constants-icon'
3
+ import { iconAnimatedObjectGear } from '@cypress-design/icon-registry'
4
+ import {
5
+ type HasStrokeColor,
6
+ type HasFillColor,
7
+ getComponentAttributes,
8
+ } from '@cypress-design/icon-registry'
9
+ import { computed } from 'vue'
4
10
 
5
- withDefaults(
6
- defineProps<{
7
- animated?: boolean
8
- }>(),
11
+ const props = withDefaults(
12
+ defineProps<
13
+ {
14
+ animated?: boolean
15
+ interactiveColorsOnGroup?: boolean
16
+ } & HasStrokeColor &
17
+ HasFillColor
18
+ >(),
9
19
  {
10
20
  animated: false,
11
21
  },
12
22
  )
23
+
24
+ const compiledClasses = computed(
25
+ () =>
26
+ getComponentAttributes({
27
+ ...props,
28
+ availableSizes: ['24'],
29
+ interactiveColorsOnGroup: props.interactiveColorsOnGroup,
30
+ }).compiledClasses,
31
+ )
13
32
  </script>
14
33
 
15
34
  <template>
16
- <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
35
+ <svg
36
+ viewBox="0 0 24 24"
37
+ fill="none"
38
+ xmlns="http://www.w3.org/2000/svg"
39
+ :class="compiledClasses"
40
+ >
17
41
  <PathMorpher
18
- v-bind="iconObjectGear"
42
+ v-bind="iconAnimatedObjectGear"
19
43
  fill-rule="evenodd"
20
44
  clip-rule="evenodd"
21
45
  class="icon-light"
@@ -1,27 +1,52 @@
1
1
  <script lang="ts" setup>
2
- import { iconTechnologyGitBranches } from '@cypress-design/constants-icon'
2
+ import { iconAnimatedTechnologyGitBranches } from '@cypress-design/icon-registry'
3
3
  import PathMorpher from './_PathMorpher.vue'
4
+ import {
5
+ type HasStrokeColor,
6
+ type HasFillColor,
7
+ getComponentAttributes,
8
+ } from '@cypress-design/icon-registry'
9
+ import { computed } from 'vue'
4
10
 
5
- withDefaults(
6
- defineProps<{
7
- animated?: boolean
8
- }>(),
11
+ const props = withDefaults(
12
+ defineProps<
13
+ {
14
+ animated?: boolean
15
+
16
+ interactiveColorsOnGroup?: boolean
17
+ } & HasStrokeColor &
18
+ HasFillColor
19
+ >(),
9
20
  {
10
21
  animated: false,
11
22
  },
12
23
  )
24
+
25
+ const compiledClasses = computed(
26
+ () =>
27
+ getComponentAttributes({
28
+ ...props,
29
+ availableSizes: ['24'],
30
+ interactiveColorsOnGroup: props.interactiveColorsOnGroup,
31
+ }).compiledClasses,
32
+ )
13
33
  </script>
14
34
 
15
35
  <template>
16
- <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
36
+ <svg
37
+ viewBox="0 0 24 24"
38
+ fill="none"
39
+ xmlns="http://www.w3.org/2000/svg"
40
+ :class="compiledClasses"
41
+ >
17
42
  <PathMorpher
18
- v-bind="iconTechnologyGitBranches.left"
43
+ v-bind="iconAnimatedTechnologyGitBranches.left"
19
44
  fill="#1B1E2E"
20
45
  class="icon-light"
21
46
  :animated="animated"
22
47
  />
23
48
  <PathMorpher
24
- v-bind="iconTechnologyGitBranches.right"
49
+ v-bind="iconAnimatedTechnologyGitBranches.right"
25
50
  fill="#747994"
26
51
  class="icon-dark"
27
52
  :animated="animated"
@@ -1,23 +1,47 @@
1
1
  <script lang="ts" setup>
2
- import { iconTechnologyServer } from '@cypress-design/constants-icon'
3
2
  import PathMorpher from './_PathMorpher.vue'
3
+ import {
4
+ type HasStrokeColor,
5
+ type HasFillColor,
6
+ getComponentAttributes,
7
+ iconAnimatedTechnologyServer,
8
+ } from '@cypress-design/icon-registry'
9
+ import { computed } from 'vue'
4
10
 
5
- withDefaults(
6
- defineProps<{
7
- animated?: boolean
8
- }>(),
11
+ const props = withDefaults(
12
+ defineProps<
13
+ {
14
+ animated?: boolean
15
+ interactiveColorsOnGroup?: boolean
16
+ } & HasStrokeColor &
17
+ HasFillColor
18
+ >(),
9
19
  {
10
20
  animated: false,
11
21
  },
12
22
  )
23
+
24
+ const compiledClasses = computed(
25
+ () =>
26
+ getComponentAttributes({
27
+ ...props,
28
+ availableSizes: ['24'],
29
+ interactiveColorsOnGroup: props.interactiveColorsOnGroup,
30
+ }).compiledClasses,
31
+ )
13
32
  </script>
14
33
 
15
34
  <template>
16
- <svg fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
35
+ <svg
36
+ fill="none"
37
+ viewBox="0 0 24 24"
38
+ xmlns="http://www.w3.org/2000/svg"
39
+ :class="compiledClasses"
40
+ >
17
41
  <PathMorpher
18
42
  fill-rule="evenodd"
19
43
  clip-rule="evenodd"
20
- v-bind="iconTechnologyServer.top"
44
+ v-bind="iconAnimatedTechnologyServer.top"
21
45
  :animated="animated"
22
46
  fill="#1B1E2E"
23
47
  class="icon-light"
@@ -25,7 +49,7 @@ withDefaults(
25
49
  <PathMorpher
26
50
  fill-rule="evenodd"
27
51
  clip-rule="evenodd"
28
- v-bind="iconTechnologyServer.middle"
52
+ v-bind="iconAnimatedTechnologyServer.middle"
29
53
  :animated="animated"
30
54
  fill="#9095AD"
31
55
  class="icon-dark"
@@ -34,7 +58,7 @@ withDefaults(
34
58
  <PathMorpher
35
59
  fill-rule="evenodd"
36
60
  clip-rule="evenodd"
37
- v-bind="iconTechnologyServer.bottom"
61
+ v-bind="iconAnimatedTechnologyServer.bottom"
38
62
  :animated="animated"
39
63
  fill="#9095AD"
40
64
  class="icon-dark"
@@ -1,33 +1,59 @@
1
1
  <script lang="ts" setup>
2
- import { iconViewChart } from '@cypress-design/constants-icon'
3
2
  import PathMorpher from './_PathMorpher.vue'
3
+ import {
4
+ type HasStrokeColor,
5
+ type HasFillColor,
6
+ type HasSecondaryStrokeColor,
7
+ getComponentAttributes,
8
+ iconAnimatedViewChart,
9
+ } from '@cypress-design/icon-registry'
10
+ import { computed } from 'vue'
4
11
 
5
- withDefaults(
6
- defineProps<{
7
- animated?: boolean
8
- }>(),
12
+ const props = withDefaults(
13
+ defineProps<
14
+ {
15
+ animated?: boolean
16
+ interactiveColorsOnGroup?: boolean
17
+ } & HasStrokeColor &
18
+ HasFillColor &
19
+ HasSecondaryStrokeColor
20
+ >(),
9
21
  {
10
22
  animated: false,
11
23
  },
12
24
  )
25
+
26
+ const compiledClasses = computed(
27
+ () =>
28
+ getComponentAttributes({
29
+ ...props,
30
+ availableSizes: ['24'],
31
+ interactiveColorsOnGroup: props.interactiveColorsOnGroup,
32
+ }).compiledClasses,
33
+ )
13
34
  </script>
14
35
 
15
36
  <template>
16
- <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
37
+ <svg
38
+ viewBox="0 0 24 24"
39
+ fill="none"
40
+ xmlns="http://www.w3.org/2000/svg"
41
+ :class="compiledClasses"
42
+ >
17
43
  <PathMorpher
18
- v-bind="iconViewChart.topRight"
44
+ v-bind="iconAnimatedViewChart.topRight"
19
45
  fill="#AFB3C7"
20
46
  class="icon-light"
21
47
  :animated="animated"
22
48
  />
23
49
  <PathMorpher
24
- v-bind="iconViewChart.left"
50
+ v-bind="iconAnimatedViewChart.left"
25
51
  fill="#747994"
26
52
  class="icon-dark-secondary"
27
53
  :animated="animated"
28
54
  />
29
55
  <PathMorpher
30
- v-bind="iconViewChart.bottom"
56
+ v-bind="iconAnimatedViewChart.bottom"
31
57
  fill="#1B1E2E"
32
58
  class="icon-dark"
33
59
  :animated="animated"
@@ -35,6 +35,30 @@ export function iconTests(Icon: any) {
35
35
  cy.get('svg').click()
36
36
  })
37
37
 
38
+ it('renders with props', { viewportHeight: 550 }, () => {
39
+ const isAnimated = ref(false)
40
+
41
+ mount(() => (
42
+ <>
43
+ <pre>{isAnimated.value ? 'animated' : 'not animated'}</pre>
44
+
45
+ <Icon
46
+ animated={isAnimated.value}
47
+ width={400}
48
+ height={400}
49
+ fillColor="indigo-500"
50
+ strokeColor="jade-300"
51
+ secondaryStrokeColor="purple-400"
52
+ onClick={() => {
53
+ isAnimated.value = !isAnimated.value
54
+ }}
55
+ />
56
+ </>
57
+ ))
58
+
59
+ cy.get('svg').click()
60
+ })
61
+
38
62
  it('renders both side by side', { viewportWidth: 900 }, () => {
39
63
  mount(() => (
40
64
  <div class="bg-black flex gap-4 text-center text-2xl">
package/dist/Icon.d.ts CHANGED
@@ -1,145 +1,9 @@
1
- declare const _default: import("vue").DefineComponent<Readonly<{
2
- size?: any;
3
- alt?: any;
4
- name?: any;
5
- interactiveColorsOnGroup?: any;
6
- focusWithinStrokeColor?: any;
7
- hoverStrokeColor?: any;
8
- focusStrokeColor?: any;
9
- hocusStrokeColor?: any;
10
- strokeColor?: any;
11
- focusWithinFillColor?: any;
12
- hoverFillColor?: any;
13
- focusFillColor?: any;
14
- hocusFillColor?: any;
15
- fillColor?: any;
16
- focusWithinSecondaryStrokeColor?: any;
17
- hoverSecondaryStrokeColor?: any;
18
- focusSecondaryStrokeColor?: any;
19
- hocusSecondaryStrokeColor?: any;
20
- secondaryStrokeColor?: any;
21
- focusWithinSecondaryFillColor?: any;
22
- hoverSecondaryFillColor?: any;
23
- focusSecondaryFillColor?: any;
24
- hocusSecondaryFillColor?: any;
25
- secondaryFillColor?: any;
1
+ import type { OpenIconProps, IconProps } from '@cypress-design/icon-registry';
2
+ interface Props extends Pick<IconProps, 'name'>, Omit<OpenIconProps, 'name'> {
26
3
  class?: any;
27
- "focus-within-fill-color"?: any;
28
- "focus-within-stroke-color"?: any;
29
- "focus-within-secondary-fill-color"?: any;
30
- "focus-within-secondary-stroke-color"?: any;
31
- "hover-fill-color"?: any;
32
- "hover-stroke-color"?: any;
33
- "hover-secondary-fill-color"?: any;
34
- "hover-secondary-stroke-color"?: any;
35
- "focus-fill-color"?: any;
36
- "focus-stroke-color"?: any;
37
- "focus-secondary-fill-color"?: any;
38
- "focus-secondary-stroke-color"?: any;
39
- "hocus-fill-color"?: any;
40
- "hocus-stroke-color"?: any;
41
- "hocus-secondary-fill-color"?: any;
42
- "hocus-secondary-stroke-color"?: any;
43
- "fill-color"?: any;
44
- "stroke-color"?: any;
45
- "secondary-fill-color"?: any;
46
- "secondary-stroke-color"?: any;
47
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
48
- [key: string]: any;
49
- }> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
50
- [key: string]: any;
51
- }>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
52
- size?: any;
53
- alt?: any;
54
- name?: any;
55
- interactiveColorsOnGroup?: any;
56
- focusWithinStrokeColor?: any;
57
- hoverStrokeColor?: any;
58
- focusStrokeColor?: any;
59
- hocusStrokeColor?: any;
60
- strokeColor?: any;
61
- focusWithinFillColor?: any;
62
- hoverFillColor?: any;
63
- focusFillColor?: any;
64
- hocusFillColor?: any;
65
- fillColor?: any;
66
- focusWithinSecondaryStrokeColor?: any;
67
- hoverSecondaryStrokeColor?: any;
68
- focusSecondaryStrokeColor?: any;
69
- hocusSecondaryStrokeColor?: any;
70
- secondaryStrokeColor?: any;
71
- focusWithinSecondaryFillColor?: any;
72
- hoverSecondaryFillColor?: any;
73
- focusSecondaryFillColor?: any;
74
- hocusSecondaryFillColor?: any;
75
- secondaryFillColor?: any;
4
+ }
5
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props>, {
76
6
  class?: any;
77
- "focus-within-fill-color"?: any;
78
- "focus-within-stroke-color"?: any;
79
- "focus-within-secondary-fill-color"?: any;
80
- "focus-within-secondary-stroke-color"?: any;
81
- "hover-fill-color"?: any;
82
- "hover-stroke-color"?: any;
83
- "hover-secondary-fill-color"?: any;
84
- "hover-secondary-stroke-color"?: any;
85
- "focus-fill-color"?: any;
86
- "focus-stroke-color"?: any;
87
- "focus-secondary-fill-color"?: any;
88
- "focus-secondary-stroke-color"?: any;
89
- "hocus-fill-color"?: any;
90
- "hocus-stroke-color"?: any;
91
- "hocus-secondary-fill-color"?: any;
92
- "hocus-secondary-stroke-color"?: any;
93
- "fill-color"?: any;
94
- "stroke-color"?: any;
95
- "secondary-fill-color"?: any;
96
- "secondary-stroke-color"?: any;
97
- }>>>, {
98
- readonly size?: any;
99
- readonly alt?: any;
100
- readonly name?: any;
101
- readonly interactiveColorsOnGroup?: any;
102
- readonly focusWithinStrokeColor?: any;
103
- readonly hoverStrokeColor?: any;
104
- readonly focusStrokeColor?: any;
105
- readonly hocusStrokeColor?: any;
106
- readonly strokeColor?: any;
107
- readonly focusWithinFillColor?: any;
108
- readonly hoverFillColor?: any;
109
- readonly focusFillColor?: any;
110
- readonly hocusFillColor?: any;
111
- readonly fillColor?: any;
112
- readonly focusWithinSecondaryStrokeColor?: any;
113
- readonly hoverSecondaryStrokeColor?: any;
114
- readonly focusSecondaryStrokeColor?: any;
115
- readonly hocusSecondaryStrokeColor?: any;
116
- readonly secondaryStrokeColor?: any;
117
- readonly focusWithinSecondaryFillColor?: any;
118
- readonly hoverSecondaryFillColor?: any;
119
- readonly focusSecondaryFillColor?: any;
120
- readonly hocusSecondaryFillColor?: any;
121
- readonly secondaryFillColor?: any;
122
- readonly class?: any;
123
- readonly "focus-within-fill-color"?: any;
124
- readonly "focus-within-stroke-color"?: any;
125
- readonly "focus-within-secondary-fill-color"?: any;
126
- readonly "focus-within-secondary-stroke-color"?: any;
127
- readonly "hover-fill-color"?: any;
128
- readonly "hover-stroke-color"?: any;
129
- readonly "hover-secondary-fill-color"?: any;
130
- readonly "hover-secondary-stroke-color"?: any;
131
- readonly "focus-fill-color"?: any;
132
- readonly "focus-stroke-color"?: any;
133
- readonly "focus-secondary-fill-color"?: any;
134
- readonly "focus-secondary-stroke-color"?: any;
135
- readonly "hocus-fill-color"?: any;
136
- readonly "hocus-stroke-color"?: any;
137
- readonly "hocus-secondary-fill-color"?: any;
138
- readonly "hocus-secondary-stroke-color"?: any;
139
- readonly "fill-color"?: any;
140
- readonly "stroke-color"?: any;
141
- readonly "secondary-fill-color"?: any;
142
- readonly "secondary-stroke-color"?: any;
143
7
  }, {}>;
144
8
  export default _default;
145
9
  //# sourceMappingURL=Icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../Icon.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,wBA0DE"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../Icon.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAQ7E,UAAU,KAAM,SAAQ,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC;IAE1E,KAAK,CAAC,EAAE,GAAG,CAAA;CACZ;;;;AAED,wBA0DE"}