@react-spectrum/switch 3.3.2 → 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 CHANGED
@@ -1 +1 @@
1
- [dir=ltr] .spectrum-ToggleSwitch_3526dd{margin-right:calc(var(--spectrum-switch-cursor-hit-x,var(--spectrum-global-dimension-size-100))*2)}[dir=rtl] .spectrum-ToggleSwitch_3526dd{margin-left:calc(var(--spectrum-switch-cursor-hit-x,var(--spectrum-global-dimension-size-100))*2)}.spectrum-ToggleSwitch_3526dd{min-height:var(--spectrum-switch-height,var(--spectrum-global-dimension-size-400));max-width:100%;vertical-align:top;isolation:isolate;align-items:flex-start;display:inline-flex;position:relative}[dir=ltr] .spectrum-ToggleSwitch-input_3526dd{left:0}[dir=rtl] .spectrum-ToggleSwitch-input_3526dd{right:0}.spectrum-ToggleSwitch-input_3526dd{box-sizing:border-box;width:100%;height:100%;opacity:.0001;z-index:1;cursor:default;margin:0;padding:0;position:absolute;top:0}[dir=ltr] .spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{transform:translateX(var(--spectrum-switch-handle-transform-x-ltr))}[dir=rtl] .spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{transform:translateX(var(--spectrum-switch-handle-transform-x-rtl))}.spectrum-ToggleSwitch-input_3526dd:disabled,.spectrum-ToggleSwitch-input_3526dd[disabled]{cursor:default}.spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd+.spectrum-ToggleSwitch-switch_3526dd:after{margin:calc(var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25))*-1)}[dir=ltr] .spectrum-ToggleSwitch-label_3526dd{text-align:left}[dir=rtl] .spectrum-ToggleSwitch-label_3526dd{text-align:right}.spectrum-ToggleSwitch-label_3526dd{margin:0 var(--spectrum-switch-text-gap,var(--spectrum-global-dimension-size-125));margin-top:var(--spectrum-global-dimension-size-65);font-size:var(--spectrum-switch-text-size,var(--spectrum-alias-font-size-default));transition:color var(--spectrum-global-animation-duration-200,160ms)ease-in-out;line-height:1.49}[dir=ltr] .spectrum-ToggleSwitch-switch_3526dd{left:0}[dir=rtl] .spectrum-ToggleSwitch-switch_3526dd,[dir=ltr] .spectrum-ToggleSwitch-switch_3526dd{right:0}[dir=rtl] .spectrum-ToggleSwitch-switch_3526dd{left:0}.spectrum-ToggleSwitch-switch_3526dd{box-sizing:border-box;width:var(--spectrum-switch-track-width);margin:calc((var(--spectrum-switch-height,var(--spectrum-global-dimension-size-400)) - var(--spectrum-switch-track-height,var(--spectrum-global-dimension-size-175)))/2)0;vertical-align:middle;will-change:transform;transition:background var(--spectrum-global-animation-duration-100,130ms)ease-in-out,border var(--spectrum-global-animation-duration-100,130ms)ease-in-out;height:var(--spectrum-switch-track-height,var(--spectrum-global-dimension-size-175));border-radius:calc(var(--spectrum-switch-track-height,var(--spectrum-global-dimension-size-175))/2);flex-grow:0;flex-shrink:0;display:inline-block;position:relative}.spectrum-ToggleSwitch-switch_3526dd:before{content:"";box-sizing:border-box;display:block;position:absolute}[dir=ltr] .spectrum-ToggleSwitch-switch_3526dd:before{left:0}[dir=rtl] .spectrum-ToggleSwitch-switch_3526dd:before{right:0}.spectrum-ToggleSwitch-switch_3526dd:before{transition:background var(--spectrum-global-animation-duration-100,130ms)ease-in-out,border var(--spectrum-global-animation-duration-100,130ms)ease-in-out,transform var(--spectrum-global-animation-duration-100,130ms)ease-in-out,box-shadow var(--spectrum-global-animation-duration-100,130ms)ease-in-out;width:var(--spectrum-switch-handle-size,var(--spectrum-global-dimension-size-175));height:var(--spectrum-switch-handle-size,var(--spectrum-global-dimension-size-175));border-width:var(--spectrum-switch-handle-border-size,var(--spectrum-alias-border-size-thick));border-radius:var(--spectrum-switch-handle-border-radius);border-style:solid;top:0}.spectrum-ToggleSwitch-switch_3526dd:after{border-radius:calc(var(--spectrum-switch-track-height,var(--spectrum-global-dimension-size-175)) + var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25)));content:"";transition:box-shadow var(--spectrum-global-animation-duration-100,130ms)ease-out,margin var(--spectrum-global-animation-duration-100,130ms)ease-out;margin:0;display:block;position:absolute;top:0;bottom:0;left:0;right:0;transform:translate(0)}.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch-switch_3526dd:before{background-color:var(--spectrum-switch-emphasized-handle-background-color,var(--spectrum-global-color-gray-75));border-color:var(--spectrum-switch-emphasized-handle-border-color,var(--spectrum-global-color-gray-600))}.spectrum-ToggleSwitch-input_3526dd~.spectrum-ToggleSwitch-label_3526dd{color:var(--spectrum-switch-emphasized-text-color,var(--spectrum-alias-text-color))}.spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color-selected,var(--spectrum-global-color-blue-500))}.spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-selected,var(--spectrum-global-color-blue-500))}.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-hover,var(--spectrum-global-color-gray-700));box-shadow:none}.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd~.spectrum-ToggleSwitch-label_3526dd{color:var(--spectrum-switch-emphasized-text-color-hover,var(--spectrum-alias-text-color-hover))}.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color-selected-hover,var(--spectrum-global-color-blue-600))}.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-selected-hover,var(--spectrum-global-color-blue-600))}.spectrum-ToggleSwitch_3526dd:active .spectrum-ToggleSwitch-input_3526dd+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-down,var(--spectrum-global-color-gray-800))}.spectrum-ToggleSwitch_3526dd:active .spectrum-ToggleSwitch-input_3526dd~.spectrum-ToggleSwitch-label_3526dd{color:var(--spectrum-switch-emphasized-text-color-down,var(--spectrum-alias-text-color-down))}.spectrum-ToggleSwitch_3526dd:active .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color-selected-down,var(--spectrum-global-color-blue-700))}.spectrum-ToggleSwitch_3526dd:active .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-selected-down,var(--spectrum-global-color-blue-700))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color-disabled,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-disabled,var(--spectrum-global-color-gray-400))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled~.spectrum-ToggleSwitch-label_3526dd{color:var(--spectrum-switch-emphasized-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color-selected-disabled,var(--spectrum-global-color-gray-400))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-selected-disabled,var(--spectrum-global-color-gray-400))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled:checked~.spectrum-ToggleSwitch-label_3526dd{color:var(--spectrum-switch-emphasized-text-color-selected-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-ToggleSwitch--quiet_3526dd .spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-quiet-track-color-selected,var(--spectrum-global-color-gray-700))}.spectrum-ToggleSwitch--quiet_3526dd .spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-quiet-handle-border-color-selected,var(--spectrum-global-color-gray-700))}.spectrum-ToggleSwitch--quiet_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-quiet-track-color-selected-hover,var(--spectrum-global-color-gray-800))}.spectrum-ToggleSwitch--quiet_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-quiet-handle-border-color-selected-hover,var(--spectrum-global-color-gray-800))}.spectrum-ToggleSwitch_3526dd.spectrum-ToggleSwitch--quiet_3526dd:active .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-quiet-track-color-selected-down,var(--spectrum-global-color-gray-900))}.spectrum-ToggleSwitch_3526dd.spectrum-ToggleSwitch--quiet_3526dd:active .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-quiet-handle-border-color-selected-down,var(--spectrum-global-color-gray-900))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd+.spectrum-ToggleSwitch-switch_3526dd:after,.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd+.spectrum-ToggleSwitch-switch_3526dd:after{box-shadow:0 0 0 var(--spectrum-switch-focus-ring-size-key-focus,var(--spectrum-alias-focus-ring-size))var(--spectrum-switch-focus-ring-color-key-focus,var(--spectrum-alias-focus-ring-color))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd+.spectrum-ToggleSwitch-switch_3526dd:before,.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-key-focus,var(--spectrum-global-color-gray-700))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd,.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color-selected-key-focus,var(--spectrum-global-color-blue-600))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before,.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-selected-key-focus,var(--spectrum-global-color-blue-600))}.spectrum-ToggleSwitch--quiet_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd,.spectrum-ToggleSwitch--quiet_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-quiet-track-color-selected-key-focus,var(--spectrum-global-color-gray-800))}.spectrum-ToggleSwitch--quiet_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before,.spectrum-ToggleSwitch--quiet_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-quiet-handle-border-color-selected-key-focus,var(--spectrum-global-color-gray-800))}.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-track-color,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-handle-border-color,var(--spectrum-global-color-gray-600))}.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-track-color,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-handle-border-color-selected,var(--spectrum-global-color-gray-700))}.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled:checked+.spectrum-ToggleSwitch-switch_3526dd,.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color-disabled,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-disabled,var(--spectrum-global-color-gray-400))}.spectrum-ToggleSwitch--ab_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch--ab_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-hover,var(--spectrum-global-color-gray-700))}.spectrum-ToggleSwitch--ab_3526dd:active .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch--ab_3526dd:active .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-down,var(--spectrum-global-color-gray-800))}@media (forced-colors:active){.spectrum-ToggleSwitch_3526dd{forced-color-adjust:none;--spectrum-switch-emphasized-handle-background-color:ButtonFace;--spectrum-switch-emphasized-handle-border-color:ButtonText;--spectrum-switch-emphasized-handle-border-color-disabled:GrayText;--spectrum-switch-emphasized-handle-border-color-down:Highlight;--spectrum-switch-emphasized-handle-border-color-hover:Highlight;--spectrum-switch-emphasized-handle-border-color-key-focus:ButtonText;--spectrum-switch-emphasized-handle-border-color-selected:Highlight;--spectrum-switch-emphasized-handle-border-color-selected-disabled:GrayText;--spectrum-switch-emphasized-handle-border-color-selected-down:Highlight;--spectrum-switch-emphasized-handle-border-color-selected-hover:Highlight;--spectrum-switch-emphasized-handle-border-color-selected-key-focus:Highlight;--spectrum-switch-emphasized-text-color:CanvasText;--spectrum-switch-emphasized-text-color-disabled:GrayText;--spectrum-switch-emphasized-text-color-down:CanvasText;--spectrum-switch-emphasized-text-color-hover:CanvasText;--spectrum-switch-emphasized-text-color-selected-disabled:GrayText;--spectrum-switch-emphasized-track-color:ButtonFace;--spectrum-switch-emphasized-track-color-disabled:ButtonFace;--spectrum-switch-emphasized-track-color-selected:Highlight;--spectrum-switch-emphasized-track-color-selected-disabled:GrayText;--spectrum-switch-emphasized-track-color-selected-down:Highlight;--spectrum-switch-emphasized-track-color-selected-hover:Highlight;--spectrum-switch-emphasized-track-color-selected-key-focus:Highlight;--spectrum-switch-focus-ring-color-key-focus:ButtonText;--spectrum-switch-handle-border-color:ButtonText;--spectrum-switch-handle-border-color-selected:Highlight;--spectrum-switch-quiet-handle-border-color-selected:Highlight;--spectrum-switch-quiet-handle-border-color-selected-down:Highlight;--spectrum-switch-quiet-handle-border-color-selected-hover:Highlight;--spectrum-switch-quiet-handle-border-color-selected-key-focus:Highlight;--spectrum-switch-quiet-track-color-selected:Highlight;--spectrum-switch-quiet-track-color-selected-down:Highlight;--spectrum-switch-quiet-track-color-selected-hover:Highlight;--spectrum-switch-quiet-track-color-selected-key-focus:Highlight;--spectrum-switch-track-color:ButtonFace;--spectrum-switch-track-color-disabled:ButtonFace}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:not(:checked)+.spectrum-ToggleSwitch-switch_3526dd{box-shadow:inset 0 0 0 1px var(--spectrum-switch-handle-border-color,var(--spectrum-global-color-gray-600))}.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:not(:checked)+.spectrum-ToggleSwitch-switch_3526dd{box-shadow:inset 0 0 0 1px var(--spectrum-switch-emphasized-handle-border-color-hover,var(--spectrum-global-color-gray-700))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled+.spectrum-ToggleSwitch-switch_3526dd{box-shadow:inset 0 0 0 1px var(--spectrum-switch-emphasized-handle-border-color-disabled,var(--spectrum-global-color-gray-400))}}
1
+ [dir=ltr] .spectrum-ToggleSwitch_3526dd{margin-right:calc(var(--spectrum-switch-cursor-hit-x,var(--spectrum-global-dimension-size-100))*2)}[dir=rtl] .spectrum-ToggleSwitch_3526dd{margin-left:calc(var(--spectrum-switch-cursor-hit-x,var(--spectrum-global-dimension-size-100))*2)}.spectrum-ToggleSwitch_3526dd{min-height:var(--spectrum-switch-height,var(--spectrum-global-dimension-size-400));max-width:100%;vertical-align:top;isolation:isolate;align-items:flex-start;display:inline-flex;position:relative}[dir=ltr] .spectrum-ToggleSwitch-input_3526dd{left:0}[dir=rtl] .spectrum-ToggleSwitch-input_3526dd{right:0}.spectrum-ToggleSwitch-input_3526dd{box-sizing:border-box;width:100%;height:100%;opacity:.0001;z-index:1;cursor:default;margin:0;padding:0;position:absolute;top:0}[dir=ltr] .spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{transform:translateX(calc(var(--spectrum-switch-track-width) - 100%))}[dir=rtl] .spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{transform:translateX(calc(100% - var(--spectrum-switch-track-width)))}.spectrum-ToggleSwitch-input_3526dd:disabled,.spectrum-ToggleSwitch-input_3526dd[disabled]{cursor:default}.spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd+.spectrum-ToggleSwitch-switch_3526dd:after{margin:calc(var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25))*-1)}[dir=ltr] .spectrum-ToggleSwitch-label_3526dd{text-align:left}[dir=rtl] .spectrum-ToggleSwitch-label_3526dd{text-align:right}.spectrum-ToggleSwitch-label_3526dd{margin:0 var(--spectrum-switch-text-gap,var(--spectrum-global-dimension-size-125));margin-top:var(--spectrum-global-dimension-size-65);font-size:var(--spectrum-switch-text-size,var(--spectrum-alias-font-size-default));transition:color var(--spectrum-global-animation-duration-200,.16s)ease-in-out;line-height:1.49}[dir=ltr] .spectrum-ToggleSwitch-switch_3526dd{left:0}[dir=rtl] .spectrum-ToggleSwitch-switch_3526dd,[dir=ltr] .spectrum-ToggleSwitch-switch_3526dd{right:0}[dir=rtl] .spectrum-ToggleSwitch-switch_3526dd{left:0}.spectrum-ToggleSwitch-switch_3526dd{box-sizing:border-box;width:var(--spectrum-switch-track-width);margin:calc((var(--spectrum-switch-height,var(--spectrum-global-dimension-size-400)) - var(--spectrum-switch-track-height,var(--spectrum-global-dimension-size-175)))/2)0;vertical-align:middle;will-change:transform;transition:background var(--spectrum-global-animation-duration-100,.13s)ease-in-out,border var(--spectrum-global-animation-duration-100,.13s)ease-in-out;height:var(--spectrum-switch-track-height,var(--spectrum-global-dimension-size-175));border-radius:calc(var(--spectrum-switch-track-height,var(--spectrum-global-dimension-size-175))/2);flex-grow:0;flex-shrink:0;display:inline-block;position:relative}.spectrum-ToggleSwitch-switch_3526dd:before{content:"";box-sizing:border-box;display:block;position:absolute}[dir=ltr] .spectrum-ToggleSwitch-switch_3526dd:before{left:0}[dir=rtl] .spectrum-ToggleSwitch-switch_3526dd:before{right:0}.spectrum-ToggleSwitch-switch_3526dd:before{transition:background var(--spectrum-global-animation-duration-100,.13s)ease-in-out,border var(--spectrum-global-animation-duration-100,.13s)ease-in-out,transform var(--spectrum-global-animation-duration-100,.13s)ease-in-out,box-shadow var(--spectrum-global-animation-duration-100,.13s)ease-in-out;width:var(--spectrum-switch-handle-size,var(--spectrum-global-dimension-size-175));height:var(--spectrum-switch-handle-size,var(--spectrum-global-dimension-size-175));border-width:var(--spectrum-switch-handle-border-size,var(--spectrum-alias-border-size-thick));border-radius:calc(var(--spectrum-switch-handle-size,var(--spectrum-global-dimension-size-175))/2);border-style:solid;top:0}.spectrum-ToggleSwitch-switch_3526dd:after{border-radius:calc(var(--spectrum-switch-track-height,var(--spectrum-global-dimension-size-175)) + var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25)));content:"";transition:box-shadow var(--spectrum-global-animation-duration-100,.13s)ease-out,margin var(--spectrum-global-animation-duration-100,.13s)ease-out;margin:0;display:block;position:absolute;top:0;bottom:0;left:0;right:0;transform:translate(0)}.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch-switch_3526dd:before{background-color:var(--spectrum-switch-emphasized-handle-background-color,var(--spectrum-global-color-gray-75));border-color:var(--spectrum-alias-toggle-color-default)}.spectrum-ToggleSwitch-input_3526dd~.spectrum-ToggleSwitch-label_3526dd{color:var(--spectrum-switch-emphasized-text-color,var(--spectrum-alias-text-color))}.spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-accent-color-900)}.spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-accent-color-900)}.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-alias-toggle-color-hover);box-shadow:none}.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd~.spectrum-ToggleSwitch-label_3526dd{color:var(--spectrum-switch-emphasized-text-color-hover,var(--spectrum-alias-text-color-hover))}.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-accent-color-1000)}.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-accent-color-1000)}.spectrum-ToggleSwitch_3526dd:active .spectrum-ToggleSwitch-input_3526dd+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-down,var(--spectrum-global-color-gray-800))}.spectrum-ToggleSwitch_3526dd:active .spectrum-ToggleSwitch-input_3526dd~.spectrum-ToggleSwitch-label_3526dd{color:var(--spectrum-switch-emphasized-text-color-down,var(--spectrum-alias-text-color-down))}.spectrum-ToggleSwitch_3526dd:active .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-accent-color-1100)}.spectrum-ToggleSwitch_3526dd:active .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-accent-color-1100)}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color-disabled,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-disabled,var(--spectrum-global-color-gray-400))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled~.spectrum-ToggleSwitch-label_3526dd{color:var(--spectrum-switch-emphasized-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color-selected-disabled,var(--spectrum-global-color-gray-400))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-selected-disabled,var(--spectrum-global-color-gray-400))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled:checked~.spectrum-ToggleSwitch-label_3526dd{color:var(--spectrum-switch-emphasized-text-color-selected-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-ToggleSwitch--quiet_3526dd .spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-alias-toggle-color-selected)}.spectrum-ToggleSwitch--quiet_3526dd .spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-alias-toggle-color-selected)}.spectrum-ToggleSwitch--quiet_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-alias-toggle-color-selected-hover)}.spectrum-ToggleSwitch--quiet_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-alias-toggle-color-selected-hover)}.spectrum-ToggleSwitch_3526dd.spectrum-ToggleSwitch--quiet_3526dd:active .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-quiet-track-color-selected-down,var(--spectrum-global-color-gray-900))}.spectrum-ToggleSwitch_3526dd.spectrum-ToggleSwitch--quiet_3526dd:active .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-quiet-handle-border-color-selected-down,var(--spectrum-global-color-gray-900))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd+.spectrum-ToggleSwitch-switch_3526dd:after,.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd+.spectrum-ToggleSwitch-switch_3526dd:after{box-shadow:0 0 0 var(--spectrum-switch-focus-ring-size-key-focus,var(--spectrum-alias-focus-ring-size))var(--spectrum-switch-focus-ring-color-key-focus,var(--spectrum-alias-focus-ring-color))}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd+.spectrum-ToggleSwitch-switch_3526dd:before,.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-alias-toggle-color-key-focus)}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd,.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-accent-color-1000)}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before,.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-accent-color-1000)}.spectrum-ToggleSwitch--quiet_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd,.spectrum-ToggleSwitch--quiet_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-alias-toggle-color-selected-key-focus)}.spectrum-ToggleSwitch--quiet_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before,.spectrum-ToggleSwitch--quiet_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-alias-toggle-color-selected-key-focus)}.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-track-color,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-handle-border-color,var(--spectrum-global-color-gray-600))}.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-track-color,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd.focus-ring_3526dd:checked+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-handle-border-color-selected,var(--spectrum-global-color-gray-700))}.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled:checked+.spectrum-ToggleSwitch-switch_3526dd,.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color-disabled,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch--ab_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-disabled,var(--spectrum-global-color-gray-400))}.spectrum-ToggleSwitch--ab_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch--ab_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-alias-toggle-color-hover)}.spectrum-ToggleSwitch--ab_3526dd:active .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd{background-color:var(--spectrum-switch-emphasized-track-color,var(--spectrum-global-color-gray-300))}.spectrum-ToggleSwitch--ab_3526dd:active .spectrum-ToggleSwitch-input_3526dd:checked:enabled+.spectrum-ToggleSwitch-switch_3526dd:before{border-color:var(--spectrum-switch-emphasized-handle-border-color-down,var(--spectrum-global-color-gray-800))}@media (forced-colors:active){.spectrum-ToggleSwitch_3526dd{forced-color-adjust:none;--spectrum-switch-emphasized-handle-background-color:ButtonFace;--spectrum-switch-emphasized-handle-border-color:ButtonText;--spectrum-switch-emphasized-handle-border-color-disabled:GrayText;--spectrum-switch-emphasized-handle-border-color-down:Highlight;--spectrum-switch-emphasized-handle-border-color-hover:Highlight;--spectrum-switch-emphasized-handle-border-color-key-focus:ButtonText;--spectrum-switch-emphasized-handle-border-color-selected:Highlight;--spectrum-switch-emphasized-handle-border-color-selected-disabled:GrayText;--spectrum-switch-emphasized-handle-border-color-selected-down:Highlight;--spectrum-switch-emphasized-handle-border-color-selected-hover:Highlight;--spectrum-switch-emphasized-handle-border-color-selected-key-focus:Highlight;--spectrum-switch-emphasized-text-color:CanvasText;--spectrum-switch-emphasized-text-color-disabled:GrayText;--spectrum-switch-emphasized-text-color-down:CanvasText;--spectrum-switch-emphasized-text-color-hover:CanvasText;--spectrum-switch-emphasized-text-color-selected-disabled:GrayText;--spectrum-switch-emphasized-track-color:ButtonFace;--spectrum-switch-emphasized-track-color-disabled:ButtonFace;--spectrum-switch-emphasized-track-color-selected:Highlight;--spectrum-switch-emphasized-track-color-selected-disabled:GrayText;--spectrum-switch-emphasized-track-color-selected-down:Highlight;--spectrum-switch-emphasized-track-color-selected-hover:Highlight;--spectrum-switch-emphasized-track-color-selected-key-focus:Highlight;--spectrum-switch-focus-ring-color-key-focus:ButtonText;--spectrum-switch-handle-border-color:ButtonText;--spectrum-switch-handle-border-color-selected:Highlight;--spectrum-switch-quiet-handle-border-color-selected:Highlight;--spectrum-switch-quiet-handle-border-color-selected-down:Highlight;--spectrum-switch-quiet-handle-border-color-selected-hover:Highlight;--spectrum-switch-quiet-handle-border-color-selected-key-focus:Highlight;--spectrum-switch-quiet-track-color-selected:Highlight;--spectrum-switch-quiet-track-color-selected-down:Highlight;--spectrum-switch-quiet-track-color-selected-hover:Highlight;--spectrum-switch-quiet-track-color-selected-key-focus:Highlight;--spectrum-switch-track-color:ButtonFace;--spectrum-switch-track-color-disabled:ButtonFace}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:not(:checked)+.spectrum-ToggleSwitch-switch_3526dd{box-shadow:inset 0 0 0 1px var(--spectrum-switch-handle-border-color,var(--spectrum-global-color-gray-600))}.spectrum-ToggleSwitch_3526dd.is-hovered_3526dd .spectrum-ToggleSwitch-input_3526dd:not(:checked)+.spectrum-ToggleSwitch-switch_3526dd{box-shadow:inset 0 0 0 1px var(--spectrum-alias-toggle-color-hover)}.spectrum-ToggleSwitch_3526dd .spectrum-ToggleSwitch-input_3526dd:disabled+.spectrum-ToggleSwitch-switch_3526dd{box-shadow:inset 0 0 0 1px var(--spectrum-switch-emphasized-handle-border-color-disabled,var(--spectrum-global-color-gray-400))}}
package/dist/main.js CHANGED
@@ -15,7 +15,28 @@ function $parcel$interopDefault(a) {
15
15
  }
16
16
 
17
17
  $parcel$export(module.exports, "Switch", () => $e216104aee091306$export$b5d5cf8927ab7262);
18
-
18
+ /*
19
+ * Copyright 2020 Adobe. All rights reserved.
20
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
21
+ * you may not use this file except in compliance with the License. You may obtain a copy
22
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
23
+ *
24
+ * Unless required by applicable law or agreed to in writing, software distributed under
25
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
26
+ * OF ANY KIND, either express or implied. See the License for the specific language
27
+ * governing permissions and limitations under the License.
28
+ */ /// <reference types="css-module-types" />
29
+ /*
30
+ * Copyright 2020 Adobe. All rights reserved.
31
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
32
+ * you may not use this file except in compliance with the License. You may obtain a copy
33
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
34
+ *
35
+ * Unless required by applicable law or agreed to in writing, software distributed under
36
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
37
+ * OF ANY KIND, either express or implied. See the License for the specific language
38
+ * governing permissions and limitations under the License.
39
+ */
19
40
 
20
41
 
21
42
  var $faeb9d1b92049ba7$exports = {};
@@ -51,42 +72,42 @@ $faeb9d1b92049ba7$export$dc5a33fddabf5882 = "spectrum-ToggleSwitch--ab_3526dd";
51
72
 
52
73
 
53
74
  function $e216104aee091306$var$Switch(props, ref) {
54
- props = $3fKzX$reactspectrumprovider.useProviderProps(props);
75
+ props = (0, $3fKzX$reactspectrumprovider.useProviderProps)(props);
55
76
  let { isEmphasized: isEmphasized = false , isDisabled: isDisabled = false , autoFocus: autoFocus , children: children , ...otherProps } = props;
56
- let { styleProps: styleProps } = $3fKzX$reactspectrumutils.useStyleProps(otherProps);
57
- let { hoverProps: hoverProps , isHovered: isHovered } = $3fKzX$reactariainteractions.useHover({
77
+ let { styleProps: styleProps } = (0, $3fKzX$reactspectrumutils.useStyleProps)(otherProps);
78
+ let { hoverProps: hoverProps , isHovered: isHovered } = (0, $3fKzX$reactariainteractions.useHover)({
58
79
  isDisabled: isDisabled
59
80
  });
60
- let inputRef = $3fKzX$react.useRef(null);
61
- let domRef = $3fKzX$reactspectrumutils.useFocusableRef(ref, inputRef);
62
- let state = $3fKzX$reactstatelytoggle.useToggleState(props);
63
- let { inputProps: inputProps } = $3fKzX$reactariaswitch.useSwitch(props, state, inputRef);
64
- return(/*#__PURE__*/ ($parcel$interopDefault($3fKzX$react)).createElement("label", {
81
+ let inputRef = (0, $3fKzX$react.useRef)(null);
82
+ let domRef = (0, $3fKzX$reactspectrumutils.useFocusableRef)(ref, inputRef);
83
+ let state = (0, $3fKzX$reactstatelytoggle.useToggleState)(props);
84
+ let { inputProps: inputProps } = (0, $3fKzX$reactariaswitch.useSwitch)(props, state, inputRef);
85
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($3fKzX$react))).createElement("label", {
65
86
  ...styleProps,
66
87
  ...hoverProps,
67
88
  ref: domRef,
68
- className: $3fKzX$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($faeb9d1b92049ba7$exports)), 'spectrum-ToggleSwitch', {
69
- 'spectrum-ToggleSwitch--quiet': !isEmphasized,
70
- 'is-disabled': isDisabled,
71
- 'is-hovered': isHovered
89
+ className: (0, $3fKzX$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($faeb9d1b92049ba7$exports))), "spectrum-ToggleSwitch", {
90
+ "spectrum-ToggleSwitch--quiet": !isEmphasized,
91
+ "is-disabled": isDisabled,
92
+ "is-hovered": isHovered
72
93
  }, styleProps.className)
73
- }, /*#__PURE__*/ ($parcel$interopDefault($3fKzX$react)).createElement($3fKzX$reactariafocus.FocusRing, {
74
- focusRingClass: $3fKzX$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($faeb9d1b92049ba7$exports)), 'focus-ring'),
94
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($3fKzX$react))).createElement((0, $3fKzX$reactariafocus.FocusRing), {
95
+ focusRingClass: (0, $3fKzX$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($faeb9d1b92049ba7$exports))), "focus-ring"),
75
96
  autoFocus: autoFocus
76
- }, /*#__PURE__*/ ($parcel$interopDefault($3fKzX$react)).createElement("input", {
97
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($3fKzX$react))).createElement("input", {
77
98
  ...inputProps,
78
99
  ref: inputRef,
79
- className: $3fKzX$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($faeb9d1b92049ba7$exports)), 'spectrum-ToggleSwitch-input')
80
- })), /*#__PURE__*/ ($parcel$interopDefault($3fKzX$react)).createElement("span", {
81
- className: $3fKzX$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($faeb9d1b92049ba7$exports)), 'spectrum-ToggleSwitch-switch')
82
- }), children && /*#__PURE__*/ ($parcel$interopDefault($3fKzX$react)).createElement("span", {
83
- className: $3fKzX$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($faeb9d1b92049ba7$exports)), 'spectrum-ToggleSwitch-label')
84
- }, children)));
100
+ className: (0, $3fKzX$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($faeb9d1b92049ba7$exports))), "spectrum-ToggleSwitch-input")
101
+ })), /*#__PURE__*/ (0, ($parcel$interopDefault($3fKzX$react))).createElement("span", {
102
+ className: (0, $3fKzX$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($faeb9d1b92049ba7$exports))), "spectrum-ToggleSwitch-switch")
103
+ }), children && /*#__PURE__*/ (0, ($parcel$interopDefault($3fKzX$react))).createElement("span", {
104
+ className: (0, $3fKzX$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($faeb9d1b92049ba7$exports))), "spectrum-ToggleSwitch-label")
105
+ }, children));
85
106
  }
86
107
  /**
87
108
  * Switches allow users to turn an individual option on or off.
88
109
  * They are usually used to activate or deactivate a specific setting.
89
- */ const $e216104aee091306$export$b5d5cf8927ab7262 = /*#__PURE__*/ $3fKzX$react.forwardRef($e216104aee091306$var$Switch);
110
+ */ const $e216104aee091306$export$b5d5cf8927ab7262 = /*#__PURE__*/ (0, $3fKzX$react.forwardRef)($e216104aee091306$var$Switch);
90
111
 
91
112
 
92
113
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAuC;AACvC,GAA6C;AAC7C,GAA8C;AAC9C,GAA4B;AAC5B,GAA6C;AAC7C,GAA4B;AAC5B,GAA8C;AAC9C,GAA2C;AAP3C,yCAAuC,GAAG,CAA8B;AACxE,yCAA6C,GAAG,CAAoC;AACpF,yCAA8C,GAAG,CAAqC;AACtF,yCAA4B,GAAG,CAAmB;AAClD,yCAA6C,GAAG,CAAoC;AACpF,yCAA4B,GAAG,CAAmB;AAClD,yCAA8C,GAAG,CAAqC;AACtF,yCAA2C,GAAG,CAAkC;;;;;;;SDgBvE,4BAAM,CAAC,KAA0B,EAAE,GAAmC,EAAE,CAAC;IAChF,KAAK,GAAG,6CAAgB,CAAC,KAAK;IAC9B,GAAG,CAAC,CAAC,eACH,YAAY,GAAG,KAAK,eACpB,UAAU,GAAG,KAAK,cAClB,SAAS,aACT,QAAQ,MACL,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,CAAC,aAAA,UAAU,cAAE,SAAS,EAAA,CAAC,GAAG,qCAAQ,CAAC,CAAC;oBAAA,UAAU;IAAA,CAAC;IAEnD,GAAG,CAAC,QAAQ,GAAG,mBAAM,CAAmB,IAAI;IAC5C,GAAG,CAAC,MAAM,GAAG,yCAAe,CAAC,GAAG,EAAE,QAAQ;IAC1C,GAAG,CAAC,KAAK,GAAG,wCAAc,CAAC,KAAK;IAChC,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,gCAAS,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ;IAGnD,MAAM,oEACH,CAAK;WACA,UAAU;WACV,UAAU;QACd,GAAG,EAAE,MAAM;QACX,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAAuB,wBACvB,CAAC;YACC,CAA8B,gCAAG,YAAY;YAC7C,CAAa,cAAE,UAAU;YACzB,CAAY,aAAE,SAAS;QACzB,CAAC,EACD,UAAU,CAAC,SAAS;0EAGvB,+BAAS;QAAC,cAAc,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAAY;QAAG,SAAS,EAAE,SAAS;0EAC9E,CAAK;WACA,UAAU;QACd,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAA6B;4EAE9D,CAAI;QAAC,SAAS,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAA8B;QACjE,QAAQ,uEACN,CAAI;QAAC,SAAS,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAA6B;OAC9D,QAAQ;AAKnB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,KAAK,CAAC,yCAAO,iBAAG,uBAAU,CAAC,4BAAM","sources":["packages/@react-spectrum/switch/src/index.ts","packages/@react-spectrum/switch/src/Switch.tsx","packages/@adobe/spectrum-css-temp/components/toggle/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 {Switch} from './Switch';\nexport type {SpectrumSwitchProps} from '@react-types/switch';\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, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumSwitchProps} from '@react-types/switch';\nimport styles from '@adobe/spectrum-css-temp/components/toggle/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useSwitch} from '@react-aria/switch';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction Switch(props: SpectrumSwitchProps, ref: FocusableRef<HTMLLabelElement>) {\n props = useProviderProps(props);\n let {\n isEmphasized = false,\n isDisabled = false,\n autoFocus,\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let inputRef = useRef<HTMLInputElement>(null);\n let domRef = useFocusableRef(ref, inputRef);\n let state = useToggleState(props);\n let {inputProps} = useSwitch(props, state, inputRef);\n\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ToggleSwitch',\n {\n 'spectrum-ToggleSwitch--quiet': !isEmphasized,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <input\n {...inputProps}\n ref={inputRef}\n className={classNames(styles, 'spectrum-ToggleSwitch-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-ToggleSwitch-switch')} />\n {children && (\n <span className={classNames(styles, 'spectrum-ToggleSwitch-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n\n/**\n * Switches allow users to turn an individual option on or off.\n * They are usually used to activate or deactivate a specific setting.\n */\nconst _Switch = forwardRef(Switch);\nexport {_Switch as Switch};\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,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAPA,4CAA0C;AAC1C,4CAAgD;AAChD,4CAAiD;AACjD,4CAA+B;AAC/B,4CAAgD;AAChD,4CAA+B;AAC/B,4CAAiD;AACjD,4CAA8C;;;;;;;ADgB9C,SAAS,6BAAO,KAA0B,EAAE,GAAmC,EAAE;IAC/E,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,gBACF,eAAe,KAAK,eACpB,aAAa,KAAK,cAClB,UAAS,YACT,SAAQ,EACR,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,uCAAa,AAAD,EAAE;IACjC,IAAI,cAAC,WAAU,aAAE,UAAS,EAAC,GAAG,CAAA,GAAA,qCAAQ,AAAD,EAAE;oBAAC;IAAU;IAElD,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAoB,IAAI;IAC5C,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE,KAAK;IAClC,IAAI,QAAQ,CAAA,GAAA,wCAAa,EAAE;IAC3B,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,gCAAS,AAAD,EAAE,OAAO,OAAO;IAG3C,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,UAAU;QACd,KAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,yDAAM,OAAD,GACL,yBACA;YACE,gCAAgC,CAAC;YACjC,eAAe;YACf,cAAc;QAChB,GACA,WAAW,SAAS;qBAGxB,0DAAC,CAAA,GAAA,+BAAQ;QAAE,gBAAgB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;QAAe,WAAW;qBACtE,0DAAC;QACE,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;uBAElC,0DAAC;QAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;QACnC,0BACC,0DAAC;QAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACjC;AAKX;AAEA;;;CAGC,GACD,MAAM,0DAAU,CAAA,GAAA,uBAAS,EAAE;;ADhE3B","sources":["packages/@react-spectrum/switch/src/index.ts","packages/@react-spectrum/switch/src/Switch.tsx","packages/@adobe/spectrum-css-temp/components/toggle/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 {Switch} from './Switch';\nexport type {SpectrumSwitchProps} from '@react-types/switch';\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, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumSwitchProps} from '@react-types/switch';\nimport styles from '@adobe/spectrum-css-temp/components/toggle/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useSwitch} from '@react-aria/switch';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction Switch(props: SpectrumSwitchProps, ref: FocusableRef<HTMLLabelElement>) {\n props = useProviderProps(props);\n let {\n isEmphasized = false,\n isDisabled = false,\n autoFocus,\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let inputRef = useRef<HTMLInputElement>(null);\n let domRef = useFocusableRef(ref, inputRef);\n let state = useToggleState(props);\n let {inputProps} = useSwitch(props, state, inputRef);\n\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ToggleSwitch',\n {\n 'spectrum-ToggleSwitch--quiet': !isEmphasized,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <input\n {...inputProps}\n ref={inputRef}\n className={classNames(styles, 'spectrum-ToggleSwitch-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-ToggleSwitch-switch')} />\n {children && (\n <span className={classNames(styles, 'spectrum-ToggleSwitch-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n\n/**\n * Switches allow users to turn an individual option on or off.\n * They are usually used to activate or deactivate a specific setting.\n */\nconst _Switch = forwardRef(Switch);\nexport {_Switch as Switch};\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
@@ -13,7 +13,28 @@ function $parcel$interopDefault(a) {
13
13
  function $parcel$export(e, n, v, s) {
14
14
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
15
15
  }
16
-
16
+ /*
17
+ * Copyright 2020 Adobe. All rights reserved.
18
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
19
+ * you may not use this file except in compliance with the License. You may obtain a copy
20
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
21
+ *
22
+ * Unless required by applicable law or agreed to in writing, software distributed under
23
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
24
+ * OF ANY KIND, either express or implied. See the License for the specific language
25
+ * governing permissions and limitations under the License.
26
+ */ /// <reference types="css-module-types" />
27
+ /*
28
+ * Copyright 2020 Adobe. All rights reserved.
29
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
30
+ * you may not use this file except in compliance with the License. You may obtain a copy
31
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
32
+ *
33
+ * Unless required by applicable law or agreed to in writing, software distributed under
34
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
35
+ * OF ANY KIND, either express or implied. See the License for the specific language
36
+ * governing permissions and limitations under the License.
37
+ */
17
38
 
18
39
 
19
40
  var $dfcff93ab25bb9b3$exports = {};
@@ -49,42 +70,42 @@ $dfcff93ab25bb9b3$export$dc5a33fddabf5882 = "spectrum-ToggleSwitch--ab_3526dd";
49
70
 
50
71
 
51
72
  function $8341c396cee1c5fc$var$Switch(props, ref) {
52
- props = $8Tpjb$useProviderProps(props);
73
+ props = (0, $8Tpjb$useProviderProps)(props);
53
74
  let { isEmphasized: isEmphasized = false , isDisabled: isDisabled = false , autoFocus: autoFocus , children: children , ...otherProps } = props;
54
- let { styleProps: styleProps } = $8Tpjb$useStyleProps(otherProps);
55
- let { hoverProps: hoverProps , isHovered: isHovered } = $8Tpjb$useHover({
75
+ let { styleProps: styleProps } = (0, $8Tpjb$useStyleProps)(otherProps);
76
+ let { hoverProps: hoverProps , isHovered: isHovered } = (0, $8Tpjb$useHover)({
56
77
  isDisabled: isDisabled
57
78
  });
58
- let inputRef = $8Tpjb$useRef(null);
59
- let domRef = $8Tpjb$useFocusableRef(ref, inputRef);
60
- let state = $8Tpjb$useToggleState(props);
61
- let { inputProps: inputProps } = $8Tpjb$useSwitch(props, state, inputRef);
62
- return(/*#__PURE__*/ $8Tpjb$react.createElement("label", {
79
+ let inputRef = (0, $8Tpjb$useRef)(null);
80
+ let domRef = (0, $8Tpjb$useFocusableRef)(ref, inputRef);
81
+ let state = (0, $8Tpjb$useToggleState)(props);
82
+ let { inputProps: inputProps } = (0, $8Tpjb$useSwitch)(props, state, inputRef);
83
+ return /*#__PURE__*/ (0, $8Tpjb$react).createElement("label", {
63
84
  ...styleProps,
64
85
  ...hoverProps,
65
86
  ref: domRef,
66
- className: $8Tpjb$classNames((/*@__PURE__*/$parcel$interopDefault($dfcff93ab25bb9b3$exports)), 'spectrum-ToggleSwitch', {
67
- 'spectrum-ToggleSwitch--quiet': !isEmphasized,
68
- 'is-disabled': isDisabled,
69
- 'is-hovered': isHovered
87
+ className: (0, $8Tpjb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($dfcff93ab25bb9b3$exports))), "spectrum-ToggleSwitch", {
88
+ "spectrum-ToggleSwitch--quiet": !isEmphasized,
89
+ "is-disabled": isDisabled,
90
+ "is-hovered": isHovered
70
91
  }, styleProps.className)
71
- }, /*#__PURE__*/ $8Tpjb$react.createElement($8Tpjb$FocusRing, {
72
- focusRingClass: $8Tpjb$classNames((/*@__PURE__*/$parcel$interopDefault($dfcff93ab25bb9b3$exports)), 'focus-ring'),
92
+ }, /*#__PURE__*/ (0, $8Tpjb$react).createElement((0, $8Tpjb$FocusRing), {
93
+ focusRingClass: (0, $8Tpjb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($dfcff93ab25bb9b3$exports))), "focus-ring"),
73
94
  autoFocus: autoFocus
74
- }, /*#__PURE__*/ $8Tpjb$react.createElement("input", {
95
+ }, /*#__PURE__*/ (0, $8Tpjb$react).createElement("input", {
75
96
  ...inputProps,
76
97
  ref: inputRef,
77
- className: $8Tpjb$classNames((/*@__PURE__*/$parcel$interopDefault($dfcff93ab25bb9b3$exports)), 'spectrum-ToggleSwitch-input')
78
- })), /*#__PURE__*/ $8Tpjb$react.createElement("span", {
79
- className: $8Tpjb$classNames((/*@__PURE__*/$parcel$interopDefault($dfcff93ab25bb9b3$exports)), 'spectrum-ToggleSwitch-switch')
80
- }), children && /*#__PURE__*/ $8Tpjb$react.createElement("span", {
81
- className: $8Tpjb$classNames((/*@__PURE__*/$parcel$interopDefault($dfcff93ab25bb9b3$exports)), 'spectrum-ToggleSwitch-label')
82
- }, children)));
98
+ className: (0, $8Tpjb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($dfcff93ab25bb9b3$exports))), "spectrum-ToggleSwitch-input")
99
+ })), /*#__PURE__*/ (0, $8Tpjb$react).createElement("span", {
100
+ className: (0, $8Tpjb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($dfcff93ab25bb9b3$exports))), "spectrum-ToggleSwitch-switch")
101
+ }), children && /*#__PURE__*/ (0, $8Tpjb$react).createElement("span", {
102
+ className: (0, $8Tpjb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($dfcff93ab25bb9b3$exports))), "spectrum-ToggleSwitch-label")
103
+ }, children));
83
104
  }
84
105
  /**
85
106
  * Switches allow users to turn an individual option on or off.
86
107
  * They are usually used to activate or deactivate a specific setting.
87
- */ const $8341c396cee1c5fc$export$b5d5cf8927ab7262 = /*#__PURE__*/ $8Tpjb$forwardRef($8341c396cee1c5fc$var$Switch);
108
+ */ const $8341c396cee1c5fc$export$b5d5cf8927ab7262 = /*#__PURE__*/ (0, $8Tpjb$forwardRef)($8341c396cee1c5fc$var$Switch);
88
109
 
89
110
 
90
111
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAuC;AACvC,GAA6C;AAC7C,GAA8C;AAC9C,GAA4B;AAC5B,GAA6C;AAC7C,GAA4B;AAC5B,GAA8C;AAC9C,GAA2C;AAP3C,yCAAuC,GAAG,CAA8B;AACxE,yCAA6C,GAAG,CAAoC;AACpF,yCAA8C,GAAG,CAAqC;AACtF,yCAA4B,GAAG,CAAmB;AAClD,yCAA6C,GAAG,CAAoC;AACpF,yCAA4B,GAAG,CAAmB;AAClD,yCAA8C,GAAG,CAAqC;AACtF,yCAA2C,GAAG,CAAkC;;;;;;;SDgBvE,4BAAM,CAAC,KAA0B,EAAE,GAAmC,EAAE,CAAC;IAChF,KAAK,GAAG,uBAAgB,CAAC,KAAK;IAC9B,GAAG,CAAC,CAAC,eACH,YAAY,GAAG,KAAK,eACpB,UAAU,GAAG,KAAK,cAClB,SAAS,aACT,QAAQ,MACL,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,CAAC,aAAA,UAAU,cAAE,SAAS,EAAA,CAAC,GAAG,eAAQ,CAAC,CAAC;oBAAA,UAAU;IAAA,CAAC;IAEnD,GAAG,CAAC,QAAQ,GAAG,aAAM,CAAmB,IAAI;IAC5C,GAAG,CAAC,MAAM,GAAG,sBAAe,CAAC,GAAG,EAAE,QAAQ;IAC1C,GAAG,CAAC,KAAK,GAAG,qBAAc,CAAC,KAAK;IAChC,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,gBAAS,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ;IAGnD,MAAM,0CACH,CAAK;WACA,UAAU;WACV,UAAU;QACd,GAAG,EAAE,MAAM;QACX,SAAS,EACP,iBAAU,CACR,gEAAM,EACN,CAAuB,wBACvB,CAAC;YACC,CAA8B,gCAAG,YAAY;YAC7C,CAAa,cAAE,UAAU;YACzB,CAAY,aAAE,SAAS;QACzB,CAAC,EACD,UAAU,CAAC,SAAS;gDAGvB,gBAAS;QAAC,cAAc,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAAY;QAAG,SAAS,EAAE,SAAS;gDAC9E,CAAK;WACA,UAAU;QACd,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAA6B;kDAE9D,CAAI;QAAC,SAAS,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAA8B;QACjE,QAAQ,6CACN,CAAI;QAAC,SAAS,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAA6B;OAC9D,QAAQ;AAKnB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,KAAK,CAAC,yCAAO,iBAAG,iBAAU,CAAC,4BAAM","sources":["packages/@react-spectrum/switch/src/index.ts","packages/@react-spectrum/switch/src/Switch.tsx","packages/@adobe/spectrum-css-temp/components/toggle/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 {Switch} from './Switch';\nexport type {SpectrumSwitchProps} from '@react-types/switch';\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, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumSwitchProps} from '@react-types/switch';\nimport styles from '@adobe/spectrum-css-temp/components/toggle/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useSwitch} from '@react-aria/switch';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction Switch(props: SpectrumSwitchProps, ref: FocusableRef<HTMLLabelElement>) {\n props = useProviderProps(props);\n let {\n isEmphasized = false,\n isDisabled = false,\n autoFocus,\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let inputRef = useRef<HTMLInputElement>(null);\n let domRef = useFocusableRef(ref, inputRef);\n let state = useToggleState(props);\n let {inputProps} = useSwitch(props, state, inputRef);\n\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ToggleSwitch',\n {\n 'spectrum-ToggleSwitch--quiet': !isEmphasized,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <input\n {...inputProps}\n ref={inputRef}\n className={classNames(styles, 'spectrum-ToggleSwitch-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-ToggleSwitch-switch')} />\n {children && (\n <span className={classNames(styles, 'spectrum-ToggleSwitch-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n\n/**\n * Switches allow users to turn an individual option on or off.\n * They are usually used to activate or deactivate a specific setting.\n */\nconst _Switch = forwardRef(Switch);\nexport {_Switch as Switch};\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,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAPA,4CAA0C;AAC1C,4CAAgD;AAChD,4CAAiD;AACjD,4CAA+B;AAC/B,4CAAgD;AAChD,4CAA+B;AAC/B,4CAAiD;AACjD,4CAA8C;;;;;;;ADgB9C,SAAS,6BAAO,KAA0B,EAAE,GAAmC,EAAE;IAC/E,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,gBACF,eAAe,KAAK,eACpB,aAAa,KAAK,cAClB,UAAS,YACT,SAAQ,EACR,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,oBAAa,AAAD,EAAE;IACjC,IAAI,cAAC,WAAU,aAAE,UAAS,EAAC,GAAG,CAAA,GAAA,eAAQ,AAAD,EAAE;oBAAC;IAAU;IAElD,IAAI,WAAW,CAAA,GAAA,aAAK,EAAoB,IAAI;IAC5C,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE,KAAK;IAClC,IAAI,QAAQ,CAAA,GAAA,qBAAa,EAAE;IAC3B,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,gBAAS,AAAD,EAAE,OAAO,OAAO;IAG3C,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,UAAU;QACd,KAAK;QACL,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,yDAAM,OAAD,GACL,yBACA;YACE,gCAAgC,CAAC;YACjC,eAAe;YACf,cAAc;QAChB,GACA,WAAW,SAAS;qBAGxB,gCAAC,CAAA,GAAA,gBAAQ;QAAE,gBAAgB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;QAAe,WAAW;qBACtE,gCAAC;QACE,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;uBAElC,gCAAC;QAAK,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;QACnC,0BACC,gCAAC;QAAK,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACjC;AAKX;AAEA;;;CAGC,GACD,MAAM,0DAAU,CAAA,GAAA,iBAAS,EAAE;;ADhE3B","sources":["packages/@react-spectrum/switch/src/index.ts","packages/@react-spectrum/switch/src/Switch.tsx","packages/@adobe/spectrum-css-temp/components/toggle/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 {Switch} from './Switch';\nexport type {SpectrumSwitchProps} from '@react-types/switch';\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, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumSwitchProps} from '@react-types/switch';\nimport styles from '@adobe/spectrum-css-temp/components/toggle/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useSwitch} from '@react-aria/switch';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction Switch(props: SpectrumSwitchProps, ref: FocusableRef<HTMLLabelElement>) {\n props = useProviderProps(props);\n let {\n isEmphasized = false,\n isDisabled = false,\n autoFocus,\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let inputRef = useRef<HTMLInputElement>(null);\n let domRef = useFocusableRef(ref, inputRef);\n let state = useToggleState(props);\n let {inputProps} = useSwitch(props, state, inputRef);\n\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ToggleSwitch',\n {\n 'spectrum-ToggleSwitch--quiet': !isEmphasized,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <input\n {...inputProps}\n ref={inputRef}\n className={classNames(styles, 'spectrum-ToggleSwitch-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-ToggleSwitch-switch')} />\n {children && (\n <span className={classNames(styles, 'spectrum-ToggleSwitch-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n\n/**\n * Switches allow users to turn an individual option on or off.\n * They are usually used to activate or deactivate a specific setting.\n */\nconst _Switch = forwardRef(Switch);\nexport {_Switch as Switch};\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/switch",
3
- "version": "3.3.2",
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,16 +31,16 @@
31
31
  "url": "https://github.com/adobe/react-spectrum"
32
32
  },
33
33
  "dependencies": {
34
- "@babel/runtime": "^7.6.2",
35
- "@react-aria/focus": "^3.9.0",
36
- "@react-aria/interactions": "^3.12.0",
37
- "@react-aria/switch": "^3.2.4",
38
- "@react-aria/utils": "^3.14.0",
39
- "@react-spectrum/utils": "^3.7.4",
40
- "@react-stately/toggle": "^3.4.2",
41
- "@react-types/shared": "^3.15.0",
42
- "@react-types/switch": "^3.2.4",
43
- "@spectrum-icons/ui": "^3.3.3"
34
+ "@react-aria/focus": "^3.10.1",
35
+ "@react-aria/interactions": "^3.13.1",
36
+ "@react-aria/switch": "^3.3.1",
37
+ "@react-aria/utils": "^3.14.2",
38
+ "@react-spectrum/utils": "^3.8.1",
39
+ "@react-stately/toggle": "^3.4.4",
40
+ "@react-types/shared": "^3.16.0",
41
+ "@react-types/switch": "^3.2.5",
42
+ "@spectrum-icons/ui": "^3.4.1",
43
+ "@swc/helpers": "^0.4.14"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "9202ef59e8c104dd06ffe33148445ef7932a5d1b"
55
+ "gitHead": "5480d76bd815e239366f92852c76b6831ad2a4fd"
56
56
  }