@digigov/react-icons 2.0.0-rc.1 → 2.0.0-rc.11
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.
- package/Base/index.d.ts +95 -0
- package/Base/index.js +69 -0
- package/Base/package.json +6 -0
- package/Icon/index.d.ts +1 -1
- package/Icon/index.js +1 -1
- package/SvgIcon/__snapshots__/index.test.tsx.snap +390 -0
- package/SvgIcon/index.d.ts +37 -0
- package/SvgIcon/index.js +26 -0
- package/SvgIcon/index.test/index.js +105 -0
- package/SvgIcon/index.test/package.json +6 -0
- package/SvgIcon/index.test.d.ts +1 -0
- package/SvgIcon/package.json +6 -0
- package/cjs/Base/index.js +75 -0
- package/cjs/Icon/index.js +1 -1
- package/cjs/SvgIcon/__snapshots__/index.test.tsx.snap +390 -0
- package/cjs/SvgIcon/index.js +33 -0
- package/cjs/SvgIcon/index.test/index.js +108 -0
- package/cjs/lazy/index.js +108 -0
- package/cjs/registry/index.js +4 -0
- package/index.js +1 -1
- package/lazy/index.js +84 -0
- package/lazy.d.ts +12 -0
- package/package.json +3 -3
- package/registry/index.js +4 -0
- package/registry.d.ts +2 -0
- package/src/Base/index.tsx +257 -0
- package/src/Icon/index.tsx +1 -1
- package/src/SvgIcon/__snapshots__/index.test.tsx.snap +390 -0
- package/src/SvgIcon/index.test.tsx +68 -0
- package/src/SvgIcon/index.tsx +72 -0
- package/src/lazy.js +12 -0
- package/src/registry.js +4 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
|
|
4
|
+
type AsProp<C extends React.ElementType> = {
|
|
5
|
+
as?: C;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
|
|
9
|
+
|
|
10
|
+
// This is the first reusable type utility we built
|
|
11
|
+
type PolymorphicComponentProp<
|
|
12
|
+
C extends React.ElementType,
|
|
13
|
+
Props = Record<string, unknown>,
|
|
14
|
+
> = React.PropsWithChildren<Props & AsProp<C>> &
|
|
15
|
+
Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
|
16
|
+
|
|
17
|
+
// This is a new type utitlity with ref!
|
|
18
|
+
type PolymorphicComponentPropWithRef<
|
|
19
|
+
C extends React.ElementType,
|
|
20
|
+
Props = Record<string, unknown>,
|
|
21
|
+
> = PolymorphicComponentProp<C, Props> & { ref?: any };
|
|
22
|
+
|
|
23
|
+
// This is the type for the "ref" only
|
|
24
|
+
type PolymorphicRef<C extends React.ElementType> =
|
|
25
|
+
React.ComponentPropsWithRef<C>['ref'];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This is the updated component props using PolymorphicComponentPropWithRef
|
|
29
|
+
*/
|
|
30
|
+
export type BaseProps<C extends React.ElementType> =
|
|
31
|
+
PolymorphicComponentPropWithRef<
|
|
32
|
+
C,
|
|
33
|
+
{
|
|
34
|
+
/** margin is optional. It has not a default value. */
|
|
35
|
+
margin?: spacingValues;
|
|
36
|
+
/** marginTop is optional. It has not a default value. */
|
|
37
|
+
marginTop?: spacingValues;
|
|
38
|
+
/** marginBottom is optional. It has not a default value. */
|
|
39
|
+
marginBottom?: spacingValues;
|
|
40
|
+
/** marginLeft is optional. It has not a default value. */
|
|
41
|
+
marginLeft?: spacingValues;
|
|
42
|
+
/** marginRight is optional. It has not a default value. */
|
|
43
|
+
marginRight?: spacingValues;
|
|
44
|
+
/** Alternative for margin. Margin is optional. It has not a default value. */
|
|
45
|
+
m?: spacingValues;
|
|
46
|
+
/** Alternative for marginTop. MarginTop is optional. It has not a default value. */
|
|
47
|
+
mt?: spacingValues;
|
|
48
|
+
/** Alternative for marginBottom. MarginBottom is optional. It has not a default value. */
|
|
49
|
+
mb?: spacingValues;
|
|
50
|
+
/** Alternative for marginLeft. MarginLeft is optional. It has not a default value. */
|
|
51
|
+
ml?: spacingValues;
|
|
52
|
+
/** Alternative for marginRight. MarginRight is optional. It has not a default value. */
|
|
53
|
+
mr?: spacingValues;
|
|
54
|
+
/** Alternative for marginX. MarginX is optional. It has not a default value. */
|
|
55
|
+
mx?: spacingValues;
|
|
56
|
+
/** Alternative for marginY. MarginY is optional. It has not a default value. */
|
|
57
|
+
my?: spacingValues;
|
|
58
|
+
/** padding is optional. It has not a default value. */
|
|
59
|
+
padding?: spacingValues;
|
|
60
|
+
/** paddingTop is optional. It has not a default value. */
|
|
61
|
+
paddingTop?: spacingValues;
|
|
62
|
+
/** paddingBottom is optional. It has not a default value. */
|
|
63
|
+
paddingBottom?: spacingValues;
|
|
64
|
+
/** paddingLeft is optional. It has not a default value. */
|
|
65
|
+
paddingLeft?: spacingValues;
|
|
66
|
+
/** paddingRight is optional. It has not a default value. */
|
|
67
|
+
paddingRight?: spacingValues;
|
|
68
|
+
/** Alternative for padding. Padding is optional. It has not a default value. */
|
|
69
|
+
p?: spacingValues;
|
|
70
|
+
/** Alternative for paddingTop. PaddingTop is optional. It has not a default value. */
|
|
71
|
+
pt?: spacingValues;
|
|
72
|
+
/** Alternative for paddingBottom. PaddingBottom is optional. It has not a default value. */
|
|
73
|
+
pb?: spacingValues;
|
|
74
|
+
/** Alternative for paddingLeft. PaddingLeft is optional. It has not a default value. */
|
|
75
|
+
pl?: spacingValues;
|
|
76
|
+
/** Alternative for paddingRight. PaddingRight is optional. It has not a default value. */
|
|
77
|
+
pr?: spacingValues;
|
|
78
|
+
/** Alternative for paddingX. PaddingX is optional. It has not a default value. */
|
|
79
|
+
px?: spacingValues;
|
|
80
|
+
/** Alternative for paddingY. PaddingY is optional. It has not a default value. */
|
|
81
|
+
py?: spacingValues;
|
|
82
|
+
/** printHidden is optional. Default value is false. When true, the component is hidden at print. */
|
|
83
|
+
printHidden?: boolean;
|
|
84
|
+
/** printVisible is optional. When block, the component is displayed as block. When inline, the component is displayed as inline.*/
|
|
85
|
+
printVisible?: 'block' | 'inline';
|
|
86
|
+
/** Components will be hidden at all screen sizes. */
|
|
87
|
+
hidden?: boolean;
|
|
88
|
+
/** Components will be hidden from 'xs' screen size and up. */
|
|
89
|
+
xsUpHidden?: boolean;
|
|
90
|
+
/** Components will be hidden from 'sm' screen size and up. */
|
|
91
|
+
smUpHidden?: boolean;
|
|
92
|
+
/** Components will be hidden from 'md' screen size and up. */
|
|
93
|
+
mdUpHidden?: boolean;
|
|
94
|
+
/** Components will be hidden from 'lg' screen size and up. */
|
|
95
|
+
lgUpHidden?: boolean;
|
|
96
|
+
/** Components will be hidden from 'xl' screen size and up. */
|
|
97
|
+
xlUpHidden?: boolean;
|
|
98
|
+
/** Components will be hidden between xs and sm screen size. */
|
|
99
|
+
xsHidden?: boolean;
|
|
100
|
+
/** Components will be hidden between sm and md screen size. */
|
|
101
|
+
smHidden?: boolean;
|
|
102
|
+
/** Components will be hidden between md and lg screen size. */
|
|
103
|
+
mdHidden?: boolean;
|
|
104
|
+
/** Components will be hidden between lg and xl screen size. */
|
|
105
|
+
lgHidden?: boolean;
|
|
106
|
+
/** Components will be hidden between xl and 2xl screen size. */
|
|
107
|
+
xlHidden?: boolean;
|
|
108
|
+
}
|
|
109
|
+
>;
|
|
110
|
+
|
|
111
|
+
type spacingValues =
|
|
112
|
+
| 0
|
|
113
|
+
| 0.5
|
|
114
|
+
| 1
|
|
115
|
+
| 1.5
|
|
116
|
+
| 2
|
|
117
|
+
| 2.5
|
|
118
|
+
| 3
|
|
119
|
+
| 3.5
|
|
120
|
+
| 4
|
|
121
|
+
| 5
|
|
122
|
+
| 6
|
|
123
|
+
| 7
|
|
124
|
+
| 8
|
|
125
|
+
| 9
|
|
126
|
+
| 10
|
|
127
|
+
| 11
|
|
128
|
+
| 12
|
|
129
|
+
| 14
|
|
130
|
+
| 16
|
|
131
|
+
| 20
|
|
132
|
+
| 24
|
|
133
|
+
| 28
|
|
134
|
+
| 32
|
|
135
|
+
| 36
|
|
136
|
+
| 40
|
|
137
|
+
| 44
|
|
138
|
+
| 48
|
|
139
|
+
| 52
|
|
140
|
+
| 56
|
|
141
|
+
| 60
|
|
142
|
+
| 64
|
|
143
|
+
| 72
|
|
144
|
+
| 80
|
|
145
|
+
| 96;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* This is the type used in the type annotation for the component
|
|
149
|
+
*/
|
|
150
|
+
type BaseComponent = <C extends React.ElementType = 'span'>(
|
|
151
|
+
props: BaseProps<C>
|
|
152
|
+
) => React.ReactElement | null;
|
|
153
|
+
|
|
154
|
+
export const Base: BaseComponent = React.forwardRef(function Base<
|
|
155
|
+
C extends React.ElementType = 'span',
|
|
156
|
+
>(
|
|
157
|
+
{
|
|
158
|
+
as,
|
|
159
|
+
margin,
|
|
160
|
+
marginTop,
|
|
161
|
+
marginBottom,
|
|
162
|
+
marginLeft,
|
|
163
|
+
marginRight,
|
|
164
|
+
m,
|
|
165
|
+
mt,
|
|
166
|
+
mb,
|
|
167
|
+
ml,
|
|
168
|
+
mr,
|
|
169
|
+
mx,
|
|
170
|
+
my,
|
|
171
|
+
padding,
|
|
172
|
+
paddingTop,
|
|
173
|
+
paddingBottom,
|
|
174
|
+
paddingLeft,
|
|
175
|
+
paddingRight,
|
|
176
|
+
p,
|
|
177
|
+
pt,
|
|
178
|
+
pb,
|
|
179
|
+
pr,
|
|
180
|
+
pl,
|
|
181
|
+
px,
|
|
182
|
+
py,
|
|
183
|
+
printHidden,
|
|
184
|
+
printVisible,
|
|
185
|
+
hidden,
|
|
186
|
+
xsUpHidden,
|
|
187
|
+
smUpHidden,
|
|
188
|
+
mdUpHidden,
|
|
189
|
+
lgUpHidden,
|
|
190
|
+
xlUpHidden,
|
|
191
|
+
xsHidden,
|
|
192
|
+
smHidden,
|
|
193
|
+
mdHidden,
|
|
194
|
+
lgHidden,
|
|
195
|
+
xlHidden,
|
|
196
|
+
children,
|
|
197
|
+
className,
|
|
198
|
+
...props
|
|
199
|
+
}: BaseProps<C>,
|
|
200
|
+
ref?: PolymorphicRef<C>
|
|
201
|
+
) {
|
|
202
|
+
const Component = as || 'span';
|
|
203
|
+
|
|
204
|
+
return (
|
|
205
|
+
<Component
|
|
206
|
+
className={clsx(className, {
|
|
207
|
+
[`ds-m-${margin}`]: margin !== undefined ? true : undefined,
|
|
208
|
+
[`ds-mt-${marginTop}`]: marginTop !== undefined ? true : undefined,
|
|
209
|
+
[`ds-mb-${marginBottom}`]:
|
|
210
|
+
marginBottom !== undefined ? true : undefined,
|
|
211
|
+
[`ds-mr-${marginRight}`]: marginRight !== undefined ? true : undefined,
|
|
212
|
+
[`ds-ml-${marginLeft}`]: marginLeft !== undefined ? true : undefined,
|
|
213
|
+
[`ds-m-${m}`]: m !== undefined ? true : undefined,
|
|
214
|
+
[`ds-mt-${mt}`]: mt !== undefined ? true : undefined,
|
|
215
|
+
[`ds-mb-${mb}`]: mb !== undefined ? true : undefined,
|
|
216
|
+
[`ds-mr-${mr}`]: mr !== undefined ? true : undefined,
|
|
217
|
+
[`ds-ml-${ml}`]: ml !== undefined ? true : undefined,
|
|
218
|
+
[`ds-mx-${mx}`]: mx !== undefined ? true : undefined,
|
|
219
|
+
[`ds-my-${my}`]: my !== undefined ? true : undefined,
|
|
220
|
+
[`ds-p-${padding}`]: padding !== undefined ? true : undefined,
|
|
221
|
+
[`ds-pt-${paddingTop}`]: paddingTop !== undefined ? true : undefined,
|
|
222
|
+
[`ds-pb-${paddingBottom}`]:
|
|
223
|
+
paddingBottom !== undefined ? true : undefined,
|
|
224
|
+
[`ds-pr-${paddingRight}`]:
|
|
225
|
+
paddingRight !== undefined ? true : undefined,
|
|
226
|
+
[`ds-pl-${paddingLeft}`]: paddingLeft !== undefined ? true : undefined,
|
|
227
|
+
[`ds-p-${p}`]: p !== undefined ? true : undefined,
|
|
228
|
+
[`ds-pt-${pt}`]: pt !== undefined ? true : undefined,
|
|
229
|
+
[`ds-pb-${pb}`]: pb !== undefined ? true : undefined,
|
|
230
|
+
[`ds-pr-${pr}`]: pr !== undefined ? true : undefined,
|
|
231
|
+
[`ds-pl-${pl}`]: pl !== undefined ? true : undefined,
|
|
232
|
+
[`ds-px-${px}`]: px !== undefined ? true : undefined,
|
|
233
|
+
[`ds-py-${py}`]: py !== undefined ? true : undefined,
|
|
234
|
+
'ds-print-hidden': !!printHidden,
|
|
235
|
+
'ds-print-visible-block': printVisible === 'block',
|
|
236
|
+
'ds-print-visible-inline': printVisible === 'inline',
|
|
237
|
+
'ds-hidden': !!hidden,
|
|
238
|
+
'ds-hidden-xs-up': !!xsUpHidden,
|
|
239
|
+
'ds-hidden-sm-up': !!smUpHidden,
|
|
240
|
+
'ds-hidden-md-up': !!mdUpHidden,
|
|
241
|
+
'ds-hidden-lg-up': !!lgUpHidden,
|
|
242
|
+
'ds-hidden-xl-up': !!xlUpHidden,
|
|
243
|
+
'ds-hidden-xs': !!xsHidden,
|
|
244
|
+
'ds-hidden-sm': !!smHidden,
|
|
245
|
+
'ds-hidden-md': !!mdHidden,
|
|
246
|
+
'ds-hidden-lg': !!lgHidden,
|
|
247
|
+
'ds-hidden-xl': !!xlHidden,
|
|
248
|
+
})}
|
|
249
|
+
ref={ref}
|
|
250
|
+
{...props}
|
|
251
|
+
>
|
|
252
|
+
{children}
|
|
253
|
+
</Component>
|
|
254
|
+
);
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
export default Base;
|
package/src/Icon/index.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import SvgIcon, { SvgIconProps } from '@digigov/react-
|
|
3
|
+
import SvgIcon, { SvgIconProps } from '@digigov/react-icons/SvgIcon';
|
|
4
4
|
import * as icons from '@digigov/react-icons/icons';
|
|
5
5
|
import type { IconTypes } from '@digigov/react-icons/icons';
|
|
6
6
|
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the SvgIcon with no props 1`] = `
|
|
4
|
+
<ForwardRef(SvgIcon)>
|
|
5
|
+
<ForwardRef(Base)
|
|
6
|
+
aria-hidden="true"
|
|
7
|
+
as="svg"
|
|
8
|
+
className="ds-svg-icon"
|
|
9
|
+
focusable="false"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
>
|
|
12
|
+
<svg
|
|
13
|
+
aria-hidden="true"
|
|
14
|
+
className="ds-svg-icon"
|
|
15
|
+
focusable="false"
|
|
16
|
+
viewBox="0 0 24 24"
|
|
17
|
+
/>
|
|
18
|
+
</ForwardRef(Base)>
|
|
19
|
+
</ForwardRef(SvgIcon)>
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
exports[`renders the SvgIcon with prop color=base-content 1`] = `
|
|
23
|
+
<ForwardRef(SvgIcon)
|
|
24
|
+
color="base-content"
|
|
25
|
+
>
|
|
26
|
+
<ForwardRef(Base)
|
|
27
|
+
aria-hidden="true"
|
|
28
|
+
as="svg"
|
|
29
|
+
className="ds-svg-icon--base-content ds-svg-icon"
|
|
30
|
+
focusable="false"
|
|
31
|
+
viewBox="0 0 24 24"
|
|
32
|
+
>
|
|
33
|
+
<svg
|
|
34
|
+
aria-hidden="true"
|
|
35
|
+
className="ds-svg-icon--base-content ds-svg-icon"
|
|
36
|
+
focusable="false"
|
|
37
|
+
viewBox="0 0 24 24"
|
|
38
|
+
>
|
|
39
|
+
hello
|
|
40
|
+
</svg>
|
|
41
|
+
</ForwardRef(Base)>
|
|
42
|
+
</ForwardRef(SvgIcon)>
|
|
43
|
+
`;
|
|
44
|
+
|
|
45
|
+
exports[`renders the SvgIcon with prop color=dark 1`] = `
|
|
46
|
+
<ForwardRef(SvgIcon)
|
|
47
|
+
color="dark"
|
|
48
|
+
>
|
|
49
|
+
<ForwardRef(Base)
|
|
50
|
+
aria-hidden="true"
|
|
51
|
+
as="svg"
|
|
52
|
+
className="ds-svg-icon--dark ds-svg-icon"
|
|
53
|
+
focusable="false"
|
|
54
|
+
viewBox="0 0 24 24"
|
|
55
|
+
>
|
|
56
|
+
<svg
|
|
57
|
+
aria-hidden="true"
|
|
58
|
+
className="ds-svg-icon--dark ds-svg-icon"
|
|
59
|
+
focusable="false"
|
|
60
|
+
viewBox="0 0 24 24"
|
|
61
|
+
>
|
|
62
|
+
hello
|
|
63
|
+
</svg>
|
|
64
|
+
</ForwardRef(Base)>
|
|
65
|
+
</ForwardRef(SvgIcon)>
|
|
66
|
+
`;
|
|
67
|
+
|
|
68
|
+
exports[`renders the SvgIcon with prop color=error 1`] = `
|
|
69
|
+
<ForwardRef(SvgIcon)
|
|
70
|
+
color="error"
|
|
71
|
+
>
|
|
72
|
+
<ForwardRef(Base)
|
|
73
|
+
aria-hidden="true"
|
|
74
|
+
as="svg"
|
|
75
|
+
className="ds-svg-icon--error ds-svg-icon"
|
|
76
|
+
focusable="false"
|
|
77
|
+
viewBox="0 0 24 24"
|
|
78
|
+
>
|
|
79
|
+
<svg
|
|
80
|
+
aria-hidden="true"
|
|
81
|
+
className="ds-svg-icon--error ds-svg-icon"
|
|
82
|
+
focusable="false"
|
|
83
|
+
viewBox="0 0 24 24"
|
|
84
|
+
>
|
|
85
|
+
hello
|
|
86
|
+
</svg>
|
|
87
|
+
</ForwardRef(Base)>
|
|
88
|
+
</ForwardRef(SvgIcon)>
|
|
89
|
+
`;
|
|
90
|
+
|
|
91
|
+
exports[`renders the SvgIcon with prop color=error and size= xl 1`] = `
|
|
92
|
+
<ForwardRef(SvgIcon)
|
|
93
|
+
color="warning"
|
|
94
|
+
size="xl"
|
|
95
|
+
>
|
|
96
|
+
<ForwardRef(Base)
|
|
97
|
+
aria-hidden="true"
|
|
98
|
+
as="svg"
|
|
99
|
+
className="ds-svg-icon--warning ds-svg-icon--xl ds-svg-icon"
|
|
100
|
+
focusable="false"
|
|
101
|
+
viewBox="0 0 24 24"
|
|
102
|
+
>
|
|
103
|
+
<svg
|
|
104
|
+
aria-hidden="true"
|
|
105
|
+
className="ds-svg-icon--warning ds-svg-icon--xl ds-svg-icon"
|
|
106
|
+
focusable="false"
|
|
107
|
+
viewBox="0 0 24 24"
|
|
108
|
+
>
|
|
109
|
+
hello
|
|
110
|
+
</svg>
|
|
111
|
+
</ForwardRef(Base)>
|
|
112
|
+
</ForwardRef(SvgIcon)>
|
|
113
|
+
`;
|
|
114
|
+
|
|
115
|
+
exports[`renders the SvgIcon with prop color=focus 1`] = `
|
|
116
|
+
<ForwardRef(SvgIcon)
|
|
117
|
+
color="focus"
|
|
118
|
+
>
|
|
119
|
+
<ForwardRef(Base)
|
|
120
|
+
aria-hidden="true"
|
|
121
|
+
as="svg"
|
|
122
|
+
className="ds-svg-icon--focus ds-svg-icon"
|
|
123
|
+
focusable="false"
|
|
124
|
+
viewBox="0 0 24 24"
|
|
125
|
+
>
|
|
126
|
+
<svg
|
|
127
|
+
aria-hidden="true"
|
|
128
|
+
className="ds-svg-icon--focus ds-svg-icon"
|
|
129
|
+
focusable="false"
|
|
130
|
+
viewBox="0 0 24 24"
|
|
131
|
+
>
|
|
132
|
+
hello
|
|
133
|
+
</svg>
|
|
134
|
+
</ForwardRef(Base)>
|
|
135
|
+
</ForwardRef(SvgIcon)>
|
|
136
|
+
`;
|
|
137
|
+
|
|
138
|
+
exports[`renders the SvgIcon with prop color=gray 1`] = `
|
|
139
|
+
<ForwardRef(SvgIcon)
|
|
140
|
+
color="gray"
|
|
141
|
+
>
|
|
142
|
+
<ForwardRef(Base)
|
|
143
|
+
aria-hidden="true"
|
|
144
|
+
as="svg"
|
|
145
|
+
className="ds-svg-icon--gray ds-svg-icon"
|
|
146
|
+
focusable="false"
|
|
147
|
+
viewBox="0 0 24 24"
|
|
148
|
+
>
|
|
149
|
+
<svg
|
|
150
|
+
aria-hidden="true"
|
|
151
|
+
className="ds-svg-icon--gray ds-svg-icon"
|
|
152
|
+
focusable="false"
|
|
153
|
+
viewBox="0 0 24 24"
|
|
154
|
+
>
|
|
155
|
+
hello
|
|
156
|
+
</svg>
|
|
157
|
+
</ForwardRef(Base)>
|
|
158
|
+
</ForwardRef(SvgIcon)>
|
|
159
|
+
`;
|
|
160
|
+
|
|
161
|
+
exports[`renders the SvgIcon with prop color=primary 1`] = `
|
|
162
|
+
<ForwardRef(SvgIcon)
|
|
163
|
+
color="primary"
|
|
164
|
+
>
|
|
165
|
+
<ForwardRef(Base)
|
|
166
|
+
aria-hidden="true"
|
|
167
|
+
as="svg"
|
|
168
|
+
className="ds-svg-icon--primary ds-svg-icon"
|
|
169
|
+
focusable="false"
|
|
170
|
+
viewBox="0 0 24 24"
|
|
171
|
+
>
|
|
172
|
+
<svg
|
|
173
|
+
aria-hidden="true"
|
|
174
|
+
className="ds-svg-icon--primary ds-svg-icon"
|
|
175
|
+
focusable="false"
|
|
176
|
+
viewBox="0 0 24 24"
|
|
177
|
+
>
|
|
178
|
+
hello
|
|
179
|
+
</svg>
|
|
180
|
+
</ForwardRef(Base)>
|
|
181
|
+
</ForwardRef(SvgIcon)>
|
|
182
|
+
`;
|
|
183
|
+
|
|
184
|
+
exports[`renders the SvgIcon with prop color=success 1`] = `
|
|
185
|
+
<ForwardRef(SvgIcon)
|
|
186
|
+
color="success"
|
|
187
|
+
>
|
|
188
|
+
<ForwardRef(Base)
|
|
189
|
+
aria-hidden="true"
|
|
190
|
+
as="svg"
|
|
191
|
+
className="ds-svg-icon--success ds-svg-icon"
|
|
192
|
+
focusable="false"
|
|
193
|
+
viewBox="0 0 24 24"
|
|
194
|
+
>
|
|
195
|
+
<svg
|
|
196
|
+
aria-hidden="true"
|
|
197
|
+
className="ds-svg-icon--success ds-svg-icon"
|
|
198
|
+
focusable="false"
|
|
199
|
+
viewBox="0 0 24 24"
|
|
200
|
+
>
|
|
201
|
+
hello
|
|
202
|
+
</svg>
|
|
203
|
+
</ForwardRef(Base)>
|
|
204
|
+
</ForwardRef(SvgIcon)>
|
|
205
|
+
`;
|
|
206
|
+
|
|
207
|
+
exports[`renders the SvgIcon with prop color=warning 1`] = `
|
|
208
|
+
<ForwardRef(SvgIcon)
|
|
209
|
+
color="warning"
|
|
210
|
+
>
|
|
211
|
+
<ForwardRef(Base)
|
|
212
|
+
aria-hidden="true"
|
|
213
|
+
as="svg"
|
|
214
|
+
className="ds-svg-icon--warning ds-svg-icon"
|
|
215
|
+
focusable="false"
|
|
216
|
+
viewBox="0 0 24 24"
|
|
217
|
+
>
|
|
218
|
+
<svg
|
|
219
|
+
aria-hidden="true"
|
|
220
|
+
className="ds-svg-icon--warning ds-svg-icon"
|
|
221
|
+
focusable="false"
|
|
222
|
+
viewBox="0 0 24 24"
|
|
223
|
+
>
|
|
224
|
+
hello
|
|
225
|
+
</svg>
|
|
226
|
+
</ForwardRef(Base)>
|
|
227
|
+
</ForwardRef(SvgIcon)>
|
|
228
|
+
`;
|
|
229
|
+
|
|
230
|
+
exports[`renders the SvgIcon with prop color=warning and size=sm 1`] = `
|
|
231
|
+
<ForwardRef(SvgIcon)
|
|
232
|
+
color="warning"
|
|
233
|
+
size="sm"
|
|
234
|
+
>
|
|
235
|
+
<ForwardRef(Base)
|
|
236
|
+
aria-hidden="true"
|
|
237
|
+
as="svg"
|
|
238
|
+
className="ds-svg-icon--warning ds-svg-icon--sm ds-svg-icon"
|
|
239
|
+
focusable="false"
|
|
240
|
+
viewBox="0 0 24 24"
|
|
241
|
+
>
|
|
242
|
+
<svg
|
|
243
|
+
aria-hidden="true"
|
|
244
|
+
className="ds-svg-icon--warning ds-svg-icon--sm ds-svg-icon"
|
|
245
|
+
focusable="false"
|
|
246
|
+
viewBox="0 0 24 24"
|
|
247
|
+
>
|
|
248
|
+
hello
|
|
249
|
+
</svg>
|
|
250
|
+
</ForwardRef(Base)>
|
|
251
|
+
</ForwardRef(SvgIcon)>
|
|
252
|
+
`;
|
|
253
|
+
|
|
254
|
+
exports[`renders the SvgIcon with prop color=white 1`] = `
|
|
255
|
+
<ForwardRef(SvgIcon)
|
|
256
|
+
color="white"
|
|
257
|
+
>
|
|
258
|
+
<ForwardRef(Base)
|
|
259
|
+
aria-hidden="true"
|
|
260
|
+
as="svg"
|
|
261
|
+
className="ds-svg-icon--white ds-svg-icon"
|
|
262
|
+
focusable="false"
|
|
263
|
+
viewBox="0 0 24 24"
|
|
264
|
+
>
|
|
265
|
+
<svg
|
|
266
|
+
aria-hidden="true"
|
|
267
|
+
className="ds-svg-icon--white ds-svg-icon"
|
|
268
|
+
focusable="false"
|
|
269
|
+
viewBox="0 0 24 24"
|
|
270
|
+
>
|
|
271
|
+
hello
|
|
272
|
+
</svg>
|
|
273
|
+
</ForwardRef(Base)>
|
|
274
|
+
</ForwardRef(SvgIcon)>
|
|
275
|
+
`;
|
|
276
|
+
|
|
277
|
+
exports[`renders the SvgIcon with prop size=lg 1`] = `
|
|
278
|
+
<ForwardRef(SvgIcon)
|
|
279
|
+
size="lg"
|
|
280
|
+
>
|
|
281
|
+
<ForwardRef(Base)
|
|
282
|
+
aria-hidden="true"
|
|
283
|
+
as="svg"
|
|
284
|
+
className="ds-svg-icon--lg ds-svg-icon"
|
|
285
|
+
focusable="false"
|
|
286
|
+
viewBox="0 0 24 24"
|
|
287
|
+
>
|
|
288
|
+
<svg
|
|
289
|
+
aria-hidden="true"
|
|
290
|
+
className="ds-svg-icon--lg ds-svg-icon"
|
|
291
|
+
focusable="false"
|
|
292
|
+
viewBox="0 0 24 24"
|
|
293
|
+
>
|
|
294
|
+
hello
|
|
295
|
+
</svg>
|
|
296
|
+
</ForwardRef(Base)>
|
|
297
|
+
</ForwardRef(SvgIcon)>
|
|
298
|
+
`;
|
|
299
|
+
|
|
300
|
+
exports[`renders the SvgIcon with prop size=md 1`] = `
|
|
301
|
+
<ForwardRef(SvgIcon)
|
|
302
|
+
size="md"
|
|
303
|
+
>
|
|
304
|
+
<ForwardRef(Base)
|
|
305
|
+
aria-hidden="true"
|
|
306
|
+
as="svg"
|
|
307
|
+
className="ds-svg-icon--md ds-svg-icon"
|
|
308
|
+
focusable="false"
|
|
309
|
+
viewBox="0 0 24 24"
|
|
310
|
+
>
|
|
311
|
+
<svg
|
|
312
|
+
aria-hidden="true"
|
|
313
|
+
className="ds-svg-icon--md ds-svg-icon"
|
|
314
|
+
focusable="false"
|
|
315
|
+
viewBox="0 0 24 24"
|
|
316
|
+
>
|
|
317
|
+
hello
|
|
318
|
+
</svg>
|
|
319
|
+
</ForwardRef(Base)>
|
|
320
|
+
</ForwardRef(SvgIcon)>
|
|
321
|
+
`;
|
|
322
|
+
|
|
323
|
+
exports[`renders the SvgIcon with prop size=sm 1`] = `
|
|
324
|
+
<ForwardRef(SvgIcon)
|
|
325
|
+
size="sm"
|
|
326
|
+
>
|
|
327
|
+
<ForwardRef(Base)
|
|
328
|
+
aria-hidden="true"
|
|
329
|
+
as="svg"
|
|
330
|
+
className="ds-svg-icon--sm ds-svg-icon"
|
|
331
|
+
focusable="false"
|
|
332
|
+
viewBox="0 0 24 24"
|
|
333
|
+
>
|
|
334
|
+
<svg
|
|
335
|
+
aria-hidden="true"
|
|
336
|
+
className="ds-svg-icon--sm ds-svg-icon"
|
|
337
|
+
focusable="false"
|
|
338
|
+
viewBox="0 0 24 24"
|
|
339
|
+
>
|
|
340
|
+
hello
|
|
341
|
+
</svg>
|
|
342
|
+
</ForwardRef(Base)>
|
|
343
|
+
</ForwardRef(SvgIcon)>
|
|
344
|
+
`;
|
|
345
|
+
|
|
346
|
+
exports[`renders the SvgIcon with prop size=xl 1`] = `
|
|
347
|
+
<ForwardRef(SvgIcon)
|
|
348
|
+
size="xl"
|
|
349
|
+
>
|
|
350
|
+
<ForwardRef(Base)
|
|
351
|
+
aria-hidden="true"
|
|
352
|
+
as="svg"
|
|
353
|
+
className="ds-svg-icon--xl ds-svg-icon"
|
|
354
|
+
focusable="false"
|
|
355
|
+
viewBox="0 0 24 24"
|
|
356
|
+
>
|
|
357
|
+
<svg
|
|
358
|
+
aria-hidden="true"
|
|
359
|
+
className="ds-svg-icon--xl ds-svg-icon"
|
|
360
|
+
focusable="false"
|
|
361
|
+
viewBox="0 0 24 24"
|
|
362
|
+
>
|
|
363
|
+
hello
|
|
364
|
+
</svg>
|
|
365
|
+
</ForwardRef(Base)>
|
|
366
|
+
</ForwardRef(SvgIcon)>
|
|
367
|
+
`;
|
|
368
|
+
|
|
369
|
+
exports[`renders the SvgIcon with prop size=xs 1`] = `
|
|
370
|
+
<ForwardRef(SvgIcon)
|
|
371
|
+
size="xs"
|
|
372
|
+
>
|
|
373
|
+
<ForwardRef(Base)
|
|
374
|
+
aria-hidden="true"
|
|
375
|
+
as="svg"
|
|
376
|
+
className="ds-svg-icon--xs ds-svg-icon"
|
|
377
|
+
focusable="false"
|
|
378
|
+
viewBox="0 0 24 24"
|
|
379
|
+
>
|
|
380
|
+
<svg
|
|
381
|
+
aria-hidden="true"
|
|
382
|
+
className="ds-svg-icon--xs ds-svg-icon"
|
|
383
|
+
focusable="false"
|
|
384
|
+
viewBox="0 0 24 24"
|
|
385
|
+
>
|
|
386
|
+
hello
|
|
387
|
+
</svg>
|
|
388
|
+
</ForwardRef(Base)>
|
|
389
|
+
</ForwardRef(SvgIcon)>
|
|
390
|
+
`;
|