@react-spectrum/progress 3.1.1 → 3.1.5
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.css +1 -2
- package/dist/main.js +256 -215
- package/dist/main.js.map +1 -1
- package/dist/module.js +241 -198
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/ProgressBarBase.tsx +3 -3
- package/dist/main.css.map +0 -1
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,8BAA4B,iCAFb;AAGf,6BAA2B,gCAHZ;AAIf,8BAA4B,iCAJb;AAKf,mCAAiC,sCALlB;AAMf,mCAAiC,sCANlB;AAOf,+BAA6B,kCAPd;AAQf,uCAAqC,0CARtB;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;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CAACE,SAAd,eAAoCD,KAApC;AACD;AACF;;AAED,MAAI,CAAC5B,SAAD,IAAc,CAACC,cAAnB,EAAmC;AACjCY,IAAAA,OAAO,CAACC,IAAR,CAAa,sFAAb;AACD;;AAED,sBACE,4DACMT,UADN,EAEMiB,gBAFN;AAGE,IAAA,GAAG,EAAEnB,MAHP;AAIE,IAAA,SAAS,EACPY,UAAU,qDAER,uBAFQ,EAGR;AACE,8CAAwClB,eAD1C;AAEE,sCAAgCL,IAAI,KAAK,GAF3C;AAGE,sCAAgCA,IAAI,KAAK,GAH3C;AAIE,+CAAyC6B,OAAO,KAAK;AAJvD,KAHQ,EASRhB,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,EAAEW;AAHT,kBAIE;AAAK,IAAA,SAAS,EAAEX,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,EAAEY;AAHT,kBAIE;AAAK,IAAA,SAAS,EAAEZ,UAAU,qDAAS,4BAAT;AAA1B,IAJF,CADF,CATF,CAlBF,CADF;AAuCD;AAED;;;;;;AAIA,IAAIe,cAAe,GAAGZ,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\n return (\n <div\n {...styleProps}\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 {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","_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,mCAA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E,aAAa;0EACnB,CAAG;QAAC,SAAS,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,220 +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 $byFKM$classNames, useDOMRef as $byFKM$useDOMRef, useStyleProps as $byFKM$useStyleProps} from "@react-spectrum/utils";
|
|
3
|
+
import $byFKM$react from "react";
|
|
4
|
+
import {useProgressBar as $byFKM$useProgressBar} from "@react-aria/progress";
|
|
5
|
+
import {clamp as $byFKM$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 $3e2fc00d5e01478b$exports = {};
|
|
14
|
+
|
|
15
|
+
$parcel$export($3e2fc00d5e01478b$exports, "ProgressBar", () => $3e2fc00d5e01478b$export$c17561cb55d4db30);
|
|
16
|
+
|
|
17
|
+
var $287d3431be7af3d0$exports = {};
|
|
18
|
+
|
|
19
|
+
$parcel$export($287d3431be7af3d0$exports, "ProgressBarBase", () => $287d3431be7af3d0$export$7c6ed87244065f3a);
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
var $0cd8e49fa97e4664$exports = {};
|
|
24
|
+
|
|
25
|
+
$parcel$export($0cd8e49fa97e4664$exports, "spectrum-BarLoader", () => $0cd8e49fa97e4664$export$162ba336fb0c239f, (v) => $0cd8e49fa97e4664$export$162ba336fb0c239f = v);
|
|
26
|
+
$parcel$export($0cd8e49fa97e4664$exports, "spectrum-BarLoader--indeterminate", () => $0cd8e49fa97e4664$export$1249dfbb98223794, (v) => $0cd8e49fa97e4664$export$1249dfbb98223794 = v);
|
|
27
|
+
$parcel$export($0cd8e49fa97e4664$exports, "spectrum-BarLoader--sideLabel", () => $0cd8e49fa97e4664$export$99af8802cc2a10dc, (v) => $0cd8e49fa97e4664$export$99af8802cc2a10dc = v);
|
|
28
|
+
$parcel$export($0cd8e49fa97e4664$exports, "spectrum-BarLoader-track", () => $0cd8e49fa97e4664$export$3e2e13fb57b5c74b, (v) => $0cd8e49fa97e4664$export$3e2e13fb57b5c74b = v);
|
|
29
|
+
$parcel$export($0cd8e49fa97e4664$exports, "spectrum-BarLoader-fill", () => $0cd8e49fa97e4664$export$84c9ee7bc724b71b, (v) => $0cd8e49fa97e4664$export$84c9ee7bc724b71b = v);
|
|
30
|
+
$parcel$export($0cd8e49fa97e4664$exports, "spectrum-BarLoader-label", () => $0cd8e49fa97e4664$export$5379ba198163be86, (v) => $0cd8e49fa97e4664$export$5379ba198163be86 = v);
|
|
31
|
+
$parcel$export($0cd8e49fa97e4664$exports, "spectrum-BarLoader-percentage", () => $0cd8e49fa97e4664$export$ecc9c825de9d1a18, (v) => $0cd8e49fa97e4664$export$ecc9c825de9d1a18 = v);
|
|
32
|
+
$parcel$export($0cd8e49fa97e4664$exports, "spectrum-BarLoader--small", () => $0cd8e49fa97e4664$export$b945305960ad74a7, (v) => $0cd8e49fa97e4664$export$b945305960ad74a7 = v);
|
|
33
|
+
$parcel$export($0cd8e49fa97e4664$exports, "indeterminate-loop-ltr", () => $0cd8e49fa97e4664$export$a889038a25113dd4, (v) => $0cd8e49fa97e4664$export$a889038a25113dd4 = v);
|
|
34
|
+
$parcel$export($0cd8e49fa97e4664$exports, "indeterminate-loop-rtl", () => $0cd8e49fa97e4664$export$aeff243cf3356f00, (v) => $0cd8e49fa97e4664$export$aeff243cf3356f00 = v);
|
|
35
|
+
$parcel$export($0cd8e49fa97e4664$exports, "spectrum-BarLoader--overBackground", () => $0cd8e49fa97e4664$export$55612d0bd9b5d41, (v) => $0cd8e49fa97e4664$export$55612d0bd9b5d41 = v);
|
|
36
|
+
$parcel$export($0cd8e49fa97e4664$exports, "is-positive", () => $0cd8e49fa97e4664$export$aea9fd919467f03a, (v) => $0cd8e49fa97e4664$export$aea9fd919467f03a = v);
|
|
37
|
+
$parcel$export($0cd8e49fa97e4664$exports, "is-warning", () => $0cd8e49fa97e4664$export$d4ebda6218901908, (v) => $0cd8e49fa97e4664$export$d4ebda6218901908 = v);
|
|
38
|
+
$parcel$export($0cd8e49fa97e4664$exports, "is-critical", () => $0cd8e49fa97e4664$export$a1f608a9810da50f, (v) => $0cd8e49fa97e4664$export$a1f608a9810da50f = v);
|
|
39
|
+
var $0cd8e49fa97e4664$export$162ba336fb0c239f;
|
|
40
|
+
var $0cd8e49fa97e4664$export$1249dfbb98223794;
|
|
41
|
+
var $0cd8e49fa97e4664$export$99af8802cc2a10dc;
|
|
42
|
+
var $0cd8e49fa97e4664$export$3e2e13fb57b5c74b;
|
|
43
|
+
var $0cd8e49fa97e4664$export$84c9ee7bc724b71b;
|
|
44
|
+
var $0cd8e49fa97e4664$export$5379ba198163be86;
|
|
45
|
+
var $0cd8e49fa97e4664$export$ecc9c825de9d1a18;
|
|
46
|
+
var $0cd8e49fa97e4664$export$b945305960ad74a7;
|
|
47
|
+
var $0cd8e49fa97e4664$export$a889038a25113dd4;
|
|
48
|
+
var $0cd8e49fa97e4664$export$aeff243cf3356f00;
|
|
49
|
+
var $0cd8e49fa97e4664$export$55612d0bd9b5d41;
|
|
50
|
+
var $0cd8e49fa97e4664$export$aea9fd919467f03a;
|
|
51
|
+
var $0cd8e49fa97e4664$export$d4ebda6218901908;
|
|
52
|
+
var $0cd8e49fa97e4664$export$a1f608a9810da50f;
|
|
53
|
+
$0cd8e49fa97e4664$export$162ba336fb0c239f = "spectrum-BarLoader_48541f";
|
|
54
|
+
$0cd8e49fa97e4664$export$1249dfbb98223794 = "spectrum-BarLoader--indeterminate_48541f";
|
|
55
|
+
$0cd8e49fa97e4664$export$99af8802cc2a10dc = "spectrum-BarLoader--sideLabel_48541f";
|
|
56
|
+
$0cd8e49fa97e4664$export$3e2e13fb57b5c74b = "spectrum-BarLoader-track_48541f";
|
|
57
|
+
$0cd8e49fa97e4664$export$84c9ee7bc724b71b = "spectrum-BarLoader-fill_48541f";
|
|
58
|
+
$0cd8e49fa97e4664$export$5379ba198163be86 = "spectrum-BarLoader-label_48541f";
|
|
59
|
+
$0cd8e49fa97e4664$export$ecc9c825de9d1a18 = "spectrum-BarLoader-percentage_48541f";
|
|
60
|
+
$0cd8e49fa97e4664$export$b945305960ad74a7 = "spectrum-BarLoader--small_48541f";
|
|
61
|
+
$0cd8e49fa97e4664$export$a889038a25113dd4 = "indeterminate-loop-ltr_48541f";
|
|
62
|
+
$0cd8e49fa97e4664$export$aeff243cf3356f00 = "indeterminate-loop-rtl_48541f";
|
|
63
|
+
$0cd8e49fa97e4664$export$55612d0bd9b5d41 = "spectrum-BarLoader--overBackground_48541f";
|
|
64
|
+
$0cd8e49fa97e4664$export$aea9fd919467f03a = "is-positive_48541f";
|
|
65
|
+
$0cd8e49fa97e4664$export$d4ebda6218901908 = "is-warning_48541f";
|
|
66
|
+
$0cd8e49fa97e4664$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-track": "_spectrum-BarLoader-track_c74d2",
|
|
18
|
-
"spectrum-BarLoader-fill": "_spectrum-BarLoader-fill_c74d2",
|
|
19
|
-
"spectrum-BarLoader-label": "_spectrum-BarLoader-label_c74d2",
|
|
20
|
-
"spectrum-BarLoader-percentage": "_spectrum-BarLoader-percentage_c74d2",
|
|
21
|
-
"spectrum-BarLoader--sideLabel": "_spectrum-BarLoader--sideLabel_c74d2",
|
|
22
|
-
"spectrum-BarLoader--small": "_spectrum-BarLoader--small_c74d2",
|
|
23
|
-
"spectrum-BarLoader--indeterminate": "_spectrum-BarLoader--indeterminate_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 $
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
'aria-label'
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
'spectrum-BarLoader--small': size === 'S',
|
|
74
|
-
'spectrum-BarLoader--large': size === 'L',
|
|
75
|
-
'spectrum-BarLoader--indeterminate': isIndeterminate,
|
|
76
|
-
'spectrum-BarLoader--sideLabel': labelPosition === 'side'
|
|
77
|
-
}, barClassName, styleProps.className)
|
|
78
|
-
}), label && /*#__PURE__*/_react.createElement("span", _babelRuntimeHelpersEsmExtends({}, labelProps, {
|
|
79
|
-
className: classNames($eae5301468e7259fd99d852e67771$$interop$default, 'spectrum-BarLoader-label')
|
|
80
|
-
}), label), showValueLabel && /*#__PURE__*/_react.createElement("div", {
|
|
81
|
-
className: classNames($eae5301468e7259fd99d852e67771$$interop$default, 'spectrum-BarLoader-percentage')
|
|
82
|
-
}, barProps['aria-valuetext']), /*#__PURE__*/_react.createElement("div", {
|
|
83
|
-
className: classNames($eae5301468e7259fd99d852e67771$$interop$default, 'spectrum-BarLoader-track')
|
|
84
|
-
}, /*#__PURE__*/_react.createElement("div", {
|
|
85
|
-
className: classNames($eae5301468e7259fd99d852e67771$$interop$default, 'spectrum-BarLoader-fill'),
|
|
86
|
-
style: barStyle
|
|
87
|
-
})));
|
|
70
|
+
function $287d3431be7af3d0$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 = $byFKM$useDOMRef(ref);
|
|
73
|
+
let { styleProps: styleProps } = $byFKM$useStyleProps(otherProps);
|
|
74
|
+
value = $byFKM$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__*/ $byFKM$react.createElement("div", {
|
|
86
|
+
...barProps,
|
|
87
|
+
ref: domRef,
|
|
88
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($0cd8e49fa97e4664$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__*/ $byFKM$react.createElement("span", {
|
|
99
|
+
...labelProps,
|
|
100
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($0cd8e49fa97e4664$exports)), 'spectrum-BarLoader-label')
|
|
101
|
+
}, label), showValueLabel && /*#__PURE__*/ $byFKM$react.createElement("div", {
|
|
102
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($0cd8e49fa97e4664$exports)), 'spectrum-BarLoader-percentage')
|
|
103
|
+
}, barProps['aria-valuetext']), /*#__PURE__*/ $byFKM$react.createElement("div", {
|
|
104
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($0cd8e49fa97e4664$exports)), 'spectrum-BarLoader-track')
|
|
105
|
+
}, /*#__PURE__*/ $byFKM$react.createElement("div", {
|
|
106
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($0cd8e49fa97e4664$exports)), 'spectrum-BarLoader-fill'),
|
|
107
|
+
style: barStyle
|
|
108
|
+
}))));
|
|
88
109
|
}
|
|
110
|
+
let $287d3431be7af3d0$export$7c6ed87244065f3a = /*#__PURE__*/ $byFKM$react.forwardRef($287d3431be7af3d0$var$ProgressBarBase);
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
89
115
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return /*#__PURE__*/_react.createElement(ProgressBarBase, _babelRuntimeHelpersEsmExtends({}, otherProps, {
|
|
103
|
-
ref: ref,
|
|
104
|
-
barProps: progressBarProps,
|
|
105
|
-
labelProps: labelProps,
|
|
106
|
-
barClassName: classNames($eae5301468e7259fd99d852e67771$$interop$default, {
|
|
107
|
-
'spectrum-BarLoader--overBackground': variant === 'overBackground'
|
|
108
|
-
})
|
|
109
|
-
}));
|
|
116
|
+
function $3e2fc00d5e01478b$var$ProgressBar(props, ref) {
|
|
117
|
+
let { variant: variant , ...otherProps } = props;
|
|
118
|
+
const { progressBarProps: progressBarProps , labelProps: labelProps } = $byFKM$useProgressBar(props);
|
|
119
|
+
return(/*#__PURE__*/ $byFKM$react.createElement($287d3431be7af3d0$export$7c6ed87244065f3a, {
|
|
120
|
+
...otherProps,
|
|
121
|
+
ref: ref,
|
|
122
|
+
barProps: progressBarProps,
|
|
123
|
+
labelProps: labelProps,
|
|
124
|
+
barClassName: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($0cd8e49fa97e4664$exports)), {
|
|
125
|
+
'spectrum-BarLoader--overBackground': variant === 'overBackground'
|
|
126
|
+
})
|
|
127
|
+
}));
|
|
110
128
|
}
|
|
111
129
|
/**
|
|
112
130
|
* ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.
|
|
113
131
|
* They can represent either determinate or indeterminate progress.
|
|
114
|
-
*/
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
132
|
+
*/ let $3e2fc00d5e01478b$export$c17561cb55d4db30 = /*#__PURE__*/ $byFKM$react.forwardRef($3e2fc00d5e01478b$var$ProgressBar);
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
var $9890faa22af21f4f$exports = {};
|
|
136
|
+
|
|
137
|
+
$parcel$export($9890faa22af21f4f$exports, "ProgressCircle", () => $9890faa22af21f4f$export$c79b9d6b4cc92af7);
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
var $5e9896e6052c3bbb$exports = {};
|
|
142
|
+
|
|
143
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader--indeterminate-fill-submask-2", () => $5e9896e6052c3bbb$export$f7083dbeadcbb2bd, (v) => $5e9896e6052c3bbb$export$f7083dbeadcbb2bd = v);
|
|
144
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-fill-mask-2", () => $5e9896e6052c3bbb$export$7219832bea80eb54, (v) => $5e9896e6052c3bbb$export$7219832bea80eb54 = v);
|
|
145
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader", () => $5e9896e6052c3bbb$export$9633d311d6d6830b, (v) => $5e9896e6052c3bbb$export$9633d311d6d6830b = v);
|
|
146
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader-track", () => $5e9896e6052c3bbb$export$278efdb85ed802da, (v) => $5e9896e6052c3bbb$export$278efdb85ed802da = v);
|
|
147
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader-fills", () => $5e9896e6052c3bbb$export$3038f4c0c86f539b, (v) => $5e9896e6052c3bbb$export$3038f4c0c86f539b = v);
|
|
148
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader-fill", () => $5e9896e6052c3bbb$export$58fb9ac68cf8e784, (v) => $5e9896e6052c3bbb$export$58fb9ac68cf8e784 = v);
|
|
149
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader-fillMask1", () => $5e9896e6052c3bbb$export$b676cd958401a736, (v) => $5e9896e6052c3bbb$export$b676cd958401a736 = v);
|
|
150
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader-fillMask2", () => $5e9896e6052c3bbb$export$8c428f4f13e424b, (v) => $5e9896e6052c3bbb$export$8c428f4f13e424b = v);
|
|
151
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader-fillSubMask1", () => $5e9896e6052c3bbb$export$98ba5ef650aeb8ca, (v) => $5e9896e6052c3bbb$export$98ba5ef650aeb8ca = v);
|
|
152
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader-fillSubMask2", () => $5e9896e6052c3bbb$export$dc70b48c897b0f1a, (v) => $5e9896e6052c3bbb$export$dc70b48c897b0f1a = v);
|
|
153
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader--small", () => $5e9896e6052c3bbb$export$79819ab9844dbe9b, (v) => $5e9896e6052c3bbb$export$79819ab9844dbe9b = v);
|
|
154
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader--large", () => $5e9896e6052c3bbb$export$c8c34e5e37bf511c, (v) => $5e9896e6052c3bbb$export$c8c34e5e37bf511c = v);
|
|
155
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader--indeterminate", () => $5e9896e6052c3bbb$export$79b7e5abeef5134f, (v) => $5e9896e6052c3bbb$export$79b7e5abeef5134f = v);
|
|
156
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-fills-rotate", () => $5e9896e6052c3bbb$export$3663cbdb240663ec, (v) => $5e9896e6052c3bbb$export$3663cbdb240663ec = v);
|
|
157
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-fill-mask-1", () => $5e9896e6052c3bbb$export$524c81e63e1d64f5, (v) => $5e9896e6052c3bbb$export$524c81e63e1d64f5 = v);
|
|
158
|
+
$parcel$export($5e9896e6052c3bbb$exports, "spectrum-CircleLoader--overBackground", () => $5e9896e6052c3bbb$export$6668708cb539f403, (v) => $5e9896e6052c3bbb$export$6668708cb539f403 = v);
|
|
159
|
+
var $5e9896e6052c3bbb$export$f7083dbeadcbb2bd;
|
|
160
|
+
var $5e9896e6052c3bbb$export$7219832bea80eb54;
|
|
161
|
+
var $5e9896e6052c3bbb$export$9633d311d6d6830b;
|
|
162
|
+
var $5e9896e6052c3bbb$export$278efdb85ed802da;
|
|
163
|
+
var $5e9896e6052c3bbb$export$3038f4c0c86f539b;
|
|
164
|
+
var $5e9896e6052c3bbb$export$58fb9ac68cf8e784;
|
|
165
|
+
var $5e9896e6052c3bbb$export$b676cd958401a736;
|
|
166
|
+
var $5e9896e6052c3bbb$export$8c428f4f13e424b;
|
|
167
|
+
var $5e9896e6052c3bbb$export$98ba5ef650aeb8ca;
|
|
168
|
+
var $5e9896e6052c3bbb$export$dc70b48c897b0f1a;
|
|
169
|
+
var $5e9896e6052c3bbb$export$79819ab9844dbe9b;
|
|
170
|
+
var $5e9896e6052c3bbb$export$c8c34e5e37bf511c;
|
|
171
|
+
var $5e9896e6052c3bbb$export$79b7e5abeef5134f;
|
|
172
|
+
var $5e9896e6052c3bbb$export$3663cbdb240663ec;
|
|
173
|
+
var $5e9896e6052c3bbb$export$524c81e63e1d64f5;
|
|
174
|
+
var $5e9896e6052c3bbb$export$6668708cb539f403;
|
|
175
|
+
$5e9896e6052c3bbb$export$f7083dbeadcbb2bd = "spectrum-CircleLoader--indeterminate-fill-submask-2_7c1153";
|
|
176
|
+
$5e9896e6052c3bbb$export$7219832bea80eb54 = "spectrum-fill-mask-2_7c1153";
|
|
177
|
+
$5e9896e6052c3bbb$export$9633d311d6d6830b = "spectrum-CircleLoader_7c1153";
|
|
178
|
+
$5e9896e6052c3bbb$export$278efdb85ed802da = "spectrum-CircleLoader-track_7c1153";
|
|
179
|
+
$5e9896e6052c3bbb$export$3038f4c0c86f539b = "spectrum-CircleLoader-fills_7c1153";
|
|
180
|
+
$5e9896e6052c3bbb$export$58fb9ac68cf8e784 = "spectrum-CircleLoader-fill_7c1153";
|
|
181
|
+
$5e9896e6052c3bbb$export$b676cd958401a736 = "spectrum-CircleLoader-fillMask1_7c1153";
|
|
182
|
+
$5e9896e6052c3bbb$export$8c428f4f13e424b = "spectrum-CircleLoader-fillMask2_7c1153";
|
|
183
|
+
$5e9896e6052c3bbb$export$98ba5ef650aeb8ca = "spectrum-CircleLoader-fillSubMask1_7c1153";
|
|
184
|
+
$5e9896e6052c3bbb$export$dc70b48c897b0f1a = "spectrum-CircleLoader-fillSubMask2_7c1153";
|
|
185
|
+
$5e9896e6052c3bbb$export$79819ab9844dbe9b = "spectrum-CircleLoader--small_7c1153";
|
|
186
|
+
$5e9896e6052c3bbb$export$c8c34e5e37bf511c = "spectrum-CircleLoader--large_7c1153";
|
|
187
|
+
$5e9896e6052c3bbb$export$79b7e5abeef5134f = "spectrum-CircleLoader--indeterminate_7c1153";
|
|
188
|
+
$5e9896e6052c3bbb$export$3663cbdb240663ec = "spectrum-fills-rotate_7c1153";
|
|
189
|
+
$5e9896e6052c3bbb$export$524c81e63e1d64f5 = "spectrum-fill-mask-1_7c1153";
|
|
190
|
+
$5e9896e6052c3bbb$export$6668708cb539f403 = "spectrum-CircleLoader--overBackground_7c1153";
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
function $9890faa22af21f4f$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 = $byFKM$useDOMRef(ref);
|
|
197
|
+
let { styleProps: styleProps } = $byFKM$useStyleProps(otherProps);
|
|
198
|
+
value = $byFKM$clamp(value, minValue, maxValue);
|
|
199
|
+
let { progressBarProps: progressBarProps } = $byFKM$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
|
+
}
|
|
178
219
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
})))));
|
|
220
|
+
if (!ariaLabel && !ariaLabelledby) console.warn('ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility');
|
|
221
|
+
return(/*#__PURE__*/ $byFKM$react.createElement("div", {
|
|
222
|
+
...styleProps,
|
|
223
|
+
...progressBarProps,
|
|
224
|
+
ref: domRef,
|
|
225
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($5e9896e6052c3bbb$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__*/ $byFKM$react.createElement("div", {
|
|
232
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($5e9896e6052c3bbb$exports)), 'spectrum-CircleLoader-track')
|
|
233
|
+
}), /*#__PURE__*/ $byFKM$react.createElement("div", {
|
|
234
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($5e9896e6052c3bbb$exports)), 'spectrum-CircleLoader-fills')
|
|
235
|
+
}, /*#__PURE__*/ $byFKM$react.createElement("div", {
|
|
236
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($5e9896e6052c3bbb$exports)), 'spectrum-CircleLoader-fillMask1')
|
|
237
|
+
}, /*#__PURE__*/ $byFKM$react.createElement("div", {
|
|
238
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($5e9896e6052c3bbb$exports)), 'spectrum-CircleLoader-fillSubMask1'),
|
|
239
|
+
"data-testid": "fillSubMask1",
|
|
240
|
+
style: subMask1Style
|
|
241
|
+
}, /*#__PURE__*/ $byFKM$react.createElement("div", {
|
|
242
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($5e9896e6052c3bbb$exports)), 'spectrum-CircleLoader-fill')
|
|
243
|
+
}))), /*#__PURE__*/ $byFKM$react.createElement("div", {
|
|
244
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($5e9896e6052c3bbb$exports)), 'spectrum-CircleLoader-fillMask2')
|
|
245
|
+
}, /*#__PURE__*/ $byFKM$react.createElement("div", {
|
|
246
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($5e9896e6052c3bbb$exports)), 'spectrum-CircleLoader-fillSubMask2'),
|
|
247
|
+
"data-testid": "fillSubMask2",
|
|
248
|
+
style: subMask2Style
|
|
249
|
+
}, /*#__PURE__*/ $byFKM$react.createElement("div", {
|
|
250
|
+
className: $byFKM$classNames((/*@__PURE__*/$parcel$interopDefault($5e9896e6052c3bbb$exports)), 'spectrum-CircleLoader-fill')
|
|
251
|
+
}))))));
|
|
212
252
|
}
|
|
213
253
|
/**
|
|
214
254
|
* ProgressCircles show the progression of a system operation such as downloading, uploading, processing, etc. in a visual way.
|
|
215
255
|
* They can represent determinate or indeterminate progress.
|
|
216
|
-
*/
|
|
256
|
+
*/ let $9890faa22af21f4f$export$c79b9d6b4cc92af7 = /*#__PURE__*/ $byFKM$react.forwardRef($9890faa22af21f4f$var$ProgressCircle);
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
217
260
|
|
|
218
261
|
|
|
219
|
-
export
|
|
262
|
+
export {$3e2fc00d5e01478b$export$c17561cb55d4db30 as ProgressBar, $9890faa22af21f4f$export$c79b9d6b4cc92af7 as ProgressCircle, $287d3431be7af3d0$export$7c6ed87244065f3a as ProgressBarBase};
|
|
220
263
|
//# sourceMappingURL=module.js.map
|