Merge branch 'carbon-design-system:master' into patch-1

This commit is contained in:
Pierre 2023-04-13 23:47:15 +02:00 committed by GitHub
commit b2db84b564
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 81 additions and 83 deletions

View file

@ -22,7 +22,7 @@
"prism-svelte": "^0.4.7",
"prismjs": "^1.28.0",
"remark-slug": "^6.0.0",
"svelte": "^3.49.0",
"svelte": "^3.57.0",
"vite": "^3.0.9"
},
"routify": {

View file

@ -10551,6 +10551,8 @@
"moduleExports": [],
"slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }],
"events": [
{ "type": "dispatched", "name": "select", "detail": "string" },
{ "type": "dispatched", "name": "deselect", "detail": "string" },
{ "type": "forwarded", "name": "click", "element": "label" },
{ "type": "forwarded", "name": "mouseover", "element": "label" },
{ "type": "forwarded", "name": "mouseenter", "element": "label" },

View file

@ -1,30 +0,0 @@
<script>
export let persist = false;
export let persistKey = "carbon-theme";
export const themes = ["white", "g10", "g80", "g90", "g100"];
import { onMount, afterUpdate } from "svelte";
import { theme } from "../store";
const isValidTheme = (value) => themes.includes(value);
onMount(() => {
try {
const persisted_theme = localStorage.getItem(persistKey);
if (isValidTheme(persisted_theme)) theme.set(persisted_theme);
} catch (e) {}
});
afterUpdate(() => {
if (isValidTheme($theme)) {
document.documentElement.setAttribute("theme", $theme);
if (persist) {
try {
localStorage.setItem(persistKey, $theme);
} catch (e) {}
}
}
});
</script>
<slot />

View file

@ -33,6 +33,11 @@ html[theme="g90"] .code-override {
overflow-x: auto;
}
/* Addig this to the layout grid fixes overstretching. */
.fix-overflow {
min-width: 0;
}
.token.tag,
.token.operator {
color: #6ea6ff;
@ -167,16 +172,6 @@ html[theme="g90"] .code-override {
margin-bottom: var(--cds-layout-01);
}
.table {
position: sticky;
max-height: calc(100vh - 3rem);
top: 3rem;
padding-top: var(--cds-spacing-05);
padding-bottom: var(--cds-spacing-05);
padding-left: var(--cds-spacing-08);
overflow-y: auto;
}
.code-01 {
font-size: var(--cds-code-01-font-size);
font-weight: var(--cds-code-01-font-weight);

View file

@ -66,7 +66,7 @@
</script>
<Content data-components>
<Grid>
<Grid class="fix-overflow">
<Row>
<Column>
<h1>{component}</h1>

View file

@ -12,10 +12,11 @@
SideNav,
SideNavItems,
SideNavMenuItem,
Theme,
Tag,
} from "carbon-components-svelte";
import LogoGithub from "carbon-icons-svelte/lib/LogoGithub.svelte";
import Theme from "../components/Theme.svelte";
import { theme } from "../store";
const deprecated = [];
const new_components = [];
@ -38,7 +39,7 @@
<!-- routify:options bundle=true -->
<svelte:window bind:innerWidth />
<Theme persist>
<Theme persist bind:theme="{$theme}">
<Header
aria-label="Navigation"
href="{$url('/')}"

View file

@ -9,17 +9,17 @@ components: ["Slider", "SliderSkeleton"]
## Default
<Slider />
<Slider labelText="Instances" value={0} />
## Full width
Set `fullWidth` to `true` for the slider to span the full width of its containing element.
<Slider fullWidth />
<Slider labelText="Instances" fullWidth value={0} />
## Hidden text input
<Slider hideTextInput />
<Slider labelText="Instances" hideTextInput value={0} />
## Custom minimum, maximum values

View file

@ -41,7 +41,7 @@
## Custom icon
Note: rendering a custom icon cannnot be used with the filterable variant.
Note: rendering a custom icon cannot be used with the filterable variant.
<Tag icon={IbmCloud}>IBM Cloud</Tag>

View file

@ -12,7 +12,7 @@ The `Theme` component can dyanmically update the Carbon theme on the client-side
</InlineNotification>
The `all.css` StyleSheet uses [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) for dynamic theming.
<CodeSnippet svx-ignore {code} />
## Default

View file

@ -165,7 +165,7 @@ bufferutil@^4.0.1:
node-gyp-build "~3.7.0"
carbon-components-svelte@../:
version "0.70.1"
version "0.73.3"
dependencies:
flatpickr "4.6.9"
@ -1280,10 +1280,10 @@ svelte-hmr@^0.14.12:
resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.12.tgz#a127aec02f1896500b10148b2d4d21ddde39973f"
integrity sha512-4QSW/VvXuqVcFZ+RhxiR8/newmwOCTlbYIezvkeN6302YFRE8cXy0naamHcjz8Y9Ce3ITTZtrHrIL0AGfyo61w==
svelte@^3.49.0:
version "3.49.0"
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029"
integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA==
svelte@^3.57.0:
version "3.57.0"
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.57.0.tgz#a3969cfe51f25f2a55e75f7b98dbd02c3af0980b"
integrity sha512-WMXEvF+RtAaclw0t3bPDTUe19pplMlfyKDsixbHQYgCWi9+O9VN0kXU1OppzrB9gPAvz4NALuoca2LfW2bOjTQ==
symbol-tree@^3.2.4:
version "3.2.4"