Svelte implementation of the Carbon Design System
APACHE-2.0 License
Bot releases are hidden (Show)
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
Published by metonym 7 months ago
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
Published by metonym 8 months ago
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
Published by theetrain 8 months ago
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.11...v0.83.0
Published by metonym 8 months ago
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
Published by metonym 8 months ago
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
Published by metonym 9 months ago
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
Published by theetrain 9 months ago
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
Published by theetrain 9 months ago
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
Published by metonym 10 months ago
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
Published by metonym 10 months ago
value
type to be a number by @metonym in https://github.com/carbon-design-system/carbon-components-svelte/pull/1868
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.6...v0.82.7
Published by metonym 10 months ago
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.5...v0.82.6
Published by metonym 10 months ago
active
is false by @metonym in https://github.com/carbon-design-system/carbon-components-svelte/pull/1857
exports
field to package.json by @hslee2008 in https://github.com/carbon-design-system/carbon-components-svelte/pull/1864
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.4...v0.82.5
Published by metonym 11 months ago
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.3...v0.82.4
Published by metonym 11 months ago
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.2...v0.82.3
Published by metonym 11 months ago
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.1...v0.82.2
Published by metonym 11 months ago
button type="button"
to prevent form submission by @metonym in https://github.com/carbon-design-system/carbon-components-svelte/pull/1846
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.0...v0.82.1
Published by metonym 11 months ago
node
slottable by @metonym in https://github.com/carbon-design-system/carbon-components-svelte/pull/1843
showNode
accessor by @metonym in https://github.com/carbon-design-system/carbon-components-svelte/pull/1844
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.81.3...v0.82.0
This release focuses on TreeView
improvements.
TreeView
node
is slottablePreviously, the TreeView
used the node.text
value. Now, you can destructure let:node
and override the default slot to customize the rendered content and styles on a per-node basis.
See an example.
<TreeView children="{children}" let:node>
{node.id}
{node.text}
{node.expanded}
{node.selected}
{node.disabled}
{node.leaf} <!-- True if the node is a leaf (node does not have children) -->
</TreeView>
TreeView
nodeThe TreeView
component now supports a showNode
accessor to show a specific node.
Given the node.id
, the matching node will be expanded, selected, and focused.
See an example.
treeview?.showNode(node.id);
Published by metonym 12 months ago
class
and style
props by @metonym in https://github.com/carbon-design-system/carbon-components-svelte/pull/1840
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.81.2...v0.81.3
Published by theetrain 12 months ago
Full Changelog: https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.81.1...v0.81.2