-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(text-area): add pf-text-area (#2639)
* feat(core): internals controller improvements * feat(text-area): add pf-text-area * fix(text-area): styles still to do: validations, icons, auto-resize * fix(text-area): styles and states still to do: success and warning states, autoresize * fix: allow for build * refactor(core): remove comments and empty blocks * docs(text-area): add css prop docs * fix(text-area): resize class * fix(text-area): add resize both css rule * test(text-area): disable function tests --------- Co-authored-by: Steven Spriggs <[email protected]>
- Loading branch information
1 parent
ac0c376
commit c71bbe5
Showing
21 changed files
with
790 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
"@patternfly/pfe-core": minor | ||
--- | ||
`InternalsController`: added `computedLabelText` read-only property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
"@patternfly/pfe-core": minor | ||
--- | ||
`InternalsController`: reflect all methods and properties from `ElementInternals` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
"@patternfly/elements": minor | ||
--- | ||
✨ Added `<pf-text-area>` | ||
|
||
```html | ||
<form> | ||
<pf-text-area id="textarea" | ||
name="comments" | ||
placeholder="OpenShift enabled our team to..." | ||
resize="vertical" | ||
auto-resize | ||
required | ||
></pf-text-area> | ||
</form> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Text Area | ||
Add a description of the component here. | ||
|
||
## Usage | ||
Describe how best to use this web component along with best practices. | ||
|
||
```html | ||
<pf-text-area> | ||
|
||
</pf-text-area> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<pf-text-area auto-resize></pf-text-area> | ||
|
||
<script type="module"> | ||
import '@patternfly/elements/pf-text-area/pf-text-area.js'; | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<pf-text-area disabled></pf-text-area> | ||
|
||
<script type="module"> | ||
import '@patternfly/elements/pf-text-area/pf-text-area.js'; | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<pf-text-area resize="horizontal"></pf-text-area> | ||
|
||
<script type="module"> | ||
import '@patternfly/elements/pf-text-area/pf-text-area.js'; | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<pf-text-area required></pf-text-area> | ||
|
||
<script type="module"> | ||
import '@patternfly/elements/pf-text-area/pf-text-area.js'; | ||
const textarea = document.querySelector('pf-text-area'); | ||
await textarea.updateComplete; | ||
textarea.checkValidity(); | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<pf-text-area></pf-text-area> | ||
|
||
<script type="module"> | ||
import '@patternfly/elements/pf-text-area/pf-text-area.js'; | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<pf-text-area readonly value="I am the very model of a modern major general"></pf-text-area> | ||
|
||
<script type="module"> | ||
import '@patternfly/elements/pf-text-area/pf-text-area.js'; | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<form> | ||
<pf-text-area required></pf-text-area> | ||
<pf-button>Validate</pf-button> | ||
</form> | ||
|
||
<script type="module"> | ||
import '@patternfly/elements/pf-text-area/pf-text-area.js'; | ||
document.querySelector('form').addEventListener('submit', event => { | ||
event.preventDefault(); | ||
document.querySelector('pf-text-area').checkValidity(); | ||
}); | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<pf-text-area resize="vertical"></pf-text-area> | ||
|
||
<script type="module"> | ||
import '@patternfly/elements/pf-text-area/pf-text-area.js'; | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% renderOverview %} | ||
<pf-text-area></pf-text-area> | ||
{% endrenderOverview %} | ||
|
||
{% band header="Usage" %}{% endband %} | ||
|
||
{% renderSlots %}{% endrenderSlots %} | ||
|
||
{% renderAttributes %}{% endrenderAttributes %} | ||
|
||
{% renderMethods %}{% endrenderMethods %} | ||
|
||
{% renderEvents %}{% endrenderEvents %} | ||
|
||
{% renderCssCustomProperties %}{% endrenderCssCustomProperties %} | ||
|
||
{% renderCssParts %}{% endrenderCssParts %} |
Oops, something went wrong.