mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 11:11:25 +00:00
Inline carbon icons, remove carbon-icons-svelte
from dependencies (#904)
* feat(icons): inline carbon icons used by components * feat(icons): update svelte components to use inlined carbon icons * breaking(deps): remove carbon-icons-svelte * chore(deps-dev): install carbon-icons-svelte as a devDependency
This commit is contained in:
parent
4df812bc3f
commit
040e3d3372
90 changed files with 2077 additions and 58 deletions
49
src/icons/ChevronRight16.svelte
Normal file
49
src/icons/ChevronRight16.svelte
Normal file
|
@ -0,0 +1,49 @@
|
|||
<script>
|
||||
let className = undefined;
|
||||
export { className as class };
|
||||
export let id = undefined;
|
||||
export let tabindex = undefined;
|
||||
export let focusable = false;
|
||||
export let title = undefined;
|
||||
export let style = undefined;
|
||||
|
||||
$: ariaLabel = $$props["aria-label"];
|
||||
$: ariaLabelledBy = $$props["aria-labelledby"];
|
||||
$: labelled = ariaLabel || ariaLabelledBy || title;
|
||||
$: attributes = {
|
||||
"aria-label": ariaLabel,
|
||||
"aria-labelledby": ariaLabelledBy,
|
||||
"aria-hidden": labelled ? undefined : true,
|
||||
role: labelled ? "img" : undefined,
|
||||
focusable: tabindex === "0" ? true : focusable,
|
||||
tabindex,
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
|
||||
<svg
|
||||
data-carbon-icon="ChevronRight16"
|
||||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave
|
||||
on:keyup
|
||||
on:keydown
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 16 16"
|
||||
fill="currentColor"
|
||||
width="16"
|
||||
height="16"
|
||||
class="{className}"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
style="{style}"
|
||||
id="{id}"
|
||||
{...attributes}
|
||||
>
|
||||
<path d="M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"></path>
|
||||
<slot>
|
||||
{#if title}
|
||||
<title>{title}</title>
|
||||
{/if}
|
||||
</slot>
|
||||
</svg>
|
Loading…
Add table
Add a link
Reference in a new issue