From 7e912af666b1ad425a0e1cac18a50d5f53bc0c22 Mon Sep 17 00:00:00 2001 From: Nathaniel Waldschmidt <77284592+NateWaldschmidt@users.noreply.github.com> Date: Wed, 4 Sep 2024 08:03:36 -0500 Subject: [PATCH] feat: type and refactor textarea component (#536) --- CHANGELOG.md | 8 + package-lock.json | 4 +- package.json | 2 +- src/components/Textarea/Textarea.mdx | 12 - src/components/Textarea/Textarea.stories.js | 81 ++++- src/components/Textarea/Textarea.vue | 326 ++++++++---------- .../Textarea/__tests__/Textarea.spec.js | 159 --------- .../Textarea/__tests__/Textarea.spec.ts | 72 ++++ src/components/Textarea/constants.ts | 9 + src/components/Textarea/index.ts | 2 + src/components/index.js | 1 - src/main.ts | 1 + 12 files changed, 315 insertions(+), 362 deletions(-) delete mode 100644 src/components/Textarea/__tests__/Textarea.spec.js create mode 100644 src/components/Textarea/__tests__/Textarea.spec.ts create mode 100644 src/components/Textarea/constants.ts create mode 100644 src/components/Textarea/index.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index b842a7d0b..a04a89aa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## v2.0.91 + +- Type `Textarea` component and normalize props + +## v2.0.90 + +- + ## v2.0.89 - Slot `helper` added `RadioButton` as alternative to `helperText` diff --git a/package-lock.json b/package-lock.json index 8160ca358..4a05ad009 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lob/ui-components", - "version": "2.0.90", + "version": "2.0.91", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lob/ui-components", - "version": "2.0.90", + "version": "2.0.91", "dependencies": { "date-fns": "^2.29.3", "date-fns-holiday-us": "^0.3.1", diff --git a/package.json b/package.json index 317bf249d..f0e698b77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lob/ui-components", - "version": "2.0.90", + "version": "2.0.91", "engines": { "node": ">=20.2.0", "npm": ">=10.2.0" diff --git a/src/components/Textarea/Textarea.mdx b/src/components/Textarea/Textarea.mdx index 94ecac4db..7b3b57bd5 100644 --- a/src/components/Textarea/Textarea.mdx +++ b/src/components/Textarea/Textarea.mdx @@ -3,20 +3,8 @@ import { Primary } from './Textarea.stories'; # Textarea -A textarea component for entering large blocks of text in a form. - -## How to Use - -You can pass in the `v-model` prop to bind the textarea to the parent component's data model. - -You can pass in a `@change` handler to trigger a custom function on change events. The `event` object will be emitted along with the `change` event. - -```html -