Socket
Socket
Sign inDemoInstall

@hig/text-area

Package Overview
Dependencies
Maintainers
3
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hig/text-area - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

41

build/index.es.js

@@ -1595,34 +1595,15 @@ import React, { Component } from 'react';

function getWebLightBorders(props, themeData) {
var isDisabled = props.isDisabled,
hasFocus = props.hasFocus,
hasHover = props.hasHover;
if (hasFocus) {
return themeData["input.focus.borderBottomColor"];
}
if (hasHover && !isDisabled) {
return themeData["input.hover.borderBottomColor"];
}
return themeData["input.borderColor"];
}
function stylesheetOverride(stylesheet, props, themeData, theme) {
var borderStyles = props.variant === "line" ? "rgba(128, 128, 128, 0.2)" : themeData["input.borderColor"];
var textAreaWrapper = theme === "hig-light" ? _extends({}, stylesheet.wrapper, {
borderColor: getWebLightBorders(props, themeData),
borderBottomColor: getWebLightBorders(props, themeData)
}) : _extends({}, stylesheet.wrapper, {
borderLeftColor: borderStyles,
borderRightColor: borderStyles,
borderTopColor: borderStyles
});
function stylesheetOverride(stylesheet, props, themeData) {
var borderStyles = props.variant === "line" ? themeData["input.textArea.line.borderColor"] : themeData["input.box.default.borderColor"];
var textArea = _extends({}, stylesheet.input, {
display: "block",
resize: "vertical",
padding: themeData["input.verticalPadding"] + "\n " + themeData["input.boxType.horizontalPadding"],
height: "calc((" + themeData["input.height"] + " - 2px) * 2)"
padding: themeData["input.paddingVertical"] + "\n " + themeData["input.box.paddingHorizontal"],
height: "calc((" + themeData["input.minHeight"] + " - 2px) * 2)"
});
return _extends({}, stylesheet, {
wrapper: _extends({}, textAreaWrapper, {
wrapper: _extends({}, stylesheet.wrapper, {
borderLeftColor: borderStyles,
borderRightColor: borderStyles,
borderTopColor: borderStyles,
position: "static"

@@ -1676,5 +1657,5 @@ }),

var textareaStylesheet = function textareaStylesheet(styles, props, themeData, theme) {
var textareaStyles = stylesheetOverride(styles, props, themeData, theme);
return stylesheet ? stylesheet(textareaStyles, props, themeData, theme) : textareaStyles;
var textareaStylesheet = function textareaStylesheet(styles, props, themeData) {
var textareaStyles = stylesheetOverride(styles, props, themeData);
return stylesheet ? stylesheet(textareaStyles, props, themeData) : textareaStyles;
};

@@ -1681,0 +1662,0 @@

@@ -1602,34 +1602,15 @@ 'use strict';

function getWebLightBorders(props, themeData) {
var isDisabled = props.isDisabled,
hasFocus = props.hasFocus,
hasHover = props.hasHover;
if (hasFocus) {
return themeData["input.focus.borderBottomColor"];
}
if (hasHover && !isDisabled) {
return themeData["input.hover.borderBottomColor"];
}
return themeData["input.borderColor"];
}
function stylesheetOverride(stylesheet, props, themeData, theme) {
var borderStyles = props.variant === "line" ? "rgba(128, 128, 128, 0.2)" : themeData["input.borderColor"];
var textAreaWrapper = theme === "hig-light" ? _extends({}, stylesheet.wrapper, {
borderColor: getWebLightBorders(props, themeData),
borderBottomColor: getWebLightBorders(props, themeData)
}) : _extends({}, stylesheet.wrapper, {
borderLeftColor: borderStyles,
borderRightColor: borderStyles,
borderTopColor: borderStyles
});
function stylesheetOverride(stylesheet, props, themeData) {
var borderStyles = props.variant === "line" ? themeData["input.textArea.line.borderColor"] : themeData["input.box.default.borderColor"];
var textArea = _extends({}, stylesheet.input, {
display: "block",
resize: "vertical",
padding: themeData["input.verticalPadding"] + "\n " + themeData["input.boxType.horizontalPadding"],
height: "calc((" + themeData["input.height"] + " - 2px) * 2)"
padding: themeData["input.paddingVertical"] + "\n " + themeData["input.box.paddingHorizontal"],
height: "calc((" + themeData["input.minHeight"] + " - 2px) * 2)"
});
return _extends({}, stylesheet, {
wrapper: _extends({}, textAreaWrapper, {
wrapper: _extends({}, stylesheet.wrapper, {
borderLeftColor: borderStyles,
borderRightColor: borderStyles,
borderTopColor: borderStyles,
position: "static"

@@ -1683,5 +1664,5 @@ }),

var textareaStylesheet = function textareaStylesheet(styles, props, themeData, theme) {
var textareaStyles = stylesheetOverride(styles, props, themeData, theme);
return stylesheet ? stylesheet(textareaStyles, props, themeData, theme) : textareaStyles;
var textareaStylesheet = function textareaStylesheet(styles, props, themeData) {
var textareaStyles = stylesheetOverride(styles, props, themeData);
return stylesheet ? stylesheet(textareaStyles, props, themeData) : textareaStyles;
};

@@ -1688,0 +1669,0 @@

@@ -0,1 +1,8 @@

# [@hig/text-area-v1.2.1](https://github.com/Autodesk/hig/compare/@hig/text-area@1.2.0...@hig/text-area@1.2.1) (2020-05-13)
### Bug Fixes
* stop using deprecated theme-data roles ([099946d](https://github.com/Autodesk/hig/commit/099946d))
# [@hig/text-area-v1.2.0](https://github.com/Autodesk/hig/compare/@hig/text-area@1.1.4...@hig/text-area@1.2.0) (2019-07-09)

@@ -2,0 +9,0 @@

{
"name": "@hig/text-area",
"version": "1.2.0",
"version": "1.2.1",
"description": "HIG Text Area",

@@ -20,3 +20,3 @@ "author": "Autodesk Inc.",

"dependencies": {
"@hig/input": "^1.1.5",
"@hig/input": "^1.2.1",
"prop-types": "^15.7.1"

@@ -26,3 +26,3 @@ },

"@hig/theme-context": "^3.0.0",
"@hig/theme-data": "^2.8.0",
"@hig/theme-data": "^2.16.0",
"react": "^15.4.1 || ^16.3.2"

@@ -29,0 +29,0 @@ },

@@ -28,1 +28,4 @@ # Text Area

```
## Custom CSS
Use the `className` prop to pass in a css class name to the outermost container of the component. The class name will also pass down to most of the other styled elements within the component.
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