@spectrum-web-components/button
Version:
An `<sp-button>` represents an action a user can take. sp-buttons can be clicked or tapped to perform an action or to navigate to another page. Buttons in Spectrum have several variations for different uses and multiple levels of loudness for various atte
1,707 lines • 56.1 kB
JSON
{
"schemaVersion": "1.0.0",
"readme": "",
"modules": [
{
"kind": "javascript-module",
"path": "sp-button.js",
"declarations": [],
"exports": [
{
"kind": "custom-element-definition",
"name": "sp-button",
"declaration": {
"name": "Button",
"module": "/src/Button.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "sp-clear-button.js",
"declarations": [],
"exports": [
{
"kind": "custom-element-definition",
"name": "sp-clear-button",
"declaration": {
"name": "ClearButton",
"module": "/src/ClearButton.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "sp-close-button.js",
"declarations": [],
"exports": [
{
"kind": "custom-element-definition",
"name": "sp-close-button",
"declaration": {
"name": "CloseButton",
"module": "/src/CloseButton.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/Button.js",
"declarations": [
{
"kind": "variable",
"name": "VALID_VARIANTS",
"type": {
"text": "array"
},
"default": "[ 'accent', 'primary', 'secondary', 'negative', 'white', 'black', ]"
},
{
"kind": "variable",
"name": "VALID_STATIC_COLORS",
"type": {
"text": "array"
},
"default": "['white', 'black']"
},
{
"kind": "class",
"description": "",
"name": "Button",
"slots": [
{
"description": "text label of the Button",
"name": "",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
},
{
"description": "The icon to use for Button",
"name": "icon",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
}
],
"members": [
{
"kind": "field",
"name": "pendingLabel",
"type": {
"text": "string"
},
"privacy": "public",
"default": "'Pending'",
"attribute": "pending-label"
},
{
"kind": "field",
"name": "pending",
"type": {
"text": "boolean"
},
"privacy": "public",
"default": "false",
"attribute": "pending",
"reflects": true
},
{
"kind": "field",
"name": "pendingStateController",
"type": {
"text": "PendingStateController<this>"
},
"privacy": "public",
"default": "new PendingStateController(this)"
},
{
"kind": "method",
"name": "click",
"privacy": "public",
"return": {
"type": {
"text": "void"
}
}
},
{
"kind": "field",
"name": "variant",
"type": {
"text": "ButtonVariants"
},
"privacy": "public",
"description": "The visual variant to apply to this button.",
"attribute": "variant"
},
{
"kind": "field",
"name": "_variant",
"type": {
"text": "ButtonVariants"
},
"privacy": "private",
"default": "'accent'"
},
{
"kind": "field",
"name": "staticColor",
"type": {
"text": "'black' | 'white' | undefined"
},
"privacy": "public",
"description": "The static color variant to use for this button.",
"attribute": "static-color",
"reflects": true
},
{
"kind": "field",
"name": "treatment",
"type": {
"text": "ButtonTreatments"
},
"privacy": "public",
"default": "'fill'",
"description": "The visual treatment to apply to this button.",
"attribute": "treatment",
"reflects": true
},
{
"kind": "field",
"name": "quiet",
"privacy": "public",
"description": "Style this button to be less obvious",
"type": {
"text": "boolean"
},
"attribute": "quiet"
},
{
"kind": "field",
"name": "noWrap",
"type": {
"text": "boolean"
},
"privacy": "public",
"default": "false",
"description": "Disables text wrapping within the button component's label.\nPlease note that this option is not a part of the design specification\nand should be used carefully, with consideration of this overflow behavior\nand the readability of the button's content.",
"attribute": "no-wrap",
"reflects": true
},
{
"kind": "method",
"name": "renderButton",
"privacy": "protected",
"return": {
"type": {
"text": "TemplateResult"
}
},
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "active",
"type": {
"text": "boolean"
},
"privacy": "public",
"default": "false",
"attribute": "active",
"reflects": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "type",
"type": {
"text": "'button' | 'submit' | 'reset'"
},
"privacy": "public",
"default": "'button'",
"description": "The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
"attribute": "type",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "anchorElement",
"type": {
"text": "HTMLAnchorElement"
},
"privacy": "private",
"description": "HTML anchor element that component clicks by proxy",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "focusElement",
"type": {
"text": "HTMLElement"
},
"privacy": "public",
"readonly": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "hasLabel",
"type": {
"text": "boolean"
},
"privacy": "protected",
"readonly": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "buttonContent",
"type": {
"text": "TemplateResult[]"
},
"privacy": "protected",
"readonly": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "handleClickCapture",
"privacy": "private",
"return": {
"type": {
"text": "void | boolean"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "Event"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "proxyFocus",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
},
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "shouldProxyClick",
"privacy": "private",
"return": {
"type": {
"text": "boolean"
}
},
"parameters": [
{
"name": "event",
"optional": true,
"type": {
"text": "MouseEvent"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "renderAnchor",
"privacy": "public",
"return": {
"type": {
"text": "TemplateResult"
}
},
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "handleKeydown",
"privacy": "protected",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "KeyboardEvent"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "handleKeypress",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "KeyboardEvent"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "handleKeyup",
"privacy": "protected",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "KeyboardEvent"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "manageAnchor",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
},
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
}
],
"attributes": [
{
"name": "pending-label",
"type": {
"text": "string"
},
"default": "'Pending'",
"fieldName": "pendingLabel"
},
{
"name": "pending",
"type": {
"text": "boolean"
},
"default": "false",
"fieldName": "pending"
},
{
"name": "variant",
"type": {
"text": "ButtonVariants"
},
"description": "The visual variant to apply to this button.",
"fieldName": "variant"
},
{
"name": "static-color",
"type": {
"text": "'black' | 'white' | undefined"
},
"description": "The static color variant to use for this button.",
"fieldName": "staticColor"
},
{
"name": "treatment",
"type": {
"text": "ButtonTreatments"
},
"default": "'fill'",
"description": "The visual treatment to apply to this button.",
"fieldName": "treatment"
},
{
"name": "quiet",
"description": "Style this button to be less obvious",
"type": {
"text": "boolean"
},
"fieldName": "quiet"
},
{
"name": "no-wrap",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Disables text wrapping within the button component's label.\nPlease note that this option is not a part of the design specification\nand should be used carefully, with consideration of this overflow behavior\nand the readability of the button's content.",
"fieldName": "noWrap"
},
{
"name": "active",
"type": {
"text": "boolean"
},
"default": "false",
"fieldName": "active",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
},
{
"name": "type",
"type": {
"text": "'button' | 'submit' | 'reset'"
},
"default": "'button'",
"description": "The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
"fieldName": "type",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
}
],
"mixins": [
{
"name": "SizedMixin",
"package": "@spectrum-web-components/base"
}
],
"superclass": {
"name": "ButtonBase",
"module": "/src/ButtonBase.js"
},
"tagName": "sp-button",
"customElement": true
}
],
"exports": [
{
"kind": "js",
"name": "VALID_VARIANTS",
"declaration": {
"name": "VALID_VARIANTS",
"module": "src/Button.js"
}
},
{
"kind": "js",
"name": "VALID_STATIC_COLORS",
"declaration": {
"name": "VALID_STATIC_COLORS",
"module": "src/Button.js"
}
},
{
"kind": "js",
"name": "Button",
"declaration": {
"name": "Button",
"module": "src/Button.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/ButtonBase.js",
"declarations": [
{
"kind": "class",
"description": "",
"name": "ButtonBase",
"slots": [
{
"description": "text content to be displayed in the Button element",
"name": ""
},
{
"description": "icon element(s) to display at the start of the button",
"name": "icon"
}
],
"members": [
{
"kind": "field",
"name": "active",
"type": {
"text": "boolean"
},
"privacy": "public",
"default": "false",
"attribute": "active",
"reflects": true
},
{
"kind": "field",
"name": "type",
"type": {
"text": "'button' | 'submit' | 'reset'"
},
"privacy": "public",
"default": "'button'",
"description": "The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
"attribute": "type"
},
{
"kind": "field",
"name": "anchorElement",
"type": {
"text": "HTMLAnchorElement"
},
"privacy": "private",
"description": "HTML anchor element that component clicks by proxy"
},
{
"kind": "field",
"name": "focusElement",
"type": {
"text": "HTMLElement"
},
"privacy": "public",
"readonly": true
},
{
"kind": "field",
"name": "hasLabel",
"type": {
"text": "boolean"
},
"privacy": "protected",
"readonly": true
},
{
"kind": "field",
"name": "buttonContent",
"type": {
"text": "TemplateResult[]"
},
"privacy": "protected",
"readonly": true
},
{
"kind": "method",
"name": "handleClickCapture",
"privacy": "private",
"return": {
"type": {
"text": "void | boolean"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "Event"
}
}
]
},
{
"kind": "method",
"name": "proxyFocus",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
}
},
{
"kind": "method",
"name": "shouldProxyClick",
"privacy": "private",
"return": {
"type": {
"text": "boolean"
}
},
"parameters": [
{
"name": "event",
"optional": true,
"type": {
"text": "MouseEvent"
}
}
]
},
{
"kind": "method",
"name": "renderAnchor",
"privacy": "public",
"return": {
"type": {
"text": "TemplateResult"
}
}
},
{
"kind": "method",
"name": "renderButton",
"privacy": "protected",
"return": {
"type": {
"text": "TemplateResult"
}
}
},
{
"kind": "method",
"name": "handleKeydown",
"privacy": "protected",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "KeyboardEvent"
}
}
]
},
{
"kind": "method",
"name": "handleKeypress",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "KeyboardEvent"
}
}
]
},
{
"kind": "method",
"name": "handleKeyup",
"privacy": "protected",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "KeyboardEvent"
}
}
]
},
{
"kind": "method",
"name": "manageAnchor",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
}
}
],
"attributes": [
{
"name": "active",
"type": {
"text": "boolean"
},
"default": "false",
"fieldName": "active"
},
{
"name": "type",
"type": {
"text": "'button' | 'submit' | 'reset'"
},
"default": "'button'",
"description": "The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
"fieldName": "type"
}
],
"mixins": [
{
"name": "ObserveSlotText",
"package": "@spectrum-web-components/shared/src/observe-slot-text.js"
},
{
"name": "LikeAnchor",
"package": "@spectrum-web-components/shared/src/like-anchor.js"
}
],
"superclass": {
"name": "Focusable",
"package": "@spectrum-web-components/shared/src/focusable.js"
}
}
],
"exports": [
{
"kind": "js",
"name": "ButtonBase",
"declaration": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/ClearButton.js",
"declarations": [
{
"kind": "class",
"description": "",
"name": "ClearButton",
"members": [
{
"kind": "field",
"name": "label",
"type": {
"text": "string"
},
"privacy": "public",
"description": "An accessible label that describes the component.\nIt will be applied to aria-label, but not visually rendered.\nThis attribute is required for clear buttons.",
"attribute": "label"
},
{
"kind": "field",
"name": "quiet",
"type": {
"text": "boolean"
},
"privacy": "public",
"default": "false",
"attribute": "quiet",
"reflects": true
},
{
"kind": "field",
"name": "variant",
"privacy": "public",
"description": "The visual variant to apply to this button.",
"deprecated": "Use `static-color='white'` instead.",
"type": {
"text": "'overBackground' | undefined"
},
"attribute": "variant",
"reflects": true
},
{
"kind": "field",
"name": "_variant",
"type": {
"text": "'overBackground' | undefined"
},
"privacy": "private"
},
{
"kind": "field",
"name": "staticColor",
"type": {
"text": "'white' | undefined"
},
"privacy": "public",
"description": "The visual variant to apply to this button.",
"attribute": "static-color",
"reflects": true
},
{
"kind": "field",
"name": "buttonContent",
"type": {
"text": "TemplateResult[]"
},
"privacy": "protected",
"readonly": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "active",
"type": {
"text": "boolean"
},
"privacy": "public",
"default": "false",
"attribute": "active",
"reflects": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "type",
"type": {
"text": "'button' | 'submit' | 'reset'"
},
"privacy": "public",
"default": "'button'",
"description": "The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
"attribute": "type",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "anchorElement",
"type": {
"text": "HTMLAnchorElement"
},
"privacy": "private",
"description": "HTML anchor element that component clicks by proxy",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "focusElement",
"type": {
"text": "HTMLElement"
},
"privacy": "public",
"readonly": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "hasLabel",
"type": {
"text": "boolean"
},
"privacy": "protected",
"readonly": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "handleClickCapture",
"privacy": "private",
"return": {
"type": {
"text": "void | boolean"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "Event"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "proxyFocus",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
},
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "shouldProxyClick",
"privacy": "private",
"return": {
"type": {
"text": "boolean"
}
},
"parameters": [
{
"name": "event",
"optional": true,
"type": {
"text": "MouseEvent"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "renderAnchor",
"privacy": "public",
"return": {
"type": {
"text": "TemplateResult"
}
},
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "renderButton",
"privacy": "protected",
"return": {
"type": {
"text": "TemplateResult"
}
},
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "handleKeydown",
"privacy": "protected",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "KeyboardEvent"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "handleKeypress",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "KeyboardEvent"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "handleKeyup",
"privacy": "protected",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "KeyboardEvent"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "manageAnchor",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
},
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
}
],
"attributes": [
{
"type": {
"text": "string"
},
"description": "An accessible label that describes the component.\nIt will be applied to aria-label, but not visually rendered.\nThis attribute is required for clear buttons.",
"name": "label",
"fieldName": "label"
},
{
"name": "quiet",
"type": {
"text": "boolean"
},
"default": "false",
"fieldName": "quiet"
},
{
"name": "variant",
"description": "The visual variant to apply to this button.",
"deprecated": "Use `static-color='white'` instead.",
"type": {
"text": "'overBackground' | undefined"
},
"fieldName": "variant"
},
{
"name": "static-color",
"type": {
"text": "'white' | undefined"
},
"description": "The visual variant to apply to this button.",
"fieldName": "staticColor"
},
{
"name": "active",
"type": {
"text": "boolean"
},
"default": "false",
"fieldName": "active",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
},
{
"name": "type",
"type": {
"text": "'button' | 'submit' | 'reset'"
},
"default": "'button'",
"description": "The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
"fieldName": "type",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
}
],
"mixins": [
{
"name": "SizedMixin",
"package": "@spectrum-web-components/base"
}
],
"superclass": {
"name": "StyledButton",
"module": "/src/StyledButton.js"
},
"tagName": "sp-clear-button",
"customElement": true,
"slots": [
{
"description": "text content to be displayed in the Button element",
"name": "",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
},
{
"description": "icon element(s) to display at the start of the button",
"name": "icon",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
}
]
}
],
"exports": [
{
"kind": "js",
"name": "ClearButton",
"declaration": {
"name": "ClearButton",
"module": "src/ClearButton.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/CloseButton.js",
"declarations": [
{
"kind": "class",
"description": "",
"name": "CloseButton",
"slots": [
{
"description": "text label of the Close Button",
"name": "",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
},
{
"description": "icon element(s) to display at the start of the button",
"name": "icon",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
}
],
"members": [
{
"kind": "field",
"name": "variant",
"type": {
"text": "ButtonStaticColors | ''"
},
"privacy": "public",
"default": "''",
"description": "The visual variant to apply to this button.",
"attribute": "variant",
"reflects": true
},
{
"kind": "field",
"name": "staticColor",
"type": {
"text": "'black' | 'white' | undefined"
},
"privacy": "public",
"attribute": "static-color",
"reflects": true
},
{
"kind": "field",
"name": "buttonContent",
"type": {
"text": "TemplateResult[]"
},
"privacy": "protected",
"readonly": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "active",
"type": {
"text": "boolean"
},
"privacy": "public",
"default": "false",
"attribute": "active",
"reflects": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "type",
"type": {
"text": "'button' | 'submit' | 'reset'"
},
"privacy": "public",
"default": "'button'",
"description": "The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
"attribute": "type",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "anchorElement",
"type": {
"text": "HTMLAnchorElement"
},
"privacy": "private",
"description": "HTML anchor element that component clicks by proxy",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "focusElement",
"type": {
"text": "HTMLElement"
},
"privacy": "public",
"readonly": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "hasLabel",
"type": {
"text": "boolean"
},
"privacy": "protected",
"readonly": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "handleClickCapture",
"privacy": "private",
"return": {
"type": {
"text": "void | boolean"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "Event"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "proxyFocus",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
},
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "shouldProxyClick",
"privacy": "private",
"return": {
"type": {
"text": "boolean"
}
},
"parameters": [
{
"name": "event",
"optional": true,
"type": {
"text": "MouseEvent"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "renderAnchor",
"privacy": "public",
"return": {
"type": {
"text": "TemplateResult"
}
},
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "renderButton",
"privacy": "protected",
"return": {
"type": {
"text": "TemplateResult"
}
},
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "handleKeydown",
"privacy": "protected",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "KeyboardEvent"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "handleKeypress",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "KeyboardEvent"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "handleKeyup",
"privacy": "protected",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "event",
"type": {
"text": "KeyboardEvent"
}
}
],
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "method",
"name": "manageAnchor",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
},
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
}
],
"attributes": [
{
"name": "variant",
"type": {
"text": "ButtonStaticColors | ''"
},
"default": "''",
"description": "The visual variant to apply to this button.",
"fieldName": "variant"
},
{
"name": "static-color",
"type": {
"text": "'black' | 'white' | undefined"
},
"fieldName": "staticColor"
},
{
"name": "active",
"type": {
"text": "boolean"
},
"default": "false",
"fieldName": "active",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
},
{
"name": "type",
"type": {
"text": "'button' | 'submit' | 'reset'"
},
"default": "'button'",
"description": "The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
"fieldName": "type",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
}
],
"mixins": [
{
"name": "SizedMixin",
"package": "@spectrum-web-components/base"
}
],
"superclass": {
"name": "StyledButton",
"module": "/src/StyledButton.js"
},
"tagName": "sp-close-button",
"customElement": true
}
],
"exports": [
{
"kind": "js",
"name": "CloseButton",
"declaration": {
"name": "CloseButton",
"module": "src/CloseButton.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/StyledButton.js",
"declarations": [
{
"kind": "class",
"description": "",
"name": "StyledButton",
"superclass": {
"name": "ButtonBase",
"module": "/src/ButtonBase.js"
},
"slots": [
{
"description": "text content to be displayed in the Button element",
"name": "",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
},
{
"description": "icon element(s) to display at the start of the button",
"name": "icon",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
}
],
"attributes": [
{
"name": "active",
"type": {
"text": "boolean"
},
"default": "false",
"fieldName": "active",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
},
{
"name": "type",
"type": {
"text": "'button' | 'submit' | 'reset'"
},
"default": "'button'",
"description": "The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
"fieldName": "type",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.ts"
}
}
],
"members": [
{
"kind": "field",
"name": "active",
"type": {
"text": "boolean"
},
"privacy": "public",
"default": "false",
"attribute": "active",
"reflects": true,
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "type",
"type": {
"text": "'button' | 'submit' | 'reset'"
},
"privacy": "public",
"default": "'button'",
"description": "The default behavior of the button.\nPossible values are: `button` (default), `submit`, and `reset`.",
"attribute": "type",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/ButtonBase.js"
}
},
{
"kind": "field",
"name": "anchorElement",
"type": {
"text": "HTMLAnchorElement"
},
"privacy": "private",
"description": "HTML anchor element that component clicks by proxy",
"inheritedFrom": {
"name": "ButtonBase",
"module": "src/