Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@_nu/css-textarea

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@_nu/css-textarea - npm Package Compare versions

Comparing version
0.0.1
to
0.0.2
+21
LICENSE
MIT License
Copyright (c) 2020 NU-system
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+4
-1

@@ -1,1 +0,4 @@

@charset "UTF-8";textarea{font-family:inherit}.nu_textarea{display:block}.nu_textarea>textarea,textarea.nu_textarea{outline:0;-webkit-appearance:none;word-break:break-all;vertical-align:top;-webkit-box-sizing:border-box;box-sizing:border-box;resize:none;overflow:auto;width:100%;line-height:20px;padding:9px 8px;border:1px solid #ddd;border-radius:4px;background-color:#fff;color:#333;font-size:14px;-webkit-transition:border-color .15s,background-color .15s;transition:border-color .15s,background-color .15s}
@charset "UTF-8";
textarea{font-family:inherit}
.nu_textarea{display:block}
.nu_textarea>textarea,textarea.nu_textarea{outline:0;-webkit-appearance:none;word-break:break-all;vertical-align:top;box-sizing:border-box;resize:none;overflow:auto;width:100%;border:none;line-height:20px;padding:9px 8px;border:1px solid #ddd;border-radius:4px;background-color:#fff;color:#333;font-size:14px;transition:border-color .15s,background-color .15s}

@@ -1,1 +0,4 @@

.nu_textarea_x{position:relative;display:block}.nu_textarea_x .nu_textarea{display:block}.nu_textarea_x textarea{padding-bottom:30px}.nu_textarea_x>.nu_textarea_count{position:absolute;right:10px;bottom:0;line-height:32px;color:#a2a9b6;font-size:12px;text-align:right;z-index:1}
.nu_textarea_x{position:relative;display:block}
.nu_textarea_x .nu_textarea{display:block}
.nu_textarea_x textarea{padding-bottom:30px}
.nu_textarea_x>.nu_textarea_count{position:absolute;right:10px;bottom:0;line-height:32px;color:#a2a9b6;font-size:12px;text-align:right;z-index:1}
+2
-1

@@ -1,1 +0,2 @@

.nu_textarea:disabled,.nu_textarea>textarea:disabled{background-color:#eee}.nu_textarea:disabled:hover,.nu_textarea>textarea:disabled:hover{border-color:#ccc}
.nu_textarea:disabled,.nu_textarea>textarea:disabled{background-color:#eee}
.nu_textarea:disabled:hover,.nu_textarea>textarea:disabled:hover{border-color:#ccc}

@@ -1,1 +0,3 @@

.nu_textarea>textarea[readonly],.nu_textarea[readonly]{background-color:#fff}.nu_textarea>textarea[readonly]:focus,.nu_textarea[readonly]:focus{border-color:#ddd}.nu_textarea>textarea[readonly]:hover,.nu_textarea[readonly]:hover{border-color:#ccc}
.nu_textarea>textarea[readonly],.nu_textarea[readonly]{background-color:#fff}
.nu_textarea>textarea[readonly]:focus,.nu_textarea[readonly]:focus{border-color:#ddd}
.nu_textarea>textarea[readonly]:hover,.nu_textarea[readonly]:hover{border-color:#ccc}

@@ -1,1 +0,4 @@

textarea[resize=both]{resize:both}textarea[resize=vertical]{resize:vertical}textarea[resize=horizontal]{resize:horizontal}textarea:disabled,textarea[readonly]{resize:none}
textarea[resize=both]{resize:both}
textarea[resize=vertical]{resize:vertical}
textarea[resize=horizontal]{resize:horizontal}
textarea:disabled,textarea[readonly]{resize:none}
{
"name": "@_nu/css-textarea",
"version": "0.0.1",
"version": "0.0.2",
"description": "CSS textarea",
"homepage": "https://github.com/nu-system/css-textarea",
"bugs": {
"url": "https://github.com/nu-system/css-textarea/issues"
},
"repository": {
"type": "git",
"url": "git@github.com:nu-system/css-textarea.git"
},
"repository": "git@github.com:nu-system/react.git",
"bugs": "https://github.com/nu-system/react/issues",
"author": "sunmeiye",
"license": "MIT",
"browserslist": [
"> 1%",
"last 2 versions"
],
"main": "lib/index.css",
"module": "module/index.module.css",
"publishConfig": {
"access": "public"
},
"files": [

@@ -35,37 +29,5 @@ "demo",

"start": "gulp",
"build": "gulp build",
"commit": "git add . && git cz",
"log": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"commitizenInit": "commitizen init cz-conventional-changelog --yarn --dev --exact",
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,css,md,json}'"
"build": "rm -rf lib && rm -rf ./module && gulp build"
},
"husky": {
"hooks": {
"pre-commit": "npm run log && git add . && lint-staged"
}
},
"lint-staged": {
"*.{js,json,md,less,css}": [
"prettier --write"
]
},
"devDependencies": {
"cli": "^1.0.1",
"commitizen": "^4.0.3",
"conventional-changelog-cli": "^2.0.23",
"cz-conventional-changelog": "3.0.2",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^7.0.1",
"gulp-connect": "^5.7.0",
"gulp-csso": "^4.0.1",
"gulp-less": "^4.0.1",
"husky": "^4.2.5",
"lint-staged": "^10.1.3",
"prettier": "^1.19.1"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
"gitHead": "c33e272ec146e44bbb49b2a2a3451791b29ee75f"
}
+14
-14

@@ -43,6 +43,6 @@ # @\_nu/css-textarea

| Selector | Function |
| :------------------ | -----------------: |
| textarea.nu_textarea | base selector |
| .nu_textarea textarea | wrap selector |
| Selector | Function |
| :-------------------- | ------------: |
| textarea.nu_textarea | base selector |
| .nu_textarea textarea | wrap selector |

@@ -63,12 +63,12 @@ ```Html

| Selector | Function | skin |
| :---------------- | ------------------- | --------------: |
| textarea:disabled | disabled textarea | `disabled.css` |
| textarea:readonly | readonly textarea | `readonly.css` |
| textarea:focus | focus textarea | `focus.css` |
| textarea:hover | hover textarea | `hover.css`|
| textarea:resize | resize textarea | `resize.css`|
| .nu_textarea_x | textarea count wrap | `count.css` |
| .nu_textarea_count| textarea count num | `count.css` |
| .\_error | error textarea | `error.css` |
| Selector | Function | skin |
| :----------------- | ------------------- | -------------: |
| textarea:disabled | disabled textarea | `disabled.css` |
| textarea:readonly | readonly textarea | `readonly.css` |
| textarea:focus | focus textarea | `focus.css` |
| textarea:hover | hover textarea | `hover.css` |
| textarea:resize | resize textarea | `resize.css` |
| .nu_textarea_x | textarea count wrap | `count.css` |
| .nu_textarea_count | textarea count num | `count.css` |
| .\_error | error textarea | `error.css` |

@@ -75,0 +75,0 @@ ## More

@charset "UTF-8";
textarea {
font-family: inherit;
font-family: inherit;
}
.nu_textarea{
display: block;
.nu_textarea {
display: block;
}
textarea.nu_textarea,
.nu_textarea > textarea{
outline: none;
-webkit-appearance: none;
word-break: break-all;
vertical-align: top;
box-sizing: border-box;
resize: none;
overflow: auto;
width: 100%;
border: none;
line-height: 20px;
padding: 9px 8px;
border: 1px solid #ddd;
border-radius: 4px;
background-color: #fff;
color: #333;
font-size: 14px;
transition: border-color .15s, background-color .15s;
.nu_textarea > textarea {
outline: none;
-webkit-appearance: none;
word-break: break-all;
vertical-align: top;
box-sizing: border-box;
resize: none;
overflow: auto;
width: 100%;
border: none;
line-height: 20px;
padding: 9px 8px;
border: 1px solid #ddd;
border-radius: 4px;
background-color: #fff;
color: #333;
font-size: 14px;
transition: border-color 0.15s, background-color 0.15s;
}

@@ -1,11 +0,10 @@

/* 带有count的情况下 */
.nu_textarea_x{
.nu_textarea_x {
position: relative;
display: block;
}
.nu_textarea_x .nu_textarea{
.nu_textarea_x .nu_textarea {
display: block;
}
.nu_textarea_x textarea{
.nu_textarea_x textarea {
padding-bottom: 30px;

@@ -16,3 +15,3 @@ }

position: absolute;
right: 10px;
right: 10px;
bottom: 0;

@@ -24,2 +23,2 @@ line-height: 32px;

z-index: 1;
}
}

@@ -1,14 +0,11 @@

/* disabled */
.nu_textarea:disabled,
.nu_textarea > textarea:disabled{
background-color: #eee;
.nu_textarea > textarea:disabled {
background-color: #eee;
}
/* disabled hover */
.nu_textarea:disabled:hover,
.nu_textarea > textarea:disabled:hover {
border-color: #ccc;
border-color: #ccc;
}
// /* error */
textarea.nu_textarea._error,
.nu_textarea._error > textarea{
border-color: #eb4646 !important;
.nu_textarea._error > textarea {
border-color: #eb4646 !important;
}
/* focus */
textarea.nu_textarea:focus,
.nu_textarea > textarea:focus {
border-color: #007bff;
border-color: #007bff;
}

@@ -1,7 +0,5 @@

/* hover */
textarea.nu_textarea:hover,
.nu_textarea > textarea:hover {
border-color: #ccc;
border-color: #ccc;
}
/* readonly */
.nu_textarea[readonly],
.nu_textarea > textarea[readonly]{
background-color: #fff;
.nu_textarea > textarea[readonly] {
background-color: #fff;
}
/* readonly focus */
.nu_textarea[readonly]:focus,
.nu_textarea > textarea[readonly]:focus {
border-color: #ddd;
border-color: #ddd;
}
/* readonly hover */
.nu_textarea[readonly]:hover,
.nu_textarea > textarea[readonly]:hover{
border-color: #ccc;
}
.nu_textarea > textarea[readonly]:hover {
border-color: #ccc;
}
/* 拉伸的时候 */
textarea[resize="both"] {
textarea[resize='both'] {
resize: both;
}
textarea[resize="vertical"] {
textarea[resize='vertical'] {
resize: vertical;
}
textarea[resize="horizontal"] {
textarea[resize='horizontal'] {
resize: horizontal;

@@ -14,3 +14,3 @@ }

textarea:disabled {
resize: none;
}
resize: none;
}
@charset "UTF-8";
textarea {
font-family: inherit;
}
.nu_textarea {
display: block;
}
textarea.nu_textarea,
.nu_textarea > textarea {
outline: none;
-webkit-appearance: none;
word-break: break-all;
vertical-align: top;
box-sizing: border-box;
resize: none;
overflow: auto;
width: 100%;
border: none;
line-height: 20px;
padding: 9px 8px;
border: 1px solid #ddd;
border-radius: 4px;
background-color: #fff;
color: #333;
font-size: 14px;
transition: border-color 0.15s, background-color 0.15s;
}
/* 带有count的情况下 */
.nu_textarea_x {
position: relative;
display: block;
}
.nu_textarea_x .nu_textarea {
display: block;
}
.nu_textarea_x textarea {
padding-bottom: 30px;
}
/* count */
.nu_textarea_x > .nu_textarea_count {
position: absolute;
right: 10px;
bottom: 0;
line-height: 32px;
color: #a2a9b6;
font-size: 12px;
text-align: right;
z-index: 1;
}
/* disabled */
.nu_textarea:disabled,
.nu_textarea > textarea:disabled {
background-color: #eee;
}
/* disabled hover */
.nu_textarea:disabled:hover,
.nu_textarea > textarea:disabled:hover {
border-color: #ccc;
}
textarea.nu_textarea._error,
.nu_textarea._error > textarea {
border-color: #eb4646 !important;
}
/* focus */
textarea.nu_textarea:focus,
.nu_textarea > textarea:focus {
border-color: #007bff;
}
/* hover */
textarea.nu_textarea:hover,
.nu_textarea > textarea:hover {
border-color: #ccc;
}
/* readonly */
.nu_textarea[readonly],
.nu_textarea > textarea[readonly] {
background-color: #fff;
}
/* readonly focus */
.nu_textarea[readonly]:focus,
.nu_textarea > textarea[readonly]:focus {
border-color: #ddd;
}
/* readonly hover */
.nu_textarea[readonly]:hover,
.nu_textarea > textarea[readonly]:hover {
border-color: #ccc;
}
/* 拉伸的时候 */
textarea[resize="both"] {
resize: both;
}
textarea[resize="vertical"] {
resize: vertical;
}
textarea[resize="horizontal"] {
resize: horizontal;
}
textarea[readonly],
textarea:disabled {
resize: none;
}
# @\_nu/css-textarea
[![npm package][npm-badge]][npm-url]
[![npm downloads][npm-downloads]][npm-url]
[![jsdelivr][jsdelivr-badge]][jsdelivr-url]
[![github][git-badge]][git-url]
[npm-badge]: https://img.shields.io/npm/v/@_nu/css-textarea.svg
[npm-url]: https://www.npmjs.org/package/@_nu/css-textarea
[npm-downloads]: https://img.shields.io/npm/dw/@_nu/css-textarea
[git-url]: https://github.com/nu-system/css-textarea
[git-badge]: https://img.shields.io/github/stars/nu-system/css-textarea.svg?style=social
[jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/@_nu/css-textarea/badge
[jsdelivr-url]: https://www.jsdelivr.com/package/npm/@_nu/css-textarea
[English](https://nu-system.github.io/textarea/) | 简体中文
## How
```
$ yarn add @_nu/css-textarea
```
## Tree
```
@_nu/css-textarea/lib
lib
├── index.css // base style
└── skins
└── default
├── disabled.css // disabled
├── readonly.css // readonly
├── error.css // error state
├── focus.css // on focus
├── hover.css // on hover
├── resize.css // resize
└── count.css // count
```
## API
| Selector | Function |
| :------------------ | -----------------: |
| textarea.nu_textarea | base selector |
| .nu_textarea textarea | wrap selector |
```Html
<textarea class="nu_textarea" placeholder="nu_textarea"></textarea>
```
```Html
<label class="nu_textarea">
<textarea placeholder="nu_textarea"></textarea>
</label>
```
For the sake of flexibility these two ways are equivalent.
## Skins API
| Selector | Function | skin |
| :---------------- | ------------------- | --------------: |
| textarea:disabled | disabled textarea | `disabled.css` |
| textarea:readonly | readonly textarea | `readonly.css` |
| textarea:focus | focus textarea | `focus.css` |
| textarea:hover | hover textarea | `hover.css`|
| textarea:resize | resize textarea | `resize.css`|
| .nu_textarea_x | textarea count wrap | `count.css` |
| .nu_textarea_count| textarea count num | `count.css` |
| .\_error | error textarea | `error.css` |
## More
- [nu-system](https://nu-system.github.io/)