@react-spectrum/checkbox 3.6.1 → 3.6.2

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-Checkbox_4870fc{padding-right:calc(var(--spectrum-checkbox-cursor-hit-x,var(--spectrum-global-dimension-size-100))*2)}[dir=rtl] .spectrum-Checkbox_4870fc{padding-left:calc(var(--spectrum-checkbox-cursor-hit-x,var(--spectrum-global-dimension-size-100))*2)}.spectrum-Checkbox_4870fc{box-sizing:border-box;min-height:var(--spectrum-checkbox-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-Checkbox-input_4870fc{left:calc(var(--spectrum-checkbox-cursor-hit-x,var(--spectrum-global-dimension-size-100))*-1)}[dir=rtl] .spectrum-Checkbox-input_4870fc{right:calc(var(--spectrum-checkbox-cursor-hit-x,var(--spectrum-global-dimension-size-100))*-1)}.spectrum-Checkbox-input_4870fc{box-sizing:border-box;width:calc(100% + var(--spectrum-checkbox-cursor-hit-x,var(--spectrum-global-dimension-size-100)));height:100%;opacity:.0001;z-index:1;cursor:default;margin:0;padding:0;font-family:inherit;font-size:100%;line-height:1.15;position:absolute;top:0;overflow:visible}.spectrum-Checkbox-input_4870fc:disabled{cursor:default}.spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:after{margin:calc(var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25))*-1)}.spectrum-Checkbox_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before{border-width:calc(var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175))/2)}.spectrum-Checkbox_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc .spectrum-Checkbox-checkmark_4870fc{display:none}.spectrum-Checkbox_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc .spectrum-Checkbox-partialCheckmark_4870fc{opacity:1;display:block;transform:scale(1)}.spectrum-Checkbox_4870fc.is-checked_4870fc .spectrum-Checkbox-box_4870fc:before{border-width:calc(var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175))/2)}.spectrum-Checkbox_4870fc.is-checked_4870fc .spectrum-Checkbox-box_4870fc .spectrum-Checkbox-checkmark_4870fc{opacity:1;transform:scale(1)}[dir=ltr] .spectrum-Checkbox-label_4870fc{text-align:left}[dir=rtl] .spectrum-Checkbox-label_4870fc{text-align:right}[dir=ltr] .spectrum-Checkbox-label_4870fc{margin-left:var(--spectrum-checkbox-text-gap,var(--spectrum-global-dimension-size-125))}[dir=rtl] .spectrum-Checkbox-label_4870fc{margin-right:var(--spectrum-checkbox-text-gap,var(--spectrum-global-dimension-size-125))}.spectrum-Checkbox-label_4870fc{margin-top:var(--spectrum-global-dimension-size-65);font-size:var(--spectrum-checkbox-text-size,var(--spectrum-alias-font-size-default));font-weight:var(--spectrum-checkbox-text-font-weight,var(--spectrum-global-font-weight-regular));line-height:1.49}.spectrum-Checkbox-box_4870fc{box-sizing:border-box;width:var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175));height:var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175));margin:calc((var(--spectrum-checkbox-height,var(--spectrum-global-dimension-size-400)) - var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175)))/2)0;flex-grow:0;flex-shrink:0;position:relative}.spectrum-Checkbox-box_4870fc:before{z-index:0;content:"";box-sizing:border-box;width:var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175));height:var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175));border-radius:var(--spectrum-checkbox-box-border-radius,var(--spectrum-alias-border-radius-small));border-width:var(--spectrum-checkbox-box-border-size,var(--spectrum-alias-border-size-thick));transition:border var(--spectrum-global-animation-duration-100,130ms)ease-in-out,box-shadow var(--spectrum-global-animation-duration-100,130ms)ease-in-out;border-style:solid;display:block;position:absolute}.spectrum-Checkbox-box_4870fc:after{border-radius:calc(var(--spectrum-checkbox-box-border-radius,var(--spectrum-alias-border-radius-small)) + var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25)));content:"";margin:var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25));transition:opacity var(--spectrum-global-animation-duration-100,130ms)ease-out,margin var(--spectrum-global-animation-duration-100,130ms)ease-out;display:block;position:absolute;top:0;bottom:0;left:0;right:0;transform:translate(0)}[dir=ltr] .spectrum-Checkbox-checkmark_4870fc,[dir=ltr] .spectrum-Checkbox-partialCheckmark_4870fc{left:50%}[dir=rtl] .spectrum-Checkbox-checkmark_4870fc,[dir=rtl] .spectrum-Checkbox-partialCheckmark_4870fc{right:50%}[dir=ltr] .spectrum-Checkbox-checkmark_4870fc,[dir=ltr] .spectrum-Checkbox-partialCheckmark_4870fc{margin-left:calc(var(--spectrum-icon-checkmark-small-width)/-2)}[dir=rtl] .spectrum-Checkbox-checkmark_4870fc,[dir=rtl] .spectrum-Checkbox-partialCheckmark_4870fc{margin-right:calc(var(--spectrum-icon-checkmark-small-width)/-2)}.spectrum-Checkbox-checkmark_4870fc,.spectrum-Checkbox-partialCheckmark_4870fc{margin-top:calc(var(--spectrum-icon-checkmark-small-height)/-2);opacity:0;transition:opacity var(--spectrum-global-animation-duration-100,130ms)ease-in-out,transform var(--spectrum-global-animation-duration-100,130ms)ease-in-out;position:absolute;top:50%;transform:scale(0)}.spectrum-Checkbox-partialCheckmark_4870fc{display:none}.spectrum-Checkbox_4870fc{color:var(--spectrum-checkbox-text-color,var(--spectrum-alias-text-color))}.spectrum-Checkbox_4870fc .spectrum-Checkbox-checkmark_4870fc,.spectrum-Checkbox_4870fc .spectrum-Checkbox-partialCheckmark_4870fc{color:var(--spectrum-checkbox-checkmark-color,var(--spectrum-global-color-gray-75))}.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-emphasized-box-border-color,var(--spectrum-global-color-gray-600));background-color:var(--spectrum-checkbox-emphasized-box-background-color,var(--spectrum-global-color-gray-75))}.spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-emphasized-text-color,var(--spectrum-alias-text-color))}.spectrum-Checkbox_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc.is-checked_4870fc .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-accent-color-900)}.spectrum-Checkbox_4870fc.is-hovered_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc.is-hovered_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-accent-color-1000)}.spectrum-Checkbox_4870fc:active.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc:active .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-accent-color-1100)}.spectrum-Checkbox_4870fc{border-color:var(--spectrum-checkbox-emphasized-box-border-color,var(--spectrum-global-color-gray-600))}.spectrum-Checkbox_4870fc.is-hovered_4870fc .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-emphasized-box-border-color-hover,var(--spectrum-global-color-gray-700))}.spectrum-Checkbox_4870fc.is-hovered_4870fc .spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-emphasized-text-color-hover,var(--spectrum-alias-text-color-hover))}.spectrum-Checkbox_4870fc:active .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-emphasized-box-border-color-down,var(--spectrum-global-color-gray-800))}.spectrum-Checkbox_4870fc:active .spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-emphasized-text-color-down,var(--spectrum-alias-text-color-down))}.spectrum-Checkbox_4870fc .spectrum-Checkbox-input_4870fc:disabled+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc .spectrum-Checkbox-input_4870fc:disabled:active+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc .spectrum-Checkbox-input_4870fc:checked:disabled+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc .spectrum-Checkbox-input_4870fc:checked:disabled:active+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-emphasized-box-border-color-disabled,var(--spectrum-global-color-gray-400));background-color:var(--spectrum-checkbox-emphasized-box-background-color-disabled,var(--spectrum-global-color-gray-75))}.spectrum-Checkbox_4870fc .spectrum-Checkbox-input_4870fc:disabled~.spectrum-Checkbox-label_4870fc,.spectrum-Checkbox_4870fc .spectrum-Checkbox-input_4870fc:checked:disabled~.spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-Checkbox-input_4870fc+.spectrum-Checkbox-box_4870fc:after{box-shadow:0 0 0 var(--spectrum-checkbox-focus-ring-size-key-focus,var(--spectrum-alias-focus-ring-size))var(--spectrum-checkbox-focus-ring-color-key-focus,var(--spectrum-alias-focus-ring-color));opacity:0}.spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-alias-toggle-color-key-focus)}.spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:after{opacity:1}.spectrum-Checkbox_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox-input_4870fc:checked.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-accent-color-1000)}.spectrum-Checkbox-input_4870fc.focus-ring_4870fc~.spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-emphasized-text-color-hover,var(--spectrum-alias-text-color-hover))}.spectrum-Checkbox--quiet_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox--quiet_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox--quiet_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-alias-toggle-color-selected)}.spectrum-Checkbox--quiet_4870fc.is-hovered_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox--quiet_4870fc.is-hovered_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-alias-toggle-color-selected-hover)}.spectrum-Checkbox--quiet_4870fc:active.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox--quiet_4870fc:active .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-quiet-box-border-color-selected-down,var(--spectrum-global-color-gray-900))}.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-box-border-color-error,var(--spectrum-global-color-red-500))}.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-text-color-error,var(--spectrum-global-color-red-600))}.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-box-border-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-input_4870fc.focus-ring_4870fc~.spectrum-Checkbox-label_4870fc,.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-input_4870fc.focus-ring_4870fc~.spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-text-color-error-hover,var(--spectrum-global-color-red-700))}.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-hovered_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-hovered_4870fc .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-box-border-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-hovered_4870fc .spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-text-color-error-hover,var(--spectrum-global-color-red-700))}.spectrum-Checkbox_4870fc.is-invalid_4870fc:active .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc.is-invalid_4870fc:active .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-box-border-color-error-down,var(--spectrum-global-color-red-700))}.spectrum-Checkbox_4870fc.is-invalid_4870fc:active .spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-text-color-error-down,var(--spectrum-global-color-red-700))}@media (forced-colors:active){.spectrum-Checkbox_4870fc{forced-color-adjust:none;--spectrum-checkbox-box-border-color:ButtonText;--spectrum-checkbox-box-border-color-error:Highlight;--spectrum-checkbox-box-border-color-error-down:Highlight;--spectrum-checkbox-box-border-color-error-hover:Highlight;--spectrum-checkbox-box-border-color-key-focus:Highlight;--spectrum-checkbox-checkmark-color:HighlightText;--spectrum-checkbox-emphasized-box-background-color:ButtonFace;--spectrum-checkbox-emphasized-box-background-color-disabled:ButtonFace;--spectrum-checkbox-emphasized-box-border-color:ButtonText;--spectrum-checkbox-emphasized-box-border-color-disabled:GrayText;--spectrum-checkbox-emphasized-box-border-color-down:Highlight;--spectrum-checkbox-emphasized-box-border-color-hover:Highlight;--spectrum-checkbox-emphasized-box-border-color-selected:Highlight;--spectrum-checkbox-emphasized-box-border-color-selected-down:Highlight;--spectrum-checkbox-emphasized-box-border-color-selected-hover:Highlight;--spectrum-checkbox-emphasized-box-border-color-selected-key-focus:Highlight;--spectrum-checkbox-emphasized-text-color:FieldText;--spectrum-checkbox-emphasized-text-color-down:FieldText;--spectrum-checkbox-emphasized-text-color-hover:FieldText;--spectrum-checkbox-emphasized-text-color-key-focus:FieldText;--spectrum-checkbox-focus-ring-color-key-focus:ButtonText;--spectrum-checkbox-quiet-box-border-color-selected:Highlight;--spectrum-checkbox-quiet-box-border-color-selected-down:Highlight;--spectrum-checkbox-quiet-box-border-color-selected-hover:Highlight;--spectrum-checkbox-text-color:FieldText;--spectrum-checkbox-text-color-disabled:GrayText;--spectrum-checkbox-text-color-error:FieldText;--spectrum-checkbox-text-color-error-down:FieldText;--spectrum-checkbox-text-color-error-hover:FieldText}.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-alias-toggle-color-default)}.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-box-border-color-error,var(--spectrum-global-color-red-500))}.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-disabled_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before{border-color:GrayText}.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-box-border-color-error,var(--spectrum-global-color-red-500))}}.spectrum-FieldGroup_41d350.spectrum-FieldGroup_41d350{width:auto;--spectrum-field-default-width:auto}.spectrum-FieldGroup-group_41d350{flex-direction:column;display:flex}.spectrum-FieldGroup-group--horizontal_41d350{flex-flow:wrap}
1
+ [dir=ltr] .spectrum-Checkbox_4870fc{padding-right:calc(var(--spectrum-checkbox-cursor-hit-x,var(--spectrum-global-dimension-size-100))*2)}[dir=rtl] .spectrum-Checkbox_4870fc{padding-left:calc(var(--spectrum-checkbox-cursor-hit-x,var(--spectrum-global-dimension-size-100))*2)}.spectrum-Checkbox_4870fc{box-sizing:border-box;min-height:var(--spectrum-checkbox-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-Checkbox-input_4870fc{left:calc(var(--spectrum-checkbox-cursor-hit-x,var(--spectrum-global-dimension-size-100))*-1)}[dir=rtl] .spectrum-Checkbox-input_4870fc{right:calc(var(--spectrum-checkbox-cursor-hit-x,var(--spectrum-global-dimension-size-100))*-1)}.spectrum-Checkbox-input_4870fc{box-sizing:border-box;width:calc(100% + var(--spectrum-checkbox-cursor-hit-x,var(--spectrum-global-dimension-size-100)));height:100%;opacity:.0001;z-index:1;cursor:default;margin:0;padding:0;font-family:inherit;font-size:100%;line-height:1.15;position:absolute;top:0;overflow:visible}.spectrum-Checkbox-input_4870fc:disabled{cursor:default}.spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:after{margin:calc(var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25))*-1)}.spectrum-Checkbox_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before{border-width:calc(var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175))/2)}.spectrum-Checkbox_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc .spectrum-Checkbox-checkmark_4870fc{display:none}.spectrum-Checkbox_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc .spectrum-Checkbox-partialCheckmark_4870fc{opacity:1;display:block;transform:scale(1)}.spectrum-Checkbox_4870fc.is-checked_4870fc .spectrum-Checkbox-box_4870fc:before{border-width:calc(var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175))/2)}.spectrum-Checkbox_4870fc.is-checked_4870fc .spectrum-Checkbox-box_4870fc .spectrum-Checkbox-checkmark_4870fc{opacity:1;transform:scale(1)}[dir=ltr] .spectrum-Checkbox-label_4870fc{text-align:left}[dir=rtl] .spectrum-Checkbox-label_4870fc{text-align:right}[dir=ltr] .spectrum-Checkbox-label_4870fc{margin-left:var(--spectrum-checkbox-text-gap,var(--spectrum-global-dimension-size-125))}[dir=rtl] .spectrum-Checkbox-label_4870fc{margin-right:var(--spectrum-checkbox-text-gap,var(--spectrum-global-dimension-size-125))}.spectrum-Checkbox-label_4870fc{margin-top:var(--spectrum-global-dimension-size-65);font-size:var(--spectrum-checkbox-text-size,var(--spectrum-alias-font-size-default));font-weight:var(--spectrum-checkbox-text-font-weight,var(--spectrum-global-font-weight-regular));line-height:1.49}.spectrum-Checkbox-box_4870fc{box-sizing:border-box;width:var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175));height:var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175));margin:calc((var(--spectrum-checkbox-height,var(--spectrum-global-dimension-size-400)) - var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175)))/2)0;flex-grow:0;flex-shrink:0;position:relative}.spectrum-Checkbox-box_4870fc:before{z-index:0;content:"";box-sizing:border-box;width:var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175));height:var(--spectrum-checkbox-box-size,var(--spectrum-global-dimension-size-175));border-radius:var(--spectrum-checkbox-box-border-radius,var(--spectrum-alias-border-radius-small));border-width:var(--spectrum-checkbox-box-border-size,var(--spectrum-alias-border-size-thick));transition:border var(--spectrum-global-animation-duration-100,.13s)ease-in-out,box-shadow var(--spectrum-global-animation-duration-100,.13s)ease-in-out;border-style:solid;display:block;position:absolute}.spectrum-Checkbox-box_4870fc:after{border-radius:calc(var(--spectrum-checkbox-box-border-radius,var(--spectrum-alias-border-radius-small)) + var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25)));content:"";margin:var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25));transition:opacity var(--spectrum-global-animation-duration-100,.13s)ease-out,margin var(--spectrum-global-animation-duration-100,.13s)ease-out;display:block;position:absolute;top:0;bottom:0;left:0;right:0;transform:translate(0)}[dir=ltr] .spectrum-Checkbox-checkmark_4870fc,[dir=ltr] .spectrum-Checkbox-partialCheckmark_4870fc{left:50%}[dir=rtl] .spectrum-Checkbox-checkmark_4870fc,[dir=rtl] .spectrum-Checkbox-partialCheckmark_4870fc{right:50%}[dir=ltr] .spectrum-Checkbox-checkmark_4870fc,[dir=ltr] .spectrum-Checkbox-partialCheckmark_4870fc{margin-left:calc(var(--spectrum-icon-checkmark-small-width)/-2)}[dir=rtl] .spectrum-Checkbox-checkmark_4870fc,[dir=rtl] .spectrum-Checkbox-partialCheckmark_4870fc{margin-right:calc(var(--spectrum-icon-checkmark-small-width)/-2)}.spectrum-Checkbox-checkmark_4870fc,.spectrum-Checkbox-partialCheckmark_4870fc{margin-top:calc(var(--spectrum-icon-checkmark-small-height)/-2);opacity:0;transition:opacity var(--spectrum-global-animation-duration-100,.13s)ease-in-out,transform var(--spectrum-global-animation-duration-100,.13s)ease-in-out;position:absolute;top:50%;transform:scale(0)}.spectrum-Checkbox-partialCheckmark_4870fc{display:none}.spectrum-Checkbox_4870fc{color:var(--spectrum-checkbox-text-color,var(--spectrum-alias-text-color))}.spectrum-Checkbox_4870fc .spectrum-Checkbox-checkmark_4870fc,.spectrum-Checkbox_4870fc .spectrum-Checkbox-partialCheckmark_4870fc{color:var(--spectrum-checkbox-checkmark-color,var(--spectrum-global-color-gray-75))}.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-emphasized-box-border-color,var(--spectrum-global-color-gray-600));background-color:var(--spectrum-checkbox-emphasized-box-background-color,var(--spectrum-global-color-gray-75))}.spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-emphasized-text-color,var(--spectrum-alias-text-color))}.spectrum-Checkbox_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc.is-checked_4870fc .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-accent-color-900)}.spectrum-Checkbox_4870fc.is-hovered_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc.is-hovered_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-accent-color-1000)}.spectrum-Checkbox_4870fc:active.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc:active .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-accent-color-1100)}.spectrum-Checkbox_4870fc{border-color:var(--spectrum-checkbox-emphasized-box-border-color,var(--spectrum-global-color-gray-600))}.spectrum-Checkbox_4870fc.is-hovered_4870fc .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-emphasized-box-border-color-hover,var(--spectrum-global-color-gray-700))}.spectrum-Checkbox_4870fc.is-hovered_4870fc .spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-emphasized-text-color-hover,var(--spectrum-alias-text-color-hover))}.spectrum-Checkbox_4870fc:active .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-emphasized-box-border-color-down,var(--spectrum-global-color-gray-800))}.spectrum-Checkbox_4870fc:active .spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-emphasized-text-color-down,var(--spectrum-alias-text-color-down))}.spectrum-Checkbox_4870fc .spectrum-Checkbox-input_4870fc:disabled+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc .spectrum-Checkbox-input_4870fc:disabled:active+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc .spectrum-Checkbox-input_4870fc:checked:disabled+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc .spectrum-Checkbox-input_4870fc:checked:disabled:active+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-emphasized-box-border-color-disabled,var(--spectrum-global-color-gray-400));background-color:var(--spectrum-checkbox-emphasized-box-background-color-disabled,var(--spectrum-global-color-gray-75))}.spectrum-Checkbox_4870fc .spectrum-Checkbox-input_4870fc:disabled~.spectrum-Checkbox-label_4870fc,.spectrum-Checkbox_4870fc .spectrum-Checkbox-input_4870fc:checked:disabled~.spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-Checkbox-input_4870fc+.spectrum-Checkbox-box_4870fc:after{box-shadow:0 0 0 var(--spectrum-checkbox-focus-ring-size-key-focus,var(--spectrum-alias-focus-ring-size))var(--spectrum-checkbox-focus-ring-color-key-focus,var(--spectrum-alias-focus-ring-color));opacity:0}.spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-alias-toggle-color-key-focus)}.spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:after{opacity:1}.spectrum-Checkbox_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox-input_4870fc:checked.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-accent-color-1000)}.spectrum-Checkbox-input_4870fc.focus-ring_4870fc~.spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-emphasized-text-color-hover,var(--spectrum-alias-text-color-hover))}.spectrum-Checkbox--quiet_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox--quiet_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox--quiet_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-alias-toggle-color-selected)}.spectrum-Checkbox--quiet_4870fc.is-hovered_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox--quiet_4870fc.is-hovered_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-alias-toggle-color-selected-hover)}.spectrum-Checkbox--quiet_4870fc:active.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox--quiet_4870fc:active .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-quiet-box-border-color-selected-down,var(--spectrum-global-color-gray-900))}.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-box-border-color-error,var(--spectrum-global-color-red-500))}.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-text-color-error,var(--spectrum-global-color-red-600))}.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-input_4870fc.focus-ring_4870fc+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-box-border-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-input_4870fc.focus-ring_4870fc~.spectrum-Checkbox-label_4870fc,.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-input_4870fc.focus-ring_4870fc~.spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-text-color-error-hover,var(--spectrum-global-color-red-700))}.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-hovered_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-hovered_4870fc .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-box-border-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-hovered_4870fc .spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-text-color-error-hover,var(--spectrum-global-color-red-700))}.spectrum-Checkbox_4870fc.is-invalid_4870fc:active .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before,.spectrum-Checkbox_4870fc.is-invalid_4870fc:active .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-box-border-color-error-down,var(--spectrum-global-color-red-700))}.spectrum-Checkbox_4870fc.is-invalid_4870fc:active .spectrum-Checkbox-label_4870fc{color:var(--spectrum-checkbox-text-color-error-down,var(--spectrum-global-color-red-700))}@media (forced-colors:active){.spectrum-Checkbox_4870fc{forced-color-adjust:none;--spectrum-checkbox-box-border-color:ButtonText;--spectrum-checkbox-box-border-color-error:Highlight;--spectrum-checkbox-box-border-color-error-down:Highlight;--spectrum-checkbox-box-border-color-error-hover:Highlight;--spectrum-checkbox-box-border-color-key-focus:Highlight;--spectrum-checkbox-checkmark-color:HighlightText;--spectrum-checkbox-emphasized-box-background-color:ButtonFace;--spectrum-checkbox-emphasized-box-background-color-disabled:ButtonFace;--spectrum-checkbox-emphasized-box-border-color:ButtonText;--spectrum-checkbox-emphasized-box-border-color-disabled:GrayText;--spectrum-checkbox-emphasized-box-border-color-down:Highlight;--spectrum-checkbox-emphasized-box-border-color-hover:Highlight;--spectrum-checkbox-emphasized-box-border-color-selected:Highlight;--spectrum-checkbox-emphasized-box-border-color-selected-down:Highlight;--spectrum-checkbox-emphasized-box-border-color-selected-hover:Highlight;--spectrum-checkbox-emphasized-box-border-color-selected-key-focus:Highlight;--spectrum-checkbox-emphasized-text-color:FieldText;--spectrum-checkbox-emphasized-text-color-down:FieldText;--spectrum-checkbox-emphasized-text-color-hover:FieldText;--spectrum-checkbox-emphasized-text-color-key-focus:FieldText;--spectrum-checkbox-focus-ring-color-key-focus:ButtonText;--spectrum-checkbox-quiet-box-border-color-selected:Highlight;--spectrum-checkbox-quiet-box-border-color-selected-down:Highlight;--spectrum-checkbox-quiet-box-border-color-selected-hover:Highlight;--spectrum-checkbox-text-color:FieldText;--spectrum-checkbox-text-color-disabled:GrayText;--spectrum-checkbox-text-color-error:FieldText;--spectrum-checkbox-text-color-error-down:FieldText;--spectrum-checkbox-text-color-error-hover:FieldText}.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-alias-toggle-color-default)}.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-indeterminate_4870fc .spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-box-border-color-error,var(--spectrum-global-color-red-500))}.spectrum-Checkbox_4870fc.is-invalid_4870fc.is-disabled_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before{border-color:GrayText}.spectrum-Checkbox_4870fc.is-invalid_4870fc .spectrum-Checkbox-input_4870fc:checked+.spectrum-Checkbox-box_4870fc:before{border-color:var(--spectrum-checkbox-box-border-color-error,var(--spectrum-global-color-red-500))}}.spectrum-FieldGroup_41d350.spectrum-FieldGroup_41d350{width:auto;--spectrum-field-default-width:auto}.spectrum-FieldGroup-group_41d350{flex-direction:column;display:flex}.spectrum-FieldGroup-group--horizontal_41d350{flex-flow:wrap}
package/dist/main.js CHANGED
@@ -21,8 +21,39 @@ function $parcel$interopDefault(a) {
21
21
 
22
22
  $parcel$export(module.exports, "Checkbox", () => $096ccd12d23dd6cc$export$48513f6b9f8ce62d);
23
23
  $parcel$export(module.exports, "CheckboxGroup", () => $1151290755e16c44$export$4aa08d5625cb8ead);
24
-
25
- const $bdf3bf7fe71fe120$export$baf37c4be89255b8 = ($parcel$interopDefault($5Ft2u$react)).createContext(null);
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
+ */ /// <reference types="css-module-types" />
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
+ */ /*
46
+ * Copyright 2020 Adobe. All rights reserved.
47
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
48
+ * you may not use this file except in compliance with the License. You may obtain a copy
49
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
50
+ *
51
+ * Unless required by applicable law or agreed to in writing, software distributed under
52
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
53
+ * OF ANY KIND, either express or implied. See the License for the specific language
54
+ * governing permissions and limitations under the License.
55
+ */
56
+ const $bdf3bf7fe71fe120$export$baf37c4be89255b8 = (0, ($parcel$interopDefault($5Ft2u$react))).createContext(null);
26
57
 
27
58
 
28
59
 
@@ -79,19 +110,19 @@ $591f3ccba6339bdb$export$d35bc1e505d1ebbf = "is-disabled_4870fc";
79
110
 
80
111
  function $096ccd12d23dd6cc$var$Checkbox(props, ref) {
81
112
  let originalProps = props;
82
- props = $5Ft2u$reactspectrumprovider.useProviderProps(props);
113
+ props = (0, $5Ft2u$reactspectrumprovider.useProviderProps)(props);
83
114
  let { isIndeterminate: isIndeterminate = false , isEmphasized: isEmphasized = false , isDisabled: isDisabled = false , autoFocus: autoFocus , children: children , validationState: validationState , ...otherProps } = props;
84
- let { styleProps: styleProps } = $5Ft2u$reactspectrumutils.useStyleProps(otherProps);
85
- let { hoverProps: hoverProps , isHovered: isHovered } = $5Ft2u$reactariainteractions.useHover({
115
+ let { styleProps: styleProps } = (0, $5Ft2u$reactspectrumutils.useStyleProps)(otherProps);
116
+ let { hoverProps: hoverProps , isHovered: isHovered } = (0, $5Ft2u$reactariainteractions.useHover)({
86
117
  isDisabled: isDisabled
87
118
  });
88
- let inputRef = $5Ft2u$react.useRef(null);
89
- let domRef = $5Ft2u$reactspectrumutils.useFocusableRef(ref, inputRef);
119
+ let inputRef = (0, $5Ft2u$react.useRef)(null);
120
+ let domRef = (0, $5Ft2u$reactspectrumutils.useFocusableRef)(ref, inputRef);
90
121
  // Swap hooks depending on whether this checkbox is inside a CheckboxGroup.
91
122
  // This is a bit unorthodox. Typically, hooks cannot be called in a conditional,
92
123
  // but since the checkbox won't move in and out of a group, it should be safe.
93
- let groupState = $5Ft2u$react.useContext($bdf3bf7fe71fe120$export$baf37c4be89255b8);
94
- let { inputProps: inputProps } = groupState ? $5Ft2u$reactariacheckbox.useCheckboxGroupItem({
124
+ let groupState = (0, $5Ft2u$react.useContext)((0, $bdf3bf7fe71fe120$export$baf37c4be89255b8));
125
+ let { inputProps: inputProps } = groupState ? (0, $5Ft2u$reactariacheckbox.useCheckboxGroupItem)({
95
126
  ...props,
96
127
  // Value is optional for standalone checkboxes, but required for CheckboxGroup items;
97
128
  // it's passed explicitly here to avoid typescript error (requires ignore).
@@ -101,52 +132,62 @@ function $096ccd12d23dd6cc$var$Checkbox(props, ref) {
101
132
  // the props for this individual checkbox, and not from the group via context.
102
133
  isRequired: originalProps.isRequired,
103
134
  validationState: originalProps.validationState
104
- }, groupState, inputRef) : $5Ft2u$reactariacheckbox.useCheckbox(props, $5Ft2u$reactstatelytoggle.useToggleState(props), inputRef);
105
- let markIcon = isIndeterminate ? /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement(($parcel$interopDefault($5Ft2u$spectrumiconsuiDashSmall)), {
106
- UNSAFE_className: $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports)), 'spectrum-Checkbox-partialCheckmark')
107
- }) : /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement(($parcel$interopDefault($5Ft2u$spectrumiconsuiCheckmarkSmall)), {
108
- UNSAFE_className: $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports)), 'spectrum-Checkbox-checkmark')
135
+ }, groupState, inputRef) : (0, $5Ft2u$reactariacheckbox.useCheckbox)(props, (0, $5Ft2u$reactstatelytoggle.useToggleState)(props), inputRef);
136
+ let markIcon = isIndeterminate ? /*#__PURE__*/ (0, ($parcel$interopDefault($5Ft2u$react))).createElement((0, ($parcel$interopDefault($5Ft2u$spectrumiconsuiDashSmall))), {
137
+ UNSAFE_className: (0, $5Ft2u$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports))), "spectrum-Checkbox-partialCheckmark")
138
+ }) : /*#__PURE__*/ (0, ($parcel$interopDefault($5Ft2u$react))).createElement((0, ($parcel$interopDefault($5Ft2u$spectrumiconsuiCheckmarkSmall))), {
139
+ UNSAFE_className: (0, $5Ft2u$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports))), "spectrum-Checkbox-checkmark")
109
140
  });
110
141
  if (groupState) {
111
142
  for (let key of [
112
- 'isSelected',
113
- 'defaultSelected',
114
- 'isEmphasized'
143
+ "isSelected",
144
+ "defaultSelected",
145
+ "isEmphasized"
115
146
  ])if (originalProps[key] != null) console.warn(`${key} is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.`);
116
- if (props.value == null) console.warn('A <Checkbox> element within a <CheckboxGroup> requires a `value` property.');
147
+ if (props.value == null) console.warn("A <Checkbox> element within a <CheckboxGroup> requires a `value` property.");
117
148
  }
118
- return(/*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement("label", {
149
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($5Ft2u$react))).createElement("label", {
119
150
  ...styleProps,
120
151
  ...hoverProps,
121
152
  ref: domRef,
122
- className: $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports)), 'spectrum-Checkbox', {
123
- 'is-checked': inputProps.checked,
124
- 'is-indeterminate': isIndeterminate,
125
- 'spectrum-Checkbox--quiet': !isEmphasized,
126
- 'is-invalid': validationState === 'invalid',
127
- 'is-disabled': isDisabled,
128
- 'is-hovered': isHovered
153
+ className: (0, $5Ft2u$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports))), "spectrum-Checkbox", {
154
+ "is-checked": inputProps.checked,
155
+ "is-indeterminate": isIndeterminate,
156
+ "spectrum-Checkbox--quiet": !isEmphasized,
157
+ "is-invalid": validationState === "invalid",
158
+ "is-disabled": isDisabled,
159
+ "is-hovered": isHovered
129
160
  }, styleProps.className)
130
- }, /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement($5Ft2u$reactariafocus.FocusRing, {
131
- focusRingClass: $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports)), 'focus-ring'),
161
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5Ft2u$react))).createElement((0, $5Ft2u$reactariafocus.FocusRing), {
162
+ focusRingClass: (0, $5Ft2u$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports))), "focus-ring"),
132
163
  autoFocus: autoFocus
133
- }, /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement("input", {
164
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5Ft2u$react))).createElement("input", {
134
165
  ...inputProps,
135
166
  ref: inputRef,
136
- className: $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports)), 'spectrum-Checkbox-input')
137
- })), /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement("span", {
138
- className: $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports)), 'spectrum-Checkbox-box')
139
- }, markIcon), children && /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement("span", {
140
- className: $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports)), 'spectrum-Checkbox-label')
141
- }, children)));
167
+ className: (0, $5Ft2u$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports))), "spectrum-Checkbox-input")
168
+ })), /*#__PURE__*/ (0, ($parcel$interopDefault($5Ft2u$react))).createElement("span", {
169
+ className: (0, $5Ft2u$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports))), "spectrum-Checkbox-box")
170
+ }, markIcon), children && /*#__PURE__*/ (0, ($parcel$interopDefault($5Ft2u$react))).createElement("span", {
171
+ className: (0, $5Ft2u$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($591f3ccba6339bdb$exports))), "spectrum-Checkbox-label")
172
+ }, children));
142
173
  }
143
174
  /**
144
175
  * Checkboxes allow users to select multiple items from a list of individual items,
145
176
  * or to mark one individual item as selected.
146
- */ let $096ccd12d23dd6cc$export$48513f6b9f8ce62d = /*#__PURE__*/ $5Ft2u$react.forwardRef($096ccd12d23dd6cc$var$Checkbox);
147
-
177
+ */ let $096ccd12d23dd6cc$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, $5Ft2u$react.forwardRef)($096ccd12d23dd6cc$var$Checkbox);
148
178
 
149
179
 
180
+ /*
181
+ * Copyright 2020 Adobe. All rights reserved.
182
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
183
+ * you may not use this file except in compliance with the License. You may obtain a copy
184
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
185
+ *
186
+ * Unless required by applicable law or agreed to in writing, software distributed under
187
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
188
+ * OF ANY KIND, either express or implied. See the License for the specific language
189
+ * governing permissions and limitations under the License.
190
+ */
150
191
 
151
192
 
152
193
 
@@ -168,36 +209,36 @@ $53124a3a0fd56fca$export$1ad8646bcba21c0e = "spectrum-FieldGroup-group--horizont
168
209
 
169
210
 
170
211
  function $1151290755e16c44$var$CheckboxGroup(props, ref) {
171
- props = $5Ft2u$reactspectrumprovider.useProviderProps(props);
172
- props = $5Ft2u$reactspectrumform.useFormProps(props);
173
- let { isEmphasized: isEmphasized , children: children , orientation: orientation = 'vertical' , validationState: validationState } = props;
174
- let domRef = $5Ft2u$reactspectrumutils.useDOMRef(ref);
175
- let state = $5Ft2u$reactstatelycheckbox.useCheckboxGroupState(props);
176
- let { labelProps: labelProps , groupProps: groupProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $5Ft2u$reactariacheckbox.useCheckboxGroup(props, state);
177
- return(/*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement($5Ft2u$reactspectrumlabel.Field, {
212
+ props = (0, $5Ft2u$reactspectrumprovider.useProviderProps)(props);
213
+ props = (0, $5Ft2u$reactspectrumform.useFormProps)(props);
214
+ let { isEmphasized: isEmphasized , children: children , orientation: orientation = "vertical" , validationState: validationState } = props;
215
+ let domRef = (0, $5Ft2u$reactspectrumutils.useDOMRef)(ref);
216
+ let state = (0, $5Ft2u$reactstatelycheckbox.useCheckboxGroupState)(props);
217
+ let { labelProps: labelProps , groupProps: groupProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $5Ft2u$reactariacheckbox.useCheckboxGroup)(props, state);
218
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($5Ft2u$react))).createElement((0, $5Ft2u$reactspectrumlabel.Field), {
178
219
  ...props,
179
220
  ref: domRef,
180
- wrapperClassName: $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($53124a3a0fd56fca$exports)), 'spectrum-FieldGroup'),
221
+ wrapperClassName: (0, $5Ft2u$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($53124a3a0fd56fca$exports))), "spectrum-FieldGroup"),
181
222
  labelProps: labelProps,
182
223
  descriptionProps: descriptionProps,
183
224
  errorMessageProps: errorMessageProps,
184
225
  elementType: "span",
185
226
  includeNecessityIndicatorInAccessibilityName: true
186
- }, /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement("div", {
227
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5Ft2u$react))).createElement("div", {
187
228
  ...groupProps,
188
- className: $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($53124a3a0fd56fca$exports)), 'spectrum-FieldGroup-group', {
189
- 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'
229
+ className: (0, $5Ft2u$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($53124a3a0fd56fca$exports))), "spectrum-FieldGroup-group", {
230
+ "spectrum-FieldGroup-group--horizontal": orientation === "horizontal"
190
231
  })
191
- }, /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement($5Ft2u$reactspectrumprovider.Provider, {
232
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5Ft2u$react))).createElement((0, $5Ft2u$reactspectrumprovider.Provider), {
192
233
  isEmphasized: isEmphasized,
193
234
  validationState: validationState
194
- }, /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement($bdf3bf7fe71fe120$export$baf37c4be89255b8.Provider, {
235
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5Ft2u$react))).createElement((0, $bdf3bf7fe71fe120$export$baf37c4be89255b8).Provider, {
195
236
  value: state
196
- }, children)))));
237
+ }, children))));
197
238
  }
198
239
  /**
199
240
  * A CheckboxGroup allows users to select one or more items from a list of choices.
200
- */ const $1151290755e16c44$export$4aa08d5625cb8ead = /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).forwardRef($1151290755e16c44$var$CheckboxGroup);
241
+ */ const $1151290755e16c44$export$4aa08d5625cb8ead = /*#__PURE__*/ (0, ($parcel$interopDefault($5Ft2u$react))).forwardRef($1151290755e16c44$var$CheckboxGroup);
201
242
 
202
243
 
203
244
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AEeO,KAAK,CAAC,yCAAoB,GAAG,sCAAK,CAAC,aAAa,CAA4B,IAAI;;;;;;;;;;;;;;;;;;;;;;;ACfvF,GAAmC;AACnC,GAAyC;AACzC,GAA4B;AAC5B,GAAuC;AACvC,GAAkC;AAClC,GAA6C;AAC7C,GAAoD;AACpD,GAA4B;AAC5B,GAAyC;AACzC,GAA4B;AAC5B,GAA0C;AAC1C,GAA4B;AAC5B,GAA6B;AAZ7B,yCAAmC,GAAG,CAA0B;AAChE,yCAAyC,GAAG,CAAgC;AAC5E,yCAA4B,GAAG,CAAmB;AAClD,yCAAuC,GAAG,CAA8B;AACxE,wCAAkC,GAAG,CAAyB;AAC9D,yCAA6C,GAAG,CAAoC;AACpF,yCAAoD,GAAG,CAA2C;AAClG,yCAA4B,GAAG,CAAmB;AAClD,yCAAyC,GAAG,CAAgC;AAC5E,yCAA4B,GAAG,CAAmB;AAClD,yCAA0C,GAAG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;OACxC,QAAQ;AAMrB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAc,iBAAG,sCAAK,CAAC,UAAU,CAAC,mCAAa;;","sources":["packages/@react-spectrum/checkbox/src/index.ts","packages/@react-spectrum/checkbox/src/Checkbox.tsx","packages/@react-spectrum/checkbox/src/context.ts","packages/@adobe/spectrum-css-temp/components/checkbox/vars.css","packages/@react-spectrum/checkbox/src/CheckboxGroup.tsx","packages/@adobe/spectrum-css-temp/components/fieldgroup/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/// <reference types=\"css-module-types\" />\nexport {Checkbox} from './Checkbox';\nexport {CheckboxGroup} from './CheckboxGroup';\nexport type {SpectrumCheckboxProps, SpectrumCheckboxGroupProps} from '@react-types/checkbox';\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 {CheckboxGroupContext} from './context';\nimport CheckmarkSmall from '@spectrum-icons/ui/CheckmarkSmall';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport DashSmall from '@spectrum-icons/ui/DashSmall';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useContext, useRef} from 'react';\nimport {SpectrumCheckboxProps} from '@react-types/checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/checkbox/vars.css';\nimport {useCheckbox, useCheckboxGroupItem} from '@react-aria/checkbox';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction Checkbox(props: SpectrumCheckboxProps, ref: FocusableRef<HTMLLabelElement>) {\n let originalProps = props;\n props = useProviderProps(props);\n let {\n isIndeterminate = false,\n isEmphasized = false,\n isDisabled = false,\n autoFocus,\n children,\n validationState,\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\n // Swap hooks depending on whether this checkbox is inside a CheckboxGroup.\n // This is a bit unorthodox. Typically, hooks cannot be called in a conditional,\n // but since the checkbox won't move in and out of a group, it should be safe.\n let groupState = useContext(CheckboxGroupContext);\n let {inputProps} = groupState\n // eslint-disable-next-line react-hooks/rules-of-hooks\n ? useCheckboxGroupItem({\n ...props,\n // Value is optional for standalone checkboxes, but required for CheckboxGroup items;\n // it's passed explicitly here to avoid typescript error (requires ignore).\n // @ts-ignore\n value: props.value,\n // Only pass isRequired and validationState to react-aria if they came from\n // the props for this individual checkbox, and not from the group via context.\n isRequired: originalProps.isRequired,\n validationState: originalProps.validationState\n }, groupState, inputRef)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n : useCheckbox(props, useToggleState(props), inputRef);\n\n let markIcon = isIndeterminate\n ? <DashSmall UNSAFE_className={classNames(styles, 'spectrum-Checkbox-partialCheckmark')} />\n : <CheckmarkSmall UNSAFE_className={classNames(styles, 'spectrum-Checkbox-checkmark')} />;\n\n if (groupState) {\n for (let key of ['isSelected', 'defaultSelected', 'isEmphasized']) {\n if (originalProps[key] != null) {\n console.warn(`${key} is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.`);\n }\n }\n if (props.value == null) {\n console.warn('A <Checkbox> element within a <CheckboxGroup> requires a `value` property.');\n }\n }\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Checkbox',\n {\n 'is-checked': inputProps.checked,\n 'is-indeterminate': isIndeterminate,\n 'spectrum-Checkbox--quiet': !isEmphasized,\n 'is-invalid': validationState === 'invalid',\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-Checkbox-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-Checkbox-box')}>{markIcon}</span>\n {children && (\n <span className={classNames(styles, 'spectrum-Checkbox-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\nexport {_Checkbox as Checkbox};\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 {CheckboxGroupState} from '@react-stately/checkbox';\nimport React from 'react';\n\nexport const CheckboxGroupContext = React.createContext<CheckboxGroupState | null>(null);\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 {CheckboxGroupContext} from './context';\nimport {classNames, useDOMRef} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React from 'react';\nimport {SpectrumCheckboxGroupProps} from '@react-types/checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useCheckboxGroup} from '@react-aria/checkbox';\nimport {useCheckboxGroupState} from '@react-stately/checkbox';\nimport {useFormProps} from '@react-spectrum/form';\n\nfunction CheckboxGroup(props: SpectrumCheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n isEmphasized,\n children,\n orientation = 'vertical',\n validationState\n } = props;\n let domRef = useDOMRef(ref);\n let state = useCheckboxGroupState(props);\n let {labelProps, groupProps, descriptionProps, errorMessageProps} = useCheckboxGroup(props, state);\n\n return (\n <Field\n {...props}\n ref={domRef}\n wrapperClassName={classNames(styles, 'spectrum-FieldGroup')}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n elementType=\"span\"\n includeNecessityIndicatorInAccessibilityName>\n <div\n {...groupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup-group',\n {\n 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n }\n )\n }>\n <Provider isEmphasized={isEmphasized} validationState={validationState}>\n <CheckboxGroupContext.Provider value={state}>\n {children}\n </CheckboxGroupContext.Provider>\n </Provider>\n </div>\n </Field>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nconst _CheckboxGroup = React.forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\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"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C;ACX1C;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;AAGO,MAAM,4CAAuB,CAAA,GAAA,sCAAK,AAAD,EAAE,aAAa,CAA4B,IAAI;;CDLtF,GAED;;;;;;;;;;;;;;;;;;;;;AEZA,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;AAZA,4CAAsC;AACtC,4CAA4C;AAC5C,4CAA+B;AAC/B,4CAA0C;AAC1C,2CAAqC;AACrC,4CAAgD;AAChD,4CAAuD;AACvD,4CAA+B;AAC/B,4CAA4C;AAC5C,4CAA+B;AAC/B,4CAA6C;AAC7C,4CAA+B;AAC/B,4CAAgC;;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,SAAQ,eACR,cAAc,8BACd,gBAAe,EAChB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,QAAQ,CAAA,GAAA,iDAAoB,EAAE;IAClC,IAAI,cAAC,WAAU,cAAE,WAAU,oBAAE,iBAAgB,qBAAE,kBAAiB,EAAC,GAAG,CAAA,GAAA,yCAAgB,AAAD,EAAE,OAAO;IAE5F,qBACE,0DAAC,CAAA,GAAA,+BAAK,AAAD;QACF,GAAG,KAAK;QACT,KAAK;QACL,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;QACrC,YAAY;QACZ,kBAAkB;QAClB,mBAAmB;QACnB,aAAY;QACZ,8CAAA,IAA4C;qBAC5C,0DAAC;QACE,GAAG,UAAU;QACd,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,yDAAM,OAAD,GACL,6BACA;YACE,yCAAyC,gBAAgB;QAC3D;qBAGJ,0DAAC,CAAA,GAAA,qCAAO;QAAE,cAAc;QAAc,iBAAiB;qBACrD,0DAAC,CAAA,GAAA,yCAAoB,AAAD,EAAE,QAAQ;QAAC,OAAO;OACnC;AAMb;AAEA;;CAEC,GACD,MAAM,0DAAiB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;","sources":["packages/@react-spectrum/checkbox/src/index.ts","packages/@react-spectrum/checkbox/src/Checkbox.tsx","packages/@react-spectrum/checkbox/src/context.ts","packages/@adobe/spectrum-css-temp/components/checkbox/vars.css","packages/@react-spectrum/checkbox/src/CheckboxGroup.tsx","packages/@adobe/spectrum-css-temp/components/fieldgroup/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/// <reference types=\"css-module-types\" />\nexport {Checkbox} from './Checkbox';\nexport {CheckboxGroup} from './CheckboxGroup';\nexport type {SpectrumCheckboxProps, SpectrumCheckboxGroupProps} from '@react-types/checkbox';\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 {CheckboxGroupContext} from './context';\nimport CheckmarkSmall from '@spectrum-icons/ui/CheckmarkSmall';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport DashSmall from '@spectrum-icons/ui/DashSmall';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useContext, useRef} from 'react';\nimport {SpectrumCheckboxProps} from '@react-types/checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/checkbox/vars.css';\nimport {useCheckbox, useCheckboxGroupItem} from '@react-aria/checkbox';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction Checkbox(props: SpectrumCheckboxProps, ref: FocusableRef<HTMLLabelElement>) {\n let originalProps = props;\n props = useProviderProps(props);\n let {\n isIndeterminate = false,\n isEmphasized = false,\n isDisabled = false,\n autoFocus,\n children,\n validationState,\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\n // Swap hooks depending on whether this checkbox is inside a CheckboxGroup.\n // This is a bit unorthodox. Typically, hooks cannot be called in a conditional,\n // but since the checkbox won't move in and out of a group, it should be safe.\n let groupState = useContext(CheckboxGroupContext);\n let {inputProps} = groupState\n // eslint-disable-next-line react-hooks/rules-of-hooks\n ? useCheckboxGroupItem({\n ...props,\n // Value is optional for standalone checkboxes, but required for CheckboxGroup items;\n // it's passed explicitly here to avoid typescript error (requires ignore).\n // @ts-ignore\n value: props.value,\n // Only pass isRequired and validationState to react-aria if they came from\n // the props for this individual checkbox, and not from the group via context.\n isRequired: originalProps.isRequired,\n validationState: originalProps.validationState\n }, groupState, inputRef)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n : useCheckbox(props, useToggleState(props), inputRef);\n\n let markIcon = isIndeterminate\n ? <DashSmall UNSAFE_className={classNames(styles, 'spectrum-Checkbox-partialCheckmark')} />\n : <CheckmarkSmall UNSAFE_className={classNames(styles, 'spectrum-Checkbox-checkmark')} />;\n\n if (groupState) {\n for (let key of ['isSelected', 'defaultSelected', 'isEmphasized']) {\n if (originalProps[key] != null) {\n console.warn(`${key} is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.`);\n }\n }\n if (props.value == null) {\n console.warn('A <Checkbox> element within a <CheckboxGroup> requires a `value` property.');\n }\n }\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Checkbox',\n {\n 'is-checked': inputProps.checked,\n 'is-indeterminate': isIndeterminate,\n 'spectrum-Checkbox--quiet': !isEmphasized,\n 'is-invalid': validationState === 'invalid',\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-Checkbox-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-Checkbox-box')}>{markIcon}</span>\n {children && (\n <span className={classNames(styles, 'spectrum-Checkbox-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\nexport {_Checkbox as Checkbox};\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 {CheckboxGroupState} from '@react-stately/checkbox';\nimport React from 'react';\n\nexport const CheckboxGroupContext = React.createContext<CheckboxGroupState | null>(null);\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 {CheckboxGroupContext} from './context';\nimport {classNames, useDOMRef} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React from 'react';\nimport {SpectrumCheckboxGroupProps} from '@react-types/checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useCheckboxGroup} from '@react-aria/checkbox';\nimport {useCheckboxGroupState} from '@react-stately/checkbox';\nimport {useFormProps} from '@react-spectrum/form';\n\nfunction CheckboxGroup(props: SpectrumCheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n isEmphasized,\n children,\n orientation = 'vertical',\n validationState\n } = props;\n let domRef = useDOMRef(ref);\n let state = useCheckboxGroupState(props);\n let {labelProps, groupProps, descriptionProps, errorMessageProps} = useCheckboxGroup(props, state);\n\n return (\n <Field\n {...props}\n ref={domRef}\n wrapperClassName={classNames(styles, 'spectrum-FieldGroup')}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n elementType=\"span\"\n includeNecessityIndicatorInAccessibilityName>\n <div\n {...groupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup-group',\n {\n 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n }\n )\n }>\n <Provider isEmphasized={isEmphasized} validationState={validationState}>\n <CheckboxGroupContext.Provider value={state}>\n {children}\n </CheckboxGroupContext.Provider>\n </Provider>\n </div>\n </Field>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nconst _CheckboxGroup = React.forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\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"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -18,8 +18,39 @@ function $parcel$interopDefault(a) {
18
18
  function $parcel$export(e, n, v, s) {
19
19
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
20
20
  }
21
-
22
- const $8c8ab388b155237e$export$baf37c4be89255b8 = $gpy1V$react.createContext(null);
21
+ /*
22
+ * Copyright 2020 Adobe. All rights reserved.
23
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License. You may obtain a copy
25
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
26
+ *
27
+ * Unless required by applicable law or agreed to in writing, software distributed under
28
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
29
+ * OF ANY KIND, either express or implied. See the License for the specific language
30
+ * governing permissions and limitations under the License.
31
+ */ /// <reference types="css-module-types" />
32
+ /*
33
+ * Copyright 2020 Adobe. All rights reserved.
34
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
35
+ * you may not use this file except in compliance with the License. You may obtain a copy
36
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
37
+ *
38
+ * Unless required by applicable law or agreed to in writing, software distributed under
39
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
40
+ * OF ANY KIND, either express or implied. See the License for the specific language
41
+ * governing permissions and limitations under the License.
42
+ */ /*
43
+ * Copyright 2020 Adobe. All rights reserved.
44
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
45
+ * you may not use this file except in compliance with the License. You may obtain a copy
46
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
47
+ *
48
+ * Unless required by applicable law or agreed to in writing, software distributed under
49
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
50
+ * OF ANY KIND, either express or implied. See the License for the specific language
51
+ * governing permissions and limitations under the License.
52
+ */
53
+ const $8c8ab388b155237e$export$baf37c4be89255b8 = (0, $gpy1V$react).createContext(null);
23
54
 
24
55
 
25
56
 
@@ -76,19 +107,19 @@ $fe1a56c62936037c$export$d35bc1e505d1ebbf = "is-disabled_4870fc";
76
107
 
77
108
  function $25b6292d81af2844$var$Checkbox(props, ref) {
78
109
  let originalProps = props;
79
- props = $gpy1V$useProviderProps(props);
110
+ props = (0, $gpy1V$useProviderProps)(props);
80
111
  let { isIndeterminate: isIndeterminate = false , isEmphasized: isEmphasized = false , isDisabled: isDisabled = false , autoFocus: autoFocus , children: children , validationState: validationState , ...otherProps } = props;
81
- let { styleProps: styleProps } = $gpy1V$useStyleProps(otherProps);
82
- let { hoverProps: hoverProps , isHovered: isHovered } = $gpy1V$useHover({
112
+ let { styleProps: styleProps } = (0, $gpy1V$useStyleProps)(otherProps);
113
+ let { hoverProps: hoverProps , isHovered: isHovered } = (0, $gpy1V$useHover)({
83
114
  isDisabled: isDisabled
84
115
  });
85
- let inputRef = $gpy1V$useRef(null);
86
- let domRef = $gpy1V$useFocusableRef(ref, inputRef);
116
+ let inputRef = (0, $gpy1V$useRef)(null);
117
+ let domRef = (0, $gpy1V$useFocusableRef)(ref, inputRef);
87
118
  // Swap hooks depending on whether this checkbox is inside a CheckboxGroup.
88
119
  // This is a bit unorthodox. Typically, hooks cannot be called in a conditional,
89
120
  // but since the checkbox won't move in and out of a group, it should be safe.
90
- let groupState = $gpy1V$useContext($8c8ab388b155237e$export$baf37c4be89255b8);
91
- let { inputProps: inputProps } = groupState ? $gpy1V$useCheckboxGroupItem({
121
+ let groupState = (0, $gpy1V$useContext)((0, $8c8ab388b155237e$export$baf37c4be89255b8));
122
+ let { inputProps: inputProps } = groupState ? (0, $gpy1V$useCheckboxGroupItem)({
92
123
  ...props,
93
124
  // Value is optional for standalone checkboxes, but required for CheckboxGroup items;
94
125
  // it's passed explicitly here to avoid typescript error (requires ignore).
@@ -98,52 +129,62 @@ function $25b6292d81af2844$var$Checkbox(props, ref) {
98
129
  // the props for this individual checkbox, and not from the group via context.
99
130
  isRequired: originalProps.isRequired,
100
131
  validationState: originalProps.validationState
101
- }, groupState, inputRef) : $gpy1V$useCheckbox(props, $gpy1V$useToggleState(props), inputRef);
102
- let markIcon = isIndeterminate ? /*#__PURE__*/ $gpy1V$react.createElement($gpy1V$spectrumiconsuiDashSmall, {
103
- UNSAFE_className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'spectrum-Checkbox-partialCheckmark')
104
- }) : /*#__PURE__*/ $gpy1V$react.createElement($gpy1V$spectrumiconsuiCheckmarkSmall, {
105
- UNSAFE_className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'spectrum-Checkbox-checkmark')
132
+ }, groupState, inputRef) : (0, $gpy1V$useCheckbox)(props, (0, $gpy1V$useToggleState)(props), inputRef);
133
+ let markIcon = isIndeterminate ? /*#__PURE__*/ (0, $gpy1V$react).createElement((0, $gpy1V$spectrumiconsuiDashSmall), {
134
+ UNSAFE_className: (0, $gpy1V$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports))), "spectrum-Checkbox-partialCheckmark")
135
+ }) : /*#__PURE__*/ (0, $gpy1V$react).createElement((0, $gpy1V$spectrumiconsuiCheckmarkSmall), {
136
+ UNSAFE_className: (0, $gpy1V$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports))), "spectrum-Checkbox-checkmark")
106
137
  });
107
138
  if (groupState) {
108
139
  for (let key of [
109
- 'isSelected',
110
- 'defaultSelected',
111
- 'isEmphasized'
140
+ "isSelected",
141
+ "defaultSelected",
142
+ "isEmphasized"
112
143
  ])if (originalProps[key] != null) console.warn(`${key} is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.`);
113
- if (props.value == null) console.warn('A <Checkbox> element within a <CheckboxGroup> requires a `value` property.');
144
+ if (props.value == null) console.warn("A <Checkbox> element within a <CheckboxGroup> requires a `value` property.");
114
145
  }
115
- return(/*#__PURE__*/ $gpy1V$react.createElement("label", {
146
+ return /*#__PURE__*/ (0, $gpy1V$react).createElement("label", {
116
147
  ...styleProps,
117
148
  ...hoverProps,
118
149
  ref: domRef,
119
- className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'spectrum-Checkbox', {
120
- 'is-checked': inputProps.checked,
121
- 'is-indeterminate': isIndeterminate,
122
- 'spectrum-Checkbox--quiet': !isEmphasized,
123
- 'is-invalid': validationState === 'invalid',
124
- 'is-disabled': isDisabled,
125
- 'is-hovered': isHovered
150
+ className: (0, $gpy1V$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports))), "spectrum-Checkbox", {
151
+ "is-checked": inputProps.checked,
152
+ "is-indeterminate": isIndeterminate,
153
+ "spectrum-Checkbox--quiet": !isEmphasized,
154
+ "is-invalid": validationState === "invalid",
155
+ "is-disabled": isDisabled,
156
+ "is-hovered": isHovered
126
157
  }, styleProps.className)
127
- }, /*#__PURE__*/ $gpy1V$react.createElement($gpy1V$FocusRing, {
128
- focusRingClass: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'focus-ring'),
158
+ }, /*#__PURE__*/ (0, $gpy1V$react).createElement((0, $gpy1V$FocusRing), {
159
+ focusRingClass: (0, $gpy1V$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports))), "focus-ring"),
129
160
  autoFocus: autoFocus
130
- }, /*#__PURE__*/ $gpy1V$react.createElement("input", {
161
+ }, /*#__PURE__*/ (0, $gpy1V$react).createElement("input", {
131
162
  ...inputProps,
132
163
  ref: inputRef,
133
- className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'spectrum-Checkbox-input')
134
- })), /*#__PURE__*/ $gpy1V$react.createElement("span", {
135
- className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'spectrum-Checkbox-box')
136
- }, markIcon), children && /*#__PURE__*/ $gpy1V$react.createElement("span", {
137
- className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'spectrum-Checkbox-label')
138
- }, children)));
164
+ className: (0, $gpy1V$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports))), "spectrum-Checkbox-input")
165
+ })), /*#__PURE__*/ (0, $gpy1V$react).createElement("span", {
166
+ className: (0, $gpy1V$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports))), "spectrum-Checkbox-box")
167
+ }, markIcon), children && /*#__PURE__*/ (0, $gpy1V$react).createElement("span", {
168
+ className: (0, $gpy1V$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports))), "spectrum-Checkbox-label")
169
+ }, children));
139
170
  }
140
171
  /**
141
172
  * Checkboxes allow users to select multiple items from a list of individual items,
142
173
  * or to mark one individual item as selected.
143
- */ let $25b6292d81af2844$export$48513f6b9f8ce62d = /*#__PURE__*/ $gpy1V$forwardRef($25b6292d81af2844$var$Checkbox);
144
-
174
+ */ let $25b6292d81af2844$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, $gpy1V$forwardRef)($25b6292d81af2844$var$Checkbox);
145
175
 
146
176
 
177
+ /*
178
+ * Copyright 2020 Adobe. All rights reserved.
179
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
180
+ * you may not use this file except in compliance with the License. You may obtain a copy
181
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
182
+ *
183
+ * Unless required by applicable law or agreed to in writing, software distributed under
184
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
185
+ * OF ANY KIND, either express or implied. See the License for the specific language
186
+ * governing permissions and limitations under the License.
187
+ */
147
188
 
148
189
 
149
190
 
@@ -165,36 +206,36 @@ $4cb2b26710154c56$export$1ad8646bcba21c0e = "spectrum-FieldGroup-group--horizont
165
206
 
166
207
 
167
208
  function $73f43ce9d441cc69$var$CheckboxGroup(props, ref) {
168
- props = $gpy1V$useProviderProps(props);
169
- props = $gpy1V$useFormProps(props);
170
- let { isEmphasized: isEmphasized , children: children , orientation: orientation = 'vertical' , validationState: validationState } = props;
171
- let domRef = $gpy1V$useDOMRef(ref);
172
- let state = $gpy1V$useCheckboxGroupState(props);
173
- let { labelProps: labelProps , groupProps: groupProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $gpy1V$useCheckboxGroup(props, state);
174
- return(/*#__PURE__*/ $gpy1V$react.createElement($gpy1V$Field, {
209
+ props = (0, $gpy1V$useProviderProps)(props);
210
+ props = (0, $gpy1V$useFormProps)(props);
211
+ let { isEmphasized: isEmphasized , children: children , orientation: orientation = "vertical" , validationState: validationState } = props;
212
+ let domRef = (0, $gpy1V$useDOMRef)(ref);
213
+ let state = (0, $gpy1V$useCheckboxGroupState)(props);
214
+ let { labelProps: labelProps , groupProps: groupProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $gpy1V$useCheckboxGroup)(props, state);
215
+ return /*#__PURE__*/ (0, $gpy1V$react).createElement((0, $gpy1V$Field), {
175
216
  ...props,
176
217
  ref: domRef,
177
- wrapperClassName: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports)), 'spectrum-FieldGroup'),
218
+ wrapperClassName: (0, $gpy1V$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports))), "spectrum-FieldGroup"),
178
219
  labelProps: labelProps,
179
220
  descriptionProps: descriptionProps,
180
221
  errorMessageProps: errorMessageProps,
181
222
  elementType: "span",
182
223
  includeNecessityIndicatorInAccessibilityName: true
183
- }, /*#__PURE__*/ $gpy1V$react.createElement("div", {
224
+ }, /*#__PURE__*/ (0, $gpy1V$react).createElement("div", {
184
225
  ...groupProps,
185
- className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports)), 'spectrum-FieldGroup-group', {
186
- 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'
226
+ className: (0, $gpy1V$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports))), "spectrum-FieldGroup-group", {
227
+ "spectrum-FieldGroup-group--horizontal": orientation === "horizontal"
187
228
  })
188
- }, /*#__PURE__*/ $gpy1V$react.createElement($gpy1V$Provider, {
229
+ }, /*#__PURE__*/ (0, $gpy1V$react).createElement((0, $gpy1V$Provider), {
189
230
  isEmphasized: isEmphasized,
190
231
  validationState: validationState
191
- }, /*#__PURE__*/ $gpy1V$react.createElement($8c8ab388b155237e$export$baf37c4be89255b8.Provider, {
232
+ }, /*#__PURE__*/ (0, $gpy1V$react).createElement((0, $8c8ab388b155237e$export$baf37c4be89255b8).Provider, {
192
233
  value: state
193
- }, children)))));
234
+ }, children))));
194
235
  }
195
236
  /**
196
237
  * A CheckboxGroup allows users to select one or more items from a list of choices.
197
- */ const $73f43ce9d441cc69$export$4aa08d5625cb8ead = /*#__PURE__*/ $gpy1V$react.forwardRef($73f43ce9d441cc69$var$CheckboxGroup);
238
+ */ const $73f43ce9d441cc69$export$4aa08d5625cb8ead = /*#__PURE__*/ (0, $gpy1V$react).forwardRef($73f43ce9d441cc69$var$CheckboxGroup);
198
239
 
199
240
 
200
241
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AEeO,KAAK,CAAC,yCAAoB,GAAG,YAAK,CAAC,aAAa,CAA4B,IAAI;;;;;;;;;;;;;;;;;;;;;;;ACfvF,GAAmC;AACnC,GAAyC;AACzC,GAA4B;AAC5B,GAAuC;AACvC,GAAkC;AAClC,GAA6C;AAC7C,GAAoD;AACpD,GAA4B;AAC5B,GAAyC;AACzC,GAA4B;AAC5B,GAA0C;AAC1C,GAA4B;AAC5B,GAA6B;AAZ7B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AC,CAAM;QAClB,4CAA4C,EAA5C,IAA4C;gDAC3C,CAAG;WACE,UAAU;QACd,SAAS,EACP,iBAAU,CACR,gEAAM,EACN,CAA2B,4BAC3B,CAAC;YACC,CAAuC,wCAAE,WAAW,KAAK,CAAY;QACvE,CAAC;gDAGJ,eAAQ;QAAC,YAAY,EAAE,YAAY;QAAE,eAAe,EAAE,eAAe;gDACnE,yCAAoB,CAAC,QAAQ;QAAC,KAAK,EAAE,KAAK;OACxC,QAAQ;AAMrB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAc,iBAAG,YAAK,CAAC,UAAU,CAAC,mCAAa;;","sources":["packages/@react-spectrum/checkbox/src/index.ts","packages/@react-spectrum/checkbox/src/Checkbox.tsx","packages/@react-spectrum/checkbox/src/context.ts","packages/@adobe/spectrum-css-temp/components/checkbox/vars.css","packages/@react-spectrum/checkbox/src/CheckboxGroup.tsx","packages/@adobe/spectrum-css-temp/components/fieldgroup/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/// <reference types=\"css-module-types\" />\nexport {Checkbox} from './Checkbox';\nexport {CheckboxGroup} from './CheckboxGroup';\nexport type {SpectrumCheckboxProps, SpectrumCheckboxGroupProps} from '@react-types/checkbox';\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 {CheckboxGroupContext} from './context';\nimport CheckmarkSmall from '@spectrum-icons/ui/CheckmarkSmall';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport DashSmall from '@spectrum-icons/ui/DashSmall';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useContext, useRef} from 'react';\nimport {SpectrumCheckboxProps} from '@react-types/checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/checkbox/vars.css';\nimport {useCheckbox, useCheckboxGroupItem} from '@react-aria/checkbox';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction Checkbox(props: SpectrumCheckboxProps, ref: FocusableRef<HTMLLabelElement>) {\n let originalProps = props;\n props = useProviderProps(props);\n let {\n isIndeterminate = false,\n isEmphasized = false,\n isDisabled = false,\n autoFocus,\n children,\n validationState,\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\n // Swap hooks depending on whether this checkbox is inside a CheckboxGroup.\n // This is a bit unorthodox. Typically, hooks cannot be called in a conditional,\n // but since the checkbox won't move in and out of a group, it should be safe.\n let groupState = useContext(CheckboxGroupContext);\n let {inputProps} = groupState\n // eslint-disable-next-line react-hooks/rules-of-hooks\n ? useCheckboxGroupItem({\n ...props,\n // Value is optional for standalone checkboxes, but required for CheckboxGroup items;\n // it's passed explicitly here to avoid typescript error (requires ignore).\n // @ts-ignore\n value: props.value,\n // Only pass isRequired and validationState to react-aria if they came from\n // the props for this individual checkbox, and not from the group via context.\n isRequired: originalProps.isRequired,\n validationState: originalProps.validationState\n }, groupState, inputRef)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n : useCheckbox(props, useToggleState(props), inputRef);\n\n let markIcon = isIndeterminate\n ? <DashSmall UNSAFE_className={classNames(styles, 'spectrum-Checkbox-partialCheckmark')} />\n : <CheckmarkSmall UNSAFE_className={classNames(styles, 'spectrum-Checkbox-checkmark')} />;\n\n if (groupState) {\n for (let key of ['isSelected', 'defaultSelected', 'isEmphasized']) {\n if (originalProps[key] != null) {\n console.warn(`${key} is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.`);\n }\n }\n if (props.value == null) {\n console.warn('A <Checkbox> element within a <CheckboxGroup> requires a `value` property.');\n }\n }\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Checkbox',\n {\n 'is-checked': inputProps.checked,\n 'is-indeterminate': isIndeterminate,\n 'spectrum-Checkbox--quiet': !isEmphasized,\n 'is-invalid': validationState === 'invalid',\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-Checkbox-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-Checkbox-box')}>{markIcon}</span>\n {children && (\n <span className={classNames(styles, 'spectrum-Checkbox-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\nexport {_Checkbox as Checkbox};\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 {CheckboxGroupState} from '@react-stately/checkbox';\nimport React from 'react';\n\nexport const CheckboxGroupContext = React.createContext<CheckboxGroupState | null>(null);\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 {CheckboxGroupContext} from './context';\nimport {classNames, useDOMRef} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React from 'react';\nimport {SpectrumCheckboxGroupProps} from '@react-types/checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useCheckboxGroup} from '@react-aria/checkbox';\nimport {useCheckboxGroupState} from '@react-stately/checkbox';\nimport {useFormProps} from '@react-spectrum/form';\n\nfunction CheckboxGroup(props: SpectrumCheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n isEmphasized,\n children,\n orientation = 'vertical',\n validationState\n } = props;\n let domRef = useDOMRef(ref);\n let state = useCheckboxGroupState(props);\n let {labelProps, groupProps, descriptionProps, errorMessageProps} = useCheckboxGroup(props, state);\n\n return (\n <Field\n {...props}\n ref={domRef}\n wrapperClassName={classNames(styles, 'spectrum-FieldGroup')}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n elementType=\"span\"\n includeNecessityIndicatorInAccessibilityName>\n <div\n {...groupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup-group',\n {\n 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n }\n )\n }>\n <Provider isEmphasized={isEmphasized} validationState={validationState}>\n <CheckboxGroupContext.Provider value={state}>\n {children}\n </CheckboxGroupContext.Provider>\n </Provider>\n </div>\n </Field>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nconst _CheckboxGroup = React.forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\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"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C;ACX1C;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;AAGO,MAAM,4CAAuB,CAAA,GAAA,YAAK,AAAD,EAAE,aAAa,CAA4B,IAAI;;CDLtF,GAED;;;;;;;;;;;;;;;;;;;;;AEZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;A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AIZA;;;;;;;;;;CAUC,GAED;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AAFA,4CAAwC;AACxC,4CAA8C;AAC9C,4CAA0D;;;;;;ADsB1D,SAAS,oCAAc,KAAiC,EAAE,GAA2B,EAAE;IACrF,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,mBAAW,EAAE;IACrB,IAAI,gBACF,aAAY,YACZ,SAAQ,eACR,cAAc,8BACd,gBAAe,EAChB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,QAAQ,CAAA,GAAA,4BAAoB,EAAE;IAClC,IAAI,cAAC,WAAU,cAAE,WAAU,oBAAE,iBAAgB,qBAAE,kBAAiB,EAAC,GAAG,CAAA,GAAA,uBAAgB,AAAD,EAAE,OAAO;IAE5F,qBACE,gCAAC,CAAA,GAAA,YAAK,AAAD;QACF,GAAG,KAAK;QACT,KAAK;QACL,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;QACrC,YAAY;QACZ,kBAAkB;QAClB,mBAAmB;QACnB,aAAY;QACZ,8CAAA,IAA4C;qBAC5C,gCAAC;QACE,GAAG,UAAU;QACd,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,yDAAM,OAAD,GACL,6BACA;YACE,yCAAyC,gBAAgB;QAC3D;qBAGJ,gCAAC,CAAA,GAAA,eAAO;QAAE,cAAc;QAAc,iBAAiB;qBACrD,gCAAC,CAAA,GAAA,yCAAoB,AAAD,EAAE,QAAQ;QAAC,OAAO;OACnC;AAMb;AAEA;;CAEC,GACD,MAAM,0DAAiB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC;","sources":["packages/@react-spectrum/checkbox/src/index.ts","packages/@react-spectrum/checkbox/src/Checkbox.tsx","packages/@react-spectrum/checkbox/src/context.ts","packages/@adobe/spectrum-css-temp/components/checkbox/vars.css","packages/@react-spectrum/checkbox/src/CheckboxGroup.tsx","packages/@adobe/spectrum-css-temp/components/fieldgroup/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/// <reference types=\"css-module-types\" />\nexport {Checkbox} from './Checkbox';\nexport {CheckboxGroup} from './CheckboxGroup';\nexport type {SpectrumCheckboxProps, SpectrumCheckboxGroupProps} from '@react-types/checkbox';\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 {CheckboxGroupContext} from './context';\nimport CheckmarkSmall from '@spectrum-icons/ui/CheckmarkSmall';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport DashSmall from '@spectrum-icons/ui/DashSmall';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useContext, useRef} from 'react';\nimport {SpectrumCheckboxProps} from '@react-types/checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/checkbox/vars.css';\nimport {useCheckbox, useCheckboxGroupItem} from '@react-aria/checkbox';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction Checkbox(props: SpectrumCheckboxProps, ref: FocusableRef<HTMLLabelElement>) {\n let originalProps = props;\n props = useProviderProps(props);\n let {\n isIndeterminate = false,\n isEmphasized = false,\n isDisabled = false,\n autoFocus,\n children,\n validationState,\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\n // Swap hooks depending on whether this checkbox is inside a CheckboxGroup.\n // This is a bit unorthodox. Typically, hooks cannot be called in a conditional,\n // but since the checkbox won't move in and out of a group, it should be safe.\n let groupState = useContext(CheckboxGroupContext);\n let {inputProps} = groupState\n // eslint-disable-next-line react-hooks/rules-of-hooks\n ? useCheckboxGroupItem({\n ...props,\n // Value is optional for standalone checkboxes, but required for CheckboxGroup items;\n // it's passed explicitly here to avoid typescript error (requires ignore).\n // @ts-ignore\n value: props.value,\n // Only pass isRequired and validationState to react-aria if they came from\n // the props for this individual checkbox, and not from the group via context.\n isRequired: originalProps.isRequired,\n validationState: originalProps.validationState\n }, groupState, inputRef)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n : useCheckbox(props, useToggleState(props), inputRef);\n\n let markIcon = isIndeterminate\n ? <DashSmall UNSAFE_className={classNames(styles, 'spectrum-Checkbox-partialCheckmark')} />\n : <CheckmarkSmall UNSAFE_className={classNames(styles, 'spectrum-Checkbox-checkmark')} />;\n\n if (groupState) {\n for (let key of ['isSelected', 'defaultSelected', 'isEmphasized']) {\n if (originalProps[key] != null) {\n console.warn(`${key} is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.`);\n }\n }\n if (props.value == null) {\n console.warn('A <Checkbox> element within a <CheckboxGroup> requires a `value` property.');\n }\n }\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Checkbox',\n {\n 'is-checked': inputProps.checked,\n 'is-indeterminate': isIndeterminate,\n 'spectrum-Checkbox--quiet': !isEmphasized,\n 'is-invalid': validationState === 'invalid',\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-Checkbox-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-Checkbox-box')}>{markIcon}</span>\n {children && (\n <span className={classNames(styles, 'spectrum-Checkbox-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\nexport {_Checkbox as Checkbox};\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 {CheckboxGroupState} from '@react-stately/checkbox';\nimport React from 'react';\n\nexport const CheckboxGroupContext = React.createContext<CheckboxGroupState | null>(null);\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 {CheckboxGroupContext} from './context';\nimport {classNames, useDOMRef} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React from 'react';\nimport {SpectrumCheckboxGroupProps} from '@react-types/checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useCheckboxGroup} from '@react-aria/checkbox';\nimport {useCheckboxGroupState} from '@react-stately/checkbox';\nimport {useFormProps} from '@react-spectrum/form';\n\nfunction CheckboxGroup(props: SpectrumCheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n isEmphasized,\n children,\n orientation = 'vertical',\n validationState\n } = props;\n let domRef = useDOMRef(ref);\n let state = useCheckboxGroupState(props);\n let {labelProps, groupProps, descriptionProps, errorMessageProps} = useCheckboxGroup(props, state);\n\n return (\n <Field\n {...props}\n ref={domRef}\n wrapperClassName={classNames(styles, 'spectrum-FieldGroup')}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n elementType=\"span\"\n includeNecessityIndicatorInAccessibilityName>\n <div\n {...groupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup-group',\n {\n 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n }\n )\n }>\n <Provider isEmphasized={isEmphasized} validationState={validationState}>\n <CheckboxGroupContext.Provider value={state}>\n {children}\n </CheckboxGroupContext.Provider>\n </Provider>\n </div>\n </Field>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nconst _CheckboxGroup = React.forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\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"],"names":[],"version":3,"file":"module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/checkbox",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -31,18 +31,18 @@
31
31
  "url": "https://github.com/adobe/react-spectrum"
32
32
  },
33
33
  "dependencies": {
34
- "@babel/runtime": "^7.6.2",
35
- "@react-aria/checkbox": "^3.7.0",
36
- "@react-aria/focus": "^3.10.0",
37
- "@react-aria/interactions": "^3.13.0",
38
- "@react-spectrum/form": "^3.5.1",
39
- "@react-spectrum/label": "^3.9.0",
40
- "@react-spectrum/utils": "^3.8.0",
41
- "@react-stately/checkbox": "^3.3.1",
42
- "@react-stately/toggle": "^3.4.3",
34
+ "@react-aria/checkbox": "^3.7.1",
35
+ "@react-aria/focus": "^3.10.1",
36
+ "@react-aria/interactions": "^3.13.1",
37
+ "@react-spectrum/form": "^3.5.2",
38
+ "@react-spectrum/label": "^3.10.0",
39
+ "@react-spectrum/utils": "^3.8.1",
40
+ "@react-stately/checkbox": "^3.3.2",
41
+ "@react-stately/toggle": "^3.4.4",
43
42
  "@react-types/checkbox": "^3.4.1",
44
43
  "@react-types/shared": "^3.16.0",
45
- "@spectrum-icons/ui": "^3.4.0"
44
+ "@spectrum-icons/ui": "^3.4.1",
45
+ "@swc/helpers": "^0.4.14"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "2954307ddbefe149241685440c81f80ece6b2c83"
57
+ "gitHead": "5480d76bd815e239366f92852c76b6831ad2a4fd"
58
58
  }