@react-spectrum/icon 3.6.2 → 3.6.3
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/dist/main.js +86 -45
- package/dist/main.js.map +1 -1
- package/dist/module.js +86 -45
- package/dist/module.js.map +1 -1
- package/package.json +6 -6
package/dist/main.js
CHANGED
|
@@ -14,7 +14,28 @@ function $parcel$interopDefault(a) {
|
|
|
14
14
|
$parcel$export(module.exports, "Icon", () => $2f297c87d3047269$export$f04a61298a47a40f);
|
|
15
15
|
$parcel$export(module.exports, "UIIcon", () => $722df481e3c1f593$export$906cc5990ff10700);
|
|
16
16
|
$parcel$export(module.exports, "Illustration", () => $ebfd4d66f1999633$export$d43c2e2ca9b2c105);
|
|
17
|
-
|
|
17
|
+
/*
|
|
18
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
19
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
20
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
21
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
+
*
|
|
23
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
24
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
25
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
26
|
+
* governing permissions and limitations under the License.
|
|
27
|
+
*/ /// <reference types="css-module-types" />
|
|
28
|
+
/*
|
|
29
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
30
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
31
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
32
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
33
|
+
*
|
|
34
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
35
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
36
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
37
|
+
* governing permissions and limitations under the License.
|
|
38
|
+
*/
|
|
18
39
|
|
|
19
40
|
|
|
20
41
|
var $5ef39e0c80b682c7$exports = {};
|
|
@@ -170,80 +191,100 @@ function $2f297c87d3047269$var$iconColorValue(value) {
|
|
|
170
191
|
return `var(--spectrum-semantic-${value}-color-icon)`;
|
|
171
192
|
}
|
|
172
193
|
const $2f297c87d3047269$var$iconStyleProps = {
|
|
173
|
-
|
|
194
|
+
...(0, $khAmQ$reactspectrumutils.baseStyleProps),
|
|
174
195
|
color: [
|
|
175
|
-
|
|
196
|
+
"color",
|
|
176
197
|
$2f297c87d3047269$var$iconColorValue
|
|
177
198
|
]
|
|
178
199
|
};
|
|
179
200
|
function $2f297c87d3047269$export$f04a61298a47a40f(props) {
|
|
180
|
-
props = $khAmQ$reactspectrumutils.useSlotProps(props,
|
|
181
|
-
let { children: children , size: size ,
|
|
182
|
-
let { styleProps: styleProps } = $khAmQ$reactspectrumutils.useStyleProps(otherProps, $2f297c87d3047269$var$iconStyleProps);
|
|
183
|
-
let provider = $khAmQ$reactspectrumprovider.useProvider();
|
|
184
|
-
let scale =
|
|
185
|
-
if (provider !== null) scale = provider.scale ===
|
|
201
|
+
props = (0, $khAmQ$reactspectrumutils.useSlotProps)(props, "icon");
|
|
202
|
+
let { children: children , size: size , "aria-label": ariaLabel , "aria-hidden": ariaHidden , ...otherProps } = props;
|
|
203
|
+
let { styleProps: styleProps } = (0, $khAmQ$reactspectrumutils.useStyleProps)(otherProps, $2f297c87d3047269$var$iconStyleProps);
|
|
204
|
+
let provider = (0, $khAmQ$reactspectrumprovider.useProvider)();
|
|
205
|
+
let scale = "M";
|
|
206
|
+
if (provider !== null) scale = provider.scale === "large" ? "L" : "M";
|
|
186
207
|
if (!ariaHidden) ariaHidden = undefined;
|
|
187
208
|
// Use user specified size, falling back to provider scale if size is undef
|
|
188
209
|
let iconSize = size ? size : scale;
|
|
189
|
-
return
|
|
190
|
-
|
|
210
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($khAmQ$react))).cloneElement(children, {
|
|
211
|
+
...(0, $khAmQ$reactariautils.filterDOMProps)(otherProps),
|
|
191
212
|
...styleProps,
|
|
192
|
-
focusable:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
role:
|
|
196
|
-
className: $khAmQ$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($5ef39e0c80b682c7$exports)), children.props.className,
|
|
197
|
-
})
|
|
213
|
+
focusable: "false",
|
|
214
|
+
"aria-label": ariaLabel,
|
|
215
|
+
"aria-hidden": ariaLabel ? ariaHidden || undefined : true,
|
|
216
|
+
role: "img",
|
|
217
|
+
className: (0, $khAmQ$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5ef39e0c80b682c7$exports))), children.props.className, "spectrum-Icon", `spectrum-Icon--size${iconSize}`, styleProps.className)
|
|
218
|
+
});
|
|
198
219
|
}
|
|
199
220
|
|
|
200
221
|
|
|
201
|
-
|
|
222
|
+
/*
|
|
223
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
224
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
225
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
226
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
227
|
+
*
|
|
228
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
229
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
230
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
231
|
+
* governing permissions and limitations under the License.
|
|
232
|
+
*/
|
|
202
233
|
|
|
203
234
|
|
|
204
235
|
|
|
205
236
|
|
|
206
237
|
function $722df481e3c1f593$export$906cc5990ff10700(props) {
|
|
207
|
-
props = $khAmQ$reactspectrumutils.useSlotProps(props,
|
|
208
|
-
let { children: children ,
|
|
209
|
-
let { styleProps: styleProps } = $khAmQ$reactspectrumutils.useStyleProps(otherProps);
|
|
210
|
-
let provider = $khAmQ$reactspectrumprovider.useProvider();
|
|
211
|
-
let scale =
|
|
212
|
-
if (provider !== null) scale = provider.scale ===
|
|
238
|
+
props = (0, $khAmQ$reactspectrumutils.useSlotProps)(props, "icon");
|
|
239
|
+
let { children: children , "aria-label": ariaLabel , "aria-hidden": ariaHidden , ...otherProps } = props;
|
|
240
|
+
let { styleProps: styleProps } = (0, $khAmQ$reactspectrumutils.useStyleProps)(otherProps);
|
|
241
|
+
let provider = (0, $khAmQ$reactspectrumprovider.useProvider)();
|
|
242
|
+
let scale = "M";
|
|
243
|
+
if (provider !== null) scale = provider.scale === "large" ? "L" : "M";
|
|
213
244
|
if (!ariaHidden) ariaHidden = undefined;
|
|
214
|
-
return
|
|
215
|
-
|
|
245
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($khAmQ$react))).cloneElement(children, {
|
|
246
|
+
...(0, $khAmQ$reactariautils.filterDOMProps)(otherProps),
|
|
216
247
|
...styleProps,
|
|
217
248
|
scale: scale,
|
|
218
|
-
focusable:
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
role:
|
|
222
|
-
className: $khAmQ$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($5ef39e0c80b682c7$exports)), children.props.className,
|
|
223
|
-
[`spectrum-UIIcon-${children.type[
|
|
249
|
+
focusable: "false",
|
|
250
|
+
"aria-label": ariaLabel,
|
|
251
|
+
"aria-hidden": ariaLabel ? ariaHidden || undefined : true,
|
|
252
|
+
role: "img",
|
|
253
|
+
className: (0, $khAmQ$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5ef39e0c80b682c7$exports))), children.props.className, "spectrum-Icon", {
|
|
254
|
+
[`spectrum-UIIcon-${children.type["displayName"]}`]: children.type["displayName"]
|
|
224
255
|
}, styleProps.className)
|
|
225
|
-
})
|
|
256
|
+
});
|
|
226
257
|
}
|
|
227
258
|
|
|
228
259
|
|
|
229
|
-
|
|
260
|
+
/*
|
|
261
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
262
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
263
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
264
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
265
|
+
*
|
|
266
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
267
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
268
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
269
|
+
* governing permissions and limitations under the License.
|
|
270
|
+
*/
|
|
230
271
|
|
|
231
272
|
|
|
232
273
|
function $ebfd4d66f1999633$export$d43c2e2ca9b2c105(props) {
|
|
233
|
-
props = $khAmQ$reactspectrumutils.useSlotProps(props,
|
|
234
|
-
let { children: children ,
|
|
235
|
-
let { styleProps: styleProps } = $khAmQ$reactspectrumutils.useStyleProps(otherProps);
|
|
274
|
+
props = (0, $khAmQ$reactspectrumutils.useSlotProps)(props, "illustration");
|
|
275
|
+
let { children: children , "aria-label": ariaLabel , "aria-labelledby": ariaLabelledby , "aria-hidden": ariaHidden , ...otherProps } = props;
|
|
276
|
+
let { styleProps: styleProps } = (0, $khAmQ$reactspectrumutils.useStyleProps)(otherProps);
|
|
236
277
|
let hasLabel = ariaLabel || ariaLabelledby;
|
|
237
278
|
if (!ariaHidden) ariaHidden = undefined;
|
|
238
|
-
return
|
|
239
|
-
|
|
279
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($khAmQ$react))).cloneElement(children, {
|
|
280
|
+
...(0, $khAmQ$reactariautils.filterDOMProps)(otherProps),
|
|
240
281
|
...styleProps,
|
|
241
|
-
focusable:
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
role: hasLabel ?
|
|
246
|
-
})
|
|
282
|
+
focusable: "false",
|
|
283
|
+
"aria-label": ariaLabel,
|
|
284
|
+
"aria-labelledby": ariaLabelledby,
|
|
285
|
+
"aria-hidden": ariaHidden,
|
|
286
|
+
role: hasLabel ? "img" : undefined
|
|
287
|
+
});
|
|
247
288
|
}
|
|
248
289
|
|
|
249
290
|
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAAiC;AACjC,GAAwC;AACxC,GAAuC;AACvC,GAAsC;AACtC,GAAsC;AACtC,GAAsC;AACtC,GAAuC;AACvC,GAAwC;AACxC,GAAkC;AAClC,GAAwC;AACxC,GAAyC;AACzC,GAAiC;AACjC,GAA6C;AAC7C,GAA4C;AAC5C,GAAgD;AAChD,GAAiD;AACjD,GAA0C;AAC1C,GAAiD;AACjD,GAAgD;AAChD,GAAmD;AACnD,GAAkD;AAClD,GAAkD;AAClD,GAAmD;AACnD,GAAmD;AACnD,GAAoD;AACpD,GAAmD;AACnD,GAAgD;AAChD,GAAgD;AAChD,GAA4C;AAC5C,GAA6C;AAC7C,GAA4C;AAC5C,GAA2C;AAC3C,GAA+C;AAC/C,GAAkD;AAClD,GAA4C;AAC5C,GAA2C;AAC3C,GAA4C;AAC5C,GAA2C;AAC3C,GAA6C;AAC7C,GAA2C;AAC3C,GAA0C;AAC1C,GAA2C;AAC3C,GAAsC;AACtC,GAA6C;AAC7C,GAA+C;AAC/C,GAA8C;AAC9C,GAA+C;AA/C/C,yCAA+B,GAAG,CAAsB;AACxD,yCAAiC,GAAG,CAAwB;AAC5D,yCAAwC,GAAG,CAA+B;AAC1E,yCAAuC,GAAG,CAA8B;AACxE,wCAAsC,GAAG,CAA6B;AACtE,yCAAsC,GAAG,CAA6B;AACtE,yCAAsC,GAAG,CAA6B;AACtE,yCAAuC,GAAG,CAA8B;AACxE,yCAAwC,GAAG,CAA+B;AAC1E,yCAAkC,GAAG,CAAyB;AAC9D,yCAAwC,GAAG,C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UAAU,EACb,UAAU,GAAG,SAAS;IAGxB,MAAM,eAAC,sCAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;WAChC,oCAAc,CAAC,UAAU;WACzB,UAAU;QACb,SAAS,EAAE,CAAO;QAClB,CAAY,aAAE,SAAS;QACvB,CAAiB,kBAAE,cAAc;QACjC,CAAa,cAAE,UAAU;QACzB,IAAI,EAAE,QAAQ,GAAG,CAAK,OAAG,SAAS;IACpC,CAAC;AACH,CAAC;","sources":["packages/@react-spectrum/icon/src/index.ts","packages/@react-spectrum/icon/src/Icon.tsx","packages/@adobe/spectrum-css-temp/components/icon/vars.css","packages/@react-spectrum/icon/src/UIIcon.tsx","packages/@react-spectrum/icon/src/Illustration.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Icon} from './Icon';\nexport {UIIcon} from './UIIcon';\nexport {Illustration} from './Illustration';\n\nexport type {IconProps, IconPropsWithoutChildren} from './Icon';\nexport type {IllustrationProps, IllustrationPropsWithoutChildren} from './Illustration';\nexport type {UIIconProps, UIIconPropsWithoutChildren} from './UIIcon';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, IconColorValue, StyleProps} from '@react-types/shared';\nimport {baseStyleProps, classNames, StyleHandlers, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\nimport {useProvider} from '@react-spectrum/provider';\n\nexport interface IconProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * A screen reader only label for the Icon.\n */\n 'aria-label'?: string,\n /**\n * The content to display. Should be an SVG.\n */\n children: ReactElement,\n /**\n * Size of Icon (changes based on scale).\n */\n size?: 'XXS' | 'XS' | 'S' | 'M' | 'L' |'XL' | 'XXL',\n /**\n * A slot to place the icon in.\n * @default 'icon'\n */\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true',\n /**\n * Color of the Icon.\n */\n color?: IconColorValue\n}\n\nexport type IconPropsWithoutChildren = Omit<IconProps, 'children'>;\n\nfunction iconColorValue(value: IconColorValue) {\n return `var(--spectrum-semantic-${value}-color-icon)`;\n}\n\nconst iconStyleProps: StyleHandlers = {\n ...baseStyleProps,\n color: ['color', iconColorValue]\n};\n\n/**\n * Spectrum icons are clear, minimal, and consistent across platforms. They follow the focused and rational principles of the design system in both metaphor and style.\n */\nexport function Icon(props: IconProps) {\n props = useSlotProps(props, 'icon');\n let {\n children,\n size,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps, iconStyleProps);\n\n let provider = useProvider();\n let scale = 'M';\n if (provider !== null) {\n scale = provider.scale === 'large' ? 'L' : 'M';\n }\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n // Use user specified size, falling back to provider scale if size is undef\n let iconSize = size ? size : scale;\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-hidden': (ariaLabel ? (ariaHidden || undefined) : true),\n role: 'img',\n className: classNames(\n styles,\n children.props.className,\n 'spectrum-Icon',\n `spectrum-Icon--size${iconSize}`,\n styleProps.className)\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, StyleProps} from '@react-types/shared';\nimport {classNames, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\nimport {useProvider} from '@react-spectrum/provider';\n\nexport interface UIIconProps extends DOMProps, AriaLabelingProps, StyleProps {\n children: ReactElement,\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true'\n}\n\nexport type UIIconPropsWithoutChildren = Omit<UIIconProps, 'children'>;\n\nexport function UIIcon(props: UIIconProps) {\n props = useSlotProps(props, 'icon');\n let {\n children,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let provider = useProvider();\n let scale = 'M';\n if (provider !== null) {\n scale = provider.scale === 'large' ? 'L' : 'M';\n }\n\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n scale,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-hidden': (ariaLabel ? (ariaHidden || undefined) : true),\n role: 'img',\n className: classNames(\n styles,\n children.props.className,\n 'spectrum-Icon',\n {\n [`spectrum-UIIcon-${children.type['displayName']}`]: children.type['displayName']\n },\n styleProps.className)\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, StyleProps} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport {useSlotProps, useStyleProps} from '@react-spectrum/utils';\n\nexport interface IllustrationProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * A screen reader only label for the Illustration.\n */\n 'aria-label'?: string,\n /**\n * The content to display. Should be an SVG.\n */\n children: ReactElement,\n /**\n * A slot to place the illustration in.\n * @default 'illustration'\n */\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true'\n}\n\nexport type IllustrationPropsWithoutChildren = Omit<IllustrationProps, 'children'>;\n\n/**\n * Wrapper component for illustrations. Use this to wrap your svg element for a custom illustration.\n */\nexport function Illustration(props: IllustrationProps) {\n props = useSlotProps(props, 'illustration');\n let {\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n\n let hasLabel = ariaLabel || ariaLabelledby;\n\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-hidden': ariaHidden,\n role: hasLabel ? 'img' : undefined\n });\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AA/CA,4CAAkC;AAClC,4CAAoC;AACpC,4CAA2C;AAC3C,4CAA0C;AAC1C,2CAAyC;AACzC,4CAAyC;AACzC,4CAAyC;AACzC,4CAA0C;AAC1C,4CAA2C;AAC3C,4CAAqC;AACrC,4CAA2C;AAC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;;;;;;CAUC,GAED;;;AA8BO,SAAS,0CAAa,KAAwB,EAAE;IACrD,QAAQ,CAAA,GAAA,sCAAY,AAAD,EAAE,OAAO;IAC5B,IAAI,YACF,SAAQ,EACR,cAAc,UAAS,EACvB,mBAAmB,eAAc,EACjC,eAAe,WAAU,EACzB,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,uCAAa,AAAD,EAAE;IAEjC,IAAI,WAAW,aAAa;IAE5B,IAAI,CAAC,YACH,aAAa;IAGf,qBAAO,CAAA,GAAA,sCAAI,EAAE,YAAY,CAAC,UAAU;QAClC,GAAG,CAAA,GAAA,oCAAc,AAAD,EAAE,WAAW;QAC7B,GAAG,UAAU;QACb,WAAW;QACX,cAAc;QACd,mBAAmB;QACnB,eAAe;QACf,MAAM,WAAW,QAAQ,SAAS;IACpC;AACF;;","sources":["packages/@react-spectrum/icon/src/index.ts","packages/@react-spectrum/icon/src/Icon.tsx","packages/@adobe/spectrum-css-temp/components/icon/vars.css","packages/@react-spectrum/icon/src/UIIcon.tsx","packages/@react-spectrum/icon/src/Illustration.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Icon} from './Icon';\nexport {UIIcon} from './UIIcon';\nexport {Illustration} from './Illustration';\n\nexport type {IconProps, IconPropsWithoutChildren} from './Icon';\nexport type {IllustrationProps, IllustrationPropsWithoutChildren} from './Illustration';\nexport type {UIIconProps, UIIconPropsWithoutChildren} from './UIIcon';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, IconColorValue, StyleProps} from '@react-types/shared';\nimport {baseStyleProps, classNames, StyleHandlers, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\nimport {useProvider} from '@react-spectrum/provider';\n\nexport interface IconProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * A screen reader only label for the Icon.\n */\n 'aria-label'?: string,\n /**\n * The content to display. Should be an SVG.\n */\n children: ReactElement,\n /**\n * Size of Icon (changes based on scale).\n */\n size?: 'XXS' | 'XS' | 'S' | 'M' | 'L' |'XL' | 'XXL',\n /**\n * A slot to place the icon in.\n * @default 'icon'\n */\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true',\n /**\n * Color of the Icon.\n */\n color?: IconColorValue\n}\n\nexport type IconPropsWithoutChildren = Omit<IconProps, 'children'>;\n\nfunction iconColorValue(value: IconColorValue) {\n return `var(--spectrum-semantic-${value}-color-icon)`;\n}\n\nconst iconStyleProps: StyleHandlers = {\n ...baseStyleProps,\n color: ['color', iconColorValue]\n};\n\n/**\n * Spectrum icons are clear, minimal, and consistent across platforms. They follow the focused and rational principles of the design system in both metaphor and style.\n */\nexport function Icon(props: IconProps) {\n props = useSlotProps(props, 'icon');\n let {\n children,\n size,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps, iconStyleProps);\n\n let provider = useProvider();\n let scale = 'M';\n if (provider !== null) {\n scale = provider.scale === 'large' ? 'L' : 'M';\n }\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n // Use user specified size, falling back to provider scale if size is undef\n let iconSize = size ? size : scale;\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-hidden': (ariaLabel ? (ariaHidden || undefined) : true),\n role: 'img',\n className: classNames(\n styles,\n children.props.className,\n 'spectrum-Icon',\n `spectrum-Icon--size${iconSize}`,\n styleProps.className)\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, StyleProps} from '@react-types/shared';\nimport {classNames, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\nimport {useProvider} from '@react-spectrum/provider';\n\nexport interface UIIconProps extends DOMProps, AriaLabelingProps, StyleProps {\n children: ReactElement,\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true'\n}\n\nexport type UIIconPropsWithoutChildren = Omit<UIIconProps, 'children'>;\n\nexport function UIIcon(props: UIIconProps) {\n props = useSlotProps(props, 'icon');\n let {\n children,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let provider = useProvider();\n let scale = 'M';\n if (provider !== null) {\n scale = provider.scale === 'large' ? 'L' : 'M';\n }\n\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n scale,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-hidden': (ariaLabel ? (ariaHidden || undefined) : true),\n role: 'img',\n className: classNames(\n styles,\n children.props.className,\n 'spectrum-Icon',\n {\n [`spectrum-UIIcon-${children.type['displayName']}`]: children.type['displayName']\n },\n styleProps.className)\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, StyleProps} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport {useSlotProps, useStyleProps} from '@react-spectrum/utils';\n\nexport interface IllustrationProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * A screen reader only label for the Illustration.\n */\n 'aria-label'?: string,\n /**\n * The content to display. Should be an SVG.\n */\n children: ReactElement,\n /**\n * A slot to place the illustration in.\n * @default 'illustration'\n */\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true'\n}\n\nexport type IllustrationPropsWithoutChildren = Omit<IllustrationProps, 'children'>;\n\n/**\n * Wrapper component for illustrations. Use this to wrap your svg element for a custom illustration.\n */\nexport function Illustration(props: IllustrationProps) {\n props = useSlotProps(props, 'illustration');\n let {\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n\n let hasLabel = ariaLabel || ariaLabelledby;\n\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-hidden': ariaHidden,\n role: hasLabel ? 'img' : undefined\n });\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -10,7 +10,28 @@ function $parcel$interopDefault(a) {
|
|
|
10
10
|
function $parcel$export(e, n, v, s) {
|
|
11
11
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
/*
|
|
14
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
15
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
17
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
20
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
21
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
22
|
+
* governing permissions and limitations under the License.
|
|
23
|
+
*/ /// <reference types="css-module-types" />
|
|
24
|
+
/*
|
|
25
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
26
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
27
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
28
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
29
|
+
*
|
|
30
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
31
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
32
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
33
|
+
* governing permissions and limitations under the License.
|
|
34
|
+
*/
|
|
14
35
|
|
|
15
36
|
|
|
16
37
|
var $6edfbdaffbc9baf9$exports = {};
|
|
@@ -166,80 +187,100 @@ function $6bfb67578ee6effd$var$iconColorValue(value) {
|
|
|
166
187
|
return `var(--spectrum-semantic-${value}-color-icon)`;
|
|
167
188
|
}
|
|
168
189
|
const $6bfb67578ee6effd$var$iconStyleProps = {
|
|
169
|
-
|
|
190
|
+
...(0, $1Thsl$baseStyleProps),
|
|
170
191
|
color: [
|
|
171
|
-
|
|
192
|
+
"color",
|
|
172
193
|
$6bfb67578ee6effd$var$iconColorValue
|
|
173
194
|
]
|
|
174
195
|
};
|
|
175
196
|
function $6bfb67578ee6effd$export$f04a61298a47a40f(props) {
|
|
176
|
-
props = $1Thsl$useSlotProps(props,
|
|
177
|
-
let { children: children , size: size ,
|
|
178
|
-
let { styleProps: styleProps } = $1Thsl$useStyleProps(otherProps, $6bfb67578ee6effd$var$iconStyleProps);
|
|
179
|
-
let provider = $1Thsl$useProvider();
|
|
180
|
-
let scale =
|
|
181
|
-
if (provider !== null) scale = provider.scale ===
|
|
197
|
+
props = (0, $1Thsl$useSlotProps)(props, "icon");
|
|
198
|
+
let { children: children , size: size , "aria-label": ariaLabel , "aria-hidden": ariaHidden , ...otherProps } = props;
|
|
199
|
+
let { styleProps: styleProps } = (0, $1Thsl$useStyleProps)(otherProps, $6bfb67578ee6effd$var$iconStyleProps);
|
|
200
|
+
let provider = (0, $1Thsl$useProvider)();
|
|
201
|
+
let scale = "M";
|
|
202
|
+
if (provider !== null) scale = provider.scale === "large" ? "L" : "M";
|
|
182
203
|
if (!ariaHidden) ariaHidden = undefined;
|
|
183
204
|
// Use user specified size, falling back to provider scale if size is undef
|
|
184
205
|
let iconSize = size ? size : scale;
|
|
185
|
-
return
|
|
186
|
-
|
|
206
|
+
return /*#__PURE__*/ (0, $1Thsl$react).cloneElement(children, {
|
|
207
|
+
...(0, $1Thsl$filterDOMProps)(otherProps),
|
|
187
208
|
...styleProps,
|
|
188
|
-
focusable:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
role:
|
|
192
|
-
className: $1Thsl$classNames((/*@__PURE__*/$parcel$interopDefault($6edfbdaffbc9baf9$exports)), children.props.className,
|
|
193
|
-
})
|
|
209
|
+
focusable: "false",
|
|
210
|
+
"aria-label": ariaLabel,
|
|
211
|
+
"aria-hidden": ariaLabel ? ariaHidden || undefined : true,
|
|
212
|
+
role: "img",
|
|
213
|
+
className: (0, $1Thsl$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($6edfbdaffbc9baf9$exports))), children.props.className, "spectrum-Icon", `spectrum-Icon--size${iconSize}`, styleProps.className)
|
|
214
|
+
});
|
|
194
215
|
}
|
|
195
216
|
|
|
196
217
|
|
|
197
|
-
|
|
218
|
+
/*
|
|
219
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
220
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
221
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
222
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
223
|
+
*
|
|
224
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
225
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
226
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
227
|
+
* governing permissions and limitations under the License.
|
|
228
|
+
*/
|
|
198
229
|
|
|
199
230
|
|
|
200
231
|
|
|
201
232
|
|
|
202
233
|
function $9ba43a63383852e3$export$906cc5990ff10700(props) {
|
|
203
|
-
props = $1Thsl$useSlotProps(props,
|
|
204
|
-
let { children: children ,
|
|
205
|
-
let { styleProps: styleProps } = $1Thsl$useStyleProps(otherProps);
|
|
206
|
-
let provider = $1Thsl$useProvider();
|
|
207
|
-
let scale =
|
|
208
|
-
if (provider !== null) scale = provider.scale ===
|
|
234
|
+
props = (0, $1Thsl$useSlotProps)(props, "icon");
|
|
235
|
+
let { children: children , "aria-label": ariaLabel , "aria-hidden": ariaHidden , ...otherProps } = props;
|
|
236
|
+
let { styleProps: styleProps } = (0, $1Thsl$useStyleProps)(otherProps);
|
|
237
|
+
let provider = (0, $1Thsl$useProvider)();
|
|
238
|
+
let scale = "M";
|
|
239
|
+
if (provider !== null) scale = provider.scale === "large" ? "L" : "M";
|
|
209
240
|
if (!ariaHidden) ariaHidden = undefined;
|
|
210
|
-
return
|
|
211
|
-
|
|
241
|
+
return /*#__PURE__*/ (0, $1Thsl$react).cloneElement(children, {
|
|
242
|
+
...(0, $1Thsl$filterDOMProps)(otherProps),
|
|
212
243
|
...styleProps,
|
|
213
244
|
scale: scale,
|
|
214
|
-
focusable:
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
role:
|
|
218
|
-
className: $1Thsl$classNames((/*@__PURE__*/$parcel$interopDefault($6edfbdaffbc9baf9$exports)), children.props.className,
|
|
219
|
-
[`spectrum-UIIcon-${children.type[
|
|
245
|
+
focusable: "false",
|
|
246
|
+
"aria-label": ariaLabel,
|
|
247
|
+
"aria-hidden": ariaLabel ? ariaHidden || undefined : true,
|
|
248
|
+
role: "img",
|
|
249
|
+
className: (0, $1Thsl$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($6edfbdaffbc9baf9$exports))), children.props.className, "spectrum-Icon", {
|
|
250
|
+
[`spectrum-UIIcon-${children.type["displayName"]}`]: children.type["displayName"]
|
|
220
251
|
}, styleProps.className)
|
|
221
|
-
})
|
|
252
|
+
});
|
|
222
253
|
}
|
|
223
254
|
|
|
224
255
|
|
|
225
|
-
|
|
256
|
+
/*
|
|
257
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
258
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
259
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
260
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
261
|
+
*
|
|
262
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
263
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
264
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
265
|
+
* governing permissions and limitations under the License.
|
|
266
|
+
*/
|
|
226
267
|
|
|
227
268
|
|
|
228
269
|
function $88bb85359d3a4aed$export$d43c2e2ca9b2c105(props) {
|
|
229
|
-
props = $1Thsl$useSlotProps(props,
|
|
230
|
-
let { children: children ,
|
|
231
|
-
let { styleProps: styleProps } = $1Thsl$useStyleProps(otherProps);
|
|
270
|
+
props = (0, $1Thsl$useSlotProps)(props, "illustration");
|
|
271
|
+
let { children: children , "aria-label": ariaLabel , "aria-labelledby": ariaLabelledby , "aria-hidden": ariaHidden , ...otherProps } = props;
|
|
272
|
+
let { styleProps: styleProps } = (0, $1Thsl$useStyleProps)(otherProps);
|
|
232
273
|
let hasLabel = ariaLabel || ariaLabelledby;
|
|
233
274
|
if (!ariaHidden) ariaHidden = undefined;
|
|
234
|
-
return
|
|
235
|
-
|
|
275
|
+
return /*#__PURE__*/ (0, $1Thsl$react).cloneElement(children, {
|
|
276
|
+
...(0, $1Thsl$filterDOMProps)(otherProps),
|
|
236
277
|
...styleProps,
|
|
237
|
-
focusable:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
role: hasLabel ?
|
|
242
|
-
})
|
|
278
|
+
focusable: "false",
|
|
279
|
+
"aria-label": ariaLabel,
|
|
280
|
+
"aria-labelledby": ariaLabelledby,
|
|
281
|
+
"aria-hidden": ariaHidden,
|
|
282
|
+
role: hasLabel ? "img" : undefined
|
|
283
|
+
});
|
|
243
284
|
}
|
|
244
285
|
|
|
245
286
|
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAAiC;AACjC,GAAwC;AACxC,GAAuC;AACvC,GAAsC;AACtC,GAAsC;AACtC,GAAsC;AACtC,GAAuC;AACvC,GAAwC;AACxC,GAAkC;AAClC,GAAwC;AACxC,GAAyC;AACzC,GAAiC;AACjC,GAA6C;AAC7C,GAA4C;AAC5C,GAAgD;AAChD,GAAiD;AACjD,GAA0C;AAC1C,GAAiD;AACjD,GAAgD;AAChD,GAAmD;AACnD,GAAkD;AAClD,GAAkD;AAClD,GAAmD;AACnD,GAAmD;AACnD,GAAoD;AACpD,GAAmD;AACnD,GAAgD;AAChD,GAAgD;AAChD,GAA4C;AAC5C,GAA6C;AAC7C,GAA4C;AAC5C,GAA2C;AAC3C,GAA+C;AAC/C,GAAkD;AAClD,GAA4C;AAC5C,GAA2C;AAC3C,GAA4C;AAC5C,GAA2C;AAC3C,GAA6C;AAC7C,GAA2C;AAC3C,GAA0C;AAC1C,GAA2C;AAC3C,GAAsC;AACtC,GAA6C;AAC7C,GAA+C;AAC/C,GAA8C;AAC9C,GAA+C;AA/C/C,yCAA+B,GAAG,CAAsB;AACxD,yCAAiC,GAAG,CAAwB;AAC5D,yCAAwC,GAAG,CAA+B;AAC1E,yCAAuC,GAAG,CAA8B;AACxE,wCAAsC,GAAG,CAA6B;AACtE,yCAAsC,GAAG,CAA6B;AACtE,yCAAsC,GAAG,CAA6B;AACtE,yCAAuC,GAAG,CAA8B;AACxE,yCAAwC,GAAG,CAA+B;AAC1E,yCAA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SAAS,IAAI,cAAc;IAE1C,EAAE,GAAG,UAAU,EACb,UAAU,GAAG,SAAS;IAGxB,MAAM,eAAC,YAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;WAChC,qBAAc,CAAC,UAAU;WACzB,UAAU;QACb,SAAS,EAAE,CAAO;QAClB,CAAY,aAAE,SAAS;QACvB,CAAiB,kBAAE,cAAc;QACjC,CAAa,cAAE,UAAU;QACzB,IAAI,EAAE,QAAQ,GAAG,CAAK,OAAG,SAAS;IACpC,CAAC;AACH,CAAC;","sources":["packages/@react-spectrum/icon/src/index.ts","packages/@react-spectrum/icon/src/Icon.tsx","packages/@adobe/spectrum-css-temp/components/icon/vars.css","packages/@react-spectrum/icon/src/UIIcon.tsx","packages/@react-spectrum/icon/src/Illustration.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Icon} from './Icon';\nexport {UIIcon} from './UIIcon';\nexport {Illustration} from './Illustration';\n\nexport type {IconProps, IconPropsWithoutChildren} from './Icon';\nexport type {IllustrationProps, IllustrationPropsWithoutChildren} from './Illustration';\nexport type {UIIconProps, UIIconPropsWithoutChildren} from './UIIcon';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, IconColorValue, StyleProps} from '@react-types/shared';\nimport {baseStyleProps, classNames, StyleHandlers, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\nimport {useProvider} from '@react-spectrum/provider';\n\nexport interface IconProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * A screen reader only label for the Icon.\n */\n 'aria-label'?: string,\n /**\n * The content to display. Should be an SVG.\n */\n children: ReactElement,\n /**\n * Size of Icon (changes based on scale).\n */\n size?: 'XXS' | 'XS' | 'S' | 'M' | 'L' |'XL' | 'XXL',\n /**\n * A slot to place the icon in.\n * @default 'icon'\n */\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true',\n /**\n * Color of the Icon.\n */\n color?: IconColorValue\n}\n\nexport type IconPropsWithoutChildren = Omit<IconProps, 'children'>;\n\nfunction iconColorValue(value: IconColorValue) {\n return `var(--spectrum-semantic-${value}-color-icon)`;\n}\n\nconst iconStyleProps: StyleHandlers = {\n ...baseStyleProps,\n color: ['color', iconColorValue]\n};\n\n/**\n * Spectrum icons are clear, minimal, and consistent across platforms. They follow the focused and rational principles of the design system in both metaphor and style.\n */\nexport function Icon(props: IconProps) {\n props = useSlotProps(props, 'icon');\n let {\n children,\n size,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps, iconStyleProps);\n\n let provider = useProvider();\n let scale = 'M';\n if (provider !== null) {\n scale = provider.scale === 'large' ? 'L' : 'M';\n }\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n // Use user specified size, falling back to provider scale if size is undef\n let iconSize = size ? size : scale;\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-hidden': (ariaLabel ? (ariaHidden || undefined) : true),\n role: 'img',\n className: classNames(\n styles,\n children.props.className,\n 'spectrum-Icon',\n `spectrum-Icon--size${iconSize}`,\n styleProps.className)\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, StyleProps} from '@react-types/shared';\nimport {classNames, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\nimport {useProvider} from '@react-spectrum/provider';\n\nexport interface UIIconProps extends DOMProps, AriaLabelingProps, StyleProps {\n children: ReactElement,\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true'\n}\n\nexport type UIIconPropsWithoutChildren = Omit<UIIconProps, 'children'>;\n\nexport function UIIcon(props: UIIconProps) {\n props = useSlotProps(props, 'icon');\n let {\n children,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let provider = useProvider();\n let scale = 'M';\n if (provider !== null) {\n scale = provider.scale === 'large' ? 'L' : 'M';\n }\n\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n scale,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-hidden': (ariaLabel ? (ariaHidden || undefined) : true),\n role: 'img',\n className: classNames(\n styles,\n children.props.className,\n 'spectrum-Icon',\n {\n [`spectrum-UIIcon-${children.type['displayName']}`]: children.type['displayName']\n },\n styleProps.className)\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, StyleProps} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport {useSlotProps, useStyleProps} from '@react-spectrum/utils';\n\nexport interface IllustrationProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * A screen reader only label for the Illustration.\n */\n 'aria-label'?: string,\n /**\n * The content to display. Should be an SVG.\n */\n children: ReactElement,\n /**\n * A slot to place the illustration in.\n * @default 'illustration'\n */\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true'\n}\n\nexport type IllustrationPropsWithoutChildren = Omit<IllustrationProps, 'children'>;\n\n/**\n * Wrapper component for illustrations. Use this to wrap your svg element for a custom illustration.\n */\nexport function Illustration(props: IllustrationProps) {\n props = useSlotProps(props, 'illustration');\n let {\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n\n let hasLabel = ariaLabel || ariaLabelledby;\n\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-hidden': ariaHidden,\n role: hasLabel ? 'img' : undefined\n });\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AA/CA,4CAAkC;AAClC,4CAAoC;AACpC,4CAA2C;AAC3C,4CAA0C;AAC1C,2CAAyC;AACzC,4CAAyC;AACzC,4CAAyC;AACzC,4CAA0C;AAC1C,4CAA2C;AA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AAS;IACxB;AACF;;;ACnEA;;;;;;;;;;CAUC,GAED;;;AA8BO,SAAS,0CAAa,KAAwB,EAAE;IACrD,QAAQ,CAAA,GAAA,mBAAY,AAAD,EAAE,OAAO;IAC5B,IAAI,YACF,SAAQ,EACR,cAAc,UAAS,EACvB,mBAAmB,eAAc,EACjC,eAAe,WAAU,EACzB,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,oBAAa,AAAD,EAAE;IAEjC,IAAI,WAAW,aAAa;IAE5B,IAAI,CAAC,YACH,aAAa;IAGf,qBAAO,CAAA,GAAA,YAAI,EAAE,YAAY,CAAC,UAAU;QAClC,GAAG,CAAA,GAAA,qBAAc,AAAD,EAAE,WAAW;QAC7B,GAAG,UAAU;QACb,WAAW;QACX,cAAc;QACd,mBAAmB;QACnB,eAAe;QACf,MAAM,WAAW,QAAQ,SAAS;IACpC;AACF;;","sources":["packages/@react-spectrum/icon/src/index.ts","packages/@react-spectrum/icon/src/Icon.tsx","packages/@adobe/spectrum-css-temp/components/icon/vars.css","packages/@react-spectrum/icon/src/UIIcon.tsx","packages/@react-spectrum/icon/src/Illustration.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Icon} from './Icon';\nexport {UIIcon} from './UIIcon';\nexport {Illustration} from './Illustration';\n\nexport type {IconProps, IconPropsWithoutChildren} from './Icon';\nexport type {IllustrationProps, IllustrationPropsWithoutChildren} from './Illustration';\nexport type {UIIconProps, UIIconPropsWithoutChildren} from './UIIcon';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, IconColorValue, StyleProps} from '@react-types/shared';\nimport {baseStyleProps, classNames, StyleHandlers, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\nimport {useProvider} from '@react-spectrum/provider';\n\nexport interface IconProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * A screen reader only label for the Icon.\n */\n 'aria-label'?: string,\n /**\n * The content to display. Should be an SVG.\n */\n children: ReactElement,\n /**\n * Size of Icon (changes based on scale).\n */\n size?: 'XXS' | 'XS' | 'S' | 'M' | 'L' |'XL' | 'XXL',\n /**\n * A slot to place the icon in.\n * @default 'icon'\n */\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true',\n /**\n * Color of the Icon.\n */\n color?: IconColorValue\n}\n\nexport type IconPropsWithoutChildren = Omit<IconProps, 'children'>;\n\nfunction iconColorValue(value: IconColorValue) {\n return `var(--spectrum-semantic-${value}-color-icon)`;\n}\n\nconst iconStyleProps: StyleHandlers = {\n ...baseStyleProps,\n color: ['color', iconColorValue]\n};\n\n/**\n * Spectrum icons are clear, minimal, and consistent across platforms. They follow the focused and rational principles of the design system in both metaphor and style.\n */\nexport function Icon(props: IconProps) {\n props = useSlotProps(props, 'icon');\n let {\n children,\n size,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps, iconStyleProps);\n\n let provider = useProvider();\n let scale = 'M';\n if (provider !== null) {\n scale = provider.scale === 'large' ? 'L' : 'M';\n }\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n // Use user specified size, falling back to provider scale if size is undef\n let iconSize = size ? size : scale;\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-hidden': (ariaLabel ? (ariaHidden || undefined) : true),\n role: 'img',\n className: classNames(\n styles,\n children.props.className,\n 'spectrum-Icon',\n `spectrum-Icon--size${iconSize}`,\n styleProps.className)\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, StyleProps} from '@react-types/shared';\nimport {classNames, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\nimport {useProvider} from '@react-spectrum/provider';\n\nexport interface UIIconProps extends DOMProps, AriaLabelingProps, StyleProps {\n children: ReactElement,\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true'\n}\n\nexport type UIIconPropsWithoutChildren = Omit<UIIconProps, 'children'>;\n\nexport function UIIcon(props: UIIconProps) {\n props = useSlotProps(props, 'icon');\n let {\n children,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let provider = useProvider();\n let scale = 'M';\n if (provider !== null) {\n scale = provider.scale === 'large' ? 'L' : 'M';\n }\n\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n scale,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-hidden': (ariaLabel ? (ariaHidden || undefined) : true),\n role: 'img',\n className: classNames(\n styles,\n children.props.className,\n 'spectrum-Icon',\n {\n [`spectrum-UIIcon-${children.type['displayName']}`]: children.type['displayName']\n },\n styleProps.className)\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, StyleProps} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport {useSlotProps, useStyleProps} from '@react-spectrum/utils';\n\nexport interface IllustrationProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * A screen reader only label for the Illustration.\n */\n 'aria-label'?: string,\n /**\n * The content to display. Should be an SVG.\n */\n children: ReactElement,\n /**\n * A slot to place the illustration in.\n * @default 'illustration'\n */\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true'\n}\n\nexport type IllustrationPropsWithoutChildren = Omit<IllustrationProps, 'children'>;\n\n/**\n * Wrapper component for illustrations. Use this to wrap your svg element for a custom illustration.\n */\nexport function Illustration(props: IllustrationProps) {\n props = useSlotProps(props, 'illustration');\n let {\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n\n let hasLabel = ariaLabel || ariaLabelledby;\n\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-hidden': ariaHidden,\n role: hasLabel ? 'img' : undefined\n });\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/icon",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.3",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"url": "https://github.com/adobe/react-spectrum"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@react-
|
|
36
|
-
"@react-
|
|
37
|
-
"@
|
|
34
|
+
"@react-aria/utils": "^3.14.2",
|
|
35
|
+
"@react-spectrum/utils": "^3.8.1",
|
|
36
|
+
"@react-types/shared": "^3.16.0",
|
|
37
|
+
"@swc/helpers": "^0.4.14"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "5480d76bd815e239366f92852c76b6831ad2a4fd"
|
|
50
50
|
}
|