- export let type = "single"; // "single" | "inline" | "multi"
+ /**
+ * Set the type of code snippet
+ * @type {"single" | "inline" | "multi"} [type="single"]
+ */
+ export let type = "single";
+
+ /**
+ * Set the code snippet text
+ * Alternatively, use the default slot (e.g.
{`code`})
+ * @type {string} [code]
+ */
export let code = undefined;
+
+ /**
+ * Set to `true` to expand a multi-line code snippet (type="multi")
+ * @type {boolean} [expanded=false]
+ */
export let expanded = false;
+
+ /**
+ * Set to `true` to enable the light variant
+ * @type {boolean} [light=false]
+ */
export let light = false;
+
+ /**
+ * Set to `true` to display the skeleton state
+ * @type {boolean} [skeleton=false]
+ */
export let skeleton = false;
+
+ /**
+ * Specify the ARIA label for the copy button icon
+ * @type {string} [copyButtonDescription]
+ */
export let copyButtonDescription = undefined;
+
+ /**
+ * Specify the ARIA label of the copy button
+ * @type {string} [copyLabel]
+ */
export let copyLabel = undefined;
+
+ /**
+ * Specify the feedback text displayed when clicking the snippet
+ * @type {string} [feedback="Copied!"]
+ */
export let feedback = "Copied!";
+
+ /**
+ * Set the timeout duration (ms) to display feedback text
+ * @type {number} [feedbackTimeout=2000]
+ */
export let feedbackTimeout = 2000;
+
+ /**
+ * Specify the show less text
+ * `type` must be "multi"
+ * @type {string} [showLessText="Show less"]
+ */
export let showLessText = "Show less";
+
+ /**
+ * Specify the show more text
+ * `type` must be "multi"
+ * @type {string} [showLessText="Show more"]
+ */
export let showMoreText = "Show more";
+
+ /**
+ * Set to `true` to enable the show more/less button
+ * @type {boolean} [showMoreLess=false]
+ */
export let showMoreLess = false;
+
+ /**
+ * Set an id for the code element
+ * @type {string} [id]
+ */
export let id = "ccs-" + Math.random().toString(36);
+
+ /**
+ * Obtain a reference to the pre HTML element
+ * @type {null | HTMLPreElement} [ref=null]
+ */
export let ref = null;
import { afterUpdate } from "svelte";
@@ -48,7 +120,7 @@
{expanded && 'bx--snippet--expand'}
{light && 'bx--snippet--light'}"
{...$$restProps}
- on:clicks
+ on:click
on:mouseover
on:mouseenter
on:mouseleave>
diff --git a/src/ComboBox/ComboBox.svelte b/src/ComboBox/ComboBox.svelte
index 18364891..3ebc33fc 100644
--- a/src/ComboBox/ComboBox.svelte
+++ b/src/ComboBox/ComboBox.svelte
@@ -1,21 +1,114 @@
diff --git a/src/ComposedModal/ModalFooter.svelte b/src/ComposedModal/ModalFooter.svelte
index f4a4ea95..d59b74ac 100644
--- a/src/ComposedModal/ModalFooter.svelte
+++ b/src/ComposedModal/ModalFooter.svelte
@@ -1,9 +1,38 @@
@@ -91,7 +131,7 @@
sortHeader.set({
id: sortDirection === 'none' ? null : $thKeys[header.key],
key: header.key,
- sortDirection
+ sortDirection,
});
}}>
{header.value}
diff --git a/src/DataTable/Table.svelte b/src/DataTable/Table.svelte
index b57aa169..37bd41cb 100644
--- a/src/DataTable/Table.svelte
+++ b/src/DataTable/Table.svelte
@@ -1,9 +1,38 @@
diff --git a/src/DataTable/TableContainer.svelte b/src/DataTable/TableContainer.svelte
index 60b6d6af..0eb474ec 100644
--- a/src/DataTable/TableContainer.svelte
+++ b/src/DataTable/TableContainer.svelte
@@ -1,7 +1,21 @@
+ /**
+ * Specify the `scope` attribute
+ * @type {string} [scope="col"]
+ */
export let scope = "col";
+
+ /**
+ * Override the default id translations
+ * @type {() => string;} [translateWithId = () => "";]
+ */
export let translateWithId = () => "";
+
+ /**
+ * Set an id for the top-level element
+ * @type {string} [id]
+ */
export let id = "ccs-" + Math.random().toString(36);
import { getContext } from "svelte";
@@ -20,6 +34,7 @@
+ /**
+ * Set to `true` to select the row
+ * @type {boolean} [isSelected=false]
+ */
export let isSelected = false;
// TODO: include ariaLabel, onExpand, isExpanded, isSelected
diff --git a/src/DataTableSkeleton/DataTableSkeleton.svelte b/src/DataTableSkeleton/DataTableSkeleton.svelte
index 3ffe2cec..ec463ff0 100644
--- a/src/DataTableSkeleton/DataTableSkeleton.svelte
+++ b/src/DataTableSkeleton/DataTableSkeleton.svelte
@@ -1,8 +1,33 @@
diff --git a/src/DatePicker/DatePicker.svelte b/src/DatePicker/DatePicker.svelte
index 3af2ccb2..835d7f42 100644
--- a/src/DatePicker/DatePicker.svelte
+++ b/src/DatePicker/DatePicker.svelte
@@ -1,35 +1,84 @@
diff --git a/src/Dropdown/Dropdown.svelte b/src/Dropdown/Dropdown.svelte
index 399e66a6..4082a39f 100644
--- a/src/Dropdown/Dropdown.svelte
+++ b/src/Dropdown/Dropdown.svelte
@@ -1,21 +1,116 @@
diff --git a/src/FileUploader/FileUploaderDropContainer.svelte b/src/FileUploader/FileUploaderDropContainer.svelte
index 9b61416d..9a21738b 100644
--- a/src/FileUploader/FileUploaderDropContainer.svelte
+++ b/src/FileUploader/FileUploaderDropContainer.svelte
@@ -1,13 +1,67 @@
+ /**
+ * Specify the file name status
+ * @type {"uploading" | "edit" | "complete"} [status="uploading"]
+ */
+ export let status = "uploading";
+
+ /**
+ * Specify the ARIA label used for the status icons
+ * @type {string} [iconDescription=""]
+ */
export let iconDescription = "";
+
+ /**
+ * Set to `true` to indicate an invalid state
+ * @type {boolean} [invalid=false]
+ */
export let invalid = false;
- export let status = "uploading"; // "uploading" | "edit" | "complete"
import Close16 from "carbon-icons-svelte/lib/Close16";
import CheckmarkFilled16 from "carbon-icons-svelte/lib/CheckmarkFilled16";
diff --git a/src/FormGroup/FormGroup.svelte b/src/FormGroup/FormGroup.svelte
index f4ee9b1a..2d89e4dc 100644
--- a/src/FormGroup/FormGroup.svelte
+++ b/src/FormGroup/FormGroup.svelte
@@ -1,8 +1,13 @@
|