Releases: carbon-design-system/carbon-components-svelte
v0.15.0
Features
-
DataTableSkeleton: add
sizeprop to support "compact", "small", "tall" row heights (PR #279, thanks @albertms10) -
HeaderPanelLink: forward click event (PR #286, thanks @weaseldotro)
-
FluidForm: add
FluidFormcomponent and support fluid variants forTextInput,PasswordInput(PR #293, thanks @josefaidt) -
UI Shell: add
refprop to interactive (i.e. anchor links, buttons) UI Shell elements (PR #297, thanks @josefaidt)
Fixes
Slider:
- attach mousemove/touch events to document body, not slider input (issue #288)
valueprop type should be anumber, not astring(issue #289)- input value should not update if
disabledistrue changeevent should only be dispatched if the value changes
UI Shell: correctly bind ref prop in HeaderGlobalAction (PR #297, thanks @josefaidt)
Misc: export DatePickerSkeleton, FileUploaderSkeleton components
Breaking Changes
- DataTableSkeleton:
compactprop is removed in favor ofsize="compact"
Dependencies
- upgrade
carbon-icons-svelteto version ^10.17.0
Housekeeping
-
prettier: enable
svelteBracketNewLinerule for improved readability (PR #281, thanks @josefaidt) -
git hooks: add husky, lint-staged to development workflow (PR #295, thanks @josefaidt)
v0.14.0
Features
Modal,ComposedModal: addpreventCloseOnClickOutsidepropModal: addalertprop to support alertdialog ARIA role (PR #273, thanks @josefaidt)TextInput: addwarnprop (PR #275, thanks @josefaidt)TextInput: addinlineprop (PR #277, thanks @josefaidt)
Fixes
DataTableSkeleton: addshowHeader,showToolbarpropsOverflowMenu: focus menu button on escape key onlyDataTable: fixheadersJSDoc type annotation (PR #271, thanks @albertms10)
Breaking Changes
DataTableSkeleton:showHeaderandshowToolbararetrueby default
v0.13.0
Thanks @josefaidt for ensuring components are up to spec!
Features
-
Move helper text below form inputs in
ComboBox,Dropdown,MultiSelect,TextArea,NumberInput,TextInput,Select(PR #256, issue #255) -
ProgressIndicator: addspaceEqualprop and functionality (PR #263, issue #262)
Fixes
-
Link: remove visited styles by default (PR #259, issue #258) -
TimePickerSelect: deprecatehideLabelprop to match spec and set default value totrue(PR #261, issue #260)
Breaking Changes
TimePickerSelect:hideLabelprop istrueby default
v0.12.3
v0.12.2
v0.12.1
Fixes
- Pagination: ensure
page,pageSizevalues are numbers (0138910) - Pagination: dispatch "update" event only when
pageSizeorpagevalues update (458d1b5) - Pagination: use correct size carbon icons for buttons (size
16instead of24) (192f98d) - ProgressStep: use button element; set negative
tabindexifdisabledistrue(3202f39) - ProgressStep: forward click event (6cb877e)
- SideNavMenu, SideNavMenuItem: remove "role", "aria-haspopup" attributes causing a11y warnings
- RadioTile: move
keydown,tabindexto input element (17d97d1)
v0.12.0
Features
-
ship precompiled CSS StyleSheets for each Carbon theme, available in the
cssfolder (70e0875)- css/white.css: Default Carbon theme (light)
- css/g10.css: Gray 10 theme (light)
- css/g90.css: Gray 90 theme (dark)
- css/g100.css: Gray 100 theme (dark)
- css/all.css: All themes (White, Gray 10, Gray 90, Gray 100) using CSS variables
Using precompiled CSS
svelte-preprocess
The easiest way to import a StyleSheet is with svelte-preprocess.
const svelteOptions = {
preprocess: require("svelte-preprocess")(),
};<!-- App.svelte -->
<style global>
/** Gray 10 theme **/
@import "carbon-components-svelte/css/g10";
</style>- JavaScript import
Importing a CSS file in a JavaScript file will require the appropriate file loader(s).
import "carbon-components-svelte/css/all.css";
import App from "./App.svelte";
const app = new App({ target: document.body });
export default app;See webpack.config.js in examples/webpack.
Documentation
-
add example set-ups using popular bundlers/frameworks
- examples/rollup: SPA bundled using Rollup
- examples/rollup-typescript: SPA bundled using Rollup with TypeScript support
- examples/routify: SPA + static export using Routify
- examples/sapper: SSR + static export using Sapper
- examples/svite: SPA developed with Svite, bundled with Rollup
- examples/webpack: SPA bundled with webpack
-
revamp
READMEguidance on consuming the library
v0.11.0
v0.10.0
Features
- UI Shell: add Close/AppSwitcher as default icons for
HeaderActioncomponent (5f62cde) - ButtonSet: add
stackedprop (c8e0a59) - Link: set
relattribute to "noopener noreferrer" iftargetis "_blank" (4b7d254)
Fixes
- TextInput: add missing
requiredprop to input (PR #237, thanks @kamil-murtaza) - StructuredList: change element semantics from
sectiontodivto avoid accessibility error (117dbcf) - MultiSelect: add
lightvariant to text input (6a955b1) - NumberInput: disable label, helper text if
disabledis set totrue(37c7f07) - Pagination: use singular page range text if
totalis 1 (3d64fb2)
Housekeeping
v0.9.7
This patch release addresses the InlineNotification and ToastNotification components in PR#235 (thanks @Overbryd!).
Enhancements
- Allow
InlineNotificationto be closed after a timeout (consistent behavior withToastNotification)
Bug fixes
- Dispatch "close" event in
ToastNotificationif closing using timeout (e.g.timeout={2000})
Documentation
- Fix JSDoc comment for
timeoutprop