@react-spectrum/progress 3.3.3 → 3.3.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.css +1 -1
- package/dist/main.js +107 -69
- package/dist/main.js.map +1 -1
- package/dist/module.js +107 -69
- package/dist/module.js.map +1 -1
- package/package.json +7 -7
package/dist/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.spectrum-BarLoader_48541f{min-width:var(--spectrum-global-dimension-static-size-600,48px);width:var(--spectrum-barloader-large-width,var(--spectrum-global-dimension-size-2400));vertical-align:top;isolation:isolate;flex-flow:wrap;justify-content:space-between;align-items:center;display:inline-flex;position:relative}.spectrum-BarLoader_48541f.spectrum-BarLoader--indeterminate_48541f{max-width:var(--spectrum-barloader-large-width,var(--spectrum-global-dimension-size-2400))}.spectrum-BarLoader_48541f.spectrum-BarLoader--indeterminate_48541f.spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-track_48541f{max-width:var(--spectrum-barloader-large-width,var(--spectrum-global-dimension-size-2400));width:100%}.spectrum-BarLoader-track_48541f{min-width:var(--spectrum-global-dimension-static-size-600,48px);width:100%;height:var(--spectrum-barloader-large-height,var(--spectrum-global-dimension-size-75));border-radius:var(--spectrum-barloader-large-border-radius);z-index:1;overflow:hidden}.spectrum-BarLoader-fill_48541f{height:var(--spectrum-barloader-large-height,var(--spectrum-global-dimension-size-75));border:0;transition:width 1s}[dir=ltr] .spectrum-BarLoader-label_48541f,[dir=ltr] .spectrum-BarLoader-percentage_48541f{text-align:left}[dir=rtl] .spectrum-BarLoader-label_48541f,[dir=rtl] .spectrum-BarLoader-percentage_48541f{text-align:right}.spectrum-BarLoader-label_48541f,.spectrum-BarLoader-percentage_48541f{font-size:var(--spectrum-fieldlabel-text-size,var(--spectrum-global-dimension-font-size-75));font-weight:var(--spectrum-fieldlabel-text-font-weight,var(--spectrum-global-font-weight-regular));line-height:var(--spectrum-fieldlabel-text-line-height,var(--spectrum-global-font-line-height-small));margin-bottom:var(--spectrum-barloader-large-label-gap-y,var(--spectrum-global-dimension-size-115))}.spectrum-BarLoader-label_48541f{flex:1}[dir=ltr] .spectrum-BarLoader-percentage_48541f{margin-left:var(--spectrum-barloader-small-label-gap-x,var(--spectrum-global-dimension-size-150))}[dir=rtl] .spectrum-BarLoader-percentage_48541f{margin-right:var(--spectrum-barloader-small-label-gap-x,var(--spectrum-global-dimension-size-150))}.spectrum-BarLoader-percentage_48541f{align-self:flex-start}.spectrum-BarLoader--sideLabel_48541f{min-width:fit-content;flex-flow:row;justify-content:space-between;display:inline-flex}.spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-track_48541f{width:inherit}[dir=ltr] .spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-label_48541f{margin-right:var(--spectrum-barloader-large-label-gap-x,var(--spectrum-global-dimension-size-150))}[dir=rtl] .spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-label_48541f{margin-left:var(--spectrum-barloader-large-label-gap-x,var(--spectrum-global-dimension-size-150))}.spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-label_48541f{margin-bottom:0}[dir=ltr] .spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-percentage_48541f{text-align:right}[dir=rtl] .spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-percentage_48541f{text-align:left}[dir=ltr] .spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-percentage_48541f{margin-left:var(--spectrum-barloader-large-label-gap-x,var(--spectrum-global-dimension-size-150))}[dir=rtl] .spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-percentage_48541f{margin-right:var(--spectrum-barloader-large-label-gap-x,var(--spectrum-global-dimension-size-150))}.spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-percentage_48541f{order:3;margin-bottom:0}.spectrum-BarLoader--small_48541f{min-width:var(--spectrum-global-dimension-static-size-600,48px)}.spectrum-BarLoader--small_48541f .spectrum-BarLoader-fill_48541f{height:var(--spectrum-barloader-small-height,var(--spectrum-global-dimension-size-50))}.spectrum-BarLoader--small_48541f .spectrum-BarLoader-track_48541f{height:var(--spectrum-barloader-small-height,var(--spectrum-global-dimension-size-50));border-radius:var(--spectrum-barloader-small-border-radius)}.spectrum-BarLoader--indeterminate_48541f .spectrum-BarLoader-fill_48541f{width:var(--spectrum-barloader-large-indeterminate-fill-width,var(--spectrum-global-dimension-size-1700));animation-timing-function:var(--spectrum-barloader-large-indeterminate-animation-ease,var(--spectrum-global-animation-ease-in-out));will-change:transform;position:relative}[dir=ltr] .spectrum-BarLoader--indeterminate_48541f .spectrum-BarLoader-fill_48541f{animation:indeterminate-loop-ltr_48541f var(--spectrum-barloader-large-indeterminate-duration,var(--spectrum-global-animation-duration-2000))infinite}[dir=rtl] .spectrum-BarLoader--indeterminate_48541f .spectrum-BarLoader-fill_48541f{animation:indeterminate-loop-rtl_48541f var(--spectrum-barloader-large-indeterminate-duration,var(--spectrum-global-animation-duration-2000))infinite}@keyframes indeterminate-loop-ltr_48541f{0%{transform:translate(calc(var(--spectrum-barloader-large-indeterminate-fill-width,var(--spectrum-global-dimension-size-1700))*-1))}to{transform:translate(var(--spectrum-barloader-large-width,var(--spectrum-global-dimension-size-2400)))}}@keyframes indeterminate-loop-rtl_48541f{0%{transform:translate(var(--spectrum-barloader-large-width,var(--spectrum-global-dimension-size-2400)))}to{transform:translate(calc(var(--spectrum-barloader-large-width,var(--spectrum-global-dimension-size-2400))*-1))}}.spectrum-BarLoader_48541f .spectrum-BarLoader-fill_48541f{background:var(--spectrum-accent-color-900)}.spectrum-BarLoader_48541f .spectrum-BarLoader-track_48541f{background-color:var(--spectrum-barloader-large-track-color,var(--spectrum-alias-track-color-default))}.spectrum-BarLoader_48541f.spectrum-BarLoader--overBackground_48541f .spectrum-BarLoader-fill_48541f{background:var(--spectrum-barloader-large-over-background-track-fill-color,var(--spectrum-global-color-static-white))}.spectrum-BarLoader_48541f.spectrum-BarLoader--overBackground_48541f .spectrum-BarLoader-label_48541f,.spectrum-BarLoader_48541f.spectrum-BarLoader--overBackground_48541f .spectrum-BarLoader-percentage_48541f{color:var(--spectrum-barloader-large-over-background-track-fill-color,var(--spectrum-global-color-static-white))}.spectrum-BarLoader_48541f.spectrum-BarLoader--overBackground_48541f .spectrum-BarLoader-track_48541f{background-color:var(--spectrum-barloader-large-over-background-track-color,var(--spectrum-alias-track-color-over-background))}.spectrum-BarLoader_48541f.is-positive_48541f .spectrum-BarLoader-fill_48541f{background:var(--spectrum-meter-large-track-color-positive,var(--spectrum-semantic-positive-color-status))}.spectrum-BarLoader_48541f.is-warning_48541f .spectrum-BarLoader-fill_48541f{background:var(--spectrum-meter-large-track-color-warning,var(--spectrum-semantic-notice-color-status))}.spectrum-BarLoader_48541f.is-critical_48541f .spectrum-BarLoader-fill_48541f{background:var(--spectrum-meter-large-track-color-critical,var(--spectrum-semantic-negative-color-status))}.spectrum-BarLoader-label_48541f,.spectrum-BarLoader-percentage_48541f{color:var(--spectrum-fieldlabel-text-color,var(--spectrum-alias-label-text-color));color:var(--spectrum-fieldlabel-text-color,var(--spectrum-alias-label-text-color));color:var(--spectrum-fieldlabel-text-color,var(--spectrum-alias-label-text-color))}@media (forced-colors:active){.spectrum-BarLoader-track_48541f{forced-color-adjust:none;--spectrum-barloader-large-track-fill-color:ButtonText;--spectrum-barloader-large-track-color:ButtonFace;border:1px solid ButtonText}}.spectrum-CircleLoader--indeterminate-fill-submask-2_7c1153{animation:spectrum-fill-mask-2_7c1153 1s linear infinite}@keyframes spectrum-fill-mask-1_7c1153{0%{transform:rotate(90deg)}1.69%{transform:rotate(72.3deg)}3.39%{transform:rotate(55.5deg)}5.08%{transform:rotate(40.3deg)}6.78%{transform:rotate(25deg)}8.47%{transform:rotate(10.6deg)}10.17%{transform:rotate(0deg)}11.86%{transform:rotate(0deg)}13.56%{transform:rotate(0deg)}15.25%{transform:rotate(0deg)}16.95%{transform:rotate(0deg)}18.64%{transform:rotate(0deg)}20.34%{transform:rotate(0deg)}22.03%{transform:rotate(0deg)}23.73%{transform:rotate(0deg)}25.42%{transform:rotate(0deg)}27.12%{transform:rotate(0deg)}28.81%{transform:rotate(0deg)}30.51%{transform:rotate(0deg)}32.2%{transform:rotate(0deg)}33.9%{transform:rotate(0deg)}35.59%{transform:rotate(0deg)}37.29%{transform:rotate(0deg)}38.98%{transform:rotate(0deg)}40.68%{transform:rotate(0deg)}42.37%{transform:rotate(5.3deg)}44.07%{transform:rotate(13.4deg)}45.76%{transform:rotate(20.6deg)}47.46%{transform:rotate(29deg)}49.15%{transform:rotate(36.5deg)}50.85%{transform:rotate(42.6deg)}52.54%{transform:rotate(48.8deg)}54.24%{transform:rotate(54.2deg)}55.93%{transform:rotate(59.4deg)}57.63%{transform:rotate(63.2deg)}59.32%{transform:rotate(67.2deg)}61.02%{transform:rotate(70.8deg)}62.71%{transform:rotate(73.8deg)}64.41%{transform:rotate(76.2deg)}66.1%{transform:rotate(78.7deg)}67.8%{transform:rotate(80.6deg)}69.49%{transform:rotate(82.6deg)}71.19%{transform:rotate(83.7deg)}72.88%{transform:rotate(85deg)}74.58%{transform:rotate(86.3deg)}76.27%{transform:rotate(87deg)}77.97%{transform:rotate(87.7deg)}79.66%{transform:rotate(88.3deg)}81.36%{transform:rotate(88.6deg)}83.05%{transform:rotate(89.2deg)}84.75%{transform:rotate(89.2deg)}86.44%{transform:rotate(89.5deg)}88.14%{transform:rotate(89.9deg)}89.83%{transform:rotate(89.7deg)}91.53%{transform:rotate(90.1deg)}93.22%{transform:rotate(90.2deg)}94.92%{transform:rotate(90.1deg)}96.61%{transform:rotate(90deg)}98.31%{transform:rotate(89.8deg)}to{transform:rotate(90deg)}}@keyframes spectrum-fill-mask-2_7c1153{0%{transform:rotate(180deg)}1.69%{transform:rotate(180deg)}3.39%{transform:rotate(180deg)}5.08%{transform:rotate(180deg)}6.78%{transform:rotate(180deg)}8.47%{transform:rotate(180deg)}10.17%{transform:rotate(179.2deg)}11.86%{transform:rotate(164deg)}13.56%{transform:rotate(151.8deg)}15.25%{transform:rotate(140.8deg)}16.95%{transform:rotate(130.3deg)}18.64%{transform:rotate(120.4deg)}20.34%{transform:rotate(110.8deg)}22.03%{transform:rotate(101.6deg)}23.73%{transform:rotate(93.5deg)}25.42%{transform:rotate(85.4deg)}27.12%{transform:rotate(78.1deg)}28.81%{transform:rotate(71.2deg)}30.51%{transform:rotate(89.1deg)}32.2%{transform:rotate(105.5deg)}33.9%{transform:rotate(121.3deg)}35.59%{transform:rotate(135.5deg)}37.29%{transform:rotate(148.4deg)}38.98%{transform:rotate(161deg)}40.68%{transform:rotate(173.5deg)}42.37%{transform:rotate(180deg)}44.07%{transform:rotate(180deg)}45.76%{transform:rotate(180deg)}47.46%{transform:rotate(180deg)}49.15%{transform:rotate(180deg)}50.85%{transform:rotate(180deg)}52.54%{transform:rotate(180deg)}54.24%{transform:rotate(180deg)}55.93%{transform:rotate(180deg)}57.63%{transform:rotate(180deg)}59.32%{transform:rotate(180deg)}61.02%{transform:rotate(180deg)}62.71%{transform:rotate(180deg)}64.41%{transform:rotate(180deg)}66.1%{transform:rotate(180deg)}67.8%{transform:rotate(180deg)}69.49%{transform:rotate(180deg)}71.19%{transform:rotate(180deg)}72.88%{transform:rotate(180deg)}74.58%{transform:rotate(180deg)}76.27%{transform:rotate(180deg)}77.97%{transform:rotate(180deg)}79.66%{transform:rotate(180deg)}81.36%{transform:rotate(180deg)}83.05%{transform:rotate(180deg)}84.75%{transform:rotate(180deg)}86.44%{transform:rotate(180deg)}88.14%{transform:rotate(180deg)}89.83%{transform:rotate(180deg)}91.53%{transform:rotate(180deg)}93.22%{transform:rotate(180deg)}94.92%{transform:rotate(180deg)}96.61%{transform:rotate(180deg)}98.31%{transform:rotate(180deg)}to{transform:rotate(180deg)}}@keyframes spectrum-fills-rotate_7c1153{0%{transform:rotate(-90deg)}to{transform:rotate(270deg)}}.spectrum-CircleLoader_7c1153{width:var(--spectrum-loader-circle-medium-width,var(--spectrum-global-dimension-static-size-400));height:var(--spectrum-loader-circle-medium-height,var(--spectrum-global-dimension-static-size-400));direction:ltr;display:inline-block;position:relative}.spectrum-CircleLoader-track_7c1153{box-sizing:border-box;width:var(--spectrum-loader-circle-medium-width,var(--spectrum-global-dimension-static-size-400));height:var(--spectrum-loader-circle-medium-height,var(--spectrum-global-dimension-static-size-400));border-style:solid;border-width:var(--spectrum-loader-circle-medium-border-size);border-radius:var(--spectrum-loader-circle-medium-width,var(--spectrum-global-dimension-static-size-400))}.spectrum-CircleLoader-fills_7c1153{width:100%;height:100%;position:absolute;top:0;left:0}.spectrum-CircleLoader-fill_7c1153{box-sizing:border-box;width:var(--spectrum-loader-circle-medium-width,var(--spectrum-global-dimension-static-size-400));height:var(--spectrum-loader-circle-medium-height,var(--spectrum-global-dimension-static-size-400));border-style:solid;border-width:var(--spectrum-loader-circle-medium-border-size);border-radius:var(--spectrum-loader-circle-medium-width,var(--spectrum-global-dimension-static-size-400))}.spectrum-CircleLoader-fillMask1_7c1153,.spectrum-CircleLoader-fillMask2_7c1153{width:50%;height:100%;transform-origin:100%;position:absolute;overflow:hidden;transform:rotate(180deg)}.spectrum-CircleLoader-fillSubMask1_7c1153,.spectrum-CircleLoader-fillSubMask2_7c1153{width:100%;height:100%;transform-origin:100%;overflow:hidden;transform:rotate(180deg)}.spectrum-CircleLoader-fillMask2_7c1153{transform:rotate(0deg)}.spectrum-CircleLoader--small_7c1153{width:var(--spectrum-loader-circle-small-width,var(--spectrum-global-dimension-static-size-200));height:var(--spectrum-loader-circle-small-height,var(--spectrum-global-dimension-static-size-200))}.spectrum-CircleLoader--small_7c1153 .spectrum-CircleLoader-track_7c1153,.spectrum-CircleLoader--small_7c1153 .spectrum-CircleLoader-fill_7c1153{width:var(--spectrum-loader-circle-small-width,var(--spectrum-global-dimension-static-size-200));height:var(--spectrum-loader-circle-small-height,var(--spectrum-global-dimension-static-size-200));border-style:solid;border-width:var(--spectrum-loader-circle-small-border-size);border-radius:var(--spectrum-loader-circle-small-width,var(--spectrum-global-dimension-static-size-200))}.spectrum-CircleLoader--large_7c1153{width:var(--spectrum-loader-circle-large-width,var(--spectrum-global-dimension-size-800));height:var(--spectrum-loader-circle-large-height,var(--spectrum-global-dimension-size-800))}.spectrum-CircleLoader--large_7c1153 .spectrum-CircleLoader-track_7c1153,.spectrum-CircleLoader--large_7c1153 .spectrum-CircleLoader-fill_7c1153{width:var(--spectrum-loader-circle-large-width,var(--spectrum-global-dimension-size-800));height:var(--spectrum-loader-circle-large-height,var(--spectrum-global-dimension-size-800));border-style:solid;border-width:var(--spectrum-loader-circle-large-border-size,var(--spectrum-global-dimension-size-50));border-radius:var(--spectrum-loader-circle-large-width,var(--spectrum-global-dimension-size-800))}.spectrum-CircleLoader--indeterminate_7c1153 .spectrum-CircleLoader-fills_7c1153{will-change:transform;transform-origin:50%;animation:spectrum-fills-rotate_7c1153 1s cubic-bezier(.25,.78,.48,.89) infinite;transform:translateZ(0)}.spectrum-CircleLoader--indeterminate_7c1153 .spectrum-CircleLoader-fillSubMask1_7c1153{will-change:transform;animation:spectrum-fill-mask-1_7c1153 1s linear infinite;transform:translateZ(0)}.spectrum-CircleLoader--indeterminate_7c1153 .spectrum-CircleLoader-fillSubMask2_7c1153{will-change:transform;animation:spectrum-fill-mask-2_7c1153 1s linear infinite;transform:translateZ(0)}.spectrum-CircleLoader-track_7c1153{border-color:var(--spectrum-loader-circle-medium-track-color,var(--spectrum-alias-track-color-default))}.spectrum-CircleLoader-fill_7c1153{border-color:var(--spectrum-accent-color-900)}.spectrum-CircleLoader--overBackground_7c1153 .spectrum-CircleLoader-track_7c1153{border-color:var(--spectrum-loader-circle-medium-over-background-track-color,var(--spectrum-alias-track-color-over-background))}.spectrum-CircleLoader--overBackground_7c1153 .spectrum-CircleLoader-fill_7c1153{border-color:var(--spectrum-loader-circle-medium-over-background-track-fill-color,var(--spectrum-global-color-static-white))}.spectrum-CircleLoader--indeterminate_7c1153.spectrum-CircleLoader--overBackground_7c1153 .spectrum-CircleLoader-track_7c1153{border-color:var(--spectrum-loader-circle-medium-over-background-track-color,var(--spectrum-alias-track-color-over-background))}.spectrum-CircleLoader--indeterminate_7c1153.spectrum-CircleLoader--overBackground_7c1153 .spectrum-CircleLoader-fill_7c1153{border-color:var(--spectrum-loader-circle-medium-over-background-track-fill-color,var(--spectrum-global-color-static-white))}@media (forced-colors:active){.spectrum-CircleLoader-fill_7c1153{--spectrum-loader-circle-medium-track-fill-color:Highlight}}
|
|
1
|
+
.spectrum-BarLoader_48541f{min-width:var(--spectrum-global-dimension-static-size-600,48px);width:var(--spectrum-barloader-large-width,var(--spectrum-global-dimension-size-2400));vertical-align:top;isolation:isolate;flex-flow:wrap;justify-content:space-between;align-items:center;display:inline-flex;position:relative}.spectrum-BarLoader_48541f.spectrum-BarLoader--indeterminate_48541f{max-width:var(--spectrum-barloader-large-width,var(--spectrum-global-dimension-size-2400))}.spectrum-BarLoader_48541f.spectrum-BarLoader--indeterminate_48541f.spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-track_48541f{max-width:var(--spectrum-barloader-large-width,var(--spectrum-global-dimension-size-2400));width:100%}.spectrum-BarLoader-track_48541f{min-width:var(--spectrum-global-dimension-static-size-600,48px);width:100%;height:var(--spectrum-barloader-large-height,var(--spectrum-global-dimension-size-75));border-radius:var(--spectrum-barloader-large-border-radius);z-index:1;overflow:hidden}.spectrum-BarLoader-fill_48541f{height:var(--spectrum-barloader-large-height,var(--spectrum-global-dimension-size-75));border:none;transition:width 1s}[dir=ltr] .spectrum-BarLoader-label_48541f,[dir=ltr] .spectrum-BarLoader-percentage_48541f{text-align:left}[dir=rtl] .spectrum-BarLoader-label_48541f,[dir=rtl] .spectrum-BarLoader-percentage_48541f{text-align:right}.spectrum-BarLoader-label_48541f,.spectrum-BarLoader-percentage_48541f{font-size:var(--spectrum-fieldlabel-text-size,var(--spectrum-global-dimension-font-size-75));font-weight:var(--spectrum-fieldlabel-text-font-weight,var(--spectrum-global-font-weight-regular));line-height:var(--spectrum-fieldlabel-text-line-height,var(--spectrum-global-font-line-height-small));margin-bottom:var(--spectrum-barloader-large-label-gap-y,var(--spectrum-global-dimension-size-115))}.spectrum-BarLoader-label_48541f{flex:1}[dir=ltr] .spectrum-BarLoader-percentage_48541f{margin-left:var(--spectrum-barloader-small-label-gap-x,var(--spectrum-global-dimension-size-150))}[dir=rtl] .spectrum-BarLoader-percentage_48541f{margin-right:var(--spectrum-barloader-small-label-gap-x,var(--spectrum-global-dimension-size-150))}.spectrum-BarLoader-percentage_48541f{align-self:flex-start}.spectrum-BarLoader--sideLabel_48541f{min-width:-moz-fit-content;min-width:-moz-fit-content;min-width:fit-content;flex-flow:row;justify-content:space-between;display:inline-flex}.spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-track_48541f{width:inherit}[dir=ltr] .spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-label_48541f{margin-right:var(--spectrum-barloader-large-label-gap-x,var(--spectrum-global-dimension-size-150))}[dir=rtl] .spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-label_48541f{margin-left:var(--spectrum-barloader-large-label-gap-x,var(--spectrum-global-dimension-size-150))}.spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-label_48541f{margin-bottom:0}[dir=ltr] .spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-percentage_48541f{text-align:right}[dir=rtl] .spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-percentage_48541f{text-align:left}[dir=ltr] .spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-percentage_48541f{margin-left:var(--spectrum-barloader-large-label-gap-x,var(--spectrum-global-dimension-size-150))}[dir=rtl] .spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-percentage_48541f{margin-right:var(--spectrum-barloader-large-label-gap-x,var(--spectrum-global-dimension-size-150))}.spectrum-BarLoader--sideLabel_48541f .spectrum-BarLoader-percentage_48541f{order:3;margin-bottom:0}.spectrum-BarLoader--small_48541f{min-width:var(--spectrum-global-dimension-static-size-600,48px)}.spectrum-BarLoader--small_48541f .spectrum-BarLoader-fill_48541f{height:var(--spectrum-barloader-small-height,var(--spectrum-global-dimension-size-50))}.spectrum-BarLoader--small_48541f .spectrum-BarLoader-track_48541f{height:var(--spectrum-barloader-small-height,var(--spectrum-global-dimension-size-50));border-radius:var(--spectrum-barloader-small-border-radius)}.spectrum-BarLoader--indeterminate_48541f .spectrum-BarLoader-fill_48541f{width:var(--spectrum-barloader-large-indeterminate-fill-width,var(--spectrum-global-dimension-size-1700));animation-timing-function:var(--spectrum-barloader-large-indeterminate-animation-ease,var(--spectrum-global-animation-ease-in-out));will-change:transform;position:relative}[dir=ltr] .spectrum-BarLoader--indeterminate_48541f .spectrum-BarLoader-fill_48541f{animation:indeterminate-loop-ltr_48541f var(--spectrum-barloader-large-indeterminate-duration,var(--spectrum-global-animation-duration-2000))infinite}[dir=rtl] .spectrum-BarLoader--indeterminate_48541f .spectrum-BarLoader-fill_48541f{animation:indeterminate-loop-rtl_48541f var(--spectrum-barloader-large-indeterminate-duration,var(--spectrum-global-animation-duration-2000))infinite}@keyframes indeterminate-loop-ltr_48541f{0%{transform:translate(calc(var(--spectrum-barloader-large-indeterminate-fill-width,var(--spectrum-global-dimension-size-1700))*-1))}to{transform:translate(var(--spectrum-barloader-large-width,var(--spectrum-global-dimension-size-2400)))}}@keyframes indeterminate-loop-rtl_48541f{0%{transform:translate(var(--spectrum-barloader-large-width,var(--spectrum-global-dimension-size-2400)))}to{transform:translate(calc(var(--spectrum-barloader-large-width,var(--spectrum-global-dimension-size-2400))*-1))}}.spectrum-BarLoader_48541f .spectrum-BarLoader-fill_48541f{background:var(--spectrum-accent-color-900)}.spectrum-BarLoader_48541f .spectrum-BarLoader-track_48541f{background-color:var(--spectrum-barloader-large-track-color,var(--spectrum-alias-track-color-default))}.spectrum-BarLoader_48541f.spectrum-BarLoader--overBackground_48541f .spectrum-BarLoader-fill_48541f{background:var(--spectrum-barloader-large-over-background-track-fill-color,var(--spectrum-global-color-static-white))}.spectrum-BarLoader_48541f.spectrum-BarLoader--overBackground_48541f .spectrum-BarLoader-label_48541f,.spectrum-BarLoader_48541f.spectrum-BarLoader--overBackground_48541f .spectrum-BarLoader-percentage_48541f{color:var(--spectrum-barloader-large-over-background-track-fill-color,var(--spectrum-global-color-static-white))}.spectrum-BarLoader_48541f.spectrum-BarLoader--overBackground_48541f .spectrum-BarLoader-track_48541f{background-color:var(--spectrum-barloader-large-over-background-track-color,var(--spectrum-alias-track-color-over-background))}.spectrum-BarLoader_48541f.is-positive_48541f .spectrum-BarLoader-fill_48541f{background:var(--spectrum-meter-large-track-color-positive,var(--spectrum-semantic-positive-color-status))}.spectrum-BarLoader_48541f.is-warning_48541f .spectrum-BarLoader-fill_48541f{background:var(--spectrum-meter-large-track-color-warning,var(--spectrum-semantic-notice-color-status))}.spectrum-BarLoader_48541f.is-critical_48541f .spectrum-BarLoader-fill_48541f{background:var(--spectrum-meter-large-track-color-critical,var(--spectrum-semantic-negative-color-status))}.spectrum-BarLoader-label_48541f,.spectrum-BarLoader-percentage_48541f{color:var(--spectrum-fieldlabel-text-color,var(--spectrum-alias-label-text-color));color:var(--spectrum-fieldlabel-text-color,var(--spectrum-alias-label-text-color));color:var(--spectrum-fieldlabel-text-color,var(--spectrum-alias-label-text-color))}@media (forced-colors:active){.spectrum-BarLoader-track_48541f{forced-color-adjust:none;--spectrum-barloader-large-track-fill-color:ButtonText;--spectrum-barloader-large-track-color:ButtonFace;border:1px solid ButtonText}}.spectrum-CircleLoader--indeterminate-fill-submask-2_7c1153{animation:1s linear infinite spectrum-fill-mask-2_7c1153}@keyframes spectrum-fill-mask-1_7c1153{0%{transform:rotate(90deg)}1.69%{transform:rotate(72.3deg)}3.39%{transform:rotate(55.5deg)}5.08%{transform:rotate(40.3deg)}6.78%{transform:rotate(25deg)}8.47%{transform:rotate(10.6deg)}10.17%{transform:rotate(0)}11.86%{transform:rotate(0)}13.56%{transform:rotate(0)}15.25%{transform:rotate(0)}16.95%{transform:rotate(0)}18.64%{transform:rotate(0)}20.34%{transform:rotate(0)}22.03%{transform:rotate(0)}23.73%{transform:rotate(0)}25.42%{transform:rotate(0)}27.12%{transform:rotate(0)}28.81%{transform:rotate(0)}30.51%{transform:rotate(0)}32.2%{transform:rotate(0)}33.9%{transform:rotate(0)}35.59%{transform:rotate(0)}37.29%{transform:rotate(0)}38.98%{transform:rotate(0)}40.68%{transform:rotate(0)}42.37%{transform:rotate(5.3deg)}44.07%{transform:rotate(13.4deg)}45.76%{transform:rotate(20.6deg)}47.46%{transform:rotate(29deg)}49.15%{transform:rotate(36.5deg)}50.85%{transform:rotate(42.6deg)}52.54%{transform:rotate(48.8deg)}54.24%{transform:rotate(54.2deg)}55.93%{transform:rotate(59.4deg)}57.63%{transform:rotate(63.2deg)}59.32%{transform:rotate(67.2deg)}61.02%{transform:rotate(70.8deg)}62.71%{transform:rotate(73.8deg)}64.41%{transform:rotate(76.2deg)}66.1%{transform:rotate(78.7deg)}67.8%{transform:rotate(80.6deg)}69.49%{transform:rotate(82.6deg)}71.19%{transform:rotate(83.7deg)}72.88%{transform:rotate(85deg)}74.58%{transform:rotate(86.3deg)}76.27%{transform:rotate(87deg)}77.97%{transform:rotate(87.7deg)}79.66%{transform:rotate(88.3deg)}81.36%{transform:rotate(88.6deg)}83.05%{transform:rotate(89.2deg)}84.75%{transform:rotate(89.2deg)}86.44%{transform:rotate(89.5deg)}88.14%{transform:rotate(89.9deg)}89.83%{transform:rotate(89.7deg)}91.53%{transform:rotate(90.1deg)}93.22%{transform:rotate(90.2deg)}94.92%{transform:rotate(90.1deg)}96.61%{transform:rotate(90deg)}98.31%{transform:rotate(89.8deg)}to{transform:rotate(90deg)}}@keyframes spectrum-fill-mask-2_7c1153{0%{transform:rotate(180deg)}1.69%{transform:rotate(180deg)}3.39%{transform:rotate(180deg)}5.08%{transform:rotate(180deg)}6.78%{transform:rotate(180deg)}8.47%{transform:rotate(180deg)}10.17%{transform:rotate(179.2deg)}11.86%{transform:rotate(164deg)}13.56%{transform:rotate(151.8deg)}15.25%{transform:rotate(140.8deg)}16.95%{transform:rotate(130.3deg)}18.64%{transform:rotate(120.4deg)}20.34%{transform:rotate(110.8deg)}22.03%{transform:rotate(101.6deg)}23.73%{transform:rotate(93.5deg)}25.42%{transform:rotate(85.4deg)}27.12%{transform:rotate(78.1deg)}28.81%{transform:rotate(71.2deg)}30.51%{transform:rotate(89.1deg)}32.2%{transform:rotate(105.5deg)}33.9%{transform:rotate(121.3deg)}35.59%{transform:rotate(135.5deg)}37.29%{transform:rotate(148.4deg)}38.98%{transform:rotate(161deg)}40.68%{transform:rotate(173.5deg)}42.37%{transform:rotate(180deg)}44.07%{transform:rotate(180deg)}45.76%{transform:rotate(180deg)}47.46%{transform:rotate(180deg)}49.15%{transform:rotate(180deg)}50.85%{transform:rotate(180deg)}52.54%{transform:rotate(180deg)}54.24%{transform:rotate(180deg)}55.93%{transform:rotate(180deg)}57.63%{transform:rotate(180deg)}59.32%{transform:rotate(180deg)}61.02%{transform:rotate(180deg)}62.71%{transform:rotate(180deg)}64.41%{transform:rotate(180deg)}66.1%{transform:rotate(180deg)}67.8%{transform:rotate(180deg)}69.49%{transform:rotate(180deg)}71.19%{transform:rotate(180deg)}72.88%{transform:rotate(180deg)}74.58%{transform:rotate(180deg)}76.27%{transform:rotate(180deg)}77.97%{transform:rotate(180deg)}79.66%{transform:rotate(180deg)}81.36%{transform:rotate(180deg)}83.05%{transform:rotate(180deg)}84.75%{transform:rotate(180deg)}86.44%{transform:rotate(180deg)}88.14%{transform:rotate(180deg)}89.83%{transform:rotate(180deg)}91.53%{transform:rotate(180deg)}93.22%{transform:rotate(180deg)}94.92%{transform:rotate(180deg)}96.61%{transform:rotate(180deg)}98.31%{transform:rotate(180deg)}to{transform:rotate(180deg)}}@keyframes spectrum-fills-rotate_7c1153{0%{transform:rotate(-90deg)}to{transform:rotate(270deg)}}.spectrum-CircleLoader_7c1153{width:var(--spectrum-loader-circle-medium-width,var(--spectrum-global-dimension-static-size-400));height:var(--spectrum-loader-circle-medium-height,var(--spectrum-global-dimension-static-size-400));direction:ltr;display:inline-block;position:relative}.spectrum-CircleLoader-track_7c1153{box-sizing:border-box;width:var(--spectrum-loader-circle-medium-width,var(--spectrum-global-dimension-static-size-400));height:var(--spectrum-loader-circle-medium-height,var(--spectrum-global-dimension-static-size-400));border-style:solid;border-width:var(--spectrum-loader-circle-medium-border-size);border-radius:var(--spectrum-loader-circle-medium-width,var(--spectrum-global-dimension-static-size-400))}.spectrum-CircleLoader-fills_7c1153{width:100%;height:100%;position:absolute;top:0;left:0}.spectrum-CircleLoader-fill_7c1153{box-sizing:border-box;width:var(--spectrum-loader-circle-medium-width,var(--spectrum-global-dimension-static-size-400));height:var(--spectrum-loader-circle-medium-height,var(--spectrum-global-dimension-static-size-400));border-style:solid;border-width:var(--spectrum-loader-circle-medium-border-size);border-radius:var(--spectrum-loader-circle-medium-width,var(--spectrum-global-dimension-static-size-400))}.spectrum-CircleLoader-fillMask1_7c1153,.spectrum-CircleLoader-fillMask2_7c1153{width:50%;height:100%;transform-origin:100%;position:absolute;overflow:hidden;transform:rotate(180deg)}.spectrum-CircleLoader-fillSubMask1_7c1153,.spectrum-CircleLoader-fillSubMask2_7c1153{width:100%;height:100%;transform-origin:100%;overflow:hidden;transform:rotate(-180deg)}.spectrum-CircleLoader-fillMask2_7c1153{transform:rotate(0)}.spectrum-CircleLoader--small_7c1153{width:var(--spectrum-loader-circle-small-width,var(--spectrum-global-dimension-static-size-200));height:var(--spectrum-loader-circle-small-height,var(--spectrum-global-dimension-static-size-200))}.spectrum-CircleLoader--small_7c1153 .spectrum-CircleLoader-track_7c1153,.spectrum-CircleLoader--small_7c1153 .spectrum-CircleLoader-fill_7c1153{width:var(--spectrum-loader-circle-small-width,var(--spectrum-global-dimension-static-size-200));height:var(--spectrum-loader-circle-small-height,var(--spectrum-global-dimension-static-size-200));border-style:solid;border-width:var(--spectrum-loader-circle-small-border-size);border-radius:var(--spectrum-loader-circle-small-width,var(--spectrum-global-dimension-static-size-200))}.spectrum-CircleLoader--large_7c1153{width:var(--spectrum-loader-circle-large-width,var(--spectrum-global-dimension-size-800));height:var(--spectrum-loader-circle-large-height,var(--spectrum-global-dimension-size-800))}.spectrum-CircleLoader--large_7c1153 .spectrum-CircleLoader-track_7c1153,.spectrum-CircleLoader--large_7c1153 .spectrum-CircleLoader-fill_7c1153{width:var(--spectrum-loader-circle-large-width,var(--spectrum-global-dimension-size-800));height:var(--spectrum-loader-circle-large-height,var(--spectrum-global-dimension-size-800));border-style:solid;border-width:var(--spectrum-loader-circle-large-border-size,var(--spectrum-global-dimension-size-50));border-radius:var(--spectrum-loader-circle-large-width,var(--spectrum-global-dimension-size-800))}.spectrum-CircleLoader--indeterminate_7c1153 .spectrum-CircleLoader-fills_7c1153{will-change:transform;transform-origin:50%;animation:1s cubic-bezier(.25,.78,.48,.89) infinite spectrum-fills-rotate_7c1153;transform:translateZ(0)}.spectrum-CircleLoader--indeterminate_7c1153 .spectrum-CircleLoader-fillSubMask1_7c1153{will-change:transform;animation:1s linear infinite spectrum-fill-mask-1_7c1153;transform:translateZ(0)}.spectrum-CircleLoader--indeterminate_7c1153 .spectrum-CircleLoader-fillSubMask2_7c1153{will-change:transform;animation:1s linear infinite spectrum-fill-mask-2_7c1153;transform:translateZ(0)}.spectrum-CircleLoader-track_7c1153{border-color:var(--spectrum-loader-circle-medium-track-color,var(--spectrum-alias-track-color-default))}.spectrum-CircleLoader-fill_7c1153{border-color:var(--spectrum-accent-color-900)}.spectrum-CircleLoader--overBackground_7c1153 .spectrum-CircleLoader-track_7c1153{border-color:var(--spectrum-loader-circle-medium-over-background-track-color,var(--spectrum-alias-track-color-over-background))}.spectrum-CircleLoader--overBackground_7c1153 .spectrum-CircleLoader-fill_7c1153{border-color:var(--spectrum-loader-circle-medium-over-background-track-fill-color,var(--spectrum-global-color-static-white))}.spectrum-CircleLoader--indeterminate_7c1153.spectrum-CircleLoader--overBackground_7c1153 .spectrum-CircleLoader-track_7c1153{border-color:var(--spectrum-loader-circle-medium-over-background-track-color,var(--spectrum-alias-track-color-over-background))}.spectrum-CircleLoader--indeterminate_7c1153.spectrum-CircleLoader--overBackground_7c1153 .spectrum-CircleLoader-fill_7c1153{border-color:var(--spectrum-loader-circle-medium-over-background-track-fill-color,var(--spectrum-global-color-static-white))}@media (forced-colors:active){.spectrum-CircleLoader-fill_7c1153{--spectrum-loader-circle-medium-track-fill-color:Highlight}}
|
package/dist/main.js
CHANGED
|
@@ -14,8 +14,39 @@ function $parcel$interopDefault(a) {
|
|
|
14
14
|
$parcel$export(module.exports, "ProgressBar", () => $08d0cdc7f7a792a7$export$c17561cb55d4db30);
|
|
15
15
|
$parcel$export(module.exports, "ProgressCircle", () => $365887133501f5a1$export$c79b9d6b4cc92af7);
|
|
16
16
|
$parcel$export(module.exports, "ProgressBarBase", () => $3d86ae6a9356cc8a$export$7c6ed87244065f3a);
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
/*
|
|
18
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
19
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
20
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
21
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
+
*
|
|
23
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
24
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
25
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
26
|
+
* governing permissions and limitations under the License.
|
|
27
|
+
*/ /// <reference types="css-module-types" />
|
|
28
|
+
/*
|
|
29
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
30
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
31
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
32
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
33
|
+
*
|
|
34
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
35
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
36
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
37
|
+
* governing permissions and limitations under the License.
|
|
38
|
+
*/
|
|
39
|
+
/*
|
|
40
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
41
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
42
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
43
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
44
|
+
*
|
|
45
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
46
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
47
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
48
|
+
* governing permissions and limitations under the License.
|
|
49
|
+
*/
|
|
19
50
|
|
|
20
51
|
|
|
21
52
|
var $9f78a6c009f32d0a$exports = {};
|
|
@@ -66,46 +97,45 @@ $9f78a6c009f32d0a$export$a1f608a9810da50f = "is-critical_48541f";
|
|
|
66
97
|
|
|
67
98
|
// Base ProgressBar component shared with Meter.
|
|
68
99
|
function $3d86ae6a9356cc8a$var$ProgressBarBase(props, ref) {
|
|
69
|
-
let { value: value = 0 , minValue: minValue = 0 , maxValue: maxValue = 100 , size: size =
|
|
70
|
-
let domRef = $cIANI$reactspectrumutils.useDOMRef(ref);
|
|
71
|
-
let { styleProps: styleProps } = $cIANI$reactspectrumutils.useStyleProps(otherProps);
|
|
72
|
-
value = $cIANI$reactariautils.clamp(value, minValue, maxValue);
|
|
73
|
-
let barStyle = {
|
|
74
|
-
};
|
|
100
|
+
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;
|
|
101
|
+
let domRef = (0, $cIANI$reactspectrumutils.useDOMRef)(ref);
|
|
102
|
+
let { styleProps: styleProps } = (0, $cIANI$reactspectrumutils.useStyleProps)(otherProps);
|
|
103
|
+
value = (0, $cIANI$reactariautils.clamp)(value, minValue, maxValue);
|
|
104
|
+
let barStyle = {};
|
|
75
105
|
if (!isIndeterminate) {
|
|
76
106
|
let percentage = (value - minValue) / (maxValue - minValue);
|
|
77
107
|
barStyle.width = `${Math.round(percentage * 100)}%`;
|
|
78
108
|
}
|
|
79
109
|
// Ideally this should be in useProgressBar, but children
|
|
80
110
|
// are not supported in ProgressCircle which shares that hook...
|
|
81
|
-
if (!label && !ariaLabel && !ariaLabelledby) console.warn(
|
|
111
|
+
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");
|
|
82
112
|
// use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files
|
|
83
|
-
return
|
|
113
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
84
114
|
...barProps,
|
|
85
115
|
ref: domRef,
|
|
86
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports)),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
116
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports))), "spectrum-BarLoader", {
|
|
117
|
+
"spectrum-BarLoader--small": size === "S",
|
|
118
|
+
"spectrum-BarLoader--large": size === "L",
|
|
119
|
+
"spectrum-BarLoader--indeterminate": isIndeterminate,
|
|
120
|
+
"spectrum-BarLoader--sideLabel": labelPosition === "side"
|
|
91
121
|
}, barClassName, styleProps.className),
|
|
92
122
|
style: {
|
|
93
|
-
minWidth:
|
|
123
|
+
minWidth: "-moz-fit-content",
|
|
94
124
|
...styleProps.style
|
|
95
125
|
}
|
|
96
|
-
}, label && /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).createElement("span", {
|
|
126
|
+
}, label && /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("span", {
|
|
97
127
|
...labelProps,
|
|
98
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports)),
|
|
99
|
-
}, label), showValueLabel && /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).createElement("div", {
|
|
100
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports)),
|
|
101
|
-
}, barProps[
|
|
102
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports)),
|
|
103
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).createElement("div", {
|
|
104
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports)),
|
|
128
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports))), "spectrum-BarLoader-label")
|
|
129
|
+
}, label), showValueLabel && /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
130
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports))), "spectrum-BarLoader-percentage")
|
|
131
|
+
}, barProps["aria-valuetext"]), /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
132
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports))), "spectrum-BarLoader-track")
|
|
133
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
134
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports))), "spectrum-BarLoader-fill"),
|
|
105
135
|
style: barStyle
|
|
106
|
-
})))
|
|
136
|
+
})));
|
|
107
137
|
}
|
|
108
|
-
let $3d86ae6a9356cc8a$export$7c6ed87244065f3a = /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).forwardRef($3d86ae6a9356cc8a$var$ProgressBarBase);
|
|
138
|
+
let $3d86ae6a9356cc8a$export$7c6ed87244065f3a = /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).forwardRef($3d86ae6a9356cc8a$var$ProgressBarBase);
|
|
109
139
|
|
|
110
140
|
|
|
111
141
|
|
|
@@ -113,24 +143,34 @@ let $3d86ae6a9356cc8a$export$7c6ed87244065f3a = /*#__PURE__*/ ($parcel$interopDe
|
|
|
113
143
|
|
|
114
144
|
function $08d0cdc7f7a792a7$var$ProgressBar(props, ref) {
|
|
115
145
|
let { variant: variant , ...otherProps } = props;
|
|
116
|
-
const { progressBarProps: progressBarProps , labelProps: labelProps } = $cIANI$reactariaprogress.useProgressBar(props);
|
|
117
|
-
return
|
|
146
|
+
const { progressBarProps: progressBarProps , labelProps: labelProps } = (0, $cIANI$reactariaprogress.useProgressBar)(props);
|
|
147
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement((0, $3d86ae6a9356cc8a$export$7c6ed87244065f3a), {
|
|
118
148
|
...otherProps,
|
|
119
149
|
ref: ref,
|
|
120
150
|
barProps: progressBarProps,
|
|
121
151
|
labelProps: labelProps,
|
|
122
|
-
barClassName: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports)), {
|
|
123
|
-
|
|
152
|
+
barClassName: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports))), {
|
|
153
|
+
"spectrum-BarLoader--overBackground": variant === "overBackground"
|
|
124
154
|
})
|
|
125
|
-
})
|
|
155
|
+
});
|
|
126
156
|
}
|
|
127
157
|
/**
|
|
128
158
|
* ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.
|
|
129
159
|
* They can represent either determinate or indeterminate progress.
|
|
130
|
-
*/ let $08d0cdc7f7a792a7$export$c17561cb55d4db30 = /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).forwardRef($08d0cdc7f7a792a7$var$ProgressBar);
|
|
131
|
-
|
|
160
|
+
*/ let $08d0cdc7f7a792a7$export$c17561cb55d4db30 = /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).forwardRef($08d0cdc7f7a792a7$var$ProgressBar);
|
|
132
161
|
|
|
133
162
|
|
|
163
|
+
/*
|
|
164
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
165
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
166
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
167
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
168
|
+
*
|
|
169
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
170
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
171
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
172
|
+
* governing permissions and limitations under the License.
|
|
173
|
+
*/
|
|
134
174
|
|
|
135
175
|
|
|
136
176
|
var $f4d8d13edf2d3ca2$exports = {};
|
|
@@ -187,68 +227,66 @@ $f4d8d13edf2d3ca2$export$6668708cb539f403 = "spectrum-CircleLoader--overBackgrou
|
|
|
187
227
|
|
|
188
228
|
|
|
189
229
|
function $365887133501f5a1$var$ProgressCircle(props, ref) {
|
|
190
|
-
let { value: value = 0 , minValue: minValue = 0 , maxValue: maxValue = 100 , size: size =
|
|
191
|
-
let domRef = $cIANI$reactspectrumutils.useDOMRef(ref);
|
|
192
|
-
let { styleProps: styleProps } = $cIANI$reactspectrumutils.useStyleProps(otherProps);
|
|
193
|
-
value = $cIANI$reactariautils.clamp(value, minValue, maxValue);
|
|
194
|
-
let { progressBarProps: progressBarProps } = $cIANI$reactariaprogress.useProgressBar({
|
|
230
|
+
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;
|
|
231
|
+
let domRef = (0, $cIANI$reactspectrumutils.useDOMRef)(ref);
|
|
232
|
+
let { styleProps: styleProps } = (0, $cIANI$reactspectrumutils.useStyleProps)(otherProps);
|
|
233
|
+
value = (0, $cIANI$reactariautils.clamp)(value, minValue, maxValue);
|
|
234
|
+
let { progressBarProps: progressBarProps } = (0, $cIANI$reactariaprogress.useProgressBar)({
|
|
195
235
|
...props,
|
|
196
236
|
value: value
|
|
197
237
|
});
|
|
198
|
-
let subMask1Style = {
|
|
199
|
-
};
|
|
200
|
-
let subMask2Style = {
|
|
201
|
-
};
|
|
238
|
+
let subMask1Style = {};
|
|
239
|
+
let subMask2Style = {};
|
|
202
240
|
if (!isIndeterminate) {
|
|
203
241
|
let percentage = (value - minValue) / (maxValue - minValue) * 100;
|
|
204
242
|
let angle;
|
|
205
243
|
if (percentage > 0 && percentage <= 50) {
|
|
206
244
|
angle = -180 + percentage / 50 * 180;
|
|
207
245
|
subMask1Style.transform = `rotate(${angle}deg)`;
|
|
208
|
-
subMask2Style.transform =
|
|
246
|
+
subMask2Style.transform = "rotate(-180deg)";
|
|
209
247
|
} else if (percentage > 50) {
|
|
210
248
|
angle = -180 + (percentage - 50) / 50 * 180;
|
|
211
|
-
subMask1Style.transform =
|
|
249
|
+
subMask1Style.transform = "rotate(0deg)";
|
|
212
250
|
subMask2Style.transform = `rotate(${angle}deg)`;
|
|
213
251
|
}
|
|
214
252
|
}
|
|
215
|
-
if (!ariaLabel && !ariaLabelledby) console.warn(
|
|
216
|
-
return
|
|
253
|
+
if (!ariaLabel && !ariaLabelledby) console.warn("ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility");
|
|
254
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
217
255
|
...styleProps,
|
|
218
256
|
...progressBarProps,
|
|
219
257
|
ref: domRef,
|
|
220
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports)),
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
258
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports))), "spectrum-CircleLoader", {
|
|
259
|
+
"spectrum-CircleLoader--indeterminate": isIndeterminate,
|
|
260
|
+
"spectrum-CircleLoader--small": size === "S",
|
|
261
|
+
"spectrum-CircleLoader--large": size === "L",
|
|
262
|
+
"spectrum-CircleLoader--overBackground": variant === "overBackground"
|
|
225
263
|
}, styleProps.className)
|
|
226
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).createElement("div", {
|
|
227
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports)),
|
|
228
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).createElement("div", {
|
|
229
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports)),
|
|
230
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).createElement("div", {
|
|
231
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports)),
|
|
232
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).createElement("div", {
|
|
233
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports)),
|
|
264
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
265
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports))), "spectrum-CircleLoader-track")
|
|
266
|
+
}), /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
267
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports))), "spectrum-CircleLoader-fills")
|
|
268
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
269
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports))), "spectrum-CircleLoader-fillMask1")
|
|
270
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
271
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports))), "spectrum-CircleLoader-fillSubMask1"),
|
|
234
272
|
"data-testid": "fillSubMask1",
|
|
235
273
|
style: subMask1Style
|
|
236
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).createElement("div", {
|
|
237
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports)),
|
|
238
|
-
}))), /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).createElement("div", {
|
|
239
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports)),
|
|
240
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).createElement("div", {
|
|
241
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports)),
|
|
274
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
275
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports))), "spectrum-CircleLoader-fill")
|
|
276
|
+
}))), /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
277
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports))), "spectrum-CircleLoader-fillMask2")
|
|
278
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
279
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports))), "spectrum-CircleLoader-fillSubMask2"),
|
|
242
280
|
"data-testid": "fillSubMask2",
|
|
243
281
|
style: subMask2Style
|
|
244
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).createElement("div", {
|
|
245
|
-
className: $cIANI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports)),
|
|
246
|
-
})))))
|
|
282
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
283
|
+
className: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f4d8d13edf2d3ca2$exports))), "spectrum-CircleLoader-fill")
|
|
284
|
+
})))));
|
|
247
285
|
}
|
|
248
286
|
/**
|
|
249
287
|
* ProgressCircles show the progression of a system operation such as downloading, uploading, processing, etc. in a visual way.
|
|
250
288
|
* They can represent determinate or indeterminate progress.
|
|
251
|
-
*/ let $365887133501f5a1$export$c79b9d6b4cc92af7 = /*#__PURE__*/ ($parcel$interopDefault($cIANI$react)).forwardRef($365887133501f5a1$var$ProgressCircle);
|
|
289
|
+
*/ let $365887133501f5a1$export$c79b9d6b4cc92af7 = /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).forwardRef($365887133501f5a1$var$ProgressCircle);
|
|
252
290
|
|
|
253
291
|
|
|
254
292
|
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,UAA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,EAAE,CAAoC;QAClE,CAAW,cAAC,CAAc;QAC1B,KAAK,EAAE,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 {ProgressBar} from './ProgressBar';\nexport {ProgressCircle} from './ProgressCircle';\nexport {ProgressBarBase} from './ProgressBarBase';\nexport type {SpectrumProgressBarProps, SpectrumProgressCircleProps} from '@react-types/progress';\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"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC,GAED;ACZA;;;;;;;;;;CAUC,GAED;;;;;;;;;;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAbA,4CAAuC;AACvC,4CAAsD;AACtD,4CAAkD;AAClD,4CAA6C;AAC7C,4CAA4C;AAC5C,4CAA6C;AAC7C,4CAAkD;AAClD,4CAA8C;AAC9C,4CAA2C;AAC3C,4CAA2C;AAC3C,2CAAuD;AACvD,4CAAgC;AAChC,4CAA+B;AAC/B,4CAAgC;;;ADahC,gDAAgD;AAChD,SAAS,sCAAgB,KAA2B,EAAE,GAA2B,EAAE;IACjF,IAAI,SACF,QAAQ,cACR,WAAW,cACX,WAAW,YACX,OAAO,aACP,MAAK,gBACL,aAAY,kBACZ,iBAAiB,CAAC,CAAC,uBACnB,gBAAgB,yBAChB,kBAAkB,KAAK,aACvB,SAAQ,cACR,WAAU,EACV,cAAc,UAAS,EACvB,mBAAmB,eAAc,EACjC,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,uCAAa,AAAD,EAAE;IAEjC,QAAQ,CAAA,GAAA,2BAAK,AAAD,EAAE,OAAO,UAAU;IAE/B,IAAI,WAA0B,CAAC;IAC/B,IAAI,CAA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,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;qBACjC,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;QAC9B,eAAY;QACZ,OAAO;qBACP,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;;AAM/C;AAEA;;;CAGC,GACD,IAAI,0DAAkB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;","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 {ProgressBar} from './ProgressBar';\nexport {ProgressCircle} from './ProgressCircle';\nexport {ProgressBarBase} from './ProgressBarBase';\nexport type {SpectrumProgressBarProps, SpectrumProgressCircleProps} from '@react-types/progress';\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
|
@@ -10,8 +10,39 @@ function $parcel$interopDefault(a) {
|
|
|
10
10
|
function $parcel$export(e, n, v, s) {
|
|
11
11
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
/*
|
|
14
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
15
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
17
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
20
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
21
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
22
|
+
* governing permissions and limitations under the License.
|
|
23
|
+
*/ /// <reference types="css-module-types" />
|
|
24
|
+
/*
|
|
25
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
26
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
27
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
28
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
29
|
+
*
|
|
30
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
31
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
32
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
33
|
+
* governing permissions and limitations under the License.
|
|
34
|
+
*/
|
|
35
|
+
/*
|
|
36
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
37
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
38
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
39
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
40
|
+
*
|
|
41
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
42
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
43
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
44
|
+
* governing permissions and limitations under the License.
|
|
45
|
+
*/
|
|
15
46
|
|
|
16
47
|
|
|
17
48
|
var $a43f840f49ffbe32$exports = {};
|
|
@@ -62,46 +93,45 @@ $a43f840f49ffbe32$export$a1f608a9810da50f = "is-critical_48541f";
|
|
|
62
93
|
|
|
63
94
|
// Base ProgressBar component shared with Meter.
|
|
64
95
|
function $ddf9337e928b5fe6$var$ProgressBarBase(props, ref) {
|
|
65
|
-
let { value: value = 0 , minValue: minValue = 0 , maxValue: maxValue = 100 , size: size =
|
|
66
|
-
let domRef = $joUWQ$useDOMRef(ref);
|
|
67
|
-
let { styleProps: styleProps } = $joUWQ$useStyleProps(otherProps);
|
|
68
|
-
value = $joUWQ$clamp(value, minValue, maxValue);
|
|
69
|
-
let barStyle = {
|
|
70
|
-
};
|
|
96
|
+
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;
|
|
97
|
+
let domRef = (0, $joUWQ$useDOMRef)(ref);
|
|
98
|
+
let { styleProps: styleProps } = (0, $joUWQ$useStyleProps)(otherProps);
|
|
99
|
+
value = (0, $joUWQ$clamp)(value, minValue, maxValue);
|
|
100
|
+
let barStyle = {};
|
|
71
101
|
if (!isIndeterminate) {
|
|
72
102
|
let percentage = (value - minValue) / (maxValue - minValue);
|
|
73
103
|
barStyle.width = `${Math.round(percentage * 100)}%`;
|
|
74
104
|
}
|
|
75
105
|
// Ideally this should be in useProgressBar, but children
|
|
76
106
|
// are not supported in ProgressCircle which shares that hook...
|
|
77
|
-
if (!label && !ariaLabel && !ariaLabelledby) console.warn(
|
|
107
|
+
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");
|
|
78
108
|
// use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files
|
|
79
|
-
return
|
|
109
|
+
return /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
80
110
|
...barProps,
|
|
81
111
|
ref: domRef,
|
|
82
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($a43f840f49ffbe32$exports)),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
112
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($a43f840f49ffbe32$exports))), "spectrum-BarLoader", {
|
|
113
|
+
"spectrum-BarLoader--small": size === "S",
|
|
114
|
+
"spectrum-BarLoader--large": size === "L",
|
|
115
|
+
"spectrum-BarLoader--indeterminate": isIndeterminate,
|
|
116
|
+
"spectrum-BarLoader--sideLabel": labelPosition === "side"
|
|
87
117
|
}, barClassName, styleProps.className),
|
|
88
118
|
style: {
|
|
89
|
-
minWidth:
|
|
119
|
+
minWidth: "-moz-fit-content",
|
|
90
120
|
...styleProps.style
|
|
91
121
|
}
|
|
92
|
-
}, label && /*#__PURE__*/ $joUWQ$react.createElement("span", {
|
|
122
|
+
}, label && /*#__PURE__*/ (0, $joUWQ$react).createElement("span", {
|
|
93
123
|
...labelProps,
|
|
94
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($a43f840f49ffbe32$exports)),
|
|
95
|
-
}, label), showValueLabel && /*#__PURE__*/ $joUWQ$react.createElement("div", {
|
|
96
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($a43f840f49ffbe32$exports)),
|
|
97
|
-
}, barProps[
|
|
98
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($a43f840f49ffbe32$exports)),
|
|
99
|
-
}, /*#__PURE__*/ $joUWQ$react.createElement("div", {
|
|
100
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($a43f840f49ffbe32$exports)),
|
|
124
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($a43f840f49ffbe32$exports))), "spectrum-BarLoader-label")
|
|
125
|
+
}, label), showValueLabel && /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
126
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($a43f840f49ffbe32$exports))), "spectrum-BarLoader-percentage")
|
|
127
|
+
}, barProps["aria-valuetext"]), /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
128
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($a43f840f49ffbe32$exports))), "spectrum-BarLoader-track")
|
|
129
|
+
}, /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
130
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($a43f840f49ffbe32$exports))), "spectrum-BarLoader-fill"),
|
|
101
131
|
style: barStyle
|
|
102
|
-
})))
|
|
132
|
+
})));
|
|
103
133
|
}
|
|
104
|
-
let $ddf9337e928b5fe6$export$7c6ed87244065f3a = /*#__PURE__*/ $joUWQ$react.forwardRef($ddf9337e928b5fe6$var$ProgressBarBase);
|
|
134
|
+
let $ddf9337e928b5fe6$export$7c6ed87244065f3a = /*#__PURE__*/ (0, $joUWQ$react).forwardRef($ddf9337e928b5fe6$var$ProgressBarBase);
|
|
105
135
|
|
|
106
136
|
|
|
107
137
|
|
|
@@ -109,24 +139,34 @@ let $ddf9337e928b5fe6$export$7c6ed87244065f3a = /*#__PURE__*/ $joUWQ$react.forwa
|
|
|
109
139
|
|
|
110
140
|
function $551ca31cb687f352$var$ProgressBar(props, ref) {
|
|
111
141
|
let { variant: variant , ...otherProps } = props;
|
|
112
|
-
const { progressBarProps: progressBarProps , labelProps: labelProps } = $joUWQ$useProgressBar(props);
|
|
113
|
-
return
|
|
142
|
+
const { progressBarProps: progressBarProps , labelProps: labelProps } = (0, $joUWQ$useProgressBar)(props);
|
|
143
|
+
return /*#__PURE__*/ (0, $joUWQ$react).createElement((0, $ddf9337e928b5fe6$export$7c6ed87244065f3a), {
|
|
114
144
|
...otherProps,
|
|
115
145
|
ref: ref,
|
|
116
146
|
barProps: progressBarProps,
|
|
117
147
|
labelProps: labelProps,
|
|
118
|
-
barClassName: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($a43f840f49ffbe32$exports)), {
|
|
119
|
-
|
|
148
|
+
barClassName: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($a43f840f49ffbe32$exports))), {
|
|
149
|
+
"spectrum-BarLoader--overBackground": variant === "overBackground"
|
|
120
150
|
})
|
|
121
|
-
})
|
|
151
|
+
});
|
|
122
152
|
}
|
|
123
153
|
/**
|
|
124
154
|
* ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.
|
|
125
155
|
* They can represent either determinate or indeterminate progress.
|
|
126
|
-
*/ let $551ca31cb687f352$export$c17561cb55d4db30 = /*#__PURE__*/ $joUWQ$react.forwardRef($551ca31cb687f352$var$ProgressBar);
|
|
127
|
-
|
|
156
|
+
*/ let $551ca31cb687f352$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $joUWQ$react).forwardRef($551ca31cb687f352$var$ProgressBar);
|
|
128
157
|
|
|
129
158
|
|
|
159
|
+
/*
|
|
160
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
161
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
162
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
163
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
164
|
+
*
|
|
165
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
166
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
167
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
168
|
+
* governing permissions and limitations under the License.
|
|
169
|
+
*/
|
|
130
170
|
|
|
131
171
|
|
|
132
172
|
var $91c958cb2e66ca21$exports = {};
|
|
@@ -183,68 +223,66 @@ $91c958cb2e66ca21$export$6668708cb539f403 = "spectrum-CircleLoader--overBackgrou
|
|
|
183
223
|
|
|
184
224
|
|
|
185
225
|
function $79c16f64960b6385$var$ProgressCircle(props, ref) {
|
|
186
|
-
let { value: value = 0 , minValue: minValue = 0 , maxValue: maxValue = 100 , size: size =
|
|
187
|
-
let domRef = $joUWQ$useDOMRef(ref);
|
|
188
|
-
let { styleProps: styleProps } = $joUWQ$useStyleProps(otherProps);
|
|
189
|
-
value = $joUWQ$clamp(value, minValue, maxValue);
|
|
190
|
-
let { progressBarProps: progressBarProps } = $joUWQ$useProgressBar({
|
|
226
|
+
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;
|
|
227
|
+
let domRef = (0, $joUWQ$useDOMRef)(ref);
|
|
228
|
+
let { styleProps: styleProps } = (0, $joUWQ$useStyleProps)(otherProps);
|
|
229
|
+
value = (0, $joUWQ$clamp)(value, minValue, maxValue);
|
|
230
|
+
let { progressBarProps: progressBarProps } = (0, $joUWQ$useProgressBar)({
|
|
191
231
|
...props,
|
|
192
232
|
value: value
|
|
193
233
|
});
|
|
194
|
-
let subMask1Style = {
|
|
195
|
-
};
|
|
196
|
-
let subMask2Style = {
|
|
197
|
-
};
|
|
234
|
+
let subMask1Style = {};
|
|
235
|
+
let subMask2Style = {};
|
|
198
236
|
if (!isIndeterminate) {
|
|
199
237
|
let percentage = (value - minValue) / (maxValue - minValue) * 100;
|
|
200
238
|
let angle;
|
|
201
239
|
if (percentage > 0 && percentage <= 50) {
|
|
202
240
|
angle = -180 + percentage / 50 * 180;
|
|
203
241
|
subMask1Style.transform = `rotate(${angle}deg)`;
|
|
204
|
-
subMask2Style.transform =
|
|
242
|
+
subMask2Style.transform = "rotate(-180deg)";
|
|
205
243
|
} else if (percentage > 50) {
|
|
206
244
|
angle = -180 + (percentage - 50) / 50 * 180;
|
|
207
|
-
subMask1Style.transform =
|
|
245
|
+
subMask1Style.transform = "rotate(0deg)";
|
|
208
246
|
subMask2Style.transform = `rotate(${angle}deg)`;
|
|
209
247
|
}
|
|
210
248
|
}
|
|
211
|
-
if (!ariaLabel && !ariaLabelledby) console.warn(
|
|
212
|
-
return
|
|
249
|
+
if (!ariaLabel && !ariaLabelledby) console.warn("ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility");
|
|
250
|
+
return /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
213
251
|
...styleProps,
|
|
214
252
|
...progressBarProps,
|
|
215
253
|
ref: domRef,
|
|
216
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports)),
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
254
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports))), "spectrum-CircleLoader", {
|
|
255
|
+
"spectrum-CircleLoader--indeterminate": isIndeterminate,
|
|
256
|
+
"spectrum-CircleLoader--small": size === "S",
|
|
257
|
+
"spectrum-CircleLoader--large": size === "L",
|
|
258
|
+
"spectrum-CircleLoader--overBackground": variant === "overBackground"
|
|
221
259
|
}, styleProps.className)
|
|
222
|
-
}, /*#__PURE__*/ $joUWQ$react.createElement("div", {
|
|
223
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports)),
|
|
224
|
-
}), /*#__PURE__*/ $joUWQ$react.createElement("div", {
|
|
225
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports)),
|
|
226
|
-
}, /*#__PURE__*/ $joUWQ$react.createElement("div", {
|
|
227
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports)),
|
|
228
|
-
}, /*#__PURE__*/ $joUWQ$react.createElement("div", {
|
|
229
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports)),
|
|
260
|
+
}, /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
261
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports))), "spectrum-CircleLoader-track")
|
|
262
|
+
}), /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
263
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports))), "spectrum-CircleLoader-fills")
|
|
264
|
+
}, /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
265
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports))), "spectrum-CircleLoader-fillMask1")
|
|
266
|
+
}, /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
267
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports))), "spectrum-CircleLoader-fillSubMask1"),
|
|
230
268
|
"data-testid": "fillSubMask1",
|
|
231
269
|
style: subMask1Style
|
|
232
|
-
}, /*#__PURE__*/ $joUWQ$react.createElement("div", {
|
|
233
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports)),
|
|
234
|
-
}))), /*#__PURE__*/ $joUWQ$react.createElement("div", {
|
|
235
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports)),
|
|
236
|
-
}, /*#__PURE__*/ $joUWQ$react.createElement("div", {
|
|
237
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports)),
|
|
270
|
+
}, /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
271
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports))), "spectrum-CircleLoader-fill")
|
|
272
|
+
}))), /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
273
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports))), "spectrum-CircleLoader-fillMask2")
|
|
274
|
+
}, /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
275
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports))), "spectrum-CircleLoader-fillSubMask2"),
|
|
238
276
|
"data-testid": "fillSubMask2",
|
|
239
277
|
style: subMask2Style
|
|
240
|
-
}, /*#__PURE__*/ $joUWQ$react.createElement("div", {
|
|
241
|
-
className: $joUWQ$classNames((/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports)),
|
|
242
|
-
})))))
|
|
278
|
+
}, /*#__PURE__*/ (0, $joUWQ$react).createElement("div", {
|
|
279
|
+
className: (0, $joUWQ$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c958cb2e66ca21$exports))), "spectrum-CircleLoader-fill")
|
|
280
|
+
})))));
|
|
243
281
|
}
|
|
244
282
|
/**
|
|
245
283
|
* ProgressCircles show the progression of a system operation such as downloading, uploading, processing, etc. in a visual way.
|
|
246
284
|
* They can represent determinate or indeterminate progress.
|
|
247
|
-
*/ let $79c16f64960b6385$export$c79b9d6b4cc92af7 = /*#__PURE__*/ $joUWQ$react.forwardRef($79c16f64960b6385$var$ProgressCircle);
|
|
285
|
+
*/ let $79c16f64960b6385$export$c79b9d6b4cc92af7 = /*#__PURE__*/ (0, $joUWQ$react).forwardRef($79c16f64960b6385$var$ProgressCircle);
|
|
248
286
|
|
|
249
287
|
|
|
250
288
|
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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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,SAAS,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAA4B;mDAGlE,CAAG;QAAC,SAAS,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAAiC;gDACjE,CAAG;QACF,SAAS,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAAoC;QAClE,CAAW,cAAC,CAAc;QAC1B,KAAK,EAAE,aAAa;gDACnB,CAAG;QAAC,SAAS,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAA4B;;AAM3E,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAe,iBAAG,YAAK,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 {ProgressBar} from './ProgressBar';\nexport {ProgressCircle} from './ProgressCircle';\nexport {ProgressBarBase} from './ProgressBarBase';\nexport type {SpectrumProgressBarProps, SpectrumProgressCircleProps} from '@react-types/progress';\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":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC,GAED;ACZA;;;;;;;;;;CAUC,GAED;;;;;;;;;;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAbA,4CAAuC;AACvC,4CAAsD;AACtD,4CAAkD;AAClD,4CAA6C;AAC7C,4CAA4C;AAC5C,4CAA6C;AAC7C,4CAAkD;AAClD,4CAA8C;AAC9C,4CAA2C;AAC3C,4CAA2C;AAC3C,2CAAuD;AACvD,4CAAgC;AAChC,4CAA+B;AAC/B,4CAAgC;;;ADahC,gDAAgD;AAChD,SAAS,sCAAgB,KAA2B,EAAE,GAA2B,EAAE;IACjF,IAAI,SACF,QAAQ,cACR,WAAW,cACX,WAAW,YACX,OAAO,aACP,MAAK,gBACL,aAAY,kBACZ,iBAAiB,CAAC,CAAC,uBACnB,gBAAgB,yBAChB,kBAAkB,KAAK,aACvB,SAAQ,cACR,WAAU,EACV,cAAc,UAAS,EACvB,mBAAmB,eAAc,EACjC,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,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AAA,gEAAM,AAAD,GAAG;QAC9B,eAAY;QACZ,OAAO;qBACP,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;wBAGvC,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;qBACjC,gCAAC;QACC,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;QAC9B,eAAY;QACZ,OAAO;qBACP,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;;AAM/C;AAEA;;;CAGC,GACD,IAAI,0DAAkB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC;","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 {ProgressBar} from './ProgressBar';\nexport {ProgressCircle} from './ProgressCircle';\nexport {ProgressBarBase} from './ProgressBarBase';\nexport type {SpectrumProgressBarProps, SpectrumProgressCircleProps} from '@react-types/progress';\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":"module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/progress",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.4",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"url": "https://github.com/adobe/react-spectrum"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@react-aria/
|
|
36
|
-
"@react-
|
|
37
|
-
"@react-spectrum/utils": "^3.8.0",
|
|
34
|
+
"@react-aria/progress": "^3.3.4",
|
|
35
|
+
"@react-aria/utils": "^3.14.2",
|
|
36
|
+
"@react-spectrum/utils": "^3.8.1",
|
|
38
37
|
"@react-types/progress": "^3.2.5",
|
|
39
|
-
"@react-types/shared": "^3.16.0"
|
|
38
|
+
"@react-types/shared": "^3.16.0",
|
|
39
|
+
"@swc/helpers": "^0.4.14"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "5480d76bd815e239366f92852c76b6831ad2a4fd"
|
|
52
52
|
}
|