mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23:02 +00:00
chore: upgrade carbon-icons-svelte to v11
This commit is contained in:
parent
ab04f5900d
commit
d4a55ef4ce
15 changed files with 41 additions and 45 deletions
|
@ -28,7 +28,7 @@
|
||||||
"autoprefixer": "^10.4.4",
|
"autoprefixer": "^10.4.4",
|
||||||
"carbon-components": "10.56.0",
|
"carbon-components": "10.56.0",
|
||||||
"carbon-components-10.47": "npm:carbon-components@10.47",
|
"carbon-components-10.47": "npm:carbon-components@10.47",
|
||||||
"carbon-icons-svelte": "^10.45.1",
|
"carbon-icons-svelte": "^11.0.1",
|
||||||
"husky": "^4.3.8",
|
"husky": "^4.3.8",
|
||||||
"lint-staged": "^10.5.3",
|
"lint-staged": "^10.5.3",
|
||||||
"postcss": "^8.4.12",
|
"postcss": "^8.4.12",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Button } from "../types";
|
import { Button } from "../types";
|
||||||
import Add16 from "carbon-icons-svelte/lib/Add16";
|
import Add from "carbon-icons-svelte/lib/Add.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Button>Primary button</Button>
|
<Button>Primary button</Button>
|
||||||
|
@ -17,10 +17,10 @@
|
||||||
|
|
||||||
<Button kind="danger-ghost">Danger ghost button</Button>
|
<Button kind="danger-ghost">Danger ghost button</Button>
|
||||||
|
|
||||||
<Button icon="{Add16}">With icon</Button>
|
<Button icon="{Add}">With icon</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
icon="{Add16}"
|
icon="{Add}"
|
||||||
tooltipPosition="bottom"
|
tooltipPosition="bottom"
|
||||||
tooltipAlignment="center"
|
tooltipAlignment="center"
|
||||||
iconDescription="Tooltip text"
|
iconDescription="Tooltip text"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Button, ButtonSet } from "../types";
|
import { Button, ButtonSet } from "../types";
|
||||||
import Login16 from "carbon-icons-svelte/lib/Login16";
|
import Login from "carbon-icons-svelte/lib/Login.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ButtonSet>
|
<ButtonSet>
|
||||||
|
@ -9,6 +9,6 @@
|
||||||
</ButtonSet>
|
</ButtonSet>
|
||||||
|
|
||||||
<ButtonSet stacked>
|
<ButtonSet stacked>
|
||||||
<Button icon="{Login16}">Log in</Button>
|
<Button icon="{Login}">Log in</Button>
|
||||||
<Button kind="ghost">Sign up</Button>
|
<Button kind="ghost">Sign up</Button>
|
||||||
</ButtonSet>
|
</ButtonSet>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { ContentSwitcher, Switch } from "../types";
|
import { ContentSwitcher, Switch } from "../types";
|
||||||
import Analytics16 from "carbon-icons-svelte/lib/Analytics16";
|
import Analytics from "carbon-icons-svelte/lib/Analytics.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ContentSwitcher size="xl" selectedIndex="{1}">
|
<ContentSwitcher size="xl" selectedIndex="{1}">
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
<Switch text="Trending" />
|
<Switch text="Trending" />
|
||||||
<Switch>
|
<Switch>
|
||||||
<div style="display: flex; align-items: center;">
|
<div style="display: flex; align-items: center;">
|
||||||
<Analytics16 style="margin-right: 0.5rem;" />
|
<Analytics style="margin-right: 0.5rem;" />
|
||||||
Trending
|
Trending
|
||||||
</div>
|
</div>
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
ContextMenuRadioGroup,
|
ContextMenuRadioGroup,
|
||||||
ContextMenuGroup,
|
ContextMenuGroup,
|
||||||
} from "../types";
|
} from "../types";
|
||||||
import CopyFile16 from "carbon-icons-svelte/lib/CopyFile16";
|
import CopyFile from "carbon-icons-svelte/lib/CopyFile.svelte";
|
||||||
import Cut16 from "carbon-icons-svelte/lib/Cut16";
|
import Cut from "carbon-icons-svelte/lib/Cut.svelte";
|
||||||
|
|
||||||
let selectedId = "0";
|
let selectedId = "0";
|
||||||
let selectedIds = [];
|
let selectedIds = [];
|
||||||
|
@ -21,14 +21,9 @@
|
||||||
indented
|
indented
|
||||||
labelText="Copy"
|
labelText="Copy"
|
||||||
shortcutText="⌘C"
|
shortcutText="⌘C"
|
||||||
icon="{CopyFile16}"
|
icon="{CopyFile}"
|
||||||
/>
|
|
||||||
<ContextMenuOption
|
|
||||||
indented
|
|
||||||
labelText="Cut"
|
|
||||||
shortcutText="⌘X"
|
|
||||||
icon="{Cut16}"
|
|
||||||
/>
|
/>
|
||||||
|
<ContextMenuOption indented labelText="Cut" shortcutText="⌘X" icon="{Cut}" />
|
||||||
<ContextMenuDivider />
|
<ContextMenuDivider />
|
||||||
<ContextMenuOption indented labelText="Export as">
|
<ContextMenuOption indented labelText="Export as">
|
||||||
<ContextMenuGroup labelText="Export options" bind:selectedIds>
|
<ContextMenuGroup labelText="Export options" bind:selectedIds>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
Link,
|
Link,
|
||||||
} from "../types";
|
} from "../types";
|
||||||
import type { DataTableHeader } from "../types/DataTable/DataTable.svelte";
|
import type { DataTableHeader } from "../types/DataTable/DataTable.svelte";
|
||||||
import Launch16 from "carbon-icons-svelte/lib/Launch16";
|
import Launch from "carbon-icons-svelte/lib/Launch.svelte";
|
||||||
|
|
||||||
const headers: DataTableHeader[] = [
|
const headers: DataTableHeader[] = [
|
||||||
{ key: "name", value: "Name" },
|
{ key: "name", value: "Name" },
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
{cell.value}
|
{cell.value}
|
||||||
<Launch16 />
|
<Launch />
|
||||||
</Link>
|
</Link>
|
||||||
{:else}{cell.value}{/if}
|
{:else}{cell.value}{/if}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
ToolbarBatchActions,
|
ToolbarBatchActions,
|
||||||
Button,
|
Button,
|
||||||
} from "../types";
|
} from "../types";
|
||||||
import Save16 from "carbon-icons-svelte/lib/Save16";
|
import Save from "carbon-icons-svelte/lib/Save.svelte";
|
||||||
|
|
||||||
const headers = [
|
const headers = [
|
||||||
{ key: "name", value: "Name" },
|
{ key: "name", value: "Name" },
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
<DataTable batchSelection bind:selectedRowIds headers="{headers}" rows="{rows}">
|
<DataTable batchSelection bind:selectedRowIds headers="{headers}" rows="{rows}">
|
||||||
<Toolbar>
|
<Toolbar>
|
||||||
<ToolbarBatchActions>
|
<ToolbarBatchActions>
|
||||||
<Button icon="{Save16}">Save</Button>
|
<Button icon="{Save}">Save</Button>
|
||||||
</ToolbarBatchActions>
|
</ToolbarBatchActions>
|
||||||
<ToolbarContent>
|
<ToolbarContent>
|
||||||
<ToolbarSearch />
|
<ToolbarSearch />
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
Row,
|
Row,
|
||||||
Column,
|
Column,
|
||||||
} from "../types";
|
} from "../types";
|
||||||
import SettingsAdjust20 from "carbon-icons-svelte/lib/SettingsAdjust20";
|
import SettingsAdjust from "carbon-icons-svelte/lib/SettingsAdjust.svelte";
|
||||||
import { quintOut } from "svelte/easing";
|
import { quintOut } from "svelte/easing";
|
||||||
|
|
||||||
let isSideNavOpen = false;
|
let isSideNavOpen = false;
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
<SkipToContent />
|
<SkipToContent />
|
||||||
</div>
|
</div>
|
||||||
<HeaderUtilities>
|
<HeaderUtilities>
|
||||||
<HeaderGlobalAction aria-label="Settings" icon="{SettingsAdjust20}" />
|
<HeaderGlobalAction aria-label="Settings" icon="{SettingsAdjust}" />
|
||||||
<HeaderAction
|
<HeaderAction
|
||||||
bind:isOpen
|
bind:isOpen
|
||||||
transition="{{ duration: 400, easing: quintOut }}"
|
transition="{{ duration: 400, easing: quintOut }}"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { OverflowMenu, OverflowMenuItem } from "../types";
|
import { OverflowMenu, OverflowMenuItem } from "../types";
|
||||||
import Add16 from "carbon-icons-svelte/lib/Add16";
|
import Add from "carbon-icons-svelte/lib/Add.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<OverflowMenu
|
<OverflowMenu
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
<OverflowMenuItem primaryFocus danger text="Delete service" />
|
<OverflowMenuItem primaryFocus danger text="Delete service" />
|
||||||
</OverflowMenu>
|
</OverflowMenu>
|
||||||
|
|
||||||
<OverflowMenu icon="{Add16}">
|
<OverflowMenu icon="{Add}">
|
||||||
<OverflowMenuItem text="Manage credentials" />
|
<OverflowMenuItem text="Manage credentials" />
|
||||||
<OverflowMenuItem
|
<OverflowMenuItem
|
||||||
href="https://cloud.ibm.com/docs/api-gateway/"
|
href="https://cloud.ibm.com/docs/api-gateway/"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
StructuredListRow,
|
StructuredListRow,
|
||||||
StructuredListInput,
|
StructuredListInput,
|
||||||
} from "../types";
|
} from "../types";
|
||||||
import CheckmarkFilled16 from "carbon-icons-svelte/lib/CheckmarkFilled16";
|
import CheckmarkFilled from "carbon-icons-svelte/lib/CheckmarkFilled.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<StructuredList>
|
<StructuredList>
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
name="row-{item}-name"
|
name="row-{item}-name"
|
||||||
/>
|
/>
|
||||||
<StructuredListCell>
|
<StructuredListCell>
|
||||||
<CheckmarkFilled16
|
<CheckmarkFilled
|
||||||
class="bx--structured-list-svg"
|
class="bx--structured-list-svg"
|
||||||
aria-label="select an option"
|
aria-label="select an option"
|
||||||
title="select an option"
|
title="select an option"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Tag } from "../types";
|
import { Tag } from "../types";
|
||||||
import Add16 from "carbon-icons-svelte/lib/Add16";
|
import Add from "carbon-icons-svelte/lib/Add.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Tag class="my-class" style="margin: 1rem;">IBM Cloud</Tag>
|
<Tag class="my-class" style="margin: 1rem;">IBM Cloud</Tag>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
<Tag filter on:click on:close>Filterable</Tag>
|
<Tag filter on:click on:close>Filterable</Tag>
|
||||||
|
|
||||||
<Tag icon="{Add16}">Custom icon</Tag>
|
<Tag icon="{Add}">Custom icon</Tag>
|
||||||
|
|
||||||
<Tag interactive>Text</Tag>
|
<Tag interactive>Text</Tag>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Tooltip, Link, Button } from "../types";
|
import { Tooltip, Link, Button } from "../types";
|
||||||
import Catalog16 from "carbon-icons-svelte/lib/Catalog16";
|
import Catalog from "carbon-icons-svelte/lib/Catalog.svelte";
|
||||||
|
|
||||||
let open = true;
|
let open = true;
|
||||||
</script>
|
</script>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
<Button size="small">Manage</Button>
|
<Button size="small">Manage</Button>
|
||||||
|
|
||||||
<Tooltip triggerText="Resource list" icon="{Catalog16}">
|
<Tooltip triggerText="Resource list" icon="{Catalog}">
|
||||||
<p>Resources are provisioned based on your account's organization.</p>
|
<p>Resources are provisioned based on your account's organization.</p>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,33 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { TooltipIcon } from "../types";
|
import { TooltipIcon } from "../types";
|
||||||
import Carbon24 from "carbon-icons-svelte/lib/Carbon24";
|
import Carbon from "carbon-icons-svelte/lib/Carbon.svelte";
|
||||||
import Filter20 from "carbon-icons-svelte/lib/Filter20";
|
import Filter from "carbon-icons-svelte/lib/Filter.svelte";
|
||||||
|
import FilterReset from "carbon-icons-svelte/lib/FilterReset.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<TooltipIcon tooltipText="Carbon is an open source design system by IBM.">
|
<TooltipIcon tooltipText="Carbon is an open source design system by IBM.">
|
||||||
<Carbon24 />
|
<Carbon />
|
||||||
</TooltipIcon>
|
</TooltipIcon>
|
||||||
|
|
||||||
<TooltipIcon tooltipText="Top start" direction="top" align="start">
|
<TooltipIcon tooltipText="Top start" direction="top" align="start">
|
||||||
<Filter20 />
|
<Filter />
|
||||||
</TooltipIcon>
|
</TooltipIcon>
|
||||||
|
|
||||||
<TooltipIcon tooltipText="Right end" direction="right" align="end">
|
<TooltipIcon tooltipText="Right end" direction="right" align="end">
|
||||||
<Filter20 />
|
<Filter />
|
||||||
</TooltipIcon>
|
</TooltipIcon>
|
||||||
|
|
||||||
<TooltipIcon tooltipText="Bottom start" direction="bottom" align="start">
|
<TooltipIcon tooltipText="Bottom start" direction="bottom" align="start">
|
||||||
<Filter20 />
|
<FilterReset />
|
||||||
</TooltipIcon>
|
</TooltipIcon>
|
||||||
|
|
||||||
<TooltipIcon tooltipText="Left start" direction="left" align="start">
|
<TooltipIcon tooltipText="Left start" direction="left" align="start">
|
||||||
<Filter20 />
|
<FilterReset />
|
||||||
</TooltipIcon>
|
</TooltipIcon>
|
||||||
|
|
||||||
<TooltipIcon>
|
<TooltipIcon>
|
||||||
<span slot="text" style="color: red"
|
<span slot="text" style="color: red"
|
||||||
>Carbon is an open source design system by IBM.</span
|
>Carbon is an open source design system by IBM.</span
|
||||||
>
|
>
|
||||||
<Carbon24 />
|
<Carbon />
|
||||||
</TooltipIcon>
|
</TooltipIcon>
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { TreeView } from "../types";
|
import { TreeView } from "../types";
|
||||||
import type { TreeNodeId } from "../types/TreeView/TreeView.svelte";
|
import type { TreeNodeId } from "../types/TreeView/TreeView.svelte";
|
||||||
import Analytics16 from "carbon-icons-svelte/lib/Analytics16";
|
import Analytics from "carbon-icons-svelte/lib/Analytics.svelte";
|
||||||
|
|
||||||
let treeview: TreeView;
|
let treeview: TreeView;
|
||||||
let activeId: TreeNodeId = "";
|
let activeId: TreeNodeId = "";
|
||||||
let selectedIds = [];
|
let selectedIds = [];
|
||||||
let expandedIds = [1];
|
let expandedIds = [1];
|
||||||
let children = [
|
let children = [
|
||||||
{ id: 0, text: "AI / Machine learning", icon: Analytics16 },
|
{ id: 0, text: "AI / Machine learning", icon: Analytics },
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
text: "Analytics",
|
text: "Analytics",
|
||||||
|
|
|
@ -479,10 +479,10 @@ carbon-components@10.56.0:
|
||||||
lodash.debounce "^4.0.8"
|
lodash.debounce "^4.0.8"
|
||||||
warning "^3.0.0"
|
warning "^3.0.0"
|
||||||
|
|
||||||
carbon-icons-svelte@^10.45.1:
|
carbon-icons-svelte@^11.0.1:
|
||||||
version "10.45.1"
|
version "11.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/carbon-icons-svelte/-/carbon-icons-svelte-10.45.1.tgz#210b8d8906bbdc4611dbc06f1030bca26169c2d9"
|
resolved "https://registry.yarnpkg.com/carbon-icons-svelte/-/carbon-icons-svelte-11.0.1.tgz#65b09832e9e0fa899d631564323e92e6ab878930"
|
||||||
integrity sha512-Uz3byPkSBzjpvLmjt/ZWYJkQG1omfqKh1vzF1FeFYOYqbGOCwc4sHbyF8oet2CseT2cECn1BbEyY4yWvlWYd/w==
|
integrity sha512-0CCJLmHW3yJ8T9DM2HNGQx304b2VLGY13Xeg6T1cJWeU2oTPIvBbTfveChIULBBI9FIFGLB9m8ZZgeYWEjAAew==
|
||||||
|
|
||||||
chalk@^2.0.0:
|
chalk@^2.0.0:
|
||||||
version "2.4.2"
|
version "2.4.2"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue