Releases: carbon-design-system/carbon-components-svelte
v0.12.1
Fixes
- Pagination: ensure
page
,pageSize
values are numbers (0138910) - Pagination: dispatch "update" event only when
pageSize
orpage
values update (458d1b5) - Pagination: use correct size carbon icons for buttons (size
16
instead of24
) (192f98d) - ProgressStep: use button element; set negative
tabindex
ifdisabled
istrue
(3202f39) - ProgressStep: forward click event (6cb877e)
- SideNavMenu, SideNavMenuItem: remove "role", "aria-haspopup" attributes causing a11y warnings
- RadioTile: move
keydown
,tabindex
to input element (17d97d1)
v0.12.0
Features
-
ship precompiled CSS StyleSheets for each Carbon theme, available in the
css
folder (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
README
guidance on consuming the library
v0.11.0
v0.10.0
Features
- UI Shell: add Close/AppSwitcher as default icons for
HeaderAction
component (5f62cde) - ButtonSet: add
stacked
prop (c8e0a59) - Link: set
rel
attribute to "noopener noreferrer" iftarget
is "_blank" (4b7d254)
Fixes
- TextInput: add missing
required
prop to input (PR #237, thanks @kamil-murtaza) - StructuredList: change element semantics from
section
todiv
to avoid accessibility error (117dbcf) - MultiSelect: add
light
variant to text input (6a955b1) - NumberInput: disable label, helper text if
disabled
is set totrue
(37c7f07) - Pagination: use singular page range text if
total
is 1 (3d64fb2)
Housekeeping
v0.9.7
This patch release addresses the InlineNotification
and ToastNotification
components in PR#235 (thanks @Overbryd!).
Enhancements
- Allow
InlineNotification
to be closed after a timeout (consistent behavior withToastNotification
)
Bug fixes
- Dispatch "close" event in
ToastNotification
if closing using timeout (e.g.timeout={2000}
)
Documentation
- Fix JSDoc comment for
timeout
prop
v0.9.6
Documentation
As part of the Rollup build process, we leverage the Svelte compiler to parse exported components to generate TypeScript definitions and static documentation (PR #228). Previously, some components were incorrectly typed (issue #227).
- TypeScript definitions: types/index.d.ts
- Static documentation in markdown format: Component Index (props/slots/events)
Bug fixes
v0.9.5
v0.9.4
- ignore false positive
a11y-label-has-associated-control
warnings added in svelte version 3.24.1 (Issue #226) - fix
DatePicker
: use wildcard import to resolve flatpickr "no default" error when using ESM - allow
CodeSnippet
button to be optional by using thehideCopyButton
prop - refactor
CodeSnippet
: replace afterUpdate with reactive statement - fix
CodeSnippet
: forwardfeedback
,feedbackTimeout
props toCopy
component