Skip to main content

Compact Address

<sc-compact-address></sc-compact-address>

This component let users create compact address.

Component Codex

Properties

PropertyDescriptionTypeDefault
addressThe address.{ name?: string; line_1?: string; line_2?: string; city?: string; state?: string; postal_code?: string; country?: string; constructor?: Function; toString?: () => string; toLocaleString?: () => string; valueOf?: () => Object; hasOwnProperty?: (v: PropertyKey) => boolean; isPrototypeOf?: (v: Object) => boolean; propertyIsEnumerable?: (v: PropertyKey) => boolean; }{ country: null, city: null, line_1: null, line_2: null, postal_code: null, state: null, }
labelLabel for the addressstring__('Country or region', 'surecart')
loadingIs this loadingboolean
names{ name?: string; line_1?: string; line_2?: string; city?: string; state?: string; postal_code?: string; country?: string; constructor?: Function; toString?: () => string; toLocaleString?: () => string; valueOf?: () => Object; hasOwnProperty?: (v: PropertyKey) => boolean; isPrototypeOf?: (v: Object) => boolean; propertyIsEnumerable?: (v: PropertyKey) => boolean; }{ country: 'shipping_country', city: 'shipping_city', line_1: 'shipping_line_1', line_2: 'shipping_line_2', postal_code: 'shipping_postal_code', state: 'shipping_state', }
placeholdersPlaceholders{ name?: string; line_1?: string; line_2?: string; city?: string; state?: string; postal_code?: string; country?: string; constructor?: Function; toString?: () => string; toLocaleString?: () => string; valueOf?: () => Object; hasOwnProperty?: (v: PropertyKey) => boolean; isPrototypeOf?: (v: Object) => boolean; propertyIsEnumerable?: (v: PropertyKey) => boolean; }{ country: '', postal_code: '', state: '', }
requiredIs this required?boolean

Events

EventDescriptionType
scChangeAddressAddress change event.CustomEvent<{ name?: string; line_1?: string; line_2?: string; city?: string; state?: string; postal_code?: string; country?: string; constructor?: Function; toString?: () => string; toLocaleString?: () => string; valueOf?: () => Object; hasOwnProperty?: (v: PropertyKey) => boolean; isPrototypeOf?: (v: Object) => boolean; propertyIsEnumerable?: (v: PropertyKey) => boolean; }>
scInputAddressAddress input event.CustomEvent<{ name?: string; line_1?: string; line_2?: string; city?: string; state?: string; postal_code?: string; country?: string; constructor?: Function; toString?: () => string; toLocaleString?: () => string; valueOf?: () => Object; hasOwnProperty?: (v: PropertyKey) => boolean; isPrototypeOf?: (v: Object) => boolean; propertyIsEnumerable?: (v: PropertyKey) => boolean; }>

Methods

reportValidity() => Promise<boolean>

Shadow Parts

PartDescription
baseThe elements base wrapper.
block-uiThe block ui base component.
block-ui__contentThe block ui content (spinner).
caretThe select box caret.
control
emptyThe select empty message.
form-controlThe form control wrapper.
help-textHelp text that describes how to use the input.
inputThe html input element.
input__baseThe inputs base element.
labelThe input label.
menu__baseThe select menu base.
panelThe select box panel.
search__baseThe select search base.
search__form-controlThe select search form control.
search__inputThe select search input.
select__baseThe select boxes base element.
spinner__baseThe select spinner base.
triggerThe select box trigger.