@rescui/button
Advanced tools
Comparing version 0.13.3 to 0.14.0
@@ -131,3 +131,7 @@ import "core-js/modules/es.object.to-string.js"; | ||
className: cn(styles.main, MODE_STYLES[mode], SIZE_STYLES[size], ICON_POSITION_STYLES[iconPosition], styles[theme], (_cn = {}, _defineProperty(_cn, styles.disabled, disabled), _defineProperty(_cn, styles.flatLeft, flat === 'left'), _defineProperty(_cn, styles.flatRight, flat === 'right'), _defineProperty(_cn, styles.highlighted, highlighted), _defineProperty(_cn, styles.withIcon, !!icon), _defineProperty(_cn, styles.withoutText, isWithoutText), _defineProperty(_cn, styles.shiftedLeft, shiftedLeft), _defineProperty(_cn, styles.shiftedRight, shiftedRight), _defineProperty(_cn, styles.shiftedTop, shiftedTop), _defineProperty(_cn, styles.shiftedBottom, shiftedBottom), _defineProperty(_cn, styles.multiline, multiline), _defineProperty(_cn, styles.allowMultiline, allowMultiline), _defineProperty(_cn, styles.busy, busy), _defineProperty(_cn, styles.busyOverlay, showBusyOverlay), _cn), className) | ||
}; | ||
}; // Google Translate replaces TextNodes on page which is leading to a React error on manipulating buttonChildren e.g. when switching to the busy state. | ||
// To prevent this we wrap text node in a span element which itself will not be replaced by Google Translate. | ||
// More info here: https://github.com/facebook/react/issues/11538 | ||
var buttonContent = !isWithoutText && typeof children === 'string' ? /*#__PURE__*/React.createElement("span", null, children) : children; | ||
var buttonChildren = /*#__PURE__*/React.createElement(React.Fragment, null, iconSlot, showBusyOverlay && /*#__PURE__*/React.createElement(LoadingIcon, { | ||
@@ -137,3 +141,3 @@ className: styles.busyIcon, | ||
"data-test": "busy-icon" | ||
}), children); | ||
}), buttonContent); | ||
@@ -140,0 +144,0 @@ if (notFocusable) { |
var styles = { | ||
"main": "_main_ia2wq9_17", | ||
"rs-reset-letter-spacing": "_rs-reset-letter-spacing_ia2wq9_1", | ||
"busy": "_busy_ia2wq9_49", | ||
"busyOverlay": "_busyOverlay_ia2wq9_53", | ||
"light": "_light_ia2wq9_59", | ||
"disabled": "_disabled_ia2wq9_61", | ||
"dark": "_dark_ia2wq9_62", | ||
"alignIconLeft": "_alignIconLeft_ia2wq9_78", | ||
"alignIconRight": "_alignIconRight_ia2wq9_82", | ||
"sizeXs": "_sizeXs_ia2wq9_86", | ||
"sizeS": "_sizeS_ia2wq9_93", | ||
"sizeM": "_sizeM_ia2wq9_100", | ||
"sizeL": "_sizeL_ia2wq9_107", | ||
"allowMultiline": "_allowMultiline_ia2wq9_115", | ||
"multiline": "_multiline_ia2wq9_119", | ||
"withoutText": "_withoutText_ia2wq9_139", | ||
"withIcon": "_withIcon_ia2wq9_145", | ||
"busyIcon": "_busyIcon_ia2wq9_151", | ||
"flatRight": "_flatRight_ia2wq9_159", | ||
"flatLeft": "_flatLeft_ia2wq9_164", | ||
"modeClassic": "_modeClassic_ia2wq9_169", | ||
"modeRock": "_modeRock_ia2wq9_242", | ||
"modeTransparent": "_modeTransparent_ia2wq9_320", | ||
"modeOutline": "_modeOutline_ia2wq9_390", | ||
"modeClear": "_modeClear_ia2wq9_479", | ||
"highlighted": "_highlighted_ia2wq9_514", | ||
"shiftedLeft": "_shiftedLeft_ia2wq9_565", | ||
"shiftedRight": "_shiftedRight_ia2wq9_566", | ||
"shiftedTop": "_shiftedTop_ia2wq9_567", | ||
"shiftedBottom": "_shiftedBottom_ia2wq9_568", | ||
"icon": "_icon_ia2wq9_570" | ||
"main": "_main_1uycb5t_17", | ||
"rs-reset-letter-spacing": "_rs-reset-letter-spacing_1uycb5t_1", | ||
"busy": "_busy_1uycb5t_49", | ||
"busyOverlay": "_busyOverlay_1uycb5t_53", | ||
"light": "_light_1uycb5t_59", | ||
"disabled": "_disabled_1uycb5t_61", | ||
"dark": "_dark_1uycb5t_62", | ||
"alignIconLeft": "_alignIconLeft_1uycb5t_78", | ||
"alignIconRight": "_alignIconRight_1uycb5t_82", | ||
"sizeXs": "_sizeXs_1uycb5t_86", | ||
"sizeS": "_sizeS_1uycb5t_93", | ||
"sizeM": "_sizeM_1uycb5t_100", | ||
"sizeL": "_sizeL_1uycb5t_107", | ||
"allowMultiline": "_allowMultiline_1uycb5t_115", | ||
"multiline": "_multiline_1uycb5t_119", | ||
"withoutText": "_withoutText_1uycb5t_139", | ||
"withIcon": "_withIcon_1uycb5t_145", | ||
"busyIcon": "_busyIcon_1uycb5t_151", | ||
"flatRight": "_flatRight_1uycb5t_159", | ||
"flatLeft": "_flatLeft_1uycb5t_164", | ||
"modeClassic": "_modeClassic_1uycb5t_169", | ||
"modeRock": "_modeRock_1uycb5t_242", | ||
"modeTransparent": "_modeTransparent_1uycb5t_320", | ||
"modeOutline": "_modeOutline_1uycb5t_390", | ||
"modeClear": "_modeClear_1uycb5t_479", | ||
"highlighted": "_highlighted_1uycb5t_514", | ||
"shiftedLeft": "_shiftedLeft_1uycb5t_565", | ||
"shiftedRight": "_shiftedRight_1uycb5t_566", | ||
"shiftedTop": "_shiftedTop_1uycb5t_567", | ||
"shiftedBottom": "_shiftedBottom_1uycb5t_568", | ||
"icon": "_icon_1uycb5t_570" | ||
}; | ||
export { styles as default }; |
{ | ||
"name": "@rescui/button", | ||
"version": "0.13.3", | ||
"version": "0.14.0", | ||
"description": "", | ||
@@ -39,3 +39,3 @@ "license": "Apache-2.0", | ||
}, | ||
"gitHead": "498f4f71458e1323b14f9182713a7bf213e4333a" | ||
"gitHead": "342bbd302e2e8856be2cd4a61bc323d459e601cb" | ||
} |
Sorry, the diff of this file is not supported yet
58465
1192