diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 10a20645..26022769 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -4193,15 +4193,15 @@ export type CarbonTheme = "white" | "g10" | "g80" | "g90" | "g100"; ### Props -| Prop name | Required | Kind | Reactive | Type | Default value | Description | -| :--------- | :------- | :--------------- | :------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -| theme | No | let | Yes | CarbonTheme | "white" | Set the current Carbon theme | -| tokens | No | let | No | { [token: string]: any; } | {} | Customize a theme with your own tokens
@see https://carbondesignsystem.com/guidelines/themes/overview#customizing-a-theme | -| persist | No | let | No | boolean | false | Set to `true` to persist the theme using window.localStorage | -| persistKey | No | let | No | string | "theme" | Specify the local storage key | -| render | No | let | No | "toggle" | "select" | undefined | Render a toggle or select dropdown to control the theme | -| toggle | No | let | No | import("../Toggle/Toggle").ToggleProps & { themes?: [labelA: CarbonTheme, labelB: CarbonTheme]; } | { themes: ["white", "g100"], labelA: "", labelB: "", labelText: "Dark mode", hideLabel: false, } | Override the default toggle props | -| select | No | let | No | import("../Select/Select").SelectProps & { themes?: CarbonTheme[]; } | { themes: themeKeys, labelText: "Themes", hideLabel: false, } | Override the default select props | +| Prop name | Required | Kind | Reactive | Type | Default value | Description | +| :--------- | :------- | :--------------- | :------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| theme | No | let | Yes | CarbonTheme | "white" | Set the current Carbon theme | +| tokens | No | let | No | { [token: string]: any; } | {} | Customize a theme with your own tokens
@see https://carbondesignsystem.com/guidelines/themes/overview#customizing-a-theme | +| persist | No | let | No | boolean | false | Set to `true` to persist the theme using window.localStorage | +| persistKey | No | let | No | string | "theme" | Specify the local storage key | +| render | No | let | No | "toggle" | "select" | undefined | Render a toggle or select dropdown to control the theme | +| toggle | No | let | No | import("../Toggle/Toggle.svelte").ToggleProps & { themes?: [labelA: CarbonTheme, labelB: CarbonTheme]; } | { themes: ["white", "g100"], labelA: "", labelB: "", labelText: "Dark mode", hideLabel: false, } | Override the default toggle props | +| select | No | let | No | import("../Select/Select.svelte").SelectProps & { themes?: CarbonTheme[]; } | { themes: themeKeys, labelText: "Themes", hideLabel: false, } | Override the default select props | ### Slots diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 5b54ad0a..f7672d1b 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -13198,7 +13198,7 @@ "name": "toggle", "kind": "let", "description": "Override the default toggle props", - "type": "import(\"../Toggle/Toggle\").ToggleProps & { themes?: [labelA: CarbonTheme, labelB: CarbonTheme]; }", + "type": "import(\"../Toggle/Toggle.svelte\").ToggleProps & { themes?: [labelA: CarbonTheme, labelB: CarbonTheme]; }", "value": "{ themes: [\"white\", \"g100\"], labelA: \"\", labelB: \"\", labelText: \"Dark mode\", hideLabel: false, }", "isFunction": false, "isFunctionDeclaration": false, @@ -13210,7 +13210,7 @@ "name": "select", "kind": "let", "description": "Override the default select props", - "type": "import(\"../Select/Select\").SelectProps & { themes?: CarbonTheme[]; }", + "type": "import(\"../Select/Select.svelte\").SelectProps & { themes?: CarbonTheme[]; }", "value": "{ themes: themeKeys, labelText: \"Themes\", hideLabel: false, }", "isFunction": false, "isFunctionDeclaration": false, diff --git a/src/Theme/Theme.svelte b/src/Theme/Theme.svelte index ee26f45d..89d00527 100644 --- a/src/Theme/Theme.svelte +++ b/src/Theme/Theme.svelte @@ -37,7 +37,7 @@ /** * Override the default toggle props - * @type {import("../Toggle/Toggle").ToggleProps & { themes?: [labelA: CarbonTheme, labelB: CarbonTheme]; }} + * @type {import("../Toggle/Toggle.svelte").ToggleProps & { themes?: [labelA: CarbonTheme, labelB: CarbonTheme]; }} */ export let toggle = { themes: ["white", "g100"], @@ -61,7 +61,7 @@ /** * Override the default select props - * @type {import("../Select/Select").SelectProps & { themes?: CarbonTheme[]; }} + * @type {import("../Select/Select.svelte").SelectProps & { themes?: CarbonTheme[]; }} */ export let select = { themes: themeKeys, diff --git a/types/Theme/Theme.svelte.d.ts b/types/Theme/Theme.svelte.d.ts index 3508711d..9a9e034d 100644 --- a/types/Theme/Theme.svelte.d.ts +++ b/types/Theme/Theme.svelte.d.ts @@ -38,7 +38,7 @@ export interface ThemeProps { * Override the default toggle props * @default { themes: ["white", "g100"], labelA: "", labelB: "", labelText: "Dark mode", hideLabel: false, } */ - toggle?: import("../Toggle/Toggle").ToggleProps & { + toggle?: import("../Toggle/Toggle.svelte").ToggleProps & { themes?: [labelA: CarbonTheme, labelB: CarbonTheme]; }; @@ -46,7 +46,9 @@ export interface ThemeProps { * Override the default select props * @default { themes: themeKeys, labelText: "Themes", hideLabel: false, } */ - select?: import("../Select/Select").SelectProps & { themes?: CarbonTheme[] }; + select?: import("../Select/Select.svelte").SelectProps & { + themes?: CarbonTheme[]; + }; } export default class Theme extends SvelteComponentTyped<