From 1a8664410bdf800d32af3b89f4cc8456db2df0e8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 12:54:13 -0700 Subject: [PATCH] Merge release/v3.2.1 into main branch (#1249) * Fix aria label on CreateableSelect (#1246) * Set RichTextEditor value to empty string if editor is empty (#1247) * Fix Heading default props & stories, fix disabled prop of CreateableSelect (#1248) --- package.json | 2 +- src/Heading/Heading.stories.tsx | 3 +-- src/Heading/Heading.tsx | 2 +- src/RichTextEditor/RichTextEditor.tsx | 2 +- src/Select/CreatableSelect.jsx | 12 ++++++------ 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 30c155a8..d295b90e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@user-interviews/ui-design-system", - "version": "3.2.0", + "version": "3.2.1", "dependencies": { "@tiptap/core": "^2.3.1", "@tiptap/extension-bold": "^2.3.1", diff --git a/src/Heading/Heading.stories.tsx b/src/Heading/Heading.stories.tsx index e7b2765a..5a554815 100644 --- a/src/Heading/Heading.stories.tsx +++ b/src/Heading/Heading.stories.tsx @@ -19,12 +19,11 @@ export default meta; type Story = StoryObj; /** - A default `Heading` as a level `2` with size `xxl` and weight `bold` + A default `Heading` as a level `1` weight `bold` */ export const Default: Story = { args: { children: 'The fastest way to recruit research participants', - level: 1, }, }; diff --git a/src/Heading/Heading.tsx b/src/Heading/Heading.tsx index efa3e810..9a315253 100644 --- a/src/Heading/Heading.tsx +++ b/src/Heading/Heading.tsx @@ -16,7 +16,7 @@ export interface HeadingProps { * logical hierarchy where each heading level represents a sublevel of the previous one, * and avoid skipping levels. */ - level: 1 | 2 | 3 | 4 | 5 | 6; + level?: 1 | 2 | 3 | 4 | 5 | 6; /** * @type {string} * @description Sizes map to the available font-sizes from the defined list of font-types. diff --git a/src/RichTextEditor/RichTextEditor.tsx b/src/RichTextEditor/RichTextEditor.tsx index a5549dcf..1b178805 100644 --- a/src/RichTextEditor/RichTextEditor.tsx +++ b/src/RichTextEditor/RichTextEditor.tsx @@ -171,7 +171,7 @@ const RichTextEditor = forwardRef(( extensions: editorExtensions, content: initialValue, onUpdate: ({ editor: ttEditor }) => { - const html = ttEditor.getHTML(); + const html = ttEditor.isEmpty ? '' : ttEditor.getHTML(); // if allowAttributes or allowedTags aren't passed // then use defaults from sanitize-html by not passing that key in the options diff --git a/src/Select/CreatableSelect.jsx b/src/Select/CreatableSelect.jsx index 768daa43..e71ca9da 100644 --- a/src/Select/CreatableSelect.jsx +++ b/src/Select/CreatableSelect.jsx @@ -15,12 +15,12 @@ const CreatableSelect = ({ className, components, defaultValue, - disabled, - getOptionValue, getOptionLabel, + getOptionValue, id, inputId, isClearable, + isDisabled, isLoading, menuWidth, modal, @@ -34,18 +34,18 @@ const CreatableSelect = ({ }) => (