@react-spectrum/textfield 3.0.0-nightly.1659 → 3.0.0-nightly.1668

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.css CHANGED
@@ -1 +1 @@
1
- .spectrum-Textfield-input_73bc77{font-family:adobe-clean-ux,adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum-Textfield-input_73bc77:lang(ar){font-family:adobe-arabic,myriad-arabic,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum-Textfield-input_73bc77:lang(he){font-family:adobe-hebrew,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum-Textfield-input_73bc77:lang(zh-Hans),.spectrum-Textfield-input_73bc77:lang(zh){font-family:adobe-clean-han-simplified-c,SimSun,Heiti SC Light,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum-Textfield-input_73bc77:lang(ko){font-family:adobe-clean-han-korean,Malgun Gothic,Apple Gothic,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum-Textfield-input_73bc77:lang(ja){font-family:adobe-clean-han-japanese,Yu Gothic,メイリオ,ヒラギノ角ゴ Pro W3,Hiragino Kaku Gothic Pro W3,Osaka,MSPゴシック,MS PGothic,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum-Textfield_73bc77{min-width:var(--spectrum-textfield-min-width,var(--spectrum-global-dimension-size-600));width:var(--spectrum-alias-single-line-width,var(--spectrum-global-dimension-size-2400));display:inline-flex;position:relative}.spectrum-Textfield_73bc77:not(.spectrum-Textfield--quiet_73bc77,.spectrum-Textfield--readonly_73bc77).spectrum-Textfield--multiline_73bc77 .spectrum-Textfield-input_73bc77:not(:disabled){resize:vertical}.spectrum-Textfield_73bc77.spectrum-Textfield--quiet_73bc77.spectrum-Textfield--multiline_73bc77 .spectrum-Textfield-input_73bc77,.spectrum-Textfield_73bc77.spectrum-Textfield--readonly_73bc77 .spectrum-Textfield-input_73bc77{height:var(--spectrum-textfield-height,var(--spectrum-alias-single-line-height));min-height:var(--spectrum-textfield-height,var(--spectrum-alias-single-line-height));overflow-x:hidden}.spectrum-Textfield-input_73bc77{box-sizing:border-box;border:var(--spectrum-textfield-border-size,var(--spectrum-alias-border-size-thin))solid;border-radius:var(--spectrum-textfield-border-radius,var(--spectrum-alias-border-radius-regular));padding:3px var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150))5px calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) - 1px);text-indent:0;width:100%;height:var(--spectrum-textfield-height,var(--spectrum-alias-single-line-height));vertical-align:top;font-size:var(--spectrum-textfield-text-size,var(--spectrum-alias-font-size-default));line-height:var(--spectrum-textfield-text-line-height,var(--spectrum-alias-body-text-line-height));text-overflow:ellipsis;transition:border-color var(--spectrum-global-animation-duration-100,130ms)ease-in-out,box-shadow var(--spectrum-global-animation-duration-100,130ms)ease-in-out;-webkit-appearance:none;-moz-appearance:textfield;outline:0;margin:0;overflow:visible}.spectrum-Textfield-input_73bc77::placeholder,.spectrum-Textfield-input_73bc77.is-placeholder_73bc77{font-weight:var(--spectrum-textfield-placeholder-text-font-weight,var(--spectrum-global-font-weight-regular));font-style:var(--spectrum-textfield-placeholder-text-font-style,var(--spectrum-global-font-style-italic));font-synthesis:none;transition:color var(--spectrum-global-animation-duration-100,130ms)ease-in-out;opacity:1}.spectrum-Textfield-input_73bc77::-moz-placeholder{font-weight:var(--spectrum-textfield-placeholder-text-font-weight,var(--spectrum-global-font-weight-regular));font-style:var(--spectrum-textfield-placeholder-text-font-style,var(--spectrum-global-font-style-italic));transition:color var(--spectrum-global-animation-duration-100,130ms)ease-in-out;opacity:1}.spectrum-Textfield-input_73bc77:lang(ja)::placeholder,.spectrum-Textfield-input_73bc77:lang(ja).is-placeholder_73bc77,.spectrum-Textfield-input_73bc77:lang(zh)::placeholder,.spectrum-Textfield-input_73bc77:lang(zh).is-placeholder_73bc77,.spectrum-Textfield-input_73bc77:lang(ko)::placeholder,.spectrum-Textfield-input_73bc77:lang(ko).is-placeholder_73bc77,.spectrum-Textfield-input_73bc77:lang(ar)::placeholder,.spectrum-Textfield-input_73bc77:lang(ar).is-placeholder_73bc77,.spectrum-Textfield-input_73bc77:lang(he)::placeholder,.spectrum-Textfield-input_73bc77:lang(he).is-placeholder_73bc77{font-style:normal}.spectrum-Textfield-input_73bc77:lang(ja)::-moz-placeholder,.spectrum-Textfield-input_73bc77:lang(zh)::-moz-placeholder,.spectrum-Textfield-input_73bc77:lang(ko)::-moz-placeholder,.spectrum-Textfield-input_73bc77:lang(ar)::-moz-placeholder,.spectrum-Textfield-input_73bc77:lang(he)::-moz-placeholder{font-style:normal}.spectrum-Textfield-input_73bc77.is-hovered_73bc77::placeholder{font-weight:var(--spectrum-textfield-placeholder-text-font-weight,var(--spectrum-global-font-weight-regular))}.spectrum-Textfield-input_73bc77:disabled{resize:none;opacity:1}.spectrum-Textfield-input_73bc77:disabled::placeholder,.spectrum-Textfield-input_73bc77:disabled.is-placeholder_73bc77{font-weight:var(--spectrum-textfield-placeholder-text-font-weight,var(--spectrum-global-font-weight-regular))}.spectrum-Textfield-input_73bc77::-ms-clear{width:0;height:0}.spectrum-Textfield-input_73bc77::-webkit-inner-spin-button,.spectrum-Textfield-input_73bc77::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.spectrum-Textfield-input_73bc77:-moz-ui-invalid{box-shadow:none}.spectrum-Textfield--multiline_73bc77 .spectrum-Textfield-input_73bc77{height:auto;min-height:var(--spectrum-global-dimension-size-700);padding:3px var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150))5px calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) - 1px);overflow:auto}[dir=ltr] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77{padding-left:var(--spectrum-textfield-quiet-padding-x,0)}[dir=rtl] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77,[dir=ltr] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77{padding-right:var(--spectrum-textfield-quiet-padding-x,0)}[dir=rtl] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77{padding-left:var(--spectrum-textfield-quiet-padding-x,0)}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77{border-width:0 0 var(--spectrum-textfield-quiet-border-size,var(--spectrum-alias-border-size-thin))0;resize:none;border-radius:0;overflow-y:hidden}[dir=ltr] .spectrum-Textfield--valid_73bc77 .spectrum-Textfield-input_73bc77{padding-right:calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-icon-margin-left,var(--spectrum-global-dimension-size-150)))}[dir=rtl] .spectrum-Textfield--valid_73bc77 .spectrum-Textfield-input_73bc77{padding-left:calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-icon-margin-left,var(--spectrum-global-dimension-size-150)))}[dir=ltr] .spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-input_73bc77{padding-right:calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-icon-margin-left,var(--spectrum-global-dimension-size-150)))}[dir=rtl] .spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-input_73bc77{padding-left:calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-icon-margin-left,var(--spectrum-global-dimension-size-150)))}[dir=ltr] .spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-input_73bc77{padding-right:calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-icon-margin-left,var(--spectrum-global-dimension-size-150)))}[dir=rtl] .spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-input_73bc77{padding-left:calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-icon-margin-left,var(--spectrum-global-dimension-size-150)))}[dir=ltr] .spectrum-Textfield-validationIcon_73bc77{padding-right:calc(var(--spectrum-global-dimension-size-150)/2)}[dir=rtl] .spectrum-Textfield-validationIcon_73bc77{padding-left:calc(var(--spectrum-global-dimension-size-150)/2)}.spectrum-Textfield-validationIcon_73bc77{pointer-events:all;transition:color var(--spectrum-global-animation-duration-100,130ms)ease-in-out;position:absolute}[dir=ltr] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-validationIcon_73bc77{padding-right:0}[dir=rtl] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-validationIcon_73bc77{padding-left:0}[dir=ltr] .spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-validationIcon_73bc77{right:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225))/2)}[dir=rtl] .spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-validationIcon_73bc77{left:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225))/2)}.spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-validationIcon_73bc77{width:var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225));height:var(--spectrum-icon-alert-medium-height,var(--spectrum-global-dimension-size-225));top:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-icon-alert-medium-height,var(--spectrum-global-dimension-size-225))/2)}[dir=ltr] .spectrum-Textfield--valid_73bc77 .spectrum-Textfield-validationIcon_73bc77{right:var(--spectrum-global-dimension-size-150)}[dir=rtl] .spectrum-Textfield--valid_73bc77 .spectrum-Textfield-validationIcon_73bc77{left:var(--spectrum-global-dimension-size-150)}.spectrum-Textfield--valid_73bc77 .spectrum-Textfield-validationIcon_73bc77{width:var(--spectrum-icon-checkmark-medium-width);height:var(--spectrum-icon-checkmark-medium-height);top:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-icon-checkmark-medium-height)/2)}[dir=ltr] .spectrum-Textfield-icon_73bc77{left:var(--spectrum-global-dimension-size-150)}[dir=rtl] .spectrum-Textfield-icon_73bc77{right:var(--spectrum-global-dimension-size-150)}.spectrum-Textfield-icon_73bc77{height:var(--spectrum-icon-info-medium-height,var(--spectrum-global-dimension-size-225));width:var(--spectrum-icon-info-medium-width,var(--spectrum-global-dimension-size-225));top:var(--spectrum-global-dimension-size-85);transition:fill var(--spectrum-global-animation-duration-100,130ms)ease-in-out;display:block;position:absolute}[dir=ltr] .spectrum-Textfield-inputIcon_73bc77{padding-left:calc(var(--spectrum-global-dimension-size-150) + var(--spectrum-global-dimension-size-225) + var(--spectrum-global-dimension-size-65))}[dir=rtl] .spectrum-Textfield-inputIcon_73bc77{padding-right:calc(var(--spectrum-global-dimension-size-150) + var(--spectrum-global-dimension-size-225) + var(--spectrum-global-dimension-size-65))}[dir=ltr] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-inputIcon_73bc77{padding-left:calc(var(--spectrum-global-dimension-size-100) + var(--spectrum-icon-info-medium-width,var(--spectrum-global-dimension-size-225)))}[dir=rtl] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-inputIcon_73bc77{padding-right:calc(var(--spectrum-global-dimension-size-100) + var(--spectrum-icon-info-medium-width,var(--spectrum-global-dimension-size-225)))}[dir=ltr] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-inputIcon_73bc77~.spectrum-Textfield-icon_73bc77{left:0}[dir=rtl] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-inputIcon_73bc77~.spectrum-Textfield-icon_73bc77{right:0}.spectrum-Textfield-inputIcon_73bc77.spectrum-Textfield--multiline_73bc77{height:var(--spectrum-textfield-height,var(--spectrum-alias-single-line-height));min-height:var(--spectrum-textfield-height,var(--spectrum-alias-single-line-height))}[dir=ltr] .spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-circleLoader_73bc77{right:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225))/2 + var(--spectrum-global-dimension-size-150)/2)}[dir=rtl] .spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-circleLoader_73bc77{left:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225))/2 + var(--spectrum-global-dimension-size-150)/2)}.spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-circleLoader_73bc77{top:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-loader-circle-small-width,var(--spectrum-global-dimension-static-size-200))/2);position:absolute}[dir=ltr] .spectrum-Textfield--quiet_73bc77.spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-circleLoader_73bc77{padding-right:0}[dir=rtl] .spectrum-Textfield--quiet_73bc77.spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-circleLoader_73bc77{padding-left:0}.spectrum-Textfield-input_73bc77{background-color:var(--spectrum-textfield-background-color,var(--spectrum-global-color-gray-50));border-color:var(--spectrum-textfield-border-color,var(--spectrum-alias-border-color));color:var(--spectrum-textfield-text-color,var(--spectrum-alias-text-color))}.spectrum-Textfield-input_73bc77::placeholder,.spectrum-Textfield-input_73bc77.is-placeholder_73bc77{color:var(--spectrum-textfield-placeholder-text-color,var(--spectrum-alias-placeholder-text-color))}.spectrum-Textfield-input_73bc77.is-hovered_73bc77{border-color:var(--spectrum-textfield-border-color-hover,var(--spectrum-alias-border-color-hover));box-shadow:none}.spectrum-Textfield-input_73bc77.is-hovered_73bc77::placeholder,.spectrum-Textfield-input_73bc77.is-hovered_73bc77.is-placeholder_73bc77{color:var(--spectrum-textfield-placeholder-text-color-hover,var(--spectrum-alias-placeholder-text-color-hover))}.spectrum-Textfield-input_73bc77.is-hovered_73bc77~.spectrum-Textfield-icon_73bc77{fill:var(--spectrum-textfield-icon-color-hover,var(--spectrum-global-color-gray-900))}.spectrum-Textfield-input_73bc77:active{background-color:var(--spectrum-textfield-background-color-down,var(--spectrum-global-color-gray-50));border-color:var(--spectrum-textfield-border-color-down,var(--spectrum-alias-border-color-mouse-focus));color:var(--spectrum-textfield-text-color-down,var(--spectrum-alias-text-color-down))}.spectrum-Textfield-input_73bc77:active::placeholder,.spectrum-Textfield-input_73bc77:active.is-placeholder_73bc77{color:var(--spectrum-textfield-placeholder-text-color-down,var(--spectrum-alias-placeholder-text-color-down))}.spectrum-Textfield-input_73bc77:active~.spectrum-Textfield-icon_73bc77{fill:var(--spectrum-textfield-icon-color-down,var(--spectrum-alias-icon-color-down))}.spectrum-Textfield-input_73bc77:focus,.spectrum-Textfield-input_73bc77.is-focused_73bc77{border-color:var(--spectrum-textfield-border-color-down,var(--spectrum-alias-border-color-mouse-focus))}.spectrum-Textfield-input_73bc77.focus-ring_73bc77:not(:active){border-color:var(--spectrum-textfield-border-color-key-focus,var(--spectrum-alias-border-color-focus));box-shadow:0 0 0 1px var(--spectrum-textfield-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Textfield-input_73bc77[disabled],.spectrum-Textfield-input_73bc77.is-disabled_73bc77{background-color:var(--spectrum-textfield-background-color-disabled,var(--spectrum-global-color-gray-200));border-color:var(--spectrum-textfield-border-color-disabled,var(--spectrum-alias-border-color-transparent));color:var(--spectrum-textfield-text-color-disabled,var(--spectrum-alias-text-color-disabled));-webkit-text-fill-color:var(--spectrum-textfield-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-Textfield-input_73bc77[disabled]::placeholder,.spectrum-Textfield-input_73bc77[disabled].is-placeholder_73bc77,.spectrum-Textfield-input_73bc77.is-disabled_73bc77::placeholder,.spectrum-Textfield-input_73bc77.is-disabled_73bc77.is-placeholder_73bc77{color:var(--spectrum-textfield-placeholder-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-Textfield-input_73bc77[disabled]~.spectrum-Textfield-icon_73bc77,.spectrum-Textfield-input_73bc77.is-disabled_73bc77~.spectrum-Textfield-icon_73bc77{fill:var(--spectrum-textfield-icon-color-disabled,var(--spectrum-global-color-gray-500))}.spectrum-Textfield-input_73bc77.spectrum-Textfield--invalid_73bc77{border-color:var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default))}.spectrum-Textfield-input_73bc77.spectrum-Textfield--invalid_73bc77.is-hovered_73bc77{border-color:var(--spectrum-textfield-border-color-error-hover,var(--spectrum-semantic-negative-color-state-hover))}.spectrum-Textfield-input_73bc77.spectrum-Textfield--invalid_73bc77:active{border-color:var(--spectrum-textfield-border-color-error-down,var(--spectrum-semantic-negative-color-state-down))}.spectrum-Textfield-input_73bc77.spectrum-Textfield--invalid_73bc77.focus-ring_73bc77:not(:active){border-color:var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default));box-shadow:0 0 0 1px var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default))}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77{background-color:var(--spectrum-textfield-quiet-background-color,var(--spectrum-alias-background-color-transparent));border-color:var(--spectrum-textfield-quiet-border-color,var(--spectrum-alias-border-color))}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77.is-hovered_73bc77{border-color:var(--spectrum-textfield-quiet-border-color-hover,var(--spectrum-alias-border-color-hover))}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77:active{border-color:var(--spectrum-textfield-quiet-border-color-down,var(--spectrum-alias-border-color-mouse-focus))}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77:focus,.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77.is-focused_73bc77{border-color:var(--spectrum-textfield-quiet-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77.focus-ring_73bc77:not(:active){border-color:var(--spectrum-textfield-border-color-key-focus,var(--spectrum-alias-border-color-focus));box-shadow:0 1px 0 var(--spectrum-textfield-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77:disabled,.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77.is-disabled_73bc77{background-color:var(--spectrum-textfield-quiet-background-color-disabled,var(--spectrum-alias-background-color-transparent));border-color:var(--spectrum-textfield-quiet-border-color-disabled,var(--spectrum-alias-border-color-mid))}.spectrum-Textfield--readonly_73bc77 .spectrum-Textfield-input_73bc77{border-color:var(--spectrum-textfield-quiet-background-color,var(--spectrum-alias-background-color-transparent))}.spectrum-Textfield_73bc77.spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-input_73bc77{border-color:var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default))}.spectrum-Textfield_73bc77.spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-input_73bc77.focus-ring_73bc77:not(:active){border-color:var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default));box-shadow:0 0 0 1px var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default))}.spectrum-Textfield--quiet_73bc77.spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-input_73bc77.focus-ring_73bc77:not(:active){box-shadow:0 1px 0 var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default))}.spectrum-Textfield-icon_73bc77{fill:var(--spectrum-textfield-icon-color,var(--spectrum-alias-icon-color))}.spectrum-Textfield--valid_73bc77 .spectrum-Textfield-validationIcon_73bc77{fill:var(--spectrum-alert-success-icon-color,var(--spectrum-semantic-positive-color-icon))}.spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-validationIcon_73bc77{fill:var(--spectrum-alert-error-icon-color,var(--spectrum-semantic-negative-color-icon))}
1
+ .spectrum-Textfield-input_73bc77{font-family:adobe-clean-ux,adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum-Textfield-input_73bc77:lang(ar){font-family:adobe-arabic,myriad-arabic,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum-Textfield-input_73bc77:lang(he){font-family:adobe-hebrew,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum-Textfield-input_73bc77:lang(zh-Hans),.spectrum-Textfield-input_73bc77:lang(zh){font-family:adobe-clean-han-simplified-c,SimSun,Heiti SC Light,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum-Textfield-input_73bc77:lang(ko){font-family:adobe-clean-han-korean,Malgun Gothic,Apple Gothic,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum-Textfield-input_73bc77:lang(ja){font-family:adobe-clean-han-japanese,Yu Gothic,メイリオ,ヒラギノ角ゴ Pro W3,Hiragino Kaku Gothic Pro W3,Osaka,MSPゴシック,MS PGothic,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum-Textfield_73bc77{min-width:var(--spectrum-textfield-min-width,var(--spectrum-global-dimension-size-600));width:var(--spectrum-alias-single-line-width,var(--spectrum-global-dimension-size-2400));display:inline-flex;position:relative}.spectrum-Textfield_73bc77:not(.spectrum-Textfield--quiet_73bc77,.spectrum-Textfield--readonly_73bc77).spectrum-Textfield--multiline_73bc77 .spectrum-Textfield-input_73bc77:not(:disabled){resize:vertical}.spectrum-Textfield_73bc77.spectrum-Textfield--quiet_73bc77.spectrum-Textfield--multiline_73bc77 .spectrum-Textfield-input_73bc77,.spectrum-Textfield_73bc77.spectrum-Textfield--readonly_73bc77 .spectrum-Textfield-input_73bc77{height:var(--spectrum-textfield-height,var(--spectrum-alias-single-line-height));min-height:var(--spectrum-textfield-height,var(--spectrum-alias-single-line-height));overflow-x:hidden}.spectrum-Textfield-input_73bc77{box-sizing:border-box;border:var(--spectrum-textfield-border-size,var(--spectrum-alias-border-size-thin))solid;border-radius:var(--spectrum-textfield-border-radius,var(--spectrum-alias-border-radius-regular));padding:3px var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150))5px calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) - 1px);text-indent:0;width:100%;height:var(--spectrum-textfield-height,var(--spectrum-alias-single-line-height));vertical-align:top;font-size:var(--spectrum-textfield-text-size,var(--spectrum-alias-font-size-default));line-height:var(--spectrum-textfield-text-line-height,var(--spectrum-alias-body-text-line-height));text-overflow:ellipsis;transition:border-color var(--spectrum-global-animation-duration-100,130ms)ease-in-out,box-shadow var(--spectrum-global-animation-duration-100,130ms)ease-in-out;-webkit-appearance:none;-moz-appearance:textfield;outline:0;margin:0;overflow:visible}.spectrum-Textfield-input_73bc77::placeholder,.spectrum-Textfield-input_73bc77.is-placeholder_73bc77{font-weight:var(--spectrum-textfield-placeholder-text-font-weight,var(--spectrum-global-font-weight-regular));font-style:var(--spectrum-textfield-placeholder-text-font-style,var(--spectrum-global-font-style-italic));font-synthesis:none;transition:color var(--spectrum-global-animation-duration-100,130ms)ease-in-out;opacity:1}.spectrum-Textfield-input_73bc77::-moz-placeholder{font-weight:var(--spectrum-textfield-placeholder-text-font-weight,var(--spectrum-global-font-weight-regular));font-style:var(--spectrum-textfield-placeholder-text-font-style,var(--spectrum-global-font-style-italic));transition:color var(--spectrum-global-animation-duration-100,130ms)ease-in-out;opacity:1}.spectrum-Textfield-input_73bc77:lang(ja)::placeholder,.spectrum-Textfield-input_73bc77:lang(ja).is-placeholder_73bc77,.spectrum-Textfield-input_73bc77:lang(zh)::placeholder,.spectrum-Textfield-input_73bc77:lang(zh).is-placeholder_73bc77,.spectrum-Textfield-input_73bc77:lang(ko)::placeholder,.spectrum-Textfield-input_73bc77:lang(ko).is-placeholder_73bc77,.spectrum-Textfield-input_73bc77:lang(ar)::placeholder,.spectrum-Textfield-input_73bc77:lang(ar).is-placeholder_73bc77,.spectrum-Textfield-input_73bc77:lang(he)::placeholder,.spectrum-Textfield-input_73bc77:lang(he).is-placeholder_73bc77{font-style:normal}.spectrum-Textfield-input_73bc77:lang(ja)::-moz-placeholder,.spectrum-Textfield-input_73bc77:lang(zh)::-moz-placeholder,.spectrum-Textfield-input_73bc77:lang(ko)::-moz-placeholder,.spectrum-Textfield-input_73bc77:lang(ar)::-moz-placeholder,.spectrum-Textfield-input_73bc77:lang(he)::-moz-placeholder{font-style:normal}.spectrum-Textfield-input_73bc77.is-hovered_73bc77::placeholder{font-weight:var(--spectrum-textfield-placeholder-text-font-weight,var(--spectrum-global-font-weight-regular))}.spectrum-Textfield-input_73bc77:disabled{resize:none;opacity:1}.spectrum-Textfield-input_73bc77:disabled::placeholder,.spectrum-Textfield-input_73bc77:disabled.is-placeholder_73bc77{font-weight:var(--spectrum-textfield-placeholder-text-font-weight,var(--spectrum-global-font-weight-regular))}.spectrum-Textfield-input_73bc77::-ms-clear{width:0;height:0}.spectrum-Textfield-input_73bc77::-webkit-inner-spin-button,.spectrum-Textfield-input_73bc77::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.spectrum-Textfield-input_73bc77:-moz-ui-invalid{box-shadow:none}.spectrum-Textfield--multiline_73bc77 .spectrum-Textfield-input_73bc77{height:auto;min-height:var(--spectrum-global-dimension-size-700);padding:3px var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150))5px calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) - 1px);overflow:auto}[dir=ltr] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77{padding-left:var(--spectrum-textfield-quiet-padding-x,0)}[dir=rtl] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77,[dir=ltr] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77{padding-right:var(--spectrum-textfield-quiet-padding-x,0)}[dir=rtl] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77{padding-left:var(--spectrum-textfield-quiet-padding-x,0)}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77{border-width:0 0 var(--spectrum-textfield-quiet-border-size,var(--spectrum-alias-border-size-thin))0;resize:none;border-radius:0;overflow-y:hidden}[dir=ltr] .spectrum-Textfield--valid_73bc77 .spectrum-Textfield-input_73bc77{padding-right:calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-icon-margin-left,var(--spectrum-global-dimension-size-150)))}[dir=rtl] .spectrum-Textfield--valid_73bc77 .spectrum-Textfield-input_73bc77{padding-left:calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-icon-margin-left,var(--spectrum-global-dimension-size-150)))}[dir=ltr] .spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-input_73bc77{padding-right:calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-icon-margin-left,var(--spectrum-global-dimension-size-150)))}[dir=rtl] .spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-input_73bc77{padding-left:calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-icon-margin-left,var(--spectrum-global-dimension-size-150)))}[dir=ltr] .spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-input_73bc77{padding-right:calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-icon-margin-left,var(--spectrum-global-dimension-size-150)))}[dir=rtl] .spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-input_73bc77{padding-left:calc(var(--spectrum-textfield-padding-x,var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-icon-margin-left,var(--spectrum-global-dimension-size-150)))}[dir=ltr] .spectrum-Textfield-validationIcon_73bc77{padding-right:calc(var(--spectrum-global-dimension-size-150)/2)}[dir=rtl] .spectrum-Textfield-validationIcon_73bc77{padding-left:calc(var(--spectrum-global-dimension-size-150)/2)}.spectrum-Textfield-validationIcon_73bc77{pointer-events:all;transition:color var(--spectrum-global-animation-duration-100,130ms)ease-in-out;position:absolute}[dir=ltr] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-validationIcon_73bc77{padding-right:0}[dir=rtl] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-validationIcon_73bc77{padding-left:0}[dir=ltr] .spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-validationIcon_73bc77{right:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225))/2)}[dir=rtl] .spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-validationIcon_73bc77{left:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225))/2)}.spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-validationIcon_73bc77{width:var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225));height:var(--spectrum-icon-alert-medium-height,var(--spectrum-global-dimension-size-225));top:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-icon-alert-medium-height,var(--spectrum-global-dimension-size-225))/2)}[dir=ltr] .spectrum-Textfield--valid_73bc77 .spectrum-Textfield-validationIcon_73bc77{right:var(--spectrum-global-dimension-size-150)}[dir=rtl] .spectrum-Textfield--valid_73bc77 .spectrum-Textfield-validationIcon_73bc77{left:var(--spectrum-global-dimension-size-150)}.spectrum-Textfield--valid_73bc77 .spectrum-Textfield-validationIcon_73bc77{width:var(--spectrum-icon-checkmark-medium-width);height:var(--spectrum-icon-checkmark-medium-height);top:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-icon-checkmark-medium-height)/2)}[dir=ltr] .spectrum-Textfield-icon_73bc77{left:var(--spectrum-global-dimension-size-150)}[dir=rtl] .spectrum-Textfield-icon_73bc77{right:var(--spectrum-global-dimension-size-150)}.spectrum-Textfield-icon_73bc77{height:var(--spectrum-icon-info-medium-height,var(--spectrum-global-dimension-size-225));width:var(--spectrum-icon-info-medium-width,var(--spectrum-global-dimension-size-225));top:var(--spectrum-global-dimension-size-85);transition:fill var(--spectrum-global-animation-duration-100,130ms)ease-in-out;display:block;position:absolute}[dir=ltr] .spectrum-Textfield-inputIcon_73bc77{padding-left:calc(var(--spectrum-global-dimension-size-150) + var(--spectrum-global-dimension-size-225) + var(--spectrum-global-dimension-size-65))}[dir=rtl] .spectrum-Textfield-inputIcon_73bc77{padding-right:calc(var(--spectrum-global-dimension-size-150) + var(--spectrum-global-dimension-size-225) + var(--spectrum-global-dimension-size-65))}[dir=ltr] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-inputIcon_73bc77{padding-left:calc(var(--spectrum-global-dimension-size-100) + var(--spectrum-icon-info-medium-width,var(--spectrum-global-dimension-size-225)))}[dir=rtl] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-inputIcon_73bc77{padding-right:calc(var(--spectrum-global-dimension-size-100) + var(--spectrum-icon-info-medium-width,var(--spectrum-global-dimension-size-225)))}[dir=ltr] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-inputIcon_73bc77~.spectrum-Textfield-icon_73bc77{left:0}[dir=rtl] .spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-inputIcon_73bc77~.spectrum-Textfield-icon_73bc77{right:0}.spectrum-Textfield-inputIcon_73bc77.spectrum-Textfield--multiline_73bc77{height:var(--spectrum-textfield-height,var(--spectrum-alias-single-line-height));min-height:var(--spectrum-textfield-height,var(--spectrum-alias-single-line-height))}[dir=ltr] .spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-circleLoader_73bc77{right:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225))/2 + var(--spectrum-global-dimension-size-150)/2)}[dir=rtl] .spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-circleLoader_73bc77{left:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-icon-alert-medium-width,var(--spectrum-global-dimension-size-225))/2 + var(--spectrum-global-dimension-size-150)/2)}.spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-circleLoader_73bc77{top:calc(var(--spectrum-textfield-icon-frame)/2 - var(--spectrum-loader-circle-small-width,var(--spectrum-global-dimension-static-size-200))/2);position:absolute}[dir=ltr] .spectrum-Textfield--quiet_73bc77.spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-circleLoader_73bc77{padding-right:0}[dir=rtl] .spectrum-Textfield--quiet_73bc77.spectrum-Textfield--loadable_73bc77 .spectrum-Textfield-circleLoader_73bc77{padding-left:0}.spectrum-Textfield-input_73bc77{background-color:var(--spectrum-textfield-background-color,var(--spectrum-global-color-gray-50));border-color:var(--spectrum-textfield-border-color,var(--spectrum-alias-border-color));color:var(--spectrum-textfield-text-color,var(--spectrum-alias-text-color))}.spectrum-Textfield-input_73bc77::placeholder,.spectrum-Textfield-input_73bc77.is-placeholder_73bc77{color:var(--spectrum-textfield-placeholder-text-color,var(--spectrum-alias-placeholder-text-color))}.spectrum-Textfield-input_73bc77.is-hovered_73bc77{border-color:var(--spectrum-textfield-border-color-hover,var(--spectrum-alias-border-color-hover));box-shadow:none}.spectrum-Textfield-input_73bc77.is-hovered_73bc77::placeholder,.spectrum-Textfield-input_73bc77.is-hovered_73bc77.is-placeholder_73bc77{color:var(--spectrum-textfield-placeholder-text-color-hover,var(--spectrum-alias-placeholder-text-color-hover))}.spectrum-Textfield-input_73bc77.is-hovered_73bc77~.spectrum-Textfield-icon_73bc77{fill:var(--spectrum-textfield-icon-color-hover,var(--spectrum-global-color-gray-900))}.spectrum-Textfield-input_73bc77:active{background-color:var(--spectrum-textfield-background-color-down,var(--spectrum-global-color-gray-50));border-color:var(--spectrum-textfield-border-color-down,var(--spectrum-alias-border-color-mouse-focus));color:var(--spectrum-textfield-text-color-down,var(--spectrum-alias-text-color-down))}.spectrum-Textfield-input_73bc77:active::placeholder,.spectrum-Textfield-input_73bc77:active.is-placeholder_73bc77{color:var(--spectrum-textfield-placeholder-text-color-down,var(--spectrum-alias-placeholder-text-color-down))}.spectrum-Textfield-input_73bc77:active~.spectrum-Textfield-icon_73bc77{fill:var(--spectrum-textfield-icon-color-down,var(--spectrum-alias-icon-color-down))}.spectrum-Textfield-input_73bc77:focus,.spectrum-Textfield-input_73bc77.is-focused_73bc77{border-color:var(--spectrum-textfield-border-color-down,var(--spectrum-alias-border-color-mouse-focus))}.spectrum-Textfield-input_73bc77.focus-ring_73bc77:not(:active){border-color:var(--spectrum-textfield-border-color-key-focus,var(--spectrum-alias-border-color-focus));box-shadow:0 0 0 1px var(--spectrum-textfield-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Textfield-input_73bc77[disabled],.spectrum-Textfield-input_73bc77.is-disabled_73bc77{background-color:var(--spectrum-textfield-background-color-disabled,var(--spectrum-global-color-gray-200));border-color:var(--spectrum-textfield-border-color-disabled,var(--spectrum-alias-border-color-transparent));color:var(--spectrum-textfield-text-color-disabled,var(--spectrum-alias-text-color-disabled));-webkit-text-fill-color:var(--spectrum-textfield-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-Textfield-input_73bc77[disabled]::placeholder,.spectrum-Textfield-input_73bc77[disabled].is-placeholder_73bc77,.spectrum-Textfield-input_73bc77.is-disabled_73bc77::placeholder,.spectrum-Textfield-input_73bc77.is-disabled_73bc77.is-placeholder_73bc77{color:var(--spectrum-textfield-placeholder-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-Textfield-input_73bc77[disabled]~.spectrum-Textfield-icon_73bc77,.spectrum-Textfield-input_73bc77.is-disabled_73bc77~.spectrum-Textfield-icon_73bc77{fill:var(--spectrum-textfield-icon-color-disabled,var(--spectrum-global-color-gray-500))}.spectrum-Textfield-input_73bc77.spectrum-Textfield--invalid_73bc77{border-color:var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default))}.spectrum-Textfield-input_73bc77.spectrum-Textfield--invalid_73bc77.is-hovered_73bc77{border-color:var(--spectrum-textfield-border-color-error-hover,var(--spectrum-semantic-negative-color-state-hover))}.spectrum-Textfield-input_73bc77.spectrum-Textfield--invalid_73bc77:active{border-color:var(--spectrum-textfield-border-color-error-down,var(--spectrum-semantic-negative-color-state-down))}.spectrum-Textfield-input_73bc77.spectrum-Textfield--invalid_73bc77.focus-ring_73bc77:not(:active){border-color:var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default));box-shadow:0 0 0 1px var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default))}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77{background-color:var(--spectrum-textfield-quiet-background-color,var(--spectrum-alias-background-color-transparent));border-color:var(--spectrum-textfield-quiet-border-color,var(--spectrum-alias-border-color))}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77.is-hovered_73bc77{border-color:var(--spectrum-textfield-quiet-border-color-hover,var(--spectrum-alias-border-color-hover))}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77:active{border-color:var(--spectrum-textfield-quiet-border-color-down,var(--spectrum-alias-border-color-mouse-focus))}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77:focus,.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77.is-focused_73bc77{border-color:var(--spectrum-textfield-quiet-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77.focus-ring_73bc77:not(:active){border-color:var(--spectrum-textfield-border-color-key-focus,var(--spectrum-alias-border-color-focus));box-shadow:0 1px 0 var(--spectrum-textfield-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77:disabled,.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77.is-disabled_73bc77{background-color:var(--spectrum-textfield-quiet-background-color-disabled,var(--spectrum-alias-background-color-transparent));border-color:var(--spectrum-textfield-quiet-border-color-disabled,var(--spectrum-alias-border-color-mid))}.spectrum-Textfield--readonly_73bc77 .spectrum-Textfield-input_73bc77{border-color:var(--spectrum-textfield-quiet-background-color,var(--spectrum-alias-background-color-transparent))}.spectrum-Textfield_73bc77.spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-input_73bc77{border-color:var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default))}.spectrum-Textfield_73bc77.spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-input_73bc77.focus-ring_73bc77:not(:active){border-color:var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default));box-shadow:0 0 0 1px var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default))}.spectrum-Textfield--quiet_73bc77.spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-input_73bc77.focus-ring_73bc77:not(:active){box-shadow:0 1px 0 var(--spectrum-textfield-border-color-error,var(--spectrum-semantic-negative-color-default))}.spectrum-Textfield-icon_73bc77{fill:var(--spectrum-textfield-icon-color,var(--spectrum-alias-icon-color))}.spectrum-Textfield--valid_73bc77 .spectrum-Textfield-validationIcon_73bc77{fill:var(--spectrum-alert-success-icon-color,var(--spectrum-semantic-positive-color-icon))}.spectrum-Textfield--invalid_73bc77 .spectrum-Textfield-validationIcon_73bc77{fill:var(--spectrum-alert-error-icon-color,var(--spectrum-semantic-negative-color-icon))}@media (forced-colors:active){.spectrum-Textfield-input_73bc77{--spectrum-textfield-text-color-disabled:GrayText;--spectrum-textfield-border-color-disabled:GrayText;--spectrum-textfield-quiet-border-color-disabled:GrayText;--spectrum-textfield-quiet-border-color-key-focus:Highlight;--spectrum-textfield-border-color-key-focus:Highlight;--spectrum-textfield-placeholder-text-color:GrayText;--spectrum-textfield-placeholder-text-color-hover:GrayText}.spectrum-Textfield-input_73bc77.focus-ring_73bc77,.spectrum-Textfield-input_73bc77.focus-ring_73bc77{outline:2px solid Highlight}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77.focus-ring_73bc77,.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77.focus-ring_73bc77{forced-color-adjust:none;box-shadow:0 1px 0 0 var(--spectrum-textfield-quiet-border-color-key-focus,var(--spectrum-alias-border-color-focus));outline:0}.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77.focus-ring_73bc77 .spectrum-Textfield-input_73bc77,.spectrum-Textfield--quiet_73bc77 .spectrum-Textfield-input_73bc77.focus-ring_73bc77 .spectrum-Textfield-input_73bc77{border-color:var(--spectrum-textfield-quiet-border-color-key-focus,var(--spectrum-alias-border-color-focus))}}
package/dist/main.js CHANGED
@@ -11,36 +11,18 @@ var $74aPB$reactspectrumlabel = require("@react-spectrum/label");
11
11
  var $74aPB$reactariafocus = require("@react-aria/focus");
12
12
  var $74aPB$reactariainteractions = require("@react-aria/interactions");
13
13
 
14
- function $parcel$exportWildcard(dest, source) {
15
- Object.keys(source).forEach(function(key) {
16
- if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
17
- return;
18
- }
19
-
20
- Object.defineProperty(dest, key, {
21
- enumerable: true,
22
- get: function get() {
23
- return source[key];
24
- }
25
- });
26
- });
27
-
28
- return dest;
14
+ function $parcel$export(e, n, v, s) {
15
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
29
16
  }
30
17
  function $parcel$interopDefault(a) {
31
18
  return a && a.__esModule ? a.default : a;
32
19
  }
33
- function $parcel$export(e, n, v, s) {
34
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
35
- }
36
- var $eec649e464f3832d$exports = {};
37
20
 
38
- $parcel$export($eec649e464f3832d$exports, "TextArea", () => $eec649e464f3832d$export$f5c9f3c2c4054eec);
21
+ $parcel$export(module.exports, "TextArea", () => $eec649e464f3832d$export$f5c9f3c2c4054eec);
22
+ $parcel$export(module.exports, "TextField", () => $34fd51d50eb4b056$export$2c73285ae9390cec);
23
+ $parcel$export(module.exports, "TextFieldBase", () => $86793250183ac29e$export$d22444a338b6e3c2);
39
24
 
40
25
 
41
- var $86793250183ac29e$exports = {};
42
-
43
- $parcel$export($86793250183ac29e$exports, "TextFieldBase", () => $86793250183ac29e$export$d22444a338b6e3c2);
44
26
 
45
27
 
46
28
 
@@ -236,9 +218,6 @@ function $eec649e464f3832d$var$TextArea(props, ref) {
236
218
  */ let $eec649e464f3832d$export$f5c9f3c2c4054eec = /*#__PURE__*/ ($parcel$interopDefault($74aPB$react)).forwardRef($eec649e464f3832d$var$TextArea);
237
219
 
238
220
 
239
- var $34fd51d50eb4b056$exports = {};
240
-
241
- $parcel$export($34fd51d50eb4b056$exports, "TextField", () => $34fd51d50eb4b056$export$2c73285ae9390cec);
242
221
 
243
222
 
244
223
 
@@ -269,9 +248,6 @@ function $34fd51d50eb4b056$var$TextField(props, ref) {
269
248
 
270
249
 
271
250
 
272
- $parcel$exportWildcard(module.exports, $eec649e464f3832d$exports);
273
- $parcel$exportWildcard(module.exports, $34fd51d50eb4b056$exports);
274
- $parcel$exportWildcard(module.exports, $86793250183ac29e$exports);
275
251
 
276
252
 
277
253
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,GA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,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,SAAS;;AAE7B,CAAC;AAED,EAIG,AAJH;;;;CAIG,AAJH,EAIG,CACH,KAAK,CAAC,yCAAU,iBAAG,uBAAU,CAAC,+BAAS;;","sources":["packages/@react-spectrum/textfield/src/index.ts","packages/@react-spectrum/textfield/src/TextArea.tsx","packages/@react-spectrum/textfield/src/TextFieldBase.tsx","packages/@adobe/spectrum-css-temp/components/textfield/vars.css","packages/@react-spectrum/textfield/src/TextField.tsx"],"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 './TextArea';\nexport * from './TextField';\nexport * from './TextFieldBase';\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 {chain, useLayoutEffect} from '@react-aria/utils';\nimport React, {RefObject, useCallback, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport {TextFieldBase} from './TextFieldBase';\nimport {useControlledState} from '@react-stately/utils';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTextField} from '@react-aria/textfield';\n\nfunction TextArea(props: SpectrumTextFieldProps, ref: RefObject<TextFieldRef>) {\n props = useProviderProps(props);\n let {\n isDisabled = false,\n isQuiet = false,\n isReadOnly = false,\n isRequired = false,\n onChange,\n ...otherProps\n } = props;\n // not in stately because this is so we know when to re-measure, which is a spectrum design\n let [inputValue, setInputValue] = useControlledState(props.value, props.defaultValue, () => {});\n\n let inputText = props.value ?? props.defaultValue ?? ''; \n let inputRef = useRef<HTMLTextAreaElement>();\n\n let onHeightChange = useCallback(() => {\n if (isQuiet && !isReadOnly) {\n let input = inputRef.current;\n let prevAlignment = input.style.alignSelf;\n input.style.alignSelf = 'start';\n input.style.height = 'auto';\n input.style.height = `${input.scrollHeight}px`;\n input.style.alignSelf = prevAlignment;\n }\n }, [isQuiet, isReadOnly, inputRef]);\n\n useLayoutEffect(() => {\n if (inputRef.current) {\n onHeightChange();\n }\n }, [onHeightChange, inputValue, inputRef]);\n\n if (props.placeholder) {\n console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextArea.html#help-text');\n }\n\n let {labelProps, inputProps, descriptionProps, errorMessageProps} = useTextField({\n ...props,\n onChange: chain(onChange, setInputValue),\n inputElementType: 'textarea'\n }, inputRef);\n\n return (\n <TextFieldBase\n {...otherProps}\n ref={ref}\n inputRef={inputRef}\n labelProps={labelProps}\n inputProps={inputProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n multiLine\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n isReadOnly={isReadOnly}\n isRequired={isRequired} \n readOnlyText={inputText} />\n );\n}\n\n/**\n * TextAreas are multiline text inputs, useful for cases where users have\n * a sizable amount of text to enter. They allow for all customizations that\n * are available to text fields.\n */\nlet _TextArea = React.forwardRef(TextArea);\nexport {_TextArea as TextArea};\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 AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, createFocusableRef} from '@react-spectrum/utils';\nimport {Field} from '@react-spectrum/label';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport {PressEvents} from '@react-types/shared';\nimport React, {cloneElement, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, ReactElement, Ref, RefObject, TextareaHTMLAttributes, useImperativeHandle, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport styles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\nimport {useHover} from '@react-aria/interactions';\n\ninterface TextFieldBaseProps extends Omit<SpectrumTextFieldProps, 'onChange'>, PressEvents {\n wrapperChildren?: ReactElement | ReactElement[],\n inputClassName?: string,\n validationIconClassName?: string,\n multiLine?: boolean,\n labelProps?: LabelHTMLAttributes<HTMLLabelElement>,\n inputProps: InputHTMLAttributes<HTMLInputElement> | TextareaHTMLAttributes<HTMLTextAreaElement>,\n descriptionProps?: HTMLAttributes<HTMLElement>,\n errorMessageProps?: HTMLAttributes<HTMLElement>,\n inputRef?: RefObject<HTMLInputElement | HTMLTextAreaElement>,\n loadingIndicator?: ReactElement,\n isLoading?: boolean,\n readOnlyText?: string\n}\n\nfunction TextFieldBase(props: TextFieldBaseProps, ref: Ref<TextFieldRef>) {\n let {\n label,\n validationState,\n icon,\n isQuiet = false,\n isDisabled,\n multiLine,\n autoFocus,\n inputClassName,\n wrapperChildren,\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n inputRef,\n isLoading,\n loadingIndicator,\n validationIconClassName,\n readOnlyText\n } = props;\n let {hoverProps, isHovered} = useHover({isDisabled});\n let domRef = useRef<HTMLDivElement>(null);\n let defaultInputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n inputRef = inputRef || defaultInputRef;\n \n // Expose imperative interface for ref\n useImperativeHandle(ref, () => ({\n ...createFocusableRef(domRef, inputRef),\n select() {\n if (inputRef.current) {\n inputRef.current.select();\n }\n },\n getInputElement() {\n return inputRef.current;\n }\n }));\n\n let ElementType: React.ElementType = multiLine ? 'textarea' : 'input';\n let isInvalid = validationState === 'invalid';\n\n if (icon) {\n let UNSAFE_className = classNames(\n styles,\n icon.props && icon.props.UNSAFE_className,\n 'spectrum-Textfield-icon'\n );\n\n icon = cloneElement(icon, {\n UNSAFE_className,\n size: 'S'\n });\n }\n\n let validationIcon = isInvalid ? <AlertMedium /> : <CheckmarkMedium />;\n let validation = cloneElement(validationIcon, {\n UNSAFE_className: classNames(\n styles,\n 'spectrum-Textfield-validationIcon',\n validationIconClassName\n )\n });\n\n let textField = (\n <div\n className={\n classNames(\n styles,\n 'spectrum-Textfield',\n {\n 'spectrum-Textfield--invalid': isInvalid,\n 'spectrum-Textfield--valid': validationState === 'valid',\n 'spectrum-Textfield--loadable': loadingIndicator,\n 'spectrum-Textfield--quiet': isQuiet,\n 'spectrum-Textfield--multiline': multiLine\n }\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} isTextInput autoFocus={autoFocus}>\n <ElementType\n {...mergeProps(inputProps, hoverProps)}\n ref={inputRef as any}\n rows={multiLine ? 1 : undefined}\n className={\n classNames(\n styles,\n 'spectrum-Textfield-input',\n {\n 'spectrum-Textfield-inputIcon': icon,\n 'is-hovered': isHovered\n },\n inputClassName\n )\n } />\n </FocusRing>\n {icon}\n {validationState && !isLoading ? validation : null}\n {isLoading && loadingIndicator}\n {wrapperChildren}\n </div>\n );\n\n if (label) {\n textField = React.cloneElement(textField, mergeProps(textField.props, {\n className: multiLine ? 'spectrum-Field-field--multiline' : ''\n }));\n }\n \n return (\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon={false}\n ref={domRef}\n readOnlyText={readOnlyText}\n inputProps={inputProps}>\n {textField}\n </Field>\n );\n}\n\nconst _TextFieldBase = forwardRef(TextFieldBase);\nexport {_TextFieldBase as TextFieldBase};\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 React, {forwardRef, RefObject, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport {TextFieldBase} from './TextFieldBase';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTextField} from '@react-aria/textfield';\n\nfunction TextField(props: SpectrumTextFieldProps, ref: RefObject<TextFieldRef>) {\n props = useProviderProps(props);\n let inputText = props.value ?? props.defaultValue ?? ''; \n let inputRef = useRef<HTMLInputElement>();\n let {labelProps, inputProps, descriptionProps, errorMessageProps} = useTextField(props, inputRef);\n\n if (props.placeholder) {\n console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextField.html#help-text');\n }\n \n return (\n <TextFieldBase\n {...props}\n labelProps={labelProps}\n inputProps={inputProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n ref={ref}\n inputRef={inputRef} \n readOnlyText={inputText} />\n );\n}\n\n/**\n * TextFields are text inputs that allow users to input custom text entries\n * with a keyboard. Various decorations can be displayed around the field to\n * communicate the entry requirements.\n */\nconst _TextField = forwardRef(TextField);\nexport {_TextField as TextField};\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,GAA0C;AAC1C,GAAoC;AACpC,GAA2C;AAC3C,GAA8C;AAC9C,GAA+C;AAC/C,GAAgC;AAChC,GAA4B;AAC5B,GAA2C;AAC3C,GAA6C;AAC7C,GAA8C;AAC9C,GAAmD;AACnD,GAAyC;AACzC,GAA8C;AAC9C,GAAiD;AACjD,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAhB7B,yCAA0C,GAAG,CAAiC;AAC9E,yCAAoC,GAAG,CAA2B;AAClE,yCAA2C,GAAG,CAAkC;AAChF,yCAA8C,GAAG,CAAqC;AACtF,yCAA+C,GAAG,CAAsC;AACxF,yCAAgC,GAAG,CAAuB;AAC1D,yCAA4B,GAAG,CAAmB;AAClD,yCAA2C,GAAG,CAAkC;AAChF,yCAA6C,GAAG,CAAoC;AACpF,yCAA8C,GAAG,CAAqC;AACtF,yCAAmD,GAAG,CAA0C;AAChG,yCAAyC,GAAG,CAAgC;AAC5E,yCAA8C,GAAG,CAAqC;AACtF,uCAAiD,GAAG,CAAwC;AAC5F,yCAA4B,GAAG,CAAmB;AAClD,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAAoB;;;;SDuB3C,mCAAa,CAAC,KAAyB,EAAE,GAAsB,EAAE,CAAC;IACzE,GAAG,CAAC,CAAC,QACH,KAAK,oBACL,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AAiC,cAAjC,IAAiC,GAAI,CAAE;IACvD,GAAG,CAAC,QAAQ,GAAG,mBAAM;IACrB,GAAG,CAAC,CAAC,aAAA,UAAU,eAAE,UAAU,qBAAE,gBAAgB,sBAAE,iBAAiB,EAAA,CAAC,GAAG,sCAAY,CAAC,KAAK,EAAE,QAAQ;IAEhG,EAAE,EAAE,KAAK,CAAC,WAAW,EACnB,OAAO,CAAC,IAAI,CAAC,CAA2L;IAG1M,MAAM,oEACH,yCAAa;WACR,KAAK;QACT,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,gBAAgB,EAAE,gBAAgB;QAClC,iBAAiB,EAAE,iBAAiB;QACpC,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,SAAS;;AAE7B,CAAC;AAED,EAIG,AAJH;;;;CAIG,AAJH,EAIG,CACH,KAAK,CAAC,yCAAU,iBAAG,uBAAU,CAAC,+BAAS;;","sources":["packages/@react-spectrum/textfield/src/index.ts","packages/@react-spectrum/textfield/src/TextArea.tsx","packages/@react-spectrum/textfield/src/TextFieldBase.tsx","packages/@adobe/spectrum-css-temp/components/textfield/vars.css","packages/@react-spectrum/textfield/src/TextField.tsx"],"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 {TextArea} from './TextArea';\nexport {TextField} from './TextField';\nexport {TextFieldBase} from './TextFieldBase';\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 {chain, useLayoutEffect} from '@react-aria/utils';\nimport React, {RefObject, useCallback, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport {TextFieldBase} from './TextFieldBase';\nimport {useControlledState} from '@react-stately/utils';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTextField} from '@react-aria/textfield';\n\nfunction TextArea(props: SpectrumTextFieldProps, ref: RefObject<TextFieldRef>) {\n props = useProviderProps(props);\n let {\n isDisabled = false,\n isQuiet = false,\n isReadOnly = false,\n isRequired = false,\n onChange,\n ...otherProps\n } = props;\n // not in stately because this is so we know when to re-measure, which is a spectrum design\n let [inputValue, setInputValue] = useControlledState(props.value, props.defaultValue, () => {});\n\n let inputText = props.value ?? props.defaultValue ?? ''; \n let inputRef = useRef<HTMLTextAreaElement>();\n\n let onHeightChange = useCallback(() => {\n if (isQuiet && !isReadOnly) {\n let input = inputRef.current;\n let prevAlignment = input.style.alignSelf;\n input.style.alignSelf = 'start';\n input.style.height = 'auto';\n input.style.height = `${input.scrollHeight}px`;\n input.style.alignSelf = prevAlignment;\n }\n }, [isQuiet, isReadOnly, inputRef]);\n\n useLayoutEffect(() => {\n if (inputRef.current) {\n onHeightChange();\n }\n }, [onHeightChange, inputValue, inputRef]);\n\n if (props.placeholder) {\n console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextArea.html#help-text');\n }\n\n let {labelProps, inputProps, descriptionProps, errorMessageProps} = useTextField({\n ...props,\n onChange: chain(onChange, setInputValue),\n inputElementType: 'textarea'\n }, inputRef);\n\n return (\n <TextFieldBase\n {...otherProps}\n ref={ref}\n inputRef={inputRef}\n labelProps={labelProps}\n inputProps={inputProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n multiLine\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n isReadOnly={isReadOnly}\n isRequired={isRequired} \n readOnlyText={inputText} />\n );\n}\n\n/**\n * TextAreas are multiline text inputs, useful for cases where users have\n * a sizable amount of text to enter. They allow for all customizations that\n * are available to text fields.\n */\nlet _TextArea = React.forwardRef(TextArea);\nexport {_TextArea as TextArea};\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 AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, createFocusableRef} from '@react-spectrum/utils';\nimport {Field} from '@react-spectrum/label';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport {PressEvents} from '@react-types/shared';\nimport React, {cloneElement, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, ReactElement, Ref, RefObject, TextareaHTMLAttributes, useImperativeHandle, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport styles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\nimport {useHover} from '@react-aria/interactions';\n\ninterface TextFieldBaseProps extends Omit<SpectrumTextFieldProps, 'onChange'>, PressEvents {\n wrapperChildren?: ReactElement | ReactElement[],\n inputClassName?: string,\n validationIconClassName?: string,\n multiLine?: boolean,\n labelProps?: LabelHTMLAttributes<HTMLLabelElement>,\n inputProps: InputHTMLAttributes<HTMLInputElement> | TextareaHTMLAttributes<HTMLTextAreaElement>,\n descriptionProps?: HTMLAttributes<HTMLElement>,\n errorMessageProps?: HTMLAttributes<HTMLElement>,\n inputRef?: RefObject<HTMLInputElement | HTMLTextAreaElement>,\n loadingIndicator?: ReactElement,\n isLoading?: boolean,\n readOnlyText?: string\n}\n\nfunction TextFieldBase(props: TextFieldBaseProps, ref: Ref<TextFieldRef>) {\n let {\n label,\n validationState,\n icon,\n isQuiet = false,\n isDisabled,\n multiLine,\n autoFocus,\n inputClassName,\n wrapperChildren,\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n inputRef,\n isLoading,\n loadingIndicator,\n validationIconClassName,\n readOnlyText\n } = props;\n let {hoverProps, isHovered} = useHover({isDisabled});\n let domRef = useRef<HTMLDivElement>(null);\n let defaultInputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n inputRef = inputRef || defaultInputRef;\n \n // Expose imperative interface for ref\n useImperativeHandle(ref, () => ({\n ...createFocusableRef(domRef, inputRef),\n select() {\n if (inputRef.current) {\n inputRef.current.select();\n }\n },\n getInputElement() {\n return inputRef.current;\n }\n }));\n\n let ElementType: React.ElementType = multiLine ? 'textarea' : 'input';\n let isInvalid = validationState === 'invalid';\n\n if (icon) {\n let UNSAFE_className = classNames(\n styles,\n icon.props && icon.props.UNSAFE_className,\n 'spectrum-Textfield-icon'\n );\n\n icon = cloneElement(icon, {\n UNSAFE_className,\n size: 'S'\n });\n }\n\n let validationIcon = isInvalid ? <AlertMedium /> : <CheckmarkMedium />;\n let validation = cloneElement(validationIcon, {\n UNSAFE_className: classNames(\n styles,\n 'spectrum-Textfield-validationIcon',\n validationIconClassName\n )\n });\n\n let textField = (\n <div\n className={\n classNames(\n styles,\n 'spectrum-Textfield',\n {\n 'spectrum-Textfield--invalid': isInvalid,\n 'spectrum-Textfield--valid': validationState === 'valid',\n 'spectrum-Textfield--loadable': loadingIndicator,\n 'spectrum-Textfield--quiet': isQuiet,\n 'spectrum-Textfield--multiline': multiLine\n }\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} isTextInput autoFocus={autoFocus}>\n <ElementType\n {...mergeProps(inputProps, hoverProps)}\n ref={inputRef as any}\n rows={multiLine ? 1 : undefined}\n className={\n classNames(\n styles,\n 'spectrum-Textfield-input',\n {\n 'spectrum-Textfield-inputIcon': icon,\n 'is-hovered': isHovered\n },\n inputClassName\n )\n } />\n </FocusRing>\n {icon}\n {validationState && !isLoading ? validation : null}\n {isLoading && loadingIndicator}\n {wrapperChildren}\n </div>\n );\n\n if (label) {\n textField = React.cloneElement(textField, mergeProps(textField.props, {\n className: multiLine ? 'spectrum-Field-field--multiline' : ''\n }));\n }\n \n return (\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon={false}\n ref={domRef}\n readOnlyText={readOnlyText}\n inputProps={inputProps}>\n {textField}\n </Field>\n );\n}\n\nconst _TextFieldBase = forwardRef(TextFieldBase);\nexport {_TextFieldBase as TextFieldBase};\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 React, {forwardRef, RefObject, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport {TextFieldBase} from './TextFieldBase';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTextField} from '@react-aria/textfield';\n\nfunction TextField(props: SpectrumTextFieldProps, ref: RefObject<TextFieldRef>) {\n props = useProviderProps(props);\n let inputText = props.value ?? props.defaultValue ?? ''; \n let inputRef = useRef<HTMLInputElement>();\n let {labelProps, inputProps, descriptionProps, errorMessageProps} = useTextField(props, inputRef);\n\n if (props.placeholder) {\n console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextField.html#help-text');\n }\n \n return (\n <TextFieldBase\n {...props}\n labelProps={labelProps}\n inputProps={inputProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n ref={ref}\n inputRef={inputRef} \n readOnlyText={inputText} />\n );\n}\n\n/**\n * TextFields are text inputs that allow users to input custom text entries\n * with a keyboard. Various decorations can be displayed around the field to\n * communicate the entry requirements.\n */\nconst _TextField = forwardRef(TextField);\nexport {_TextField as TextField};\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -11,20 +11,14 @@ import {Field as $evhxb$Field} from "@react-spectrum/label";
11
11
  import {FocusRing as $evhxb$FocusRing} from "@react-aria/focus";
12
12
  import {useHover as $evhxb$useHover} from "@react-aria/interactions";
13
13
 
14
- function $parcel$export(e, n, v, s) {
15
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
16
- }
17
14
  function $parcel$interopDefault(a) {
18
15
  return a && a.__esModule ? a.default : a;
19
16
  }
20
- var $cc187bf91f8eea73$exports = {};
21
-
22
- $parcel$export($cc187bf91f8eea73$exports, "TextArea", () => $cc187bf91f8eea73$export$f5c9f3c2c4054eec);
23
-
17
+ function $parcel$export(e, n, v, s) {
18
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
19
+ }
24
20
 
25
- var $599adb75312e6492$exports = {};
26
21
 
27
- $parcel$export($599adb75312e6492$exports, "TextFieldBase", () => $599adb75312e6492$export$d22444a338b6e3c2);
28
22
 
29
23
 
30
24
 
@@ -220,9 +214,6 @@ function $cc187bf91f8eea73$var$TextArea(props, ref) {
220
214
  */ let $cc187bf91f8eea73$export$f5c9f3c2c4054eec = /*#__PURE__*/ $evhxb$react.forwardRef($cc187bf91f8eea73$var$TextArea);
221
215
 
222
216
 
223
- var $265457f9427aa380$exports = {};
224
-
225
- $parcel$export($265457f9427aa380$exports, "TextField", () => $265457f9427aa380$export$2c73285ae9390cec);
226
217
 
227
218
 
228
219
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,GAA0C;AAC1C,GAAoC;AACpC,GAA2C;AAC3C,GAA8C;AAC9C,GAA+C;AAC/C,GAAgC;AAChC,GAA4B;AAC5B,GAA2C;AAC3C,GAA6C;AAC7C,GAA8C;AAC9C,GAAmD;AACnD,GAAyC;AACzC,GAA8C;AAC9C,GAAiD;AACjD,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAhB7B,yCAA0C,GAAG,CAAiC;AAC9E,yCAAoC,GAAG,CAA2B;AAClE,yCAA2C,GAAG,CAAkC;AAChF,yCAA8C,GAAG,CAAqC;AACtF,yCAA+C,GAAG,CAAsC;AACxF,yCAAgC,GAAG,CAAuB;AAC1D,yCAA4B,GAAG,CAAmB;AAClD,yCAA2C,GAAG,CAAkC;AAChF,yCAA6C,GAAG,CAAoC;AACpF,yCAA8C,GAAG,CAAqC;AACtF,yCAAmD,GAAG,CAA0C;AAChG,yCAAyC,GAAG,CAAgC;AAC5E,yCAA8C,GAAG,CAAqC;AACtF,uCAAiD,GAAG,CAAwC;AAC5F,yCAA4B,GAAG,CAAmB;AAClD,yCAA4B,GAAG,C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,GAAG,CAAC,SAAS,IAAG,IAAiC,IAAjC,MAAW,GAAX,KAAK,CAAC,KAAK,cAAX,MAAW,cAAX,MAAW,GAAI,KAAK,CAAC,YAAY,cAAjC,IAAiC,cAAjC,IAAiC,GAAI,CAAE;IACvD,GAAG,CAAC,QAAQ,GAAG,aAAM;IACrB,GAAG,CAAC,CAAC,aAAA,UAAU,eAAE,UAAU,qBAAE,gBAAgB,sBAAE,iBAAiB,EAAA,CAAC,GAAG,mBAAY,CAAC,KAAK,EAAE,QAAQ;IAEhG,EAAE,EAAE,KAAK,CAAC,WAAW,EACnB,OAAO,CAAC,IAAI,CAAC,CAA2L;IAG1M,MAAM,0CACH,yCAAa;WACR,KAAK;QACT,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,gBAAgB,EAAE,gBAAgB;QAClC,iBAAiB,EAAE,iBAAiB;QACpC,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,SAAS;;AAE7B,CAAC;AAED,EAIG,AAJH;;;;CAIG,AAJH,EAIG,CACH,KAAK,CAAC,yCAAU,iBAAG,iBAAU,CAAC,+BAAS;;","sources":["packages/@react-spectrum/textfield/src/index.ts","packages/@react-spectrum/textfield/src/TextArea.tsx","packages/@react-spectrum/textfield/src/TextFieldBase.tsx","packages/@adobe/spectrum-css-temp/components/textfield/vars.css","packages/@react-spectrum/textfield/src/TextField.tsx"],"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 './TextArea';\nexport * from './TextField';\nexport * from './TextFieldBase';\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 {chain, useLayoutEffect} from '@react-aria/utils';\nimport React, {RefObject, useCallback, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport {TextFieldBase} from './TextFieldBase';\nimport {useControlledState} from '@react-stately/utils';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTextField} from '@react-aria/textfield';\n\nfunction TextArea(props: SpectrumTextFieldProps, ref: RefObject<TextFieldRef>) {\n props = useProviderProps(props);\n let {\n isDisabled = false,\n isQuiet = false,\n isReadOnly = false,\n isRequired = false,\n onChange,\n ...otherProps\n } = props;\n // not in stately because this is so we know when to re-measure, which is a spectrum design\n let [inputValue, setInputValue] = useControlledState(props.value, props.defaultValue, () => {});\n\n let inputText = props.value ?? props.defaultValue ?? ''; \n let inputRef = useRef<HTMLTextAreaElement>();\n\n let onHeightChange = useCallback(() => {\n if (isQuiet && !isReadOnly) {\n let input = inputRef.current;\n let prevAlignment = input.style.alignSelf;\n input.style.alignSelf = 'start';\n input.style.height = 'auto';\n input.style.height = `${input.scrollHeight}px`;\n input.style.alignSelf = prevAlignment;\n }\n }, [isQuiet, isReadOnly, inputRef]);\n\n useLayoutEffect(() => {\n if (inputRef.current) {\n onHeightChange();\n }\n }, [onHeightChange, inputValue, inputRef]);\n\n if (props.placeholder) {\n console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextArea.html#help-text');\n }\n\n let {labelProps, inputProps, descriptionProps, errorMessageProps} = useTextField({\n ...props,\n onChange: chain(onChange, setInputValue),\n inputElementType: 'textarea'\n }, inputRef);\n\n return (\n <TextFieldBase\n {...otherProps}\n ref={ref}\n inputRef={inputRef}\n labelProps={labelProps}\n inputProps={inputProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n multiLine\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n isReadOnly={isReadOnly}\n isRequired={isRequired} \n readOnlyText={inputText} />\n );\n}\n\n/**\n * TextAreas are multiline text inputs, useful for cases where users have\n * a sizable amount of text to enter. They allow for all customizations that\n * are available to text fields.\n */\nlet _TextArea = React.forwardRef(TextArea);\nexport {_TextArea as TextArea};\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 AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, createFocusableRef} from '@react-spectrum/utils';\nimport {Field} from '@react-spectrum/label';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport {PressEvents} from '@react-types/shared';\nimport React, {cloneElement, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, ReactElement, Ref, RefObject, TextareaHTMLAttributes, useImperativeHandle, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport styles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\nimport {useHover} from '@react-aria/interactions';\n\ninterface TextFieldBaseProps extends Omit<SpectrumTextFieldProps, 'onChange'>, PressEvents {\n wrapperChildren?: ReactElement | ReactElement[],\n inputClassName?: string,\n validationIconClassName?: string,\n multiLine?: boolean,\n labelProps?: LabelHTMLAttributes<HTMLLabelElement>,\n inputProps: InputHTMLAttributes<HTMLInputElement> | TextareaHTMLAttributes<HTMLTextAreaElement>,\n descriptionProps?: HTMLAttributes<HTMLElement>,\n errorMessageProps?: HTMLAttributes<HTMLElement>,\n inputRef?: RefObject<HTMLInputElement | HTMLTextAreaElement>,\n loadingIndicator?: ReactElement,\n isLoading?: boolean,\n readOnlyText?: string\n}\n\nfunction TextFieldBase(props: TextFieldBaseProps, ref: Ref<TextFieldRef>) {\n let {\n label,\n validationState,\n icon,\n isQuiet = false,\n isDisabled,\n multiLine,\n autoFocus,\n inputClassName,\n wrapperChildren,\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n inputRef,\n isLoading,\n loadingIndicator,\n validationIconClassName,\n readOnlyText\n } = props;\n let {hoverProps, isHovered} = useHover({isDisabled});\n let domRef = useRef<HTMLDivElement>(null);\n let defaultInputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n inputRef = inputRef || defaultInputRef;\n \n // Expose imperative interface for ref\n useImperativeHandle(ref, () => ({\n ...createFocusableRef(domRef, inputRef),\n select() {\n if (inputRef.current) {\n inputRef.current.select();\n }\n },\n getInputElement() {\n return inputRef.current;\n }\n }));\n\n let ElementType: React.ElementType = multiLine ? 'textarea' : 'input';\n let isInvalid = validationState === 'invalid';\n\n if (icon) {\n let UNSAFE_className = classNames(\n styles,\n icon.props && icon.props.UNSAFE_className,\n 'spectrum-Textfield-icon'\n );\n\n icon = cloneElement(icon, {\n UNSAFE_className,\n size: 'S'\n });\n }\n\n let validationIcon = isInvalid ? <AlertMedium /> : <CheckmarkMedium />;\n let validation = cloneElement(validationIcon, {\n UNSAFE_className: classNames(\n styles,\n 'spectrum-Textfield-validationIcon',\n validationIconClassName\n )\n });\n\n let textField = (\n <div\n className={\n classNames(\n styles,\n 'spectrum-Textfield',\n {\n 'spectrum-Textfield--invalid': isInvalid,\n 'spectrum-Textfield--valid': validationState === 'valid',\n 'spectrum-Textfield--loadable': loadingIndicator,\n 'spectrum-Textfield--quiet': isQuiet,\n 'spectrum-Textfield--multiline': multiLine\n }\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} isTextInput autoFocus={autoFocus}>\n <ElementType\n {...mergeProps(inputProps, hoverProps)}\n ref={inputRef as any}\n rows={multiLine ? 1 : undefined}\n className={\n classNames(\n styles,\n 'spectrum-Textfield-input',\n {\n 'spectrum-Textfield-inputIcon': icon,\n 'is-hovered': isHovered\n },\n inputClassName\n )\n } />\n </FocusRing>\n {icon}\n {validationState && !isLoading ? validation : null}\n {isLoading && loadingIndicator}\n {wrapperChildren}\n </div>\n );\n\n if (label) {\n textField = React.cloneElement(textField, mergeProps(textField.props, {\n className: multiLine ? 'spectrum-Field-field--multiline' : ''\n }));\n }\n \n return (\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon={false}\n ref={domRef}\n readOnlyText={readOnlyText}\n inputProps={inputProps}>\n {textField}\n </Field>\n );\n}\n\nconst _TextFieldBase = forwardRef(TextFieldBase);\nexport {_TextFieldBase as TextFieldBase};\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 React, {forwardRef, RefObject, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport {TextFieldBase} from './TextFieldBase';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTextField} from '@react-aria/textfield';\n\nfunction TextField(props: SpectrumTextFieldProps, ref: RefObject<TextFieldRef>) {\n props = useProviderProps(props);\n let inputText = props.value ?? props.defaultValue ?? ''; \n let inputRef = useRef<HTMLInputElement>();\n let {labelProps, inputProps, descriptionProps, errorMessageProps} = useTextField(props, inputRef);\n\n if (props.placeholder) {\n console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextField.html#help-text');\n }\n \n return (\n <TextFieldBase\n {...props}\n labelProps={labelProps}\n inputProps={inputProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n ref={ref}\n inputRef={inputRef} \n readOnlyText={inputText} />\n );\n}\n\n/**\n * TextFields are text inputs that allow users to input custom text entries\n * with a keyboard. Various decorations can be displayed around the field to\n * communicate the entry requirements.\n */\nconst _TextField = forwardRef(TextField);\nexport {_TextField as TextField};\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,GAA0C;AAC1C,GAAoC;AACpC,GAA2C;AAC3C,GAA8C;AAC9C,GAA+C;AAC/C,GAAgC;AAChC,GAA4B;AAC5B,GAA2C;AAC3C,GAA6C;AAC7C,GAA8C;AAC9C,GAAmD;AACnD,GAAyC;AACzC,GAA8C;AAC9C,GAAiD;AACjD,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAhB7B,yCAA0C,GAAG,CAAiC;AAC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,EAAE,iBAAiB;QACpC,SAAS,EAAT,IAAS;QACT,UAAU,EAAE,UAAU;QACtB,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,YAAY,EAAE,SAAS;;AAE7B,CAAC;AAED,EAIG,AAJH;;;;CAIG,AAJH,EAIG,CACH,GAAG,CAAC,yCAAS,iBAAG,YAAK,CAAC,UAAU,CAAC,8BAAQ;;;;;;;SGpEhC,+BAAS,CAAC,KAA6B,EAAE,GAA4B,EAAE,CAAC;IAC/E,KAAK,GAAG,uBAAgB,CAAC,KAAK;QACd,MAAW,EAAX,IAAiC;IAAjD,GAAG,CAAC,SAAS,IAAG,IAAiC,IAAjC,MAAW,GAAX,KAAK,CAAC,KAAK,cAAX,MAAW,cAAX,MAAW,GAAI,KAAK,CAAC,YAAY,cAAjC,IAAiC,cAAjC,IAAiC,GAAI,CAAE;IACvD,GAAG,CAAC,QAAQ,GAAG,aAAM;IACrB,GAAG,CAAC,CAAC,aAAA,UAAU,eAAE,UAAU,qBAAE,gBAAgB,sBAAE,iBAAiB,EAAA,CAAC,GAAG,mBAAY,CAAC,KAAK,EAAE,QAAQ;IAEhG,EAAE,EAAE,KAAK,CAAC,WAAW,EACnB,OAAO,CAAC,IAAI,CAAC,CAA2L;IAG1M,MAAM,0CACH,yCAAa;WACR,KAAK;QACT,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,gBAAgB,EAAE,gBAAgB;QAClC,iBAAiB,EAAE,iBAAiB;QACpC,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,SAAS;;AAE7B,CAAC;AAED,EAIG,AAJH;;;;CAIG,AAJH,EAIG,CACH,KAAK,CAAC,yCAAU,iBAAG,iBAAU,CAAC,+BAAS;;","sources":["packages/@react-spectrum/textfield/src/index.ts","packages/@react-spectrum/textfield/src/TextArea.tsx","packages/@react-spectrum/textfield/src/TextFieldBase.tsx","packages/@adobe/spectrum-css-temp/components/textfield/vars.css","packages/@react-spectrum/textfield/src/TextField.tsx"],"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 {TextArea} from './TextArea';\nexport {TextField} from './TextField';\nexport {TextFieldBase} from './TextFieldBase';\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 {chain, useLayoutEffect} from '@react-aria/utils';\nimport React, {RefObject, useCallback, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport {TextFieldBase} from './TextFieldBase';\nimport {useControlledState} from '@react-stately/utils';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTextField} from '@react-aria/textfield';\n\nfunction TextArea(props: SpectrumTextFieldProps, ref: RefObject<TextFieldRef>) {\n props = useProviderProps(props);\n let {\n isDisabled = false,\n isQuiet = false,\n isReadOnly = false,\n isRequired = false,\n onChange,\n ...otherProps\n } = props;\n // not in stately because this is so we know when to re-measure, which is a spectrum design\n let [inputValue, setInputValue] = useControlledState(props.value, props.defaultValue, () => {});\n\n let inputText = props.value ?? props.defaultValue ?? ''; \n let inputRef = useRef<HTMLTextAreaElement>();\n\n let onHeightChange = useCallback(() => {\n if (isQuiet && !isReadOnly) {\n let input = inputRef.current;\n let prevAlignment = input.style.alignSelf;\n input.style.alignSelf = 'start';\n input.style.height = 'auto';\n input.style.height = `${input.scrollHeight}px`;\n input.style.alignSelf = prevAlignment;\n }\n }, [isQuiet, isReadOnly, inputRef]);\n\n useLayoutEffect(() => {\n if (inputRef.current) {\n onHeightChange();\n }\n }, [onHeightChange, inputValue, inputRef]);\n\n if (props.placeholder) {\n console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextArea.html#help-text');\n }\n\n let {labelProps, inputProps, descriptionProps, errorMessageProps} = useTextField({\n ...props,\n onChange: chain(onChange, setInputValue),\n inputElementType: 'textarea'\n }, inputRef);\n\n return (\n <TextFieldBase\n {...otherProps}\n ref={ref}\n inputRef={inputRef}\n labelProps={labelProps}\n inputProps={inputProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n multiLine\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n isReadOnly={isReadOnly}\n isRequired={isRequired} \n readOnlyText={inputText} />\n );\n}\n\n/**\n * TextAreas are multiline text inputs, useful for cases where users have\n * a sizable amount of text to enter. They allow for all customizations that\n * are available to text fields.\n */\nlet _TextArea = React.forwardRef(TextArea);\nexport {_TextArea as TextArea};\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 AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, createFocusableRef} from '@react-spectrum/utils';\nimport {Field} from '@react-spectrum/label';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport {PressEvents} from '@react-types/shared';\nimport React, {cloneElement, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, ReactElement, Ref, RefObject, TextareaHTMLAttributes, useImperativeHandle, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport styles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\nimport {useHover} from '@react-aria/interactions';\n\ninterface TextFieldBaseProps extends Omit<SpectrumTextFieldProps, 'onChange'>, PressEvents {\n wrapperChildren?: ReactElement | ReactElement[],\n inputClassName?: string,\n validationIconClassName?: string,\n multiLine?: boolean,\n labelProps?: LabelHTMLAttributes<HTMLLabelElement>,\n inputProps: InputHTMLAttributes<HTMLInputElement> | TextareaHTMLAttributes<HTMLTextAreaElement>,\n descriptionProps?: HTMLAttributes<HTMLElement>,\n errorMessageProps?: HTMLAttributes<HTMLElement>,\n inputRef?: RefObject<HTMLInputElement | HTMLTextAreaElement>,\n loadingIndicator?: ReactElement,\n isLoading?: boolean,\n readOnlyText?: string\n}\n\nfunction TextFieldBase(props: TextFieldBaseProps, ref: Ref<TextFieldRef>) {\n let {\n label,\n validationState,\n icon,\n isQuiet = false,\n isDisabled,\n multiLine,\n autoFocus,\n inputClassName,\n wrapperChildren,\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n inputRef,\n isLoading,\n loadingIndicator,\n validationIconClassName,\n readOnlyText\n } = props;\n let {hoverProps, isHovered} = useHover({isDisabled});\n let domRef = useRef<HTMLDivElement>(null);\n let defaultInputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n inputRef = inputRef || defaultInputRef;\n \n // Expose imperative interface for ref\n useImperativeHandle(ref, () => ({\n ...createFocusableRef(domRef, inputRef),\n select() {\n if (inputRef.current) {\n inputRef.current.select();\n }\n },\n getInputElement() {\n return inputRef.current;\n }\n }));\n\n let ElementType: React.ElementType = multiLine ? 'textarea' : 'input';\n let isInvalid = validationState === 'invalid';\n\n if (icon) {\n let UNSAFE_className = classNames(\n styles,\n icon.props && icon.props.UNSAFE_className,\n 'spectrum-Textfield-icon'\n );\n\n icon = cloneElement(icon, {\n UNSAFE_className,\n size: 'S'\n });\n }\n\n let validationIcon = isInvalid ? <AlertMedium /> : <CheckmarkMedium />;\n let validation = cloneElement(validationIcon, {\n UNSAFE_className: classNames(\n styles,\n 'spectrum-Textfield-validationIcon',\n validationIconClassName\n )\n });\n\n let textField = (\n <div\n className={\n classNames(\n styles,\n 'spectrum-Textfield',\n {\n 'spectrum-Textfield--invalid': isInvalid,\n 'spectrum-Textfield--valid': validationState === 'valid',\n 'spectrum-Textfield--loadable': loadingIndicator,\n 'spectrum-Textfield--quiet': isQuiet,\n 'spectrum-Textfield--multiline': multiLine\n }\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} isTextInput autoFocus={autoFocus}>\n <ElementType\n {...mergeProps(inputProps, hoverProps)}\n ref={inputRef as any}\n rows={multiLine ? 1 : undefined}\n className={\n classNames(\n styles,\n 'spectrum-Textfield-input',\n {\n 'spectrum-Textfield-inputIcon': icon,\n 'is-hovered': isHovered\n },\n inputClassName\n )\n } />\n </FocusRing>\n {icon}\n {validationState && !isLoading ? validation : null}\n {isLoading && loadingIndicator}\n {wrapperChildren}\n </div>\n );\n\n if (label) {\n textField = React.cloneElement(textField, mergeProps(textField.props, {\n className: multiLine ? 'spectrum-Field-field--multiline' : ''\n }));\n }\n \n return (\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon={false}\n ref={domRef}\n readOnlyText={readOnlyText}\n inputProps={inputProps}>\n {textField}\n </Field>\n );\n}\n\nconst _TextFieldBase = forwardRef(TextFieldBase);\nexport {_TextFieldBase as TextFieldBase};\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 React, {forwardRef, RefObject, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport {TextFieldBase} from './TextFieldBase';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTextField} from '@react-aria/textfield';\n\nfunction TextField(props: SpectrumTextFieldProps, ref: RefObject<TextFieldRef>) {\n props = useProviderProps(props);\n let inputText = props.value ?? props.defaultValue ?? ''; \n let inputRef = useRef<HTMLInputElement>();\n let {labelProps, inputProps, descriptionProps, errorMessageProps} = useTextField(props, inputRef);\n\n if (props.placeholder) {\n console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextField.html#help-text');\n }\n \n return (\n <TextFieldBase\n {...props}\n labelProps={labelProps}\n inputProps={inputProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n ref={ref}\n inputRef={inputRef} \n readOnlyText={inputText} />\n );\n}\n\n/**\n * TextFields are text inputs that allow users to input custom text entries\n * with a keyboard. Various decorations can be displayed around the field to\n * communicate the entry requirements.\n */\nconst _TextField = forwardRef(TextField);\nexport {_TextField as TextField};\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;AAwBA,4BAA6B,SAAQ,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,EAAE,WAAW;IACxF,eAAe,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IACnD,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,GAAG,uBAAuB,mBAAmB,CAAC,CAAC;IAChG,gBAAgB,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAC/C,iBAAiB,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,UAAU,gBAAgB,GAAG,mBAAmB,CAAC,CAAC;IAC7D,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AA8HD,OAAA,MAAM,sGAA0C,CAAC;AClFjD;;;;GAIG;AACH,OAAA,IAAI,qGAAsC,CAAC;AC7C3C;;;;GAIG;AACH,OAAA,MAAM,sGAAkC,CAAC","sources":["packages/@react-spectrum/textfield/src/packages/@react-spectrum/textfield/src/TextFieldBase.tsx","packages/@react-spectrum/textfield/src/packages/@react-spectrum/textfield/src/TextArea.tsx","packages/@react-spectrum/textfield/src/packages/@react-spectrum/textfield/src/TextField.tsx","packages/@react-spectrum/textfield/src/packages/@react-spectrum/textfield/src/index.ts","packages/@react-spectrum/textfield/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 './TextArea';\nexport * from './TextField';\nexport * from './TextFieldBase';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AAwBA,4BAA6B,SAAQ,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,EAAE,WAAW;IACxF,eAAe,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IACnD,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,GAAG,uBAAuB,mBAAmB,CAAC,CAAC;IAChG,gBAAgB,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAC/C,iBAAiB,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,UAAU,gBAAgB,GAAG,mBAAmB,CAAC,CAAC;IAC7D,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AA8HD,OAAA,MAAM,sGAA0C,CAAC;AClFjD;;;;GAIG;AACH,OAAA,IAAI,qGAAsC,CAAC;AC7C3C;;;;GAIG;AACH,OAAA,MAAM,sGAAkC,CAAC","sources":["packages/@react-spectrum/textfield/src/packages/@react-spectrum/textfield/src/TextFieldBase.tsx","packages/@react-spectrum/textfield/src/packages/@react-spectrum/textfield/src/TextArea.tsx","packages/@react-spectrum/textfield/src/packages/@react-spectrum/textfield/src/TextField.tsx","packages/@react-spectrum/textfield/src/packages/@react-spectrum/textfield/src/index.ts","packages/@react-spectrum/textfield/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 {TextArea} from './TextArea';\nexport {TextField} from './TextField';\nexport {TextFieldBase} from './TextFieldBase';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/textfield",
3
- "version": "3.0.0-nightly.1659+da520fcc1",
3
+ "version": "3.0.0-nightly.1668+bc1e8f829",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,21 +32,21 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/focus": "3.0.0-nightly.1659+da520fcc1",
36
- "@react-aria/i18n": "3.0.0-nightly.1659+da520fcc1",
37
- "@react-aria/interactions": "3.0.0-nightly.1659+da520fcc1",
38
- "@react-aria/textfield": "3.0.0-nightly.1659+da520fcc1",
39
- "@react-aria/utils": "3.0.0-nightly.1659+da520fcc1",
40
- "@react-spectrum/label": "3.6.2-nightly.3359+da520fcc1",
41
- "@react-spectrum/utils": "3.0.0-nightly.1659+da520fcc1",
42
- "@react-stately/utils": "3.0.0-nightly.1659+da520fcc1",
43
- "@react-types/shared": "3.0.0-nightly.1659+da520fcc1",
44
- "@react-types/textfield": "3.0.0-nightly.1659+da520fcc1",
45
- "@spectrum-icons/ui": "3.0.0-nightly.1659+da520fcc1"
35
+ "@react-aria/focus": "3.0.0-nightly.1668+bc1e8f829",
36
+ "@react-aria/i18n": "3.0.0-nightly.1668+bc1e8f829",
37
+ "@react-aria/interactions": "3.0.0-nightly.1668+bc1e8f829",
38
+ "@react-aria/textfield": "3.0.0-nightly.1668+bc1e8f829",
39
+ "@react-aria/utils": "3.0.0-nightly.1668+bc1e8f829",
40
+ "@react-spectrum/label": "3.6.2-nightly.3368+bc1e8f829",
41
+ "@react-spectrum/utils": "3.0.0-nightly.1668+bc1e8f829",
42
+ "@react-stately/utils": "3.0.0-nightly.1668+bc1e8f829",
43
+ "@react-types/shared": "3.0.0-nightly.1668+bc1e8f829",
44
+ "@react-types/textfield": "3.0.0-nightly.1668+bc1e8f829",
45
+ "@spectrum-icons/ui": "3.0.0-nightly.1668+bc1e8f829"
46
46
  },
47
47
  "devDependencies": {
48
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1659+da520fcc1",
49
- "@spectrum-icons/workflow": "3.0.0-nightly.1659+da520fcc1"
48
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1668+bc1e8f829",
49
+ "@spectrum-icons/workflow": "3.0.0-nightly.1668+bc1e8f829"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@react-spectrum/provider": "^3.0.0",
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "da520fcc159ddc694fd7bdf19cbc485c2e0c6e4b"
58
+ "gitHead": "bc1e8f82922ee0e7d52602efa30ff76dbc4e4708"
59
59
  }
package/src/index.ts CHANGED
@@ -12,6 +12,6 @@
12
12
 
13
13
  /// <reference types="css-module-types" />
14
14
 
15
- export * from './TextArea';
16
- export * from './TextField';
17
- export * from './TextFieldBase';
15
+ export {TextArea} from './TextArea';
16
+ export {TextField} from './TextField';
17
+ export {TextFieldBase} from './TextFieldBase';