Socket
Socket
Sign inDemoInstall

@highlight-ui/button

Package Overview
Dependencies
Maintainers
9
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@highlight-ui/button - npm Package Compare versions

Comparing version 11.5.7 to 11.5.8

137

dist/cjs/index.js

@@ -6,13 +6,7 @@ 'use strict';

});
var React = require('react');
var classnames = require('classnames');
var utilsCommons = require('@highlight-ui/utils-commons');
var icon = require('@highlight-ui/icon');
var typography = require('@highlight-ui/typography');
function _interopDefaultLegacy(e) {

@@ -23,7 +17,6 @@ return e && typeof e === 'object' && 'default' in e ? e : {

}
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
/*! *****************************************************************************
/******************************************************************************
Copyright (c) Microsoft Corporation.

@@ -43,3 +36,2 @@

var __assign = function () {

@@ -49,17 +41,11 @@ __assign = Object.assign || function __assign(t) {

s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {

@@ -70,42 +56,37 @@ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];

}
var styles$1 = {
"tertiaryButton": "Button-module__3p2cVr8I__v11-5-7",
"focus": "Button-module__39s3axLP__v11-5-7",
"successButton": "Button-module__g3xCMOaO__v11-5-7",
"criticalButton": "Button-module__2DMk5GC2__v11-5-7",
"primaryButton": "Button-module__2dSuQFdg__v11-5-7",
"defaultButton": "Button-module__3iXT1NQi__v11-5-7",
"disabled": "Button-module__yB64MUUF__v11-5-7",
"hover": "Button-module__YUN3Kf-p__v11-5-7",
"active": "Button-module__3WXlxxv-__v11-5-7",
"button": "Button-module__3Rp1BYXs__v11-5-7",
"buttonInner": "Button-module__3ZNLhdsJ__v11-5-7",
"hiddenButtonLabel": "Button-module__iIVwFpEb__v11-5-7",
"loadingIcon": "Button-module__PkJtfsRC__v11-5-7",
"block": "Button-module__1xc1DTHJ__v11-5-7"
"tertiaryButton": "Button-module__F6fyawgV__v11-5-8",
"focus": "Button-module__EP-kfq24__v11-5-8",
"successButton": "Button-module__PBPcEmlr__v11-5-8",
"criticalButton": "Button-module__zgxTtaJC__v11-5-8",
"primaryButton": "Button-module__4XaENasH__v11-5-8",
"defaultButton": "Button-module__nw9w-XEq__v11-5-8",
"disabled": "Button-module__TO8B8d8N__v11-5-8",
"hover": "Button-module__5bzFs5V-__v11-5-8",
"active": "Button-module__G05nEy1h__v11-5-8",
"button": "Button-module__A1jn9qEz__v11-5-8",
"buttonInner": "Button-module__Py81Ifdl__v11-5-8",
"hiddenButtonLabel": "Button-module__OhHVEZ8D__v11-5-8",
"loadingIcon": "Button-module__W5DRK-It__v11-5-8",
"block": "Button-module__kW2vic2l__v11-5-8"
};
function ButtonWithRef(_a, ref) {
var _b, _c, _d;
var block = _a.block,
_e = _a.children,
children = _e === void 0 ? null : _e,
className = _a.className,
_f = _a.buttonState,
buttonState = _f === void 0 ? 'enabled' : _f,
metadata = _a.metadata,
_g = _a.onClick,
onClick = _g === void 0 ? undefined : _g,
theme = _a.theme,
_h = _a.variant,
variant = _h === void 0 ? 'default' : _h,
_j = _a.type,
type = _j === void 0 ? 'button' : _j,
remainingProps = __rest(_a, ["block", "children", "className", "buttonState", "metadata", "onClick", "theme", "variant", "type"]);
_e = _a.children,
children = _e === void 0 ? null : _e,
className = _a.className,
_f = _a.buttonState,
buttonState = _f === void 0 ? 'enabled' : _f,
metadata = _a.metadata,
_g = _a.onClick,
onClick = _g === void 0 ? undefined : _g,
theme = _a.theme,
_h = _a.variant,
variant = _h === void 0 ? 'default' : _h,
_j = _a.type,
type = _j === void 0 ? 'button' : _j,
remainingProps = __rest(_a, ["block", "children", "className", "buttonState", "metadata", "onClick", "theme", "variant", "type"]);
var variantOrDeprecatedTheme = typeof theme !== 'undefined' ? theme : variant;
var containerClass = classnames__default["default"](styles$1.button, styles$1[variantOrDeprecatedTheme + "Button"], (_b = {}, _b[styles$1.block] = block, _b), (_c = {}, _c[styles$1.disabled] = buttonState === 'disabled' || buttonState === 'loading', _c), className);
var focusAwareOnClick = function (event) {

@@ -115,3 +96,2 @@ event.currentTarget.focus();

};
return React__default["default"].createElement('button', __assign(__assign(__assign({}, remainingProps), utilsCommons.parseMetadata(metadata)), {

@@ -121,3 +101,2 @@ className: containerClass,

onClick: focusAwareOnClick,
/* eslint-disable react/button-has-type */

@@ -139,40 +118,35 @@ type: type,

}
ButtonWithRef.displayName = 'Button';
var Button = React__default["default"].forwardRef(ButtonWithRef);
var styles = {
"tertiaryButton": "IconButton-module__WllMogbw__v11-5-7",
"focus": "IconButton-module__3MskydD-__v11-5-7",
"successButton": "IconButton-module__3onntJjp__v11-5-7",
"criticalButton": "IconButton-module__26jj3STd__v11-5-7",
"primaryButton": "IconButton-module__2iAxKJzQ__v11-5-7",
"defaultButton": "IconButton-module__2TSYjM94__v11-5-7",
"disabled": "IconButton-module__1exwesEF__v11-5-7",
"hover": "IconButton-module__1DIHn9ya__v11-5-7",
"active": "IconButton-module__3lHJu0cg__v11-5-7",
"iconButton": "IconButton-module__19b6ut_d__v11-5-7"
"tertiaryButton": "IconButton-module__ydW6AZDB__v11-5-8",
"focus": "IconButton-module__YxH5XKYd__v11-5-8",
"successButton": "IconButton-module__PC9tlg7g__v11-5-8",
"criticalButton": "IconButton-module__ZMZHGiYs__v11-5-8",
"primaryButton": "IconButton-module__WPn1R-hH__v11-5-8",
"defaultButton": "IconButton-module__WyrzQ-8W__v11-5-8",
"disabled": "IconButton-module__rlTnJFZ3__v11-5-8",
"hover": "IconButton-module__hAL0HLID__v11-5-8",
"active": "IconButton-module__iTB9caAp__v11-5-8",
"iconButton": "IconButton-module__zZHCO6eO__v11-5-8"
};
function IconButtonWithRef(_a, ref) {
var _b;
var className = _a.className,
_c = _a.buttonState,
buttonState = _c === void 0 ? 'enabled' : _c,
icon$1 = _a.icon,
iconColor = _a.iconColor,
ariaLabel = _a.ariaLabel,
metadata = _a.metadata,
_d = _a.onClick,
onClick = _d === void 0 ? undefined : _d,
theme = _a.theme,
_e = _a.variant,
variant = _e === void 0 ? 'default' : _e,
_f = _a.type,
type = _f === void 0 ? 'button' : _f,
remainingProps = __rest(_a, ["className", "buttonState", "icon", "iconColor", "ariaLabel", "metadata", "onClick", "theme", "variant", "type"]);
_c = _a.buttonState,
buttonState = _c === void 0 ? 'enabled' : _c,
icon$1 = _a.icon,
iconColor = _a.iconColor,
ariaLabel = _a.ariaLabel,
metadata = _a.metadata,
_d = _a.onClick,
onClick = _d === void 0 ? undefined : _d,
theme = _a.theme,
_e = _a.variant,
variant = _e === void 0 ? 'default' : _e,
_f = _a.type,
type = _f === void 0 ? 'button' : _f,
remainingProps = __rest(_a, ["className", "buttonState", "icon", "iconColor", "ariaLabel", "metadata", "onClick", "theme", "variant", "type"]);
var variantOrDeprecatedTheme = typeof theme !== 'undefined' ? theme : variant;
var containerClass = classnames__default["default"](styles.iconButton, styles[variantOrDeprecatedTheme + "Button"], (_b = {}, _b[styles.disabled] = buttonState === 'disabled', _b), className);
var focusAwareOnClick = function (event) {

@@ -182,3 +156,2 @@ event.currentTarget.focus();

};
return React__default["default"].createElement('button', __assign(__assign(__assign({}, remainingProps), {

@@ -188,3 +161,2 @@ className: containerClass,

onClick: focusAwareOnClick,
/* eslint-disable react/button-has-type */

@@ -208,3 +180,2 @@ type: type,

}
IconButtonWithRef.displayName = 'IconButton';

@@ -211,0 +182,0 @@ var IconButton = React__default["default"].forwardRef(IconButtonWithRef);

@@ -6,3 +6,4 @@ import React from 'react';

import { Typography } from '@highlight-ui/typography';
/*! *****************************************************************************
/******************************************************************************
Copyright (c) Microsoft Corporation.

@@ -26,17 +27,11 @@

s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {

@@ -47,42 +42,37 @@ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];

}
var styles$1 = {
"tertiaryButton": "Button-module__3p2cVr8I__v11-5-7",
"focus": "Button-module__39s3axLP__v11-5-7",
"successButton": "Button-module__g3xCMOaO__v11-5-7",
"criticalButton": "Button-module__2DMk5GC2__v11-5-7",
"primaryButton": "Button-module__2dSuQFdg__v11-5-7",
"defaultButton": "Button-module__3iXT1NQi__v11-5-7",
"disabled": "Button-module__yB64MUUF__v11-5-7",
"hover": "Button-module__YUN3Kf-p__v11-5-7",
"active": "Button-module__3WXlxxv-__v11-5-7",
"button": "Button-module__3Rp1BYXs__v11-5-7",
"buttonInner": "Button-module__3ZNLhdsJ__v11-5-7",
"hiddenButtonLabel": "Button-module__iIVwFpEb__v11-5-7",
"loadingIcon": "Button-module__PkJtfsRC__v11-5-7",
"block": "Button-module__1xc1DTHJ__v11-5-7"
"tertiaryButton": "Button-module__F6fyawgV__v11-5-8",
"focus": "Button-module__EP-kfq24__v11-5-8",
"successButton": "Button-module__PBPcEmlr__v11-5-8",
"criticalButton": "Button-module__zgxTtaJC__v11-5-8",
"primaryButton": "Button-module__4XaENasH__v11-5-8",
"defaultButton": "Button-module__nw9w-XEq__v11-5-8",
"disabled": "Button-module__TO8B8d8N__v11-5-8",
"hover": "Button-module__5bzFs5V-__v11-5-8",
"active": "Button-module__G05nEy1h__v11-5-8",
"button": "Button-module__A1jn9qEz__v11-5-8",
"buttonInner": "Button-module__Py81Ifdl__v11-5-8",
"hiddenButtonLabel": "Button-module__OhHVEZ8D__v11-5-8",
"loadingIcon": "Button-module__W5DRK-It__v11-5-8",
"block": "Button-module__kW2vic2l__v11-5-8"
};
function ButtonWithRef(_a, ref) {
var _b, _c, _d;
var block = _a.block,
_e = _a.children,
children = _e === void 0 ? null : _e,
className = _a.className,
_f = _a.buttonState,
buttonState = _f === void 0 ? 'enabled' : _f,
metadata = _a.metadata,
_g = _a.onClick,
onClick = _g === void 0 ? undefined : _g,
theme = _a.theme,
_h = _a.variant,
variant = _h === void 0 ? 'default' : _h,
_j = _a.type,
type = _j === void 0 ? 'button' : _j,
remainingProps = __rest(_a, ["block", "children", "className", "buttonState", "metadata", "onClick", "theme", "variant", "type"]);
_e = _a.children,
children = _e === void 0 ? null : _e,
className = _a.className,
_f = _a.buttonState,
buttonState = _f === void 0 ? 'enabled' : _f,
metadata = _a.metadata,
_g = _a.onClick,
onClick = _g === void 0 ? undefined : _g,
theme = _a.theme,
_h = _a.variant,
variant = _h === void 0 ? 'default' : _h,
_j = _a.type,
type = _j === void 0 ? 'button' : _j,
remainingProps = __rest(_a, ["block", "children", "className", "buttonState", "metadata", "onClick", "theme", "variant", "type"]);
var variantOrDeprecatedTheme = typeof theme !== 'undefined' ? theme : variant;
var containerClass = classnames(styles$1.button, styles$1[variantOrDeprecatedTheme + "Button"], (_b = {}, _b[styles$1.block] = block, _b), (_c = {}, _c[styles$1.disabled] = buttonState === 'disabled' || buttonState === 'loading', _c), className);
var focusAwareOnClick = function (event) {

@@ -92,3 +82,2 @@ event.currentTarget.focus();

};
return /*#__PURE__*/React.createElement('button', __assign(__assign(__assign({}, remainingProps), parseMetadata(metadata)), {

@@ -98,3 +87,2 @@ className: containerClass,

onClick: focusAwareOnClick,
/* eslint-disable react/button-has-type */

@@ -116,40 +104,35 @@ type: type,

}
ButtonWithRef.displayName = 'Button';
var Button = /*#__PURE__*/React.forwardRef(ButtonWithRef);
var styles = {
"tertiaryButton": "IconButton-module__WllMogbw__v11-5-7",
"focus": "IconButton-module__3MskydD-__v11-5-7",
"successButton": "IconButton-module__3onntJjp__v11-5-7",
"criticalButton": "IconButton-module__26jj3STd__v11-5-7",
"primaryButton": "IconButton-module__2iAxKJzQ__v11-5-7",
"defaultButton": "IconButton-module__2TSYjM94__v11-5-7",
"disabled": "IconButton-module__1exwesEF__v11-5-7",
"hover": "IconButton-module__1DIHn9ya__v11-5-7",
"active": "IconButton-module__3lHJu0cg__v11-5-7",
"iconButton": "IconButton-module__19b6ut_d__v11-5-7"
"tertiaryButton": "IconButton-module__ydW6AZDB__v11-5-8",
"focus": "IconButton-module__YxH5XKYd__v11-5-8",
"successButton": "IconButton-module__PC9tlg7g__v11-5-8",
"criticalButton": "IconButton-module__ZMZHGiYs__v11-5-8",
"primaryButton": "IconButton-module__WPn1R-hH__v11-5-8",
"defaultButton": "IconButton-module__WyrzQ-8W__v11-5-8",
"disabled": "IconButton-module__rlTnJFZ3__v11-5-8",
"hover": "IconButton-module__hAL0HLID__v11-5-8",
"active": "IconButton-module__iTB9caAp__v11-5-8",
"iconButton": "IconButton-module__zZHCO6eO__v11-5-8"
};
function IconButtonWithRef(_a, ref) {
var _b;
var className = _a.className,
_c = _a.buttonState,
buttonState = _c === void 0 ? 'enabled' : _c,
icon = _a.icon,
iconColor = _a.iconColor,
ariaLabel = _a.ariaLabel,
metadata = _a.metadata,
_d = _a.onClick,
onClick = _d === void 0 ? undefined : _d,
theme = _a.theme,
_e = _a.variant,
variant = _e === void 0 ? 'default' : _e,
_f = _a.type,
type = _f === void 0 ? 'button' : _f,
remainingProps = __rest(_a, ["className", "buttonState", "icon", "iconColor", "ariaLabel", "metadata", "onClick", "theme", "variant", "type"]);
_c = _a.buttonState,
buttonState = _c === void 0 ? 'enabled' : _c,
icon = _a.icon,
iconColor = _a.iconColor,
ariaLabel = _a.ariaLabel,
metadata = _a.metadata,
_d = _a.onClick,
onClick = _d === void 0 ? undefined : _d,
theme = _a.theme,
_e = _a.variant,
variant = _e === void 0 ? 'default' : _e,
_f = _a.type,
type = _f === void 0 ? 'button' : _f,
remainingProps = __rest(_a, ["className", "buttonState", "icon", "iconColor", "ariaLabel", "metadata", "onClick", "theme", "variant", "type"]);
var variantOrDeprecatedTheme = typeof theme !== 'undefined' ? theme : variant;
var containerClass = classnames(styles.iconButton, styles[variantOrDeprecatedTheme + "Button"], (_b = {}, _b[styles.disabled] = buttonState === 'disabled', _b), className);
var focusAwareOnClick = function (event) {

@@ -159,3 +142,2 @@ event.currentTarget.focus();

};
return /*#__PURE__*/React.createElement('button', __assign(__assign(__assign({}, remainingProps), {

@@ -165,3 +147,2 @@ className: containerClass,

onClick: focusAwareOnClick,
/* eslint-disable react/button-has-type */

@@ -185,3 +166,2 @@ type: type,

}
IconButtonWithRef.displayName = 'IconButton';

@@ -188,0 +168,0 @@ var IconButton = /*#__PURE__*/React.forwardRef(IconButtonWithRef);

{
"name": "@highlight-ui/button",
"version": "11.5.7",
"version": "11.5.8",
"description": "The button",

@@ -32,27 +32,27 @@ "author": "Personio GmbH & Co. KG",

"dependencies": {
"@highlight-ui/icon": "^4.1.6",
"@highlight-ui/typography": "^5.2.15",
"@highlight-ui/utils-commons": "^2.3.5"
"@highlight-ui/icon": "^4.1.7",
"@highlight-ui/typography": "^5.2.16",
"@highlight-ui/utils-commons": "^2.3.6"
},
"devDependencies": {
"@highlight-ui/configs-base-jest": "^3.1.1",
"@highlight-ui/configs-base-tsconfig": "^3.2.0",
"@highlight-ui/configs-scripts": "^3.2.2",
"@highlight-ui/theme": "^9.3.3",
"@highlight-ui/tokens": "^2.3.0",
"@highlight-ui/utils-dev": "^1.1.5",
"@highlight-ui/configs-base-jest": "^3.1.2",
"@highlight-ui/configs-base-tsconfig": "^3.2.1",
"@highlight-ui/configs-scripts": "^3.2.3",
"@highlight-ui/theme": "^9.3.4",
"@highlight-ui/tokens": "^2.3.1",
"@highlight-ui/utils-dev": "^1.1.6",
"@testing-library/dom": "8.19.0",
"@testing-library/react": "12.1.5",
"@testing-library/user-event": "13.5.0",
"classnames": "^2.3.1",
"jest": "^27.2.3",
"react": "^17.0.2",
"react-is": "^17.0.2",
"rimraf": "^3.0.2"
"classnames": "~2.3.1",
"jest": "~27.2.3",
"react": "17.0.2",
"react-is": "17.0.2",
"rimraf": "~3.0.2"
},
"peerDependencies": {
"classnames": "^2.3.1",
"react": "^17.0.2"
"classnames": "~2.3.1",
"react": "17.0.2"
},
"gitHead": "9af145ddc03c7a3909b46ed3f005fa3792be65c2"
"gitHead": "3758f5f987510edb100f5a22ebe829b7cee4573f"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc