From 2ab62dc9352085ba3201c7919e649aa67f69c5fa Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 16 Apr 2021 16:00:10 +0100 Subject: [PATCH] Replace RichText editor with spectrum text area --- packages/bbui/package.json | 5 +- packages/bbui/src/Form/Core/TextArea.svelte | 48 ++++++ packages/bbui/src/Form/Core/index.js | 1 + packages/bbui/src/Form/RadioGroup.svelte | 2 +- packages/bbui/src/Form/RichText.svelte | 59 ------- packages/bbui/src/Form/TextArea.svelte | 145 +++--------------- packages/bbui/src/Modal/Modal.svelte | 2 +- packages/bbui/src/index.js | 1 - .../backend/DataTable/RowFieldControl.svelte | 7 +- .../src/forms/LongFormField.svelte | 69 ++------- packages/standard-components/vite.config.js | 7 +- 11 files changed, 91 insertions(+), 255 deletions(-) create mode 100644 packages/bbui/src/Form/Core/TextArea.svelte delete mode 100644 packages/bbui/src/Form/RichText.svelte diff --git a/packages/bbui/package.json b/packages/bbui/package.json index ed9bba0d35..18190c89e3 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -62,10 +62,7 @@ "@spectrum-css/underlay": "^2.0.9", "@spectrum-css/vars": "^3.0.1", "dayjs": "^1.10.4", - "markdown-it": "^12.0.4", - "quill": "^1.3.7", "svelte-flatpickr": "^2.4.0", - "svelte-portal": "^1.0.0", - "turndown": "^7.0.0" + "svelte-portal": "^1.0.0" } } diff --git a/packages/bbui/src/Form/Core/TextArea.svelte b/packages/bbui/src/Form/Core/TextArea.svelte new file mode 100644 index 0000000000..4d206d291b --- /dev/null +++ b/packages/bbui/src/Form/Core/TextArea.svelte @@ -0,0 +1,48 @@ + + +
+ {#if error} + + {/if} + +
+ + diff --git a/packages/bbui/src/Form/Core/index.js b/packages/bbui/src/Form/Core/index.js index 95971a2560..7e3bf39c2a 100644 --- a/packages/bbui/src/Form/Core/index.js +++ b/packages/bbui/src/Form/Core/index.js @@ -3,3 +3,4 @@ export { default as CoreSelect } from "./Select.svelte" export { default as CoreMultiselect } from "./Multiselect.svelte" export { default as CoreCheckbox } from "./Checkbox.svelte" export { default as CoreRadioGroup } from "./RadioGroup.svelte" +export { default as CoreTextArea } from "./TextArea.svelte" diff --git a/packages/bbui/src/Form/RadioGroup.svelte b/packages/bbui/src/Form/RadioGroup.svelte index 227555c802..619a0469e5 100644 --- a/packages/bbui/src/Form/RadioGroup.svelte +++ b/packages/bbui/src/Form/RadioGroup.svelte @@ -4,7 +4,7 @@ import { createEventDispatcher } from "svelte" export let value = null - export let label = undefined + export let label = null export let disabled = false export let labelPosition = "above" export let error = null diff --git a/packages/bbui/src/Form/RichText.svelte b/packages/bbui/src/Form/RichText.svelte deleted file mode 100644 index ab4b9c3d99..0000000000 --- a/packages/bbui/src/Form/RichText.svelte +++ /dev/null @@ -1,59 +0,0 @@ - - - - {#if mergedOptions.theme !== 'snow'} - - {/if} - - -
-
-
diff --git a/packages/bbui/src/Form/TextArea.svelte b/packages/bbui/src/Form/TextArea.svelte index 1133a99127..e3713d1d16 100644 --- a/packages/bbui/src/Form/TextArea.svelte +++ b/packages/bbui/src/Form/TextArea.svelte @@ -1,132 +1,29 @@ -
- {#if label || edit} -
- {#if label} - - {/if} - {#if edit} -
- - -
- {/if} -
- {/if} -