armstrong-react
Advanced tools
Comparing version 0.2.8 to 0.2.9
@@ -7,2 +7,10 @@ "use strict"; | ||
}; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
var React = require("react"); | ||
@@ -38,3 +46,3 @@ var classBuilder_1 = require("./../../utilities/classBuilder"); | ||
return (React.createElement("div", {className: classes}, | ||
React.createElement("div", {className: "dialog", style: style, role: "dialog", "aria-hidden": !this.props.isOpen, "aria-labelledby": this.props.title, "aria-describedby": this.props.subtitle}, | ||
React.createElement("div", __assign({className: "dialog", style: style, role: "dialog", "aria-hidden": !this.props.isOpen, "aria-labelledby": this.props.title, "aria-describedby": this.props.subtitle}, this.props), | ||
React.createElement(grid_1.Grid, null, | ||
@@ -41,0 +49,0 @@ React.createElement(grid_1.Row, {className: classBuilder_1.classNames("dialog-header", classBuilder_1.cd("dialog-header-no-title", !this.props.title)), fixed: true}, |
import * as React from "react"; | ||
import { Color, LayoutProps } from "./../../utilities/uiHelpers"; | ||
export interface IIconProps extends LayoutProps { | ||
export interface IIconProps extends LayoutProps, React.HTMLProps<Icon> { | ||
icon: string; | ||
@@ -5,0 +5,0 @@ condition?: Color; |
@@ -7,2 +7,10 @@ "use strict"; | ||
}; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
var React = require("react"); | ||
@@ -20,3 +28,3 @@ var classBuilder_1 = require("./../../utilities/classBuilder"); | ||
var layoutClasses = uiHelpers_1.LayoutHelpers.HandleLayoutClasses(this.props.margin, this.props.padding); | ||
return (React.createElement("i", {className: classBuilder_1.classNames(this.props.className, "icon", this.props.icon, displayClasses, layoutClasses)})); | ||
return (React.createElement("i", __assign({}, this.props, {className: classBuilder_1.classNames(this.props.className, "icon", this.props.icon, displayClasses, layoutClasses)}))); | ||
}; | ||
@@ -23,0 +31,0 @@ Icon.Icomoon = icons_1.Icons.Icomoon; |
import * as React from "react"; | ||
import { LayoutProps } from "./../../utilities/uiHelpers"; | ||
export interface IImageProps extends LayoutProps { | ||
export interface IImageProps extends LayoutProps, React.HTMLProps<Image> { | ||
rounded?: boolean; | ||
@@ -5,0 +5,0 @@ className?: string; |
@@ -7,2 +7,10 @@ "use strict"; | ||
}; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
var React = require("react"); | ||
@@ -40,3 +48,3 @@ var classBuilder_1 = require("./../../utilities/classBuilder"); | ||
} | ||
return (React.createElement("img", {src: source, height: this.props.height, width: this.props.width, className: classBuilder_1.classNames(this.props.className, layoutClasses, classBuilder_1.cd("rounded", this.props.rounded))})); | ||
return (React.createElement("img", __assign({src: source}, this.props, {height: this.props.height, width: this.props.width, className: classBuilder_1.classNames(this.props.className, layoutClasses, classBuilder_1.cd("rounded", this.props.rounded))}))); | ||
}; | ||
@@ -43,0 +51,0 @@ return Image; |
import * as React from "react"; | ||
import { LayoutProps, Color } from "./../../utilities/uiHelpers"; | ||
export interface IButtonProps extends LayoutProps { | ||
export interface IButtonProps extends LayoutProps, React.HTMLProps<Button> { | ||
text: string; | ||
@@ -10,3 +10,2 @@ onClick?: () => void; | ||
rounded?: boolean; | ||
id?: string; | ||
} | ||
@@ -13,0 +12,0 @@ export declare class Button extends React.Component<IButtonProps, {}> { |
@@ -7,2 +7,10 @@ "use strict"; | ||
}; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
var React = require("react"); | ||
@@ -21,3 +29,3 @@ var uiHelpers_1 = require("./../../utilities/uiHelpers"); | ||
var displayClasses = uiHelpers_1.LayoutHelpers.HandleDisplayClasses({ color: this.props.condition }); | ||
return (React.createElement("button", {id: this.props.id, onClick: this.props.onClick, className: classBuilder_1.classNames("btn", classBuilder_1.cd("rounded", this.props.rounded), layoutClasses, displayClasses)}, | ||
return (React.createElement("button", __assign({onClick: this.props.onClick}, this.props, {className: classBuilder_1.classNames("btn", classBuilder_1.cd("rounded", this.props.rounded), layoutClasses, displayClasses)}), | ||
this.props.leftIcon && React.createElement(icon_1.Icon, {className: "left-icon", icon: this.props.leftIcon}), | ||
@@ -24,0 +32,0 @@ this.props.text, |
import * as React from "react"; | ||
import { LayoutProps, DisplayProps } from "./../../utilities/uiHelpers"; | ||
export interface IContainerProps extends React.Props<Container>, LayoutProps, DisplayProps { | ||
export interface IContainerProps extends React.Props<Container>, LayoutProps, DisplayProps, React.HTMLProps<Container> { | ||
} | ||
@@ -5,0 +5,0 @@ export declare class Container extends React.Component<IContainerProps, {}> { |
@@ -7,2 +7,10 @@ "use strict"; | ||
}; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
var React = require("react"); | ||
@@ -24,3 +32,3 @@ var uiHelpers_1 = require("./../../utilities/uiHelpers"); | ||
} | ||
return React.createElement("div", {style: displayStyles, className: classes}, this.props.children); | ||
return React.createElement("div", __assign({style: displayStyles}, this.props, {className: classes}), this.props.children); | ||
}; | ||
@@ -27,0 +35,0 @@ return Container; |
import * as React from "react"; | ||
import { LayoutProps, DisplayProps, CenterContent, CenterBoth, Responsiveness } from "./../../utilities/uiHelpers"; | ||
export interface IGrid extends React.Props<Grid>, LayoutProps, DisplayProps { | ||
export interface IGrid extends React.Props<Grid>, LayoutProps, DisplayProps, React.HTMLProps<Grid> { | ||
debugMode?: boolean; | ||
@@ -5,0 +5,0 @@ responsive?: Responsiveness; |
@@ -32,3 +32,3 @@ "use strict"; | ||
var classes = classBuilder_1.classNames(originalClassName, "grid", "fill-container", responsiveClasses, classBuilder_1.cd("grid-debug", this.props.debugMode), classBuilder_1.cd("table-grid", this.props.table), displayClasses, layoutClasses); | ||
return (React.createElement("div", __assign({}, attrs, {className: classes, style: displayStyles}))); | ||
return (React.createElement("div", __assign({}, attrs, this.props, {className: classes, style: displayStyles}))); | ||
}; | ||
@@ -55,3 +55,3 @@ Grid.defaultProps = { | ||
} | ||
return React.createElement("div", __assign({}, attrs, {className: classes, style: displayStyles})); | ||
return React.createElement("div", __assign({}, attrs, this.props, {className: classes, style: displayStyles})); | ||
}; | ||
@@ -76,3 +76,3 @@ return Row; | ||
} | ||
return React.createElement("div", __assign({}, attrs, {className: classes, style: displayStyles})); | ||
return React.createElement("div", __assign({}, attrs, this.props, {className: classes, style: displayStyles})); | ||
}; | ||
@@ -79,0 +79,0 @@ return Col; |
@@ -5,3 +5,3 @@ import * as React from "react"; | ||
export declare type HeadingStyleType = "heading1" | "heading2" | "heading3"; | ||
export interface IHeadingProps extends React.Props<Heading>, LayoutProps, DisplayProps { | ||
export interface IHeadingProps extends React.Props<Heading>, LayoutProps, DisplayProps, React.HTMLProps<Heading> { | ||
elementType?: HeadingElementType; | ||
@@ -8,0 +8,0 @@ styleType?: HeadingStyleType; |
@@ -7,2 +7,10 @@ "use strict"; | ||
}; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
var React = require("react"); | ||
@@ -26,9 +34,9 @@ var uiHelpers_1 = require("./../../utilities/uiHelpers"); | ||
case "h1": | ||
return React.createElement("h1", {style: displayStyles, className: classes}, this.props.children); | ||
return React.createElement("h1", __assign({}, this.props, {style: displayStyles, className: classes}), this.props.children); | ||
case "h2": | ||
return React.createElement("h2", {style: displayStyles, className: classes}, this.props.children); | ||
return React.createElement("h2", __assign({}, this.props, {style: displayStyles, className: classes}), this.props.children); | ||
case "h3": | ||
return React.createElement("h3", {style: displayStyles, className: classes}, this.props.children); | ||
return React.createElement("h3", __assign({}, this.props, {style: displayStyles, className: classes}), this.props.children); | ||
case "div": | ||
return React.createElement("div", {style: displayStyles, className: classes}, this.props.children); | ||
return React.createElement("div", __assign({}, this.props, {style: displayStyles, className: classes}), this.props.children); | ||
} | ||
@@ -35,0 +43,0 @@ }; |
import * as React from "react"; | ||
import { LayoutProps, DisplayProps } from "./../../utilities/uiHelpers"; | ||
export declare type TextElementType = "p" | "span" | "label"; | ||
export interface ITextProps extends React.Props<Text>, LayoutProps, DisplayProps { | ||
export interface ITextProps extends React.Props<Text>, LayoutProps, DisplayProps, React.HTMLProps<Text> { | ||
elementType?: TextElementType; | ||
@@ -6,0 +6,0 @@ } |
@@ -7,2 +7,10 @@ "use strict"; | ||
}; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
var React = require("react"); | ||
@@ -26,7 +34,7 @@ var uiHelpers_1 = require("./../../utilities/uiHelpers"); | ||
case "p": | ||
return React.createElement("p", {style: displayStyles, className: classes}, this.props.children); | ||
return React.createElement("p", __assign({}, this.props, {style: displayStyles, className: classes}), this.props.children); | ||
case "span": | ||
return React.createElement("span", {style: displayStyles, className: classes}, this.props.children); | ||
return React.createElement("span", __assign({}, this.props, {style: displayStyles, className: classes}), this.props.children); | ||
case "label": | ||
return React.createElement("label", {style: displayStyles, className: classes}, this.props.children); | ||
return React.createElement("label", __assign({}, this.props, {style: displayStyles, className: classes}), this.props.children); | ||
} | ||
@@ -33,0 +41,0 @@ }; |
{ | ||
"name": "armstrong-react", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"description": "Rocketmakers Armstrong library of React components", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
337589
9187