@highlight-ui/button
Advanced tools
Comparing version 7.0.0 to 7.0.1
@@ -53,8 +53,8 @@ 'use strict'; | ||
var styles = {"button":"Button-module__3Rp1BYXs__v7-0-0","iconButton":"Button-module__3Y8WdccY__v7-0-0","buttonInner":"Button-module__3ZNLhdsJ__v7-0-0","hiddenButtonLabel":"Button-module__iIVwFpEb__v7-0-0","loadingIcon":"Button-module__PkJtfsRC__v7-0-0","block":"Button-module__1xc1DTHJ__v7-0-0","default":"Button-module__2Kmo3l-q__v7-0-0","focus":"Button-module__39s3axLP__v7-0-0","active":"Button-module__3WXlxxv-__v7-0-0","disabled":"Button-module__yB64MUUF__v7-0-0","primary":"Button-module__2nxVbZSO__v7-0-0","success":"Button-module__2WMN2Up2__v7-0-0","info":"Button-module__3Ll-h-cW__v7-0-0","warning":"Button-module__2Ma4TaUU__v7-0-0","warning-light":"Button-module__2HCrlzv6__v7-0-0","danger":"Button-module__3Eex2siA__v7-0-0","dark":"Button-module__MqwKA-Vc__v7-0-0","light":"Button-module__iJhDdOHm__v7-0-0","defaultOutline":"Button-module__2tKStPHe__v7-0-0","hover":"Button-module__YUN3Kf-p__v7-0-0","tertiary":"Button-module__2yGbvo4L__v7-0-0"}; | ||
var styles = {"button":"Button-module__3Rp1BYXs__v7-0-1","iconButton":"Button-module__3Y8WdccY__v7-0-1","buttonInner":"Button-module__3ZNLhdsJ__v7-0-1","hiddenButtonLabel":"Button-module__iIVwFpEb__v7-0-1","loadingIcon":"Button-module__PkJtfsRC__v7-0-1","block":"Button-module__1xc1DTHJ__v7-0-1","default":"Button-module__2Kmo3l-q__v7-0-1","focus":"Button-module__39s3axLP__v7-0-1","active":"Button-module__3WXlxxv-__v7-0-1","disabled":"Button-module__yB64MUUF__v7-0-1","primary":"Button-module__2nxVbZSO__v7-0-1","success":"Button-module__2WMN2Up2__v7-0-1","info":"Button-module__3Ll-h-cW__v7-0-1","warning":"Button-module__2Ma4TaUU__v7-0-1","warning-light":"Button-module__2HCrlzv6__v7-0-1","danger":"Button-module__3Eex2siA__v7-0-1","dark":"Button-module__MqwKA-Vc__v7-0-1","light":"Button-module__iJhDdOHm__v7-0-1","defaultOutline":"Button-module__2tKStPHe__v7-0-1","hover":"Button-module__YUN3Kf-p__v7-0-1","tertiary":"Button-module__2yGbvo4L__v7-0-1"}; | ||
function ButtonWithRef(_a, ref) { | ||
var _b, _c, _d, _e, _f, _g; | ||
var block = _a.block, _h = _a.children, children = _h === void 0 ? null : _h, className = _a.className, _j = _a.buttonState, buttonState = _j === void 0 ? 'enabled' : _j, icon$1 = _a.icon, metadata = _a.metadata, _k = _a.onClick, onClick = _k === void 0 ? undefined : _k, outline = _a.outline, _l = _a.theme, theme = _l === void 0 ? 'default' : _l, _m = _a.type, type = _m === void 0 ? 'button' : _m, remainingProps = __rest(_a, ["block", "children", "className", "buttonState", "icon", "metadata", "onClick", "outline", "theme", "type"]); | ||
var containerClass = classnames__default['default'](styles.button, (_b = {}, _b[styles[theme]] = !outline, _b), (_c = {}, _c[styles[theme + "Outline"]] = outline, _c), (_d = {}, _d[styles.block] = block, _d), (_e = {}, _e[styles.disabled] = buttonState === 'disabled', _e), (_f = {}, _f[styles.iconButton] = icon$1 !== undefined && children === null, _f), className); | ||
var _b, _c, _d, _e, _f, _g, _h; | ||
var block = _a.block, _j = _a.children, children = _j === void 0 ? null : _j, className = _a.className, _k = _a.buttonState, buttonState = _k === void 0 ? 'enabled' : _k, icon$1 = _a.icon, metadata = _a.metadata, _l = _a.onClick, onClick = _l === void 0 ? undefined : _l, outline = _a.outline, _m = _a.theme, theme = _m === void 0 ? 'default' : _m, _o = _a.type, type = _o === void 0 ? 'button' : _o, remainingProps = __rest(_a, ["block", "children", "className", "buttonState", "icon", "metadata", "onClick", "outline", "theme", "type"]); | ||
var containerClass = classnames__default['default'](styles.button, (_b = {}, _b[styles[theme]] = !outline, _b), (_c = {}, _c[styles[theme + "Outline"]] = outline, _c), (_d = {}, _d[styles.block] = block, _d), (_e = {}, _e[styles.disabled] = buttonState === 'disabled', _e), (_f = {}, _f[styles.iconButton] = icon$1 !== undefined && children === null, _f), (_g = {}, _g[styles.tertiary] = theme === 'tertiary', _g), className); | ||
var focusAwareOnClick = function (event) { | ||
@@ -68,5 +68,5 @@ event.currentTarget.focus(); | ||
type: type, ref: ref }), React__default['default'].createElement(React__default['default'].Fragment, null, | ||
React__default['default'].createElement("div", { className: classnames__default['default'](styles.buttonInner, (_g = {}, | ||
_g[styles.hiddenButtonLabel] = buttonState === 'loading', | ||
_g)) }, | ||
React__default['default'].createElement("div", { className: classnames__default['default'](styles.buttonInner, (_h = {}, | ||
_h[styles.hiddenButtonLabel] = buttonState === 'loading', | ||
_h)) }, | ||
icon$1 && React__default['default'].createElement(icon.Icon, { name: icon$1, size: 14, type: "solid" }), | ||
@@ -73,0 +73,0 @@ children && React__default['default'].createElement("div", { className: styles.buttonContent }, children)), |
@@ -44,8 +44,8 @@ import React from 'react'; | ||
var styles = {"button":"Button-module__3Rp1BYXs__v7-0-0","iconButton":"Button-module__3Y8WdccY__v7-0-0","buttonInner":"Button-module__3ZNLhdsJ__v7-0-0","hiddenButtonLabel":"Button-module__iIVwFpEb__v7-0-0","loadingIcon":"Button-module__PkJtfsRC__v7-0-0","block":"Button-module__1xc1DTHJ__v7-0-0","default":"Button-module__2Kmo3l-q__v7-0-0","focus":"Button-module__39s3axLP__v7-0-0","active":"Button-module__3WXlxxv-__v7-0-0","disabled":"Button-module__yB64MUUF__v7-0-0","primary":"Button-module__2nxVbZSO__v7-0-0","success":"Button-module__2WMN2Up2__v7-0-0","info":"Button-module__3Ll-h-cW__v7-0-0","warning":"Button-module__2Ma4TaUU__v7-0-0","warning-light":"Button-module__2HCrlzv6__v7-0-0","danger":"Button-module__3Eex2siA__v7-0-0","dark":"Button-module__MqwKA-Vc__v7-0-0","light":"Button-module__iJhDdOHm__v7-0-0","defaultOutline":"Button-module__2tKStPHe__v7-0-0","hover":"Button-module__YUN3Kf-p__v7-0-0","tertiary":"Button-module__2yGbvo4L__v7-0-0"}; | ||
var styles = {"button":"Button-module__3Rp1BYXs__v7-0-1","iconButton":"Button-module__3Y8WdccY__v7-0-1","buttonInner":"Button-module__3ZNLhdsJ__v7-0-1","hiddenButtonLabel":"Button-module__iIVwFpEb__v7-0-1","loadingIcon":"Button-module__PkJtfsRC__v7-0-1","block":"Button-module__1xc1DTHJ__v7-0-1","default":"Button-module__2Kmo3l-q__v7-0-1","focus":"Button-module__39s3axLP__v7-0-1","active":"Button-module__3WXlxxv-__v7-0-1","disabled":"Button-module__yB64MUUF__v7-0-1","primary":"Button-module__2nxVbZSO__v7-0-1","success":"Button-module__2WMN2Up2__v7-0-1","info":"Button-module__3Ll-h-cW__v7-0-1","warning":"Button-module__2Ma4TaUU__v7-0-1","warning-light":"Button-module__2HCrlzv6__v7-0-1","danger":"Button-module__3Eex2siA__v7-0-1","dark":"Button-module__MqwKA-Vc__v7-0-1","light":"Button-module__iJhDdOHm__v7-0-1","defaultOutline":"Button-module__2tKStPHe__v7-0-1","hover":"Button-module__YUN3Kf-p__v7-0-1","tertiary":"Button-module__2yGbvo4L__v7-0-1"}; | ||
function ButtonWithRef(_a, ref) { | ||
var _b, _c, _d, _e, _f, _g; | ||
var block = _a.block, _h = _a.children, children = _h === void 0 ? null : _h, className = _a.className, _j = _a.buttonState, buttonState = _j === void 0 ? 'enabled' : _j, icon = _a.icon, metadata = _a.metadata, _k = _a.onClick, onClick = _k === void 0 ? undefined : _k, outline = _a.outline, _l = _a.theme, theme = _l === void 0 ? 'default' : _l, _m = _a.type, type = _m === void 0 ? 'button' : _m, remainingProps = __rest(_a, ["block", "children", "className", "buttonState", "icon", "metadata", "onClick", "outline", "theme", "type"]); | ||
var containerClass = classnames(styles.button, (_b = {}, _b[styles[theme]] = !outline, _b), (_c = {}, _c[styles[theme + "Outline"]] = outline, _c), (_d = {}, _d[styles.block] = block, _d), (_e = {}, _e[styles.disabled] = buttonState === 'disabled', _e), (_f = {}, _f[styles.iconButton] = icon !== undefined && children === null, _f), className); | ||
var _b, _c, _d, _e, _f, _g, _h; | ||
var block = _a.block, _j = _a.children, children = _j === void 0 ? null : _j, className = _a.className, _k = _a.buttonState, buttonState = _k === void 0 ? 'enabled' : _k, icon = _a.icon, metadata = _a.metadata, _l = _a.onClick, onClick = _l === void 0 ? undefined : _l, outline = _a.outline, _m = _a.theme, theme = _m === void 0 ? 'default' : _m, _o = _a.type, type = _o === void 0 ? 'button' : _o, remainingProps = __rest(_a, ["block", "children", "className", "buttonState", "icon", "metadata", "onClick", "outline", "theme", "type"]); | ||
var containerClass = classnames(styles.button, (_b = {}, _b[styles[theme]] = !outline, _b), (_c = {}, _c[styles[theme + "Outline"]] = outline, _c), (_d = {}, _d[styles.block] = block, _d), (_e = {}, _e[styles.disabled] = buttonState === 'disabled', _e), (_f = {}, _f[styles.iconButton] = icon !== undefined && children === null, _f), (_g = {}, _g[styles.tertiary] = theme === 'tertiary', _g), className); | ||
var focusAwareOnClick = function (event) { | ||
@@ -59,5 +59,5 @@ event.currentTarget.focus(); | ||
type: type, ref: ref }), React.createElement(React.Fragment, null, | ||
React.createElement("div", { className: classnames(styles.buttonInner, (_g = {}, | ||
_g[styles.hiddenButtonLabel] = buttonState === 'loading', | ||
_g)) }, | ||
React.createElement("div", { className: classnames(styles.buttonInner, (_h = {}, | ||
_h[styles.hiddenButtonLabel] = buttonState === 'loading', | ||
_h)) }, | ||
icon && React.createElement(Icon, { name: icon, size: 14, type: "solid" }), | ||
@@ -64,0 +64,0 @@ children && React.createElement("div", { className: styles.buttonContent }, children)), |
{ | ||
"name": "@highlight-ui/button", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"description": "The button", | ||
@@ -29,4 +29,4 @@ "author": "Personio GmbH", | ||
"dependencies": { | ||
"@highlight-ui/icon": "^3.0.10", | ||
"@highlight-ui/utils-commons": "^1.3.5" | ||
"@highlight-ui/icon": "^3.0.11", | ||
"@highlight-ui/utils-commons": "^1.3.6" | ||
}, | ||
@@ -37,3 +37,3 @@ "devDependencies": { | ||
"@highlight-ui/configs-scripts": "^1.0.1", | ||
"@highlight-ui/theme": "^4.1.1", | ||
"@highlight-ui/theme": "^4.1.2", | ||
"@storybook/react": "^6.2.9", | ||
@@ -52,3 +52,3 @@ "@testing-library/react": "^12.0.0", | ||
}, | ||
"gitHead": "01301f9494a93591bca4c72d85573d40cf956f0a" | ||
"gitHead": "a34089bfe6d4da96f1055674666904a47abcc9d6" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74668