@react-spectrum/progress 3.1.3 → 3.1.4

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.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,4CAAiB;AACf,wBAAsB,2BADP;AAEf,uCAAqC,0CAFtB;AAGf,mCAAiC,sCAHlB;AAIf,8BAA4B,iCAJb;AAKf,6BAA2B,gCALZ;AAMf,8BAA4B,iCANb;AAOf,mCAAiC,sCAPlB;AAQf,+BAA6B,kCARd;AASf,4BAA0B,+BATX;AAUf,4BAA0B,+BAVX;AAWf,wCAAsC,2CAXvB;AAYf,iBAAe,oBAZA;AAaf,gBAAc,mBAbC;AAcf,iBAAe;AAdA,CAAjB;;;AC0BA;AACA,SAASG,oDAAT,CAAyBC,KAAzB,EAAsDC,GAAtD,EAAmF;AACjF,MAAI;AACFC,IAAAA,KAAK,GAAG,CADN;AAEFC,IAAAA,QAAQ,GAAG,CAFT;AAGFC,IAAAA,QAAQ,GAAG,GAHT;AAIFC,IAAAA,IAAI,GAAG,GAJL;AAKFC,IAAAA,KALE;AAMFC,IAAAA,YANE;AAOFC,IAAAA,cAAc,GAAG,CAAC,CAACF,KAPjB;AAQFG,IAAAA,aAAa,GAAG,KARd;AASFC,IAAAA,eAAe,GAAG,KAThB;AAUFC,IAAAA,QAVE;AAWFC,IAAAA,UAXE;AAYF,kBAAcC,SAZZ;AAaF,uBAAmBC;AAbjB,MAeAd,KAfJ;AAAA,MAcKe,UAdL,oDAeIf,KAfJ;;AAgBA,MAAIgB,MAAM,GAAGC,SAAS,CAAChB,GAAD,CAAtB;AACA,MAAI;AAACiB,IAAAA;AAAD,MAAeC,aAAa,C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AAA,OAAO,CAACC,IAAR,CAAa,sFAAb;AACD;;AAED,sBACE,4DACMT,UADN,EAEMmB,gBAFN;AAGE,IAAA,GAAG,EAAErB,MAHP;AAIE,IAAA,SAAS,EACPY,UAAU,qDAER,uBAFQ,EAGR;AACE,8CAAwClB,eAD1C;AAEE,sCAAgCL,IAAI,KAAK,GAF3C;AAGE,sCAAgCA,IAAI,KAAK,GAH3C;AAIE,+CAAyC+B,OAAO,KAAK;AAJvD,KAHQ,EASRlB,UAAU,CAACW,SATH;AALd,mBAiBE;AAAK,IAAA,SAAS,EAAED,UAAU,qDAAS,6BAAT;AAA1B,IAjBF,eAkBE;AAAK,IAAA,SAAS,EAAEA,UAAU,qDAAS,6BAAT;AAA1B,kBACE;AAAK,IAAA,SAAS,EAAEA,UAAU,qDAAS,iCAAT;AAA1B,kBACE;AACE,IAAA,SAAS,EAAEA,UAAU,qDAAS,oCAAT,CADvB;AAGE,IAAA,KAAK,EAAEa;AAHT,kBAIE;AAAK,IAAA,SAAS,EAAEb,UAAU,qDAAS,4BAAT;AAA1B,IAJF,CADF,CADF,eASE;AAAK,IAAA,SAAS,EAAEA,UAAU,qDAAS,iCAAT;AAA1B,kBACE;AACE,IAAA,SAAS,EAAEA,UAAU,qDAAS,oCAAT,CADvB;AAGE,IAAA,KAAK,EAAEc;AAHT,kBAIE;AAAK,IAAA,SAAS,EAAEd,UAAU,qDAAS,4BAAT;AAA1B,IAJF,CADF,CATF,CAlBF,CADF;AAuCD;AAED;;;;;;AAIA,IAAIiB,cAAe,gBAAGZ,MAAK,CAACC,UAAN,CAAiBM,oDAAjB,CAAtB","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/barloader/vars.css","./packages/@react-spectrum/progress/src/ProgressBarBase.tsx","./packages/@react-spectrum/progress/src/ProgressBar.tsx","./node_modules/@adobe/spectrum-css-temp/components/circleloader/vars.css","./packages/@react-spectrum/progress/src/ProgressCircle.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\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@import './skin.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 {clamp} from '@react-aria/utils';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {ProgressBarProps} from '@react-types/progress';\nimport React, {CSSProperties, HTMLAttributes} from 'react';\nimport {SpectrumProgressBarBaseProps} from '@react-types/progress';\nimport styles from '@adobe/spectrum-css-temp/components/barloader/vars.css';\n\ninterface ProgressBarBaseProps extends SpectrumProgressBarBaseProps, ProgressBarProps {\n barClassName?: string,\n barProps?: HTMLAttributes<HTMLDivElement>,\n labelProps?: HTMLAttributes<HTMLLabelElement>\n}\n\n// Base ProgressBar component shared with Meter.\nfunction ProgressBarBase(props: ProgressBarBaseProps, ref: DOMRef<HTMLDivElement>) {\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n size = 'L',\n label,\n barClassName,\n showValueLabel = !!label,\n labelPosition = 'top',\n isIndeterminate = false,\n barProps,\n labelProps,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n value = clamp(value, minValue, maxValue);\n\n let barStyle: CSSProperties = {};\n if (!isIndeterminate) {\n let percentage = (value - minValue) / (maxValue - minValue);\n barStyle.width = `${Math.round(percentage * 100)}%`;\n }\n\n // Ideally this should be in useProgressBar, but children\n // are not supported in ProgressCircle which shares that hook...\n if (!label && !ariaLabel && !ariaLabelledby) {\n console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');\n }\n // use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files\n return (\n <div\n {...barProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-BarLoader',\n {\n 'spectrum-BarLoader--small': size === 'S',\n 'spectrum-BarLoader--large': size === 'L',\n 'spectrum-BarLoader--indeterminate': isIndeterminate,\n 'spectrum-BarLoader--sideLabel': labelPosition === 'side'\n },\n barClassName,\n styleProps.className\n )\n }\n style={{minWidth: '-moz-fit-content', ...styleProps.style}}>\n {label &&\n <span\n {...labelProps}\n className={classNames(styles, 'spectrum-BarLoader-label')}>\n {label}\n </span>\n }\n {showValueLabel &&\n <div className={classNames(styles, 'spectrum-BarLoader-percentage')}>\n {barProps['aria-valuetext']}\n </div>\n }\n <div className={classNames(styles, 'spectrum-BarLoader-track')}>\n <div\n className={classNames(styles, 'spectrum-BarLoader-fill')}\n style={barStyle} />\n </div>\n </div>\n );\n}\n\nlet _ProgressBarBase = React.forwardRef(ProgressBarBase);\nexport {_ProgressBarBase as ProgressBarBase};\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 {classNames} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {ProgressBarBase} from './ProgressBarBase';\nimport React from 'react';\nimport {SpectrumProgressBarProps} from '@react-types/progress';\nimport styles from '@adobe/spectrum-css-temp/components/barloader/vars.css';\nimport {useProgressBar} from '@react-aria/progress';\n\nfunction ProgressBar(props: SpectrumProgressBarProps, ref: DOMRef<HTMLDivElement>) {\n let {variant, ...otherProps} = props;\n const {\n progressBarProps,\n labelProps\n } = useProgressBar(props);\n\n return (\n <ProgressBarBase\n {...otherProps}\n ref={ref}\n barProps={progressBarProps}\n labelProps={labelProps}\n barClassName={\n classNames(\n styles,\n {\n 'spectrum-BarLoader--overBackground': variant === 'overBackground'\n }\n )\n } />\n );\n}\n\n/**\n * ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.\n * They can represent either determinate or indeterminate progress.\n */\nlet _ProgressBar = React.forwardRef(ProgressBar);\nexport {_ProgressBar as ProgressBar};\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@import './skin.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 {clamp} from '@react-aria/utils';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React, {CSSProperties} from 'react';\nimport {SpectrumProgressCircleProps} from '@react-types/progress';\nimport styles from '@adobe/spectrum-css-temp/components/circleloader/vars.css';\nimport {useProgressBar} from '@react-aria/progress';\n\nfunction ProgressCircle(props: SpectrumProgressCircleProps, ref: DOMRef<HTMLDivElement>) {\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n size = 'M',\n variant,\n isIndeterminate = false,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n value = clamp(value, minValue, maxValue);\n let {progressBarProps} = useProgressBar({...props, value});\n\n let subMask1Style: CSSProperties = {};\n let subMask2Style: CSSProperties = {};\n if (!isIndeterminate) {\n let percentage = (value - minValue) / (maxValue - minValue) * 100;\n let angle;\n if (percentage > 0 && percentage <= 50) {\n angle = -180 + (percentage / 50 * 180);\n subMask1Style.transform = `rotate(${angle}deg)`;\n subMask2Style.transform = 'rotate(-180deg)';\n } else if (percentage > 50) {\n angle = -180 + (percentage - 50) / 50 * 180;\n subMask1Style.transform = 'rotate(0deg)';\n subMask2Style.transform = `rotate(${angle}deg)`;\n }\n }\n\n if (!ariaLabel && !ariaLabelledby) {\n console.warn('ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility');\n }\n\n return (\n <div\n {...styleProps}\n {...progressBarProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-CircleLoader',\n {\n 'spectrum-CircleLoader--indeterminate': isIndeterminate,\n 'spectrum-CircleLoader--small': size === 'S',\n 'spectrum-CircleLoader--large': size === 'L',\n 'spectrum-CircleLoader--overBackground': variant === 'overBackground'\n },\n styleProps.className\n )\n }>\n <div className={classNames(styles, 'spectrum-CircleLoader-track')} />\n <div className={classNames(styles, 'spectrum-CircleLoader-fills')} >\n <div className={classNames(styles, 'spectrum-CircleLoader-fillMask1')} >\n <div\n className={classNames(styles, 'spectrum-CircleLoader-fillSubMask1')}\n data-testid=\"fillSubMask1\"\n style={subMask1Style}>\n <div className={classNames(styles, 'spectrum-CircleLoader-fill')} />\n </div>\n </div>\n <div className={classNames(styles, 'spectrum-CircleLoader-fillMask2')} >\n <div\n className={classNames(styles, 'spectrum-CircleLoader-fillSubMask2')}\n data-testid=\"fillSubMask2\"\n style={subMask2Style} >\n <div className={classNames(styles, 'spectrum-CircleLoader-fill')} />\n </div>\n </div>\n </div>\n </div>\n );\n}\n\n/**\n * ProgressCircles show the progression of a system operation such as downloading, uploading, processing, etc. in a visual way.\n * They can represent determinate or indeterminate progress.\n */\nlet _ProgressCircle = React.forwardRef(ProgressCircle);\nexport {_ProgressCircle as ProgressCircle};\n"],"names":["$parcel$interopDefault","a","__esModule","default","ProgressBarBase","props","ref","value","minValue","maxValue","size","label","barClassName","showValueLabel","labelPosition","isIndeterminate","barProps","labelProps","ariaLabel","ariaLabelledby","otherProps","domRef","useDOMRef","styleProps","useStyleProps","clamp","barStyle","percentage","width","Math","round","console","warn","classNames","className","minWidth","style","_ProgressBarBase","React","forwardRef","ProgressBar","variant","progressBarProps","useProgressBar","_ProgressBar","ProgressCircle","subMask1Style","subMask2Style","angle","transform","_ProgressCircle"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,GAAoC;AACpC,GAAmD;AACnD,GAA+C;AAC/C,GAA0C;AAC1C,GAAyC;AACzC,GAA0C;AAC1C,GAA+C;AAC/C,GAA2C;AAC3C,GAAwC;AACxC,GAAwC;AACxC,GAAoD;AACpD,GAA6B;AAC7B,GAA4B;AAC5B,GAA6B;AAb7B,yCAAoC,GAAG,CAA2B;AAClE,yCAAmD,GAAG,CAA0C;AAChG,yCAA+C,GAAG,CAAsC;AACxF,yCAA0C,GAAG,CAAiC;AAC9E,yCAAyC,GAAG,CAAgC;AAC5E,yCAA0C,GAAG,CAAiC;AAC9E,yCAA+C,GAAG,CAAsC;AACxF,yCAA2C,GAAG,CAAkC;AAChF,yCAAwC,GAAG,CAA+B;AAC1E,yCAAwC,GAAG,CAA+B;AAC1E,wCAAoD,GAAG,CAA2C;AAClG,yCAA6B,GAAG,CAAoB;AACpD,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAAoB;;;ADapD,EAAgD,AAAhD,8CAAgD;SACvC,qCAAe,CAAC,KAA2B,EAAE,GAA2B,EAAE,CAAC;IAClF,GAAG,CAAC,CAAC,QACH,KAAK,GAAG,CAAC,aACT,QAAQ,GAAG,CAAC,aACZ,QAAQ,GAAG,GAAG,SACd,IAAI,GAAG,CAAG,YACV,KAAK,iBACL,YAAY,mBACZ,cAAc,KAAK,KAAK,kBACxB,aAAa,GAAG,CAAK,wBACrB,eAAe,GAAG,KAAK,aACvB,QAAQ,eACR,UAAU,GACV,CAAY,aAAE,SAAS,GACvB,CAAiB,kBAAE,cAAc,MAC9B,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,MAAM,GAAG,mCAAS,CAAC,GAAG;IAC1B,GAAG,C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AAS,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAA4B;;AAM3E,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAe,iBAAG,sCAAK,CAAC,UAAU,CAAC,oCAAc;;","sources":["packages/@react-spectrum/progress/src/index.ts","packages/@react-spectrum/progress/src/ProgressBar.tsx","packages/@react-spectrum/progress/src/ProgressBarBase.tsx","packages/@adobe/spectrum-css-temp/components/barloader/vars.css","packages/@react-spectrum/progress/src/ProgressCircle.tsx","packages/@adobe/spectrum-css-temp/components/circleloader/vars.css"],"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 * from './ProgressBar';\nexport * from './ProgressCircle';\nexport * from './ProgressBarBase';\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 {classNames} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {ProgressBarBase} from './ProgressBarBase';\nimport React from 'react';\nimport {SpectrumProgressBarProps} from '@react-types/progress';\nimport styles from '@adobe/spectrum-css-temp/components/barloader/vars.css';\nimport {useProgressBar} from '@react-aria/progress';\n\nfunction ProgressBar(props: SpectrumProgressBarProps, ref: DOMRef<HTMLDivElement>) {\n let {variant, ...otherProps} = props;\n const {\n progressBarProps,\n labelProps\n } = useProgressBar(props);\n\n return (\n <ProgressBarBase\n {...otherProps}\n ref={ref}\n barProps={progressBarProps}\n labelProps={labelProps}\n barClassName={\n classNames(\n styles,\n {\n 'spectrum-BarLoader--overBackground': variant === 'overBackground'\n }\n )\n } />\n );\n}\n\n/**\n * ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.\n * They can represent either determinate or indeterminate progress.\n */\nlet _ProgressBar = React.forwardRef(ProgressBar);\nexport {_ProgressBar as ProgressBar};\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 {clamp} from '@react-aria/utils';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {ProgressBarProps} from '@react-types/progress';\nimport React, {CSSProperties, HTMLAttributes} from 'react';\nimport {SpectrumProgressBarBaseProps} from '@react-types/progress';\nimport styles from '@adobe/spectrum-css-temp/components/barloader/vars.css';\n\ninterface ProgressBarBaseProps extends SpectrumProgressBarBaseProps, ProgressBarProps {\n barClassName?: string,\n barProps?: HTMLAttributes<HTMLDivElement>,\n labelProps?: HTMLAttributes<HTMLLabelElement>\n}\n\n// Base ProgressBar component shared with Meter.\nfunction ProgressBarBase(props: ProgressBarBaseProps, ref: DOMRef<HTMLDivElement>) {\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n size = 'L',\n label,\n barClassName,\n showValueLabel = !!label,\n labelPosition = 'top',\n isIndeterminate = false,\n barProps,\n labelProps,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n value = clamp(value, minValue, maxValue);\n\n let barStyle: CSSProperties = {};\n if (!isIndeterminate) {\n let percentage = (value - minValue) / (maxValue - minValue);\n barStyle.width = `${Math.round(percentage * 100)}%`;\n }\n\n // Ideally this should be in useProgressBar, but children\n // are not supported in ProgressCircle which shares that hook...\n if (!label && !ariaLabel && !ariaLabelledby) {\n console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');\n }\n // use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files\n return (\n <div\n {...barProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-BarLoader',\n {\n 'spectrum-BarLoader--small': size === 'S',\n 'spectrum-BarLoader--large': size === 'L',\n 'spectrum-BarLoader--indeterminate': isIndeterminate,\n 'spectrum-BarLoader--sideLabel': labelPosition === 'side'\n },\n barClassName,\n styleProps.className\n )\n }\n style={{minWidth: '-moz-fit-content', ...styleProps.style}}>\n {label &&\n <span\n {...labelProps}\n className={classNames(styles, 'spectrum-BarLoader-label')}>\n {label}\n </span>\n }\n {showValueLabel &&\n <div className={classNames(styles, 'spectrum-BarLoader-percentage')}>\n {barProps['aria-valuetext']}\n </div>\n }\n <div className={classNames(styles, 'spectrum-BarLoader-track')}>\n <div\n className={classNames(styles, 'spectrum-BarLoader-fill')}\n style={barStyle} />\n </div>\n </div>\n );\n}\n\nlet _ProgressBarBase = React.forwardRef(ProgressBarBase);\nexport {_ProgressBarBase as ProgressBarBase};\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@import './skin.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 {clamp} from '@react-aria/utils';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React, {CSSProperties} from 'react';\nimport {SpectrumProgressCircleProps} from '@react-types/progress';\nimport styles from '@adobe/spectrum-css-temp/components/circleloader/vars.css';\nimport {useProgressBar} from '@react-aria/progress';\n\nfunction ProgressCircle(props: SpectrumProgressCircleProps, ref: DOMRef<HTMLDivElement>) {\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n size = 'M',\n variant,\n isIndeterminate = false,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n value = clamp(value, minValue, maxValue);\n let {progressBarProps} = useProgressBar({...props, value});\n\n let subMask1Style: CSSProperties = {};\n let subMask2Style: CSSProperties = {};\n if (!isIndeterminate) {\n let percentage = (value - minValue) / (maxValue - minValue) * 100;\n let angle;\n if (percentage > 0 && percentage <= 50) {\n angle = -180 + (percentage / 50 * 180);\n subMask1Style.transform = `rotate(${angle}deg)`;\n subMask2Style.transform = 'rotate(-180deg)';\n } else if (percentage > 50) {\n angle = -180 + (percentage - 50) / 50 * 180;\n subMask1Style.transform = 'rotate(0deg)';\n subMask2Style.transform = `rotate(${angle}deg)`;\n }\n }\n\n if (!ariaLabel && !ariaLabelledby) {\n console.warn('ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility');\n }\n\n return (\n <div\n {...styleProps}\n {...progressBarProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-CircleLoader',\n {\n 'spectrum-CircleLoader--indeterminate': isIndeterminate,\n 'spectrum-CircleLoader--small': size === 'S',\n 'spectrum-CircleLoader--large': size === 'L',\n 'spectrum-CircleLoader--overBackground': variant === 'overBackground'\n },\n styleProps.className\n )\n }>\n <div className={classNames(styles, 'spectrum-CircleLoader-track')} />\n <div className={classNames(styles, 'spectrum-CircleLoader-fills')} >\n <div className={classNames(styles, 'spectrum-CircleLoader-fillMask1')} >\n <div\n className={classNames(styles, 'spectrum-CircleLoader-fillSubMask1')}\n data-testid=\"fillSubMask1\"\n style={subMask1Style}>\n <div className={classNames(styles, 'spectrum-CircleLoader-fill')} />\n </div>\n </div>\n <div className={classNames(styles, 'spectrum-CircleLoader-fillMask2')} >\n <div\n className={classNames(styles, 'spectrum-CircleLoader-fillSubMask2')}\n data-testid=\"fillSubMask2\"\n style={subMask2Style} >\n <div className={classNames(styles, 'spectrum-CircleLoader-fill')} />\n </div>\n </div>\n </div>\n </div>\n );\n}\n\n/**\n * ProgressCircles show the progression of a system operation such as downloading, uploading, processing, etc. in a visual way.\n * They can represent determinate or indeterminate progress.\n */\nlet _ProgressCircle = React.forwardRef(ProgressCircle);\nexport {_ProgressCircle as ProgressCircle};\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@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,224 +1,263 @@
1
- import { useProgressBar } from "@react-aria/progress";
2
- import _react from "react";
3
- import { clamp } from "@react-aria/utils";
4
- import { classNames, useDOMRef, useStyleProps } from "@react-spectrum/utils";
5
- import _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
6
- import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends";
7
1
  import "./main.css";
2
+ import {classNames as $b1Nyx$classNames, useDOMRef as $b1Nyx$useDOMRef, useStyleProps as $b1Nyx$useStyleProps} from "@react-spectrum/utils";
3
+ import $b1Nyx$react from "react";
4
+ import {useProgressBar as $b1Nyx$useProgressBar} from "@react-aria/progress";
5
+ import {clamp as $b1Nyx$clamp} from "@react-aria/utils";
8
6
 
9
7
  function $parcel$interopDefault(a) {
10
8
  return a && a.__esModule ? a.default : a;
11
9
  }
10
+ function $parcel$export(e, n, v, s) {
11
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
+ }
13
+ var $c71224da52a8e233$exports = {};
14
+
15
+ $parcel$export($c71224da52a8e233$exports, "ProgressBar", () => $c71224da52a8e233$export$c17561cb55d4db30);
16
+
17
+ var $13f0460892bd02b4$exports = {};
18
+
19
+ $parcel$export($13f0460892bd02b4$exports, "ProgressBarBase", () => $13f0460892bd02b4$export$7c6ed87244065f3a);
20
+
21
+
22
+
23
+ var $389470f9fbcf800d$exports = {};
24
+
25
+ $parcel$export($389470f9fbcf800d$exports, "spectrum-BarLoader", () => $389470f9fbcf800d$export$162ba336fb0c239f, (v) => $389470f9fbcf800d$export$162ba336fb0c239f = v);
26
+ $parcel$export($389470f9fbcf800d$exports, "spectrum-BarLoader--indeterminate", () => $389470f9fbcf800d$export$1249dfbb98223794, (v) => $389470f9fbcf800d$export$1249dfbb98223794 = v);
27
+ $parcel$export($389470f9fbcf800d$exports, "spectrum-BarLoader--sideLabel", () => $389470f9fbcf800d$export$99af8802cc2a10dc, (v) => $389470f9fbcf800d$export$99af8802cc2a10dc = v);
28
+ $parcel$export($389470f9fbcf800d$exports, "spectrum-BarLoader-track", () => $389470f9fbcf800d$export$3e2e13fb57b5c74b, (v) => $389470f9fbcf800d$export$3e2e13fb57b5c74b = v);
29
+ $parcel$export($389470f9fbcf800d$exports, "spectrum-BarLoader-fill", () => $389470f9fbcf800d$export$84c9ee7bc724b71b, (v) => $389470f9fbcf800d$export$84c9ee7bc724b71b = v);
30
+ $parcel$export($389470f9fbcf800d$exports, "spectrum-BarLoader-label", () => $389470f9fbcf800d$export$5379ba198163be86, (v) => $389470f9fbcf800d$export$5379ba198163be86 = v);
31
+ $parcel$export($389470f9fbcf800d$exports, "spectrum-BarLoader-percentage", () => $389470f9fbcf800d$export$ecc9c825de9d1a18, (v) => $389470f9fbcf800d$export$ecc9c825de9d1a18 = v);
32
+ $parcel$export($389470f9fbcf800d$exports, "spectrum-BarLoader--small", () => $389470f9fbcf800d$export$b945305960ad74a7, (v) => $389470f9fbcf800d$export$b945305960ad74a7 = v);
33
+ $parcel$export($389470f9fbcf800d$exports, "indeterminate-loop-ltr", () => $389470f9fbcf800d$export$a889038a25113dd4, (v) => $389470f9fbcf800d$export$a889038a25113dd4 = v);
34
+ $parcel$export($389470f9fbcf800d$exports, "indeterminate-loop-rtl", () => $389470f9fbcf800d$export$aeff243cf3356f00, (v) => $389470f9fbcf800d$export$aeff243cf3356f00 = v);
35
+ $parcel$export($389470f9fbcf800d$exports, "spectrum-BarLoader--overBackground", () => $389470f9fbcf800d$export$55612d0bd9b5d41, (v) => $389470f9fbcf800d$export$55612d0bd9b5d41 = v);
36
+ $parcel$export($389470f9fbcf800d$exports, "is-positive", () => $389470f9fbcf800d$export$aea9fd919467f03a, (v) => $389470f9fbcf800d$export$aea9fd919467f03a = v);
37
+ $parcel$export($389470f9fbcf800d$exports, "is-warning", () => $389470f9fbcf800d$export$d4ebda6218901908, (v) => $389470f9fbcf800d$export$d4ebda6218901908 = v);
38
+ $parcel$export($389470f9fbcf800d$exports, "is-critical", () => $389470f9fbcf800d$export$a1f608a9810da50f, (v) => $389470f9fbcf800d$export$a1f608a9810da50f = v);
39
+ var $389470f9fbcf800d$export$162ba336fb0c239f;
40
+ var $389470f9fbcf800d$export$1249dfbb98223794;
41
+ var $389470f9fbcf800d$export$99af8802cc2a10dc;
42
+ var $389470f9fbcf800d$export$3e2e13fb57b5c74b;
43
+ var $389470f9fbcf800d$export$84c9ee7bc724b71b;
44
+ var $389470f9fbcf800d$export$5379ba198163be86;
45
+ var $389470f9fbcf800d$export$ecc9c825de9d1a18;
46
+ var $389470f9fbcf800d$export$b945305960ad74a7;
47
+ var $389470f9fbcf800d$export$a889038a25113dd4;
48
+ var $389470f9fbcf800d$export$aeff243cf3356f00;
49
+ var $389470f9fbcf800d$export$55612d0bd9b5d41;
50
+ var $389470f9fbcf800d$export$aea9fd919467f03a;
51
+ var $389470f9fbcf800d$export$d4ebda6218901908;
52
+ var $389470f9fbcf800d$export$a1f608a9810da50f;
53
+ $389470f9fbcf800d$export$162ba336fb0c239f = "spectrum-BarLoader_48541f";
54
+ $389470f9fbcf800d$export$1249dfbb98223794 = "spectrum-BarLoader--indeterminate_48541f";
55
+ $389470f9fbcf800d$export$99af8802cc2a10dc = "spectrum-BarLoader--sideLabel_48541f";
56
+ $389470f9fbcf800d$export$3e2e13fb57b5c74b = "spectrum-BarLoader-track_48541f";
57
+ $389470f9fbcf800d$export$84c9ee7bc724b71b = "spectrum-BarLoader-fill_48541f";
58
+ $389470f9fbcf800d$export$5379ba198163be86 = "spectrum-BarLoader-label_48541f";
59
+ $389470f9fbcf800d$export$ecc9c825de9d1a18 = "spectrum-BarLoader-percentage_48541f";
60
+ $389470f9fbcf800d$export$b945305960ad74a7 = "spectrum-BarLoader--small_48541f";
61
+ $389470f9fbcf800d$export$a889038a25113dd4 = "indeterminate-loop-ltr_48541f";
62
+ $389470f9fbcf800d$export$aeff243cf3356f00 = "indeterminate-loop-rtl_48541f";
63
+ $389470f9fbcf800d$export$55612d0bd9b5d41 = "spectrum-BarLoader--overBackground_48541f";
64
+ $389470f9fbcf800d$export$aea9fd919467f03a = "is-positive_48541f";
65
+ $389470f9fbcf800d$export$d4ebda6218901908 = "is-warning_48541f";
66
+ $389470f9fbcf800d$export$a1f608a9810da50f = "is-critical_48541f";
12
67
 
13
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/barloader/vars.css
14
- var $eae5301468e7259fd99d852e67771$exports = {};
15
- $eae5301468e7259fd99d852e67771$exports = {
16
- "spectrum-BarLoader": "_spectrum-BarLoader_c74d2",
17
- "spectrum-BarLoader--indeterminate": "_spectrum-BarLoader--indeterminate_c74d2",
18
- "spectrum-BarLoader--sideLabel": "_spectrum-BarLoader--sideLabel_c74d2",
19
- "spectrum-BarLoader-track": "_spectrum-BarLoader-track_c74d2",
20
- "spectrum-BarLoader-fill": "_spectrum-BarLoader-fill_c74d2",
21
- "spectrum-BarLoader-label": "_spectrum-BarLoader-label_c74d2",
22
- "spectrum-BarLoader-percentage": "_spectrum-BarLoader-percentage_c74d2",
23
- "spectrum-BarLoader--small": "_spectrum-BarLoader--small_c74d2",
24
- "indeterminate-loop-ltr": "_indeterminate-loop-ltr_c74d2",
25
- "indeterminate-loop-rtl": "_indeterminate-loop-rtl_c74d2",
26
- "spectrum-BarLoader--overBackground": "_spectrum-BarLoader--overBackground_c74d2",
27
- "is-positive": "_is-positive_c74d2",
28
- "is-warning": "_is-warning_c74d2",
29
- "is-critical": "_is-critical_c74d2"
30
- };
31
- var $eae5301468e7259fd99d852e67771$$interop$default = $parcel$interopDefault($eae5301468e7259fd99d852e67771$exports);
32
68
 
33
69
  // Base ProgressBar component shared with Meter.
34
- function $c5cde9743903482bb7abecafb119431a$var$ProgressBarBase(props, ref) {
35
- let {
36
- value = 0,
37
- minValue = 0,
38
- maxValue = 100,
39
- size = 'L',
40
- label,
41
- barClassName,
42
- showValueLabel = !!label,
43
- labelPosition = 'top',
44
- isIndeterminate = false,
45
- barProps,
46
- labelProps,
47
- 'aria-label': ariaLabel,
48
- 'aria-labelledby': ariaLabelledby
49
- } = props,
50
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["value", "minValue", "maxValue", "size", "label", "barClassName", "showValueLabel", "labelPosition", "isIndeterminate", "barProps", "labelProps", "aria-label", "aria-labelledby"]);
51
-
52
- let domRef = useDOMRef(ref);
53
- let {
54
- styleProps
55
- } = useStyleProps(otherProps);
56
- value = clamp(value, minValue, maxValue);
57
- let barStyle = {};
58
-
59
- if (!isIndeterminate) {
60
- let percentage = (value - minValue) / (maxValue - minValue);
61
- barStyle.width = Math.round(percentage * 100) + "%";
62
- } // Ideally this should be in useProgressBar, but children
63
- // are not supported in ProgressCircle which shares that hook...
64
-
65
-
66
- if (!label && !ariaLabel && !ariaLabelledby) {
67
- console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');
68
- } // use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files
69
-
70
-
71
- return /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, barProps, {
72
- ref: domRef,
73
- className: classNames($eae5301468e7259fd99d852e67771$$interop$default, 'spectrum-BarLoader', {
74
- 'spectrum-BarLoader--small': size === 'S',
75
- 'spectrum-BarLoader--large': size === 'L',
76
- 'spectrum-BarLoader--indeterminate': isIndeterminate,
77
- 'spectrum-BarLoader--sideLabel': labelPosition === 'side'
78
- }, barClassName, styleProps.className),
79
- style: _babelRuntimeHelpersEsmExtends({
80
- minWidth: '-moz-fit-content'
81
- }, styleProps.style)
82
- }), label && /*#__PURE__*/_react.createElement("span", _babelRuntimeHelpersEsmExtends({}, labelProps, {
83
- className: classNames($eae5301468e7259fd99d852e67771$$interop$default, 'spectrum-BarLoader-label')
84
- }), label), showValueLabel && /*#__PURE__*/_react.createElement("div", {
85
- className: classNames($eae5301468e7259fd99d852e67771$$interop$default, 'spectrum-BarLoader-percentage')
86
- }, barProps['aria-valuetext']), /*#__PURE__*/_react.createElement("div", {
87
- className: classNames($eae5301468e7259fd99d852e67771$$interop$default, 'spectrum-BarLoader-track')
88
- }, /*#__PURE__*/_react.createElement("div", {
89
- className: classNames($eae5301468e7259fd99d852e67771$$interop$default, 'spectrum-BarLoader-fill'),
90
- style: barStyle
91
- })));
70
+ function $13f0460892bd02b4$var$ProgressBarBase(props, ref) {
71
+ let { value: value = 0 , minValue: minValue = 0 , maxValue: maxValue = 100 , size: size = 'L' , label: label , barClassName: barClassName , showValueLabel: showValueLabel = !!label , labelPosition: labelPosition = 'top' , isIndeterminate: isIndeterminate = false , barProps: barProps , labelProps: labelProps , 'aria-label': ariaLabel , 'aria-labelledby': ariaLabelledby , ...otherProps } = props;
72
+ let domRef = $b1Nyx$useDOMRef(ref);
73
+ let { styleProps: styleProps } = $b1Nyx$useStyleProps(otherProps);
74
+ value = $b1Nyx$clamp(value, minValue, maxValue);
75
+ let barStyle = {
76
+ };
77
+ if (!isIndeterminate) {
78
+ let percentage = (value - minValue) / (maxValue - minValue);
79
+ barStyle.width = `${Math.round(percentage * 100)}%`;
80
+ }
81
+ // Ideally this should be in useProgressBar, but children
82
+ // are not supported in ProgressCircle which shares that hook...
83
+ if (!label && !ariaLabel && !ariaLabelledby) console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');
84
+ // use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files
85
+ return(/*#__PURE__*/ $b1Nyx$react.createElement("div", {
86
+ ...barProps,
87
+ ref: domRef,
88
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($389470f9fbcf800d$exports)), 'spectrum-BarLoader', {
89
+ 'spectrum-BarLoader--small': size === 'S',
90
+ 'spectrum-BarLoader--large': size === 'L',
91
+ 'spectrum-BarLoader--indeterminate': isIndeterminate,
92
+ 'spectrum-BarLoader--sideLabel': labelPosition === 'side'
93
+ }, barClassName, styleProps.className),
94
+ style: {
95
+ minWidth: '-moz-fit-content',
96
+ ...styleProps.style
97
+ }
98
+ }, label && /*#__PURE__*/ $b1Nyx$react.createElement("span", {
99
+ ...labelProps,
100
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($389470f9fbcf800d$exports)), 'spectrum-BarLoader-label')
101
+ }, label), showValueLabel && /*#__PURE__*/ $b1Nyx$react.createElement("div", {
102
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($389470f9fbcf800d$exports)), 'spectrum-BarLoader-percentage')
103
+ }, barProps['aria-valuetext']), /*#__PURE__*/ $b1Nyx$react.createElement("div", {
104
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($389470f9fbcf800d$exports)), 'spectrum-BarLoader-track')
105
+ }, /*#__PURE__*/ $b1Nyx$react.createElement("div", {
106
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($389470f9fbcf800d$exports)), 'spectrum-BarLoader-fill'),
107
+ style: barStyle
108
+ }))));
92
109
  }
110
+ let $13f0460892bd02b4$export$7c6ed87244065f3a = /*#__PURE__*/ $b1Nyx$react.forwardRef($13f0460892bd02b4$var$ProgressBarBase);
111
+
112
+
113
+
114
+
93
115
 
94
- export let ProgressBarBase = /*#__PURE__*/_react.forwardRef($c5cde9743903482bb7abecafb119431a$var$ProgressBarBase);
95
-
96
- function $f18373465a3261d8a2c5beeda930081$var$ProgressBar(props, ref) {
97
- let {
98
- variant
99
- } = props,
100
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["variant"]);
101
-
102
- const {
103
- progressBarProps,
104
- labelProps
105
- } = useProgressBar(props);
106
- return /*#__PURE__*/_react.createElement(ProgressBarBase, _babelRuntimeHelpersEsmExtends({}, otherProps, {
107
- ref: ref,
108
- barProps: progressBarProps,
109
- labelProps: labelProps,
110
- barClassName: classNames($eae5301468e7259fd99d852e67771$$interop$default, {
111
- 'spectrum-BarLoader--overBackground': variant === 'overBackground'
112
- })
113
- }));
116
+ function $c71224da52a8e233$var$ProgressBar(props, ref) {
117
+ let { variant: variant , ...otherProps } = props;
118
+ const { progressBarProps: progressBarProps , labelProps: labelProps } = $b1Nyx$useProgressBar(props);
119
+ return(/*#__PURE__*/ $b1Nyx$react.createElement($13f0460892bd02b4$export$7c6ed87244065f3a, {
120
+ ...otherProps,
121
+ ref: ref,
122
+ barProps: progressBarProps,
123
+ labelProps: labelProps,
124
+ barClassName: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($389470f9fbcf800d$exports)), {
125
+ 'spectrum-BarLoader--overBackground': variant === 'overBackground'
126
+ })
127
+ }));
114
128
  }
115
129
  /**
116
130
  * ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.
117
131
  * They can represent either determinate or indeterminate progress.
118
- */
119
-
120
-
121
- export let ProgressBar = /*#__PURE__*/_react.forwardRef($f18373465a3261d8a2c5beeda930081$var$ProgressBar);
122
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/circleloader/vars.css
123
- var $ac0b16ab45b43a13bd626652200d2$exports = {};
124
- $ac0b16ab45b43a13bd626652200d2$exports = {
125
- "spectrum-CircleLoader--indeterminate-fill-submask-2": "_spectrum-CircleLoader--indeterminate-fill-submask-2_40b43",
126
- "spectrum-fill-mask-2": "_spectrum-fill-mask-2_40b43",
127
- "spectrum-CircleLoader": "_spectrum-CircleLoader_40b43",
128
- "spectrum-CircleLoader-track": "_spectrum-CircleLoader-track_40b43",
129
- "spectrum-CircleLoader-fills": "_spectrum-CircleLoader-fills_40b43",
130
- "spectrum-CircleLoader-fill": "_spectrum-CircleLoader-fill_40b43",
131
- "spectrum-CircleLoader-fillMask1": "_spectrum-CircleLoader-fillMask1_40b43",
132
- "spectrum-CircleLoader-fillMask2": "_spectrum-CircleLoader-fillMask2_40b43",
133
- "spectrum-CircleLoader-fillSubMask1": "_spectrum-CircleLoader-fillSubMask1_40b43",
134
- "spectrum-CircleLoader-fillSubMask2": "_spectrum-CircleLoader-fillSubMask2_40b43",
135
- "spectrum-CircleLoader--small": "_spectrum-CircleLoader--small_40b43",
136
- "spectrum-CircleLoader--large": "_spectrum-CircleLoader--large_40b43",
137
- "spectrum-CircleLoader--indeterminate": "_spectrum-CircleLoader--indeterminate_40b43",
138
- "spectrum-fills-rotate": "_spectrum-fills-rotate_40b43",
139
- "spectrum-fill-mask-1": "_spectrum-fill-mask-1_40b43",
140
- "spectrum-CircleLoader--overBackground": "_spectrum-CircleLoader--overBackground_40b43"
141
- };
142
- var $ac0b16ab45b43a13bd626652200d2$$interop$default = $parcel$interopDefault($ac0b16ab45b43a13bd626652200d2$exports);
143
-
144
- function $e712ab91a3ca4a742ab6443c53b96b8$var$ProgressCircle(props, ref) {
145
- let {
146
- value = 0,
147
- minValue = 0,
148
- maxValue = 100,
149
- size = 'M',
150
- variant,
151
- isIndeterminate = false,
152
- 'aria-label': ariaLabel,
153
- 'aria-labelledby': ariaLabelledby
154
- } = props,
155
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["value", "minValue", "maxValue", "size", "variant", "isIndeterminate", "aria-label", "aria-labelledby"]);
156
-
157
- let domRef = useDOMRef(ref);
158
- let {
159
- styleProps
160
- } = useStyleProps(otherProps);
161
- value = clamp(value, minValue, maxValue);
162
- let {
163
- progressBarProps
164
- } = useProgressBar(_babelRuntimeHelpersEsmExtends({}, props, {
165
- value
166
- }));
167
- let subMask1Style = {};
168
- let subMask2Style = {};
169
-
170
- if (!isIndeterminate) {
171
- let percentage = (value - minValue) / (maxValue - minValue) * 100;
172
- let angle;
173
-
174
- if (percentage > 0 && percentage <= 50) {
175
- angle = -180 + percentage / 50 * 180;
176
- subMask1Style.transform = "rotate(" + angle + "deg)";
177
- subMask2Style.transform = 'rotate(-180deg)';
178
- } else if (percentage > 50) {
179
- angle = -180 + (percentage - 50) / 50 * 180;
180
- subMask1Style.transform = 'rotate(0deg)';
181
- subMask2Style.transform = "rotate(" + angle + "deg)";
132
+ */ let $c71224da52a8e233$export$c17561cb55d4db30 = /*#__PURE__*/ $b1Nyx$react.forwardRef($c71224da52a8e233$var$ProgressBar);
133
+
134
+
135
+ var $82e94a3f8705d6be$exports = {};
136
+
137
+ $parcel$export($82e94a3f8705d6be$exports, "ProgressCircle", () => $82e94a3f8705d6be$export$c79b9d6b4cc92af7);
138
+
139
+
140
+
141
+ var $d567536bb5619019$exports = {};
142
+
143
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader--indeterminate-fill-submask-2", () => $d567536bb5619019$export$f7083dbeadcbb2bd, (v) => $d567536bb5619019$export$f7083dbeadcbb2bd = v);
144
+ $parcel$export($d567536bb5619019$exports, "spectrum-fill-mask-2", () => $d567536bb5619019$export$7219832bea80eb54, (v) => $d567536bb5619019$export$7219832bea80eb54 = v);
145
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader", () => $d567536bb5619019$export$9633d311d6d6830b, (v) => $d567536bb5619019$export$9633d311d6d6830b = v);
146
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader-track", () => $d567536bb5619019$export$278efdb85ed802da, (v) => $d567536bb5619019$export$278efdb85ed802da = v);
147
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader-fills", () => $d567536bb5619019$export$3038f4c0c86f539b, (v) => $d567536bb5619019$export$3038f4c0c86f539b = v);
148
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader-fill", () => $d567536bb5619019$export$58fb9ac68cf8e784, (v) => $d567536bb5619019$export$58fb9ac68cf8e784 = v);
149
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader-fillMask1", () => $d567536bb5619019$export$b676cd958401a736, (v) => $d567536bb5619019$export$b676cd958401a736 = v);
150
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader-fillMask2", () => $d567536bb5619019$export$8c428f4f13e424b, (v) => $d567536bb5619019$export$8c428f4f13e424b = v);
151
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader-fillSubMask1", () => $d567536bb5619019$export$98ba5ef650aeb8ca, (v) => $d567536bb5619019$export$98ba5ef650aeb8ca = v);
152
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader-fillSubMask2", () => $d567536bb5619019$export$dc70b48c897b0f1a, (v) => $d567536bb5619019$export$dc70b48c897b0f1a = v);
153
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader--small", () => $d567536bb5619019$export$79819ab9844dbe9b, (v) => $d567536bb5619019$export$79819ab9844dbe9b = v);
154
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader--large", () => $d567536bb5619019$export$c8c34e5e37bf511c, (v) => $d567536bb5619019$export$c8c34e5e37bf511c = v);
155
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader--indeterminate", () => $d567536bb5619019$export$79b7e5abeef5134f, (v) => $d567536bb5619019$export$79b7e5abeef5134f = v);
156
+ $parcel$export($d567536bb5619019$exports, "spectrum-fills-rotate", () => $d567536bb5619019$export$3663cbdb240663ec, (v) => $d567536bb5619019$export$3663cbdb240663ec = v);
157
+ $parcel$export($d567536bb5619019$exports, "spectrum-fill-mask-1", () => $d567536bb5619019$export$524c81e63e1d64f5, (v) => $d567536bb5619019$export$524c81e63e1d64f5 = v);
158
+ $parcel$export($d567536bb5619019$exports, "spectrum-CircleLoader--overBackground", () => $d567536bb5619019$export$6668708cb539f403, (v) => $d567536bb5619019$export$6668708cb539f403 = v);
159
+ var $d567536bb5619019$export$f7083dbeadcbb2bd;
160
+ var $d567536bb5619019$export$7219832bea80eb54;
161
+ var $d567536bb5619019$export$9633d311d6d6830b;
162
+ var $d567536bb5619019$export$278efdb85ed802da;
163
+ var $d567536bb5619019$export$3038f4c0c86f539b;
164
+ var $d567536bb5619019$export$58fb9ac68cf8e784;
165
+ var $d567536bb5619019$export$b676cd958401a736;
166
+ var $d567536bb5619019$export$8c428f4f13e424b;
167
+ var $d567536bb5619019$export$98ba5ef650aeb8ca;
168
+ var $d567536bb5619019$export$dc70b48c897b0f1a;
169
+ var $d567536bb5619019$export$79819ab9844dbe9b;
170
+ var $d567536bb5619019$export$c8c34e5e37bf511c;
171
+ var $d567536bb5619019$export$79b7e5abeef5134f;
172
+ var $d567536bb5619019$export$3663cbdb240663ec;
173
+ var $d567536bb5619019$export$524c81e63e1d64f5;
174
+ var $d567536bb5619019$export$6668708cb539f403;
175
+ $d567536bb5619019$export$f7083dbeadcbb2bd = "spectrum-CircleLoader--indeterminate-fill-submask-2_7c1153";
176
+ $d567536bb5619019$export$7219832bea80eb54 = "spectrum-fill-mask-2_7c1153";
177
+ $d567536bb5619019$export$9633d311d6d6830b = "spectrum-CircleLoader_7c1153";
178
+ $d567536bb5619019$export$278efdb85ed802da = "spectrum-CircleLoader-track_7c1153";
179
+ $d567536bb5619019$export$3038f4c0c86f539b = "spectrum-CircleLoader-fills_7c1153";
180
+ $d567536bb5619019$export$58fb9ac68cf8e784 = "spectrum-CircleLoader-fill_7c1153";
181
+ $d567536bb5619019$export$b676cd958401a736 = "spectrum-CircleLoader-fillMask1_7c1153";
182
+ $d567536bb5619019$export$8c428f4f13e424b = "spectrum-CircleLoader-fillMask2_7c1153";
183
+ $d567536bb5619019$export$98ba5ef650aeb8ca = "spectrum-CircleLoader-fillSubMask1_7c1153";
184
+ $d567536bb5619019$export$dc70b48c897b0f1a = "spectrum-CircleLoader-fillSubMask2_7c1153";
185
+ $d567536bb5619019$export$79819ab9844dbe9b = "spectrum-CircleLoader--small_7c1153";
186
+ $d567536bb5619019$export$c8c34e5e37bf511c = "spectrum-CircleLoader--large_7c1153";
187
+ $d567536bb5619019$export$79b7e5abeef5134f = "spectrum-CircleLoader--indeterminate_7c1153";
188
+ $d567536bb5619019$export$3663cbdb240663ec = "spectrum-fills-rotate_7c1153";
189
+ $d567536bb5619019$export$524c81e63e1d64f5 = "spectrum-fill-mask-1_7c1153";
190
+ $d567536bb5619019$export$6668708cb539f403 = "spectrum-CircleLoader--overBackground_7c1153";
191
+
192
+
193
+
194
+ function $82e94a3f8705d6be$var$ProgressCircle(props, ref) {
195
+ let { value: value = 0 , minValue: minValue = 0 , maxValue: maxValue = 100 , size: size = 'M' , variant: variant , isIndeterminate: isIndeterminate = false , 'aria-label': ariaLabel , 'aria-labelledby': ariaLabelledby , ...otherProps } = props;
196
+ let domRef = $b1Nyx$useDOMRef(ref);
197
+ let { styleProps: styleProps } = $b1Nyx$useStyleProps(otherProps);
198
+ value = $b1Nyx$clamp(value, minValue, maxValue);
199
+ let { progressBarProps: progressBarProps } = $b1Nyx$useProgressBar({
200
+ ...props,
201
+ value: value
202
+ });
203
+ let subMask1Style = {
204
+ };
205
+ let subMask2Style = {
206
+ };
207
+ if (!isIndeterminate) {
208
+ let percentage = (value - minValue) / (maxValue - minValue) * 100;
209
+ let angle;
210
+ if (percentage > 0 && percentage <= 50) {
211
+ angle = -180 + percentage / 50 * 180;
212
+ subMask1Style.transform = `rotate(${angle}deg)`;
213
+ subMask2Style.transform = 'rotate(-180deg)';
214
+ } else if (percentage > 50) {
215
+ angle = -180 + (percentage - 50) / 50 * 180;
216
+ subMask1Style.transform = 'rotate(0deg)';
217
+ subMask2Style.transform = `rotate(${angle}deg)`;
218
+ }
182
219
  }
183
- }
184
-
185
- if (!ariaLabel && !ariaLabelledby) {
186
- console.warn('ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility');
187
- }
188
-
189
- return /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, styleProps, progressBarProps, {
190
- ref: domRef,
191
- className: classNames($ac0b16ab45b43a13bd626652200d2$$interop$default, 'spectrum-CircleLoader', {
192
- 'spectrum-CircleLoader--indeterminate': isIndeterminate,
193
- 'spectrum-CircleLoader--small': size === 'S',
194
- 'spectrum-CircleLoader--large': size === 'L',
195
- 'spectrum-CircleLoader--overBackground': variant === 'overBackground'
196
- }, styleProps.className)
197
- }), /*#__PURE__*/_react.createElement("div", {
198
- className: classNames($ac0b16ab45b43a13bd626652200d2$$interop$default, 'spectrum-CircleLoader-track')
199
- }), /*#__PURE__*/_react.createElement("div", {
200
- className: classNames($ac0b16ab45b43a13bd626652200d2$$interop$default, 'spectrum-CircleLoader-fills')
201
- }, /*#__PURE__*/_react.createElement("div", {
202
- className: classNames($ac0b16ab45b43a13bd626652200d2$$interop$default, 'spectrum-CircleLoader-fillMask1')
203
- }, /*#__PURE__*/_react.createElement("div", {
204
- className: classNames($ac0b16ab45b43a13bd626652200d2$$interop$default, 'spectrum-CircleLoader-fillSubMask1'),
205
- style: subMask1Style
206
- }, /*#__PURE__*/_react.createElement("div", {
207
- className: classNames($ac0b16ab45b43a13bd626652200d2$$interop$default, 'spectrum-CircleLoader-fill')
208
- }))), /*#__PURE__*/_react.createElement("div", {
209
- className: classNames($ac0b16ab45b43a13bd626652200d2$$interop$default, 'spectrum-CircleLoader-fillMask2')
210
- }, /*#__PURE__*/_react.createElement("div", {
211
- className: classNames($ac0b16ab45b43a13bd626652200d2$$interop$default, 'spectrum-CircleLoader-fillSubMask2'),
212
- style: subMask2Style
213
- }, /*#__PURE__*/_react.createElement("div", {
214
- className: classNames($ac0b16ab45b43a13bd626652200d2$$interop$default, 'spectrum-CircleLoader-fill')
215
- })))));
220
+ if (!ariaLabel && !ariaLabelledby) console.warn('ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility');
221
+ return(/*#__PURE__*/ $b1Nyx$react.createElement("div", {
222
+ ...styleProps,
223
+ ...progressBarProps,
224
+ ref: domRef,
225
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($d567536bb5619019$exports)), 'spectrum-CircleLoader', {
226
+ 'spectrum-CircleLoader--indeterminate': isIndeterminate,
227
+ 'spectrum-CircleLoader--small': size === 'S',
228
+ 'spectrum-CircleLoader--large': size === 'L',
229
+ 'spectrum-CircleLoader--overBackground': variant === 'overBackground'
230
+ }, styleProps.className)
231
+ }, /*#__PURE__*/ $b1Nyx$react.createElement("div", {
232
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($d567536bb5619019$exports)), 'spectrum-CircleLoader-track')
233
+ }), /*#__PURE__*/ $b1Nyx$react.createElement("div", {
234
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($d567536bb5619019$exports)), 'spectrum-CircleLoader-fills')
235
+ }, /*#__PURE__*/ $b1Nyx$react.createElement("div", {
236
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($d567536bb5619019$exports)), 'spectrum-CircleLoader-fillMask1')
237
+ }, /*#__PURE__*/ $b1Nyx$react.createElement("div", {
238
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($d567536bb5619019$exports)), 'spectrum-CircleLoader-fillSubMask1'),
239
+ "data-testid": "fillSubMask1",
240
+ style: subMask1Style
241
+ }, /*#__PURE__*/ $b1Nyx$react.createElement("div", {
242
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($d567536bb5619019$exports)), 'spectrum-CircleLoader-fill')
243
+ }))), /*#__PURE__*/ $b1Nyx$react.createElement("div", {
244
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($d567536bb5619019$exports)), 'spectrum-CircleLoader-fillMask2')
245
+ }, /*#__PURE__*/ $b1Nyx$react.createElement("div", {
246
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($d567536bb5619019$exports)), 'spectrum-CircleLoader-fillSubMask2'),
247
+ "data-testid": "fillSubMask2",
248
+ style: subMask2Style
249
+ }, /*#__PURE__*/ $b1Nyx$react.createElement("div", {
250
+ className: $b1Nyx$classNames((/*@__PURE__*/$parcel$interopDefault($d567536bb5619019$exports)), 'spectrum-CircleLoader-fill')
251
+ }))))));
216
252
  }
217
253
  /**
218
254
  * ProgressCircles show the progression of a system operation such as downloading, uploading, processing, etc. in a visual way.
219
255
  * They can represent determinate or indeterminate progress.
220
- */
256
+ */ let $82e94a3f8705d6be$export$c79b9d6b4cc92af7 = /*#__PURE__*/ $b1Nyx$react.forwardRef($82e94a3f8705d6be$var$ProgressCircle);
257
+
258
+
259
+
221
260
 
222
261
 
223
- export let ProgressCircle = /*#__PURE__*/_react.forwardRef($e712ab91a3ca4a742ab6443c53b96b8$var$ProgressCircle);
262
+ export {$c71224da52a8e233$export$c17561cb55d4db30 as ProgressBar, $82e94a3f8705d6be$export$c79b9d6b4cc92af7 as ProgressCircle, $13f0460892bd02b4$export$7c6ed87244065f3a as ProgressBarBase};
224
263
  //# sourceMappingURL=module.js.map