refactor(types): shorten ref, id JSDocs, use CarbonIcon type, export component props

This commit is contained in:
Eric Liu 2020-11-06 11:30:46 -08:00
commit 75d4b4cf03
219 changed files with 5168 additions and 5259 deletions

View file

@ -16,7 +16,7 @@
/** /**
* Specify the icon from `carbon-icons-svelte` to render * Specify the icon from `carbon-icons-svelte` to render
* @type {typeof import("carbon-icons-svelte/lib/Add16").default} * @type {import("carbon-icons-svelte").CarbonIcon}
*/ */
export let icon = undefined; export let icon = undefined;
@ -63,10 +63,7 @@
/** Specify the `type` attribute for the button element */ /** Specify the `type` attribute for the button element */
export let type = "button"; export let type = "button";
/** /** Obtain a reference to the HTML element */
* Obtain a reference to the HTML element
* @type {null | HTMLAnchorElement | HTMLButtonElement}
*/
export let ref = null; export let ref = null;
import { getContext } from "svelte"; import { getContext } from "svelte";

View file

@ -33,16 +33,10 @@
*/ */
export let title = undefined; export let title = undefined;
/** /** Set an id for the input label */
* Set an id for the input label
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
import { createEventDispatcher } from "svelte"; import { createEventDispatcher } from "svelte";

View file

@ -11,16 +11,10 @@
*/ */
export let title = undefined; export let title = undefined;
/** /** Set an id for the input label */
* Set an id for the input label
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
</script> </script>

View file

@ -63,16 +63,10 @@
/** Set to `true` to enable the show more/less button */ /** Set to `true` to enable the show more/less button */
export let showMoreLess = false; export let showMoreLess = false;
/** /** Set an id for the code element */
* Set an id for the code element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the pre HTML element */
* Obtain a reference to the pre HTML element
* @type {null | HTMLPreElement}
*/
export let ref = null; export let ref = null;
import { tick } from "svelte"; import { tick } from "svelte";

View file

@ -16,10 +16,7 @@
*/ */
export let itemToString = (item) => item.text || item.id; export let itemToString = (item) => item.text || item.id;
/** /** Set the selected item by value index */
* Set the selected item by value index
* @type {number}
*/
export let selectedIndex = -1; export let selectedIndex = -1;
/** Specify the selected combobox value */ /** Specify the selected combobox value */
@ -67,10 +64,7 @@
*/ */
export let translateWithId = undefined; export let translateWithId = undefined;
/** /** Set an id for the list box component */
* Set an id for the list box component
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**
@ -79,10 +73,7 @@
*/ */
export let name = undefined; export let name = undefined;
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
/** /**

View file

@ -20,10 +20,7 @@
/** Specify a selector to be focused when opening the modal */ /** Specify a selector to be focused when opening the modal */
export let selectorPrimaryFocus = "[data-modal-primary-focus]"; export let selectorPrimaryFocus = "[data-modal-primary-focus]";
/** /** Obtain a reference to the top-level HTML element */
* Obtain a reference to the top-level HTML element
* @type {null | HTMLDivElement}
*/
export let ref = null; export let ref = null;
import { import {

View file

@ -11,16 +11,10 @@
/** Set to `true` to disable the switch */ /** Set to `true` to disable the switch */
export let disabled = false; export let disabled = false;
/** /** Set an id for the button element */
* Set an id for the button element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the button HTML element */
* Obtain a reference to the button HTML element
* @type {null | HTMLButtonElement}
*/
export let ref = null; export let ref = null;
import { afterUpdate, getContext, onDestroy } from "svelte"; import { afterUpdate, getContext, onDestroy } from "svelte";

View file

@ -5,10 +5,7 @@
/** Set the timeout duration (ms) to display feedback text */ /** Set the timeout duration (ms) to display feedback text */
export let feedbackTimeout = 2000; export let feedbackTimeout = 2000;
/** /** Obtain a reference to the button HTML element */
* Obtain a reference to the button HTML element
* @type {null | HTMLButtonElement}
*/
export let ref = null; export let ref = null;
import { onMount } from "svelte"; import { onMount } from "svelte";

View file

@ -8,10 +8,7 @@
*/ */
export let translateWithId = () => ""; export let translateWithId = () => "";
/** /** Set an id for the top-level element */
* Set an id for the top-level element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
import { getContext } from "svelte"; import { getContext } from "svelte";

View file

@ -42,10 +42,7 @@
/** Set to `true` to enable the light variant */ /** Set to `true` to enable the light variant */
export let light = false; export let light = false;
/** /** Set an id for the date picker element */
* Set an id for the date picker element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
import { import {

View file

@ -20,10 +20,7 @@
/** Specify the ARIA label for the calendar icon */ /** Specify the ARIA label for the calendar icon */
export let iconDescription = ""; export let iconDescription = "";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** Specify the label text */ /** Specify the label text */
@ -44,10 +41,7 @@
*/ */
export let name = undefined; export let name = undefined;
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
import { getContext, onMount } from "svelte"; import { getContext, onMount } from "svelte";

View file

@ -2,10 +2,7 @@
/** Set to `true` to use the range variant */ /** Set to `true` to use the range variant */
export let range = false; export let range = false;
/** /** Set an id to be used by the label element */
* Set an id to be used by the label element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
</script> </script>

View file

@ -18,10 +18,7 @@
*/ */
export let itemToString = (item) => item.text || item.id; export let itemToString = (item) => item.text || item.id;
/** /** Specify the selected item index */
* Specify the selected item index
* @type {number}
*/
export let selectedIndex = -1; export let selectedIndex = -1;
/** /**
@ -72,10 +69,7 @@
*/ */
export let translateWithId = undefined; export let translateWithId = undefined;
/** /** Set an id for the list box component */
* Set an id for the list box component
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**
@ -84,10 +78,7 @@
*/ */
export let name = undefined; export let name = undefined;
/** /** Obtain a reference to the button HTML element */
* Obtain a reference to the button HTML element
* @type {null | HTMLButtonElement}
*/
export let ref = null; export let ref = null;
import { createEventDispatcher } from "svelte"; import { createEventDispatcher } from "svelte";

View file

@ -33,19 +33,13 @@
/** Specify `tabindex` attribute */ /** Specify `tabindex` attribute */
export let tabindex = "0"; export let tabindex = "0";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** Specify a name attribute for the input */ /** Specify a name attribute for the input */
export let name = ""; export let name = "";
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
</script> </script>

View file

@ -32,19 +32,13 @@
/** Specify `tabindex` attribute */ /** Specify `tabindex` attribute */
export let tabindex = "0"; export let tabindex = "0";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** Specify a name attribute for the input */ /** Specify a name attribute for the input */
export let name = ""; export let name = "";
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
import { createEventDispatcher } from "svelte"; import { createEventDispatcher } from "svelte";

View file

@ -21,10 +21,7 @@
/** Specify the error body text */ /** Specify the error body text */
export let errorBody = ""; export let errorBody = "";
/** /** Set an id for the top-level element */
* Set an id for the top-level element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** Specify the file uploader name */ /** Specify the file uploader name */

View file

@ -1,8 +1,5 @@
<script> <script>
/** /** Set an id to be used by the label element */
* Set an id to be used by the label element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
</script> </script>

View file

@ -2,7 +2,7 @@
/** /**
* Specify the icon from `carbon-icons-svelte` to render * Specify the icon from `carbon-icons-svelte` to render
* Icon size must be 16px (e.g. `Add16`, `Task16`) * Icon size must be 16px (e.g. `Add16`, `Task16`)
* @type {typeof import("carbon-icons-svelte/lib/Add16").default} * @type {import("carbon-icons-svelte").CarbonIcon}
*/ */
export let render = undefined; export let render = undefined;

View file

@ -20,10 +20,7 @@
/** Set to `true` to allow visited styles */ /** Set to `true` to allow visited styles */
export let visited = false; export let visited = false;
/** /** Obtain a reference to the top-level HTML element */
* Obtain a reference to the top-level HTML element
* @type {null | HTMLAnchorElement | HTMLParagraphElement}
*/
export let ref = null; export let ref = null;
</script> </script>

View file

@ -21,16 +21,10 @@
*/ */
export let translateWithId = (id) => defaultTranslations[id]; export let translateWithId = (id) => defaultTranslations[id];
/** /** Set an id for the top-level element */
* Set an id for the top-level element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the top-level HTML element */
* Obtain a reference to the top-level HTML element
* @type {null | HTMLDivElement}
*/
export let ref = null; export let ref = null;
import { getContext } from "svelte"; import { getContext } from "svelte";

View file

@ -1,14 +1,8 @@
<script> <script>
/** /** Set an id for the top-level element */
* Set an id for the top-level element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the HTML element */
* Obtain a reference to the HTML element
* @type {null | HTMLDivElement}
*/
export let ref = null; export let ref = null;
</script> </script>

View file

@ -24,10 +24,7 @@
*/ */
export let translateWithId = (id) => defaultTranslations[id]; export let translateWithId = (id) => defaultTranslations[id];
/** /** Obtain a reference to the top-level HTML element */
* Obtain a reference to the top-level HTML element
* @type {null | HTMLElement}
*/
export let ref = null; export let ref = null;
import { createEventDispatcher, getContext } from "svelte"; import { createEventDispatcher, getContext } from "svelte";

View file

@ -11,10 +11,7 @@
/** Specify the label description */ /** Specify the label description */
export let description = "Active loading indicator"; export let description = "Active loading indicator";
/** /** Set an id for the label element */
* Set an id for the label element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
$: spinnerRadius = small ? "26.8125" : "37.5"; $: spinnerRadius = small ? "26.8125" : "37.5";

View file

@ -62,16 +62,10 @@
/** Set to `true` to prevent the modal from closing when clicking outside */ /** Set to `true` to prevent the modal from closing when clicking outside */
export let preventCloseOnClickOutside = false; export let preventCloseOnClickOutside = false;
/** /** Set an id for the top-level element */
* Set an id for the top-level element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the top-level HTML element */
* Obtain a reference to the top-level HTML element
* @type {null | HTMLDivElement}
*/
export let ref = null; export let ref = null;
import { createEventDispatcher, onMount, afterUpdate } from "svelte"; import { createEventDispatcher, onMount, afterUpdate } from "svelte";

View file

@ -96,10 +96,7 @@
/** Specify the list box label */ /** Specify the list box label */
export let label = ""; export let label = "";
/** /** Set an id for the list box component */
* Set an id for the list box component
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**

View file

@ -7,7 +7,7 @@
/** /**
* Specify the icon from `carbon-icons-svelte` to render * Specify the icon from `carbon-icons-svelte` to render
* @type {typeof import("carbon-icons-svelte/lib/Add16").default} * @type {import("carbon-icons-svelte").CarbonIcon}
*/ */
export let renderIcon = Close20; export let renderIcon = Close20;

View file

@ -1,4 +1,8 @@
<script> <script>
/**
* @typedef {"increment" | "decrement"} NumberInputTranslationId
*/
/** /**
* Set the size of the input * Set the size of the input
* @type {"sm" | "xl"} * @type {"sm" | "xl"}
@ -71,10 +75,7 @@
decrement: "decrement", decrement: "decrement",
}; };
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**
@ -83,16 +84,9 @@
*/ */
export let name = undefined; export let name = undefined;
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement} [ref=null]
*/
export let ref = null; export let ref = null;
/**
* @typedef {"increment" | "decrement"} NumberInputTranslationId
*/
import { createEventDispatcher, afterUpdate } from "svelte"; import { createEventDispatcher, afterUpdate } from "svelte";
import CaretDownGlyph from "carbon-icons-svelte/lib/CaretDownGlyph"; import CaretDownGlyph from "carbon-icons-svelte/lib/CaretDownGlyph";
import CaretUpGlyph from "carbon-icons-svelte/lib/CaretUpGlyph"; import CaretUpGlyph from "carbon-icons-svelte/lib/CaretUpGlyph";

View file

@ -28,7 +28,7 @@
/** /**
* Specify the icon from `carbon-icons-svelte` to render * Specify the icon from `carbon-icons-svelte` to render
* @type {typeof import("carbon-icons-svelte/lib/Add16").default} * @type {import("carbon-icons-svelte").CarbonIcon}
*/ */
export let icon = OverflowMenuVertical16; export let icon = OverflowMenuVertical16;
@ -41,22 +41,13 @@
/** Specify the ARIA label for the icon */ /** Specify the ARIA label for the icon */
export let iconDescription = "Open and close list of options"; export let iconDescription = "Open and close list of options";
/** /** Set an id for the button element */
* Set an id for the button element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the trigger button element */
* Obtain a reference to the trigger button element
* @type {null | HTMLButtonElement}
*/
export let buttonRef = null; export let buttonRef = null;
/** /** Obtain a reference to the overflow menu element */
* Obtain a reference to the overflow menu element
* @type {null | HTMLUListElement}
*/
export let menuRef = null; export let menuRef = null;
import { createEventDispatcher, setContext, afterUpdate } from "svelte"; import { createEventDispatcher, setContext, afterUpdate } from "svelte";

View file

@ -23,16 +23,10 @@
/** Set to `false` to omit the button `title` attribute */ /** Set to `false` to omit the button `title` attribute */
export let requireTitle = true; export let requireTitle = true;
/** /** Set an id for the top-level element */
* Set an id for the top-level element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the HTML element */
* Obtain a reference to the HTML element
* @type {null | HTMLAnchorElement | HTMLButtonElement}
*/
export let ref = null; export let ref = null;
import { getContext, afterUpdate } from "svelte"; import { getContext, afterUpdate } from "svelte";

View file

@ -61,10 +61,7 @@
export let pageRangeText = (current, total) => export let pageRangeText = (current, total) =>
`of ${total} page${total === 1 ? "" : "s"}`; `of ${total} page${total === 1 ? "" : "s"}`;
/** /** Set an id for the top-level element */
* Set an id for the top-level element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
import { createEventDispatcher } from "svelte"; import { createEventDispatcher } from "svelte";

View file

@ -20,10 +20,7 @@
/** Specify the step secondary label */ /** Specify the step secondary label */
export let secondaryLabel = ""; export let secondaryLabel = "";
/** /** Set an id for the top-level element */
* Set an id for the top-level element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
import { getContext } from "svelte"; import { getContext } from "svelte";

View file

@ -20,19 +20,13 @@
/** Set to `true` to visually hide the label text */ /** Set to `true` to visually hide the label text */
export let hideLabel = false; export let hideLabel = false;
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** Specify a name attribute for the checkbox input */ /** Specify a name attribute for the checkbox input */
export let name = ""; export let name = "";
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
import { getContext } from "svelte"; import { getContext } from "svelte";

View file

@ -63,16 +63,10 @@
/** Specify the label text */ /** Specify the label text */
export let labelText = ""; export let labelText = "";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
import { createEventDispatcher } from "svelte"; import { createEventDispatcher } from "svelte";

View file

@ -17,10 +17,7 @@
/** Set to `true` to disable the select element */ /** Set to `true` to disable the select element */
export let disabled = false; export let disabled = false;
/** /** Set an id for the select element */
* Set an id for the select element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**
@ -47,10 +44,7 @@
/** Set to `true` to visually hide the label text */ /** Set to `true` to visually hide the label text */
export let hideLabel = false; export let hideLabel = false;
/** /** Obtain a reference to the select HTML element */
* Obtain a reference to the select HTML element
* @type {null | HTMLSelectElement}
*/
export let ref = null; export let ref = null;
import { createEventDispatcher, setContext, afterUpdate } from "svelte"; import { createEventDispatcher, setContext, afterUpdate } from "svelte";

View file

@ -35,10 +35,7 @@
/** Set to `true` to hide the text input */ /** Set to `true` to hide the text input */
export let hideTextInput = false; export let hideTextInput = false;
/** /** Set an id for the slider div element */
* Set an id for the slider div element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** Set to `true` to indicate an invalid state */ /** Set to `true` to indicate an invalid state */
@ -50,10 +47,7 @@
/** Set a name for the slider element */ /** Set a name for the slider element */
export let name = ""; export let name = "";
/** /** Obtain a reference to the HTML element */
* Obtain a reference to the HTML element
* @type {null | HTMLElement}
*/
export let ref = null; export let ref = null;
import { createEventDispatcher } from "svelte"; import { createEventDispatcher } from "svelte";

View file

@ -8,19 +8,13 @@
/** Specify the value of the input */ /** Specify the value of the input */
export let value = "value"; export let value = "value";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** Specify a name attribute for the input */ /** Specify a name attribute for the input */
export let name = ""; export let name = "";
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
import { getContext } from "svelte"; import { getContext } from "svelte";

View file

@ -14,16 +14,10 @@
/** Specify the tabindex */ /** Specify the tabindex */
export let tabindex = "0"; export let tabindex = "0";
/** /** Set an id for the top-level element */
* Set an id for the top-level element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the anchor HTML element */
* Obtain a reference to the anchor HTML element
* @type {null | HTMLAnchorElement}
*/
export let ref = null; export let ref = null;
import { getContext } from "svelte"; import { getContext } from "svelte";

View file

@ -1,8 +1,5 @@
<script> <script>
/** /** Set an id for the top-level element */
* Set an id for the top-level element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
import { getContext } from "svelte"; import { getContext } from "svelte";

View file

@ -29,10 +29,7 @@
*/ */
export let title = "Clear filter"; export let title = "Clear filter";
/** /** Set an id for the filterable tag */
* Set an id for the filterable tag
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
import Close16 from "carbon-icons-svelte/lib/Close16"; import Close16 from "carbon-icons-svelte/lib/Close16";

View file

@ -32,10 +32,7 @@
/** Specify the text for the invalid state */ /** Specify the text for the invalid state */
export let invalidText = ""; export let invalidText = "";
/** /** Set an id for the textarea element */
* Set an id for the textarea element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**
@ -44,10 +41,7 @@
*/ */
export let name = undefined; export let name = undefined;
/** /** Obtain a reference to the textarea HTML element */
* Obtain a reference to the textarea HTML element
* @type {null | HTMLTextAreaElement}
*/
export let ref = null; export let ref = null;
import WarningFilled16 from "carbon-icons-svelte/lib/WarningFilled16"; import WarningFilled16 from "carbon-icons-svelte/lib/WarningFilled16";

View file

@ -53,10 +53,7 @@
/** Specify the text for the invalid state */ /** Specify the text for the invalid state */
export let invalidText = ""; export let invalidText = "";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**
@ -65,10 +62,7 @@
*/ */
export let name = undefined; export let name = undefined;
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
import { getContext } from "svelte"; import { getContext } from "svelte";

View file

@ -23,10 +23,7 @@
/** Specify the helper text */ /** Specify the helper text */
export let helperText = ""; export let helperText = "";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**
@ -53,10 +50,7 @@
/** Specify the warning state text */ /** Specify the warning state text */
export let warnText = ""; export let warnText = "";
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
/** Set to `true` to mark the field as required */ /** Set to `true` to mark the field as required */

View file

@ -20,16 +20,10 @@
/** Specify the tabindex */ /** Specify the tabindex */
export let tabindex = "0"; export let tabindex = "0";
/** /** Set an id for the top-level div element */
* Set an id for the top-level div element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the top-level element */
* Obtain a reference to the top-level element
* @type {null | HTMLDivElement}
*/
export let ref = null; export let ref = null;
import { afterUpdate } from "svelte"; import { afterUpdate } from "svelte";

View file

@ -14,10 +14,7 @@
/** Specify the ARIA label for the radio tile checkmark icon */ /** Specify the ARIA label for the radio tile checkmark icon */
export let iconDescription = "Tile checkmark"; export let iconDescription = "Tile checkmark";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** Specify a name attribute for the input */ /** Specify a name attribute for the input */

View file

@ -17,10 +17,7 @@
/** Specify the ARIA label for the selectable tile checkmark icon */ /** Specify the ARIA label for the selectable tile checkmark icon */
export let iconDescription = "Tile checkmark"; export let iconDescription = "Tile checkmark";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**
@ -29,10 +26,7 @@
*/ */
export let name = ""; export let name = "";
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
import { createEventDispatcher } from "svelte"; import { createEventDispatcher } from "svelte";

View file

@ -44,10 +44,7 @@
/** Specify the invalid state text */ /** Specify the invalid state text */
export let invalidText = ""; export let invalidText = "";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**
@ -56,10 +53,7 @@
*/ */
export let name = undefined; export let name = undefined;
/** /** Obtain a reference to the input HTML element */
* Obtain a reference to the input HTML element
* @type {null | HTMLInputElement}
*/
export let ref = null; export let ref = null;
</script> </script>

View file

@ -17,10 +17,7 @@
*/ */
export let hideLabel = true; export let hideLabel = true;
/** /** Set an id for the select element */
* Set an id for the select element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**
@ -29,10 +26,7 @@
*/ */
export let name = undefined; export let name = undefined;
/** /** Obtain a reference to the select HTML element */
* Obtain a reference to the select HTML element
* @type {null | HTMLSelectElement}
*/
export let ref = null; export let ref = null;
import { setContext } from "svelte"; import { setContext } from "svelte";

View file

@ -14,10 +14,7 @@
/** Specify the label text */ /** Specify the label text */
export let labelText = ""; export let labelText = "";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**

View file

@ -2,10 +2,7 @@
/** Specify the label text */ /** Specify the label text */
export let labelText = ""; export let labelText = "";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
</script> </script>

View file

@ -14,10 +14,7 @@
/** Specify the label text */ /** Specify the label text */
export let labelText = ""; export let labelText = "";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /**

View file

@ -2,10 +2,7 @@
/** Specify the label text */ /** Specify the label text */
export let labelText = ""; export let labelText = "";
/** /** Set an id for the input element */
* Set an id for the input element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
</script> </script>

View file

@ -20,7 +20,7 @@
/** /**
* Specify the icon from `carbon-icons-svelte` to render for the tooltip button * Specify the icon from `carbon-icons-svelte` to render for the tooltip button
* Icon size must be 16px (e.g. `Add16`, `Task16`) * Icon size must be 16px (e.g. `Add16`, `Task16`)
* @type {typeof import("carbon-icons-svelte/lib/Add16").default} [icon=Information16] * @type {import("carbon-icons-svelte").CarbonIcon} [icon=Information16]
*/ */
export let icon = Information16; export let icon = Information16;
@ -48,22 +48,13 @@
/** Set the tooltip button text */ /** Set the tooltip button text */
export let triggerText = ""; export let triggerText = "";
/** /** Obtain a reference to the trigger text HTML element */
* Obtain a reference to the trigger text HTML element
* @type {null | HTMLElement}
*/
export let ref = null; export let ref = null;
/** /** Obtain a reference to the tooltip HTML element */
* Obtain a reference to the tooltip HTML element
* @type {null | HTMLElement}
*/
export let refTooltip = null; export let refTooltip = null;
/** /** Obtain a reference to the icon HTML element */
* Obtain a reference to the icon HTML element
* @type {null | HTMLElement}
*/
export let refIcon = null; export let refIcon = null;
import { createEventDispatcher, afterUpdate } from "svelte"; import { createEventDispatcher, afterUpdate } from "svelte";

View file

@ -14,16 +14,10 @@
*/ */
export let direction = "bottom"; export let direction = "bottom";
/** /** Set an id for the tooltip div element */
* Set an id for the tooltip div element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the button HTML element */
* Obtain a reference to the button HTML element
* @type {null | HTMLButtonElement}
*/
export let ref = null; export let ref = null;
let visible = false; let visible = false;

View file

@ -14,16 +14,10 @@
*/ */
export let direction = "bottom"; export let direction = "bottom";
/** /** Set an id for the span element */
* Set an id for the span element
* @type {string}
*/
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** /** Obtain a reference to the button HTML element */
* Obtain a reference to the button HTML element
* @type {null | HTMLButtonElement} [ref=null]
*/
export let ref = null; export let ref = null;
let hidden = false; let hidden = false;

View file

@ -29,10 +29,7 @@
*/ */
export let platformName = ""; export let platformName = "";
/** /** Obtain a reference to the HTML anchor element */
* Obtain a reference to the HTML anchor element
* @type {null | HTMLAnchorElement}
*/
export let ref = null; export let ref = null;
import HamburgerMenu from "../SideNav/HamburgerMenu.svelte"; import HamburgerMenu from "../SideNav/HamburgerMenu.svelte";

View file

@ -4,7 +4,7 @@
/** /**
* Specify the icon props * Specify the icon props
* @type {{ render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; }} * @type {{ render: import("carbon-icons-svelte").CarbonIcon; skeleton: boolean; }}
*/ */
export let icon = undefined; export let icon = undefined;
@ -15,10 +15,7 @@
*/ */
export let text = undefined; export let text = undefined;
/** /** Obtain a reference to the button HTML element */
* Obtain a reference to the button HTML element
* @type {null | HTMLButtonElement}
*/
export let ref = null; export let ref = null;
import { createEventDispatcher } from "svelte"; import { createEventDispatcher } from "svelte";

View file

@ -10,14 +10,11 @@
/** /**
* Specify the icon props * Specify the icon props
* @type {{ render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; }} * @type {{ render: import("carbon-icons-svelte").CarbonIcon; skeleton: boolean; }}
*/ */
export let icon = undefined; export let icon = undefined;
/** /** Obtain a reference to the HTML anchor element */
* Obtain a reference to the HTML anchor element
* @type {null | HTMLAnchorElement}
*/
export let ref = null; export let ref = null;
import { Icon } from "../../Icon"; import { Icon } from "../../Icon";

View file

@ -11,10 +11,7 @@
*/ */
export let text = undefined; export let text = undefined;
/** /** Obtain a reference to the HTML anchor element */
* Obtain a reference to the HTML anchor element
* @type {null | HTMLAnchorElement}
*/
export let ref = null; export let ref = null;
</script> </script>

View file

@ -11,10 +11,7 @@
*/ */
export let text = undefined; export let text = undefined;
/** /** Obtain a reference to the HTML anchor element */
* Obtain a reference to the HTML anchor element
* @type {null | HTMLAnchorElement}
*/
export let ref = null; export let ref = null;
/** Specify the ARIA label for the chevron icon */ /** Specify the ARIA label for the chevron icon */

View file

@ -5,10 +5,7 @@
*/ */
export let href = undefined; export let href = undefined;
/** /** Obtain a reference to the HTML anchor element */
* Obtain a reference to the HTML anchor element
* @type {null | HTMLAnchorElement}
*/
export let ref = null; export let ref = null;
</script> </script>

View file

@ -4,14 +4,11 @@
/** /**
* Specify the icon to render * Specify the icon to render
* @type {typeof import("carbon-icons-svelte/lib/Add16").default} * @type {import("carbon-icons-svelte").CarbonIcon}
*/ */
export let icon = undefined; export let icon = undefined;
/** /** Obtain a reference to the HTML button element */
* Obtain a reference to the HTML button element
* @type {null | HTMLButtonElement}
*/
export let ref = null; export let ref = null;
</script> </script>

View file

@ -8,10 +8,7 @@
/** Set to `true` to toggle the open state */ /** Set to `true` to toggle the open state */
export let isOpen = false; export let isOpen = false;
/** /** Obtain a reference to the HTML button element */
* Obtain a reference to the HTML button element
* @type {null | HTMLButtonElement}
*/
export let ref = null; export let ref = null;
import { fly } from "svelte/transition"; import { fly } from "svelte/transition";

View file

@ -16,14 +16,11 @@
/** /**
* Specify the icon props * Specify the icon props
* @type {{ render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; }} * @type {{ render: import("carbon-icons-svelte").CarbonIcon; skeleton: boolean; }}
*/ */
export let icon = undefined; export let icon = undefined;
/** /** Obtain a reference to the HTML anchor element */
* Obtain a reference to the HTML anchor element
* @type {null | HTMLAnchorElement}
*/
export let ref = null; export let ref = null;
import { Icon } from "../../Icon"; import { Icon } from "../../Icon";

View file

@ -10,14 +10,11 @@
/** /**
* Specify the icon props * Specify the icon props
* @type {{ render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; }} * @type {{ render: import("carbon-icons-svelte").CarbonIcon; skeleton: boolean; }}
*/ */
export let icon = undefined; export let icon = undefined;
/** /** Obtain a reference to the HTML button element */
* Obtain a reference to the HTML button element
* @type {null | HTMLButtonElement}
*/
export let ref = null; export let ref = null;
import ChevronDown16 from "carbon-icons-svelte/lib/ChevronDown16"; import ChevronDown16 from "carbon-icons-svelte/lib/ChevronDown16";

View file

@ -17,10 +17,7 @@
*/ */
export let text = undefined; export let text = undefined;
/** /** Obtain a reference to the HTML anchor element */
* Obtain a reference to the HTML anchor element
* @type {null | HTMLAnchorElement}
*/
export let ref = null; export let ref = null;
</script> </script>

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class Accordion { export interface AccordionProps {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["ul"]> & {
/** /**
* Specify alignment of accordion item chevron icon * Specify alignment of accordion item chevron icon
* @default "end" * @default "end"
@ -24,8 +23,10 @@ export default class Accordion {
* @default false * @default false
*/ */
skeleton?: boolean; skeleton?: boolean;
}; }
export default class Accordion {
$$prop_def: AccordionProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class AccordionItem { export interface AccordionItemProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["li"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["li"]> & {
/** /**
* Specify the title of the accordion item heading * Specify the title of the accordion item heading
* Alternatively, use the named slot "title" (e.g. <div slot="title">...</div>) * Alternatively, use the named slot "title" (e.g. <div slot="title">...</div>)
@ -26,8 +25,10 @@ export default class AccordionItem {
* @default "Expand/Collapse" * @default "Expand/Collapse"
*/ */
iconDescription?: string; iconDescription?: string;
}; }
export default class AccordionItem {
$$prop_def: AccordionItemProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
title: {}; title: {};

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class AccordionSkeleton { export interface AccordionSkeletonProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["ul"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["ul"]> & {
/** /**
* Specify the number of accordion items to render * Specify the number of accordion items to render
* @default 4 * @default 4
@ -24,8 +23,10 @@ export default class AccordionSkeleton {
* @default true * @default true
*/ */
open?: boolean; open?: boolean;
}; }
export default class AccordionSkeleton {
$$prop_def: AccordionSkeletonProps;
$$slot_def: {}; $$slot_def: {};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;

View file

@ -1,14 +1,15 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class AspectRatio { export interface AspectRatioProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Specify the aspect ratio * Specify the aspect ratio
* @default "2x1" * @default "2x1"
*/ */
ratio?: "2x1" | "16x9" | "4x3" | "1x1" | "3x4" | "9x16" | "1x2"; ratio?: "2x1" | "16x9" | "4x3" | "1x1" | "3x4" | "9x16" | "1x2";
}; }
export default class AspectRatio {
$$prop_def: AspectRatioProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class Breadcrumb { export interface BreadcrumbProps {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["nav"]> & {
/** /**
* Set to `true` to hide the breadcrumb trailing slash * Set to `true` to hide the breadcrumb trailing slash
* @default false * @default false
@ -13,8 +12,10 @@ export default class Breadcrumb {
* @default false * @default false
*/ */
skeleton?: boolean; skeleton?: boolean;
}; }
export default class Breadcrumb {
$$prop_def: BreadcrumbProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class BreadcrumbItem { export interface BreadcrumbItemProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["li"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["li"]> & {
/** /**
* Set the `href` to use an anchor link * Set the `href` to use an anchor link
*/ */
@ -12,8 +11,10 @@ export default class BreadcrumbItem {
* @default false * @default false
*/ */
isCurrentPage?: boolean; isCurrentPage?: boolean;
}; }
export default class BreadcrumbItem {
$$prop_def: BreadcrumbItemProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class BreadcrumbSkeleton { export interface BreadcrumbSkeletonProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Set to `true` to hide the breadcrumb trailing slash * Set to `true` to hide the breadcrumb trailing slash
* @default false * @default false
@ -13,8 +12,10 @@ export default class BreadcrumbSkeleton {
* @default 3 * @default 3
*/ */
count?: number; count?: number;
}; }
export default class BreadcrumbSkeleton {
$$prop_def: BreadcrumbSkeletonProps;
$$slot_def: {}; $$slot_def: {};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class Button { export interface ButtonProps {
$$prop_def: {
/** /**
* Specify the kind of button * Specify the kind of button
* @default "primary" * @default "primary"
@ -23,7 +22,7 @@ export default class Button {
/** /**
* Specify the icon from `carbon-icons-svelte` to render * Specify the icon from `carbon-icons-svelte` to render
*/ */
icon?: typeof import("carbon-icons-svelte/lib/Add16").default; icon?: import("carbon-icons-svelte").CarbonIcon;
/** /**
* Specify the ARIA label for the button icon * Specify the ARIA label for the button icon
@ -82,8 +81,10 @@ export default class Button {
* @default null * @default null
*/ */
ref?: null | HTMLAnchorElement | HTMLButtonElement; ref?: null | HTMLAnchorElement | HTMLButtonElement;
}; }
export default class Button {
$$prop_def: ButtonProps;
$$slot_def: { $$slot_def: {
default: { props: undefined }; default: { props: undefined };
}; };

View file

@ -1,14 +1,15 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class ButtonSet { export interface ButtonSetProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Set to `true` to stack the buttons vertically * Set to `true` to stack the buttons vertically
* @default false * @default false
*/ */
stacked?: boolean; stacked?: boolean;
}; }
export default class ButtonSet {
$$prop_def: ButtonSetProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class ButtonSkeleton { export interface ButtonSkeletonProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Set the `href` to use an anchor link * Set the `href` to use an anchor link
*/ */
@ -18,8 +17,10 @@ export default class ButtonSkeleton {
* @default false * @default false
*/ */
small?: boolean; small?: boolean;
}; }
export default class ButtonSkeleton {
$$prop_def: ButtonSkeletonProps;
$$slot_def: {}; $$slot_def: {};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class Checkbox { export interface CheckboxProps {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Specify whether the checkbox is checked * Specify whether the checkbox is checked
* @default false * @default false
@ -57,6 +56,7 @@ export default class Checkbox {
/** /**
* Set an id for the input label * Set an id for the input label
* @default "ccs-" + Math.random().toString(36)
*/ */
id?: string; id?: string;
@ -65,8 +65,10 @@ export default class Checkbox {
* @default null * @default null
*/ */
ref?: null | HTMLInputElement; ref?: null | HTMLInputElement;
}; }
export default class Checkbox {
$$prop_def: CheckboxProps;
$$slot_def: {}; $$slot_def: {};
$on(eventname: "check", cb: (event: CustomEvent<boolean>) => void): () => void; $on(eventname: "check", cb: (event: CustomEvent<boolean>) => void): () => void;

View file

@ -1,8 +1,9 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class CheckboxSkeleton { export interface CheckboxSkeletonProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {}
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {};
export default class CheckboxSkeleton {
$$prop_def: CheckboxSkeletonProps;
$$slot_def: {}; $$slot_def: {};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class CodeSnippet { export interface CodeSnippetProps {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Set the type of code snippet * Set the type of code snippet
* @default "single" * @default "single"
@ -89,6 +88,7 @@ export default class CodeSnippet {
/** /**
* Set an id for the code element * Set an id for the code element
* @default "ccs-" + Math.random().toString(36)
*/ */
id?: string; id?: string;
@ -97,8 +97,10 @@ export default class CodeSnippet {
* @default null * @default null
*/ */
ref?: null | HTMLPreElement; ref?: null | HTMLPreElement;
}; }
export default class CodeSnippet {
$$prop_def: CodeSnippetProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,14 +1,15 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class CodeSnippetSkeleton { export interface CodeSnippetSkeletonProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Set the type of code snippet * Set the type of code snippet
* @default "single" * @default "single"
*/ */
type?: "single" | "inline" | "multi"; type?: "single" | "inline" | "multi";
}; }
export default class CodeSnippetSkeleton {
$$prop_def: CodeSnippetSkeletonProps;
$$slot_def: {}; $$slot_def: {};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;

View file

@ -5,8 +5,7 @@ interface ComboBoxItem {
text: string; text: string;
} }
export default class ComboBox { export interface ComboBoxProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Set the combobox items * Set the combobox items
* @default [] * @default []
@ -21,6 +20,7 @@ export default class ComboBox {
/** /**
* Set the selected item by value index * Set the selected item by value index
* @default -1
*/ */
selectedIndex?: number; selectedIndex?: number;
@ -96,6 +96,7 @@ export default class ComboBox {
/** /**
* Set an id for the list box component * Set an id for the list box component
* @default "ccs-" + Math.random().toString(36)
*/ */
id?: string; id?: string;
@ -115,8 +116,10 @@ export default class ComboBox {
* @default null * @default null
*/ */
listRef?: null | HTMLDivElement; listRef?: null | HTMLDivElement;
}; }
export default class ComboBox {
$$prop_def: ComboBoxProps;
$$slot_def: {}; $$slot_def: {};
$on( $on(

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class ComposedModal { export interface ComposedModalProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Set the size of the composed modal * Set the size of the composed modal
*/ */
@ -42,8 +41,10 @@ export default class ComposedModal {
* @default null * @default null
*/ */
ref?: null | HTMLDivElement; ref?: null | HTMLDivElement;
}; }
export default class ComposedModal {
$$prop_def: ComposedModalProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class ModalBody { export interface ModalBodyProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Set to `true` if the modal contains form elements * Set to `true` if the modal contains form elements
* @default false * @default false
@ -13,8 +12,10 @@ export default class ModalBody {
* @default false * @default false
*/ */
hasScrollingContent?: boolean; hasScrollingContent?: boolean;
}; }
export default class ModalBody {
$$prop_def: ModalBodyProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class ModalFooter { export interface ModalFooterProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Specify the primary button text * Specify the primary button text
* @default "" * @default ""
@ -35,8 +34,10 @@ export default class ModalFooter {
* @default false * @default false
*/ */
danger?: boolean; danger?: boolean;
}; }
export default class ModalFooter {
$$prop_def: ModalFooterProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class ModalHeader { export interface ModalHeaderProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Specify the modal title * Specify the modal title
* @default "" * @default ""
@ -43,8 +42,10 @@ export default class ModalHeader {
* @default "Close" * @default "Close"
*/ */
iconDescription?: string; iconDescription?: string;
}; }
export default class ModalHeader {
$$prop_def: ModalHeaderProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class ContentSwitcher { export interface ContentSwitcherProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Set the selected index of the switch item * Set the selected index of the switch item
* @default 0 * @default 0
@ -18,8 +17,10 @@ export default class ContentSwitcher {
* Specify the size of the content switcher * Specify the size of the content switcher
*/ */
size?: "sm" | "xl"; size?: "sm" | "xl";
}; }
export default class ContentSwitcher {
$$prop_def: ContentSwitcherProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class Switch { export interface SwitchProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["button"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["button"]> & {
/** /**
* Specify the switch text * Specify the switch text
* Alternatively, use the named slot "text" (e.g. <span slot="text">...</span>) * Alternatively, use the named slot "text" (e.g. <span slot="text">...</span>)
@ -23,6 +22,7 @@ export default class Switch {
/** /**
* Set an id for the button element * Set an id for the button element
* @default "ccs-" + Math.random().toString(36)
*/ */
id?: string; id?: string;
@ -31,8 +31,10 @@ export default class Switch {
* @default null * @default null
*/ */
ref?: null | HTMLButtonElement; ref?: null | HTMLButtonElement;
}; }
export default class Switch {
$$prop_def: SwitchProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class Copy { export interface CopyProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["button"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["button"]> & {
/** /**
* Set the feedback text shown after clicking the button * Set the feedback text shown after clicking the button
* @default "Copied!" * @default "Copied!"
@ -19,8 +18,10 @@ export default class Copy {
* @default null * @default null
*/ */
ref?: null | HTMLButtonElement; ref?: null | HTMLButtonElement;
}; }
export default class Copy {
$$prop_def: CopyProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,14 +1,15 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class CopyButton { export interface CopyButtonProps {
$$prop_def: {
/** /**
* Set the title and ARIA label for the copy button * Set the title and ARIA label for the copy button
* @default "Copy to clipboard" * @default "Copy to clipboard"
*/ */
iconDescription?: string; iconDescription?: string;
}; }
export default class CopyButton {
$$prop_def: CopyButtonProps;
$$slot_def: {}; $$slot_def: {};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void; $on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;

View file

@ -11,8 +11,7 @@ interface Header {
type Headers = Header[]; type Headers = Header[];
export default class DataTable { export interface DataTableProps {
$$prop_def: {
/** /**
* Specify the data table headers * Specify the data table headers
* @default [] * @default []
@ -104,13 +103,15 @@ export default class DataTable {
* @default false * @default false
*/ */
stickyHeader?: boolean; stickyHeader?: boolean;
}; }
export default class DataTable {
$$prop_def: DataTableProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
["expanded-row"]: { row: Object };
["cell-header"]: { header: Header };
cell: { row: Object; cell: Object }; cell: { row: Object; cell: Object };
["cell-header"]: { header: Header };
["expanded-row"]: { row: Object };
}; };
$on( $on(

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class Table { export interface TableProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["section"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["table"]> & {
/** /**
* Set the size of the table * Set the size of the table
*/ */
@ -36,8 +35,10 @@ export default class Table {
* @default false * @default false
*/ */
stickyHeader?: boolean; stickyHeader?: boolean;
}; }
export default class Table {
$$prop_def: TableProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,8 +1,9 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class TableBody { export interface TableBodyProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["tbody"]> {}
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["tbody"]> & {};
export default class TableBody {
$$prop_def: TableBodyProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,8 +1,9 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class TableCell { export interface TableCellProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["td"]> {}
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["td"]> & {};
export default class TableCell {
$$prop_def: TableCellProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class TableContainer { export interface TableContainerProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Specify the title of the data table * Specify the title of the data table
* @default "" * @default ""
@ -19,8 +18,10 @@ export default class TableContainer {
* @default false * @default false
*/ */
stickyHeader?: boolean; stickyHeader?: boolean;
}; }
export default class TableContainer {
$$prop_def: TableContainerProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,8 +1,9 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class TableHead { export interface TableHeadProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["thead"]> {}
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["thead"]> & {};
export default class TableHead {
$$prop_def: TableHeadProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,7 +1,6 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class TableHeader { export interface TableHeaderProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["th"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["th"]> & {
/** /**
* Specify the `scope` attribute * Specify the `scope` attribute
* @default "col" * @default "col"
@ -16,10 +15,13 @@ export default class TableHeader {
/** /**
* Set an id for the top-level element * Set an id for the top-level element
* @default "ccs-" + Math.random().toString(36)
*/ */
id?: string; id?: string;
}; }
export default class TableHeader {
$$prop_def: TableHeaderProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,8 +1,9 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class TableRow { export interface TableRowProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["tr"]> {}
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["tr"]> & {};
export default class TableRow {
$$prop_def: TableRowProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,14 +1,15 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class Toolbar { export interface ToolbarProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["section"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["section"]> & {
/** /**
* Specify the toolbar size * Specify the toolbar size
* @default "default" * @default "default"
*/ */
size?: "sm" | "default"; size?: "sm" | "default";
}; }
export default class Toolbar {
$$prop_def: ToolbarProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,14 +1,15 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class ToolbarBatchActions { export interface ToolbarBatchActionsProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
/** /**
* Override the total items selected text * Override the total items selected text
* @default (totalSelected) => `${totalSelected} item${totalSelected === 1 ? "" : "s"} selected` * @default (totalSelected) => `${totalSelected} item${totalSelected === 1 ? "" : "s"} selected`
*/ */
formatTotalSelected?: (totalSelected: number) => string; formatTotalSelected?: (totalSelected: number) => string;
}; }
export default class ToolbarBatchActions {
$$prop_def: ToolbarBatchActionsProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,8 +1,9 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class ToolbarContent { export interface ToolbarContentProps {}
$$prop_def: {};
export default class ToolbarContent {
$$prop_def: ToolbarContentProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

View file

@ -1,8 +1,9 @@
/// <reference types="svelte" /> /// <reference types="svelte" />
export default class ToolbarMenu { export interface ToolbarMenuProps {}
$$prop_def: {};
export default class ToolbarMenu {
$$prop_def: ToolbarMenuProps;
$$slot_def: { $$slot_def: {
default: {}; default: {};
}; };

Some files were not shown because too many files have changed in this diff Show more