Comparing version 0.1.8 to 0.2.0
import { VElement, VAttributes, VNode } from './dom'; | ||
import { NestedCSSProperties } from 'typestyle/lib/types'; | ||
export interface HProps extends VAttributes, HAttributes { | ||
@@ -152,3 +153,3 @@ [key: string]: any; | ||
headers?: string; | ||
height?: string; | ||
height?: number; | ||
hidden?: string; | ||
@@ -214,3 +215,3 @@ high?: number; | ||
step?: number; | ||
style?: string; | ||
style?: string | NestedCSSProperties; | ||
summary?: string; | ||
@@ -217,0 +218,0 @@ tabindex?: number; |
@@ -5,2 +5,19 @@ "use strict"; | ||
var lifecycle_1 = require("./lifecycle"); | ||
var typestyle_1 = require("typestyle"); | ||
function combineStyles(attributes, head) { | ||
var existingCss = attributes && attributes['class']; | ||
var headCss = head['class']; | ||
var css = (existingCss && headCss) ? (existingCss + ' ' + headCss) : existingCss || headCss; | ||
var headStyle = head["style"]; | ||
if (headStyle && typeof (headStyle) != 'string') { | ||
css = !css ? typestyle_1.style(headStyle) : css + " " + typestyle_1.style(headStyle); | ||
head["style"] = undefined; | ||
} | ||
if (css) { | ||
if (attributes) | ||
attributes["class"] = css; | ||
else | ||
head["class"] = css; | ||
} | ||
} | ||
function h(tag) { | ||
@@ -15,2 +32,3 @@ var values = []; | ||
if (head != null && typeof head == "object" && !dom_1.isVElement(head) && !Array.isArray(head)) { | ||
combineStyles(attributes, head); | ||
if (!attributes) | ||
@@ -17,0 +35,0 @@ attributes = head; |
{ | ||
"name": "pickle-ts", | ||
"version": "0.1.8", | ||
"version": "0.2.0", | ||
"author": "pickle", | ||
@@ -15,4 +15,5 @@ "license": "MIT", | ||
"reflect-metadata": "^0.1.12", | ||
"typescript": "^2.5.0" | ||
"typescript": "^2.5.0", | ||
"typestyle": "^1.7.2" | ||
} | ||
} |
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
69997
2038
4
+ Addedtypestyle@^1.7.2
+ Addedfree-style@2.5.1(transitive)
+ Addedtypestyle@1.7.2(transitive)