@master/internal-site 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/dist/astro.mjs +233 -47
- package/dist/config.d.mts +6 -0
- package/dist/localization-LfIbIysE.mjs +356 -0
- package/dist/localization.d.mts +69 -0
- package/dist/localization.mjs +1 -0
- package/package.json +12 -9
- package/src/astro/content-pages.ts +30 -11
- package/src/astro/index.ts +11 -5
- package/src/astro/localized-mdx.ts +45 -0
- package/src/astro/routes.template.ts +4 -0
- package/src/astro/site-context.ts +10 -2
- package/src/astro/style-assets.ts +107 -0
- package/src/benchmarks/BenchmarkBarRows.astro +3 -2
- package/src/benchmarks/BenchmarkBars.astro +1 -1
- package/src/benchmarks/BenchmarkChart.astro +5 -1
- package/src/benchmarks/BenchmarkChartGroup.astro +1 -1
- package/src/benchmarks/BenchmarkDataTable.astro +1 -1
- package/src/benchmarks/BenchmarkFigure.astro +2 -1
- package/src/benchmarks/BenchmarkMetricTable.astro +2 -2
- package/src/benchmarks/BenchmarkMetrics.astro +1 -1
- package/src/benchmarks/BenchmarkSampleSummary.astro +1 -1
- package/src/benchmarks/BenchmarkScrollRegion.svelte +2 -1
- package/src/benchmarks/BenchmarkSource.astro +1 -1
- package/src/benchmarks/BenchmarkStackedBars.astro +4 -3
- package/src/benchmarks/BenchmarkStatus.astro +3 -1
- package/src/benchmarks/localization.ts +22 -0
- package/src/benchmarks/types.ts +2 -0
- package/src/blog/article/BlogArticleContents.svelte +1 -1
- package/src/blog/article/BlogArticleEnd.astro +6 -9
- package/src/blog/article/BlogArticleMasthead.astro +17 -9
- package/src/config.ts +3 -0
- package/src/css/NamespaceUtilityTable.astro +1 -1
- package/src/css/ThemeNumberVariableTable.astro +1 -1
- package/src/css/foundation-data/specimen-content.ts +2 -2
- package/src/css/markdown.ts +64 -14
- package/src/demo/Demo.svelte +10 -4
- package/src/demo/DemoAsset.astro +6 -3
- package/src/demo/DemoAxes.svelte +4 -2
- package/src/demo/DemoCatalog.astro +9 -6
- package/src/demo/DemoComparison.svelte +3 -0
- package/src/demo/DemoContainer.svelte +8 -3
- package/src/demo/DemoControls.svelte +5 -1
- package/src/demo/DemoCopyButton.svelte +9 -4
- package/src/demo/DemoCopyGroup.svelte +6 -2
- package/src/demo/DemoExample.astro +3 -1
- package/src/demo/DemoFeatureSupport.svelte +5 -1
- package/src/demo/DemoGeneratedCSS.svelte +5 -1
- package/src/demo/DemoIndex.astro +6 -3
- package/src/demo/DemoLegend.svelte +3 -1
- package/src/demo/DemoMeasure.svelte +4 -2
- package/src/demo/DemoMedia.svelte +3 -1
- package/src/demo/DemoMotion.svelte +6 -3
- package/src/demo/DemoPaletteGroups.svelte +4 -2
- package/src/demo/DemoScrollArea.svelte +2 -0
- package/src/demo/DemoStyleComparison.astro +6 -3
- package/src/demo/DemoSurface.svelte +2 -0
- package/src/demo/DemoThemeComparison.astro +5 -2
- package/src/demo/DemoTokenTable.astro +5 -3
- package/src/demo/DemoViewTransition.astro +3 -1
- package/src/demo/DemoViewport.svelte +18 -11
- package/src/demo/DemoWaterfall.astro +4 -2
- package/src/demo/ProjectStyleExample.astro +4 -1
- package/src/demo/foundations/FoundationDialog.astro +6 -2
- package/src/demo/foundations/FoundationMedia.astro +1 -0
- package/src/demo/foundations/FoundationShrink.astro +1 -0
- package/src/demo/foundations/FoundationTokensView.astro +16 -5
- package/src/demo/foundations/Palette.svelte +11 -7
- package/src/demo/foundations/dialog-copy.d.ts +1 -0
- package/src/demo/foundations/dialog-copy.js +5 -0
- package/src/demo/illustration-materials.ts +1 -1
- package/src/demo/illustration.css +218 -0
- package/src/docs-shell/common/i18n.config.d.ts +1 -1
- package/src/docs-shell/common/i18n.config.js +4 -12
- package/src/docs-shell/common/locales.d.ts +8 -0
- package/src/docs-shell/common/locales.js +18 -0
- package/src/docs-shell/common/terminology.json +32 -0
- package/src/docs-shell/common/translations.d.ts +3 -0
- package/src/docs-shell/common/translations.js +294 -0
- package/src/docs-shell/components/ArticleHeader.astro +5 -3
- package/src/docs-shell/components/Callout.astro +1 -0
- package/src/docs-shell/components/CodeCopyButton.astro +5 -1
- package/src/docs-shell/components/CodeTabBar.astro +7 -3
- package/src/docs-shell/components/CodeTabs.astro +2 -1
- package/src/docs-shell/components/CodeView.astro +1 -1
- package/src/docs-shell/components/DocHeader.svelte +13 -17
- package/src/docs-shell/components/DocHeading.astro +3 -1
- package/src/docs-shell/components/DocMenuButton.svelte +126 -61
- package/src/docs-shell/components/DocSidebar.svelte +3 -2
- package/src/docs-shell/components/DocVersionSelect.svelte +2 -0
- package/src/docs-shell/components/DocumentAPIIndex.astro +1 -1
- package/src/docs-shell/components/DocumentChoices.astro +1 -1
- package/src/docs-shell/components/DocumentCodeExampleView.astro +3 -1
- package/src/docs-shell/components/DocumentCodeTable.astro +4 -2
- package/src/docs-shell/components/DocumentCopyButton.svelte +3 -0
- package/src/docs-shell/components/DocumentDisclosure.astro +2 -0
- package/src/docs-shell/components/DocumentFileTree.astro +3 -0
- package/src/docs-shell/components/DocumentFlow.astro +4 -1
- package/src/docs-shell/components/DocumentIllustration.astro +8 -12
- package/src/docs-shell/components/DocumentKeyList.astro +6 -4
- package/src/docs-shell/components/DocumentNamespaceTable.astro +5 -3
- package/src/docs-shell/components/DocumentOptionEntry.astro +0 -1
- package/src/docs-shell/components/DocumentOptionList.astro +1 -1
- package/src/docs-shell/components/DocumentOptions.astro +3 -2
- package/src/docs-shell/components/DocumentParameters.astro +1 -1
- package/src/docs-shell/components/DocumentPrompt.astro +2 -0
- package/src/docs-shell/components/DocumentValueList.astro +1 -1
- package/src/docs-shell/components/DocumentationIndex.svelte +8 -7
- package/src/docs-shell/components/ExpandContent.svelte +3 -0
- package/src/docs-shell/components/ExplorerView.astro +1 -0
- package/src/docs-shell/components/GeneratedCSS.astro +4 -1
- package/src/docs-shell/components/Header.svelte +1 -1
- package/src/docs-shell/components/InlineCode.astro +1 -0
- package/src/docs-shell/components/InteractingIndicator.astro +1 -0
- package/src/docs-shell/components/LanguageButton.svelte +1 -0
- package/src/docs-shell/components/LanguageSelect.svelte +2 -0
- package/src/docs-shell/components/Link.svelte +3 -2
- package/src/docs-shell/components/NotFound.astro +6 -4
- package/src/docs-shell/components/PMAction.astro +1 -0
- package/src/docs-shell/components/PageContent.svelte +1 -1
- package/src/docs-shell/components/PageContentDisclosure.astro +2 -1
- package/src/docs-shell/components/PageContentList.svelte +2 -0
- package/src/docs-shell/components/PageNavs.astro +3 -3
- package/src/docs-shell/components/SearchButton.svelte +3 -0
- package/src/docs-shell/components/SearchDialog.svelte +18 -16
- package/src/docs-shell/components/Segments.svelte +2 -0
- package/src/docs-shell/components/StepSection.astro +1 -2
- package/src/docs-shell/components/Tabs.astro +1 -0
- package/src/docs-shell/components/ThemeSelect.svelte +2 -0
- package/src/docs-shell/components/TimeAgo.svelte +6 -6
- package/src/docs-shell/components/markdown/Table.astro +1 -0
- package/src/docs-shell/components/markdown-components.ts +0 -1
- package/src/docs-shell/contexts/search.ts +1 -1
- package/src/docs-shell/factories/Page.astro +10 -5
- package/src/docs-shell/factories/create-page.ts +33 -6
- package/src/docs-shell/layouts/BlogArticle.astro +3 -11
- package/src/docs-shell/remark/markdown-components.js +28 -7
- package/src/docs-shell/remark/slug-and-toc.js +5 -7
- package/src/docs-shell/scripts/code.ts +5 -2
- package/src/docs-shell/scripts/document.ts +1 -1
- package/src/docs-shell/site.ts +9 -1
- package/src/docs-shell/types/Metadata.ts +11 -0
- package/src/docs-shell/utils/document-copy.d.ts +2 -0
- package/src/docs-shell/utils/document-copy.js +18 -0
- package/src/docs-shell/utils/generate-metadata.ts +5 -1
- package/src/docs-shell/utils/head.ts +5 -2
- package/src/docs-shell/utils/i18n-pathname.ts +13 -2
- package/src/docs-shell/utils/i18n.ts +4 -1
- package/src/docs-shell/utils/localized-metadata.ts +22 -0
- package/src/docs-shell/utils/markdown-links.ts +61 -0
- package/src/docs-shell/utils/markdown-tree.ts +19 -6
- package/src/docs-shell/utils/resolve-heading.d.ts +1 -0
- package/src/docs-shell/utils/resolve-heading.js +21 -0
- package/src/docs-shell/utils/search-pages.ts +75 -22
- package/src/examples/components/ArticleTransitionScene.svelte +4 -0
- package/src/examples/layout-system/page.astro +0 -1
- package/src/home/HomeBentoFrame.astro +1 -0
- package/src/home/HomeBentoGrid.astro +1 -0
- package/src/home/bento.css +167 -0
- package/src/home/design.css +1 -1
- package/src/home/hero.css +5 -0
- package/src/home/home.css +4 -576
- package/src/home/segmented-control.css +94 -0
- package/src/layouts/Document.astro +4 -2
- package/src/public/icons/json.svg +1 -0
- package/src/scripts/atomic-class-authoring.ts +98 -0
- package/src/scripts/localization.ts +239 -0
- package/src/scripts/mdx-sample.ts +12 -0
- package/src/scripts/static-social.ts +17 -3
- package/src/scripts/style-delivery.mjs +120 -0
- package/src/sections/blog.astro +1 -1
- package/src/sections/guide.astro +4 -3
- package/src/styles/blog-article.css +10 -7
- package/src/styles/blog-materials.css +13 -0
- package/src/styles/demo.css +0 -1
- package/src/styles/docs-shell/code.css +5 -61
- package/src/styles/docs-shell/documentation-search.css +1 -0
- package/src/styles/docs-shell/header.css +2 -73
- package/src/styles/docs-shell/menu.css +37 -17
- package/src/styles/docs-shell/page-content.css +2 -37
- package/src/styles/docs-shell/prose.css +18 -9
- package/src/styles/docs-shell/steps.css +2 -39
- package/src/styles/document-comparison.css +5 -2
- package/src/styles/documentation-illustration.css +1 -9
- package/src/styles/documentation-index.css +2 -1
- package/src/styles/documents.css +2 -4
- package/src/styles/interface.css +5 -3
- package/src/styles/system/DESIGN.md +34 -14
- package/src/styles/system/browser.css +21 -0
- package/src/styles/system/button-feedback.css +13 -0
- package/src/styles/system/callout.css +14 -0
- package/src/styles/system/chart.css +18 -0
- package/src/styles/system/checks.css +18 -0
- package/src/styles/system/code-panel.css +82 -0
- package/src/styles/system/code-tabs.css +40 -0
- package/src/styles/system/code.css +8 -85
- package/src/styles/system/compare.css +7 -0
- package/src/styles/system/controls.css +10 -109
- package/src/styles/system/copy.css +32 -0
- package/src/styles/system/data.css +10 -134
- package/src/styles/system/dialog.css +16 -0
- package/src/styles/system/disclosure.css +19 -0
- package/src/styles/system/expand.css +11 -0
- package/src/styles/system/fields.css +25 -0
- package/src/styles/system/header-core.css +101 -0
- package/src/styles/system/hint.css +5 -0
- package/src/styles/system/index.css +13 -0
- package/src/styles/system/inline-code.css +4 -0
- package/src/styles/system/kbd.css +4 -0
- package/src/styles/system/logos.css +10 -0
- package/src/styles/system/menu.css +14 -0
- package/src/styles/system/metrics.css +22 -0
- package/src/styles/system/pagehead.css +13 -0
- package/src/styles/system/pager.css +13 -0
- package/src/styles/system/parameters.css +17 -0
- package/src/styles/system/prompt.css +7 -0
- package/src/styles/system/prose.css +4 -75
- package/src/styles/system/range.css +12 -0
- package/src/styles/system/reading.css +44 -0
- package/src/styles/system/scroll.css +6 -0
- package/src/styles/system/search-trigger.css +10 -0
- package/src/styles/system/segmented.css +22 -0
- package/src/styles/system/sheet.css +8 -0
- package/src/styles/system/shell.css +8 -102
- package/src/styles/system/sidebar.css +14 -0
- package/src/styles/system/source.css +5 -0
- package/src/styles/system/specimens.css +3 -0
- package/src/styles/system/stage.css +18 -0
- package/src/styles/system/steps.css +51 -0
- package/src/styles/system/surfaces.css +8 -104
- package/src/styles/system/table.css +23 -0
- package/src/styles/system/toc.css +59 -0
- package/src/styles/system/tooltip.css +6 -0
- package/src/styles/system/tray-code.css +6 -0
- package/src/styles/system/tray.css +20 -0
- package/src/styles/system/tree.css +15 -0
- package/src/styles/system/waterfall.css +14 -0
- package/src/virtual.d.ts +5 -1
- package/src/blog/article/language.ts +0 -29
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* callout: owned component styles; shared definitions come from the foundation. */
|
|
2
|
+
@layer components {
|
|
3
|
+
.ui-callout code { padding: .125em .375em; border-radius: var(--ui-radius-xs); background: var(--ui-surface-chip); color: color-mix(in oklab, var(--ui-text-strong) 60%, var(--ui-text-body)); box-shadow: inset 0 0 0 1px var(--ui-line-hair); font: var(--ui-weight-regular) .84em/1 var(--font-family-mono); overflow-wrap: anywhere; }
|
|
4
|
+
.ui-callout { --tone: var(--ui-tone-neutral); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--ui-space-sm); padding: .875rem var(--ui-space-md); border-radius: var(--ui-radius-lg);
|
|
5
|
+
background: color-mix(in oklab, var(--tone) 2.5%, var(--ui-surface-canvas)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tone) 12%, var(--ui-line-contour)); color: var(--ui-text-body); font-size: var(--ui-text-small); line-height: var(--ui-leading-small); }
|
|
6
|
+
.ui-callout > svg { width: 1rem; height: 1rem; margin-top: .21875rem; color: color-mix(in oklab, var(--tone) 80%, var(--ui-text-strong)); }
|
|
7
|
+
.ui-callout > div { min-width: 0; overflow-wrap: anywhere; }
|
|
8
|
+
.ui-callout > div > :first-child { margin-top: 0; } .ui-callout > div > :last-child { margin-bottom: 0; }
|
|
9
|
+
.ui-callout b { color: var(--ui-text-strong); font-weight: var(--ui-weight-strong); }
|
|
10
|
+
.ui-callout[data-tone="info"] { --tone: var(--ui-status-info); }
|
|
11
|
+
.ui-callout[data-tone="success"], .ui-callout[data-tone="do"] { --tone: var(--ui-status-success); }
|
|
12
|
+
.ui-callout[data-tone="warning"] { --tone: var(--ui-status-warning); }
|
|
13
|
+
.ui-callout[data-tone="danger"], .ui-callout[data-tone="dont"] { --tone: var(--ui-status-danger); }
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* chart: owned component styles; shared definitions come from the foundation. */
|
|
2
|
+
@layer components {
|
|
3
|
+
.ui-chart { display: grid; gap: var(--ui-space-md); padding: var(--ui-space-lg); border-radius: var(--ui-radius-xl); @apply --ui-sheet-face; box-shadow: var(--ui-elevation-rise-1); }
|
|
4
|
+
.ui-chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--ui-space-xs) var(--ui-space-md); }
|
|
5
|
+
.ui-chart-head b { color: var(--ui-text-strong); font-size: var(--ui-text-small); font-weight: var(--ui-weight-strong); }
|
|
6
|
+
.ui-chart-head small { display: block; color: var(--ui-text-muted); font: var(--ui-weight-regular) var(--ui-text-caption)/1.5 var(--font-family-sans); font-variant-numeric: tabular-nums; }
|
|
7
|
+
.ui-chart-row { display: grid; grid-template-columns: minmax(6.5rem, 12rem) minmax(0, 1fr) minmax(4.5rem, auto); align-items: center; gap: var(--ui-space-xs) var(--ui-space-sm); font-size: .8125rem; }
|
|
8
|
+
.ui-chart-row > span:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--ui-space-xs); min-width: 0; color: var(--ui-text-strong); overflow-wrap: anywhere; }
|
|
9
|
+
.ui-chart-row > span:first-child > small { flex-basis: 100%; color: var(--ui-text-muted); font: var(--ui-weight-regular) .75rem/1.4 var(--font-family-sans); font-variant-numeric: tabular-nums; }
|
|
10
|
+
.ui-chart-row > output { color: var(--ui-text-body); font: var(--ui-weight-regular) .8125rem/1 var(--font-family-sans); text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
11
|
+
.ui-chart-row > .ui-legend { grid-column: 2 / -1; gap: 2px var(--ui-space-md); font-size: .75rem; }
|
|
12
|
+
.ui-chart-row > .ui-legend b { color: var(--ui-text-strong); font-weight: var(--ui-weight-medium); }
|
|
13
|
+
@media (width < 35rem) {
|
|
14
|
+
.ui-chart-row { grid-template-columns: minmax(0, 1fr) auto; }
|
|
15
|
+
.ui-chart-row > .ui-bar { grid-column: 1 / -1; grid-row: 2; }
|
|
16
|
+
.ui-chart-row > .ui-legend { grid-column: 1 / -1; }
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@prune native;
|
|
2
|
+
/* checks: owned component styles; shared definitions come from the foundation. */
|
|
3
|
+
@layer components {
|
|
4
|
+
.ui-check { display: inline-flex; align-items: center; gap: var(--ui-space-xs); color: var(--ui-text-strong); font-size: var(--ui-text-small); cursor: pointer; }
|
|
5
|
+
.ui-check > input:not(.ui-switch) { appearance: none; display: grid; place-items: center; flex: none; width: 1.125rem; height: 1.125rem; margin: 0; border-radius: var(--ui-radius-sm); background: var(--ui-surface-well); box-shadow: var(--ui-elevation-sink); cursor: pointer; transition: background-color var(--ui-duration-quick), box-shadow var(--ui-duration-quick); }
|
|
6
|
+
.ui-check > input:not(.ui-switch):not(:checked) { box-shadow: var(--ui-elevation-sink), inset 0 0 0 1px var(--ui-line-divider); }
|
|
7
|
+
.ui-check > input:not(.ui-switch)::after { content: ""; width: 10px; height: 10px; opacity: 0; background: var(--ui-text-inverse); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4.1 7.3 8 2.8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
|
|
8
|
+
.ui-check > input:not(.ui-switch):checked { background: var(--ui-surface-ink); box-shadow: inset 0 1px 0 light-dark(oklch(100% 0 none / .16), oklch(100% 0 none)), 0 0 0 1px light-dark(oklch(14% .003 265), oklch(0% 0 none / .5)); }
|
|
9
|
+
.ui-check > input:not(.ui-switch):checked::after { opacity: 1; }
|
|
10
|
+
.ui-check > input[type="radio"] { border-radius: 50%; }
|
|
11
|
+
.ui-check > input[type="radio"]::after { width: 6px; height: 6px; border-radius: 50%; mask: none; }
|
|
12
|
+
.ui-check > input:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; }
|
|
13
|
+
.ui-switch { position: relative; appearance: none; flex: none; width: 2.25rem; height: 1.375rem; margin: 0; border-radius: var(--ui-radius-pill); background: var(--ui-surface-well); box-shadow: var(--ui-elevation-sink); cursor: pointer; transition: background-color var(--ui-duration-base) var(--ui-ease); }
|
|
14
|
+
.ui-switch::before { content: ""; position: absolute; top: 3px; left: 3px; width: 1rem; height: 1rem; border-radius: 50%; background: linear-gradient(180deg, oklch(100% 0 none), oklch(96.5% .0011 265)); box-shadow: 0 0 0 1px var(--ui-line-contour), 0 1px 1px var(--ui-shade-1), 0 2px 3px -1px var(--ui-shade-2); transition: translate var(--ui-duration-base) var(--ui-ease); }
|
|
15
|
+
.ui-switch:checked { background: var(--ui-surface-ink); box-shadow: inset 0 1px 2px oklch(0% 0 none / .3); }
|
|
16
|
+
.ui-switch:checked::before { translate: .875rem 0; background: light-dark(linear-gradient(180deg, oklch(100% 0 none), oklch(96.5% .0011 265)), linear-gradient(180deg, oklch(26% .0024 265), oklch(20% .002 265))); }
|
|
17
|
+
.ui-switch:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; }
|
|
18
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* code-panel: owned component styles; shared definitions come from the foundation. */
|
|
2
|
+
@layer components {
|
|
3
|
+
.ui-code { position: relative; min-width: 0; overflow: hidden; border-radius: var(--ui-radius-xl); background: var(--ui-surface-code); color: var(--ui-code-text); box-shadow: inset 0 0 0 1px var(--ui-line-contour), 0 1px 0 var(--ui-lip); }
|
|
4
|
+
.ui-code { --code-corner: calc(var(--ui-space-md) + var(--ui-text-code) * var(--ui-leading-code) / 2 - 1rem); }
|
|
5
|
+
.ui-code-bar { display: flex; align-items: center; gap: var(--ui-space-xs); min-height: calc(var(--code-corner) + 2rem); padding: var(--code-corner) var(--code-corner) 0 var(--ui-space-md); }
|
|
6
|
+
.ui-code-bar > .ui-tabs { flex: 1; min-width: 0; margin-left: calc(var(--code-corner) - var(--ui-space-md)); }
|
|
7
|
+
.ui-code-file { display: inline-flex; align-items: center; gap: var(--ui-space-xs); flex: 1; min-width: 0; color: var(--ui-text-muted); font: var(--ui-weight-regular) .75rem/1 var(--font-family-mono); }
|
|
8
|
+
.ui-code-file svg { flex: none; width: 14px; height: 14px; }
|
|
9
|
+
.ui-code pre { margin: 0; padding: var(--ui-space-md) 0; overflow-x: auto; font: var(--ui-weight-regular) var(--ui-text-code)/var(--ui-leading-code) var(--font-family-mono); tab-size: 2; scrollbar-width: thin; }
|
|
10
|
+
.ui-code pre:focus-visible { @apply --ui-focus-ring; outline-offset: -4px; border-radius: var(--ui-radius-md); }
|
|
11
|
+
.ui-code:has(> .ui-code-bar) pre { padding-top: var(--ui-space-2xs); }
|
|
12
|
+
.ui-code-line { display: block; padding: 0 var(--ui-space-lg) 0 calc(var(--ui-space-md) + var(--code-diff-gutter, 0px)); }
|
|
13
|
+
.ui-code-line { min-height: 1lh; }
|
|
14
|
+
.ui-code[data-numbers] { counter-reset: line; }
|
|
15
|
+
.ui-code[data-numbers] .ui-code-line::before { counter-increment: line; content: counter(line); display: inline-block; width: 1.75rem; margin-right: var(--ui-space-sm); color: var(--ui-text-disabled); text-align: right; user-select: none; }
|
|
16
|
+
.ui-code-line[data-mark="active"] { background: var(--ui-code-active); box-shadow: inset 2px 0 0 var(--ui-line-mark); }
|
|
17
|
+
.ui-code-line[data-mark="added"] { background: var(--ui-code-added); box-shadow: inset 2px 0 0 color-mix(in oklab, var(--ui-status-success) 70%, transparent); }
|
|
18
|
+
.ui-code-line[data-mark="removed"] { background: var(--ui-code-removed); box-shadow: inset 2px 0 0 color-mix(in oklab, var(--ui-status-danger) 70%, transparent); }
|
|
19
|
+
.ui-code pre:has(.ui-code-line:is([data-mark="added"], [data-mark="removed"])) { --code-diff-gutter: calc(1ch + var(--ui-space-sm)); }
|
|
20
|
+
.ui-code-line:is([data-mark="added"], [data-mark="removed"]) { position: relative; min-width: min-content; }
|
|
21
|
+
.ui-code-line[data-mark="added"]::after, .ui-code-line[data-mark="removed"]::after { position: absolute; top: 0; left: var(--ui-space-md); width: 1ch; text-indent: 0; text-align: center; color: var(--ui-text-disabled); user-select: none; }
|
|
22
|
+
.ui-code-line[data-mark="added"]::after { content: "+"; }
|
|
23
|
+
.ui-code-line[data-mark="removed"]::after { content: "−"; }
|
|
24
|
+
.ui-code-line mark { padding: 1px 2px; border-radius: 3px; background: light-dark(oklch(22% .002 265 / .08), oklch(100% 0 none / .1)); color: inherit; box-shadow: inset 0 -1px 0 var(--ui-line-mark); }
|
|
25
|
+
.ui-code .t { color: var(--ui-code-function); } .ui-code .a { color: var(--ui-code-property); } .ui-code .s { color: var(--ui-code-string); }
|
|
26
|
+
.ui-code .p { color: var(--ui-code-punctuation); } .ui-code .k { color: var(--ui-code-keyword); } .ui-code .c { color: var(--ui-code-comment); font-style: italic; } .ui-code .n { color: var(--ui-code-number); }
|
|
27
|
+
.ui-code > .ui-disclosure { border-top: 1px solid var(--ui-line-hair); }
|
|
28
|
+
.ui-code > .ui-disclosure > summary { padding-inline: var(--ui-space-md); }
|
|
29
|
+
.ui-code > .ui-disclosure > pre { padding-top: 0; }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* Code panels (`ui-code`, styles/system/code.css) as the site renders them: Shiki lines are `ui-code-line` parts, the
|
|
35
|
+
* copy action sits in the bar or, without one, in the corner, and tab panels all show on paper and without scripts.
|
|
36
|
+
*/
|
|
37
|
+
@layer components {
|
|
38
|
+
/* The file's name keeps its width; a long result wraps in the room left beside the copy button. */
|
|
39
|
+
.ui-code-bar > .ui-code-file { flex: 1 0 auto; }
|
|
40
|
+
.ui-code-bar > .ui-copy { flex: 0 1 auto; min-width: 0; margin-left: auto; }
|
|
41
|
+
/* Without a bar the copy takes the panel's corner (`--code-corner`, code.css). A long line scrolls under it: the panel's own face fades in behind the button and runs to the edge, so code never runs through it. */
|
|
42
|
+
.ui-code > .ui-copy { position: absolute; z-index: 1; top: var(--code-corner); right: var(--code-corner); padding-left: var(--ui-space-sm); border-radius: var(--ui-radius-md); background: linear-gradient(90deg, transparent, var(--ui-surface-code) var(--ui-space-sm));
|
|
43
|
+
/* The face runs on to the panel's contour (1px short of the edge), so a scrolled line never shows again past the button. */
|
|
44
|
+
box-shadow: calc(var(--code-corner) - 1px) 0 0 var(--ui-surface-code); }
|
|
45
|
+
.ui-code:has(> .ui-copy) .ui-code-line { padding-right: 3rem; }
|
|
46
|
+
/* A shell command is read whole: it wraps under a hanging indent instead of hiding its flags behind the copy button. */
|
|
47
|
+
:is(.ui-code, [role="tabpanel"])[data-lang="bash"] > pre, .ui-code[data-lang="sh"] > pre, .ui-code[data-lang="shell"] > pre { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
48
|
+
:is(.ui-code, [role="tabpanel"])[data-lang="bash"] > pre .ui-code-line, .ui-code:is([data-lang="sh"], [data-lang="shell"]) > pre .ui-code-line { padding-left: calc(var(--ui-space-md) + var(--code-diff-gutter, 0px) + 2ch); text-indent: -2ch; }
|
|
49
|
+
/* Flags wrap whole: a token never breaks at its own hyphen, so `--yes` cannot split into `-` and `-yes`. */
|
|
50
|
+
:is(.ui-code, [role="tabpanel"])[data-lang="bash"] > pre .ui-code-line > span, .ui-code:is([data-lang="sh"], [data-lang="shell"]) > pre .ui-code-line > span { display: inline-block; text-indent: 0; }
|
|
51
|
+
/* Plain text, such as a prompt for an agent, is prose set in mono: it wraps at the panel like prose. */
|
|
52
|
+
:is(.ui-code, [role="tabpanel"])[data-lang="text"] > pre { white-space: pre-wrap; overflow-wrap: break-word; }
|
|
53
|
+
|
|
54
|
+
/* A Generated CSS disclosure right after its source closes the same panel: one frame, the output under a hairline,
|
|
55
|
+
as in a demo tray. Alone (after a table or a paragraph) it stays a quiet disclosure. */
|
|
56
|
+
.ui-prose > .ui-code:has(+ .ui-disclosure[data-generated]) { margin-bottom: 0; border-end-start-radius: 0; border-end-end-radius: 0; box-shadow: inset 1px 0 0 var(--ui-line-contour), inset -1px 0 0 var(--ui-line-contour), inset 0 1px 0 var(--ui-line-contour); }
|
|
57
|
+
.ui-prose > .ui-code + .ui-disclosure[data-generated] {
|
|
58
|
+
max-width: none; margin-top: 0; margin-inline: calc(var(--bleed) * -1); padding-inline: var(--ui-space-md);
|
|
59
|
+
border-radius: 0 0 var(--ui-radius-xl) var(--ui-radius-xl); background: var(--ui-surface-code);
|
|
60
|
+
box-shadow: inset 0 0 0 1px var(--ui-line-contour), 0 1px 0 var(--ui-lip);
|
|
61
|
+
}
|
|
62
|
+
.ui-prose > .ui-code + .ui-disclosure[data-generated] > summary { margin-inline: calc(var(--ui-space-md) * -1); padding-inline: var(--ui-space-md); box-shadow: inset 0 1px 0 var(--ui-line-hair); }
|
|
63
|
+
.ui-prose > .ui-code + .ui-disclosure[data-generated] > .ui-code { margin-inline: calc(var(--ui-space-md) * -1); border-radius: 0 0 var(--ui-radius-xl) var(--ui-radius-xl); background: transparent; box-shadow: inset 0 1px 0 var(--ui-line-hair); }
|
|
64
|
+
|
|
65
|
+
/* @WARN and @ERROR marks: a wavy underline in the status tone instead of a wash. */
|
|
66
|
+
.ui-code-line mark[data-tone] { padding: 0; background: none; box-shadow: none; text-decoration: underline wavy 1px; text-underline-offset: 3px; }
|
|
67
|
+
.ui-code-line mark[data-tone="warning"] { text-decoration-color: var(--ui-status-warning); }
|
|
68
|
+
.ui-code-line mark[data-tone="danger"] { text-decoration-color: var(--ui-status-danger); }
|
|
69
|
+
/* [!code focus] blurs the other lines until the pointer reaches the code. */
|
|
70
|
+
.ui-code pre.has-focused .ui-code-line { transition: filter var(--ui-duration-base) var(--ui-ease); }
|
|
71
|
+
.ui-code pre.has-focused:not(:hover, :focus-visible) .ui-code-line:not(.focus) { filter: blur(3px); }
|
|
72
|
+
.ui-code ::selection { background: color-mix(in oklab, var(--ui-code-function) 22%, transparent); }
|
|
73
|
+
@media print {
|
|
74
|
+
.ui-code { break-inside: avoid; }
|
|
75
|
+
/* Paper cannot scroll: keep complete commands and long source lines readable. */
|
|
76
|
+
.ui-code pre { overflow: visible; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
77
|
+
.ui-code pre.has-focused .ui-code-line { filter: none; }
|
|
78
|
+
}
|
|
79
|
+
@media (prefers-reduced-motion: reduce) { .ui-code pre.has-focused .ui-code-line { transition: none; } }
|
|
80
|
+
@media (forced-colors: active) { .ui-code { border: 1px solid CanvasText; } }
|
|
81
|
+
|
|
82
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* code-tabs: owned component styles; shared definitions come from the foundation. */
|
|
2
|
+
@layer components {
|
|
3
|
+
.ui-tabs { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
|
|
4
|
+
.ui-tabs::-webkit-scrollbar { display: none; }
|
|
5
|
+
.ui-tabs > [role="tab"] {
|
|
6
|
+
appearance: none; display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 2rem; padding: 0 .625rem; border: 0; border-radius: var(--ui-radius-md);
|
|
7
|
+
background: transparent; color: var(--ui-text-muted); font: var(--ui-weight-regular) .75rem/1 var(--font-family-mono); cursor: pointer; transition: color var(--ui-duration-quick), background-color var(--ui-duration-quick), box-shadow var(--ui-duration-quick);
|
|
8
|
+
}
|
|
9
|
+
.ui-tabs > [role="tab"] svg { width: 14px; height: 14px; }
|
|
10
|
+
.ui-tabs > [role="tab"]:hover { color: var(--ui-text-strong); }
|
|
11
|
+
.ui-tabs > [role="tab"][aria-selected="true"] { background: var(--ui-surface-chip); color: var(--ui-text-strong); box-shadow: inset 0 0 0 1px var(--ui-line-hair); }
|
|
12
|
+
.ui-tabs > [role="tab"]:focus-visible { @apply --ui-focus-ring; outline-offset: -2px; }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* Code panels (`ui-code`, styles/system/code.css) as the site renders them: Shiki lines are `ui-code-line` parts, the
|
|
18
|
+
* copy action sits in the bar or, without one, in the corner, and tab panels all show on paper and without scripts.
|
|
19
|
+
*/
|
|
20
|
+
@layer components {
|
|
21
|
+
/* The file's name keeps its width; a long result wraps in the room left beside the copy button. */
|
|
22
|
+
/* Without a bar the copy takes the panel's corner (`--code-corner`, code.css). A long line scrolls under it: the panel's own face fades in behind the button and runs to the edge, so code never runs through it. */
|
|
23
|
+
/* A shell command is read whole: it wraps under a hanging indent instead of hiding its flags behind the copy button. */
|
|
24
|
+
/* Flags wrap whole: a token never breaks at its own hyphen, so `--yes` cannot split into `-` and `-yes`. */
|
|
25
|
+
/* Plain text, such as a prompt for an agent, is prose set in mono: it wraps at the panel like prose. */
|
|
26
|
+
|
|
27
|
+
/* A Generated CSS disclosure right after its source closes the same panel: one frame, the output under a hairline,
|
|
28
|
+
as in a demo tray. Alone (after a table or a paragraph) it stays a quiet disclosure. */
|
|
29
|
+
|
|
30
|
+
/* @WARN and @ERROR marks: a wavy underline in the status tone instead of a wash. */
|
|
31
|
+
/* [!code focus] blurs the other lines until the pointer reaches the code. */
|
|
32
|
+
|
|
33
|
+
[data-code-tabs] > [role="tabpanel"] > .ui-code-file { display: none; }
|
|
34
|
+
@media (scripting: none), print {
|
|
35
|
+
[data-code-tabs] > .ui-code-bar { display: none; }
|
|
36
|
+
[data-code-tabs] > [role="tabpanel"][hidden] { display: block; }
|
|
37
|
+
[data-code-tabs] > [role="tabpanel"] > .ui-code-file { display: flex; padding: var(--ui-space-sm) var(--ui-space-md) 0; }
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
@@ -1,85 +1,8 @@
|
|
|
1
|
-
/*
|
|
2
|
-
@
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
.ui-code-bar > .ui-tabs { flex: 1; min-width: 0; margin-left: calc(var(--code-corner) - var(--ui-space-md)); }
|
|
10
|
-
.ui-code-file { display: inline-flex; align-items: center; gap: var(--ui-space-xs); flex: 1; min-width: 0; color: var(--ui-text-muted); font: var(--ui-weight-regular) .75rem/1 var(--font-family-mono); }
|
|
11
|
-
.ui-code-file svg { flex: none; width: 14px; height: 14px; }
|
|
12
|
-
/* Without a bar the code sits in equal space above and below, the same 16px that sets its lines in from the edge. */
|
|
13
|
-
.ui-code pre { margin: 0; padding: var(--ui-space-md) 0; overflow-x: auto; font: var(--ui-weight-regular) var(--ui-text-code)/var(--ui-leading-code) var(--font-family-mono); tab-size: 2; scrollbar-width: thin; }
|
|
14
|
-
.ui-code pre:focus-visible { @apply --ui-focus-ring; outline-offset: -4px; border-radius: var(--ui-radius-md); }
|
|
15
|
-
/* Under a bar the code starts a short step down, so the file name reads as its caption. */
|
|
16
|
-
.ui-code:has(> .ui-code-bar) pre { padding-top: var(--ui-space-2xs); }
|
|
17
|
-
.ui-code-line { display: block; padding: 0 var(--ui-space-lg) 0 var(--ui-space-md); }
|
|
18
|
-
/* A blank source line keeps one line of height, even when the highlighter leaves an empty token in it. */
|
|
19
|
-
.ui-code-line { min-height: 1lh; }
|
|
20
|
-
.ui-code[data-numbers] { counter-reset: line; }
|
|
21
|
-
.ui-code[data-numbers] .ui-code-line::before { counter-increment: line; content: counter(line); display: inline-block; width: 1.75rem; margin-right: var(--ui-space-sm); color: var(--ui-text-disabled); text-align: right; user-select: none; }
|
|
22
|
-
.ui-code-line[data-mark="active"] { background: var(--ui-code-active); box-shadow: inset 2px 0 0 var(--ui-line-mark); }
|
|
23
|
-
.ui-code-line[data-mark="added"] { background: var(--ui-code-added); box-shadow: inset 2px 0 0 color-mix(in oklab, var(--ui-status-success) 70%, transparent); }
|
|
24
|
-
.ui-code-line[data-mark="removed"] { background: var(--ui-code-removed); box-shadow: inset 2px 0 0 color-mix(in oklab, var(--ui-status-danger) 70%, transparent); }
|
|
25
|
-
.ui-code-line[data-mark="added"]::after, .ui-code-line[data-mark="removed"]::after { float: right; color: var(--ui-text-disabled); }
|
|
26
|
-
.ui-code-line[data-mark="added"]::after { content: "+"; }
|
|
27
|
-
.ui-code-line[data-mark="removed"]::after { content: "−"; }
|
|
28
|
-
.ui-code-line mark { padding: 1px 2px; border-radius: 3px; background: light-dark(oklch(22% .002 265 / .08), oklch(100% 0 none / .1)); color: inherit; box-shadow: inset 0 -1px 0 var(--ui-line-mark); }
|
|
29
|
-
.ui-code .t { color: var(--ui-code-function); } .ui-code .a { color: var(--ui-code-property); } .ui-code .s { color: var(--ui-code-string); }
|
|
30
|
-
.ui-code .p { color: var(--ui-code-punctuation); } .ui-code .k { color: var(--ui-code-keyword); } .ui-code .c { color: var(--ui-code-comment); font-style: italic; } .ui-code .n { color: var(--ui-code-number); }
|
|
31
|
-
.ui-code > .ui-disclosure { border-top: 1px solid var(--ui-line-hair); }
|
|
32
|
-
.ui-code > .ui-disclosure > summary { padding-inline: var(--ui-space-md); }
|
|
33
|
-
.ui-code > .ui-disclosure > pre { padding-top: 0; }
|
|
34
|
-
/* In a tray, source code (a file tree, a disclosed result) is a lighter field like the stage beside it: tone, not another ring. */
|
|
35
|
-
.ui-tray > :is(.ui-code, .ui-tree), .ui-tray > .ui-disclosure > .ui-code { box-shadow: none; }
|
|
36
|
-
|
|
37
|
-
/* Tabs: a row of quiet chips; the selected one is filled. The row scrolls and so clips any outer shadow, and a raised
|
|
38
|
-
sheet face is the code panel's own tone: the chip's fill and inset hairline keep it legible in both schemes. */
|
|
39
|
-
.ui-tabs { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
|
|
40
|
-
.ui-tabs::-webkit-scrollbar { display: none; }
|
|
41
|
-
.ui-tabs > [role="tab"] {
|
|
42
|
-
appearance: none; display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 2rem; padding: 0 .625rem; border: 0; border-radius: var(--ui-radius-md);
|
|
43
|
-
background: transparent; color: var(--ui-text-muted); font: var(--ui-weight-regular) .75rem/1 var(--font-family-mono); cursor: pointer; transition: color var(--ui-duration-quick), background-color var(--ui-duration-quick), box-shadow var(--ui-duration-quick);
|
|
44
|
-
}
|
|
45
|
-
.ui-tabs > [role="tab"] svg { width: 14px; height: 14px; }
|
|
46
|
-
.ui-tabs > [role="tab"]:hover { color: var(--ui-text-strong); }
|
|
47
|
-
.ui-tabs > [role="tab"][aria-selected="true"] { background: var(--ui-surface-chip); color: var(--ui-text-strong); box-shadow: inset 0 0 0 1px var(--ui-line-hair); }
|
|
48
|
-
.ui-tabs > [role="tab"]:focus-visible { @apply --ui-focus-ring; outline-offset: -2px; }
|
|
49
|
-
|
|
50
|
-
/* Inline code and file references */
|
|
51
|
-
.ui-inline-code { padding: .125em .375em; border-radius: var(--ui-radius-xs); background: var(--ui-surface-chip); color: var(--ui-text-strong); box-shadow: inset 0 0 0 1px var(--ui-line-hair); font: var(--ui-weight-regular) .84em/1 var(--font-family-mono); overflow-wrap: anywhere; }
|
|
52
|
-
|
|
53
|
-
/* Disclosure: native details, one chevron, calm motion */
|
|
54
|
-
.ui-disclosure { min-width: 0; }
|
|
55
|
-
.ui-disclosure > summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ui-space-xs); min-height: 2.75rem; color: var(--ui-text-body); font: var(--ui-weight-medium) .8125rem/1.3 var(--font-family-sans); list-style: none; cursor: pointer; }
|
|
56
|
-
.ui-disclosure > summary::-webkit-details-marker { display: none; }
|
|
57
|
-
.ui-disclosure > summary::before { content: ""; flex: none; width: 14px; height: 14px; background: currentColor; opacity: .6; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m6 3.5 4.5 4.5L6 12.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: rotate var(--ui-duration-base) var(--ui-ease); }
|
|
58
|
-
.ui-disclosure[open] > summary::before { rotate: 90deg; }
|
|
59
|
-
.ui-disclosure > summary:hover { color: var(--ui-text-strong); }
|
|
60
|
-
.ui-disclosure > summary:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; border-radius: var(--ui-radius-md); }
|
|
61
|
-
.ui-disclosure > summary .ui-disclosure-meta { margin-left: auto; color: var(--ui-text-muted); font: var(--ui-weight-regular) .75rem/1 var(--font-family-sans); }
|
|
62
|
-
.ui-disclosure[data-variant="rule"] { border-block: 1px solid var(--ui-line-hair); }
|
|
63
|
-
.ui-disclosure[data-variant="rule"] + .ui-disclosure[data-variant="rule"] { border-top: 0; }
|
|
64
|
-
.ui-disclosure-body { padding-bottom: var(--ui-space-md); }
|
|
65
|
-
.ui-disclosure > .ui-disclosure-body > :first-child { margin-top: 0; }
|
|
66
|
-
.ui-disclosure > .ui-disclosure-body > :last-child { margin-bottom: 0; }
|
|
67
|
-
|
|
68
|
-
/* Prompt: copyable prose for agents — reads as text, copies as text */
|
|
69
|
-
.ui-prompt { display: grid; gap: 0; min-width: 0; overflow: hidden; border-radius: var(--ui-radius-xl); background: var(--ui-surface-code); box-shadow: inset 0 0 0 1px var(--ui-line-contour), 0 1px 0 var(--ui-lip); }
|
|
70
|
-
.ui-prompt-body { margin: 0; padding: var(--ui-space-xs) var(--ui-space-md) var(--ui-space-md); color: var(--ui-text-strong); font: var(--ui-weight-regular) .9375rem/1.7 var(--font-family-sans); white-space: pre-wrap; }
|
|
71
|
-
.ui-prompt-body var { padding: 0 .25em; border-radius: var(--ui-radius-xs); background: var(--ui-surface-chip); color: var(--ui-text-body); box-shadow: inset 0 0 0 1px var(--ui-line-hair); font: var(--ui-weight-regular) .8125rem/1 var(--font-family-mono); font-style: normal; }
|
|
72
|
-
|
|
73
|
-
/* File tree: names in mono, descriptions in the reading face, guides as hairlines */
|
|
74
|
-
.ui-tree { margin: 0; overflow-x: auto; overflow-wrap: anywhere; padding: var(--ui-space-sm) 0; border-radius: var(--ui-radius-xl); background: var(--ui-surface-code); box-shadow: inset 0 0 0 1px var(--ui-line-contour), 0 1px 0 var(--ui-lip); }
|
|
75
|
-
.ui-tree ul { margin: 0; padding: 0; list-style: none; }
|
|
76
|
-
.ui-tree ul ul { margin-left: 1.375rem; box-shadow: inset 1px 0 0 var(--ui-line-hair); }
|
|
77
|
-
.ui-tree li > div > * { min-width: 0; }
|
|
78
|
-
.ui-tree li > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--ui-space-sm); padding: .3125rem var(--ui-space-md); }
|
|
79
|
-
.ui-tree ul ul li > div { padding-left: var(--ui-space-sm); }
|
|
80
|
-
.ui-tree svg { flex: none; align-self: center; width: 14px; height: 14px; color: var(--ui-text-muted); }
|
|
81
|
-
.ui-tree b { color: var(--ui-text-strong); font: var(--ui-weight-regular) var(--ui-text-code)/1.5 var(--font-family-mono); }
|
|
82
|
-
.ui-tree span { color: var(--ui-text-muted); font-size: .78125rem; }
|
|
83
|
-
.ui-tree [data-mark="added"] > div { background: var(--ui-code-added); }
|
|
84
|
-
.ui-tree [data-mark="added"] > div > b::after { content: " +"; color: var(--ui-status-success); }
|
|
85
|
-
}
|
|
1
|
+
/* Explicit full code collection. Components import their own leaf stylesheet. */
|
|
2
|
+
@import './code-panel.css';
|
|
3
|
+
@import './prompt.css';
|
|
4
|
+
@import './tray-code.css';
|
|
5
|
+
@import './code-tabs.css';
|
|
6
|
+
@import './inline-code.css';
|
|
7
|
+
@import './disclosure.css';
|
|
8
|
+
@import './tree.css';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/* compare: owned component styles; shared definitions come from the foundation. */
|
|
2
|
+
@layer components {
|
|
3
|
+
.ui-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--ui-inset); }
|
|
4
|
+
.ui-compare > figure { display: grid; grid-template-rows: auto 1fr; gap: 0; min-width: 0; margin: 0; }
|
|
5
|
+
.ui-compare > figure > figcaption { padding: var(--ui-space-xs) var(--ui-space-sm); color: var(--ui-text-muted); @apply --ui-label-type; }
|
|
6
|
+
.ui-compare .ui-stage { min-height: 11rem; padding: var(--ui-space-xl) var(--ui-space-lg); }
|
|
7
|
+
}
|
|
@@ -1,110 +1,11 @@
|
|
|
1
|
+
/* Explicit full controls collection. Components import their own leaf stylesheet. */
|
|
1
2
|
@import './buttons.css';
|
|
2
|
-
|
|
3
|
-
@
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
.ui-segmented > :is(button, a):hover:not(:disabled) { color: var(--ui-text-strong); }
|
|
12
|
-
.ui-segmented > :is(button, a):is([aria-pressed="true"], [aria-selected="true"], [aria-checked="true"], [aria-current="page"]) { color: var(--ui-text-strong); @apply --ui-sheet-face; box-shadow: var(--ui-elevation-rise-1); }
|
|
13
|
-
.ui-segmented > :is(button, a):focus-visible { @apply --ui-focus-ring; outline-offset: 2px; }
|
|
14
|
-
.ui-segmented > button:disabled { color: var(--ui-text-disabled); cursor: not-allowed; }
|
|
15
|
-
/* Underline: page-level tabs between sibling documents — words on one hairline, the current one underlined in ink. */
|
|
16
|
-
.ui-segmented[data-variant="underline"] { display: flex; gap: 0 var(--ui-space-lg); padding: 0; border-radius: 0; background: none; box-shadow: inset 0 -1px 0 var(--ui-line-divider); }
|
|
17
|
-
.ui-segmented[data-variant="underline"] > :is(button, a) { min-width: 0; min-height: 2.75rem; padding: 0; border-radius: 0; color: var(--ui-text-muted); font: var(--ui-weight-regular) var(--ui-text-small)/1.4 var(--font-family-sans); }
|
|
18
|
-
.ui-segmented[data-variant="underline"] > :is(button, a):is([aria-pressed="true"], [aria-selected="true"], [aria-checked="true"], [aria-current="page"]) { color: var(--ui-text-strong); background: none; box-shadow: inset 0 -2px 0 var(--ui-text-strong); }
|
|
19
|
-
.ui-segmented[data-variant="underline"] > :is(button, a):focus-visible { outline-offset: -2px; border-radius: var(--ui-radius-xs); }
|
|
20
|
-
.ui-segmented[data-size="lg"] { padding: 4px; border-radius: calc(var(--ui-radius-md) + 4px); }
|
|
21
|
-
.ui-segmented[data-size="lg"] > :is(button, a) { min-height: 2.25rem; border-radius: var(--ui-radius-md); font-size: .8125rem; }
|
|
22
|
-
|
|
23
|
-
/* Fields: a well that floats back to the sheet on focus */
|
|
24
|
-
.ui-field { display: grid; gap: var(--ui-space-xs); color: var(--ui-text-strong); font-size: var(--ui-text-small); font-weight: var(--ui-weight-medium); }
|
|
25
|
-
.ui-field-hint { color: var(--ui-text-muted); font-size: .75rem; font-weight: var(--ui-weight-regular); }
|
|
26
|
-
.ui-input, .ui-select {
|
|
27
|
-
width: 100%; min-height: 2.5rem; padding: .5625rem .75rem; border: 0; border-radius: var(--ui-radius-md);
|
|
28
|
-
background: var(--ui-surface-well); color: var(--ui-text-strong); box-shadow: var(--ui-elevation-sink);
|
|
29
|
-
font: var(--ui-weight-regular) var(--ui-text-small)/1.45 var(--font-family-sans); resize: vertical;
|
|
30
|
-
transition: box-shadow var(--ui-duration-quick), background-color var(--ui-duration-quick);
|
|
31
|
-
}
|
|
32
|
-
.ui-input::placeholder { color: var(--ui-text-muted); }
|
|
33
|
-
.ui-input:hover:not(:focus, :disabled), .ui-select:hover:not(:focus, :disabled) { background: var(--ui-surface-well-hover); }
|
|
34
|
-
.ui-input:focus, .ui-select:focus-visible { outline: none; background: var(--ui-surface-sheet); box-shadow: inset 0 0 0 1px var(--ui-line-mark), 0 0 0 3px light-dark(oklch(22% .002 265 / .1), oklch(100% 0 none / .12)); }
|
|
35
|
-
.ui-input:disabled, .ui-select:disabled { color: var(--ui-text-disabled); cursor: not-allowed; }
|
|
36
|
-
.ui-select { appearance: none; padding-right: 2rem; cursor: pointer;
|
|
37
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
|
|
38
|
-
background-repeat: no-repeat; background-position: right .625rem center; background-size: 14px; }
|
|
39
|
-
.ui-select[data-variant="raised"] { background-color: transparent; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E"), linear-gradient(180deg, var(--ui-surface-sheet), var(--ui-surface-sheet-lo)); background-position: right .625rem center, 0 0; background-size: 14px, auto; box-shadow: var(--ui-elevation-rise-1); font-weight: var(--ui-weight-medium); }
|
|
40
|
-
/* Overlay: an invisible native select over a positioned label that shows the value (version, language, appearance) */
|
|
41
|
-
.ui-select[data-variant="overlay"] { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; }
|
|
42
|
-
:has(> .ui-select[data-variant="overlay"]:focus-visible) { @apply --ui-focus-ring; outline-offset: 2px; }
|
|
43
|
-
|
|
44
|
-
/* Range: hairline track, filled to value, raised thumb */
|
|
45
|
-
.ui-range { --value: 50%; appearance: none; width: 100%; min-width: 6rem; height: 1.75rem; margin: 0; background: transparent; cursor: ew-resize; }
|
|
46
|
-
.ui-range::-webkit-slider-runnable-track { height: 4px; border-radius: var(--ui-radius-pill); background: linear-gradient(90deg, var(--ui-text-strong) var(--value), var(--ui-line-divider) var(--value)); }
|
|
47
|
-
.ui-range::-moz-range-track { height: 4px; border-radius: var(--ui-radius-pill); background: var(--ui-line-divider); }
|
|
48
|
-
.ui-range::-moz-range-progress { height: 4px; border-radius: var(--ui-radius-pill); background: var(--ui-text-strong); }
|
|
49
|
-
.ui-range::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; margin-top: -6px; border: 0; border-radius: 50%; background: linear-gradient(180deg, oklch(100% 0 none), oklch(96.5% .0011 265)); box-shadow: 0 0 0 1px var(--ui-line-strong), 0 1px 1px var(--ui-shade-1), 0 2px 4px -1px var(--ui-shade-2); }
|
|
50
|
-
.ui-range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: linear-gradient(180deg, oklch(100% 0 none), oklch(96.5% .0011 265)); box-shadow: 0 0 0 1px var(--ui-line-strong), 0 1px 1px var(--ui-shade-1), 0 2px 4px -1px var(--ui-shade-2); }
|
|
51
|
-
.ui-range:focus-visible { outline: none; }
|
|
52
|
-
.ui-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--ui-line-strong), 0 0 0 2px var(--ui-surface-stage), 0 0 0 4px var(--ui-focus); }
|
|
53
|
-
.ui-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1px var(--ui-line-strong), 0 0 0 2px var(--ui-surface-stage), 0 0 0 4px var(--ui-focus); }
|
|
54
|
-
|
|
55
|
-
/* Check and switch */
|
|
56
|
-
.ui-check { display: inline-flex; align-items: center; gap: var(--ui-space-xs); color: var(--ui-text-strong); font-size: var(--ui-text-small); cursor: pointer; }
|
|
57
|
-
.ui-check > input:not(.ui-switch) { appearance: none; display: grid; place-items: center; flex: none; width: 1.125rem; height: 1.125rem; margin: 0; border-radius: var(--ui-radius-sm); background: var(--ui-surface-well); box-shadow: var(--ui-elevation-sink); cursor: pointer; transition: background-color var(--ui-duration-quick), box-shadow var(--ui-duration-quick); }
|
|
58
|
-
/* An empty box is a small target on a stage of nearly its own tone: a firmer ring keeps it visible in both schemes. */
|
|
59
|
-
.ui-check > input:not(.ui-switch):not(:checked) { box-shadow: var(--ui-elevation-sink), inset 0 0 0 1px var(--ui-line-divider); }
|
|
60
|
-
.ui-check > input:not(.ui-switch)::after { content: ""; width: 10px; height: 10px; opacity: 0; background: var(--ui-text-inverse); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4.1 7.3 8 2.8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
|
|
61
|
-
.ui-check > input:not(.ui-switch):checked { background: var(--ui-surface-ink); box-shadow: inset 0 1px 0 light-dark(oklch(100% 0 none / .16), oklch(100% 0 none)), 0 0 0 1px light-dark(oklch(14% .003 265), oklch(0% 0 none / .5)); }
|
|
62
|
-
.ui-check > input:not(.ui-switch):checked::after { opacity: 1; }
|
|
63
|
-
.ui-check > input[type="radio"] { border-radius: 50%; }
|
|
64
|
-
.ui-check > input[type="radio"]::after { width: 6px; height: 6px; border-radius: 50%; mask: none; }
|
|
65
|
-
.ui-check > input:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; }
|
|
66
|
-
.ui-switch { position: relative; appearance: none; flex: none; width: 2.25rem; height: 1.375rem; margin: 0; border-radius: var(--ui-radius-pill); background: var(--ui-surface-well); box-shadow: var(--ui-elevation-sink); cursor: pointer; transition: background-color var(--ui-duration-base) var(--ui-ease); }
|
|
67
|
-
.ui-switch::before { content: ""; position: absolute; top: 3px; left: 3px; width: 1rem; height: 1rem; border-radius: 50%; background: linear-gradient(180deg, oklch(100% 0 none), oklch(96.5% .0011 265)); box-shadow: 0 0 0 1px var(--ui-line-contour), 0 1px 1px var(--ui-shade-1), 0 2px 3px -1px var(--ui-shade-2); transition: translate var(--ui-duration-base) var(--ui-ease); }
|
|
68
|
-
.ui-switch:checked { background: var(--ui-surface-ink); box-shadow: inset 0 1px 2px oklch(0% 0 none / .3); }
|
|
69
|
-
.ui-switch:checked::before { translate: .875rem 0; background: light-dark(linear-gradient(180deg, oklch(100% 0 none), oklch(96.5% .0011 265)), linear-gradient(180deg, oklch(26% .0024 265), oklch(20% .002 265))); }
|
|
70
|
-
.ui-switch:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; }
|
|
71
|
-
|
|
72
|
-
/* Copy: an honest result next to the action */
|
|
73
|
-
.ui-copy { display: inline-flex; align-items: center; gap: var(--ui-space-xs); }
|
|
74
|
-
.ui-copy-status { color: var(--ui-text-muted); font: var(--ui-weight-regular) .75rem/1 var(--font-family-mono); }
|
|
75
|
-
.ui-copy-status[data-result="success"] { color: var(--ui-status-success); }
|
|
76
|
-
.ui-copy-status[data-result="error"] { color: var(--ui-status-danger); }
|
|
77
|
-
|
|
78
|
-
/* Keyboard key */
|
|
79
|
-
.ui-kbd { display: inline-grid; place-items: center; min-width: 1.375rem; height: 1.375rem; padding: 0 .3125rem; border-radius: var(--ui-radius-xs); background: transparent; color: var(--ui-text-muted); box-shadow: inset 0 0 0 1px var(--ui-line-contour); font: var(--ui-weight-regular) .6875rem/1 var(--font-family-mono); }
|
|
80
|
-
|
|
81
|
-
@media (pointer: coarse) {
|
|
82
|
-
.ui-button, .ui-input, .ui-select { min-height: 2.75rem; }
|
|
83
|
-
.ui-segmented > button { min-height: 2.5rem; }
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* Tooltip: a small ink chip; names icon-only controls */
|
|
87
|
-
.ui-tooltip { position: absolute; z-index: 60; padding: .3125rem .5rem; border-radius: var(--ui-radius-sm); background: var(--ui-surface-ink); color: var(--ui-text-inverse); box-shadow: 0 1px 2px var(--ui-shade-1), 0 4px 10px -4px var(--ui-shade-2); font: var(--ui-weight-regular) .71875rem/1.2 var(--font-family-sans); white-space: nowrap; pointer-events: none; }
|
|
88
|
-
.ui-tooltip[data-side="bottom"]::before { content: ""; position: absolute; bottom: 100%; left: 50%; translate: -50% 0; border: 4px solid transparent; border-bottom-color: var(--ui-surface-ink); }
|
|
89
|
-
.ui-tooltip > .ui-kbd { height: 1.125rem; min-width: 1.125rem; margin-left: 6px; background: color-mix(in oklab, var(--ui-text-inverse) 14%, transparent); color: var(--ui-text-inverse); box-shadow: none; }
|
|
90
|
-
|
|
91
|
-
/* Menu: a floating sheet of choices (version, language, appearance) */
|
|
92
|
-
.ui-menu { display: grid; gap: 1px; min-width: 12rem; margin: 0; padding: var(--ui-inset); border-radius: var(--ui-radius-lg); background: var(--ui-surface-float); box-shadow: var(--ui-elevation-rise-3); list-style: none; }
|
|
93
|
-
.ui-menu-label { padding: .375rem .625rem .25rem; color: var(--ui-text-muted); @apply --ui-label-type; }
|
|
94
|
-
.ui-menu-item { appearance: none; display: flex; align-items: center; gap: var(--ui-space-xs); width: 100%; min-height: 2rem; padding: 0 .625rem; border: 0; border-radius: var(--ui-radius-sm); background: transparent; color: var(--ui-text-body); font: var(--ui-weight-regular) var(--ui-text-small)/1 var(--font-family-sans); text-align: start; text-decoration: none; cursor: pointer; }
|
|
95
|
-
.ui-menu-item > svg { flex: none; width: 15px; height: 15px; color: var(--ui-text-muted); }
|
|
96
|
-
.ui-menu-item > small { margin-left: auto; color: var(--ui-text-muted); font: var(--ui-weight-regular) .6875rem/1 var(--font-family-mono); }
|
|
97
|
-
.ui-menu-item:is(:hover, [data-highlighted]) { color: var(--ui-text-strong); background: light-dark(oklch(22% .002 265 / .05), oklch(100% 0 none / .06)); }
|
|
98
|
-
.ui-menu-item[aria-checked="true"] { color: var(--ui-text-strong); font-weight: var(--ui-weight-medium); }
|
|
99
|
-
.ui-menu-item[aria-checked="true"]::after { content: ""; width: 14px; height: 14px; margin-left: auto; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.5 3 3 6-7' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
|
|
100
|
-
.ui-menu-item:focus-visible { @apply --ui-focus-ring; outline-offset: -2px; }
|
|
101
|
-
.ui-menu-separator { height: 1px; margin: var(--ui-space-3xs) .375rem; background: var(--ui-line-hair); }
|
|
102
|
-
|
|
103
|
-
/* Result feedback on an icon action: the glyph swaps, the label says what happened */
|
|
104
|
-
.ui-button[data-result] > svg:first-of-type { display: none; }
|
|
105
|
-
.ui-button:not([data-result]) > .ui-result-icon { display: none; }
|
|
106
|
-
.ui-button[data-result="success"] { color: var(--ui-status-success); }
|
|
107
|
-
.ui-button[data-result="error"] { color: var(--ui-status-danger); }
|
|
108
|
-
.ui-button[data-result="error"] > svg:first-of-type { display: block; }
|
|
109
|
-
.ui-button[data-result="error"] > .ui-result-icon { display: none; }
|
|
110
|
-
}
|
|
3
|
+
@import './segmented.css';
|
|
4
|
+
@import './fields.css';
|
|
5
|
+
@import './range.css';
|
|
6
|
+
@import './checks.css';
|
|
7
|
+
@import './copy.css';
|
|
8
|
+
@import './kbd.css';
|
|
9
|
+
@import './button-feedback.css';
|
|
10
|
+
@import './tooltip.css';
|
|
11
|
+
@import './menu.css';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* copy: owned component styles; shared definitions come from the foundation. */
|
|
2
|
+
@layer components {
|
|
3
|
+
.ui-copy { display: inline-flex; align-items: center; gap: var(--ui-space-xs); }
|
|
4
|
+
.ui-copy-status { color: var(--ui-text-muted); font: var(--ui-weight-regular) .75rem/1 var(--font-family-mono); }
|
|
5
|
+
.ui-copy-status[data-result="success"] { color: var(--ui-status-success); }
|
|
6
|
+
.ui-copy-status[data-result="error"] { color: var(--ui-status-danger); }
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Code panels (`ui-code`, styles/system/code.css) as the site renders them: Shiki lines are `ui-code-line` parts, the
|
|
12
|
+
* copy action sits in the bar or, without one, in the corner, and tab panels all show on paper and without scripts.
|
|
13
|
+
*/
|
|
14
|
+
@layer components {
|
|
15
|
+
/* The file's name keeps its width; a long result wraps in the room left beside the copy button. */
|
|
16
|
+
/* Without a bar the copy takes the panel's corner (`--code-corner`, code.css). A long line scrolls under it: the panel's own face fades in behind the button and runs to the edge, so code never runs through it. */
|
|
17
|
+
/* A shell command is read whole: it wraps under a hanging indent instead of hiding its flags behind the copy button. */
|
|
18
|
+
/* Flags wrap whole: a token never breaks at its own hyphen, so `--yes` cannot split into `-` and `-yes`. */
|
|
19
|
+
/* Plain text, such as a prompt for an agent, is prose set in mono: it wraps at the panel like prose. */
|
|
20
|
+
.ui-copy-status:empty { display: none; }
|
|
21
|
+
|
|
22
|
+
/* A Generated CSS disclosure right after its source closes the same panel: one frame, the output under a hairline,
|
|
23
|
+
as in a demo tray. Alone (after a table or a paragraph) it stays a quiet disclosure. */
|
|
24
|
+
.ui-copy > .ui-copy-status { min-width: 0; max-width: 16rem; text-align: end; line-height: 1.3; }
|
|
25
|
+
|
|
26
|
+
/* @WARN and @ERROR marks: a wavy underline in the status tone instead of a wash. */
|
|
27
|
+
/* [!code focus] blurs the other lines until the pointer reaches the code. */
|
|
28
|
+
@media (scripting: none), print {
|
|
29
|
+
.ui-copy { display: none; }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|