Merge branch 'next' of https://github.com/shoelace-style/webawesome into konnorrogers/add-proper-dependencies-to-wa-page

This commit is contained in:
Konnor Rogers
2024-12-18 23:29:40 -05:00
5 changed files with 16 additions and 4 deletions

View File

@@ -63,6 +63,14 @@ Use the `disabled` attribute to disable a textarea.
<wa-textarea placeholder="Textarea" disabled></wa-textarea>
```
### Value
Use the `value` attribute to set an initial value.
```html {.example}
<wa-textarea value="Write something awesome!"></wa-textarea>
```
### Sizes
Use the `size` attribute to change a textarea's size.
@@ -89,4 +97,4 @@ Textareas will automatically resize to expand to fit their content when `resize`
```html {.example}
<wa-textarea resize="auto"></wa-textarea>
```
```

View File

@@ -25,7 +25,7 @@ describe('<wa-textarea>', () => {
expect(el.value).to.equal('');
expect(el.defaultValue).to.equal('');
expect(el.title).to.equal('');
expect(el.filled).to.be.false;
expect(el.appearance).to.equal('outlined');
expect(el.label).to.equal('');
expect(el.hint).to.equal('');
expect(el.placeholder).to.equal('');

View File

@@ -210,6 +210,7 @@ export default class WaTextarea extends WebAwesomeFormAssociatedElement {
}
private handleChange() {
this.valueHasChanged = true;
this.value = this.input.value;
this.setTextareaHeight();
this.dispatchEvent(new WaChangeEvent());
@@ -222,6 +223,7 @@ export default class WaTextarea extends WebAwesomeFormAssociatedElement {
}
private handleInput() {
this.valueHasChanged = true;
this.value = this.input.value;
this.dispatchEvent(new WaInputEvent());
}

View File

@@ -101,8 +101,9 @@
--wa-color-neutral-on-loud: white;
}
/** need to wrap :host-context() in an :is() selector for unsupported browsers */
.wa-theme-default-dark,
:host-context(.wa-theme-default-dark) {
:is(:host-context(.wa-theme-default-dark)) {
/**
* Foundational Colors
*/

View File

@@ -48,8 +48,9 @@
--wa-tooltip-line-height: var(--wa-line-height-normal);
}
/** need to wrap :host-context() in an :is() selector for unsupported browsers */
.wa-theme-default-dark,
:host-context(.wa-theme-default-dark) {
:is(:host-context(.wa-theme-default-dark)) {
/* Form controls */
--wa-form-control-background-color: var(--wa-color-surface-default);