Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hig/button

Package Overview
Dependencies
Maintainers
5
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hig/button - npm Package Compare versions

Comparing version 0.1.0-alpha.a36b4d24 to 0.1.0-alpha.a529f134

97

build/index.es.js
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import cx from 'classnames';
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
var classnames = createCommonjsModule(function (module) {
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
/*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/* global define */
(function () {
var hasOwn = {}.hasOwnProperty;
function classNames() {
var classes = [];
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (!arg) continue;
var argType = typeof arg === 'undefined' ? 'undefined' : _typeof(arg);
if (argType === 'string' || argType === 'number') {
classes.push(arg);
} else if (Array.isArray(arg)) {
classes.push(classNames.apply(null, arg));
} else if (argType === 'object') {
for (var key in arg) {
if (hasOwn.call(arg, key) && arg[key]) {
classes.push(key);
}
}
}
}
return classes.join(' ');
}
if ('object' !== 'undefined' && module.exports) {
module.exports = classNames;
} else if (typeof undefined === 'function' && _typeof(undefined.amd) === 'object' && undefined.amd) {
// register as 'classnames', consistent with npm package name
undefined('classnames', [], function () {
return classNames;
});
} else {
window.classNames = classNames;
}
})();
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var HIGLightTheme = {

@@ -216,7 +161,31 @@ themeId: "hig-light",

var availableSizes = Object.freeze(["small", "standard", "large"]);
var availableTargets = Object.freeze(["_self", "_blank", "_parent", "_top"]);
var availableTypes = Object.freeze(["primary", "secondary", "flat"]);
var availableWidths = Object.freeze(["shrink", "grow"]);
var sizes = Object.freeze({
SMALL: "small",
STANDARD: "standard",
LARGE: "large"
});
var targets = Object.freeze({
SELF: "_self",
BLANK: "_blank",
PARENT: "_parent",
TOP: "_top"
});
var types = Object.freeze({
PRIMARY: "primary",
SECONDARY: "secondary",
FLAT: "flat"
});
var widths = Object.freeze({
SHRINK: "shrink",
GROW: "grow"
});
var availableSizes = Object.freeze(Object.values(sizes));
var availableTargets = Object.freeze(Object.values(targets));
var availableTypes = Object.freeze(Object.values(types));
var availableWidths = Object.freeze(Object.values(widths));
var _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -272,3 +241,3 @@

return classnames(themeClass, "hig__button-v1", (_cx = {
return cx(themeClass, "hig__button-v1", (_cx = {
"hig__button-v1--disabled": disabled

@@ -295,3 +264,3 @@ }, _defineProperty(_cx, "hig__button-v1--size-" + size, size), _defineProperty(_cx, "hig__button-v1--type-" + type, type), _defineProperty(_cx, "hig__button-v1--width-" + width, width), _cx));

"div",
{ className: classnames(themeClass, "hig__button-v1__icon") },
{ className: cx(themeClass, "hig__button-v1__icon") },
icon

@@ -301,3 +270,3 @@ ),

"span",
{ className: classnames("hig__button__title") },
{ className: cx("hig__button__title") },
title

@@ -486,2 +455,2 @@ )

export default Button;
export { availableSizes, availableTargets, availableTypes, availableWidths };
export { sizes, targets, types, widths, availableSizes, availableTargets, availableTypes, availableWidths };

@@ -10,61 +10,6 @@ 'use strict';

var React__default = _interopDefault(React);
var cx = _interopDefault(require('classnames'));
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
var classnames = createCommonjsModule(function (module) {
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
/*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/* global define */
(function () {
var hasOwn = {}.hasOwnProperty;
function classNames() {
var classes = [];
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (!arg) continue;
var argType = typeof arg === 'undefined' ? 'undefined' : _typeof(arg);
if (argType === 'string' || argType === 'number') {
classes.push(arg);
} else if (Array.isArray(arg)) {
classes.push(classNames.apply(null, arg));
} else if (argType === 'object') {
for (var key in arg) {
if (hasOwn.call(arg, key) && arg[key]) {
classes.push(key);
}
}
}
}
return classes.join(' ');
}
if ('object' !== 'undefined' && module.exports) {
module.exports = classNames;
} else if (typeof undefined === 'function' && _typeof(undefined.amd) === 'object' && undefined.amd) {
// register as 'classnames', consistent with npm package name
undefined('classnames', [], function () {
return classNames;
});
} else {
window.classNames = classNames;
}
})();
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var HIGLightTheme = {

@@ -224,7 +169,31 @@ themeId: "hig-light",

var availableSizes = Object.freeze(["small", "standard", "large"]);
var availableTargets = Object.freeze(["_self", "_blank", "_parent", "_top"]);
var availableTypes = Object.freeze(["primary", "secondary", "flat"]);
var availableWidths = Object.freeze(["shrink", "grow"]);
var sizes = Object.freeze({
SMALL: "small",
STANDARD: "standard",
LARGE: "large"
});
var targets = Object.freeze({
SELF: "_self",
BLANK: "_blank",
PARENT: "_parent",
TOP: "_top"
});
var types = Object.freeze({
PRIMARY: "primary",
SECONDARY: "secondary",
FLAT: "flat"
});
var widths = Object.freeze({
SHRINK: "shrink",
GROW: "grow"
});
var availableSizes = Object.freeze(Object.values(sizes));
var availableTargets = Object.freeze(Object.values(targets));
var availableTypes = Object.freeze(Object.values(types));
var availableWidths = Object.freeze(Object.values(widths));
var _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -280,3 +249,3 @@

return classnames(themeClass, "hig__button-v1", (_cx = {
return cx(themeClass, "hig__button-v1", (_cx = {
"hig__button-v1--disabled": disabled

@@ -303,3 +272,3 @@ }, _defineProperty(_cx, "hig__button-v1--size-" + size, size), _defineProperty(_cx, "hig__button-v1--type-" + type, type), _defineProperty(_cx, "hig__button-v1--width-" + width, width), _cx));

"div",
{ className: classnames(themeClass, "hig__button-v1__icon") },
{ className: cx(themeClass, "hig__button-v1__icon") },
icon

@@ -309,3 +278,3 @@ ),

"span",
{ className: classnames("hig__button__title") },
{ className: cx("hig__button__title") },
title

@@ -494,2 +463,6 @@ )

exports.default = Button;
exports.sizes = sizes;
exports.targets = targets;
exports.types = types;
exports.widths = widths;
exports.availableSizes = availableSizes;

@@ -496,0 +469,0 @@ exports.availableTargets = availableTargets;

{
"name": "@hig/button",
"version": "0.1.0-alpha.a36b4d24",
"version": "0.1.0-alpha.a529f134",
"description": "HIG Button",

@@ -16,20 +16,21 @@ "author": "Autodesk Inc.",

],
"dependencies": {
"@hig/themes": "0.1.0-alpha.a529f134",
"classnames": "^2.2.5"
},
"devDependencies": {
"@hig/babel-preset": "0.2.0-alpha.a36b4d24",
"@hig/eslint-config": "0.2.0-alpha.a36b4d24",
"@hig/icon": "0.1.0-alpha.a36b4d24",
"@hig/scripts": "0.2.0-alpha.a36b4d24",
"@hig/styles": "0.1.0-alpha.a36b4d24"
"@hig/babel-preset": "0.2.0-alpha.a529f134",
"@hig/eslint-config": "0.2.0-alpha.a529f134",
"@hig/icon": "0.1.0-alpha.a529f134",
"@hig/scripts": "0.2.0-alpha.a529f134",
"@hig/styles": "0.2.0-alpha.a529f134"
},
"peerDependencies": {
"prop-types": "^15.5.10",
"react": "^15.4.1"
"react": "^15.4.1 || ^16.3.2"
},
"scripts": {
"build": "hig-scripts-build",
"lint": "eslint src --ext .js,.jsx"
"lint": "eslint src --color --ext .js,.jsx"
},
"dependencies": {
"@hig/themes": "0.1.0-alpha.a36b4d24"
},
"babel": {

@@ -36,0 +37,0 @@ "env": {

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