Fix a11y-mouse-events warning, update docs (#765)

* docs: update number of available Carbon icons

* docs: add svelte:head example for loading CDN styles

* chore(deps-dev): upgrade svelte to 3.40.1

* fix(a11y): disable a11y-mouse-events-have-key-events warning #760

* fix(deps): upgrade carbon-icons-svelte to v10.36.0 to avoid a11y warnings #760

* refactor(overflow-menu): remove formatStyle utility

* docs: links in paragraphs should be inline

* docs: add note on using all styles for dynamic theming
This commit is contained in:
Eric 2021-07-26 08:40:05 -07:00 committed by GitHub
commit 6db4112b40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
86 changed files with 161 additions and 28 deletions

View file

@ -64,8 +64,6 @@
import OverflowMenuVertical16 from "carbon-icons-svelte/lib/OverflowMenuVertical16/OverflowMenuVertical16.svelte";
import OverflowMenuHorizontal16 from "carbon-icons-svelte/lib/OverflowMenuHorizontal16/OverflowMenuHorizontal16.svelte";
import { formatStyle } from "./formatStyle";
const ctxBreadcrumbItem = getContext("BreadcrumbItem");
const dispatch = createEventDispatcher();
const items = writable([]);
@ -155,10 +153,11 @@
$: if ($items[$currentIndex]) {
focusedId.set($items[$currentIndex].id);
}
$: dynamicPseudoWidth = `#${id} .bx--overflow-menu-options.bx--overflow-menu-options:after {
$: styles = `<style>
#${id} .bx--overflow-menu-options.bx--overflow-menu-options:after {
width: ${buttonWidth ? buttonWidth + "px" : "2rem"};
}`;
$: styles = formatStyle(dynamicPseudoWidth);
}
<\/style>`;
</script>
<svelte:head>
@ -174,6 +173,7 @@
}}"
/>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<button
bind:this="{buttonRef}"
type="button"