Svelte implementation of the Carbon Design System
This release includes changes needed for the latest version of carbon-preprocess-svelte
, which is a from-scratch rewrite of the optimizeImports
preprocessor and optimizeCss
plugin.
If using pre-compiled CSS from carbon-components-svelte
, the optimizeCss
plugin can greatly reduce the outputted CSS bundle by remove unused Carbon CSS selectors.
See examples for usage.
export default defineConfig({
plugins: [sveltekit(), optimizeCss()],
});
Optimized index-CU4gbKFa.css
- Before: 606.26 kB
+ After: 53.22 kB (-91.22%)
:global()
for custom UI Shell styles by @metonym in https://github.com/carbon-design-system/carbon-components-svelte/pull/1940
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.84.1...v0.85.0
sort
return type to be a number
by @berndfuhrmann in https://github.com/carbon-design-system/carbon-components-svelte/pull/1935
focus
, blur
events to Checkbox
and InlineCheckbox
by @wickning1 in https://github.com/carbon-design-system/carbon-components-svelte/pull/1937
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.84.0...v0.84.1
HeaderGlobalAction
by @spburtsev in https://github.com/carbon-design-system/carbon-components-svelte/pull/1894
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.83.0...v0.84.0
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.11...v0.83.0
showMoreLess={false}
should hide button by @metonym in https://github.com/carbon-design-system/carbon-components-svelte/pull/1917
src
should update the image by @metonym in https://github.com/carbon-design-system/carbon-components-svelte/pull/1919
offsetWidth
, offsetHeight
to compute menu dimensions by @Sahasrara in https://github.com/carbon-design-system/carbon-components-svelte/pull/1913
autoclose
timeout correctly by @metonym, @brunnerh in https://github.com/carbon-design-system/carbon-components-svelte/pull/1915
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.10...v0.82.11
on:input
event by @mmamedel in https://github.com/carbon-design-system/carbon-components-svelte/pull/1906
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.9...v0.82.10
e.detail
type for dispatched events by @metonym in https://github.com/carbon-design-system/carbon-components-svelte/pull/1907
on:contextmenu
default behavior only when opening menu by @metonym in https://github.com/carbon-design-system/carbon-components-svelte/pull/1911
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.8...v0.82.9
Note: this is an unstable prerelease. See discussion https://github.com/carbon-design-system/carbon-components-svelte/discussions/1872 for details and contribution guide!
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v1.0.0-next.0...v1.0.0-next.1
Note: this is an unstable prerelease. See discussion https://github.com/carbon-design-system/carbon-components-svelte/discussions/1872 for details and contribution guide!
xl
sizeOverall, this is a major style change the will impact the appearance and features of many components. Use caution when upgrading and test your applications.
size
and kind
g80
theme isn't supported, toggled themes adjust data-carbon-theme
attribute in <html>
tag (for now, tokens use bx
prefix, but that may change)contained
prop instead of type
size
prop no longer supports size="xl"
; md
is the new defaultxl
sizexl
sizexl
sizecompact
size<html>
element as data-carbon-theme="g10"
instead of theme="g10"
npm
instead of yarn
🎉 Thank you @gregorw for initial work.
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.8...v1.0.0-next.0
on:focus
event by @ryanbmarx in https://github.com/carbon-design-system/carbon-components-svelte/pull/1878
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.7...v0.82.8