mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
build: add script to generate component index
- move typedefs for correct type parsing
This commit is contained in:
parent
c8b0b008c7
commit
5968e22bd9
14 changed files with 5518 additions and 207 deletions
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue