@raiadrogasil/pulso-react-components
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -45,6 +45,14 @@ export declare type Props = { | ||
*/ | ||
onClick: Function; | ||
onClick?: Function; | ||
/** | ||
* Atributo padrão do elemento \<button\> do HTML. | ||
*/ | ||
onMouseUp?: Function; | ||
/** | ||
* Atributo padrão do elemento \<button\> do HTML. | ||
*/ | ||
onMouseDown?: Function; | ||
/** | ||
* Atributo padrão do elemento \<button\> do HTML. | ||
*/ | ||
disabled?: boolean; | ||
@@ -98,3 +106,5 @@ /** | ||
value?: string | undefined; | ||
onClick: Function; | ||
onClick?: Function; | ||
onMouseUp?: Function; | ||
onMouseDown?: Function; | ||
disabled?: boolean; | ||
@@ -121,3 +131,5 @@ icon: "leading-icon" | "step"; | ||
value?: string | undefined; | ||
onClick: Function; | ||
onClick?: Function; | ||
onMouseUp?: Function; | ||
onMouseDown?: Function; | ||
disabled?: boolean; | ||
@@ -144,3 +156,5 @@ icon: "leading-icon"; | ||
value?: string | undefined; | ||
onClick: Function; | ||
onClick?: Function; | ||
onMouseUp?: Function; | ||
onMouseDown?: Function; | ||
disabled?: boolean; | ||
@@ -171,3 +185,3 @@ icon?: null; | ||
*/ | ||
declare function Button({ autofocus, form, formaction, formenctype, formmethod, formnovalidate, formtarget, name, buttonType, value, onClick, disabled, icon, iconName, inverse, label, size, type, dataQA, dataCollect, dataCollectInfo, }: Props): JSX.Element; | ||
declare function Button({ autofocus, form, formaction, formenctype, formmethod, formnovalidate, formtarget, name, buttonType, value, onClick, onMouseUp, onMouseDown, disabled, icon, iconName, inverse, label, size, type, dataQA, dataCollect, dataCollectInfo, }: Props): JSX.Element; | ||
export default Button; |
@@ -24,3 +24,3 @@ "use strict"; | ||
function Button(_a) { | ||
var autofocus = _a.autofocus, form = _a.form, formaction = _a.formaction, formenctype = _a.formenctype, formmethod = _a.formmethod, formnovalidate = _a.formnovalidate, formtarget = _a.formtarget, name = _a.name, buttonType = _a.buttonType, value = _a.value, onClick = _a.onClick, disabled = _a.disabled, icon = _a.icon, iconName = _a.iconName, inverse = _a.inverse, label = _a.label, size = _a.size, type = _a.type, dataQA = _a.dataQA, dataCollect = _a.dataCollect, dataCollectInfo = _a.dataCollectInfo; | ||
var autofocus = _a.autofocus, form = _a.form, formaction = _a.formaction, formenctype = _a.formenctype, formmethod = _a.formmethod, formnovalidate = _a.formnovalidate, formtarget = _a.formtarget, name = _a.name, buttonType = _a.buttonType, value = _a.value, onClick = _a.onClick, onMouseUp = _a.onMouseUp, onMouseDown = _a.onMouseDown, disabled = _a.disabled, icon = _a.icon, iconName = _a.iconName, inverse = _a.inverse, label = _a.label, size = _a.size, type = _a.type, dataQA = _a.dataQA, dataCollect = _a.dataCollect, dataCollectInfo = _a.dataCollectInfo; | ||
var mainElement = "pulso-button"; | ||
@@ -35,2 +35,6 @@ var mainClass = mainElement + | ||
onClick ? onClick(event) : null; | ||
}, onMouseDown: function (event) { | ||
onMouseDown ? onMouseDown(event) : null; | ||
}, onMouseUp: function (event) { | ||
onMouseUp ? onMouseUp(event) : null; | ||
}, disabled: disabled ? disabled : false, tabIndex: 0, autoFocus: autofocus ? autofocus : false, form: form ? form : undefined, formAction: formaction ? formaction : undefined, formEncType: formenctype ? formenctype : undefined, formMethod: formmethod ? formmethod : undefined, formNoValidate: formnovalidate ? formnovalidate : undefined, formTarget: formtarget ? formtarget : undefined, name: name ? name : undefined, type: buttonType ? buttonType : undefined, value: value ? value : undefined, "data-qa": dataQA ? dataQA : null, "data-collect": dataCollect ? dataCollect : null, "data-collect-info": dataCollectInfo ? dataCollectInfo : null }, type === "icon-only" ? (iconName && react_1.default.createElement(Icon_1.default, { size: "medium", symbol: iconName })) : (react_1.default.createElement(react_1.default.Fragment, null, | ||
@@ -37,0 +41,0 @@ icon === "leading-icon" && iconName && (react_1.default.createElement("span", { className: mainElement + "__leading-icon" }, |
@@ -17,3 +17,3 @@ export { default as ThemeProvider } from "./ThemeProvider"; | ||
export { default as RadioCustom } from "./RadioCustom"; | ||
export { default as Search } from "./Search"; | ||
export { default as SearchBar } from "./SearchBar"; | ||
export { default as Select } from "./Select"; | ||
@@ -20,0 +20,0 @@ export { default as Subtitle } from "./Subtitle"; |
@@ -35,4 +35,4 @@ "use strict"; | ||
exports.RadioCustom = RadioCustom_1.default; | ||
var Search_1 = require("./Search"); | ||
exports.Search = Search_1.default; | ||
var SearchBar_1 = require("./SearchBar"); | ||
exports.SearchBar = SearchBar_1.default; | ||
var Select_1 = require("./Select"); | ||
@@ -39,0 +39,0 @@ exports.Select = Select_1.default; |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"main": "./index.js", | ||
@@ -11,0 +11,0 @@ "keywords": [ |
459726
4452