fix(ui,icons,ui-preset): Fix CodeBlock and Command components (#10369)

This commit is contained in:
Kasper Fabricius Kristensen
2024-11-29 17:30:25 +01:00
committed by GitHub
parent 5719e825ca
commit 94f6265dfc
64 changed files with 1659 additions and 479 deletions
@@ -233,37 +233,6 @@ export const theme = {
}
}
},
"fg": {
"disabled": {
"DEFAULT": "var(--fg-disabled)"
},
"muted": {
"DEFAULT": "var(--fg-muted)"
},
"on": {
"color": {
"DEFAULT": "var(--fg-on-color)"
},
"inverted": {
"DEFAULT": "var(--fg-on-inverted)"
}
},
"interactive": {
"hover": {
"DEFAULT": "var(--fg-interactive-hover)"
},
"DEFAULT": "var(--fg-interactive)"
},
"error": {
"DEFAULT": "var(--fg-error)"
},
"subtle": {
"DEFAULT": "var(--fg-subtle)"
},
"base": {
"DEFAULT": "var(--fg-base)"
}
},
"button": {
"inverted": {
"pressed": {
@@ -301,6 +270,37 @@ export const theme = {
"DEFAULT": "var(--button-neutral-pressed)"
}
}
},
"fg": {
"on": {
"color": {
"DEFAULT": "var(--fg-on-color)"
},
"inverted": {
"DEFAULT": "var(--fg-on-inverted)"
}
},
"interactive": {
"hover": {
"DEFAULT": "var(--fg-interactive-hover)"
},
"DEFAULT": "var(--fg-interactive)"
},
"error": {
"DEFAULT": "var(--fg-error)"
},
"subtle": {
"DEFAULT": "var(--fg-subtle)"
},
"base": {
"DEFAULT": "var(--fg-base)"
},
"disabled": {
"DEFAULT": "var(--fg-disabled)"
},
"muted": {
"DEFAULT": "var(--fg-muted)"
}
}
}
},
@@ -315,7 +315,6 @@ export const theme = {
"buttons-danger": "var(--buttons-danger)",
"buttons-inverted-focus": "var(--buttons-inverted-focus)",
"elevation-card-hover": "var(--elevation-card-hover)",
"buttons-inverted": "var(--buttons-inverted)",
"details-switch-handle": "var(--details-switch-handle)",
"buttons-neutral": "var(--buttons-neutral)",
"borders-base": "var(--borders-base)",
@@ -327,7 +326,8 @@ export const theme = {
"elevation-tooltip": "var(--elevation-tooltip)",
"elevation-modal": "var(--elevation-modal)",
"elevation-commandbar": "var(--elevation-commandbar)",
"elevation-code-block": "var(--elevation-code-block)"
"elevation-code-block": "var(--elevation-code-block)",
"buttons-inverted": "var(--buttons-inverted)"
}
}
}
@@ -104,7 +104,6 @@ export const colors = {
"--tag-neutral-text": "rgba(82, 82, 91, 1)",
"--tag-red-text": "rgba(159, 18, 57, 1)",
"--contrast-bg-base": "rgba(24, 24, 27, 1)",
"--fg-disabled": "rgba(212, 212, 216, 1)",
"--border-strong": "rgba(212, 212, 216, 1)",
"--contrast-border-base": "rgba(255, 255, 255, 0.15)",
"--bg-field": "rgba(250, 250, 250, 1)",
@@ -115,7 +114,6 @@ export const colors = {
"--contrast-bg-subtle": "rgba(39, 39, 42, 1)",
"--bg-highlight": "rgba(239, 246, 255, 1)",
"--contrast-fg-secondary": "rgba(255, 255, 255, 0.56)",
"--fg-muted": "rgba(161, 161, 170, 1)",
"--tag-red-bg": "rgba(255, 228, 230, 1)",
"--button-transparent": "rgba(255, 255, 255, 0)",
"--button-danger-pressed": "rgba(159, 18, 57, 1)",
@@ -177,6 +175,8 @@ export const colors = {
"--tag-orange-bg": "rgba(255, 237, 213, 1)",
"--fg-base": "rgba(24, 24, 27, 1)",
"--contrast-border-top": "rgba(24, 24, 27, 1)",
"--bg-overlay": "rgba(24, 24, 27, 0.4)"
"--bg-overlay": "rgba(24, 24, 27, 0.4)",
"--fg-disabled": "rgba(161, 161, 170, 1)",
"--fg-muted": "rgba(113, 113, 122, 1)"
}
}
@@ -35,7 +35,6 @@ export const effects = {
"--buttons-danger": "0px 0.75px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px 0px rgba(190, 18, 60, 0.4), 0px 0px 0px 1px rgba(190, 18, 60, 1)",
"--buttons-inverted-focus": "0px 0.75px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px 0px rgba(0, 0, 0, 0.4), 0px 0px 0px 1px rgba(24, 24, 27, 1), 0px 0px 0px 2px rgba(255, 255, 255, 1), 0px 0px 0px 4px rgba(59, 130, 246, 0.6)",
"--elevation-card-hover": "0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 1px 2px -1px rgba(0, 0, 0, 0.08), 0px 2px 8px 0px rgba(0, 0, 0, 0.1)",
"--buttons-inverted": "0px 0.75px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px 0px rgba(0, 0, 0, 0.4), 0px 0px 0px 1px rgba(24, 24, 27, 1)",
"--details-switch-handle": "0px 0px 2px 1px rgba(255, 255, 255, 1) inset, 0px 1px 0px 0px rgba(255, 255, 255, 1) inset, 0px 0px 0px 0.5px rgba(0, 0, 0, 0.02), 0px 5px 4px 0px rgba(0, 0, 0, 0.02), 0px 3px 3px 0px rgba(0, 0, 0, 0.04), 0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 0px 1px 0px rgba(0, 0, 0, 0.08)",
"--buttons-neutral": "0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 0px 0px 1px rgba(0, 0, 0, 0.08)",
"--borders-base": "0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 0px 0px 1px rgba(0, 0, 0, 0.08)",
@@ -47,6 +46,7 @@ export const effects = {
"--elevation-tooltip": "0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 2px 4px 0px rgba(0, 0, 0, 0.08), 0px 4px 8px 0px rgba(0, 0, 0, 0.08)",
"--elevation-modal": "0px 0px 0px 1px rgba(255, 255, 255, 1) inset, 0px 0px 0px 1.5px rgba(228, 228, 231, 0.6) inset, 0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 8px 16px 0px rgba(0, 0, 0, 0.08), 0px 16px 32px 0px rgba(0, 0, 0, 0.08)",
"--elevation-commandbar": "0px 0px 0px 1px rgba(39, 39, 42, 1) inset, 0px 0px 0px 1.5px rgba(255, 255, 255, 0.3) inset, 0px 8px 16px 0px rgba(0, 0, 0, 0.08), 0px 16px 32px 0px rgba(0, 0, 0, 0.08)",
"--elevation-code-block": "0px 0px 0px 1px rgba(24, 24, 27, 1) inset, 0px 0px 0px 1.5px rgba(255, 255, 255, 0.2) inset"
"--elevation-code-block": "0px 0px 0px 1px rgba(24, 24, 27, 1) inset, 0px 0px 0px 1.5px rgba(255, 255, 255, 0.2) inset",
"--buttons-inverted": "0px 0.75px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px 0px rgba(0, 0, 0, 0.4), 0px 0px 0px 1px rgba(24, 24, 27, 1)"
}
}
@@ -1,13 +1,25 @@
export const typography = {
".txt-compact-xlarge-plus": {
"fontSize": "1.125rem",
"lineHeight": "1.25rem",
".h1-webs": {
"fontSize": "4rem",
"lineHeight": "4.400000095367432rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h1-webs": {
"fontSize": "4.5rem",
"lineHeight": "5.5rem",
".h2-webs": {
"fontSize": "3.5rem",
"lineHeight": "3.8500001430511475rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h3-webs": {
"fontSize": "2.5rem",
"lineHeight": "2.75rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".txt-compact-xlarge-plus": {
"fontSize": "1.125rem",
"lineHeight": "1.25rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
@@ -23,12 +35,6 @@ export const typography = {
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h1-core": {
"fontSize": "1.125rem",
"lineHeight": "1.75rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".txt-xlarge": {
"fontSize": "1.125rem",
"lineHeight": "1.6875rem",
@@ -47,66 +53,18 @@ export const typography = {
"fontWeight": "400",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h1-docs": {
"fontSize": "2rem",
"lineHeight": "2.75rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".txt-compact-large-plus": {
"fontSize": "1rem",
"lineHeight": "1.25rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h2-docs": {
"fontSize": "1.5rem",
"lineHeight": "2rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h4-webs": {
"fontSize": "1.125rem",
"lineHeight": "1.75rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".txt-medium": {
"fontSize": "0.875rem",
"lineHeight": "1.3125rem",
"fontWeight": "400",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h2-core": {
"fontSize": "1rem",
"lineHeight": "1.5rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h2-webs": {
"fontSize": "2rem",
"lineHeight": "2.75rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h3-core": {
"fontSize": "0.875rem",
"lineHeight": "1.25rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h3-docs": {
"fontSize": "1.125rem",
"lineHeight": "1.75rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h3-webs": {
"fontSize": "1.5rem",
"lineHeight": "2rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".txt-compact-large": {
"fontSize": "1rem",
"lineHeight": "1.25rem",
@@ -178,5 +136,59 @@ export const typography = {
"lineHeight": "1.5rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".code-label": {
"fontSize": "0.75rem",
"lineHeight": "1.25rem",
"fontWeight": "400",
"fontFamily": "Roboto Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace"
},
".h4-webs": {
"fontSize": "1.5rem",
"lineHeight": "1.875rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".code-body": {
"fontSize": "0.75rem",
"lineHeight": "1.125rem",
"fontWeight": "400",
"fontFamily": "Roboto Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace"
},
".h2-core": {
"fontSize": "1rem",
"lineHeight": "1.5rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h3-core": {
"fontSize": "0.875rem",
"lineHeight": "1.25rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h1-core": {
"fontSize": "1.125rem",
"lineHeight": "1.75rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h1-docs": {
"fontSize": "1.5rem",
"lineHeight": "1.875rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h2-docs": {
"fontSize": "1.125rem",
"lineHeight": "1.6875rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
},
".h3-docs": {
"fontSize": "1rem",
"lineHeight": "1.5rem",
"fontWeight": "500",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
}
}