# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.52.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.52.0) - 2022-01-17 **Features** - make `Toggle` labels slottable - add option to `ComboBox.clear` to not re-focus input (`clear({ focus: false })`) **Fixes** - break out of trap focus in `Tooltip` when pressing "Escape" - pass "name" prop in `ComboBox` to input element - emit `change` event in `Checkbox` after modifying state - restore explicit typing of `null | HTMLElement` for TypeScript strict mode - dispatch `click:button--primary` in `Modal` if `shouldSubmitOnEnter` is true - **Documentation** - simplify reactive `RadioButton` example - add reactive `Select` example for `Select` - fix grammar in `TreeView` "Expand all nodes" example - note that `Search` clear event is also dispatched when pressing "Escape" - demo reactivity in expandable `Search` example ## [0.51.3](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.51.3) - 2022-01-12 **Fixes** - fix `selectedIndex` reactivity in `ComboBox` **Refactor** - remove redundant `null` in `null | HTMLElement` prop types ## [0.51.2](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.51.2) - 2022-01-10 **Fixes** - correctly reset values in `ComboBox` when manually clearing selection - fix filterable `ComboBox` keyboard selection - remove redundant role attributes from `Dropdown`, `Header` to fix a11y warnings - fix `TileGroup` two-way binding on the `selected` prop **Documentation** - document `DatePicker` usage with a Rollup set-up - add multiple modals example for `Modal` - add reactive examples for `RadioTile` ## [0.51.1](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.51.1) - 2022-01-03 **Fixes** - add missing `required` prop to `Select` - set global theme variable first in SCSS files ## [0.51.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.51.0) - 2021-12-30 **Features** - enhance `Checkbox` to support `bind:group` ## [0.50.5](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.50.5) - 2021-12-30 **Fixes** - filterable `MultiSelect` should blur when pressing "Tab" - filterable `MultiSelect` menu should close when pressing "Escape" - filterable `MultiSelect` menu should open when pressing "Space" - `DatePicker` input should not lose focus when pressing "Enter" - `ToolbarSearch` should expand if `value` is programmatically set ## [0.50.4](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.50.4) - 2021-12-30 **Fixes** - pressing "Escape" in a `DatePicker` should not propagate past the open calendar - prevent menu icon in filterable `MultiSelect` from triggering twice ## [0.50.3](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.50.3) - 2021-12-28 **Fixes** - do not dispatch "click", "click:row" `DataTable` events when selecting a checkbox or radio button - render "labelText" slot if `labelText` prop or `$$slots.labelText` is truthy - prevent default behavior in `Tabs` mobile variant when clicking a menu option - coalesce nullish values to `""` for `TextInput`, `PasswordInput`, `TextArea` ## [0.50.2](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.50.2) - 2021-11-27 **Fixes** - select correct item in filterable `MultiSelect` using keyboard navigation - do not mutate `sortedItems` in `MultiSelect` ## [0.50.1](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.50.1) - 2021-11-19 **Fixes** - do not dispatch `DataTable` "click", "click:row" events if target is an `OverflowMenu` ## [0.50.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.50.0) - 2021-11-18 **Features** - add `target` prop to `ContextMenu` to support custom trigger element(s) - pass clicked element as `event.detail` in `ContextMenu` "open" event ## [0.49.2](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.49.2) - 2021-11-18 **Fixes** - `Tabs` should not dispatch an initial "change" event when no change has occurred - `Pagination` page value should not exceed total pages - fix `Popover` relative prop by inlining style - replace `onDestroy` with `onMount` return function to avoid running code server-side ## [0.49.1](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.49.1) - 2021-11-17 **Fixes** - include missing `Popover` styles from `carbon-components@10.47` ## [0.49.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.49.0) - 2021-11-12 **Features** - support `UIShell` HeaderNavMenu with current item - make `InlineNotification` title, subtitle props slottable - make `ToastNotification` title, subtitle, and caption props slottable **Refactor** - remove unnecessary "position: relative" style in `ExpandableTile` - remove unused `refContent` in `ExpandableTile` **Housekeeping** - upgrade `carbon-components` to v10.48.0 ## [0.48.1](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.48.1) - 2021-11-12 **Fixes** - type `DatePicker` locale prop as flatpickr `CustomLocale` or `key` - update remaining `carbon-icons-svelte` imports to use inlined icons ## [0.48.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.48.0) - 2021-11-11 **Breaking Changes** - remove `carbon-icons-svelte` from direct dependencies **Features** - support auto-width `Tabs` - add ref prop to `Form` **Fixes** - set calendar instance to `null` when destroying `DatePicker` ## [0.47.6](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.47.6) - 2021-11-10 **Fixes** - fix `Tooltip` two way binding when icon is in focus - coerce `TextInput` value to a number if `type="number"` ## [0.47.5](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.47.5) - 2021-11-07 **Fixes** - fix `Tooltip` open/close logic to allow two way binding of the `open` prop - inline `position: relative` style in `ExpandableTile` ## [0.47.4](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.47.4) - 2021-11-06 **Fixes** - only dispatch `click:row--expand` when clicking an expandable `DataTable` row chevron ## [0.47.3](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.47.3) - 2021-10-22 **Fixes** - correctly toggle batch expansion button in `DataTable` ## [0.47.2](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.47.2) - 2021-10-21 **Fixes** - close the open `Tooltip` when using multiple tooltips - collapse batch expansion button in `DataTable` if one or more rows is collapsed - omit explicit reference to "carbon-icons-svelte" from `icon` prop descriptions ## [0.47.1](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.47.1) - 2021-10-20 **Fixes** - include border style for non-expandable rows in a batch expandable `DataTable` ## [0.47.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.47.0) - 2021-10-19 **Features** - add `nonExpandableRowsIds` prop to `DataTable` to specify rows that should not be expandable ## [0.46.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.46.0) - 2021-10-17 **Breaking Changes** - use `.svelte.d.ts` extension instead of `.d.ts` for Svelte component TypeScript definitions **Features** - support `Tag` outline type - add `hideLabel` prop to `MultiSelect` - allow any Svelte component to be used for `icon` props, not just `CarbonIcon` - add `closeIcon` prop to `HeaderAction` to override the default `Close20` icon **Fixes** - avoid opening the calendar if `DatePickerInput` is a disabled `fieldset` descendant - remove `stopPropagation` modifier from `HeaderAction` to allow multiple UI Shell app switchers **Housekeeping** - upgrade `carbon-components` to v10.46.0 ## [0.45.1](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.45.1) - 2021-10-15 **Fixes** - prevent space/enter keys from selecting incomplete `ProgressIndicator` steps ## [0.45.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.45.0) - 2021-10-13 **Features** - add `TreeView` component accessors to programmatically expand/collapse nodes ## [0.44.7](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.44.7) - 2021-10-13 **Fixes** - add missing `value` prop to `Checkbox` ## [0.44.6](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.44.6) - 2021-10-11 **Fixes** - fix `DataTable` sorting to tolerate `null`, `undefined` values ## [0.44.5](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.44.5) - 2021-10-04 **Fixes** - correctly apply `menuOptionsClass` in `OverflowMenu` ## [0.44.4](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.44.4) - 2021-09-28 **Fixes** - `ClickableTile` TypeScript definition restProps should extend attributes of either `a` or `p` tags ## [0.44.3](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.44.3) - 2021-09-23 **Fixes** - correctly apply styles when using a static width `DataTable` with a title and description ## [0.44.2](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.44.2) - 2021-09-14 **Fixes** - prevent redundant `clear` events in `ComboBox` ## [0.44.1](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.44.1) - 2021-09-11 **Fixes** - if `ComboBox` is disabled, clicking the chevron icon should not toggle the dropdown - `ToolbarBatchActions` cancel button text should be slottable ## [0.44.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.44.0) - 2021-09-07 **Features** - add ability to override or customize `DatePicker` calendar options using the `flatpickrProps` prop ## [0.43.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.43.0) - 2021-09-06 **Features** - add ability to programmatically clear a `ComboBox` using the `clear` component accessor ## [0.42.3](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.42.3) - 2021-09-05 **Fixes** - `RadioButton` "labelText" slot should render even if `labelText` is falsy - only render `FormGroup` `legend` element if `legendText` is truthy ## [0.42.2](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.42.2) - 2021-07-29 **Fixes** - fix reactivity regression in `ComboBox` **Documentation** - update example set-ups - document styling instructions, `carbon-preprocess-svelte` in README.md ## [0.42.1](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.42.1) - 2021-07-26 **Fixes** - disable `a11y-mouse-events-have-key-events` warnings - upgrade `carbon-icons-svelte` to v10.36.0 to quell `a11y-mouse...` warnings **Refactor** - remove `formatStyle` utility in `OverflowMenu` **Documentation** - add `svelte:head` example usage for loading CDN styles - add instructions for dynamic theming - update number of available Carbon icons ## [0.42.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.42.0) - 2021-07-22 **Features** - add `helperText` prop to `DatePickerInput` **Fixes** - replace `svelte:body` with `svelte:window` when listening for an outside click **Documentation** - fix typos in styling instructions - update expanded nodes guidance - add `DatePicker` example "With helper text" **Refactor** - omit explicit `treeview.scss` import in `css/*.scss` files as it is included by default in `carbon-components@10.40` **Housekeeping** - upgrade `carbon-components` to v10.40.0 ## [0.41.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.41.0) - 2021-07-18 **Features** - add expandedIds to `TreeView` **Fixes** - do not fall back to an empty string for a `DataTable` value if falsy - omit disabled attribute in `Button` if value is falsy **Documentation** - add styling instructions to the home page ## [0.40.1](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.40.1) - 2021-07-14 **Fixes** - focus first, non-disabled `TreeView` node if active id does not match the selected id - set `type="button"` on `OverflowMenu` to prevent submit behavior when pressing "Enter" - update semantic attributes in `OverflowMenuItem` - do not render `OverflowMenuItem` title attribute if using a slot - do not dispatch `NumberInput` on:change event on initialization - dynamically load ESM `flatpickr` rangePlugin - forward input, focus events to `Select` - type `DataTableRowId` as `any`, fixes ## [0.40.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.40.0) - 2021-07-11 **Breaking Changes** - remove `appendTo` prop in `DatePicker` for server-side rendering (SSR) compatibility **Features** - add `Breakpoint` component to detect the current Carbon grid size based on browser width - add `Theme` component to dynamically update the current theme client-side - add `valueFrom`, `valueTo` props for range `DatePicker` - export `multiSelectRef`, `fieldRef`, `selectionRef` in `MultiSelect` - add clearItem, clearAll instance methods to `LocalStorage` - support `NumberInput` readonly variant **Fixes** - append `DatePicker` instance to local reference to prevent arrow key locking - fix `on:change` type signature in `DatePicker` - export id prop in `ProgressBar` - add skeleton text for every row and column in `DataTableSkeleton` - deprecate `shouldShowBorder` prop in `Table` - correctly type exported constant props and function declarations as accessors in `SvelteComponentTyped` interface **Documentation** - document Breakpoint component - document Theme component - add ProgressBar "UX example" - add DatePicker example "Range" - add NumberInput example "Read-only variant" **Housekeeping** - upgrade `carbon-components` to v10.39.0 ## [0.39.0](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.39.0) - 2021-07-05 **Breaking Changes** - remove `clipboard-copy` direct dependency; use native Clipboard API instead of `clipboard-copy` to copy text in `CopyButton`, `CodeSnippet` **Features** - add `TreeView` component - add `RecursiveList` component - support 3 buttons in `Modal`, `ComposedModal` via `secondaryButtons` - make `DataTable` title/description slottable - allow custom `expansionBreakpoint` in UI Shell `Header`, `SideNav` - dispatch "click:button--primary" as an alias to "submit" in `Modal`, `ComposedModal` **Fixes** - export `useStaticWidth` prop in `DataTable` - do not render `DataTable` table header if title/description not provided **Documentation** - add TreeView documentation - add RecursiveList documentation - add CopyButton examples "Overriding copy functionality", "Preventing copy functionality" - add CodeSnippet examples "Overriding copy functionality", "Preventing copy functionality" - add DataTable example "Static width" - include typedefs in Component API section ## [0.38.2](https://github.com/carbon-design-system/carbon-components-svelte/releases/tag/v0.38.2) - 2021-07-03 **Fixes** - prevent `