@react-spectrum/radio 3.1.5 → 3.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +1 -2
- package/dist/main.js +220 -201
- package/dist/main.js.map +1 -1
- package/dist/module.js +211 -167
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -11
- package/dist/main.css.map +0 -1
package/dist/main.css
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
[dir=ltr] ._spectrum-Radio_db05c{margin-right:calc(var(--spectrum-global-dimension-size-100) * 2)}[dir=rtl] ._spectrum-Radio_db05c{margin-left:calc(var(--spectrum-global-dimension-size-100) * 2)}._spectrum-Radio_db05c{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:start;align-items:flex-start;position:relative;min-height:var(--spectrum-global-dimension-size-400);max-width:100%;vertical-align:top;isolation:isolate}[dir=ltr] ._spectrum-Radio-input_db05c{left:calc(var(--spectrum-global-dimension-size-100) * -1)}[dir=rtl] ._spectrum-Radio-input_db05c{right:calc(var(--spectrum-global-dimension-size-100) * -1)}._spectrum-Radio-input_db05c{font-family:inherit;font-size:100%;line-height:1.15;margin:0;overflow:visible;box-sizing:border-box;padding:0;position:absolute;top:0;width:calc(100% + var(--spectrum-global-dimension-size-100) * 2);height:100%;opacity:.0001;z-index:1;cursor:default}._spectrum-Radio-input_db05c:disabled{cursor:default}._spectrum-Radio-input_db05c:checked+._spectrum-Radio-button_db05c:before{border-width:calc(var(--spectrum-global-dimension-size-175) / 2 - var(--spectrum-global-dimension-static-size-50, 4px) / 2)}._spectrum-Radio-input_db05c._focus-ring_db05c+._spectrum-Radio-button_db05c:after{margin:calc(var(--spectrum-global-dimension-static-size-25, 2px) * -1)}[dir=ltr] ._spectrum-Radio-label_db05c{text-align:left}[dir=rtl] ._spectrum-Radio-label_db05c{text-align:right}[dir=ltr] ._spectrum-Radio-label_db05c{margin-left:var(--spectrum-global-dimension-size-125)}[dir=rtl] ._spectrum-Radio-label_db05c{margin-right:var(--spectrum-global-dimension-size-125)}._spectrum-Radio-label_db05c{margin-top:var(--spectrum-global-dimension-size-65);font-size:var(--spectrum-alias-font-size-default,var(--spectrum-global-dimension-font-size-100));line-height:1.49;transition:color .13s ease-in-out}._spectrum-Radio-button_db05c{position:relative;margin:calc((var(--spectrum-global-dimension-size-400) - var(--spectrum-global-dimension-size-175)) / 2) 0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}._spectrum-Radio-button_db05c,._spectrum-Radio-button_db05c:before{box-sizing:border-box;width:var(--spectrum-global-dimension-size-175);height:var(--spectrum-global-dimension-size-175)}._spectrum-Radio-button_db05c:before{display:block;z-index:0;content:"";position:absolute;border-radius:calc(var(--spectrum-global-dimension-size-175) / 2);border-width:var(--spectrum-alias-border-size-thick,var(--spectrum-global-dimension-static-size-25));border-style:solid;transition:border .13s ease-in-out,box-shadow .13s ease-in-out}._spectrum-Radio-button_db05c:after{border-radius:100%;content:"";display:block;position:absolute;left:0;right:0;bottom:0;top:0;margin:var(--spectrum-global-dimension-static-size-25,2px);transform:translateX(0);transition:box-shadow .13s ease-out,margin .13s ease-out}._spectrum-Radio--labelBelow_db05c{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;height:auto}._spectrum-Radio--labelBelow_db05c ._spectrum-Radio-button_db05c{-ms-flex-negative:0;flex-shrink:0;margin:0}._spectrum-Radio--labelBelow_db05c ._spectrum-Radio-label_db05c{margin:var(--spectrum-global-dimension-size-40) 0 0 0}._spectrum-Radio_db05c ._spectrum-Radio-input_db05c:checked+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-blue-500)}._spectrum-Radio-label_db05c{color:var(--spectrum-alias-text-color,var(--spectrum-global-color-gray-800))}._spectrum-Radio-button_db05c:before{background-color:var(--spectrum-global-color-gray-75);border-color:var(--spectrum-global-color-gray-600)}._spectrum-Radio_db05c._is-hovered_db05c ._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-gray-700);box-shadow:none}._spectrum-Radio_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c:checked+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-blue-600)}._spectrum-Radio_db05c._is-hovered_db05c ._spectrum-Radio-label_db05c{color:var(--spectrum-alias-text-color-hover,var(--spectrum-global-color-gray-900))}._spectrum-Radio_db05c:active ._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-gray-800)}._spectrum-Radio_db05c:active ._spectrum-Radio-input_db05c:checked+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-blue-700)}._spectrum-Radio_db05c:active ._spectrum-Radio-label_db05c{color:var(--spectrum-alias-text-color-down,var(--spectrum-global-color-gray-900))}._spectrum-Radio_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:checked+._spectrum-Radio-button_db05c:before,._spectrum-Radio_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:checked+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-blue-600)}._spectrum-Radio--quiet_db05c ._spectrum-Radio-input_db05c:checked+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-gray-700)}._spectrum-Radio--quiet_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c:checked+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-gray-800)}._spectrum-Radio--quiet_db05c:active ._spectrum-Radio-input_db05c:checked+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-gray-900)}._spectrum-Radio--quiet_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:checked+._spectrum-Radio-button_db05c:before,._spectrum-Radio--quiet_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:checked+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-gray-800)}._spectrum-Radio--quiet_db05c._is-invalid_db05c ._spectrum-Radio-button_db05c:before,._spectrum-Radio--quiet_db05c._is-invalid_db05c ._spectrum-Radio-input_db05c:checked+._spectrum-Radio-button_db05c:before,._spectrum-Radio_db05c._is-invalid_db05c ._spectrum-Radio-button_db05c:before,._spectrum-Radio_db05c._is-invalid_db05c ._spectrum-Radio-input_db05c:checked+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-red-500)}._spectrum-Radio--quiet_db05c._is-invalid_db05c ._spectrum-Radio-label_db05c,._spectrum-Radio_db05c._is-invalid_db05c ._spectrum-Radio-label_db05c{color:var(--spectrum-global-color-red-500)}._spectrum-Radio--quiet_db05c._is-invalid_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c+._spectrum-Radio-button_db05c:before,._spectrum-Radio_db05c._is-invalid_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-red-600)}._spectrum-Radio--quiet_db05c._is-invalid_db05c._is-hovered_db05c ._spectrum-Radio-label_db05c,._spectrum-Radio_db05c._is-invalid_db05c._is-hovered_db05c ._spectrum-Radio-label_db05c{color:var(--spectrum-global-color-red-600)}._spectrum-Radio--quiet_db05c._is-invalid_db05c:active ._spectrum-Radio-input_db05c+._spectrum-Radio-button_db05c:before,._spectrum-Radio_db05c._is-invalid_db05c:active ._spectrum-Radio-input_db05c+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-red-700)}._spectrum-Radio--quiet_db05c._is-invalid_db05c:active ._spectrum-Radio-label_db05c,._spectrum-Radio_db05c._is-invalid_db05c:active ._spectrum-Radio-label_db05c{color:var(--spectrum-global-color-red-700)}._spectrum-Radio--quiet_db05c._is-invalid_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:checked+._spectrum-Radio-button_db05c:before,._spectrum-Radio--quiet_db05c._is-invalid_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:not(:checked)+._spectrum-Radio-button_db05c:before,._spectrum-Radio--quiet_db05c._is-invalid_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:checked+._spectrum-Radio-button_db05c:before,._spectrum-Radio--quiet_db05c._is-invalid_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:not(:checked)+._spectrum-Radio-button_db05c:before,._spectrum-Radio_db05c._is-invalid_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:checked+._spectrum-Radio-button_db05c:before,._spectrum-Radio_db05c._is-invalid_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:not(:checked)+._spectrum-Radio-button_db05c:before,._spectrum-Radio_db05c._is-invalid_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:checked+._spectrum-Radio-button_db05c:before,._spectrum-Radio_db05c._is-invalid_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:not(:checked)+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-red-600)}._spectrum-Radio-input_db05c:disabled+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-gray-400)!important}._spectrum-Radio-input_db05c:disabled~._spectrum-Radio-label_db05c{color:var(--spectrum-alias-text-color-disabled,var(--spectrum-global-color-gray-500))!important}._spectrum-Radio--quiet_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:not(:checked)+._spectrum-Radio-button_db05c:before,._spectrum-Radio--quiet_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:not(:checked)+._spectrum-Radio-button_db05c:before,._spectrum-Radio_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:not(:checked)+._spectrum-Radio-button_db05c:before,._spectrum-Radio_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c:not(:checked)+._spectrum-Radio-button_db05c:before{border-color:var(--spectrum-global-color-gray-700)}._spectrum-Radio--quiet_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c+._spectrum-Radio-button_db05c:after,._spectrum-Radio--quiet_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c+._spectrum-Radio-button_db05c:after,._spectrum-Radio_db05c._is-hovered_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c+._spectrum-Radio-button_db05c:after,._spectrum-Radio_db05c ._spectrum-Radio-input_db05c._focus-ring_db05c+._spectrum-Radio-button_db05c:after{box-shadow:0 0 0 var(--spectrum-alias-focus-ring-size,var(--spectrum-global-dimension-static-size-25)) var(--spectrum-alias-focus-ring-color,var(--spectrum-alias-focus-color))}[dir=ltr] ._spectrum-FieldLabel_36b9b{text-align:left}[dir=rtl] ._spectrum-FieldLabel_36b9b{text-align:right}._spectrum-FieldLabel_36b9b{display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;box-sizing:border-box;padding:var(--spectrum-global-dimension-size-50) 0 var(--spectrum-global-dimension-size-65);font-size:var(--spectrum-global-dimension-font-size-75);font-weight:var(--spectrum-global-font-weight-regular,400);line-height:var(--spectrum-global-font-line-height-small,1.3);vertical-align:top;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;font-smoothing:subpixel-antialiased;cursor:default}[dir=ltr] ._spectrum-FieldLabel--positionSide_36b9b{padding-right:var(--spectrum-global-dimension-size-100)}[dir=rtl] ._spectrum-FieldLabel--positionSide_36b9b{padding-left:var(--spectrum-global-dimension-size-100)}._spectrum-FieldLabel--positionSide_36b9b{display:-ms-inline-flexbox;display:inline-flex;padding-top:var(--spectrum-global-dimension-size-100)}[dir=ltr] ._spectrum-FieldLabel-requiredIcon_36b9b{margin-right:0}[dir=rtl] ._spectrum-FieldLabel-requiredIcon_36b9b{margin-left:0}[dir=ltr] ._spectrum-FieldLabel-requiredIcon_36b9b{margin-left:var(--spectrum-global-dimension-size-25)}[dir=rtl] ._spectrum-FieldLabel-requiredIcon_36b9b{margin-right:var(--spectrum-global-dimension-size-25)}._spectrum-FieldLabel-requiredIcon_36b9b{margin-top:var(--spectrum-global-dimension-size-50);margin-bottom:0}[dir=ltr] ._spectrum-FieldLabel--alignEnd_36b9b{text-align:right}[dir=rtl] ._spectrum-FieldLabel--alignEnd_36b9b{text-align:left}._spectrum-FieldLabel--alignEnd_36b9b{-ms-flex-pack:end;justify-content:flex-end}._spectrum-Field_36b9b{--spectrum-field-default-width:var(--spectrum-global-dimension-size-2400)}._spectrum-Field_36b9b._spectrum-Field--positionTop_36b9b{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;width:var(--spectrum-field-default-width)}._spectrum-Field_36b9b._spectrum-Field--positionTop_36b9b ._spectrum-Field-field_36b9b{width:100%}._spectrum-Field_36b9b._spectrum-Field--positionTop_36b9b ._spectrum-Field-field--multiline_36b9b{-ms-flex:1 1 auto;flex:1 1 auto}._spectrum-Field_36b9b._spectrum-Field--positionSide_36b9b{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:start;align-items:flex-start}._spectrum-Field_36b9b._spectrum-Field--positionSide_36b9b ._spectrum-Field-wrapper_36b9b{-ms-flex:1;flex:1;min-width:0;width:var(--spectrum-field-default-width)}._spectrum-Field_36b9b._spectrum-Field--positionSide_36b9b ._spectrum-Field-wrapper_36b9b ._spectrum-Field-field_36b9b{width:100%}._spectrum-Field_36b9b._spectrum-Field--positionSide_36b9b ._spectrum-Field-field_36b9b{-ms-flex:1;flex:1;min-width:0}._spectrum-Field_36b9b._spectrum-Field--positionSide_36b9b ._spectrum-Field-field--multiline_36b9b{height:100%}[dir=ltr] ._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b{text-align:left}[dir=rtl] ._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b{text-align:right}._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b{display:table;border-collapse:initial;border-spacing:0 var(--spectrum-global-dimension-size-300);margin:calc(var(--spectrum-global-dimension-size-250) * -1) 0}._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b ._spectrum-Field_36b9b{display:table-row;width:100%}._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b ._spectrum-FieldLabel_36b9b{display:table-cell}._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b ._spectrum-Field-wrapper_36b9b{width:100%}._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b ._spectrum-Field-field_36b9b{display:table-cell;width:auto;min-width:var(--spectrum-global-dimension-size-2400)}._spectrum-Form_36b9b._spectrum-Form--positionTop_36b9b{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:0;min-width:var(--spectrum-global-dimension-size-2400)}._spectrum-Form_36b9b._spectrum-Form--positionTop_36b9b>*{margin-top:var(--spectrum-global-dimension-size-100);width:100%}._spectrum-FieldLabel_36b9b,._spectrum-Form-itemLabel_36b9b{color:var(--spectrum-alias-label-text-color,var(--spectrum-global-color-gray-700))}._spectrum-FieldLabel_36b9b._is-disabled_36b9b,._spectrum-FieldLabel_36b9b._is-disabled_36b9b ._spectrum-FieldLabel-requiredIcon_36b9b,._spectrum-Form-itemLabel_36b9b._is-disabled_36b9b,._spectrum-Form-itemLabel_36b9b._is-disabled_36b9b ._spectrum-FieldLabel-requiredIcon_36b9b{color:var(--spectrum-alias-text-color-disabled,var(--spectrum-global-color-gray-500))}._spectrum-FieldLabel-requiredIcon_36b9b{color:var(--spectrum-global-color-gray-600)}._spectrum-FieldGroup_8cb9b{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}._spectrum-FieldGroup--positionSide_8cb9b{-ms-flex-direction:row;flex-direction:row}._spectrum-FieldGroup-group_8cb9b{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}._spectrum-FieldGroup-group--horizontal_8cb9b{-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}
|
2
|
-
/*# sourceMappingURL=main.css.map */
|
1
|
+
[dir=ltr] .spectrum-Radio_bf46c2{margin-right:calc(var(--spectrum-radio-cursor-hit-x,var(--spectrum-global-dimension-size-100))*2)}[dir=rtl] .spectrum-Radio_bf46c2{margin-left:calc(var(--spectrum-radio-cursor-hit-x,var(--spectrum-global-dimension-size-100))*2)}.spectrum-Radio_bf46c2{min-height:var(--spectrum-radio-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-Radio-input_bf46c2{left:calc(var(--spectrum-radio-cursor-hit-x,var(--spectrum-global-dimension-size-100))*-1)}[dir=rtl] .spectrum-Radio-input_bf46c2{right:calc(var(--spectrum-radio-cursor-hit-x,var(--spectrum-global-dimension-size-100))*-1)}.spectrum-Radio-input_bf46c2{box-sizing:border-box;width:calc(100% + var(--spectrum-radio-cursor-hit-x,var(--spectrum-global-dimension-size-100))*2);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-Radio-input_bf46c2:disabled{cursor:default}.spectrum-Radio-input_bf46c2:checked+.spectrum-Radio-button_bf46c2:before{border-width:calc(var(--spectrum-radio-circle-diameter,var(--spectrum-global-dimension-size-175))/2 - var(--spectrum-radio-circle-dot-size,var(--spectrum-global-dimension-static-size-50))/2)}.spectrum-Radio-input_bf46c2.focus-ring_bf46c2+.spectrum-Radio-button_bf46c2:after{margin:calc(var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25))*-1)}[dir=ltr] .spectrum-Radio-label_bf46c2{text-align:left}[dir=rtl] .spectrum-Radio-label_bf46c2{text-align:right}[dir=ltr] .spectrum-Radio-label_bf46c2{margin-left:var(--spectrum-radio-text-gap,var(--spectrum-global-dimension-size-125))}[dir=rtl] .spectrum-Radio-label_bf46c2{margin-right:var(--spectrum-radio-text-gap,var(--spectrum-global-dimension-size-125))}.spectrum-Radio-label_bf46c2{margin-top:var(--spectrum-global-dimension-size-65);font-size:var(--spectrum-radio-text-size,var(--spectrum-alias-font-size-default));transition:color var(--spectrum-global-animation-duration-100,130ms)ease-in-out;line-height:1.49}.spectrum-Radio-button_bf46c2{box-sizing:border-box;width:var(--spectrum-radio-circle-diameter,var(--spectrum-global-dimension-size-175));height:var(--spectrum-radio-circle-diameter,var(--spectrum-global-dimension-size-175));margin:calc((var(--spectrum-radio-height,var(--spectrum-global-dimension-size-400)) - var(--spectrum-radio-circle-diameter,var(--spectrum-global-dimension-size-175)))/2)0;flex-grow:0;flex-shrink:0;position:relative}.spectrum-Radio-button_bf46c2:before{z-index:0;content:"";box-sizing:border-box;width:var(--spectrum-radio-circle-diameter,var(--spectrum-global-dimension-size-175));height:var(--spectrum-radio-circle-diameter,var(--spectrum-global-dimension-size-175));border-radius:calc(var(--spectrum-radio-circle-diameter,var(--spectrum-global-dimension-size-175))/2);border-width:var(--spectrum-radio-circle-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-Radio-button_bf46c2:after{content:"";margin:var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25));transition:box-shadow var(--spectrum-global-animation-duration-100,130ms)ease-out,margin var(--spectrum-global-animation-duration-100,130ms)ease-out;border-radius:100%;display:block;position:absolute;top:0;bottom:0;left:0;right:0;transform:translate(0)}.spectrum-Radio--labelBelow_bf46c2{height:auto;flex-direction:column;align-items:center;display:inline-flex}.spectrum-Radio--labelBelow_bf46c2 .spectrum-Radio-button_bf46c2{flex-shrink:0;margin:0}.spectrum-Radio--labelBelow_bf46c2 .spectrum-Radio-label_bf46c2{margin:var(--spectrum-global-dimension-size-40)0 0 0}.spectrum-Radio_bf46c2 .spectrum-Radio-input_bf46c2:checked+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-emphasized-circle-border-color-selected,var(--spectrum-global-color-blue-500))}.spectrum-Radio-label_bf46c2{color:var(--spectrum-radio-emphasized-text-color,var(--spectrum-alias-text-color))}.spectrum-Radio-button_bf46c2:before{background-color:var(--spectrum-radio-emphasized-circle-background-color,var(--spectrum-global-color-gray-75));border-color:var(--spectrum-radio-emphasized-circle-border-color,var(--spectrum-global-color-gray-600))}.spectrum-Radio_bf46c2.is-hovered_bf46c2 .spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-emphasized-circle-border-color-hover,var(--spectrum-global-color-gray-700));box-shadow:none}.spectrum-Radio_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2:checked+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-emphasized-circle-border-color-selected-hover,var(--spectrum-global-color-blue-600))}.spectrum-Radio_bf46c2.is-hovered_bf46c2 .spectrum-Radio-label_bf46c2{color:var(--spectrum-radio-emphasized-text-color-hover,var(--spectrum-alias-text-color-hover))}.spectrum-Radio_bf46c2:active .spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-emphasized-circle-border-color-down,var(--spectrum-global-color-gray-800))}.spectrum-Radio_bf46c2:active .spectrum-Radio-input_bf46c2:checked+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-emphasized-circle-border-color-selected-down,var(--spectrum-global-color-blue-700))}.spectrum-Radio_bf46c2:active .spectrum-Radio-label_bf46c2{color:var(--spectrum-radio-emphasized-text-color-down,var(--spectrum-alias-text-color-down))}.spectrum-Radio_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:checked+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:checked+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-emphasized-circle-border-color-selected-hover,var(--spectrum-global-color-blue-600))}.spectrum-Radio--quiet_bf46c2 .spectrum-Radio-input_bf46c2:checked+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-quiet-circle-border-color-selected,var(--spectrum-global-color-gray-700))}.spectrum-Radio--quiet_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2:checked+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-quiet-circle-border-color-selected-hover,var(--spectrum-global-color-gray-800))}.spectrum-Radio--quiet_bf46c2:active .spectrum-Radio-input_bf46c2:checked+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-quiet-circle-border-color-selected-down,var(--spectrum-global-color-gray-900))}.spectrum-Radio--quiet_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:checked+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio--quiet_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:checked+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-quiet-circle-border-color-selected-key-focus,var(--spectrum-global-color-gray-800))}.spectrum-Radio_bf46c2.is-invalid_bf46c2 .spectrum-Radio-button_bf46c2:before,.spectrum-Radio_bf46c2.is-invalid_bf46c2 .spectrum-Radio-input_bf46c2:checked+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio--quiet_bf46c2.is-invalid_bf46c2 .spectrum-Radio-button_bf46c2:before,.spectrum-Radio--quiet_bf46c2.is-invalid_bf46c2 .spectrum-Radio-input_bf46c2:checked+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-emphasized-circle-border-color-error,var(--spectrum-global-color-red-500))}.spectrum-Radio_bf46c2.is-invalid_bf46c2 .spectrum-Radio-label_bf46c2,.spectrum-Radio--quiet_bf46c2.is-invalid_bf46c2 .spectrum-Radio-label_bf46c2{color:var(--spectrum-radio-emphasized-circle-border-color-error,var(--spectrum-global-color-red-500))}.spectrum-Radio_bf46c2.is-invalid_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio--quiet_bf46c2.is-invalid_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-emphasized-circle-border-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Radio_bf46c2.is-invalid_bf46c2.is-hovered_bf46c2 .spectrum-Radio-label_bf46c2,.spectrum-Radio--quiet_bf46c2.is-invalid_bf46c2.is-hovered_bf46c2 .spectrum-Radio-label_bf46c2{color:var(--spectrum-radio-emphasized-circle-border-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Radio_bf46c2.is-invalid_bf46c2:active .spectrum-Radio-input_bf46c2+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio--quiet_bf46c2.is-invalid_bf46c2:active .spectrum-Radio-input_bf46c2+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-emphasized-circle-border-color-error-down,var(--spectrum-global-color-red-700))}.spectrum-Radio_bf46c2.is-invalid_bf46c2:active .spectrum-Radio-label_bf46c2,.spectrum-Radio--quiet_bf46c2.is-invalid_bf46c2:active .spectrum-Radio-label_bf46c2{color:var(--spectrum-radio-emphasized-circle-border-color-error-down,var(--spectrum-global-color-red-700))}.spectrum-Radio_bf46c2.is-invalid_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:not(:checked)+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio_bf46c2.is-invalid_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:not(:checked)+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio--quiet_bf46c2.is-invalid_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:not(:checked)+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio--quiet_bf46c2.is-invalid_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:not(:checked)+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-circle-border-color-error-key-focus,var(--spectrum-global-color-red-600))}.spectrum-Radio_bf46c2.is-invalid_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:checked+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio_bf46c2.is-invalid_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:checked+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio--quiet_bf46c2.is-invalid_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:checked+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio--quiet_bf46c2.is-invalid_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:checked+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-circle-border-color-error-selected-key-focus,var(--spectrum-global-color-red-600))}.spectrum-Radio-input_bf46c2:disabled+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-emphasized-circle-border-color-disabled,var(--spectrum-global-color-gray-400))!important}.spectrum-Radio-input_bf46c2:disabled~.spectrum-Radio-label_bf46c2{color:var(--spectrum-radio-emphasized-text-color-disabled,var(--spectrum-alias-text-color-disabled))!important}.spectrum-Radio_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:not(:checked)+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:not(:checked)+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio--quiet_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:not(:checked)+.spectrum-Radio-button_bf46c2:before,.spectrum-Radio--quiet_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2:not(:checked)+.spectrum-Radio-button_bf46c2:before{border-color:var(--spectrum-radio-circle-border-color-key-focus,var(--spectrum-global-color-gray-700))}.spectrum-Radio_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2+.spectrum-Radio-button_bf46c2:after,.spectrum-Radio_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2+.spectrum-Radio-button_bf46c2:after,.spectrum-Radio--quiet_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2+.spectrum-Radio-button_bf46c2:after,.spectrum-Radio--quiet_bf46c2.is-hovered_bf46c2 .spectrum-Radio-input_bf46c2.focus-ring_bf46c2+.spectrum-Radio-button_bf46c2:after{box-shadow:0 0 0 var(--spectrum-radio-focus-ring-size-key-focus,var(--spectrum-alias-focus-ring-size))var(--spectrum-radio-focus-ring-color-key-focus,var(--spectrum-alias-focus-ring-color))}[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--positionTop_d2db1f .spectrum-Field-field--multiline_d2db1f{flex:auto}.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);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}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f .spectrum-Field-field--multiline_d2db1f{height:100%}[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-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}
|
package/dist/main.js
CHANGED
@@ -1,228 +1,247 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
var
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
var
|
10
|
-
|
11
|
-
|
1
|
+
require("./main.css");
|
2
|
+
var $ltKMc$reactspectrumutils = require("@react-spectrum/utils");
|
3
|
+
var $ltKMc$reactariafocus = require("@react-aria/focus");
|
4
|
+
var $ltKMc$react = require("react");
|
5
|
+
var $ltKMc$reactariainteractions = require("@react-aria/interactions");
|
6
|
+
var $ltKMc$reactariaradio = require("@react-aria/radio");
|
7
|
+
var $ltKMc$reactspectrumlabel = require("@react-spectrum/label");
|
8
|
+
var $ltKMc$reactspectrumform = require("@react-spectrum/form");
|
9
|
+
var $ltKMc$reactspectrumprovider = require("@react-spectrum/provider");
|
10
|
+
var $ltKMc$reactstatelyradio = require("@react-stately/radio");
|
11
|
+
|
12
|
+
function $parcel$exportWildcard(dest, source) {
|
13
|
+
Object.keys(source).forEach(function(key) {
|
14
|
+
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
15
|
+
return;
|
16
|
+
}
|
12
17
|
|
13
|
-
|
14
|
-
|
15
|
-
|
18
|
+
Object.defineProperty(dest, key, {
|
19
|
+
enumerable: true,
|
20
|
+
get: function get() {
|
21
|
+
return source[key];
|
22
|
+
}
|
23
|
+
});
|
24
|
+
});
|
16
25
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
26
|
+
return dest;
|
27
|
+
}
|
28
|
+
function $parcel$interopDefault(a) {
|
29
|
+
return a && a.__esModule ? a.default : a;
|
30
|
+
}
|
31
|
+
function $parcel$export(e, n, v, s) {
|
32
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
33
|
+
}
|
34
|
+
var $e8d5518f9c1aca76$exports = {};
|
21
35
|
|
22
|
-
|
23
|
-
useHover
|
24
|
-
} = require("@react-aria/interactions");
|
36
|
+
$parcel$export($e8d5518f9c1aca76$exports, "Radio", () => $e8d5518f9c1aca76$export$d7b12c4107be0d61);
|
25
37
|
|
26
|
-
var _react2 = require("react");
|
27
38
|
|
28
|
-
var _react = $parcel$interopDefault(_react2);
|
29
39
|
|
30
|
-
var {
|
31
|
-
forwardRef,
|
32
|
-
useRef,
|
33
|
-
useContext
|
34
|
-
} = _react2;
|
40
|
+
var $a8fbff4889c18df2$exports = {};
|
35
41
|
|
36
|
-
|
37
|
-
|
38
|
-
|
42
|
+
$parcel$export($a8fbff4889c18df2$exports, "spectrum-Radio", () => $a8fbff4889c18df2$export$26ebd4dbfef068c5, (v) => $a8fbff4889c18df2$export$26ebd4dbfef068c5 = v);
|
43
|
+
$parcel$export($a8fbff4889c18df2$exports, "spectrum-Radio-input", () => $a8fbff4889c18df2$export$c0ce6f9a6a2de1cc, (v) => $a8fbff4889c18df2$export$c0ce6f9a6a2de1cc = v);
|
44
|
+
$parcel$export($a8fbff4889c18df2$exports, "spectrum-Radio-button", () => $a8fbff4889c18df2$export$bf9d5e902c33bf05, (v) => $a8fbff4889c18df2$export$bf9d5e902c33bf05 = v);
|
45
|
+
$parcel$export($a8fbff4889c18df2$exports, "focus-ring", () => $a8fbff4889c18df2$export$f39a09f249340e2a, (v) => $a8fbff4889c18df2$export$f39a09f249340e2a = v);
|
46
|
+
$parcel$export($a8fbff4889c18df2$exports, "spectrum-Radio-label", () => $a8fbff4889c18df2$export$b0f8395a9667922d, (v) => $a8fbff4889c18df2$export$b0f8395a9667922d = v);
|
47
|
+
$parcel$export($a8fbff4889c18df2$exports, "spectrum-Radio--labelBelow", () => $a8fbff4889c18df2$export$9443e7082698950d, (v) => $a8fbff4889c18df2$export$9443e7082698950d = v);
|
48
|
+
$parcel$export($a8fbff4889c18df2$exports, "is-hovered", () => $a8fbff4889c18df2$export$b8813cd5d7824ce7, (v) => $a8fbff4889c18df2$export$b8813cd5d7824ce7 = v);
|
49
|
+
$parcel$export($a8fbff4889c18df2$exports, "spectrum-Radio--quiet", () => $a8fbff4889c18df2$export$6db66b55a897f36d, (v) => $a8fbff4889c18df2$export$6db66b55a897f36d = v);
|
50
|
+
$parcel$export($a8fbff4889c18df2$exports, "is-invalid", () => $a8fbff4889c18df2$export$14a30de2866685fa, (v) => $a8fbff4889c18df2$export$14a30de2866685fa = v);
|
51
|
+
var $a8fbff4889c18df2$export$26ebd4dbfef068c5;
|
52
|
+
var $a8fbff4889c18df2$export$c0ce6f9a6a2de1cc;
|
53
|
+
var $a8fbff4889c18df2$export$bf9d5e902c33bf05;
|
54
|
+
var $a8fbff4889c18df2$export$f39a09f249340e2a;
|
55
|
+
var $a8fbff4889c18df2$export$b0f8395a9667922d;
|
56
|
+
var $a8fbff4889c18df2$export$9443e7082698950d;
|
57
|
+
var $a8fbff4889c18df2$export$b8813cd5d7824ce7;
|
58
|
+
var $a8fbff4889c18df2$export$6db66b55a897f36d;
|
59
|
+
var $a8fbff4889c18df2$export$14a30de2866685fa;
|
60
|
+
$a8fbff4889c18df2$export$26ebd4dbfef068c5 = "spectrum-Radio_bf46c2";
|
61
|
+
$a8fbff4889c18df2$export$c0ce6f9a6a2de1cc = "spectrum-Radio-input_bf46c2";
|
62
|
+
$a8fbff4889c18df2$export$bf9d5e902c33bf05 = "spectrum-Radio-button_bf46c2";
|
63
|
+
$a8fbff4889c18df2$export$f39a09f249340e2a = "focus-ring_bf46c2";
|
64
|
+
$a8fbff4889c18df2$export$b0f8395a9667922d = "spectrum-Radio-label_bf46c2";
|
65
|
+
$a8fbff4889c18df2$export$9443e7082698950d = "spectrum-Radio--labelBelow_bf46c2";
|
66
|
+
$a8fbff4889c18df2$export$b8813cd5d7824ce7 = "is-hovered_bf46c2";
|
67
|
+
$a8fbff4889c18df2$export$6db66b55a897f36d = "spectrum-Radio--quiet_bf46c2";
|
68
|
+
$a8fbff4889c18df2$export$14a30de2866685fa = "is-invalid_bf46c2";
|
39
69
|
|
40
|
-
var {
|
41
|
-
classNames,
|
42
|
-
useFocusableRef,
|
43
|
-
useStyleProps,
|
44
|
-
useDOMRef
|
45
|
-
} = require("@react-spectrum/utils");
|
46
70
|
|
47
|
-
var _babelRuntimeHelpersObjectWithoutPropertiesLoose = $parcel$interopDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
48
71
|
|
49
|
-
var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
|
50
72
|
|
51
|
-
require("./main.css");
|
52
73
|
|
53
|
-
|
54
|
-
|
74
|
+
const $f5a8721b9af05d97$export$b118023277d4a5c3 = ($parcel$interopDefault($ltKMc$react)).createContext(null);
|
75
|
+
function $f5a8721b9af05d97$export$b054eba74077a826() {
|
76
|
+
return $ltKMc$react.useContext($f5a8721b9af05d97$export$b118023277d4a5c3);
|
55
77
|
}
|
56
78
|
|
57
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/radio/vars.css
|
58
|
-
var $b50b26895e9d451b27b55d215ff6a51$exports = {};
|
59
|
-
$b50b26895e9d451b27b55d215ff6a51$exports = {
|
60
|
-
"spectrum-Radio": "_spectrum-Radio_db05c",
|
61
|
-
"spectrum-Radio-input": "_spectrum-Radio-input_db05c",
|
62
|
-
"spectrum-Radio-button": "_spectrum-Radio-button_db05c",
|
63
|
-
"focus-ring": "_focus-ring_db05c",
|
64
|
-
"spectrum-Radio-label": "_spectrum-Radio-label_db05c",
|
65
|
-
"spectrum-Radio--labelBelow": "_spectrum-Radio--labelBelow_db05c",
|
66
|
-
"is-hovered": "_is-hovered_db05c",
|
67
|
-
"spectrum-Radio--quiet": "_spectrum-Radio--quiet_db05c",
|
68
|
-
"is-invalid": "_is-invalid_db05c"
|
69
|
-
};
|
70
|
-
|
71
|
-
const $dc0e5d54409e9454b207deef7914e49$export$RadioContext = /*#__PURE__*/_react.createContext(null);
|
72
|
-
|
73
|
-
function $dc0e5d54409e9454b207deef7914e49$export$useRadioProvider() {
|
74
|
-
return useContext($dc0e5d54409e9454b207deef7914e49$export$RadioContext);
|
75
|
-
}
|
76
79
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
'is-invalid': validationState === 'invalid',
|
117
|
-
'is-hovered': isHovered
|
118
|
-
}, styleProps.className)
|
119
|
-
}), /*#__PURE__*/_react.createElement(FocusRing, {
|
120
|
-
focusRingClass: classNames($b50b26895e9d451b27b55d215ff6a51$$interop$default, 'focus-ring'),
|
121
|
-
autoFocus: autoFocus
|
122
|
-
}, /*#__PURE__*/_react.createElement("input", _babelRuntimeHelpersExtends({}, inputProps, {
|
123
|
-
ref: inputRef,
|
124
|
-
className: classNames($b50b26895e9d451b27b55d215ff6a51$$interop$default, 'spectrum-Radio-input')
|
125
|
-
}))), /*#__PURE__*/_react.createElement("span", {
|
126
|
-
className: classNames($b50b26895e9d451b27b55d215ff6a51$$interop$default, 'spectrum-Radio-button')
|
127
|
-
}), children && /*#__PURE__*/_react.createElement("span", {
|
128
|
-
className: classNames($b50b26895e9d451b27b55d215ff6a51$$interop$default, 'spectrum-Radio-label')
|
129
|
-
}, children));
|
80
|
+
function $e8d5518f9c1aca76$var$Radio(props, ref) {
|
81
|
+
let { isDisabled: isDisabled , children: children , autoFocus: autoFocus , ...otherProps } = props;
|
82
|
+
let { styleProps: styleProps } = $ltKMc$reactspectrumutils.useStyleProps(otherProps);
|
83
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = $ltKMc$reactariainteractions.useHover({
|
84
|
+
isDisabled: isDisabled
|
85
|
+
});
|
86
|
+
let inputRef = $ltKMc$react.useRef(null);
|
87
|
+
let domRef = $ltKMc$reactspectrumutils.useFocusableRef(ref, inputRef);
|
88
|
+
let radioGroupProps = $f5a8721b9af05d97$export$b054eba74077a826();
|
89
|
+
let { isEmphasized: isEmphasized , validationState: validationState , state: state } = radioGroupProps;
|
90
|
+
let { inputProps: inputProps } = $ltKMc$reactariaradio.useRadio({
|
91
|
+
...props,
|
92
|
+
...radioGroupProps,
|
93
|
+
isDisabled: isDisabled
|
94
|
+
}, state, inputRef);
|
95
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($ltKMc$react)).createElement("label", {
|
96
|
+
...styleProps,
|
97
|
+
...hoverProps,
|
98
|
+
ref: domRef,
|
99
|
+
className: $ltKMc$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($a8fbff4889c18df2$exports)), 'spectrum-Radio', {
|
100
|
+
// Removing. Pending design feedback.
|
101
|
+
// 'spectrum-Radio--labelBelow': labelPosition === 'bottom',
|
102
|
+
'spectrum-Radio--quiet': !isEmphasized,
|
103
|
+
'is-disabled': isDisabled,
|
104
|
+
'is-invalid': validationState === 'invalid',
|
105
|
+
'is-hovered': isHovered
|
106
|
+
}, styleProps.className)
|
107
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($ltKMc$react)).createElement($ltKMc$reactariafocus.FocusRing, {
|
108
|
+
focusRingClass: $ltKMc$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($a8fbff4889c18df2$exports)), 'focus-ring'),
|
109
|
+
autoFocus: autoFocus
|
110
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($ltKMc$react)).createElement("input", {
|
111
|
+
...inputProps,
|
112
|
+
ref: inputRef,
|
113
|
+
className: $ltKMc$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($a8fbff4889c18df2$exports)), 'spectrum-Radio-input')
|
114
|
+
})), /*#__PURE__*/ ($parcel$interopDefault($ltKMc$react)).createElement("span", {
|
115
|
+
className: $ltKMc$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($a8fbff4889c18df2$exports)), 'spectrum-Radio-button')
|
116
|
+
}), children && /*#__PURE__*/ ($parcel$interopDefault($ltKMc$react)).createElement("span", {
|
117
|
+
className: $ltKMc$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($a8fbff4889c18df2$exports)), 'spectrum-Radio-label')
|
118
|
+
}, children)));
|
130
119
|
}
|
131
120
|
/**
|
132
121
|
* Radio buttons allow users to select a single option from a list of mutually exclusive options.
|
133
122
|
* All possible options are exposed up front for users to compare.
|
134
|
-
*/
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
var $
|
160
|
-
$
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
var $
|
167
|
-
var $
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
}
|
217
|
-
|
123
|
+
*/ const $e8d5518f9c1aca76$export$d7b12c4107be0d61 = /*#__PURE__*/ $ltKMc$react.forwardRef($e8d5518f9c1aca76$var$Radio);
|
124
|
+
|
125
|
+
|
126
|
+
var $aa5529d97b69d048$exports = {};
|
127
|
+
|
128
|
+
$parcel$export($aa5529d97b69d048$exports, "RadioGroup", () => $aa5529d97b69d048$export$a98f0dcb43a68a25);
|
129
|
+
|
130
|
+
|
131
|
+
var $eb2fc0ee655eff6b$exports = {};
|
132
|
+
|
133
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-FieldLabel", () => $eb2fc0ee655eff6b$export$493d18e796ae054, (v) => $eb2fc0ee655eff6b$export$493d18e796ae054 = v);
|
134
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-FieldLabel--positionSide", () => $eb2fc0ee655eff6b$export$9e6f19dc21f22f2e, (v) => $eb2fc0ee655eff6b$export$9e6f19dc21f22f2e = v);
|
135
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-FieldLabel-requiredIcon", () => $eb2fc0ee655eff6b$export$7c47642c7d46f3c9, (v) => $eb2fc0ee655eff6b$export$7c47642c7d46f3c9 = v);
|
136
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-FieldLabel--alignEnd", () => $eb2fc0ee655eff6b$export$885efcc08143a987, (v) => $eb2fc0ee655eff6b$export$885efcc08143a987 = v);
|
137
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field", () => $eb2fc0ee655eff6b$export$f6d480ae1e56eba0, (v) => $eb2fc0ee655eff6b$export$f6d480ae1e56eba0 = v);
|
138
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field--positionTop", () => $eb2fc0ee655eff6b$export$a4ea780a9064d7f9, (v) => $eb2fc0ee655eff6b$export$a4ea780a9064d7f9 = v);
|
139
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field-field", () => $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d, (v) => $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d = v);
|
140
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field-field--multiline", () => $eb2fc0ee655eff6b$export$f58a1e966a92ba5e, (v) => $eb2fc0ee655eff6b$export$f58a1e966a92ba5e = v);
|
141
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field--positionSide", () => $eb2fc0ee655eff6b$export$2963225c91179589, (v) => $eb2fc0ee655eff6b$export$2963225c91179589 = v);
|
142
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field-wrapper", () => $eb2fc0ee655eff6b$export$127df0b7290eb8ef, (v) => $eb2fc0ee655eff6b$export$127df0b7290eb8ef = v);
|
143
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Form", () => $eb2fc0ee655eff6b$export$94d2bcc94afabd89, (v) => $eb2fc0ee655eff6b$export$94d2bcc94afabd89 = v);
|
144
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Form--positionSide", () => $eb2fc0ee655eff6b$export$7f44db659563c8f4, (v) => $eb2fc0ee655eff6b$export$7f44db659563c8f4 = v);
|
145
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Form--positionTop", () => $eb2fc0ee655eff6b$export$11b8bc81fe551057, (v) => $eb2fc0ee655eff6b$export$11b8bc81fe551057 = v);
|
146
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Form-itemLabel", () => $eb2fc0ee655eff6b$export$51ec27881a1e3928, (v) => $eb2fc0ee655eff6b$export$51ec27881a1e3928 = v);
|
147
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "is-disabled", () => $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf, (v) => $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf = v);
|
148
|
+
var $eb2fc0ee655eff6b$export$493d18e796ae054;
|
149
|
+
var $eb2fc0ee655eff6b$export$9e6f19dc21f22f2e;
|
150
|
+
var $eb2fc0ee655eff6b$export$7c47642c7d46f3c9;
|
151
|
+
var $eb2fc0ee655eff6b$export$885efcc08143a987;
|
152
|
+
var $eb2fc0ee655eff6b$export$f6d480ae1e56eba0;
|
153
|
+
var $eb2fc0ee655eff6b$export$a4ea780a9064d7f9;
|
154
|
+
var $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d;
|
155
|
+
var $eb2fc0ee655eff6b$export$f58a1e966a92ba5e;
|
156
|
+
var $eb2fc0ee655eff6b$export$2963225c91179589;
|
157
|
+
var $eb2fc0ee655eff6b$export$127df0b7290eb8ef;
|
158
|
+
var $eb2fc0ee655eff6b$export$94d2bcc94afabd89;
|
159
|
+
var $eb2fc0ee655eff6b$export$7f44db659563c8f4;
|
160
|
+
var $eb2fc0ee655eff6b$export$11b8bc81fe551057;
|
161
|
+
var $eb2fc0ee655eff6b$export$51ec27881a1e3928;
|
162
|
+
var $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf;
|
163
|
+
$eb2fc0ee655eff6b$export$493d18e796ae054 = "spectrum-FieldLabel_d2db1f";
|
164
|
+
$eb2fc0ee655eff6b$export$9e6f19dc21f22f2e = "spectrum-FieldLabel--positionSide_d2db1f";
|
165
|
+
$eb2fc0ee655eff6b$export$7c47642c7d46f3c9 = "spectrum-FieldLabel-requiredIcon_d2db1f";
|
166
|
+
$eb2fc0ee655eff6b$export$885efcc08143a987 = "spectrum-FieldLabel--alignEnd_d2db1f";
|
167
|
+
$eb2fc0ee655eff6b$export$f6d480ae1e56eba0 = "spectrum-Field_d2db1f";
|
168
|
+
$eb2fc0ee655eff6b$export$a4ea780a9064d7f9 = "spectrum-Field--positionTop_d2db1f";
|
169
|
+
$eb2fc0ee655eff6b$export$3ab8a3dc7f0563d = "spectrum-Field-field_d2db1f";
|
170
|
+
$eb2fc0ee655eff6b$export$f58a1e966a92ba5e = "spectrum-Field-field--multiline_d2db1f";
|
171
|
+
$eb2fc0ee655eff6b$export$2963225c91179589 = "spectrum-Field--positionSide_d2db1f";
|
172
|
+
$eb2fc0ee655eff6b$export$127df0b7290eb8ef = "spectrum-Field-wrapper_d2db1f";
|
173
|
+
$eb2fc0ee655eff6b$export$94d2bcc94afabd89 = "spectrum-Form_d2db1f";
|
174
|
+
$eb2fc0ee655eff6b$export$7f44db659563c8f4 = "spectrum-Form--positionSide_d2db1f";
|
175
|
+
$eb2fc0ee655eff6b$export$11b8bc81fe551057 = "spectrum-Form--positionTop_d2db1f";
|
176
|
+
$eb2fc0ee655eff6b$export$51ec27881a1e3928 = "spectrum-Form-itemLabel_d2db1f";
|
177
|
+
$eb2fc0ee655eff6b$export$d35bc1e505d1ebbf = "is-disabled_d2db1f";
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
var $53124a3a0fd56fca$exports = {};
|
183
|
+
|
184
|
+
$parcel$export($53124a3a0fd56fca$exports, "spectrum-FieldGroup", () => $53124a3a0fd56fca$export$75eb16cbfc18279c, (v) => $53124a3a0fd56fca$export$75eb16cbfc18279c = v);
|
185
|
+
$parcel$export($53124a3a0fd56fca$exports, "spectrum-FieldGroup--positionSide", () => $53124a3a0fd56fca$export$859b606bd9f45f81, (v) => $53124a3a0fd56fca$export$859b606bd9f45f81 = v);
|
186
|
+
$parcel$export($53124a3a0fd56fca$exports, "spectrum-FieldGroup-group", () => $53124a3a0fd56fca$export$984c7bbbfc7ddffc, (v) => $53124a3a0fd56fca$export$984c7bbbfc7ddffc = v);
|
187
|
+
$parcel$export($53124a3a0fd56fca$exports, "spectrum-FieldGroup-group--horizontal", () => $53124a3a0fd56fca$export$1ad8646bcba21c0e, (v) => $53124a3a0fd56fca$export$1ad8646bcba21c0e = v);
|
188
|
+
var $53124a3a0fd56fca$export$75eb16cbfc18279c;
|
189
|
+
var $53124a3a0fd56fca$export$859b606bd9f45f81;
|
190
|
+
var $53124a3a0fd56fca$export$984c7bbbfc7ddffc;
|
191
|
+
var $53124a3a0fd56fca$export$1ad8646bcba21c0e;
|
192
|
+
$53124a3a0fd56fca$export$75eb16cbfc18279c = "spectrum-FieldGroup_41d350";
|
193
|
+
$53124a3a0fd56fca$export$859b606bd9f45f81 = "spectrum-FieldGroup--positionSide_41d350";
|
194
|
+
$53124a3a0fd56fca$export$984c7bbbfc7ddffc = "spectrum-FieldGroup-group_41d350";
|
195
|
+
$53124a3a0fd56fca$export$1ad8646bcba21c0e = "spectrum-FieldGroup-group--horizontal_41d350";
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
function $aa5529d97b69d048$var$RadioGroup(props, ref) {
|
203
|
+
props = $ltKMc$reactspectrumprovider.useProviderProps(props);
|
204
|
+
props = $ltKMc$reactspectrumform.useFormProps(props);
|
205
|
+
let { isEmphasized: isEmphasized , isRequired: isRequired , necessityIndicator: necessityIndicator , label: label , labelPosition: labelPosition = 'top' , labelAlign: labelAlign , validationState: validationState , children: children , orientation: orientation = 'vertical' , ...otherProps } = props;
|
206
|
+
let domRef = $ltKMc$reactspectrumutils.useDOMRef(ref);
|
207
|
+
let { styleProps: styleProps } = $ltKMc$reactspectrumutils.useStyleProps(otherProps);
|
208
|
+
let state = $ltKMc$reactstatelyradio.useRadioGroupState(props);
|
209
|
+
let { radioGroupProps: radioGroupProps , labelProps: labelProps } = $ltKMc$reactariaradio.useRadioGroup(props, state);
|
210
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($ltKMc$react)).createElement("div", {
|
211
|
+
...styleProps,
|
212
|
+
...radioGroupProps,
|
213
|
+
className: $ltKMc$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($53124a3a0fd56fca$exports)), 'spectrum-FieldGroup', {
|
214
|
+
'spectrum-FieldGroup--positionSide': labelPosition === 'side'
|
215
|
+
}, // This is so radio works inside a <Form>
|
216
|
+
$ltKMc$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($eb2fc0ee655eff6b$exports)), 'spectrum-Field'), styleProps.className),
|
217
|
+
ref: domRef
|
218
|
+
}, label && /*#__PURE__*/ ($parcel$interopDefault($ltKMc$react)).createElement($ltKMc$reactspectrumlabel.Label, {
|
219
|
+
...labelProps,
|
220
|
+
elementType: "span",
|
221
|
+
labelPosition: labelPosition,
|
222
|
+
labelAlign: labelAlign,
|
223
|
+
isRequired: isRequired,
|
224
|
+
necessityIndicator: necessityIndicator
|
225
|
+
}, label), /*#__PURE__*/ ($parcel$interopDefault($ltKMc$react)).createElement("div", {
|
226
|
+
className: $ltKMc$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($53124a3a0fd56fca$exports)), 'spectrum-FieldGroup-group', {
|
227
|
+
'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'
|
228
|
+
})
|
229
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($ltKMc$react)).createElement($f5a8721b9af05d97$export$b118023277d4a5c3.Provider, {
|
230
|
+
value: {
|
231
|
+
isEmphasized: isEmphasized,
|
232
|
+
validationState: validationState,
|
233
|
+
state: state
|
234
|
+
}
|
235
|
+
}, children))));
|
218
236
|
}
|
219
237
|
/**
|
220
238
|
* Radio groups allow users to select a single option from a list of mutually exclusive options.
|
221
239
|
* All possible options are exposed up front for users to compare.
|
222
|
-
*/
|
240
|
+
*/ const $aa5529d97b69d048$export$a98f0dcb43a68a25 = /*#__PURE__*/ ($parcel$interopDefault($ltKMc$react)).forwardRef($aa5529d97b69d048$var$RadioGroup);
|
241
|
+
|
223
242
|
|
243
|
+
$parcel$exportWildcard(module.exports, $e8d5518f9c1aca76$exports);
|
244
|
+
$parcel$exportWildcard(module.exports, $aa5529d97b69d048$exports);
|
224
245
|
|
225
|
-
const RadioGroup = /*#__PURE__*/_react.forwardRef($e125f55143423f8d3ecf034e5ae37$var$RadioGroup);
|
226
246
|
|
227
|
-
exports.RadioGroup = RadioGroup;
|
228
247
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP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;AAHK;AADT,KAMGf,QANH,CAVF,CA9BF,CADF;AAoDD;AAED;;;;;;AAIA,MAAMmC,UAAW,gBAAG3C,MAAK,CAAC6B,UAAN,CAAiBC,6CAAjB,CAApB","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/radio/vars.css","./packages/@react-spectrum/radio/src/context.ts","./packages/@react-spectrum/radio/src/Radio.tsx","./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/vars.css","./node_modules/@adobe/spectrum-css-temp/components/fieldgroup/vars.css","./packages/@react-spectrum/radio/src/RadioGroup.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RadioGroupState} from '@react-stately/radio';\nimport React, {useContext} from 'react';\n\ninterface RadioGroupContext {\n isEmphasized?: boolean,\n name?: string,\n validationState?: 'valid' | 'invalid',\n state: RadioGroupState\n}\n\nexport const RadioContext = React.createContext<RadioGroupContext | null>(null);\n\nexport function useRadioProvider(): RadioGroupContext {\n return useContext(RadioContext);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumRadioProps} from '@react-types/radio';\nimport styles from '@adobe/spectrum-css-temp/components/radio/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useRadio} from '@react-aria/radio';\nimport {useRadioProvider} from './context';\n\nfunction Radio(props: SpectrumRadioProps, ref: FocusableRef<HTMLLabelElement>) {\n let {\n isDisabled,\n children,\n autoFocus,\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 let radioGroupProps = useRadioProvider();\n let {\n isEmphasized,\n validationState,\n state\n } = radioGroupProps;\n\n let {inputProps} = useRadio({\n ...props,\n ...radioGroupProps,\n isDisabled\n }, state, inputRef);\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Radio',\n {\n // Removing. Pending design feedback.\n // 'spectrum-Radio--labelBelow': labelPosition === 'bottom',\n 'spectrum-Radio--quiet': !isEmphasized,\n 'is-disabled': isDisabled,\n 'is-invalid': validationState === 'invalid',\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-Radio-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-Radio-button')} />\n {children && (\n <span className={classNames(styles, 'spectrum-Radio-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n\n/**\n * Radio buttons allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _Radio = forwardRef(Radio);\nexport {_Radio as Radio};\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","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, 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 {RadioContext} from './context';\nimport React from 'react';\nimport {SpectrumRadioGroupProps} from '@react-types/radio';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useRadioGroup} from '@react-aria/radio';\nimport {useRadioGroupState} from '@react-stately/radio';\n\nfunction RadioGroup(props: SpectrumRadioGroupProps, 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 validationState,\n children,\n orientation = 'vertical',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n let state = useRadioGroupState(props);\n let {radioGroupProps, labelProps} = useRadioGroup(props, state);\n\n return (\n <div\n {...styleProps}\n {...radioGroupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup',\n {\n 'spectrum-FieldGroup--positionSide': labelPosition === 'side'\n },\n // This is so radio 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 {label}\n </Label>\n }\n <div\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup-group',\n {\n 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n }\n )\n }>\n <RadioContext.Provider\n value={{\n isEmphasized,\n validationState,\n state\n }}>\n {children}\n </RadioContext.Provider>\n </div>\n </div>\n );\n}\n\n/**\n * Radio groups allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _RadioGroup = React.forwardRef(RadioGroup);\nexport {_RadioGroup as RadioGroup};\n"],"names":["$parcel$interopDefault","a","__esModule","default","RadioContext","React","createContext","useRadioProvider","useContext","Radio","props","ref","isDisabled","children","autoFocus","otherProps","styleProps","useStyleProps","hoverProps","isHovered","useHover","inputRef","useRef","domRef","useFocusableRef","radioGroupProps","isEmphasized","validationState","state","inputProps","useRadio","classNames","className","_Radio","forwardRef","RadioGroup","useProviderProps","useFormProps","isRequired","necessityIndicator","label","labelPosition","labelAlign","orientation","useDOMRef","useRadioGroupState","labelProps","useRadioGroup","_RadioGroup"],"version":3,"file":"main.js.map"}
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAgC;AAChC,GAAsC;AACtC,GAAuC;AACvC,GAA4B;AAC5B,GAAsC;AACtC,GAA4C;AAC5C,GAA4B;AAC5B,GAAuC;AACvC,GAA4B;AAR5B,yCAAgC,GAAG,CAAuB;AAC1D,yCAAsC,GAAG,CAA6B;AACtE,yCAAuC,GAAG,CAA8B;AACxE,yCAA4B,GAAG,CAAmB;AAClD,yCAAsC,GAAG,CAA6B;AACtE,yCAA4C,GAAG,CAAmC;AAClF,yCAA4B,GAAG,CAAmB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AAW,KAAK,CAAY;QACvE,CAAC;0EAGJ,yCAAY,CAAC,QAAQ;QACpB,KAAK,EAAE,CAAC;0BACN,YAAY;6BACZ,eAAe;mBACf,KAAK;QACP,CAAC;OACA,QAAQ;AAKnB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,KAAK,CAAC,yCAAW,iBAAG,sCAAK,CAAC,UAAU,CAAC,gCAAU;;","sources":["packages/@react-spectrum/radio/src/index.ts","packages/@react-spectrum/radio/src/Radio.tsx","packages/@adobe/spectrum-css-temp/components/radio/vars.css","packages/@react-spectrum/radio/src/context.ts","packages/@react-spectrum/radio/src/RadioGroup.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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Radio';\nexport * from './RadioGroup';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumRadioProps} from '@react-types/radio';\nimport styles from '@adobe/spectrum-css-temp/components/radio/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useRadio} from '@react-aria/radio';\nimport {useRadioProvider} from './context';\n\nfunction Radio(props: SpectrumRadioProps, ref: FocusableRef<HTMLLabelElement>) {\n let {\n isDisabled,\n children,\n autoFocus,\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 let radioGroupProps = useRadioProvider();\n let {\n isEmphasized,\n validationState,\n state\n } = radioGroupProps;\n\n let {inputProps} = useRadio({\n ...props,\n ...radioGroupProps,\n isDisabled\n }, state, inputRef);\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Radio',\n {\n // Removing. Pending design feedback.\n // 'spectrum-Radio--labelBelow': labelPosition === 'bottom',\n 'spectrum-Radio--quiet': !isEmphasized,\n 'is-disabled': isDisabled,\n 'is-invalid': validationState === 'invalid',\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-Radio-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-Radio-button')} />\n {children && (\n <span className={classNames(styles, 'spectrum-Radio-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n\n/**\n * Radio buttons allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _Radio = forwardRef(Radio);\nexport {_Radio as Radio};\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 {RadioGroupState} from '@react-stately/radio';\nimport React, {useContext} from 'react';\n\ninterface RadioGroupContext {\n isEmphasized?: boolean,\n name?: string,\n validationState?: 'valid' | 'invalid',\n state: RadioGroupState\n}\n\nexport const RadioContext = React.createContext<RadioGroupContext | null>(null);\n\nexport function useRadioProvider(): RadioGroupContext {\n return useContext(RadioContext);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\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 {RadioContext} from './context';\nimport React from 'react';\nimport {SpectrumRadioGroupProps} from '@react-types/radio';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useRadioGroup} from '@react-aria/radio';\nimport {useRadioGroupState} from '@react-stately/radio';\n\nfunction RadioGroup(props: SpectrumRadioGroupProps, 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 validationState,\n children,\n orientation = 'vertical',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n let state = useRadioGroupState(props);\n let {radioGroupProps, labelProps} = useRadioGroup(props, state);\n\n return (\n <div\n {...styleProps}\n {...radioGroupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup',\n {\n 'spectrum-FieldGroup--positionSide': labelPosition === 'side'\n },\n // This is so radio 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 {label}\n </Label>\n }\n <div\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup-group',\n {\n 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n }\n )\n }>\n <RadioContext.Provider\n value={{\n isEmphasized,\n validationState,\n state\n }}>\n {children}\n </RadioContext.Provider>\n </div>\n </div>\n );\n}\n\n/**\n * Radio groups allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _RadioGroup = React.forwardRef(RadioGroup);\nexport {_RadioGroup as RadioGroup};\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"}
|
package/dist/module.js
CHANGED
@@ -1,186 +1,230 @@
|
|
1
|
-
import { useRadioGroupState } from "@react-stately/radio";
|
2
|
-
import { useProviderProps } from "@react-spectrum/provider";
|
3
|
-
import { useFormProps } from "@react-spectrum/form";
|
4
|
-
import { Label } from "@react-spectrum/label";
|
5
|
-
import { useRadio, useRadioGroup } from "@react-aria/radio";
|
6
|
-
import { useHover } from "@react-aria/interactions";
|
7
|
-
import _react, { forwardRef, useRef, useContext } from "react";
|
8
|
-
import { FocusRing } from "@react-aria/focus";
|
9
|
-
import { classNames, useFocusableRef, useStyleProps, useDOMRef } from "@react-spectrum/utils";
|
10
|
-
import _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
11
|
-
import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends";
|
12
1
|
import "./main.css";
|
2
|
+
import {useStyleProps as $4hD9r$useStyleProps, useFocusableRef as $4hD9r$useFocusableRef, classNames as $4hD9r$classNames, useDOMRef as $4hD9r$useDOMRef} from "@react-spectrum/utils";
|
3
|
+
import {FocusRing as $4hD9r$FocusRing} from "@react-aria/focus";
|
4
|
+
import $4hD9r$react, {useRef as $4hD9r$useRef, forwardRef as $4hD9r$forwardRef, useContext as $4hD9r$useContext} from "react";
|
5
|
+
import {useHover as $4hD9r$useHover} from "@react-aria/interactions";
|
6
|
+
import {useRadio as $4hD9r$useRadio, useRadioGroup as $4hD9r$useRadioGroup} from "@react-aria/radio";
|
7
|
+
import {Label as $4hD9r$Label} from "@react-spectrum/label";
|
8
|
+
import {useFormProps as $4hD9r$useFormProps} from "@react-spectrum/form";
|
9
|
+
import {useProviderProps as $4hD9r$useProviderProps} from "@react-spectrum/provider";
|
10
|
+
import {useRadioGroupState as $4hD9r$useRadioGroupState} from "@react-stately/radio";
|
13
11
|
|
14
12
|
function $parcel$interopDefault(a) {
|
15
13
|
return a && a.__esModule ? a.default : a;
|
16
14
|
}
|
15
|
+
function $parcel$export(e, n, v, s) {
|
16
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
17
|
+
}
|
18
|
+
var $337c5cb580c4e6ba$exports = {};
|
19
|
+
|
20
|
+
$parcel$export($337c5cb580c4e6ba$exports, "Radio", () => $337c5cb580c4e6ba$export$d7b12c4107be0d61);
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
var $d1246d70e6c52742$exports = {};
|
25
|
+
|
26
|
+
$parcel$export($d1246d70e6c52742$exports, "spectrum-Radio", () => $d1246d70e6c52742$export$26ebd4dbfef068c5, (v) => $d1246d70e6c52742$export$26ebd4dbfef068c5 = v);
|
27
|
+
$parcel$export($d1246d70e6c52742$exports, "spectrum-Radio-input", () => $d1246d70e6c52742$export$c0ce6f9a6a2de1cc, (v) => $d1246d70e6c52742$export$c0ce6f9a6a2de1cc = v);
|
28
|
+
$parcel$export($d1246d70e6c52742$exports, "spectrum-Radio-button", () => $d1246d70e6c52742$export$bf9d5e902c33bf05, (v) => $d1246d70e6c52742$export$bf9d5e902c33bf05 = v);
|
29
|
+
$parcel$export($d1246d70e6c52742$exports, "focus-ring", () => $d1246d70e6c52742$export$f39a09f249340e2a, (v) => $d1246d70e6c52742$export$f39a09f249340e2a = v);
|
30
|
+
$parcel$export($d1246d70e6c52742$exports, "spectrum-Radio-label", () => $d1246d70e6c52742$export$b0f8395a9667922d, (v) => $d1246d70e6c52742$export$b0f8395a9667922d = v);
|
31
|
+
$parcel$export($d1246d70e6c52742$exports, "spectrum-Radio--labelBelow", () => $d1246d70e6c52742$export$9443e7082698950d, (v) => $d1246d70e6c52742$export$9443e7082698950d = v);
|
32
|
+
$parcel$export($d1246d70e6c52742$exports, "is-hovered", () => $d1246d70e6c52742$export$b8813cd5d7824ce7, (v) => $d1246d70e6c52742$export$b8813cd5d7824ce7 = v);
|
33
|
+
$parcel$export($d1246d70e6c52742$exports, "spectrum-Radio--quiet", () => $d1246d70e6c52742$export$6db66b55a897f36d, (v) => $d1246d70e6c52742$export$6db66b55a897f36d = v);
|
34
|
+
$parcel$export($d1246d70e6c52742$exports, "is-invalid", () => $d1246d70e6c52742$export$14a30de2866685fa, (v) => $d1246d70e6c52742$export$14a30de2866685fa = v);
|
35
|
+
var $d1246d70e6c52742$export$26ebd4dbfef068c5;
|
36
|
+
var $d1246d70e6c52742$export$c0ce6f9a6a2de1cc;
|
37
|
+
var $d1246d70e6c52742$export$bf9d5e902c33bf05;
|
38
|
+
var $d1246d70e6c52742$export$f39a09f249340e2a;
|
39
|
+
var $d1246d70e6c52742$export$b0f8395a9667922d;
|
40
|
+
var $d1246d70e6c52742$export$9443e7082698950d;
|
41
|
+
var $d1246d70e6c52742$export$b8813cd5d7824ce7;
|
42
|
+
var $d1246d70e6c52742$export$6db66b55a897f36d;
|
43
|
+
var $d1246d70e6c52742$export$14a30de2866685fa;
|
44
|
+
$d1246d70e6c52742$export$26ebd4dbfef068c5 = "spectrum-Radio_bf46c2";
|
45
|
+
$d1246d70e6c52742$export$c0ce6f9a6a2de1cc = "spectrum-Radio-input_bf46c2";
|
46
|
+
$d1246d70e6c52742$export$bf9d5e902c33bf05 = "spectrum-Radio-button_bf46c2";
|
47
|
+
$d1246d70e6c52742$export$f39a09f249340e2a = "focus-ring_bf46c2";
|
48
|
+
$d1246d70e6c52742$export$b0f8395a9667922d = "spectrum-Radio-label_bf46c2";
|
49
|
+
$d1246d70e6c52742$export$9443e7082698950d = "spectrum-Radio--labelBelow_bf46c2";
|
50
|
+
$d1246d70e6c52742$export$b8813cd5d7824ce7 = "is-hovered_bf46c2";
|
51
|
+
$d1246d70e6c52742$export$6db66b55a897f36d = "spectrum-Radio--quiet_bf46c2";
|
52
|
+
$d1246d70e6c52742$export$14a30de2866685fa = "is-invalid_bf46c2";
|
53
|
+
|
54
|
+
|
17
55
|
|
18
|
-
|
19
|
-
|
20
|
-
$
|
21
|
-
|
22
|
-
|
23
|
-
"spectrum-Radio-button": "_spectrum-Radio-button_db05c",
|
24
|
-
"focus-ring": "_focus-ring_db05c",
|
25
|
-
"spectrum-Radio-label": "_spectrum-Radio-label_db05c",
|
26
|
-
"spectrum-Radio--labelBelow": "_spectrum-Radio--labelBelow_db05c",
|
27
|
-
"is-hovered": "_is-hovered_db05c",
|
28
|
-
"spectrum-Radio--quiet": "_spectrum-Radio--quiet_db05c",
|
29
|
-
"is-invalid": "_is-invalid_db05c"
|
30
|
-
};
|
31
|
-
|
32
|
-
const $ab95946e1e830e3cfac331e9d67ee25$export$RadioContext = /*#__PURE__*/_react.createContext(null);
|
33
|
-
|
34
|
-
function $ab95946e1e830e3cfac331e9d67ee25$export$useRadioProvider() {
|
35
|
-
return useContext($ab95946e1e830e3cfac331e9d67ee25$export$RadioContext);
|
56
|
+
|
57
|
+
|
58
|
+
const $f394bff9e10389a0$export$b118023277d4a5c3 = $4hD9r$react.createContext(null);
|
59
|
+
function $f394bff9e10389a0$export$b054eba74077a826() {
|
60
|
+
return $4hD9r$useContext($f394bff9e10389a0$export$b118023277d4a5c3);
|
36
61
|
}
|
37
62
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
'is-hovered': isHovered
|
79
|
-
}, styleProps.className)
|
80
|
-
}), /*#__PURE__*/_react.createElement(FocusRing, {
|
81
|
-
focusRingClass: classNames($caf9effdead839c12d96b05817b87a$$interop$default, 'focus-ring'),
|
82
|
-
autoFocus: autoFocus
|
83
|
-
}, /*#__PURE__*/_react.createElement("input", _babelRuntimeHelpersEsmExtends({}, inputProps, {
|
84
|
-
ref: inputRef,
|
85
|
-
className: classNames($caf9effdead839c12d96b05817b87a$$interop$default, 'spectrum-Radio-input')
|
86
|
-
}))), /*#__PURE__*/_react.createElement("span", {
|
87
|
-
className: classNames($caf9effdead839c12d96b05817b87a$$interop$default, 'spectrum-Radio-button')
|
88
|
-
}), children && /*#__PURE__*/_react.createElement("span", {
|
89
|
-
className: classNames($caf9effdead839c12d96b05817b87a$$interop$default, 'spectrum-Radio-label')
|
90
|
-
}, children));
|
63
|
+
|
64
|
+
function $337c5cb580c4e6ba$var$Radio(props, ref) {
|
65
|
+
let { isDisabled: isDisabled , children: children , autoFocus: autoFocus , ...otherProps } = props;
|
66
|
+
let { styleProps: styleProps } = $4hD9r$useStyleProps(otherProps);
|
67
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = $4hD9r$useHover({
|
68
|
+
isDisabled: isDisabled
|
69
|
+
});
|
70
|
+
let inputRef = $4hD9r$useRef(null);
|
71
|
+
let domRef = $4hD9r$useFocusableRef(ref, inputRef);
|
72
|
+
let radioGroupProps = $f394bff9e10389a0$export$b054eba74077a826();
|
73
|
+
let { isEmphasized: isEmphasized , validationState: validationState , state: state } = radioGroupProps;
|
74
|
+
let { inputProps: inputProps } = $4hD9r$useRadio({
|
75
|
+
...props,
|
76
|
+
...radioGroupProps,
|
77
|
+
isDisabled: isDisabled
|
78
|
+
}, state, inputRef);
|
79
|
+
return(/*#__PURE__*/ $4hD9r$react.createElement("label", {
|
80
|
+
...styleProps,
|
81
|
+
...hoverProps,
|
82
|
+
ref: domRef,
|
83
|
+
className: $4hD9r$classNames((/*@__PURE__*/$parcel$interopDefault($d1246d70e6c52742$exports)), 'spectrum-Radio', {
|
84
|
+
// Removing. Pending design feedback.
|
85
|
+
// 'spectrum-Radio--labelBelow': labelPosition === 'bottom',
|
86
|
+
'spectrum-Radio--quiet': !isEmphasized,
|
87
|
+
'is-disabled': isDisabled,
|
88
|
+
'is-invalid': validationState === 'invalid',
|
89
|
+
'is-hovered': isHovered
|
90
|
+
}, styleProps.className)
|
91
|
+
}, /*#__PURE__*/ $4hD9r$react.createElement($4hD9r$FocusRing, {
|
92
|
+
focusRingClass: $4hD9r$classNames((/*@__PURE__*/$parcel$interopDefault($d1246d70e6c52742$exports)), 'focus-ring'),
|
93
|
+
autoFocus: autoFocus
|
94
|
+
}, /*#__PURE__*/ $4hD9r$react.createElement("input", {
|
95
|
+
...inputProps,
|
96
|
+
ref: inputRef,
|
97
|
+
className: $4hD9r$classNames((/*@__PURE__*/$parcel$interopDefault($d1246d70e6c52742$exports)), 'spectrum-Radio-input')
|
98
|
+
})), /*#__PURE__*/ $4hD9r$react.createElement("span", {
|
99
|
+
className: $4hD9r$classNames((/*@__PURE__*/$parcel$interopDefault($d1246d70e6c52742$exports)), 'spectrum-Radio-button')
|
100
|
+
}), children && /*#__PURE__*/ $4hD9r$react.createElement("span", {
|
101
|
+
className: $4hD9r$classNames((/*@__PURE__*/$parcel$interopDefault($d1246d70e6c52742$exports)), 'spectrum-Radio-label')
|
102
|
+
}, children)));
|
91
103
|
}
|
92
104
|
/**
|
93
105
|
* Radio buttons allow users to select a single option from a list of mutually exclusive options.
|
94
106
|
* All possible options are exposed up front for users to compare.
|
95
|
-
*/
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
$
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
var $
|
127
|
-
var $
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
107
|
+
*/ const $337c5cb580c4e6ba$export$d7b12c4107be0d61 = /*#__PURE__*/ $4hD9r$forwardRef($337c5cb580c4e6ba$var$Radio);
|
108
|
+
|
109
|
+
|
110
|
+
var $ac9b96486fc4badf$exports = {};
|
111
|
+
|
112
|
+
$parcel$export($ac9b96486fc4badf$exports, "RadioGroup", () => $ac9b96486fc4badf$export$a98f0dcb43a68a25);
|
113
|
+
|
114
|
+
|
115
|
+
var $cd231e464c886c86$exports = {};
|
116
|
+
|
117
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel", () => $cd231e464c886c86$export$493d18e796ae054, (v) => $cd231e464c886c86$export$493d18e796ae054 = v);
|
118
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--positionSide", () => $cd231e464c886c86$export$9e6f19dc21f22f2e, (v) => $cd231e464c886c86$export$9e6f19dc21f22f2e = v);
|
119
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel-requiredIcon", () => $cd231e464c886c86$export$7c47642c7d46f3c9, (v) => $cd231e464c886c86$export$7c47642c7d46f3c9 = v);
|
120
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--alignEnd", () => $cd231e464c886c86$export$885efcc08143a987, (v) => $cd231e464c886c86$export$885efcc08143a987 = v);
|
121
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field", () => $cd231e464c886c86$export$f6d480ae1e56eba0, (v) => $cd231e464c886c86$export$f6d480ae1e56eba0 = v);
|
122
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionTop", () => $cd231e464c886c86$export$a4ea780a9064d7f9, (v) => $cd231e464c886c86$export$a4ea780a9064d7f9 = v);
|
123
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-field", () => $cd231e464c886c86$export$3ab8a3dc7f0563d, (v) => $cd231e464c886c86$export$3ab8a3dc7f0563d = v);
|
124
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-field--multiline", () => $cd231e464c886c86$export$f58a1e966a92ba5e, (v) => $cd231e464c886c86$export$f58a1e966a92ba5e = v);
|
125
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionSide", () => $cd231e464c886c86$export$2963225c91179589, (v) => $cd231e464c886c86$export$2963225c91179589 = v);
|
126
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-wrapper", () => $cd231e464c886c86$export$127df0b7290eb8ef, (v) => $cd231e464c886c86$export$127df0b7290eb8ef = v);
|
127
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form", () => $cd231e464c886c86$export$94d2bcc94afabd89, (v) => $cd231e464c886c86$export$94d2bcc94afabd89 = v);
|
128
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionSide", () => $cd231e464c886c86$export$7f44db659563c8f4, (v) => $cd231e464c886c86$export$7f44db659563c8f4 = v);
|
129
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionTop", () => $cd231e464c886c86$export$11b8bc81fe551057, (v) => $cd231e464c886c86$export$11b8bc81fe551057 = v);
|
130
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form-itemLabel", () => $cd231e464c886c86$export$51ec27881a1e3928, (v) => $cd231e464c886c86$export$51ec27881a1e3928 = v);
|
131
|
+
$parcel$export($cd231e464c886c86$exports, "is-disabled", () => $cd231e464c886c86$export$d35bc1e505d1ebbf, (v) => $cd231e464c886c86$export$d35bc1e505d1ebbf = v);
|
132
|
+
var $cd231e464c886c86$export$493d18e796ae054;
|
133
|
+
var $cd231e464c886c86$export$9e6f19dc21f22f2e;
|
134
|
+
var $cd231e464c886c86$export$7c47642c7d46f3c9;
|
135
|
+
var $cd231e464c886c86$export$885efcc08143a987;
|
136
|
+
var $cd231e464c886c86$export$f6d480ae1e56eba0;
|
137
|
+
var $cd231e464c886c86$export$a4ea780a9064d7f9;
|
138
|
+
var $cd231e464c886c86$export$3ab8a3dc7f0563d;
|
139
|
+
var $cd231e464c886c86$export$f58a1e966a92ba5e;
|
140
|
+
var $cd231e464c886c86$export$2963225c91179589;
|
141
|
+
var $cd231e464c886c86$export$127df0b7290eb8ef;
|
142
|
+
var $cd231e464c886c86$export$94d2bcc94afabd89;
|
143
|
+
var $cd231e464c886c86$export$7f44db659563c8f4;
|
144
|
+
var $cd231e464c886c86$export$11b8bc81fe551057;
|
145
|
+
var $cd231e464c886c86$export$51ec27881a1e3928;
|
146
|
+
var $cd231e464c886c86$export$d35bc1e505d1ebbf;
|
147
|
+
$cd231e464c886c86$export$493d18e796ae054 = "spectrum-FieldLabel_d2db1f";
|
148
|
+
$cd231e464c886c86$export$9e6f19dc21f22f2e = "spectrum-FieldLabel--positionSide_d2db1f";
|
149
|
+
$cd231e464c886c86$export$7c47642c7d46f3c9 = "spectrum-FieldLabel-requiredIcon_d2db1f";
|
150
|
+
$cd231e464c886c86$export$885efcc08143a987 = "spectrum-FieldLabel--alignEnd_d2db1f";
|
151
|
+
$cd231e464c886c86$export$f6d480ae1e56eba0 = "spectrum-Field_d2db1f";
|
152
|
+
$cd231e464c886c86$export$a4ea780a9064d7f9 = "spectrum-Field--positionTop_d2db1f";
|
153
|
+
$cd231e464c886c86$export$3ab8a3dc7f0563d = "spectrum-Field-field_d2db1f";
|
154
|
+
$cd231e464c886c86$export$f58a1e966a92ba5e = "spectrum-Field-field--multiline_d2db1f";
|
155
|
+
$cd231e464c886c86$export$2963225c91179589 = "spectrum-Field--positionSide_d2db1f";
|
156
|
+
$cd231e464c886c86$export$127df0b7290eb8ef = "spectrum-Field-wrapper_d2db1f";
|
157
|
+
$cd231e464c886c86$export$94d2bcc94afabd89 = "spectrum-Form_d2db1f";
|
158
|
+
$cd231e464c886c86$export$7f44db659563c8f4 = "spectrum-Form--positionSide_d2db1f";
|
159
|
+
$cd231e464c886c86$export$11b8bc81fe551057 = "spectrum-Form--positionTop_d2db1f";
|
160
|
+
$cd231e464c886c86$export$51ec27881a1e3928 = "spectrum-Form-itemLabel_d2db1f";
|
161
|
+
$cd231e464c886c86$export$d35bc1e505d1ebbf = "is-disabled_d2db1f";
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
var $4cb2b26710154c56$exports = {};
|
167
|
+
|
168
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup", () => $4cb2b26710154c56$export$75eb16cbfc18279c, (v) => $4cb2b26710154c56$export$75eb16cbfc18279c = v);
|
169
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup--positionSide", () => $4cb2b26710154c56$export$859b606bd9f45f81, (v) => $4cb2b26710154c56$export$859b606bd9f45f81 = v);
|
170
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup-group", () => $4cb2b26710154c56$export$984c7bbbfc7ddffc, (v) => $4cb2b26710154c56$export$984c7bbbfc7ddffc = v);
|
171
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup-group--horizontal", () => $4cb2b26710154c56$export$1ad8646bcba21c0e, (v) => $4cb2b26710154c56$export$1ad8646bcba21c0e = v);
|
172
|
+
var $4cb2b26710154c56$export$75eb16cbfc18279c;
|
173
|
+
var $4cb2b26710154c56$export$859b606bd9f45f81;
|
174
|
+
var $4cb2b26710154c56$export$984c7bbbfc7ddffc;
|
175
|
+
var $4cb2b26710154c56$export$1ad8646bcba21c0e;
|
176
|
+
$4cb2b26710154c56$export$75eb16cbfc18279c = "spectrum-FieldGroup_41d350";
|
177
|
+
$4cb2b26710154c56$export$859b606bd9f45f81 = "spectrum-FieldGroup--positionSide_41d350";
|
178
|
+
$4cb2b26710154c56$export$984c7bbbfc7ddffc = "spectrum-FieldGroup-group_41d350";
|
179
|
+
$4cb2b26710154c56$export$1ad8646bcba21c0e = "spectrum-FieldGroup-group--horizontal_41d350";
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
function $ac9b96486fc4badf$var$RadioGroup(props, ref) {
|
187
|
+
props = $4hD9r$useProviderProps(props);
|
188
|
+
props = $4hD9r$useFormProps(props);
|
189
|
+
let { isEmphasized: isEmphasized , isRequired: isRequired , necessityIndicator: necessityIndicator , label: label , labelPosition: labelPosition = 'top' , labelAlign: labelAlign , validationState: validationState , children: children , orientation: orientation = 'vertical' , ...otherProps } = props;
|
190
|
+
let domRef = $4hD9r$useDOMRef(ref);
|
191
|
+
let { styleProps: styleProps } = $4hD9r$useStyleProps(otherProps);
|
192
|
+
let state = $4hD9r$useRadioGroupState(props);
|
193
|
+
let { radioGroupProps: radioGroupProps , labelProps: labelProps } = $4hD9r$useRadioGroup(props, state);
|
194
|
+
return(/*#__PURE__*/ $4hD9r$react.createElement("div", {
|
195
|
+
...styleProps,
|
196
|
+
...radioGroupProps,
|
197
|
+
className: $4hD9r$classNames((/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports)), 'spectrum-FieldGroup', {
|
198
|
+
'spectrum-FieldGroup--positionSide': labelPosition === 'side'
|
199
|
+
}, // This is so radio works inside a <Form>
|
200
|
+
$4hD9r$classNames((/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports)), 'spectrum-Field'), styleProps.className),
|
201
|
+
ref: domRef
|
202
|
+
}, label && /*#__PURE__*/ $4hD9r$react.createElement($4hD9r$Label, {
|
203
|
+
...labelProps,
|
204
|
+
elementType: "span",
|
205
|
+
labelPosition: labelPosition,
|
206
|
+
labelAlign: labelAlign,
|
207
|
+
isRequired: isRequired,
|
208
|
+
necessityIndicator: necessityIndicator
|
209
|
+
}, label), /*#__PURE__*/ $4hD9r$react.createElement("div", {
|
210
|
+
className: $4hD9r$classNames((/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports)), 'spectrum-FieldGroup-group', {
|
211
|
+
'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'
|
212
|
+
})
|
213
|
+
}, /*#__PURE__*/ $4hD9r$react.createElement($f394bff9e10389a0$export$b118023277d4a5c3.Provider, {
|
214
|
+
value: {
|
215
|
+
isEmphasized: isEmphasized,
|
216
|
+
validationState: validationState,
|
217
|
+
state: state
|
218
|
+
}
|
219
|
+
}, children))));
|
178
220
|
}
|
179
221
|
/**
|
180
222
|
* Radio groups allow users to select a single option from a list of mutually exclusive options.
|
181
223
|
* All possible options are exposed up front for users to compare.
|
182
|
-
*/
|
224
|
+
*/ const $ac9b96486fc4badf$export$a98f0dcb43a68a25 = /*#__PURE__*/ $4hD9r$react.forwardRef($ac9b96486fc4badf$var$RadioGroup);
|
225
|
+
|
226
|
+
|
183
227
|
|
184
228
|
|
185
|
-
export
|
229
|
+
export {$337c5cb580c4e6ba$export$d7b12c4107be0d61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AAkB,EAAEC;AANtB,MAOGC,KAPH,CApBJ,eA8BE;AACE,IAAA,SAAS,EACPT,UAAU,kDAER,2BAFQ,EAGR;AACE,+CAAyCY,WAAW,KAAK;AAD3D,KAHQ;AAFd,kBAUE,0EAAc,QAAd;AACE,IAAA,KAAK,EAAE;AACLjB,MAAAA,YADK;AAELC,MAAAA,eAFK;AAGLC,MAAAA;AAHK;AADT,KAMGf,QANH,CAVF,CA9BF,CADF;AAoDD;AAED;;;;;;OAIA,MAAMmC,UAAW,gBAAG3C,MAAK,CAAC6B,UAAN,CAAiBC,2CAAjB,CAApB","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/radio/vars.css","./packages/@react-spectrum/radio/src/context.ts","./packages/@react-spectrum/radio/src/Radio.tsx","./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/vars.css","./node_modules/@adobe/spectrum-css-temp/components/fieldgroup/vars.css","./packages/@react-spectrum/radio/src/RadioGroup.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RadioGroupState} from '@react-stately/radio';\nimport React, {useContext} from 'react';\n\ninterface RadioGroupContext {\n isEmphasized?: boolean,\n name?: string,\n validationState?: 'valid' | 'invalid',\n state: RadioGroupState\n}\n\nexport const RadioContext = React.createContext<RadioGroupContext | null>(null);\n\nexport function useRadioProvider(): RadioGroupContext {\n return useContext(RadioContext);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumRadioProps} from '@react-types/radio';\nimport styles from '@adobe/spectrum-css-temp/components/radio/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useRadio} from '@react-aria/radio';\nimport {useRadioProvider} from './context';\n\nfunction Radio(props: SpectrumRadioProps, ref: FocusableRef<HTMLLabelElement>) {\n let {\n isDisabled,\n children,\n autoFocus,\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 let radioGroupProps = useRadioProvider();\n let {\n isEmphasized,\n validationState,\n state\n } = radioGroupProps;\n\n let {inputProps} = useRadio({\n ...props,\n ...radioGroupProps,\n isDisabled\n }, state, inputRef);\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Radio',\n {\n // Removing. Pending design feedback.\n // 'spectrum-Radio--labelBelow': labelPosition === 'bottom',\n 'spectrum-Radio--quiet': !isEmphasized,\n 'is-disabled': isDisabled,\n 'is-invalid': validationState === 'invalid',\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-Radio-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-Radio-button')} />\n {children && (\n <span className={classNames(styles, 'spectrum-Radio-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n\n/**\n * Radio buttons allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _Radio = forwardRef(Radio);\nexport {_Radio as Radio};\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","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, 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 {RadioContext} from './context';\nimport React from 'react';\nimport {SpectrumRadioGroupProps} from '@react-types/radio';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useRadioGroup} from '@react-aria/radio';\nimport {useRadioGroupState} from '@react-stately/radio';\n\nfunction RadioGroup(props: SpectrumRadioGroupProps, 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 validationState,\n children,\n orientation = 'vertical',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n let state = useRadioGroupState(props);\n let {radioGroupProps, labelProps} = useRadioGroup(props, state);\n\n return (\n <div\n {...styleProps}\n {...radioGroupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup',\n {\n 'spectrum-FieldGroup--positionSide': labelPosition === 'side'\n },\n // This is so radio 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 {label}\n </Label>\n }\n <div\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup-group',\n {\n 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n }\n )\n }>\n <RadioContext.Provider\n value={{\n isEmphasized,\n validationState,\n state\n }}>\n {children}\n </RadioContext.Provider>\n </div>\n </div>\n );\n}\n\n/**\n * Radio groups allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _RadioGroup = React.forwardRef(RadioGroup);\nexport {_RadioGroup as RadioGroup};\n"],"names":["$parcel$interopDefault","a","__esModule","default","RadioContext","React","createContext","useRadioProvider","useContext","Radio","props","ref","isDisabled","children","autoFocus","otherProps","styleProps","useStyleProps","hoverProps","isHovered","useHover","inputRef","useRef","domRef","useFocusableRef","radioGroupProps","isEmphasized","validationState","state","inputProps","useRadio","classNames","className","_Radio","forwardRef","RadioGroup","useProviderProps","useFormProps","isRequired","necessityIndicator","label","labelPosition","labelAlign","orientation","useDOMRef","useRadioGroupState","labelProps","useRadioGroup","_RadioGroup"],"version":3,"file":"module.js.map"}
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAgC;AAChC,GAAsC;AACtC,GAAuC;AACvC,GAA4B;AAC5B,GAAsC;AACtC,GAA4C;AAC5C,GAA4B;AAC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AM;QAClB,aAAa,EAAE,aAAa;QAC5B,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,kBAAkB,EAAE,kBAAkB;OACrC,KAAK,4CAGT,CAAG;QACF,SAAS,EACP,iBAAU,CACR,gEAAM,EACN,CAA2B,4BAC3B,CAAC;YACC,CAAuC,wCAAE,WAAW,KAAK,CAAY;QACvE,CAAC;gDAGJ,yCAAY,CAAC,QAAQ;QACpB,KAAK,EAAE,CAAC;0BACN,YAAY;6BACZ,eAAe;mBACf,KAAK;QACP,CAAC;OACA,QAAQ;AAKnB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,KAAK,CAAC,yCAAW,iBAAG,YAAK,CAAC,UAAU,CAAC,gCAAU;;","sources":["packages/@react-spectrum/radio/src/index.ts","packages/@react-spectrum/radio/src/Radio.tsx","packages/@adobe/spectrum-css-temp/components/radio/vars.css","packages/@react-spectrum/radio/src/context.ts","packages/@react-spectrum/radio/src/RadioGroup.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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Radio';\nexport * from './RadioGroup';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumRadioProps} from '@react-types/radio';\nimport styles from '@adobe/spectrum-css-temp/components/radio/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useRadio} from '@react-aria/radio';\nimport {useRadioProvider} from './context';\n\nfunction Radio(props: SpectrumRadioProps, ref: FocusableRef<HTMLLabelElement>) {\n let {\n isDisabled,\n children,\n autoFocus,\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 let radioGroupProps = useRadioProvider();\n let {\n isEmphasized,\n validationState,\n state\n } = radioGroupProps;\n\n let {inputProps} = useRadio({\n ...props,\n ...radioGroupProps,\n isDisabled\n }, state, inputRef);\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Radio',\n {\n // Removing. Pending design feedback.\n // 'spectrum-Radio--labelBelow': labelPosition === 'bottom',\n 'spectrum-Radio--quiet': !isEmphasized,\n 'is-disabled': isDisabled,\n 'is-invalid': validationState === 'invalid',\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-Radio-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-Radio-button')} />\n {children && (\n <span className={classNames(styles, 'spectrum-Radio-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n\n/**\n * Radio buttons allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _Radio = forwardRef(Radio);\nexport {_Radio as Radio};\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 {RadioGroupState} from '@react-stately/radio';\nimport React, {useContext} from 'react';\n\ninterface RadioGroupContext {\n isEmphasized?: boolean,\n name?: string,\n validationState?: 'valid' | 'invalid',\n state: RadioGroupState\n}\n\nexport const RadioContext = React.createContext<RadioGroupContext | null>(null);\n\nexport function useRadioProvider(): RadioGroupContext {\n return useContext(RadioContext);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\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 {RadioContext} from './context';\nimport React from 'react';\nimport {SpectrumRadioGroupProps} from '@react-types/radio';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useRadioGroup} from '@react-aria/radio';\nimport {useRadioGroupState} from '@react-stately/radio';\n\nfunction RadioGroup(props: SpectrumRadioGroupProps, 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 validationState,\n children,\n orientation = 'vertical',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n let state = useRadioGroupState(props);\n let {radioGroupProps, labelProps} = useRadioGroup(props, state);\n\n return (\n <div\n {...styleProps}\n {...radioGroupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup',\n {\n 'spectrum-FieldGroup--positionSide': labelPosition === 'side'\n },\n // This is so radio 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 {label}\n </Label>\n }\n <div\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup-group',\n {\n 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n }\n )\n }>\n <RadioContext.Provider\n value={{\n isEmphasized,\n validationState,\n state\n }}>\n {children}\n </RadioContext.Provider>\n </div>\n </div>\n );\n}\n\n/**\n * Radio groups allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _RadioGroup = React.forwardRef(RadioGroup);\nexport {_RadioGroup as RadioGroup};\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"}
|
package/dist/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"mappings":"
|
1
|
+
{"mappings":";;ACoFA;;;GAGG;AACH,OAAA,MAAM,qKAA0B,CAAC;ACYjC;;;GAGG;AACH,OAAA,MAAM,qJAA0C,CAAC","sources":["packages/@react-spectrum/radio/src/packages/@react-spectrum/radio/src/context.ts","packages/@react-spectrum/radio/src/packages/@react-spectrum/radio/src/Radio.tsx","packages/@react-spectrum/radio/src/packages/@react-spectrum/radio/src/RadioGroup.tsx","packages/@react-spectrum/radio/src/packages/@react-spectrum/radio/src/index.ts","packages/@react-spectrum/radio/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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Radio';\nexport * from './RadioGroup';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-spectrum/radio",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.8",
|
4
4
|
"description": "Spectrum UI components in React",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "dist/main.js",
|
@@ -32,15 +32,15 @@
|
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
34
|
"@babel/runtime": "^7.6.2",
|
35
|
-
"@react-aria/focus": "^3.
|
36
|
-
"@react-aria/interactions": "^3.
|
37
|
-
"@react-aria/radio": "^3.1.
|
38
|
-
"@react-spectrum/form": "^3.2.
|
39
|
-
"@react-spectrum/label": "^3.4.
|
40
|
-
"@react-spectrum/utils": "^3.6.
|
41
|
-
"@react-stately/radio": "^3.3.
|
42
|
-
"@react-types/radio": "^3.1.
|
43
|
-
"@react-types/shared": "^3.
|
35
|
+
"@react-aria/focus": "^3.5.3",
|
36
|
+
"@react-aria/interactions": "^3.8.2",
|
37
|
+
"@react-aria/radio": "^3.1.9",
|
38
|
+
"@react-spectrum/form": "^3.2.7",
|
39
|
+
"@react-spectrum/label": "^3.4.4",
|
40
|
+
"@react-spectrum/utils": "^3.6.6",
|
41
|
+
"@react-stately/radio": "^3.3.5",
|
42
|
+
"@react-types/radio": "^3.1.5",
|
43
|
+
"@react-types/shared": "^3.11.2"
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
46
|
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
@@ -52,5 +52,5 @@
|
|
52
52
|
"publishConfig": {
|
53
53
|
"access": "public"
|
54
54
|
},
|
55
|
-
"gitHead": "
|
55
|
+
"gitHead": "ed8d8d984c2f7f2c31e8b18795b97858a95e4729"
|
56
56
|
}
|
package/dist/main.css.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"mappings":"AA8BA,iCASE,gEAKF,CAdA,iCASE,+DAKF,CAdA,uBACE,0BAAoB,CAApB,mBAAoB,CACpB,oBAAuB,CAAvB,sBAAuB,CAEvB,iBAAkB,CAElB,oDAA4C,CAC5C,cAAqB,CAIrB,kBAAmB,CAEnB,iBACF,CAEA,uCAqBE,yDA0BF,CA/CA,uCAqBE,0DA0BF,CA/CA,6BAEE,mBAAoB,CACpB,cAAe,CACf,gBAAiB,CAGjB,QAAS,CAGT,gBAAiB,CAGjB,qBAAsB,CAGtB,SAAU,CAGV,iBAAkB,CAClB,KAAoB,CAEpB,gEAAgE,CAChE,WAAgB,CAEhB,aAAc,CACd,SAAU,CAEV,cAmBF,CAjBE,sCACE,cACF,CAGE,0EACE,2HACF,CAKE,mFACE,sEACF,CAKN,uCACE,eAOF,CARA,uCACE,gBAOF,CARA,uCAEE,qDAMF,CARA,uCAEE,sDAMF,CARA,6BAIE,mDAA0D,CAC1D,gGAA0C,CAC1C,gBAAoD,CACpD,iCACF,CAEA,8BACE,iBAAkB,CAMlB,0GAA0F,CAE1F,mBAAY,CAAZ,WAAY,CACZ,mBAAc,CAAd,aAkCF,CAjCE,mEATA,qBAAsB,CACtB,+CAAkD,CAClD,gDAuBA,CAhBA,qCACE,aAAc,CACd,SAAU,CACV,UAAW,CAEX,iBAAkB,CAKlB,iEAA2C,CAC3C,oGAAsD,CACtD,kBAAmB,CAEnB,8DAEF,CAEA,oCACE,kBAAmB,CACnB,UAAW,CACX,aAAc,CACd,iBAAkB,CAClB,MAAO,CACP,OAAQ,CACR,QAAS,CACT,KAAM,CACN,0DAA4C,CAC5C,uBAAwB,CAExB,wDAEF,CAGF,mCACE,0BAAoB,CAApB,mBAAoB,CACpB,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ACF,CAEA,kGACE,iBAAc,CAAd,aACF,CAKF,2DACE,0BAAoB,CAApB,mBAAoB,CACpB,oBAAuB,CAAvB,sBA2BF,CAxBE,0FACE,UAAO,CAAP,MAAO,CAGP,WAAY,CAIZ,yCAMF,CAJE,uHAEE,UACF,CAGF,wFACE,UAAO,CAAP,MAAO,CACP,WACF,CAEA,mGACE,WACF,CAWF,mEAKE,eAoBF,CAzBA,mEAKE,gBAoBF,CAzBA,yDACE,aAAc,CACd,uBAAyB,CACzB,0DAAwD,CACxD,6DAqBF,CAlBE,gFACE,iBAAkB,CAClB,UACF,CAEA,qFACE,kBACF,CAEA,wFACE,UACF,CAEA,sFACE,kBAAmB,CACnB,UAAW,CACX,oDACF,CAIF,wDACE,mBAAa,CAAb,YAAa,CACb,yBAAsB,CAAtB,qBAAsB,CACtB,QAAS,CACT,oDASF,CAJE,0DACE,oDAA6C,CAC7C,UACF,CCvJJ,4DAEE,kFASF,CAJI,sRACE,qFACF,CAGJ,yCACE,2CACF,CCZA,4BACE,mBAAa,CAAb,YAAa,CACb,yBAAsB,CAAtB,qBACF,CAEA,0CACE,sBAAmB,CAAnB,kBACF,CAEA,kCACE,mBAAa,CAAb,YAAa,CACb,yBAAsB,CAAtB,qBACF,CAEA,8CAEE,sBAAmB,CAAnB,kBAAmB,CACnB,kBAAe,CAAf,cACF","sources":["./node_modules/@adobe/spectrum-css-temp/components/radio/index.css","./node_modules/@adobe/spectrum-css-temp/components/radio/skin.css","./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/index.css","./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/skin.css","./node_modules/@adobe/spectrum-css-temp/components/fieldgroup/index.css"],"sourcesContent":["/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n\n:root {\n --spectrum-radio-radius: calc(var(--spectrum-radio-circle-diameter) / 2);\n --spectrum-radio-border-width-checked: calc(calc(var(--spectrum-radio-circle-diameter) / 2) - calc(var(--spectrum-radio-circle-dot-size) / 2));\n\n --spectrum-radio-labelbelow-label-margin: var(--spectrum-global-dimension-size-40) 0 0 0;\n --spectrum-radio-labelbelow-height: auto;\n\n /* Hardcoded for wrapping study.\n Will be a DNA token in https://jira.corp.adobe.com/browse/SDS-4466 */\n --spectrum-radio-label-margin-top: var(--spectrum-global-dimension-size-65);\n\n /* Fix for inconsistent line-height between browsers that would push the label 1px below the intended baseline */\n /* more info: https://stackoverflow.com/questions/47700568/css-fonts-render-differently-in-firefox-and-chrome */\n --spectrum-radio-label-line-height: 1.49;\n}\n\n.spectrum-Radio {\n display: inline-flex;\n align-items: flex-start;\n\n position: relative;\n\n min-block-size: var(--spectrum-radio-height);\n max-inline-size: 100%;\n\n margin-inline-end: calc(var(--spectrum-radio-cursor-hit-x) * 2);\n\n vertical-align: top;\n\n isolation: isolate;\n}\n\n.spectrum-Radio-input {\n /* Change the font styles in all browsers for input. */\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n\n /* Remove the margin for input in Firefox and Safari. */\n margin: 0;\n\n /* Show the overflow for input in Edge. */\n overflow: visible;\n\n /* Add the correct box sizing for [type=\"radio\"] in IE 10-. */\n box-sizing: border-box;\n\n /* Remove the padding for [type=\"radio\"] in IE 10-. */\n padding: 0;\n\n /* Hit area */\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: calc(var(--spectrum-radio-cursor-hit-x) * -1);\n inline-size: calc(100% + var(--spectrum-radio-cursor-hit-x) * 2);\n block-size: 100%;\n\n opacity: .0001;\n z-index: 1;\n\n cursor: default;\n\n &:disabled {\n cursor: default;\n }\n\n &:checked + .spectrum-Radio-button {\n &:before {\n border-width: var(--spectrum-radio-border-width-checked);\n }\n }\n\n &:focus-ring {\n + .spectrum-Radio-button {\n &:after {\n margin: calc(var(--spectrum-alias-focus-ring-gap) * -1);\n }\n }\n }\n}\n\n.spectrum-Radio-label {\n text-align: start;\n margin-inline-start: var(--spectrum-radio-text-gap);\n /* Hardcoded as no good way to calculate this */\n margin-block-start: var(--spectrum-radio-label-margin-top);\n font-size: var(--spectrum-radio-text-size);\n line-height: var(--spectrum-radio-label-line-height);\n transition: color var(--spectrum-global-animation-duration-100) ease-in-out;\n}\n\n.spectrum-Radio-button {\n position: relative;\n box-sizing: border-box;\n inline-size: var(--spectrum-radio-circle-diameter);\n block-size: var(--spectrum-radio-circle-diameter);\n\n /* Fix vertical alignment when not wrapping since we're flex-start */\n margin: calc((var(--spectrum-radio-height) - var(--spectrum-radio-circle-diameter)) / 2) 0;\n\n flex-grow: 0;\n flex-shrink: 0;\n &:before {\n display: block;\n z-index: 0;\n content: '';\n box-sizing: border-box;\n position: absolute;\n\n width: var(--spectrum-radio-circle-diameter);\n height: var(--spectrum-radio-circle-diameter);\n\n border-radius: var(--spectrum-radio-radius);\n border-width: var(--spectrum-radio-circle-border-size);\n border-style: solid;\n\n transition: border var(--spectrum-global-animation-duration-100) ease-in-out,\n box-shadow var(--spectrum-global-animation-duration-100) ease-in-out;\n }\n\n &:after {\n border-radius: 100%;\n content: '';\n display: block;\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n margin: var(--spectrum-alias-focus-ring-gap);\n transform: translateX(0); /* Forces FF to render on the pixel grid */\n\n transition: box-shadow var(--spectrum-global-animation-duration-100) ease-out,\n margin var(--spectrum-global-animation-duration-100) ease-out;\n }\n}\n\n.spectrum-Radio--labelBelow {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n block-size: var(--spectrum-radio-labelbelow-height);\n\n .spectrum-Radio-button {\n flex-shrink: 0;\n\n margin: 0;\n }\n\n .spectrum-Radio-label {\n margin: var(--spectrum-radio-labelbelow-label-margin);\n }\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n:root {\n /* todo: fix in DNA */\n --spectrum-radio-emphasized-circle-border-color-selected-key-focus: var(--spectrum-radio-emphasized-circle-border-color-selected-hover);\n\n}\n\n.spectrum-Radio .spectrum-Radio-input {\n &:checked + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-emphasized-circle-border-color-selected);\n }\n }\n}\n\n.spectrum-Radio-label {\n color: var(--spectrum-radio-emphasized-text-color);\n}\n\n.spectrum-Radio-button {\n &:before {\n background-color: var(--spectrum-radio-emphasized-circle-background-color);\n border-color: var(--spectrum-radio-emphasized-circle-border-color);\n }\n}\n\n.spectrum-Radio {\n &:hover {\n .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-emphasized-circle-border-color-hover);\n box-shadow: none;\n }\n }\n\n .spectrum-Radio-input:checked + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-emphasized-circle-border-color-selected-hover);\n }\n }\n\n .spectrum-Radio-label {\n color: var(--spectrum-radio-emphasized-text-color-hover);\n }\n }\n\n &:active {\n .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-emphasized-circle-border-color-down);\n }\n }\n\n .spectrum-Radio-input:checked + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-emphasized-circle-border-color-selected-down);\n }\n }\n\n .spectrum-Radio-label {\n color: var(--spectrum-radio-emphasized-text-color-down);\n }\n }\n & .spectrum-Radio-input:focus-ring,\n &:hover .spectrum-Radio-input:focus-ring {\n &:checked + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-emphasized-circle-border-color-selected-key-focus);\n }\n }\n }\n}\n\n.spectrum-Radio--quiet {\n .spectrum-Radio-input:checked + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-quiet-circle-border-color-selected);\n }\n }\n &:hover {\n .spectrum-Radio-input:checked + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-quiet-circle-border-color-selected-hover);\n }\n }\n }\n &:active {\n .spectrum-Radio-input:checked + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-quiet-circle-border-color-selected-down);\n }\n }\n }\n & .spectrum-Radio-input:focus-ring,\n &:hover .spectrum-Radio-input:focus-ring {\n &:checked + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-quiet-circle-border-color-selected-key-focus);\n }\n }\n }\n}\n\n\n.spectrum-Radio, .spectrum-Radio--quiet {\n &.is-invalid {\n .spectrum-Radio-button,\n .spectrum-Radio-input:checked + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-emphasized-circle-border-color-error);\n }\n }\n .spectrum-Radio-label {\n color: var(--spectrum-radio-emphasized-circle-border-color-error);\n }\n }\n &.is-invalid:hover {\n .spectrum-Radio-input + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-emphasized-circle-border-color-error-hover);\n }\n }\n .spectrum-Radio-label {\n color: var(--spectrum-radio-emphasized-circle-border-color-error-hover);\n }\n }\n &.is-invalid:active {\n .spectrum-Radio-input + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-emphasized-circle-border-color-error-down);\n }\n }\n .spectrum-Radio-label {\n color: var(--spectrum-radio-emphasized-circle-border-color-error-down);\n }\n }\n &.is-invalid .spectrum-Radio-input:focus-ring,\n &.is-invalid:hover .spectrum-Radio-input:focus-ring {\n &:not(:checked) + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-circle-border-color-error-key-focus);\n }\n }\n &:checked + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-circle-border-color-error-selected-key-focus);\n }\n }\n }\n}\n\n.spectrum-Radio-input {\n &:disabled + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-emphasized-circle-border-color-disabled) !important;\n }\n }\n\n &:disabled ~ .spectrum-Radio-label {\n color: var(--spectrum-radio-emphasized-text-color-disabled) !important;\n }\n}\n\n/* Focus Overrides all */\n/* Removed :before so that border-color isn't overwritten by keyboard focus */\n.spectrum-Radio,\n.spectrum-Radio--quiet {\n & .spectrum-Radio-input:focus-ring,\n &:hover .spectrum-Radio-input:focus-ring {\n &:not(:checked) + .spectrum-Radio-button {\n &:before {\n border-color: var(--spectrum-radio-circle-border-color-key-focus);\n }\n }\n & + .spectrum-Radio-button {\n &:after {\n box-shadow: 0 0 0 var(--spectrum-radio-focus-ring-size-key-focus) var(--spectrum-radio-focus-ring-color-key-focus);\n }\n }\n }\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n\n:root {\n --spectrum-tableform-border-spacing: 0 var(--spectrum-global-dimension-size-300);\n --spectrum-tableform-margin: calc(var(--spectrum-global-dimension-size-250) * -1) 0;\n --spectrum-fieldlabel-margin: var(--spectrum-global-dimension-size-100);\n}\n\n.spectrum-FieldLabel {\n display: flex;\n flex: 0 0 auto;\n\n box-sizing: border-box;\n\n padding: var(--spectrum-fieldlabel-padding-top) 0 var(--spectrum-fieldlabel-padding-bottom);\n\n font-size: var(--spectrum-fieldlabel-text-size);\n font-weight: var(--spectrum-fieldlabel-text-font-weight);\n line-height: var(--spectrum-fieldlabel-text-line-height);\n\n vertical-align: top;\n\n -webkit-font-smoothing: subpixel-antialiased;\n -moz-osx-font-smoothing: auto;\n font-smoothing: subpixel-antialiased;\n text-align: start;\n\n cursor: default; /* match native labels even if not using a <label> element */\n}\n\n.spectrum-FieldLabel--positionSide {\n display: inline-flex;\n padding-top: var(--spectrum-fieldlabel-side-padding-top);\n padding-inline-end: var(--spectrum-fieldlabel-side-padding-x);\n}\n\n.spectrum-FieldLabel-requiredIcon {\n margin-top: var(--spectrum-fieldlabel-asterisk-margin-y);\n margin-inline-end: 0;\n margin-bottom: 0;\n margin-inline-start: var(--spectrum-fieldlabel-asterisk-gap);\n}\n\n.spectrum-FieldLabel--alignEnd {\n justify-content: flex-end; /* labelPosition=top case */\n text-align: end; /* labelPosition=side case */\n}\n\n/* A Field is a wrapper for a FieldLabel, a field component (e.g. textfield), and a HelpText.\n * By default, labels are placed above the field. Fields have a default width, and the\n * label will wrap within this width. The width of the whole field can be overridden by the user,\n * and this causes both the label and inner field to resize as well. */\n.spectrum-Field {\n --spectrum-field-default-width: var(--spectrum-component-single-line-width);\n\n &.spectrum-Field--positionTop {\n display: inline-flex;\n flex-direction: column;\n width: var(--spectrum-field-default-width);\n\n .spectrum-Field-field {\n /* If the user overrides the width of the field, propagate to the inner component */\n width: 100%;\n }\n\n .spectrum-Field-field--multiline {\n flex: 1 1 auto;\n }\n }\n\n /* The side label variant of Field is inline, and fills as much space as needed\n * by default. If an explicit width is set, then the field flexes to fill available space. */\n &.spectrum-Field--positionSide {\n display: inline-flex;\n align-items: flex-start;\n\n /* Wraps the field & help text, but not the label */\n .spectrum-Field-wrapper {\n flex: 1;\n /* Setting `flex: 1;` is equivalent to `flex: 1 1 0;`, which means we expect to be able to shrink\n * To be able to shrink, we must have a min-width that isn't 'auto' */\n min-width: 0;\n /* TODO: By default, vertical flex wrapper for `labelPosition: side` should have default field width.\n * This is a workaround until we find a better way to set the width of the field & help text.\n * Should default to form field's default width and and allow users to override with custom width. */\n width: var(--spectrum-field-default-width);\n\n .spectrum-Field-field {\n /* If the user overrides the width of the field, propagate to the inner component */\n width: 100%;\n }\n }\n\n .spectrum-Field-field {\n flex: 1;\n min-width: 0;\n }\n\n .spectrum-Field-field--multiline {\n height: 100%;\n }\n }\n}\n\n/* topdoc\n{{ form/index.yml }}\n*/\n\n.spectrum-Form {\n /* With labelPosition=side, we override field layout to use a CSS table\n * so that all the labels and fields line up automatically. */\n &.spectrum-Form--positionSide {\n display: table;\n border-collapse: separate;\n border-spacing: var(--spectrum-tableform-border-spacing);\n margin: var(--spectrum-tableform-margin);\n text-align: start;\n\n .spectrum-Field {\n display: table-row;\n width: 100%;\n }\n\n .spectrum-FieldLabel {\n display: table-cell;\n }\n\n .spectrum-Field-wrapper {\n width: 100%;\n }\n\n .spectrum-Field-field {\n display: table-cell;\n width: auto;\n min-width: var(--spectrum-component-single-line-width);\n }\n }\n\n /* With labelPosition=top, we use a normal flex stack */\n &.spectrum-Form--positionTop {\n display: flex;\n flex-direction: column;\n margin: 0;\n min-width: var(--spectrum-component-single-line-width);\n\n /* Users may want to make multiple fields appear next to each other.\n * We want to ensure that all items inside the form get the proper\n * margin and widths applied, even if wrapped in extra divs for example. */\n > * {\n margin-top: var(--spectrum-fieldlabel-margin);\n width: 100%;\n }\n }\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n.spectrum-FieldLabel,\n.spectrum-Form-itemLabel {\n color: var(--spectrum-fieldlabel-text-color);\n\n &.is-disabled {\n color: var(--spectrum-fieldlabel-text-color-disabled);\n\n .spectrum-FieldLabel-requiredIcon {\n color: var(--spectrum-fieldlabel-asterisk-color-disabled);\n }\n }\n}\n.spectrum-FieldLabel-requiredIcon {\n color: var(--spectrum-fieldlabel-asterisk-color);\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n\n.spectrum-FieldGroup {\n display: flex;\n flex-direction: column;\n}\n\n.spectrum-FieldGroup--positionSide {\n flex-direction: row;\n}\n\n.spectrum-FieldGroup-group {\n display: flex;\n flex-direction: column;\n}\n\n.spectrum-FieldGroup-group--horizontal {\n /* horizontal radio groups should wrap if there isn't enough space */\n flex-direction: row;\n flex-wrap: wrap;\n}\n"],"names":[],"version":3,"file":"main.css.map"}
|