Svelte implementation of the Carbon Design System
APACHE-2.0 License
Published by metonym almost 4 years ago
Features
Toolbar
, ToolbarContent
, ToolbarSearch
, ToolbarBatchActions
Fixes
platformName
as empty string to prevent rendering as "undefined"Refactoring
Documentation
COMPONENT_INDEX.md
Contributors
Published by metonym almost 4 years ago
Features
false
(PR #351)slot="tooltip"
Fixes
currentIndex
reactive (PR #351)onDestroy
for destroy logic due to async usage of onMount
(PR #348)size
prop to Search skeletonRefactoring
hidden
reactive variableBreaking Changes
currentIndex
; to opt out of this default behavior, set preventChangeOnClick
to true
Documentation
Contributors
Published by metonym about 4 years ago
Features
Fixes
ArrayExpression
in exported props (PR #341)Documentation
Breaking Changes
DataTable
in favor of named slots (PR #341)Published by metonym about 4 years ago
New Components
Features
rel="nooopener noreferrer"
if target="_blank"
for anchor links (PR #321)Search
disabled state (PR #330)Accordion
and AccordionItem
(PR #333)Accordion
and AccordionSkeleton
(PR #333)Fixes
Refactoring
Documentation
noTrailingSlash
in skeleton exampleTarget _blank
Housekeeping
npm-run-all
to run build:css
and build:lib
in parallel (PR #331)Contributors
Published by metonym about 4 years ago
Features
pageSizeInputDisabled
prop to hide page size buttons (default is false
) (PR #292)ref
prop (PR #303)carbon-components
to version 10.21Fixes
href
prop to fix TypeScript errors (PR #301)id
prop to fix TypeScript errors (PR #303)light
prop should use the light variant (PR #303)setContext
import (PR #308)css/all.css
: default theme should be "white," not "g10" (PR #322)HeaderAction
menu should close when clicking in the window, not just the document body (PR #323)Performance
Breaking Changes
css/all.css
, set the "theme" attribute on the HTML element to "g10" in order to use the Gray 10 themeDocumentation
CONTRIBUTING.md
README.md
(PR #324, PR #325)Housekeeping
Contributors
Published by metonym about 4 years ago
DataTableSkeleton: add size
prop to support "compact", "small", "tall" row heights (PR #279, thanks @albertms10)
HeaderPanelLink: forward click event (PR #286, thanks @weaseldotro)
FluidForm: add FluidForm
component and support fluid variants for TextInput
, PasswordInput
(PR #293, thanks @josefaidt)
UI Shell: add ref
prop to interactive (i.e. anchor links, buttons) UI Shell elements (PR #297, thanks @josefaidt)
Slider:
value
prop type should be a number
, not a string
(issue #289)disabled
is true
change
event should only be dispatched if the value changesUI Shell: correctly bind ref
prop in HeaderGlobalAction
(PR #297, thanks @josefaidt)
Misc: export DatePickerSkeleton
, FileUploaderSkeleton
components
compact
prop is removed in favor of size="compact"
carbon-icons-svelte
to version ^10.17.0prettier: enable svelteBracketNewLine
rule for improved readability (PR #281, thanks @josefaidt)
git hooks: add husky, lint-staged to development workflow (PR #295, thanks @josefaidt)
Published by metonym about 4 years ago
Features
Modal
, ComposedModal
: add preventCloseOnClickOutside
propModal
: add alert
prop to support alertdialog ARIA role (PR #273, thanks @josefaidt)TextInput
: add warn
prop (PR #275, thanks @josefaidt)TextInput
: add inline
prop (PR #277, thanks @josefaidt)Fixes
DataTableSkeleton
: add showHeader
, showToolbar
propsOverflowMenu
: focus menu button on escape key onlyDataTable
: fix headers
JSDoc type annotation (PR #271, thanks @albertms10)Breaking Changes
DataTableSkeleton
: showHeader
and showToolbar
are true
by defaultPublished by metonym about 4 years ago
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
: add spaceEqual
prop and functionality (PR #263, issue #262)
Fixes
Link
: remove visited styles by default (PR #259, issue #258)
TimePickerSelect
: deprecate hideLabel
prop to match spec and set default value to true
(PR #261, issue #260)
Breaking Changes
TimePickerSelect
: hideLabel
prop is true
by defaultPublished by metonym about 4 years ago
Fixes
href
(PR #254, issue #253, thanks @josefaidt)Published by metonym about 4 years ago
Fixes
Published by metonym about 4 years ago
Fixes
page
, pageSize
values are numbers (0138910)pageSize
or page
values update (458d1b5)16
instead of 24
) (192f98d)tabindex
if disabled
is true
(3202f39)keydown
, tabindex
to input element (17d97d1)Published by metonym about 4 years ago
ship precompiled CSS StyleSheets for each Carbon theme, available in the css
folder (70e0875)
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>
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.
add example set-ups using popular bundlers/frameworks
revamp README
guidance on consuming the library
Published by metonym about 4 years ago
Features
HeaderGlobalAction
component (7b3c111)Published by metonym about 4 years ago
Features
HeaderAction
component (5f62cde)stacked
prop (c8e0a59)rel
attribute to "noopener noreferrer" if target
is "_blank" (4b7d254)Fixes
required
prop to input (PR #237, thanks @kamil-murtaza)section
to div
to avoid accessibility error (117dbcf)light
variant to text input (6a955b1)disabled
is set to true
(37c7f07)total
is 1 (3d64fb2)Housekeeping
.prettierrc
and enable svelteStrictMode
(42b8159)small
Button prop (41a533d)Published by metonym about 4 years ago
This patch release addresses the InlineNotification
and ToastNotification
components in PR#235 (thanks @Overbryd!).
Enhancements
InlineNotification
to be closed after a timeout (consistent behavior with ToastNotification
)Bug fixes
ToastNotification
if closing using timeout (e.g. timeout={2000}
)Documentation
timeout
propPublished by metonym about 4 years ago
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).
Bug fixes
DatePicker
: reverts 6d5f1e5 to use default imports (issue #232)Published by metonym about 4 years ago
a11y-label-has-associated-control
warnings added in svelte version 3.24.1 (Issue https://github.com/IBM/carbon-components-svelte/issues/226)DatePicker
: use wildcard import to resolve flatpickr "no default" error when using ESMCodeSnippet
button to be optional by using the hideCopyButton
propCodeSnippet
: replace afterUpdate with reactive statementCodeSnippet
: forward feedback
, feedbackTimeout
props to Copy
component