This commit is contained in:
Eric Liu 2020-10-24 15:26:27 -07:00
commit 117e29f208
5 changed files with 171 additions and 142 deletions

View file

@ -5,9 +5,38 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased <!-- ## Unreleased -->
- Selectable `DataTable` ## [0.20.0](https://github.com/IBM/carbon-components-svelte/releases/tag/v0.20.0) - 2020-10-24
**Features**
- DataTable: add `Toolbar`, `ToolbarContent`, `ToolbarSearch`, `ToolbarBatchActions`
- DataTable: support row selection, batch selection, radio selection
- DataTable: dispatch "mouseenter", "mouseleave" events on table rows
- Search: forward "focus", "blur" events to search input; dispatch "clear" event
**Fixes**
- DataTable: include sort direction with custom sort method ([PR #356](https://github.com/IBM/carbon-components-svelte/pull/356))
- fix: allow item ids in ComboBox, Dropdown, MultiSelect to be numbers
- fix(ui-shell): initialize `platformName` as empty string to prevent rendering as "undefined"
**Refactoring**
- refactor(ui-shell): remove redundant conditional in HeaderGlobalAction
**Documentation**
- new DataTable examples:
- [With custom display and sort methods](https://carbon-svelte.vercel.app/components/DataTable#with-custom-display-and-sort-methods)
- [With toolbar](https://carbon-svelte.vercel.app/components/DataTable#with-toolbar)
- [With toolbar (small size)](https://carbon-svelte.vercel.app/components/DataTable#with-toolbar-small-size)
- [Selectable](https://carbon-svelte.vercel.app/components/DataTable#selectable)
- [Initial selected rows](https://carbon-svelte.vercel.app/components/DataTable#initial-selected-rows)
- [Selectable with batch actions](https://carbon-svelte.vercel.app/components/DataTable#selectable-with-batch-actions)
- [Selectable (radio)](https://carbon-svelte.vercel.app/components/DataTable#selectable-radio)
- fix(docgen): list both default and named slots in `COMPONENT_INDEX.md`
## [0.19.0](https://github.com/IBM/carbon-components-svelte/releases/tag/v0.19.0) - 2020-10-23 ## [0.19.0](https://github.com/IBM/carbon-components-svelte/releases/tag/v0.19.0) - 2020-10-23

View file

@ -1,6 +1,6 @@
# Component Index # Component Index
> 152 components exported from carbon-components-svelte 0.19.0 > 152 components exported from carbon-components-svelte 0.20.0
- Accordion - Accordion
- [Accordion](#accordion) - [Accordion](#accordion)

View file

@ -1,5 +1,5 @@
{ {
"version": "0.19.0", "version": "0.20.0",
"components": { "components": {
"Accordion": { "Accordion": {
"moduleName": "Accordion", "moduleName": "Accordion",
@ -2657,14 +2657,14 @@
{ {
"attributes": [ "attributes": [
{ {
"start": 7497, "start": 7427,
"end": 7515, "end": 7445,
"type": "Attribute", "type": "Attribute",
"name": "name", "name": "name",
"value": [ "value": [
{ {
"start": 7503, "start": 7433,
"end": 7514, "end": 7444,
"type": "Text", "type": "Text",
"raw": "cell-header", "raw": "cell-header",
"data": "cell-header" "data": "cell-header"
@ -2672,26 +2672,26 @@
] ]
}, },
{ {
"start": 7516, "start": 7446,
"end": 7533, "end": 7463,
"type": "Attribute", "type": "Attribute",
"name": "header", "name": "header",
"value": [ "value": [
{ {
"start": 7524, "start": 7454,
"end": 7532, "end": 7462,
"type": "MustacheTag", "type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 7525, "start": 7455,
"end": 7531, "end": 7461,
"loc": { "loc": {
"start": { "start": {
"line": 263, "line": 260,
"column": 46 "column": 46
}, },
"end": { "end": {
"line": 263, "line": 260,
"column": 52 "column": 52
} }
}, },
@ -2703,34 +2703,34 @@
], ],
"children": [ "children": [
{ {
"start": 7534, "start": 7464,
"end": 7548, "end": 7478,
"type": "MustacheTag", "type": "MustacheTag",
"expression": { "expression": {
"type": "MemberExpression", "type": "MemberExpression",
"start": 7535, "start": 7465,
"end": 7547, "end": 7477,
"loc": { "loc": {
"start": { "start": {
"line": 263, "line": 260,
"column": 56 "column": 56
}, },
"end": { "end": {
"line": 263, "line": 260,
"column": 68 "column": 68
} }
}, },
"object": { "object": {
"type": "Identifier", "type": "Identifier",
"start": 7535, "start": 7465,
"end": 7541, "end": 7471,
"loc": { "loc": {
"start": { "start": {
"line": 263, "line": 260,
"column": 56 "column": 56
}, },
"end": { "end": {
"line": 263, "line": 260,
"column": 62 "column": 62
} }
}, },
@ -2738,15 +2738,15 @@
}, },
"property": { "property": {
"type": "Identifier", "type": "Identifier",
"start": 7542, "start": 7472,
"end": 7547, "end": 7477,
"loc": { "loc": {
"start": { "start": {
"line": 263, "line": 260,
"column": 63 "column": 63
}, },
"end": { "end": {
"line": 263, "line": 260,
"column": 68 "column": 68
} }
}, },
@ -2766,14 +2766,14 @@
{ {
"attributes": [ "attributes": [
{ {
"start": 10544, "start": 10474,
"end": 10555, "end": 10485,
"type": "Attribute", "type": "Attribute",
"name": "name", "name": "name",
"value": [ "value": [
{ {
"start": 10550, "start": 10480,
"end": 10554, "end": 10484,
"type": "Text", "type": "Text",
"raw": "cell", "raw": "cell",
"data": "cell" "data": "cell"
@ -2781,26 +2781,26 @@
] ]
}, },
{ {
"start": 10556, "start": 10486,
"end": 10567, "end": 10497,
"type": "Attribute", "type": "Attribute",
"name": "row", "name": "row",
"value": [ "value": [
{ {
"start": 10561, "start": 10491,
"end": 10566, "end": 10496,
"type": "MustacheTag", "type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 10562, "start": 10492,
"end": 10565, "end": 10495,
"loc": { "loc": {
"start": { "start": {
"line": 344, "line": 341,
"column": 38 "column": 38
}, },
"end": { "end": {
"line": 344, "line": 341,
"column": 41 "column": 41
} }
}, },
@ -2810,26 +2810,26 @@
] ]
}, },
{ {
"start": 10568, "start": 10498,
"end": 10581, "end": 10511,
"type": "Attribute", "type": "Attribute",
"name": "cell", "name": "cell",
"value": [ "value": [
{ {
"start": 10574, "start": 10504,
"end": 10580, "end": 10510,
"type": "MustacheTag", "type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 10575, "start": 10505,
"end": 10579, "end": 10509,
"loc": { "loc": {
"start": { "start": {
"line": 344, "line": 341,
"column": 51 "column": 51
}, },
"end": { "end": {
"line": 344, "line": 341,
"column": 55 "column": 55
} }
}, },
@ -2841,69 +2841,69 @@
], ],
"children": [ "children": [
{ {
"start": 10582, "start": 10512,
"end": 10599, "end": 10529,
"type": "Text", "type": "Text",
"raw": "\n ", "raw": "\n ",
"data": "\n " "data": "\n "
}, },
{ {
"start": 10599, "start": 10529,
"end": 10665, "end": 10595,
"type": "MustacheTag", "type": "MustacheTag",
"expression": { "expression": {
"type": "ConditionalExpression", "type": "ConditionalExpression",
"start": 10600, "start": 10530,
"end": 10664, "end": 10594,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 17 "column": 17
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 81 "column": 81
} }
}, },
"test": { "test": {
"type": "MemberExpression", "type": "MemberExpression",
"start": 10600, "start": 10530,
"end": 10618, "end": 10548,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 17 "column": 17
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 35 "column": 35
} }
}, },
"object": { "object": {
"type": "MemberExpression", "type": "MemberExpression",
"start": 10600, "start": 10530,
"end": 10610, "end": 10540,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 17 "column": 17
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 27 "column": 27
} }
}, },
"object": { "object": {
"type": "Identifier", "type": "Identifier",
"start": 10600, "start": 10530,
"end": 10607, "end": 10537,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 17 "column": 17
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 24 "column": 24
} }
}, },
@ -2911,15 +2911,15 @@
}, },
"property": { "property": {
"type": "Identifier", "type": "Identifier",
"start": 10608, "start": 10538,
"end": 10609, "end": 10539,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 25 "column": 25
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 26 "column": 26
} }
}, },
@ -2930,15 +2930,15 @@
}, },
"property": { "property": {
"type": "Identifier", "type": "Identifier",
"start": 10611, "start": 10541,
"end": 10618, "end": 10548,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 28 "column": 28
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 35 "column": 35
} }
}, },
@ -2949,57 +2949,57 @@
}, },
"consequent": { "consequent": {
"type": "CallExpression", "type": "CallExpression",
"start": 10621, "start": 10551,
"end": 10651, "end": 10581,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 38 "column": 38
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 68 "column": 68
} }
}, },
"callee": { "callee": {
"type": "MemberExpression", "type": "MemberExpression",
"start": 10621, "start": 10551,
"end": 10639, "end": 10569,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 38 "column": 38
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 56 "column": 56
} }
}, },
"object": { "object": {
"type": "MemberExpression", "type": "MemberExpression",
"start": 10621, "start": 10551,
"end": 10631, "end": 10561,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 38 "column": 38
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 48 "column": 48
} }
}, },
"object": { "object": {
"type": "Identifier", "type": "Identifier",
"start": 10621, "start": 10551,
"end": 10628, "end": 10558,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 38 "column": 38
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 45 "column": 45
} }
}, },
@ -3007,15 +3007,15 @@
}, },
"property": { "property": {
"type": "Identifier", "type": "Identifier",
"start": 10629, "start": 10559,
"end": 10630, "end": 10560,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 46 "column": 46
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 47 "column": 47
} }
}, },
@ -3026,15 +3026,15 @@
}, },
"property": { "property": {
"type": "Identifier", "type": "Identifier",
"start": 10632, "start": 10562,
"end": 10639, "end": 10569,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 49 "column": 49
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 56 "column": 56
} }
}, },
@ -3046,29 +3046,29 @@
"arguments": [ "arguments": [
{ {
"type": "MemberExpression", "type": "MemberExpression",
"start": 10640, "start": 10570,
"end": 10650, "end": 10580,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 57 "column": 57
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 67 "column": 67
} }
}, },
"object": { "object": {
"type": "Identifier", "type": "Identifier",
"start": 10640, "start": 10570,
"end": 10644, "end": 10574,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 57 "column": 57
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 61 "column": 61
} }
}, },
@ -3076,15 +3076,15 @@
}, },
"property": { "property": {
"type": "Identifier", "type": "Identifier",
"start": 10645, "start": 10575,
"end": 10650, "end": 10580,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 62 "column": 62
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 67 "column": 67
} }
}, },
@ -3098,29 +3098,29 @@
}, },
"alternate": { "alternate": {
"type": "MemberExpression", "type": "MemberExpression",
"start": 10654, "start": 10584,
"end": 10664, "end": 10594,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 71 "column": 71
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 81 "column": 81
} }
}, },
"object": { "object": {
"type": "Identifier", "type": "Identifier",
"start": 10654, "start": 10584,
"end": 10658, "end": 10588,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 71 "column": 71
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 75 "column": 75
} }
}, },
@ -3128,15 +3128,15 @@
}, },
"property": { "property": {
"type": "Identifier", "type": "Identifier",
"start": 10659, "start": 10589,
"end": 10664, "end": 10594,
"loc": { "loc": {
"start": { "start": {
"line": 345, "line": 342,
"column": 76 "column": 76
}, },
"end": { "end": {
"line": 345, "line": 342,
"column": 81 "column": 81
} }
}, },
@ -3148,8 +3148,8 @@
} }
}, },
{ {
"start": 10665, "start": 10595,
"end": 10680, "end": 10610,
"type": "Text", "type": "Text",
"raw": "\n ", "raw": "\n ",
"data": "\n " "data": "\n "
@ -3164,14 +3164,14 @@
{ {
"attributes": [ "attributes": [
{ {
"start": 11216, "start": 11146,
"end": 11235, "end": 11165,
"type": "Attribute", "type": "Attribute",
"name": "name", "name": "name",
"value": [ "value": [
{ {
"start": 11222, "start": 11152,
"end": 11234, "end": 11164,
"type": "Text", "type": "Text",
"raw": "expanded-row", "raw": "expanded-row",
"data": "expanded-row" "data": "expanded-row"
@ -3179,26 +3179,26 @@
] ]
}, },
{ {
"start": 11236, "start": 11166,
"end": 11247, "end": 11177,
"type": "Attribute", "type": "Attribute",
"name": "row", "name": "row",
"value": [ "value": [
{ {
"start": 11241, "start": 11171,
"end": 11246, "end": 11176,
"type": "MustacheTag", "type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 11242, "start": 11172,
"end": 11245, "end": 11175,
"loc": { "loc": {
"start": { "start": {
"line": 364, "line": 361,
"column": 48 "column": 48
}, },
"end": { "end": {
"line": 364, "line": 361,
"column": 51 "column": 51
} }
}, },

View file

@ -1,6 +1,6 @@
{ {
"name": "carbon-components-svelte", "name": "carbon-components-svelte",
"version": "0.19.0", "version": "0.20.0",
"license": "Apache-2.0", "license": "Apache-2.0",
"description": "Svelte implementation of the Carbon Design System", "description": "Svelte implementation of the Carbon Design System",
"svelte": "./src/index.js", "svelte": "./src/index.js",

2
types/index.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for carbon-components-svelte 0.19.0 // Type definitions for carbon-components-svelte 0.20.0
// Project: https://github.com/IBM/carbon-components-svelte // Project: https://github.com/IBM/carbon-components-svelte
export class CarbonSvelteComponent { export class CarbonSvelteComponent {