Releases: carbon-design-system/carbon-components-svelte
v0.30.0
Breaking Changes
- forward
$$restPropsto the input element inSearch,MultiSelect,ComboBox,TimePicker,DatePickerInput,NumberInput
Features
- add
ImageLoadercomponent - add
LocalStoragecomponent - forward "clear" event in
ToolbarSearch - add isSelected prop for icon-only, ghost buttons
- add legendText prop/slot to
RadioButtonGroup - add interactive prop to
Tag - make UI Shell
SideNavMenuItemtext slottable - deprecate
Icon,IconSkeleton
Fixes
- set aria-hidden attribute in UI Shell
SideNav - only show overlay for non-fixed UI Shell
SideNav - correctly render skeleton styles for
TextInputSkeleton - only render
RadioButtonlabel iflabelTextis truthy - deprecate the
NumberInputmobile variant - add missing type annotation for dispatched
MultiSelectselect event - remove redundant "button" role in
Button - update styles for
ListBoxSelectionto fix filterableMultiSelect - temporarily apply override styles to
ListBoxMenuIconto correctly renderDropdownchevron icon - apply
z-index: 1on tooltip when open; style can be overridden through$$restProps.style
Documentation
- add "on:clear" example for
Search - add custom tooltip example for
PasswordInput - add legend text examples for
RadioButtonGroup - add filterable (disabled) variant for
Tag - remove the mobile variant example for
NumberInput
Housekeeping
- upgrade
carbon-componentsto v10.30.0
v0.29.2
v0.29.1
v0.29.0
Breaking Changes
- The default placeholder text for
TimePickeris changed from "hh=mm" to "hh:mm"
Features
- Add UI Shell
SideNavDividercomponent - Add a direction prop to
ComboBox,Dropdown,MultiSelectto render the dropdown menu above or below the input - Support the
ComboBoxwarning state - Add a text truncation component (
Truncate) and action (use:truncate) - Use shorthand SCSS imports in
css/*.scssfiles - Use the official
SvelteComponentTypedinterface in the component TypeScript definitions
Fixes
- Use
descriptionas warning icon title inProgressStep - Include pre-compiled CSS to library side effects to prevent inadvertent tree-shaking
- Fix
DataTabletype definition to include$$restProps
Documentation
- Add filterable small
Tagexample - Add
ComboBoxinvalid state example - Add "Top direction" examples for
ComboBox,Dropdown,MultiSelect - Demo
ProgressIndicatorinvalid/disabled steps - Fix
RadioTilelight variant example
Housekeeping
- Upgrade
carbon-componentsto version 10.29.0
v0.28.0
Breaking Changes
- The
transitionendevent in ComposedModal is dispatched, not forwarded; it will only trigger when the modal has finished animating
Features
- Support small size variant for Tag (
size="sm") - Dispatch
closeevent in a filterable Tag (an alias forclick) - Dispatch
toggleevent in Toggle - Make
tooltipTextslottable in TooltipIcon (slot name="tooltipText") - Add
hideLabelprop to Dropdown - Dispatch
transitionendevent in Modal, ComposedModal to fire after the modal has finished animating - Add warn state to DatePickerInput
Fixes
- Forward the
clickevent to Tab - Do not trigger initial Tab focus when mounting
Documentation
- Add a "Hidden label" example for the Select component
- Add a light variant example for OverflowMenu
- Add a reactive example for Tabs
Housekeeping
- Upgrade
carbon-componentsto version 10.28.0 - Remove unused
@carbon/themesdevelopment dependency; themes are pulled fromcarbon-components
v0.27.0
Features
- Ship scss files used to pre-compile CSS
- Add
optimizeCarbonImportspreprocessor to rewrite base Carbon imports to the source Svelte file - Support warning state in Dropdown, MultiSelect, NumberInput
- Set default values for Button
tooltipAlignment("center") andtooltipPosition("bottom") in Button - Infer icon-only Button variant using $$slots API
- Support disabled state for CodeSnippet (single or multi type only)
- Add optional expand/collapse icon labels to ExpandableTile
- Support custom icon variant for Tag
- Add
timeoutto dispatchedon:closeevent detail in InlineNotification and ToastNotification - Upgrade
flatpickrto version 4.6.9 for ES module (ESM) imports
Fixes
- Co-locate DataTableSkeleton with DataTable components
- Prevent MultiSelect dropdown from opening if disabled
- Forward
submitevent to FluidForm - Correctly apply class props in ModalHeader
- Add missing warning class to TextInput
- Disable visibility toggle if PasswordInput is disabled
- "Show more" button in CodeSnippet should be "field" sized, not small
- Remove extraneous "bx--btn--copy" class from CodeSnippet
- Adjust Loading spinner styles to remove excess padding
- Prevent class from being overridden by $$restProps in InlineNotification, ToastNotification, NotificationActionButton
- Remove extraneous focus ring in Modal
- Remove aria-hidden prop from ToolbarSearch
- Add label id to Slider
- Remove menubar role from HeaderNav; deprecate ariaLabel prop in HeaderNav in favor of real HTML attributes "aria-label" and "aria-labelledby"
- Remove notificationType prop from InlineNotification and ToastNotification
- Focus the first item when opening an OverflowMenu for the first time
- Close the OverflowMenu on the
focusoutevent - Forward $$restProps to the input element for TextInput, PasswordInput
Breaking Changes
- DataTableSkeleton.svelte is moved to
src/DataTable notificationTypeis removed from InlineNotification and ToastNotification- Svelte version 3.25 or greater is required due to use of the $$slots API
- $$restProps are forwarded to the input element for TextInput, PasswordInput
renderIconprop renamed toiconin NotificationButtoniconprop type changed to "typeof import("carbon-icons-svelte").CarbonIcon" in HeaderAction, HeaderActionLink, SideNavLink, SideNavMenu- Pre-compiled CSS StyleSheets use the "compressed"
sass.outputStyleinstead of "compact"
Documentation
- Add documentation for dynamic, client-side theming
- Add icon-only example for the "danger-tertiary" Button
- Update number of supported Carbon icons and pictograms
- Use more realistic body copy in Notification usage examples
- Update development workflow in the contributing guidelines
Housekeeping
- Replace
node-sasswithsass - Upgrade
carbon-componentsto version 10.27.0 - Upgrade
@carbon/themesto version 10.26.0 - Upgrade
autoprefixer,postcss,prettier-plugin-svelte
v0.26.0
Features
-
Render the UI Shell hamburger menu only if the
SideNavcomponent is present (PR #457, issue #434) -
Clear the
Searchinput value if the "Escape" key is pressed (PR #448) -
Customize the
Tooltipalignment using thealignprop (PR #446, issue #398)<!-- default alignment is "center" --> <Tooltip align="center">...</Tooltip> <Tooltip align="start">...</Tooltip> <Tooltip align="end">...</Tooltip>
Fixes
- Fix
filesprop typeFileUploaderto be a list of Files instead of file names (PR #437) - Allow binding decimal values in
NumberInput(PR #444) - Spread
$$restPropsinDataTableSkeletonto the top-level element to be consistent withDataTable(PR #441, issue #423) - Close the
Tooltipon the mousedown event; re-focus the tooltip icon after closing and forwardclick,mousedownevents - Focus the
Dropdownbutton correctly for multiple dropdowns (PR #447) - Focus the
ComboBoxinput correctly for multiple combo boxes (PR #447) - Blur an opened
ComboBoxwhen clicking a search input (PR #447, issue #436) - Prevent cursor shift in UI Shell
HeaderSearchwhen using the up/down arrow keys to navigate results (PR #432, issue #431) - Deprecate
smallprop inButtonSkeleton - Fix
CodeSnippetSkeletontype to only be "single" or "multi"
Breaking Changes
filesinFileUploadercomponents is a list of Files, not just file names$$restPropsis spread to the top-level element inDataTableSkeleton
Documentation
- Add reactive, hidden, custom alignment examples for Tooltip
- Add reactive examples for
Search,ContentSwitcher,Togglecomponents - Add plain Header (no
SideNav) UI Shell example
Housekeeping
- Upgrade
carbon-componentsto version 10.25 for the pre-compiled CSS StyleSheets
v0.25.1
v0.25.0
Features
-
Add
paddingprop to Grid, Row, Column components (PR #420, issue #410)<!-- applies vertical padding to all child columns --> <Grid padding>...</Grid> <!-- applies vertical padding to child columns in a specific row --> <Grid><Row padding>...</Row></Grid> <!-- applies vertical padding to a specific column --> <Grid><Row><Column padding>...</Column></Row></Grid>
-
Add
transitionprop to UI ShellHeaderActionto customize panel slide transition; by default, the slide duration is200ms (PR #419, issue #384)Custom slide transition parameters:
<script> import { quintOut } from "svelte/easing"; </script> <HeaderAction transition="{{ duration: 1200, delay: 200, easing: quintOut }}">...</HeaderAction>
Disabled:
<HeaderAction transition="{false}">...</HeaderAction>
Fixes
- fix
Filestype for FileUploader (PR #422, issue #421) - remove the fly transition from HamburgerMenu (PR #419, issue #384)
Documentation
- add "Padded columns" example to Grid docs
- demo different transitions in "Header with app switcher" example in UI Shell
- describe use case for using native styles in OrderedList
Housekeeping
- pin development dependency
sveldto version 0.3.0
Contributors
v0.24.0
Features
-
Add a
HeaderSearchcomponent for the UI Shell that can render user-provided search results (PR #417, issue #395);HeaderActionSearchis deprecated in favor ofHeaderSearch<HeaderSearch bind:ref bind:active bind:value bind:selectedResultIndex placeholder="Search services" results="{results}" on:active on:inactive on:clear on:select="{(e) => { console.log(e.detail); // { value: string; selectedResultIndex: number; result: HeaderSearchReseult } }}" />
-
Expand
headersprop type inDataTableSkeletonto be consistent with that of theDataTable(PR #415, issue #413)Before, you had to map the header value when using the DataTableSkeleton:
<DataTableSkeleton headers={headers.map(header => header.value)} />
Now, you can simply reuse the headers supplied to the DataTable component:
{#if loading} <DataTableSkeleton {headers} /> {:else} <DataTable {headers} {rows} /> {/if}
Fixes
- Update
DataTableRowprop type in DataTable to require an "id" key and value (PR #415, issue #414)
Documentation
- Add example "Skeleton with object headers" to the DataTable docs
- Add example "Header with global search" to the UI Shell docs