@cypress-design/vue-icon 0.24.0 → 0.24.2

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.
@@ -10,6 +10,11 @@ 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
+
13
18
  /**
14
19
  * Icon names of the SVGs whose defs already appear in the DOM
15
20
  */
@@ -27,7 +32,7 @@ const defsAlreadyLoaded = new Set<string>()
27
32
  */
28
33
  export const useShouldRenderDefs = (
29
34
  iconName: string,
30
- defs: ComputedRef<string | undefined>
35
+ defs: ComputedRef<string | undefined>,
31
36
  ) => {
32
37
  const shouldRenderDefs = ref(false)
33
38
 
@@ -50,7 +55,7 @@ export const useShouldRenderDefs = (
50
55
  // add the defs inside an extra SVG and append it to the end of the body only when unmounting
51
56
  const newDefs = document.createElementNS(
52
57
  'http://www.w3.org/2000/svg',
53
- 'svg'
58
+ 'svg',
54
59
  )
55
60
  newDefs.setAttribute('width', '0')
56
61
  newDefs.setAttribute('height', '0')
@@ -73,7 +78,7 @@ export const compileVueIconProperties = (
73
78
  size: string
74
79
  interactiveColorsOnGroup?: boolean
75
80
  }
76
- >
81
+ >,
77
82
  ) => {
78
83
  const ret = computed(() => {
79
84
  const {
@@ -88,7 +93,7 @@ export const compileVueIconProperties = (
88
93
  (newAttributes, attrName) => {
89
94
  if (
90
95
  !ICON_COLOR_PROP_NAMES.includes(
91
- attrName as (typeof ICON_COLOR_PROP_NAMES)[number]
96
+ attrName as (typeof ICON_COLOR_PROP_NAMES)[number],
92
97
  ) &&
93
98
  attrName !== 'name'
94
99
  ) {
@@ -98,7 +103,7 @@ export const compileVueIconProperties = (
98
103
  }
99
104
  return newAttributes
100
105
  },
101
- {} as Omit<SVGAttributes, 'name'>
106
+ {} as Omit<SVGAttributes, 'name'>,
102
107
  )
103
108
 
104
109
  const iconFileId = `${iconName}_${size}`
package/dist/Icon.d.ts CHANGED
@@ -1,6 +1,142 @@
1
- import type { OpenIconProps, IconProps } from '@cypress-design/icon-registry';
2
- declare const _default: (props: OpenIconProps & Pick<IconProps, "name"> & {
3
- class?: string | undefined;
4
- } & {}) => any;
1
+ declare const _default: import("vue").DefineComponent<Readonly<{
2
+ size?: any;
3
+ name?: any;
4
+ interactiveColorsOnGroup?: any;
5
+ focusWithinStrokeColor?: any;
6
+ hoverStrokeColor?: any;
7
+ focusStrokeColor?: any;
8
+ hocusStrokeColor?: any;
9
+ strokeColor?: any;
10
+ focusWithinFillColor?: any;
11
+ hoverFillColor?: any;
12
+ focusFillColor?: any;
13
+ hocusFillColor?: any;
14
+ fillColor?: any;
15
+ focusWithinSecondaryStrokeColor?: any;
16
+ hoverSecondaryStrokeColor?: any;
17
+ focusSecondaryStrokeColor?: any;
18
+ hocusSecondaryStrokeColor?: any;
19
+ secondaryStrokeColor?: any;
20
+ focusWithinSecondaryFillColor?: any;
21
+ hoverSecondaryFillColor?: any;
22
+ focusSecondaryFillColor?: any;
23
+ hocusSecondaryFillColor?: any;
24
+ secondaryFillColor?: any;
25
+ class?: any;
26
+ "focus-within-fill-color"?: any;
27
+ "focus-within-stroke-color"?: any;
28
+ "focus-within-secondary-fill-color"?: any;
29
+ "focus-within-secondary-stroke-color"?: any;
30
+ "hover-fill-color"?: any;
31
+ "hover-stroke-color"?: any;
32
+ "hover-secondary-fill-color"?: any;
33
+ "hover-secondary-stroke-color"?: any;
34
+ "focus-fill-color"?: any;
35
+ "focus-stroke-color"?: any;
36
+ "focus-secondary-fill-color"?: any;
37
+ "focus-secondary-stroke-color"?: any;
38
+ "hocus-fill-color"?: any;
39
+ "hocus-stroke-color"?: any;
40
+ "hocus-secondary-fill-color"?: any;
41
+ "hocus-secondary-stroke-color"?: any;
42
+ "fill-color"?: any;
43
+ "stroke-color"?: any;
44
+ "secondary-fill-color"?: any;
45
+ "secondary-stroke-color"?: any;
46
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
47
+ [key: string]: any;
48
+ }> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
49
+ [key: string]: any;
50
+ }>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
51
+ size?: any;
52
+ name?: any;
53
+ interactiveColorsOnGroup?: any;
54
+ focusWithinStrokeColor?: any;
55
+ hoverStrokeColor?: any;
56
+ focusStrokeColor?: any;
57
+ hocusStrokeColor?: any;
58
+ strokeColor?: any;
59
+ focusWithinFillColor?: any;
60
+ hoverFillColor?: any;
61
+ focusFillColor?: any;
62
+ hocusFillColor?: any;
63
+ fillColor?: any;
64
+ focusWithinSecondaryStrokeColor?: any;
65
+ hoverSecondaryStrokeColor?: any;
66
+ focusSecondaryStrokeColor?: any;
67
+ hocusSecondaryStrokeColor?: any;
68
+ secondaryStrokeColor?: any;
69
+ focusWithinSecondaryFillColor?: any;
70
+ hoverSecondaryFillColor?: any;
71
+ focusSecondaryFillColor?: any;
72
+ hocusSecondaryFillColor?: any;
73
+ secondaryFillColor?: any;
74
+ class?: any;
75
+ "focus-within-fill-color"?: any;
76
+ "focus-within-stroke-color"?: any;
77
+ "focus-within-secondary-fill-color"?: any;
78
+ "focus-within-secondary-stroke-color"?: any;
79
+ "hover-fill-color"?: any;
80
+ "hover-stroke-color"?: any;
81
+ "hover-secondary-fill-color"?: any;
82
+ "hover-secondary-stroke-color"?: any;
83
+ "focus-fill-color"?: any;
84
+ "focus-stroke-color"?: any;
85
+ "focus-secondary-fill-color"?: any;
86
+ "focus-secondary-stroke-color"?: any;
87
+ "hocus-fill-color"?: any;
88
+ "hocus-stroke-color"?: any;
89
+ "hocus-secondary-fill-color"?: any;
90
+ "hocus-secondary-stroke-color"?: any;
91
+ "fill-color"?: any;
92
+ "stroke-color"?: any;
93
+ "secondary-fill-color"?: any;
94
+ "secondary-stroke-color"?: any;
95
+ }>>>, {
96
+ readonly size?: any;
97
+ readonly name?: any;
98
+ readonly interactiveColorsOnGroup?: any;
99
+ readonly focusWithinStrokeColor?: any;
100
+ readonly hoverStrokeColor?: any;
101
+ readonly focusStrokeColor?: any;
102
+ readonly hocusStrokeColor?: any;
103
+ readonly strokeColor?: any;
104
+ readonly focusWithinFillColor?: any;
105
+ readonly hoverFillColor?: any;
106
+ readonly focusFillColor?: any;
107
+ readonly hocusFillColor?: any;
108
+ readonly fillColor?: any;
109
+ readonly focusWithinSecondaryStrokeColor?: any;
110
+ readonly hoverSecondaryStrokeColor?: any;
111
+ readonly focusSecondaryStrokeColor?: any;
112
+ readonly hocusSecondaryStrokeColor?: any;
113
+ readonly secondaryStrokeColor?: any;
114
+ readonly focusWithinSecondaryFillColor?: any;
115
+ readonly hoverSecondaryFillColor?: any;
116
+ readonly focusSecondaryFillColor?: any;
117
+ readonly hocusSecondaryFillColor?: any;
118
+ readonly secondaryFillColor?: any;
119
+ readonly class?: any;
120
+ readonly "focus-within-fill-color"?: any;
121
+ readonly "focus-within-stroke-color"?: any;
122
+ readonly "focus-within-secondary-fill-color"?: any;
123
+ readonly "focus-within-secondary-stroke-color"?: any;
124
+ readonly "hover-fill-color"?: any;
125
+ readonly "hover-stroke-color"?: any;
126
+ readonly "hover-secondary-fill-color"?: any;
127
+ readonly "hover-secondary-stroke-color"?: any;
128
+ readonly "focus-fill-color"?: any;
129
+ readonly "focus-stroke-color"?: any;
130
+ readonly "focus-secondary-fill-color"?: any;
131
+ readonly "focus-secondary-stroke-color"?: any;
132
+ readonly "hocus-fill-color"?: any;
133
+ readonly "hocus-stroke-color"?: any;
134
+ readonly "hocus-secondary-fill-color"?: any;
135
+ readonly "hocus-secondary-stroke-color"?: any;
136
+ readonly "fill-color"?: any;
137
+ readonly "stroke-color"?: any;
138
+ readonly "secondary-fill-color"?: any;
139
+ readonly "secondary-stroke-color"?: any;
140
+ }, {}>;
5
141
  export default _default;
6
142
  //# sourceMappingURL=Icon.d.ts.map
@@ -1 +1 @@
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,wBAwDC"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../Icon.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,wBAyDE"}