build: add script to generate component index

- move typedefs for correct type parsing
This commit is contained in:
Eric Liu 2020-08-13 17:24:00 -07:00
commit 5968e22bd9
14 changed files with 5518 additions and 207 deletions

View file

@ -17,10 +17,6 @@
*/
export let tabindex = "-1";
/**
* @typedef {"close" | "open"} ListBoxFieldTranslationId
*/
/**
* Default translation ids
* @constant
@ -46,6 +42,10 @@
*/
export let ref = null;
/**
* @typedef {"close" | "open"} ListBoxFieldTranslationId
*/
import { getContext } from "svelte";
const defaultTranslations = {

View file

@ -12,16 +12,16 @@
*/
export const translationIds = { close: "close", open: "open" };
/**
* @typedef {"close" | "open"} ListBoxMenuIconTranslationId
*/
/**
* Override the default translation ids
* @type {(id: ListBoxMenuIconTranslationId) => string} [translateWithId = (id) => string]
*/
export let translateWithId = (id) => defaultTranslations[id];
/**
* @typedef {"close" | "open"} ListBoxMenuIconTranslationId
*/
import ChevronDown16 from "carbon-icons-svelte/lib/ChevronDown16";
const defaultTranslations = {

View file

@ -11,10 +11,6 @@
*/
export let disabled = false;
/**
* @typedef {"clearAll" | "clearSelection"} ListBoxSelectionTranslationId
*/
/**
* Default translation ids
* @constant
@ -37,6 +33,10 @@
*/
export let ref = null;
/**
* @typedef {"clearAll" | "clearSelection"} ListBoxSelectionTranslationId
*/
import { createEventDispatcher, getContext } from "svelte";
import Close16 from "carbon-icons-svelte/lib/Close16";