From 13ca3bb4c64e9495e4d3ea6b9ee20eb3273dec5b Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Wed, 23 Sep 2020 18:04:38 -0700 Subject: [PATCH] v0.14.0 --- CHANGELOG.md | 19 +++++++++++ COMPONENT_INDEX.md | 80 +++++++++++++++++++++++++--------------------- package.json | 2 +- types/index.d.ts | 50 ++++++++++++++++++++++++++++- 4 files changed, 113 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ff4640e..bd6a2c07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Selectable/expandable `DataTable` +## [0.14.0](https://github.com/IBM/carbon-components-svelte/releases/tag/v0.14.0) - 2020-09-23 + +**Features** + +- `Modal`, `ComposedModal`: add `preventCloseOnClickOutside` prop +- `Modal`: add `alert` prop to support alertdialog ARIA role ([PR #273](https://github.com/IBM/carbon-components-svelte/pull/273), thanks [@josefaidt](https://github.com/josefaidt)) +- `TextInput`: add `warn` prop ([PR #275](https://github.com/IBM/carbon-components-svelte/pull/275), thanks [@josefaidt](https://github.com/josefaidt)) +- `TextInput`: add `inline` prop ([PR #277](https://github.com/IBM/carbon-components-svelte/pull/277), thanks [@josefaidt](https://github.com/josefaidt)) + +**Fixes** + +- `DataTableSkeleton`: add `showHeader`, `showToolbar` props +- `OverflowMenu`: focus menu button on escape key only +- `DataTable`: fix `headers` JSDoc type annotation ([PR #271](https://github.com/IBM/carbon-components-svelte/pull/271), thanks [@albertms10](https://github.com/albertms10)) + +**Breaking Changes** + +- `DataTableSkeleton`: `showHeader` and `showToolbar` are `true` by default + ## [0.13.0](https://github.com/IBM/carbon-components-svelte/releases/tag/v0.13.0) - 2020-09-18 **Features** diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 72928e75..44a9a19e 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -1,6 +1,6 @@ # Component Index -> 144 components exported from carbon-components-svelte 0.13.0 +> 144 components exported from carbon-components-svelte 0.14.0 - Accordion - [AccordionSkeleton](#accordionskeleton) @@ -780,14 +780,15 @@ import { ComposedModal } from "carbon-components-svelte"; ### Props -| Prop name | Type | Default value | -| :------------------- | :---------------------------------------- | :--------------------------- | -| size | "xs" | "sm" | "lg" | -- | -| open | boolean | false | -| danger | boolean | false | -| containerClass | string | "" | -| selectorPrimaryFocus | string | "[data-modal-primary-focus]" | -| ref | null | HTMLElement | null | +| Prop name | Type | Default value | +| :------------------------- | :---------------------------------------- | :--------------------------- | +| size | "xs" | "sm" | "lg" | -- | +| open | boolean | false | +| danger | boolean | false | +| preventCloseOnClickOutside | boolean | false | +| containerClass | string | "" | +| selectorPrimaryFocus | string | "[data-modal-primary-focus]" | +| ref | null | HTMLElement | null | ### Slots @@ -941,7 +942,7 @@ import { DataTable } from "carbon-components-svelte"; | Prop name | Type | Default value | | :----------- | :-------------------------------------------------- | :------------ | -| headers | {key: string; value: string;} | -- | +| headers | {key: string; value: string;}[] | -- | | rows | Object[] | -- | | size | "compact" | "short" | "tall" | -- | | title | string | "" | @@ -977,13 +978,15 @@ import { DataTableSkeleton } from "carbon-components-svelte"; ### Props -| Prop name | Type | Default value | -| :-------- | :-------------------- | :------------ | -| columns | number | 5 | -| rows | number | 5 | -| compact | boolean | false | -| zebra | boolean | false | -| headers | string[] | -- | +| Prop name | Type | Default value | +| :---------- | :-------------------- | :------------ | +| columns | number | 5 | +| rows | number | 5 | +| compact | boolean | false | +| zebra | boolean | false | +| showHeader | boolean | true | +| headers | string[] | -- | +| showToolbar | boolean | true | ### Slots @@ -2387,25 +2390,27 @@ import { Modal } from "carbon-components-svelte"; ### Props -| Prop name | Type | Default value | -| :-------------------- | :---------------------------------------- | :--------------------------- | -| size | "xs" | "sm" | "lg" | -- | -| open | boolean | false | -| danger | boolean | false | -| passiveModal | boolean | false | -| modalHeading | string | -- | -| modalLabel | string | -- | -| modalAriaLabel | string | -- | -| iconDescription | string | "Close the modal" | -| hasForm | boolean | false | -| hasScrollingContent | boolean | false | -| primaryButtonText | string | "" | -| primaryButtonDisabled | boolean | false | -| shouldSubmitOnEnter | boolean | true | -| secondaryButtonText | string | "" | -| selectorPrimaryFocus | string | "[data-modal-primary-focus]" | -| id | string | -- | -| ref | null | HTMLElement | null | +| Prop name | Type | Default value | +| :------------------------- | :---------------------------------------- | :--------------------------- | +| size | "xs" | "sm" | "lg" | -- | +| open | boolean | false | +| danger | boolean | false | +| alert | boolean | false | +| passiveModal | boolean | false | +| modalHeading | string | -- | +| modalLabel | string | -- | +| modalAriaLabel | string | -- | +| iconDescription | string | "Close the modal" | +| hasForm | boolean | false | +| hasScrollingContent | boolean | false | +| primaryButtonText | string | "" | +| primaryButtonDisabled | boolean | false | +| shouldSubmitOnEnter | boolean | true | +| secondaryButtonText | string | "" | +| selectorPrimaryFocus | string | "[data-modal-primary-focus]" | +| preventCloseOnClickOutside | boolean | false | +| id | string | -- | +| ref | null | HTMLElement | null | ### Slots @@ -4673,8 +4678,11 @@ import { TextInput } from "carbon-components-svelte"; | hideLabel | boolean | false | | invalid | boolean | false | | invalidText | string | "" | +| warn | boolean | false | +| warnText | string | "" | | ref | null | HTMLInputElement | null | | required | boolean | false | +| inline | boolean | false | ### Slots diff --git a/package.json b/package.json index 3837f80a..bd368dc0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "carbon-components-svelte", - "version": "0.13.0", + "version": "0.14.0", "license": "Apache-2.0", "description": "Svelte implementation of the Carbon Design System", "svelte": "./src/index.js", diff --git a/types/index.d.ts b/types/index.d.ts index 3deda92d..f667530f 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for carbon-components-svelte 0.13.0 +// Type definitions for carbon-components-svelte 0.14.0 // Project: https://github.com/IBM/carbon-components-svelte export class CarbonSvelteComponent { @@ -630,6 +630,12 @@ export class ComposedModal extends CarbonSvelteComponent { */ danger?: boolean; + /** + * Set to `true` to prevent the modal from closing when clicking outside + * @default false + */ + preventCloseOnClickOutside?: boolean; + /** * Specify a class for the inner modal * @default "" @@ -794,11 +800,23 @@ export class DataTableSkeleton extends CarbonSvelteComponent { */ zebra?: boolean; + /** + * Set to `false` to hide the header + * @default true + */ + showHeader?: boolean; + /** * Set the column headers * If `headers` has one more items, `count` is ignored */ headers?: string[]; + + /** + * Set to `false` to hide the toolbar + * @default true + */ + showToolbar?: boolean; }; } @@ -2084,6 +2102,12 @@ export class Modal extends CarbonSvelteComponent { */ danger?: boolean; + /** + * Set to `true` to enable alert mode + * @default false + */ + alert?: boolean; + /** * Set to `true` to use the passive variant * @default false @@ -2153,6 +2177,12 @@ export class Modal extends CarbonSvelteComponent { */ selectorPrimaryFocus?: string; + /** + * Set to `true` to prevent the modal from closing when clicking outside + * @default false + */ + preventCloseOnClickOutside?: boolean; + /** * Set an id for the top-level element */ @@ -4428,6 +4458,18 @@ export class TextInput extends CarbonSvelteComponent { */ invalidText?: string; + /** + * Set to `true` to indicate an warning state + * @default false + */ + warn?: boolean; + + /** + * Specify the warning state text + * @default "" + */ + warnText?: string; + /** * Obtain a reference to the input HTML element * @default null @@ -4439,6 +4481,12 @@ export class TextInput extends CarbonSvelteComponent { * @default false */ required?: boolean; + + /** + * Set to `true` to use inline version + * @default false + */ + inline?: boolean; }; }