@react-spectrum/checkbox 3.5.1 → 3.6.1

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-checkbox-emphasized-box-border-color-selected,var(--spectrum-global-color-blue-500))}.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-checkbox-emphasized-box-border-color-selected-hover,var(--spectrum-global-color-blue-600))}.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-checkbox-emphasized-box-border-color-selected-down,var(--spectrum-global-color-blue-700))}.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-checkbox-box-border-color-key-focus,var(--spectrum-global-color-gray-700))}.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-checkbox-emphasized-box-border-color-selected-hover,var(--spectrum-global-color-blue-600))}.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-checkbox-quiet-box-border-color-selected,var(--spectrum-global-color-gray-700))}.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-checkbox-quiet-box-border-color-selected-hover,var(--spectrum-global-color-gray-800))}.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-checkbox-box-border-color,var(--spectrum-global-color-gray-600))}.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))}}[dir=ltr] .spectrum-FieldLabel_d2db1f{text-align:left}[dir=rtl] .spectrum-FieldLabel_d2db1f{text-align:right}.spectrum-FieldLabel_d2db1f{box-sizing:border-box;padding:var(--spectrum-fieldlabel-padding-top,var(--spectrum-global-dimension-size-50))0 var(--spectrum-fieldlabel-padding-bottom,var(--spectrum-global-dimension-size-65));font-size:var(--spectrum-fieldlabel-text-size,var(--spectrum-global-dimension-font-size-75));font-weight:var(--spectrum-fieldlabel-text-font-weight,var(--spectrum-global-font-weight-regular));line-height:var(--spectrum-fieldlabel-text-line-height,var(--spectrum-global-font-line-height-small));vertical-align:top;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;font-smoothing:subpixel-antialiased;cursor:default;flex:none;display:flex}[dir=ltr] .spectrum-FieldLabel--positionSide_d2db1f{padding-right:var(--spectrum-fieldlabel-side-padding-x,var(--spectrum-global-dimension-size-100))}[dir=rtl] .spectrum-FieldLabel--positionSide_d2db1f{padding-left:var(--spectrum-fieldlabel-side-padding-x,var(--spectrum-global-dimension-size-100))}.spectrum-FieldLabel--positionSide_d2db1f{padding-top:var(--spectrum-fieldlabel-side-padding-top,var(--spectrum-global-dimension-size-100));display:inline-flex}[dir=ltr] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-right:0}[dir=rtl] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-left:0}[dir=ltr] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-left:var(--spectrum-fieldlabel-asterisk-gap,var(--spectrum-global-dimension-size-25))}[dir=rtl] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-right:var(--spectrum-fieldlabel-asterisk-gap,var(--spectrum-global-dimension-size-25))}.spectrum-FieldLabel-requiredIcon_d2db1f{margin-top:var(--spectrum-fieldlabel-asterisk-margin-y,var(--spectrum-global-dimension-size-50));margin-bottom:0}[dir=ltr] .spectrum-FieldLabel--alignEnd_d2db1f{text-align:right}[dir=rtl] .spectrum-FieldLabel--alignEnd_d2db1f{text-align:left}.spectrum-FieldLabel--alignEnd_d2db1f{justify-content:flex-end}.spectrum-Field_d2db1f{--spectrum-field-default-width:var(--spectrum-alias-single-line-width,var(--spectrum-global-dimension-size-2400))}.spectrum-Field_d2db1f.spectrum-Field--positionTop_d2db1f{width:var(--spectrum-field-default-width);flex-direction:column;display:inline-flex}.spectrum-Field_d2db1f.spectrum-Field--positionTop_d2db1f .spectrum-Field-field_d2db1f{width:100%}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f{align-items:flex-start;display:inline-flex}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f .spectrum-Field-wrapper_d2db1f{min-width:0;width:var(--spectrum-field-default-width);height:100%;flex:1}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f .spectrum-Field-wrapper_d2db1f .spectrum-Field-field_d2db1f{width:100%}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f .spectrum-Field-field_d2db1f{min-width:0;flex:1}[dir=ltr] .spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f{text-align:left}[dir=rtl] .spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f{text-align:right}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f{border-collapse:separate;border-spacing:0 var(--spectrum-global-dimension-size-300);margin:calc(var(--spectrum-global-dimension-size-250)*-1)0;display:table}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f .spectrum-Field_d2db1f{width:100%;display:table-row}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f .spectrum-FieldLabel_d2db1f{display:table-cell}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f .spectrum-Field-wrapper_d2db1f{width:100%}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f .spectrum-Field-field_d2db1f{width:auto;min-width:var(--spectrum-alias-single-line-width,var(--spectrum-global-dimension-size-2400));display:table-cell}.spectrum-Form_d2db1f.spectrum-Form--positionTop_d2db1f{min-width:var(--spectrum-alias-single-line-width,var(--spectrum-global-dimension-size-2400));flex-direction:column;margin:0;display:flex}.spectrum-Form_d2db1f.spectrum-Form--positionTop_d2db1f>*{margin-top:var(--spectrum-global-dimension-size-100);width:100%}.spectrum-StaticField_d2db1f.spectrum-Field--positionSide_d2db1f{-ms-flex-align:first baseline;align-items:baseline}.spectrum-StaticField_d2db1f.spectrum-Field--positionTop_d2db1f{width:unset}.spectrum-StaticField_d2db1f .spectrum-FieldLabel_d2db1f.spectrum-FieldLabel_d2db1f{padding-top:0}.spectrum-StaticField_d2db1f .spectrum-Field-wrapper_d2db1f.spectrum-Field-wrapper_d2db1f{width:unset}.spectrum-StaticField_d2db1f .spectrum-Field-field_d2db1f{word-break:break-word;overflow:hidden}.spectrum-FieldLabel_d2db1f,.spectrum-Form-itemLabel_d2db1f{color:var(--spectrum-fieldlabel-text-color,var(--spectrum-alias-label-text-color))}.spectrum-FieldLabel_d2db1f.is-disabled_d2db1f,.spectrum-Form-itemLabel_d2db1f.is-disabled_d2db1f{color:var(--spectrum-fieldlabel-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-FieldLabel_d2db1f.is-disabled_d2db1f .spectrum-FieldLabel-requiredIcon_d2db1f,.spectrum-Form-itemLabel_d2db1f.is-disabled_d2db1f .spectrum-FieldLabel-requiredIcon_d2db1f{color:var(--spectrum-fieldlabel-asterisk-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-FieldLabel-requiredIcon_d2db1f{color:var(--spectrum-fieldlabel-asterisk-color,var(--spectrum-global-color-gray-600))}.spectrum-FieldGroup_41d350{flex-direction:column;display:flex}.spectrum-FieldGroup--positionSide_41d350{flex-direction:row}.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,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}
package/dist/main.js CHANGED
@@ -94,7 +94,8 @@ function $096ccd12d23dd6cc$var$Checkbox(props, ref) {
94
94
  let { inputProps: inputProps } = groupState ? $5Ft2u$reactariacheckbox.useCheckboxGroupItem({
95
95
  ...props,
96
96
  // Value is optional for standalone checkboxes, but required for CheckboxGroup items;
97
- // it's passed explicitly here to avoid typescript error (requires strictNullChecks disabled).
97
+ // it's passed explicitly here to avoid typescript error (requires ignore).
98
+ // @ts-ignore
98
99
  value: props.value,
99
100
  // Only pass isRequired and validationState to react-aria if they came from
100
101
  // the props for this individual checkbox, and not from the group via context.
@@ -148,69 +149,17 @@ function $096ccd12d23dd6cc$var$Checkbox(props, ref) {
148
149
 
149
150
 
150
151
 
151
- var $eb2fc0ee655eff6b$exports = {};
152
-
153
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-FieldLabel", () => $eb2fc0ee655eff6b$export$493d18e796ae054, (v) => $eb2fc0ee655eff6b$export$493d18e796ae054 = v);
154
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-FieldLabel--positionSide", () => $eb2fc0ee655eff6b$export$9e6f19dc21f22f2e, (v) => $eb2fc0ee655eff6b$export$9e6f19dc21f22f2e = v);
155
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-FieldLabel-requiredIcon", () => $eb2fc0ee655eff6b$export$7c47642c7d46f3c9, (v) => $eb2fc0ee655eff6b$export$7c47642c7d46f3c9 = v);
156
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-FieldLabel--alignEnd", () => $eb2fc0ee655eff6b$export$885efcc08143a987, (v) => $eb2fc0ee655eff6b$export$885efcc08143a987 = v);
157
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field", () => $eb2fc0ee655eff6b$export$f6d480ae1e56eba0, (v) => $eb2fc0ee655eff6b$export$f6d480ae1e56eba0 = v);
158
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field--positionTop", () => $eb2fc0ee655eff6b$export$a4ea780a9064d7f9, (v) => $eb2fc0ee655eff6b$export$a4ea780a9064d7f9 = v);
159
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field-field", () => $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d, (v) => $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d = v);
160
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field--positionSide", () => $eb2fc0ee655eff6b$export$2963225c91179589, (v) => $eb2fc0ee655eff6b$export$2963225c91179589 = v);
161
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field-wrapper", () => $eb2fc0ee655eff6b$export$127df0b7290eb8ef, (v) => $eb2fc0ee655eff6b$export$127df0b7290eb8ef = v);
162
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Form", () => $eb2fc0ee655eff6b$export$94d2bcc94afabd89, (v) => $eb2fc0ee655eff6b$export$94d2bcc94afabd89 = v);
163
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Form--positionSide", () => $eb2fc0ee655eff6b$export$7f44db659563c8f4, (v) => $eb2fc0ee655eff6b$export$7f44db659563c8f4 = v);
164
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Form--positionTop", () => $eb2fc0ee655eff6b$export$11b8bc81fe551057, (v) => $eb2fc0ee655eff6b$export$11b8bc81fe551057 = v);
165
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-StaticField", () => $eb2fc0ee655eff6b$export$a8558488b380a41e, (v) => $eb2fc0ee655eff6b$export$a8558488b380a41e = v);
166
- $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Form-itemLabel", () => $eb2fc0ee655eff6b$export$51ec27881a1e3928, (v) => $eb2fc0ee655eff6b$export$51ec27881a1e3928 = v);
167
- $parcel$export($eb2fc0ee655eff6b$exports, "is-disabled", () => $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf, (v) => $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf = v);
168
- var $eb2fc0ee655eff6b$export$493d18e796ae054;
169
- var $eb2fc0ee655eff6b$export$9e6f19dc21f22f2e;
170
- var $eb2fc0ee655eff6b$export$7c47642c7d46f3c9;
171
- var $eb2fc0ee655eff6b$export$885efcc08143a987;
172
- var $eb2fc0ee655eff6b$export$f6d480ae1e56eba0;
173
- var $eb2fc0ee655eff6b$export$a4ea780a9064d7f9;
174
- var $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d;
175
- var $eb2fc0ee655eff6b$export$2963225c91179589;
176
- var $eb2fc0ee655eff6b$export$127df0b7290eb8ef;
177
- var $eb2fc0ee655eff6b$export$94d2bcc94afabd89;
178
- var $eb2fc0ee655eff6b$export$7f44db659563c8f4;
179
- var $eb2fc0ee655eff6b$export$11b8bc81fe551057;
180
- var $eb2fc0ee655eff6b$export$a8558488b380a41e;
181
- var $eb2fc0ee655eff6b$export$51ec27881a1e3928;
182
- var $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf;
183
- $eb2fc0ee655eff6b$export$493d18e796ae054 = "spectrum-FieldLabel_d2db1f";
184
- $eb2fc0ee655eff6b$export$9e6f19dc21f22f2e = "spectrum-FieldLabel--positionSide_d2db1f";
185
- $eb2fc0ee655eff6b$export$7c47642c7d46f3c9 = "spectrum-FieldLabel-requiredIcon_d2db1f";
186
- $eb2fc0ee655eff6b$export$885efcc08143a987 = "spectrum-FieldLabel--alignEnd_d2db1f";
187
- $eb2fc0ee655eff6b$export$f6d480ae1e56eba0 = "spectrum-Field_d2db1f";
188
- $eb2fc0ee655eff6b$export$a4ea780a9064d7f9 = "spectrum-Field--positionTop_d2db1f";
189
- $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d = "spectrum-Field-field_d2db1f";
190
- $eb2fc0ee655eff6b$export$2963225c91179589 = "spectrum-Field--positionSide_d2db1f";
191
- $eb2fc0ee655eff6b$export$127df0b7290eb8ef = "spectrum-Field-wrapper_d2db1f";
192
- $eb2fc0ee655eff6b$export$94d2bcc94afabd89 = "spectrum-Form_d2db1f";
193
- $eb2fc0ee655eff6b$export$7f44db659563c8f4 = "spectrum-Form--positionSide_d2db1f";
194
- $eb2fc0ee655eff6b$export$11b8bc81fe551057 = "spectrum-Form--positionTop_d2db1f";
195
- $eb2fc0ee655eff6b$export$a8558488b380a41e = "spectrum-StaticField_d2db1f";
196
- $eb2fc0ee655eff6b$export$51ec27881a1e3928 = "spectrum-Form-itemLabel_d2db1f";
197
- $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf = "is-disabled_d2db1f";
198
-
199
-
200
152
 
201
153
 
202
154
  var $53124a3a0fd56fca$exports = {};
203
155
 
204
156
  $parcel$export($53124a3a0fd56fca$exports, "spectrum-FieldGroup", () => $53124a3a0fd56fca$export$75eb16cbfc18279c, (v) => $53124a3a0fd56fca$export$75eb16cbfc18279c = v);
205
- $parcel$export($53124a3a0fd56fca$exports, "spectrum-FieldGroup--positionSide", () => $53124a3a0fd56fca$export$859b606bd9f45f81, (v) => $53124a3a0fd56fca$export$859b606bd9f45f81 = v);
206
157
  $parcel$export($53124a3a0fd56fca$exports, "spectrum-FieldGroup-group", () => $53124a3a0fd56fca$export$984c7bbbfc7ddffc, (v) => $53124a3a0fd56fca$export$984c7bbbfc7ddffc = v);
207
158
  $parcel$export($53124a3a0fd56fca$exports, "spectrum-FieldGroup-group--horizontal", () => $53124a3a0fd56fca$export$1ad8646bcba21c0e, (v) => $53124a3a0fd56fca$export$1ad8646bcba21c0e = v);
208
159
  var $53124a3a0fd56fca$export$75eb16cbfc18279c;
209
- var $53124a3a0fd56fca$export$859b606bd9f45f81;
210
160
  var $53124a3a0fd56fca$export$984c7bbbfc7ddffc;
211
161
  var $53124a3a0fd56fca$export$1ad8646bcba21c0e;
212
162
  $53124a3a0fd56fca$export$75eb16cbfc18279c = "spectrum-FieldGroup_41d350";
213
- $53124a3a0fd56fca$export$859b606bd9f45f81 = "spectrum-FieldGroup--positionSide_41d350";
214
163
  $53124a3a0fd56fca$export$984c7bbbfc7ddffc = "spectrum-FieldGroup-group_41d350";
215
164
  $53124a3a0fd56fca$export$1ad8646bcba21c0e = "spectrum-FieldGroup-group--horizontal_41d350";
216
165
 
@@ -221,29 +170,21 @@ $53124a3a0fd56fca$export$1ad8646bcba21c0e = "spectrum-FieldGroup-group--horizont
221
170
  function $1151290755e16c44$var$CheckboxGroup(props, ref) {
222
171
  props = $5Ft2u$reactspectrumprovider.useProviderProps(props);
223
172
  props = $5Ft2u$reactspectrumform.useFormProps(props);
224
- let { isEmphasized: isEmphasized , isRequired: isRequired , necessityIndicator: necessityIndicator , label: label , labelPosition: labelPosition = 'top' , labelAlign: labelAlign , children: children , orientation: orientation = 'vertical' , validationState: validationState , ...otherProps } = props;
173
+ let { isEmphasized: isEmphasized , children: children , orientation: orientation = 'vertical' , validationState: validationState } = props;
225
174
  let domRef = $5Ft2u$reactspectrumutils.useDOMRef(ref);
226
- let { styleProps: styleProps } = $5Ft2u$reactspectrumutils.useStyleProps(otherProps);
227
175
  let state = $5Ft2u$reactstatelycheckbox.useCheckboxGroupState(props);
228
- let { labelProps: labelProps , groupProps: groupProps } = $5Ft2u$reactariacheckbox.useCheckboxGroup(props, state);
229
- return(/*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement("div", {
230
- ...styleProps,
231
- ...groupProps,
232
- className: $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($53124a3a0fd56fca$exports)), 'spectrum-FieldGroup', {
233
- 'spectrum-FieldGroup--positionSide': labelPosition === 'side'
234
- }, // This is so checkbox group works inside a <Form>
235
- $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($eb2fc0ee655eff6b$exports)), 'spectrum-Field'), styleProps.className),
236
- ref: domRef
237
- }, label && /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement($5Ft2u$reactspectrumlabel.Label, {
238
- ...labelProps,
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, {
178
+ ...props,
179
+ ref: domRef,
180
+ wrapperClassName: $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($53124a3a0fd56fca$exports)), 'spectrum-FieldGroup'),
181
+ labelProps: labelProps,
182
+ descriptionProps: descriptionProps,
183
+ errorMessageProps: errorMessageProps,
239
184
  elementType: "span",
240
- labelPosition: labelPosition,
241
- labelAlign: labelAlign,
242
- isRequired: isRequired,
243
- necessityIndicator: necessityIndicator,
244
185
  includeNecessityIndicatorInAccessibilityName: true
245
- }, label), /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement("div", {
246
- role: "presentation",
186
+ }, /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).createElement("div", {
187
+ ...groupProps,
247
188
  className: $5Ft2u$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($53124a3a0fd56fca$exports)), 'spectrum-FieldGroup-group', {
248
189
  'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'
249
190
  })
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AEeO,KAAK,CAAC,yCAAoB,GAAG,sCAAK,CAAC,aAAa,CAAqB,IAAI;;;;;;;;;;;;;;;;;;;;;;;ACfhF,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,CAAiC;AAC9E,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAAoB;;;;;;;SFc3C,8BA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AG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,KAAK,GAAG,iDAAqB,CAAC,KAAK;IACvC,GAAG,CAAC,CAAC,aAAA,UAAU,eAAE,UAAU,EAAA,CAAC,GAAG,yCAAgB,CAAC,KAAK,EAAE,KAAK;IAE5D,MAAM,oEACH,CAAG;WACE,UAAU;WACV,UAAU;QACd,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAAqB,sBACrB,CAAC;YACC,CAAmC,oCAAE,aAAa,KAAK,CAAM;QAC/D,CAAC,EACD,EAAkD,AAAlD,gDAAkD;QAClD,oCAAU,CACR,gEAAW,EACX,CAAgB,kBAElB,UAAU,CAAC,SAAS;QAGxB,GAAG,EAAE,MAAM;OACV,KAAK,uEACH,+BAAK;WACA,UAAU;QACd,WAAW,EAAC,CAAM;QAClB,aAAa,EAAE,aAAa;QAC5B,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,kBAAkB,EAAE,kBAAkB;QACtC,4CAA4C,EAA5C,IAA4C;OAC3C,KAAK,sEAGT,CAAG;QACF,IAAI,EAAC,CAAc;QACnB,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAA2B,4BAC3B,CAAC;YACC,CAAuC,wCAAE,WAAW,KAAK,CAAY;QACvE,CAAC;0EAGJ,qCAAQ;QAAC,YAAY,EAAE,YAAY;QAAE,eAAe,EAAE,eAAe;0EACnE,yCAAoB,CAAC,QAAQ;QAAC,KAAK,EAAE,KAAK;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/fieldlabel/vars.css","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 strictNullChecks disabled).\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);\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, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, LabelPosition} from '@react-types/shared';\nimport {Label} from '@react-spectrum/label';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\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 isRequired,\n necessityIndicator,\n label,\n labelPosition = 'top' as LabelPosition,\n labelAlign,\n children,\n orientation = 'vertical',\n validationState,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let state = useCheckboxGroupState(props);\n let {labelProps, groupProps} = useCheckboxGroup(props, state);\n\n return (\n <div\n {...styleProps}\n {...groupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup',\n {\n 'spectrum-FieldGroup--positionSide': labelPosition === 'side'\n },\n // This is so checkbox group works inside a <Form>\n classNames(\n labelStyles,\n 'spectrum-Field'\n ),\n styleProps.className\n )\n }\n ref={domRef}>\n {label &&\n <Label\n {...labelProps}\n elementType=\"span\"\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n isRequired={isRequired}\n necessityIndicator={necessityIndicator}\n includeNecessityIndicatorInAccessibilityName>\n {label}\n </Label>\n }\n <div\n role=\"presentation\"\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 </div>\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@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\n@import './index.css';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AEeO,KAAK,CAAC,yCAAoB,GAAG,sCAAK,CAAC,aAAa,CAA4B,IAAI;;;;;;;;;;;;;;;;;;;;;;;ACfvF,GAAmC;AACnC,GAAyC;AACzC,GAA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AM;QACX,gBAAgB,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAAqB;QAC1D,UAAU,EAAE,UAAU;QACtB,gBAAgB,EAAE,gBAAgB;QAClC,iBAAiB,EAAE,iBAAiB;QACpC,WAAW,EAAC,CAAM;QAClB,4CAA4C,EAA5C,IAA4C;0EAC3C,CAAG;WACE,UAAU;QACd,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAA2B,4BAC3B,CAAC;YACC,CAAuC,wCAAE,WAAW,KAAK,CAAY;QACvE,CAAC;0EAGJ,qCAAQ;QAAC,YAAY,EAAE,YAAY;QAAE,eAAe,EAAE,eAAe;0EACnE,yCAAoB,CAAC,QAAQ;QAAC,KAAK,EAAE,KAAK;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"}
package/dist/module.js CHANGED
@@ -8,7 +8,7 @@ import {useCheckboxGroupItem as $gpy1V$useCheckboxGroupItem, useCheckbox as $gpy
8
8
  import {useHover as $gpy1V$useHover} from "@react-aria/interactions";
9
9
  import {useProviderProps as $gpy1V$useProviderProps, Provider as $gpy1V$Provider} from "@react-spectrum/provider";
10
10
  import {useToggleState as $gpy1V$useToggleState} from "@react-stately/toggle";
11
- import {Label as $gpy1V$Label} from "@react-spectrum/label";
11
+ import {Field as $gpy1V$Field} from "@react-spectrum/label";
12
12
  import {useCheckboxGroupState as $gpy1V$useCheckboxGroupState} from "@react-stately/checkbox";
13
13
  import {useFormProps as $gpy1V$useFormProps} from "@react-spectrum/form";
14
14
 
@@ -91,7 +91,8 @@ function $25b6292d81af2844$var$Checkbox(props, ref) {
91
91
  let { inputProps: inputProps } = groupState ? $gpy1V$useCheckboxGroupItem({
92
92
  ...props,
93
93
  // Value is optional for standalone checkboxes, but required for CheckboxGroup items;
94
- // it's passed explicitly here to avoid typescript error (requires strictNullChecks disabled).
94
+ // it's passed explicitly here to avoid typescript error (requires ignore).
95
+ // @ts-ignore
95
96
  value: props.value,
96
97
  // Only pass isRequired and validationState to react-aria if they came from
97
98
  // the props for this individual checkbox, and not from the group via context.
@@ -145,69 +146,17 @@ function $25b6292d81af2844$var$Checkbox(props, ref) {
145
146
 
146
147
 
147
148
 
148
- var $cd231e464c886c86$exports = {};
149
-
150
- $parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel", () => $cd231e464c886c86$export$493d18e796ae054, (v) => $cd231e464c886c86$export$493d18e796ae054 = v);
151
- $parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--positionSide", () => $cd231e464c886c86$export$9e6f19dc21f22f2e, (v) => $cd231e464c886c86$export$9e6f19dc21f22f2e = v);
152
- $parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel-requiredIcon", () => $cd231e464c886c86$export$7c47642c7d46f3c9, (v) => $cd231e464c886c86$export$7c47642c7d46f3c9 = v);
153
- $parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--alignEnd", () => $cd231e464c886c86$export$885efcc08143a987, (v) => $cd231e464c886c86$export$885efcc08143a987 = v);
154
- $parcel$export($cd231e464c886c86$exports, "spectrum-Field", () => $cd231e464c886c86$export$f6d480ae1e56eba0, (v) => $cd231e464c886c86$export$f6d480ae1e56eba0 = v);
155
- $parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionTop", () => $cd231e464c886c86$export$a4ea780a9064d7f9, (v) => $cd231e464c886c86$export$a4ea780a9064d7f9 = v);
156
- $parcel$export($cd231e464c886c86$exports, "spectrum-Field-field", () => $cd231e464c886c86$export$3ab8a3dc7f0563d, (v) => $cd231e464c886c86$export$3ab8a3dc7f0563d = v);
157
- $parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionSide", () => $cd231e464c886c86$export$2963225c91179589, (v) => $cd231e464c886c86$export$2963225c91179589 = v);
158
- $parcel$export($cd231e464c886c86$exports, "spectrum-Field-wrapper", () => $cd231e464c886c86$export$127df0b7290eb8ef, (v) => $cd231e464c886c86$export$127df0b7290eb8ef = v);
159
- $parcel$export($cd231e464c886c86$exports, "spectrum-Form", () => $cd231e464c886c86$export$94d2bcc94afabd89, (v) => $cd231e464c886c86$export$94d2bcc94afabd89 = v);
160
- $parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionSide", () => $cd231e464c886c86$export$7f44db659563c8f4, (v) => $cd231e464c886c86$export$7f44db659563c8f4 = v);
161
- $parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionTop", () => $cd231e464c886c86$export$11b8bc81fe551057, (v) => $cd231e464c886c86$export$11b8bc81fe551057 = v);
162
- $parcel$export($cd231e464c886c86$exports, "spectrum-StaticField", () => $cd231e464c886c86$export$a8558488b380a41e, (v) => $cd231e464c886c86$export$a8558488b380a41e = v);
163
- $parcel$export($cd231e464c886c86$exports, "spectrum-Form-itemLabel", () => $cd231e464c886c86$export$51ec27881a1e3928, (v) => $cd231e464c886c86$export$51ec27881a1e3928 = v);
164
- $parcel$export($cd231e464c886c86$exports, "is-disabled", () => $cd231e464c886c86$export$d35bc1e505d1ebbf, (v) => $cd231e464c886c86$export$d35bc1e505d1ebbf = v);
165
- var $cd231e464c886c86$export$493d18e796ae054;
166
- var $cd231e464c886c86$export$9e6f19dc21f22f2e;
167
- var $cd231e464c886c86$export$7c47642c7d46f3c9;
168
- var $cd231e464c886c86$export$885efcc08143a987;
169
- var $cd231e464c886c86$export$f6d480ae1e56eba0;
170
- var $cd231e464c886c86$export$a4ea780a9064d7f9;
171
- var $cd231e464c886c86$export$3ab8a3dc7f0563d;
172
- var $cd231e464c886c86$export$2963225c91179589;
173
- var $cd231e464c886c86$export$127df0b7290eb8ef;
174
- var $cd231e464c886c86$export$94d2bcc94afabd89;
175
- var $cd231e464c886c86$export$7f44db659563c8f4;
176
- var $cd231e464c886c86$export$11b8bc81fe551057;
177
- var $cd231e464c886c86$export$a8558488b380a41e;
178
- var $cd231e464c886c86$export$51ec27881a1e3928;
179
- var $cd231e464c886c86$export$d35bc1e505d1ebbf;
180
- $cd231e464c886c86$export$493d18e796ae054 = "spectrum-FieldLabel_d2db1f";
181
- $cd231e464c886c86$export$9e6f19dc21f22f2e = "spectrum-FieldLabel--positionSide_d2db1f";
182
- $cd231e464c886c86$export$7c47642c7d46f3c9 = "spectrum-FieldLabel-requiredIcon_d2db1f";
183
- $cd231e464c886c86$export$885efcc08143a987 = "spectrum-FieldLabel--alignEnd_d2db1f";
184
- $cd231e464c886c86$export$f6d480ae1e56eba0 = "spectrum-Field_d2db1f";
185
- $cd231e464c886c86$export$a4ea780a9064d7f9 = "spectrum-Field--positionTop_d2db1f";
186
- $cd231e464c886c86$export$3ab8a3dc7f0563d = "spectrum-Field-field_d2db1f";
187
- $cd231e464c886c86$export$2963225c91179589 = "spectrum-Field--positionSide_d2db1f";
188
- $cd231e464c886c86$export$127df0b7290eb8ef = "spectrum-Field-wrapper_d2db1f";
189
- $cd231e464c886c86$export$94d2bcc94afabd89 = "spectrum-Form_d2db1f";
190
- $cd231e464c886c86$export$7f44db659563c8f4 = "spectrum-Form--positionSide_d2db1f";
191
- $cd231e464c886c86$export$11b8bc81fe551057 = "spectrum-Form--positionTop_d2db1f";
192
- $cd231e464c886c86$export$a8558488b380a41e = "spectrum-StaticField_d2db1f";
193
- $cd231e464c886c86$export$51ec27881a1e3928 = "spectrum-Form-itemLabel_d2db1f";
194
- $cd231e464c886c86$export$d35bc1e505d1ebbf = "is-disabled_d2db1f";
195
-
196
-
197
149
 
198
150
 
199
151
  var $4cb2b26710154c56$exports = {};
200
152
 
201
153
  $parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup", () => $4cb2b26710154c56$export$75eb16cbfc18279c, (v) => $4cb2b26710154c56$export$75eb16cbfc18279c = v);
202
- $parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup--positionSide", () => $4cb2b26710154c56$export$859b606bd9f45f81, (v) => $4cb2b26710154c56$export$859b606bd9f45f81 = v);
203
154
  $parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup-group", () => $4cb2b26710154c56$export$984c7bbbfc7ddffc, (v) => $4cb2b26710154c56$export$984c7bbbfc7ddffc = v);
204
155
  $parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup-group--horizontal", () => $4cb2b26710154c56$export$1ad8646bcba21c0e, (v) => $4cb2b26710154c56$export$1ad8646bcba21c0e = v);
205
156
  var $4cb2b26710154c56$export$75eb16cbfc18279c;
206
- var $4cb2b26710154c56$export$859b606bd9f45f81;
207
157
  var $4cb2b26710154c56$export$984c7bbbfc7ddffc;
208
158
  var $4cb2b26710154c56$export$1ad8646bcba21c0e;
209
159
  $4cb2b26710154c56$export$75eb16cbfc18279c = "spectrum-FieldGroup_41d350";
210
- $4cb2b26710154c56$export$859b606bd9f45f81 = "spectrum-FieldGroup--positionSide_41d350";
211
160
  $4cb2b26710154c56$export$984c7bbbfc7ddffc = "spectrum-FieldGroup-group_41d350";
212
161
  $4cb2b26710154c56$export$1ad8646bcba21c0e = "spectrum-FieldGroup-group--horizontal_41d350";
213
162
 
@@ -218,29 +167,21 @@ $4cb2b26710154c56$export$1ad8646bcba21c0e = "spectrum-FieldGroup-group--horizont
218
167
  function $73f43ce9d441cc69$var$CheckboxGroup(props, ref) {
219
168
  props = $gpy1V$useProviderProps(props);
220
169
  props = $gpy1V$useFormProps(props);
221
- let { isEmphasized: isEmphasized , isRequired: isRequired , necessityIndicator: necessityIndicator , label: label , labelPosition: labelPosition = 'top' , labelAlign: labelAlign , children: children , orientation: orientation = 'vertical' , validationState: validationState , ...otherProps } = props;
170
+ let { isEmphasized: isEmphasized , children: children , orientation: orientation = 'vertical' , validationState: validationState } = props;
222
171
  let domRef = $gpy1V$useDOMRef(ref);
223
- let { styleProps: styleProps } = $gpy1V$useStyleProps(otherProps);
224
172
  let state = $gpy1V$useCheckboxGroupState(props);
225
- let { labelProps: labelProps , groupProps: groupProps } = $gpy1V$useCheckboxGroup(props, state);
226
- return(/*#__PURE__*/ $gpy1V$react.createElement("div", {
227
- ...styleProps,
228
- ...groupProps,
229
- className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports)), 'spectrum-FieldGroup', {
230
- 'spectrum-FieldGroup--positionSide': labelPosition === 'side'
231
- }, // This is so checkbox group works inside a <Form>
232
- $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports)), 'spectrum-Field'), styleProps.className),
233
- ref: domRef
234
- }, label && /*#__PURE__*/ $gpy1V$react.createElement($gpy1V$Label, {
235
- ...labelProps,
173
+ let { labelProps: labelProps , groupProps: groupProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $gpy1V$useCheckboxGroup(props, state);
174
+ return(/*#__PURE__*/ $gpy1V$react.createElement($gpy1V$Field, {
175
+ ...props,
176
+ ref: domRef,
177
+ wrapperClassName: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports)), 'spectrum-FieldGroup'),
178
+ labelProps: labelProps,
179
+ descriptionProps: descriptionProps,
180
+ errorMessageProps: errorMessageProps,
236
181
  elementType: "span",
237
- labelPosition: labelPosition,
238
- labelAlign: labelAlign,
239
- isRequired: isRequired,
240
- necessityIndicator: necessityIndicator,
241
182
  includeNecessityIndicatorInAccessibilityName: true
242
- }, label), /*#__PURE__*/ $gpy1V$react.createElement("div", {
243
- role: "presentation",
183
+ }, /*#__PURE__*/ $gpy1V$react.createElement("div", {
184
+ ...groupProps,
244
185
  className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports)), 'spectrum-FieldGroup-group', {
245
186
  'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'
246
187
  })
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AEeO,KAAK,CAAC,yCAAoB,GAAG,YAAK,CAAC,aAAa,CAAqB,IAAI;;;;;;;;;;;;;;;;;;;;;;;ACfhF,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,CAAiC;AAC9E,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAAoB;;;;;;;SFc3C,8BAAQ,CAAC,KAA4B,EAAE,GAAmC,EAAE,CAAC;IACpF,GAAG,CAAC,aAAa,GAAG,KAAK;IACzB,KAAK,GAAG,uBAAgB,CAAC,KAAK;IAC9B,GAAG,CAAC,CAAC,kBACH,eAAe,GAAG,KAAK,iBACvB,YAAY,GAAG,KAAK,eACpB,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K,EAAE,KAAK;IAE5D,MAAM,0CACH,CAAG;WACE,UAAU;WACV,UAAU;QACd,SAAS,EACP,iBAAU,CACR,gEAAM,EACN,CAAqB,sBACrB,CAAC;YACC,CAAmC,oCAAE,aAAa,KAAK,CAAM;QAC/D,CAAC,EACD,EAAkD,AAAlD,gDAAkD;QAClD,iBAAU,CACR,gEAAW,EACX,CAAgB,kBAElB,UAAU,CAAC,SAAS;QAGxB,GAAG,EAAE,MAAM;OACV,KAAK,6CACH,YAAK;WACA,UAAU;QACd,WAAW,EAAC,CAAM;QAClB,aAAa,EAAE,aAAa;QAC5B,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,kBAAkB,EAAE,kBAAkB;QACtC,4CAA4C,EAA5C,IAA4C;OAC3C,KAAK,4CAGT,CAAG;QACF,IAAI,EAAC,CAAc;QACnB,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/fieldlabel/vars.css","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 strictNullChecks disabled).\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);\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, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, LabelPosition} from '@react-types/shared';\nimport {Label} from '@react-spectrum/label';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\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 isRequired,\n necessityIndicator,\n label,\n labelPosition = 'top' as LabelPosition,\n labelAlign,\n children,\n orientation = 'vertical',\n validationState,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let state = useCheckboxGroupState(props);\n let {labelProps, groupProps} = useCheckboxGroup(props, state);\n\n return (\n <div\n {...styleProps}\n {...groupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup',\n {\n 'spectrum-FieldGroup--positionSide': labelPosition === 'side'\n },\n // This is so checkbox group works inside a <Form>\n classNames(\n labelStyles,\n 'spectrum-Field'\n ),\n styleProps.className\n )\n }\n ref={domRef}>\n {label &&\n <Label\n {...labelProps}\n elementType=\"span\"\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n isRequired={isRequired}\n necessityIndicator={necessityIndicator}\n includeNecessityIndicatorInAccessibilityName>\n {label}\n </Label>\n }\n <div\n role=\"presentation\"\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 </div>\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@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\n@import './index.css';\n"],"names":[],"version":3,"file":"module.js.map"}
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,yCAAmC,GAAG,CAA0B;AAChE,yCAAyC,GAAG,CAAgC;AAC5E,y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AAU;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 +1 @@
1
- {"mappings":";;ACiHA;;;GAGG;AACH,OAAA,IAAI,2KAAgC,CAAC;ACnBrC;;GAEG;AACH,OAAA,MAAM,2JAAgD,CAAC;ACvFvD,YAAY,EAAC,qBAAqB,EAAE,0BAA0B,EAAC,MAAM,uBAAuB,CAAC","sources":["packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/context.ts","packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/Checkbox.tsx","packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/CheckboxGroup.tsx","packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/index.ts","packages/@react-spectrum/checkbox/src/index.ts"],"sourcesContent":[null,null,null,null,"/*\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"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;ACkHA;;;GAGG;AACH,OAAA,IAAI,2KAAgC,CAAC;AClDrC;;GAEG;AACH,OAAA,MAAM,2JAAgD,CAAC;ACzDvD,YAAY,EAAC,qBAAqB,EAAE,0BAA0B,EAAC,MAAM,uBAAuB,CAAC","sources":["packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/context.ts","packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/Checkbox.tsx","packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/CheckboxGroup.tsx","packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/index.ts","packages/@react-spectrum/checkbox/src/index.ts"],"sourcesContent":[null,null,null,null,"/*\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"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/checkbox",
3
- "version": "3.5.1",
3
+ "version": "3.6.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,17 +32,17 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/checkbox": "^3.5.1",
36
- "@react-aria/focus": "^3.8.0",
37
- "@react-aria/interactions": "^3.11.0",
38
- "@react-spectrum/form": "^3.4.1",
39
- "@react-spectrum/label": "^3.7.1",
40
- "@react-spectrum/utils": "^3.7.3",
41
- "@react-stately/checkbox": "^3.2.1",
42
- "@react-stately/toggle": "^3.4.1",
43
- "@react-types/checkbox": "^3.3.3",
44
- "@react-types/shared": "^3.14.1",
45
- "@spectrum-icons/ui": "^3.3.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",
43
+ "@react-types/checkbox": "^3.4.1",
44
+ "@react-types/shared": "^3.16.0",
45
+ "@spectrum-icons/ui": "^3.4.0"
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": "b03ef51e6317547dd0a840f151e59d039b1e1fd3"
57
+ "gitHead": "2954307ddbefe149241685440c81f80ece6b2c83"
58
58
  }
package/src/Checkbox.tsx CHANGED
@@ -51,7 +51,8 @@ function Checkbox(props: SpectrumCheckboxProps, ref: FocusableRef<HTMLLabelEleme
51
51
  ? useCheckboxGroupItem({
52
52
  ...props,
53
53
  // Value is optional for standalone checkboxes, but required for CheckboxGroup items;
54
- // it's passed explicitly here to avoid typescript error (requires strictNullChecks disabled).
54
+ // it's passed explicitly here to avoid typescript error (requires ignore).
55
+ // @ts-ignore
55
56
  value: props.value,
56
57
  // Only pass isRequired and validationState to react-aria if they came from
57
58
  // the props for this individual checkbox, and not from the group via context.
@@ -11,10 +11,9 @@
11
11
  */
12
12
 
13
13
  import {CheckboxGroupContext} from './context';
14
- import {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';
15
- import {DOMRef, LabelPosition} from '@react-types/shared';
16
- import {Label} from '@react-spectrum/label';
17
- import labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';
14
+ import {classNames, useDOMRef} from '@react-spectrum/utils';
15
+ import {DOMRef} from '@react-types/shared';
16
+ import {Field} from '@react-spectrum/label';
18
17
  import {Provider, useProviderProps} from '@react-spectrum/provider';
19
18
  import React from 'react';
20
19
  import {SpectrumCheckboxGroupProps} from '@react-types/checkbox';
@@ -28,55 +27,26 @@ function CheckboxGroup(props: SpectrumCheckboxGroupProps, ref: DOMRef<HTMLDivEle
28
27
  props = useFormProps(props);
29
28
  let {
30
29
  isEmphasized,
31
- isRequired,
32
- necessityIndicator,
33
- label,
34
- labelPosition = 'top' as LabelPosition,
35
- labelAlign,
36
30
  children,
37
31
  orientation = 'vertical',
38
- validationState,
39
- ...otherProps
32
+ validationState
40
33
  } = props;
41
34
  let domRef = useDOMRef(ref);
42
- let {styleProps} = useStyleProps(otherProps);
43
35
  let state = useCheckboxGroupState(props);
44
- let {labelProps, groupProps} = useCheckboxGroup(props, state);
36
+ let {labelProps, groupProps, descriptionProps, errorMessageProps} = useCheckboxGroup(props, state);
45
37
 
46
38
  return (
47
- <div
48
- {...styleProps}
49
- {...groupProps}
50
- className={
51
- classNames(
52
- styles,
53
- 'spectrum-FieldGroup',
54
- {
55
- 'spectrum-FieldGroup--positionSide': labelPosition === 'side'
56
- },
57
- // This is so checkbox group works inside a <Form>
58
- classNames(
59
- labelStyles,
60
- 'spectrum-Field'
61
- ),
62
- styleProps.className
63
- )
64
- }
65
- ref={domRef}>
66
- {label &&
67
- <Label
68
- {...labelProps}
69
- elementType="span"
70
- labelPosition={labelPosition}
71
- labelAlign={labelAlign}
72
- isRequired={isRequired}
73
- necessityIndicator={necessityIndicator}
74
- includeNecessityIndicatorInAccessibilityName>
75
- {label}
76
- </Label>
77
- }
39
+ <Field
40
+ {...props}
41
+ ref={domRef}
42
+ wrapperClassName={classNames(styles, 'spectrum-FieldGroup')}
43
+ labelProps={labelProps}
44
+ descriptionProps={descriptionProps}
45
+ errorMessageProps={errorMessageProps}
46
+ elementType="span"
47
+ includeNecessityIndicatorInAccessibilityName>
78
48
  <div
79
- role="presentation"
49
+ {...groupProps}
80
50
  className={
81
51
  classNames(
82
52
  styles,
@@ -92,7 +62,7 @@ function CheckboxGroup(props: SpectrumCheckboxGroupProps, ref: DOMRef<HTMLDivEle
92
62
  </CheckboxGroupContext.Provider>
93
63
  </Provider>
94
64
  </div>
95
- </div>
65
+ </Field>
96
66
  );
97
67
  }
98
68
 
package/src/context.ts CHANGED
@@ -13,4 +13,4 @@
13
13
  import {CheckboxGroupState} from '@react-stately/checkbox';
14
14
  import React from 'react';
15
15
 
16
- export const CheckboxGroupContext = React.createContext<CheckboxGroupState>(null);
16
+ export const CheckboxGroupContext = React.createContext<CheckboxGroupState | null>(null);