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

@heroku/react-hk-components

Package Overview
Dependencies
Maintainers
45
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@heroku/react-hk-components - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

93

dist/HKButton.js

@@ -1,50 +0,51 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
var Type;
(function (Type) {
Type["Primary"] = "primary";
Type["Secondary"] = "secondary";
Type["Tertiary"] = "tertiary";
Type["Danger"] = "danger";
Type["Warning"] = "warning";
Type["Info"] = "info";
})(Type || (Type = {}));
class HKButton extends React.Component {
constructor() {
super(...arguments);
this.handleClick = (e) => {
if (this.props.onClick) {
this.props.onClick(e);
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Type;
(function (Type) {
Type["Primary"] = "primary";
Type["Secondary"] = "secondary";
Type["Tertiary"] = "tertiary";
Type["Danger"] = "danger";
Type["Warning"] = "warning";
Type["Info"] = "info";
})(Type || (Type = {}));
class HKButton extends React.Component {
constructor() {
super(...arguments);
this.handleClick = (e) => {
if (this.props.onClick) {
this.props.onClick(e);
}
};
}
render() {
const { async, disabled, small, type, children, className, title, value } = this.props;
let buttonClass = 'hk-button';
if (async) {
buttonClass += '--async';
}
};
}
render() {
const { async, disabled, small, type, children, className, title, value } = this.props;
let buttonClass = 'hk-button';
if (async) {
buttonClass += '--async';
else {
const disabledClass = disabled ? 'disabled-' : '';
const smallClass = small ? '-sm' : '';
buttonClass += `${smallClass}--${disabledClass}${type}`;
}
if (className) {
buttonClass += ` ${className}`;
}
return (React.createElement("button", { type: 'button', className: buttonClass, disabled: disabled, onClick: this.handleClick, title: title, value: value || title },
" ",
children,
" "));
}
else {
const disabledClass = disabled ? 'disabled-' : '';
const smallClass = small ? '-sm' : '';
buttonClass += `${smallClass}--${disabledClass}${type}`;
}
if (className) {
buttonClass += ` ${className}`;
}
return (React.createElement("button", { type: 'button', className: buttonClass, disabled: disabled, onClick: this.handleClick, title: title, value: value || title },
" ",
children,
" "));
}
}
HKButton.defaultProps = {
async: false,
className: '',
disabled: false,
small: false,
type: 'secondary',
};
exports.default = HKButton;
HKButton.defaultProps = {
async: false,
className: '',
disabled: false,
small: false,
type: 'secondary',
};
exports.default = HKButton;
});
//# sourceMappingURL=HKButton.js.map

@@ -1,17 +0,15 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const simple_react_modal_1 = require("simple-react-modal");
const HKModalHeader_1 = require("./HKModalHeader");
const HKModalFooter_1 = require("./HKModalFooter");
class Modal extends React.Component {
render() {
const { show, children, onDismiss, header, footer } = this.props;
return (React.createElement(simple_react_modal_1.default, { containerStyle: {}, containerClassName: "w-100 mw7 center bg-white shadow-outer-1 br1 relative", style: { position: 'fixed', top: 0, bottom: 0, left: 0, right: 0, "zIndex": 9999, background: 'rgba(0,0,0,.2)' }, className: "flex flex-column items-center justify-center", closeOnOuterClick: true, show: show, onClose: onDismiss },
React.createElement(HKModalHeader_1.default, { onDismiss: onDismiss }, header),
children,
React.createElement(HKModalFooter_1.default, null, footer)));
define(["require", "exports", "react", "simple-react-modal", "./HKModalHeader", "./HKModalFooter"], function (require, exports, React, simple_react_modal_1, HKModalHeader_1, HKModalFooter_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class Modal extends React.Component {
render() {
const { show, children, onDismiss, header, footer } = this.props;
return (React.createElement(simple_react_modal_1.default, { containerStyle: {}, containerClassName: "w-100 mw7 center bg-white shadow-outer-1 br1 relative", style: { position: 'fixed', top: 0, bottom: 0, left: 0, right: 0, "zIndex": 9999, background: 'rgba(0,0,0,.2)' }, className: "flex flex-column items-center justify-center", closeOnOuterClick: true, show: show, onClose: onDismiss },
React.createElement(HKModalHeader_1.default, { onDismiss: onDismiss }, header),
children,
React.createElement(HKModalFooter_1.default, null, footer)));
}
}
}
exports.default = Modal;
exports.default = Modal;
});
//# sourceMappingURL=HKModal.js.map

@@ -1,11 +0,12 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
class ModalFooter extends React.Component {
render() {
const { children } = this.props;
return (React.createElement("div", { className: "bt b--light-silver w-100 pa3 tr" }, children));
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class ModalFooter extends React.Component {
render() {
const { children } = this.props;
return (React.createElement("div", { className: "bt b--light-silver w-100 pa3 tr" }, children));
}
}
}
exports.default = ModalFooter;
exports.default = ModalFooter;
});
//# sourceMappingURL=HKModalFooter.js.map

@@ -1,23 +0,23 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const react_malibu_1 = require("@heroku/react-malibu");
const React = require("react");
class ModalHeader extends React.Component {
render() {
const { children, onDismiss } = this.props;
let childrenNode = React.createElement("div", null);
let dismissNode = React.createElement("div", null);
if (children) {
childrenNode = React.createElement("div", { className: "hk-modal-header pa4 bg-near-white" }, children);
define(["require", "exports", "@heroku/react-malibu", "react"], function (require, exports, react_malibu_1, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class ModalHeader extends React.Component {
render() {
const { children, onDismiss } = this.props;
let childrenNode = React.createElement("div", null);
let dismissNode = React.createElement("div", null);
if (children) {
childrenNode = React.createElement("div", { className: "hk-modal-header pa4 bg-near-white" }, children);
}
if (onDismiss) {
dismissNode = React.createElement("div", { className: "right-1 h-100 absolute pointer", onClick: onDismiss },
React.createElement(react_malibu_1.MalibuIcon, { name: 'delete-16', fillClass: 'dark-gray', extraClasses: "icon malibu-icon h1 w1 fill-dark-gray o-50 hover-o-100 h-100 v-mid" }));
}
return (React.createElement("div", { className: "bg-near-white dark-gray bb b--light-silver f4 flex items-center justify-center br--top br2" },
childrenNode,
dismissNode));
}
if (onDismiss) {
dismissNode = React.createElement("div", { className: "right-1 h-100 absolute pointer", onClick: onDismiss },
React.createElement(react_malibu_1.MalibuIcon, { name: 'delete-16', fillClass: 'dark-gray', extraClasses: "icon malibu-icon h1 w1 fill-dark-gray o-50 hover-o-100 h-100 v-mid" }));
}
return (React.createElement("div", { className: "bg-near-white dark-gray bb b--light-silver f4 flex items-center justify-center br--top br2" },
childrenNode,
dismissNode));
}
}
exports.default = ModalHeader;
exports.default = ModalHeader;
});
//# sourceMappingURL=HKModalHeader.js.map

@@ -1,11 +0,9 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var HKButton_1 = require("./HKButton");
exports.HKButton = HKButton_1.default;
var HKModal_1 = require("./HKModal");
exports.HKModal = HKModal_1.default;
var HKModalHeader_1 = require("./HKModalHeader");
exports.HKModalHeader = HKModalHeader_1.default;
var HKModalFooter_1 = require("./HKModalFooter");
exports.HKModalFooter = HKModalFooter_1.default;
define(["require", "exports", "./HKButton", "./HKModal", "./HKModalHeader", "./HKModalFooter"], function (require, exports, HKButton_1, HKModal_1, HKModalHeader_1, HKModalFooter_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HKButton = HKButton_1.default;
exports.HKModal = HKModal_1.default;
exports.HKModalHeader = HKModalHeader_1.default;
exports.HKModalFooter = HKModalFooter_1.default;
});
//# sourceMappingURL=index.js.map
{
"name": "@heroku/react-hk-components",
"version": "0.3.0",
"version": "0.4.0",
"description": "React components for Heroku",

@@ -51,3 +51,3 @@ "main": "dist/index.js",

"storybook": "start-storybook -p ${PORT:-9001} -c .storybook",
"build": "rm ./dist/*; tsc --module commonjs",
"build": "rm ./dist/*; tsc --module amd",
"prepublish": "yarn run build",

@@ -54,0 +54,0 @@ "test": "jest --testPathPattern $PWD/test",

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

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