From 443f9570277532c59d262d5abe0afca6fe44a90d Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Fri, 11 Dec 2020 05:09:55 -0800 Subject: [PATCH] v0.26.0 --- CHANGELOG.md | 36 ++++++++++++++++++++++++++++++++++++ COMPONENT_INDEX.md | 7 +++++-- docs/src/COMPONENT_API.json | 8 +++++--- package.json | 2 +- types/Select/SelectItem.d.ts | 2 +- types/Tooltip/Tooltip.d.ts | 2 ++ 6 files changed, 50 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2856a316..28bf5161 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +## [0.26.0](https://github.com/IBM/carbon-components-svelte/releases/tag/v0.26.0) - 2020-12-11 + +**Features** + +- Render the UI Shell hamburger menu only if the `SideNav` component is present ([PR #457](https://github.com/IBM/carbon-components-svelte/pull/457), [issue #434](https://github.com/IBM/carbon-components-svelte/issues/434)) +- Clear the `Search` input value if the "Escape" key is pressed ([PR #448](https://github.com/IBM/carbon-components-svelte/pull/448)) +- Customize the `Tooltip` alignment using the `align` prop ([PR #446](https://github.com/IBM/carbon-components-svelte/pull/446), [issue #398](https://github.com/IBM/carbon-components-svelte/issues/398)) + +**Fixes** + +- Fix `files` prop type `FileUploader` to be a list of [Files](https://developer.mozilla.org/en-US/docs/Web/API/File) instead of file names ([PR #437](https://github.com/IBM/carbon-components-svelte/pull/437)) +- Allow binding decimal values in `NumberInput` ([PR #444](https://github.com/IBM/carbon-components-svelte/pull/444)) +- Spread `$$restProps` in `DataTableSkeleton` to the top-level element to be consistent with `DataTable` ([PR #441](https://github.com/IBM/carbon-components-svelte/pull/441), [issue #423](https://github.com/IBM/carbon-components-svelte/issues/423)) +- Close the `Tooltip` on the mousedown event; re-focus the tooltip icon after closing and forward `click`, `mousedown` events +- Focus the `Dropdown` button correctly for multiple dropdowns ([PR #447](https://github.com/IBM/carbon-components-svelte/pull/447)) +- Focus the `ComboBox` input correctly for multiple combo boxes ([PR #447](https://github.com/IBM/carbon-components-svelte/pull/447)) +- Blur an opened `ComboBox` when clicking a search input ([PR #447](https://github.com/IBM/carbon-components-svelte/pull/447), [issue #436](https://github.com/IBM/carbon-components-svelte/issues/436)) +- Prevent cursor shift in UI Shell `HeaderSearch` when using the up/down arrow keys to navigate results ([PR #432](https://github.com/IBM/carbon-components-svelte/pull/432), [issue #431](https://github.com/IBM/carbon-components-svelte/issues/431)) +- Deprecate `small` prop in `ButtonSkeleton` +- Fix `CodeSnippetSkeleton` type to only be "single" or "multi" + +**Breaking Changes** + +- `files` in `FileUploader` components is a list of [Files](https://developer.mozilla.org/en-US/docs/Web/API/File), not just file names +- `$$restProps` is spread to the top-level element in `DataTableSkeleton` + +**Documentation** + +- Add reactive, hidden, custom alignment examples for Tooltip +- Add reactive examples for `Search`, `ContentSwitcher`, `Toggle` components +- Add plain Header (no `SideNav`) UI Shell example + +**Housekeeping** + +- Upgrade `carbon-components` to version 10.25 for the pre-compiled CSS StyleSheets + ## [0.25.1](https://github.com/IBM/carbon-components-svelte/releases/tag/v0.25.1) - 2020-11-28 **Fixes** diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 555720d5..a931eb43 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -1,6 +1,6 @@ # Component Index -> 155 components exported from carbon-components-svelte@0.25.1. +> 155 components exported from carbon-components-svelte@0.26.0. ## Components @@ -4153,7 +4153,10 @@ None. ### Events -None. +| Event name | Type | Detail | +| :--------- | :-------- | :----- | +| click | forwarded | -- | +| mousedown | forwarded | -- | ## `TooltipDefinition` diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 001f522a..b77fed2b 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -6407,8 +6407,7 @@ ], "slots": [], "events": [], - "typedefs": [], - "rest_props": { "type": "Element", "name": "option" } + "typedefs": [] }, { "moduleName": "Pagination", @@ -9458,7 +9457,10 @@ "slot_props": "{}" } ], - "events": [], + "events": [ + { "type": "forwarded", "name": "click", "element": "div" }, + { "type": "forwarded", "name": "mousedown", "element": "div" } + ], "typedefs": [], "rest_props": { "type": "Element", "name": "div" } }, diff --git a/package.json b/package.json index d83c2d2d..88547bcf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "carbon-components-svelte", - "version": "0.25.1", + "version": "0.26.0", "license": "Apache-2.0", "author": "IBM", "description": "Svelte implementation of the Carbon Design System", diff --git a/types/Select/SelectItem.d.ts b/types/Select/SelectItem.d.ts index 59fe939b..b08ba976 100644 --- a/types/Select/SelectItem.d.ts +++ b/types/Select/SelectItem.d.ts @@ -1,6 +1,6 @@ /// -export interface SelectItemProps extends svelte.JSX.HTMLAttributes { +export interface SelectItemProps { /** * Specify the option value * @default "" diff --git a/types/Tooltip/Tooltip.d.ts b/types/Tooltip/Tooltip.d.ts index 784f8806..197f38e1 100644 --- a/types/Tooltip/Tooltip.d.ts +++ b/types/Tooltip/Tooltip.d.ts @@ -94,5 +94,7 @@ export default class Tooltip { triggerText: {}; }; + $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; + $on(eventname: "mousedown", cb: (event: WindowEventMap["mousedown"]) => void): () => void; $on(eventname: string, cb: (event: Event) => void): () => void; }