@hraness/design-kit 0.31.1
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/ARTICLE_COPY.md +208 -0
- package/HERO_FIELDS.md +55 -0
- package/ICONS.md +56 -0
- package/LANTERN_MATERIAL.md +60 -0
- package/LICENSE +21 -0
- package/MARKETING_COPY.md +49 -0
- package/MARKETING_PRESET.md +108 -0
- package/PALETTES.md +90 -0
- package/PAPER_THEME.md +128 -0
- package/README.md +745 -0
- package/STATUS_PAGES.md +67 -0
- package/STYLE.md +245 -0
- package/WRITING.md +72 -0
- package/dist/browser/index.js +2345 -0
- package/dist/chunk-44djxk16.js +6872 -0
- package/dist/chunk-5gtx3pza.js +9 -0
- package/dist/chunk-77391vmq.js +454 -0
- package/dist/chunk-7b1586eb.js +1209 -0
- package/dist/chunk-8834fh4n.js +6 -0
- package/dist/chunk-9t8xyqte.js +870 -0
- package/dist/chunk-cejpzyfh.js +446 -0
- package/dist/chunk-eh71jz57.js +429 -0
- package/dist/chunk-evb02bc1.js +516 -0
- package/dist/chunk-h4k7yv6x.js +368 -0
- package/dist/chunk-he8eznb1.js +760 -0
- package/dist/chunk-mr1vdcjq.js +404 -0
- package/dist/chunk-wzvdn8ey.js +116 -0
- package/dist/fonts/nebula-sans/social-fonts.generated.js +53 -0
- package/dist/icons.js +48 -0
- package/dist/index.js +237 -0
- package/dist/launch.js +41 -0
- package/dist/mockups/client.js +422 -0
- package/dist/mockups/index.js +1850 -0
- package/dist/portfolio.js +1549 -0
- package/dist/provider-marks.js +19 -0
- package/dist/react/charts.js +11 -0
- package/dist/react/hero-backdrop.js +8 -0
- package/dist/react/index.js +7252 -0
- package/dist/react/platform-install.js +10 -0
- package/dist/react/server.js +137 -0
- package/dist/stylex-manifest.json +1 -0
- package/dist/stylex.css +5392 -0
- package/dist/syntax-highlighting.js +15 -0
- package/dist/testing.js +250 -0
- package/package.json +377 -0
- package/portfolio-inventory.json +31 -0
- package/scripts/check-lantern-material-snapshot.d.mts +26 -0
- package/scripts/check-lantern-material-snapshot.mjs +126 -0
- package/scripts/check-marketing-snapshot.d.mts +12 -0
- package/scripts/check-marketing-snapshot.mjs +58 -0
- package/scripts/lantern-material-snapshot.ts +101 -0
- package/scripts/marketing-textures.ts +48 -0
- package/scripts/paper-theme-snapshot.ts +97 -0
- package/scripts/product-marketing-snapshot.ts +149 -0
- package/src/appearance-menu.css +266 -0
- package/src/appearance.ts +32 -0
- package/src/article-html.ts +269 -0
- package/src/article.ts +686 -0
- package/src/browser/appearance-menu.ts +604 -0
- package/src/browser/artifact-share.ts +164 -0
- package/src/browser/design-palette.ts +197 -0
- package/src/browser/foil.ts +124 -0
- package/src/browser/hero-light.ts +11 -0
- package/src/browser/index.ts +29 -0
- package/src/browser/status-field.ts +432 -0
- package/src/browser/status-page.ts +100 -0
- package/src/browser/sticky-offset.ts +82 -0
- package/src/browser/theme-color-sync.ts +213 -0
- package/src/charts.css +7 -0
- package/src/compiler-components.css +34 -0
- package/src/compiler-foundation.css +18 -0
- package/src/compiler-palettes.css +7 -0
- package/src/compiler-tokens.css +342 -0
- package/src/components.css +3 -0
- package/src/design-gallery.css +431 -0
- package/src/effects.css +14 -0
- package/src/fonts/geist-mono/GeistMono[wght].woff2 +0 -0
- package/src/fonts/geist-mono/OFL.txt +93 -0
- package/src/fonts/geist-mono/PROVENANCE.md +12 -0
- package/src/fonts/instrument-serif/OFL.txt +93 -0
- package/src/fonts/instrument-serif/UPSTREAM.md +14 -0
- package/src/fonts/instrument-serif/instrument-serif-latin-400.woff2 +0 -0
- package/src/fonts/nebula-sans/LICENSE.txt +96 -0
- package/src/fonts/nebula-sans/NebulaSans-Black.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-BlackItalic.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Bold.otf +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Bold.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-BoldItalic.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Book.otf +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Book.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-BookItalic.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Light.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-LightItalic.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Medium.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-MediumItalic.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Semibold.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-SemiboldItalic.woff2 +0 -0
- package/src/fonts/nebula-sans/PROVENANCE.md +14 -0
- package/src/fonts/nebula-sans/social-fonts.generated.ts +3873 -0
- package/src/fonts.css +106 -0
- package/src/icons/act60/act60.svg +5 -0
- package/src/icons/act60/application.svg +9 -0
- package/src/icons/act60/chapter-compare.svg +3 -0
- package/src/icons/act60/decree-residence.svg +6 -0
- package/src/icons/act60/estimate.svg +7 -0
- package/src/icons/act60/export-services.svg +4 -0
- package/src/icons/act60/investor.svg +13 -0
- package/src/icons/act60/presence.svg +7 -0
- package/src/icons/aicharts/aicharts.svg +6 -0
- package/src/icons/aicharts/cost-compare.svg +4 -0
- package/src/icons/aicharts/task-audio.svg +7 -0
- package/src/icons/aicharts/task-coding.svg +6 -0
- package/src/icons/aicharts/task-images.svg +3 -0
- package/src/icons/aicharts/task-reasoning.svg +9 -0
- package/src/icons/aicharts/task-research.svg +5 -0
- package/src/icons/aicharts/task-video.svg +4 -0
- package/src/icons/manifest.json +1371 -0
- package/src/icons/platonik/conversation.svg +3 -0
- package/src/icons/platonik/creature.svg +7 -0
- package/src/icons/platonik/economy.svg +4 -0
- package/src/icons/platonik/keep-light.svg +6 -0
- package/src/icons/platonik/platonik.svg +7 -0
- package/src/icons/platonik/spark-route.svg +15 -0
- package/src/icons/receipts/act60-retry.receipt.json +888 -0
- package/src/icons/receipts/act60.receipt.json +1366 -0
- package/src/icons/receipts/aicharts.receipt.json +1546 -0
- package/src/icons/receipts/platonik.receipt.json +1011 -0
- package/src/icons/receipts/roughday.receipt.json +770 -0
- package/src/icons/receipts/shared.receipt.json +1296 -0
- package/src/icons/receipts/slopcamera.receipt.json +1495 -0
- package/src/icons/receipts/soundfish-retry.receipt.json +460 -0
- package/src/icons/receipts/soundfish.receipt.json +1709 -0
- package/src/icons/receipts/sponge.receipt.json +1743 -0
- package/src/icons/receipts/stripe-history-retry.receipt.json +145 -0
- package/src/icons/receipts/stripe-history.receipt.json +1202 -0
- package/src/icons/receipts/wordcell.receipt.json +1924 -0
- package/src/icons/roughday/finance.svg +7 -0
- package/src/icons/roughday/roughday.svg +6 -0
- package/src/icons/roughday/technology.svg +4 -0
- package/src/icons/roughday/world.svg +4 -0
- package/src/icons/sets/act60.json +63 -0
- package/src/icons/sets/aicharts.json +63 -0
- package/src/icons/sets/platonik.json +39 -0
- package/src/icons/sets/roughday.json +25 -0
- package/src/icons/sets/shared.json +12 -0
- package/src/icons/sets/slopcamera.json +47 -0
- package/src/icons/sets/soundfish.json +43 -0
- package/src/icons/sets/sponge.json +51 -0
- package/src/icons/sets/stripe-history.json +39 -0
- package/src/icons/sets/wordcell.json +51 -0
- package/src/icons/shared/agent-skill.svg +4 -0
- package/src/icons/shared/cli.svg +5 -0
- package/src/icons/shared/privacy.svg +3 -0
- package/src/icons/shared/research.svg +7 -0
- package/src/icons/shared/sdk.svg +3 -0
- package/src/icons/slopcamera/diagram.svg +3 -0
- package/src/icons/slopcamera/direct-scene.svg +5 -0
- package/src/icons/slopcamera/edit-video.svg +17 -0
- package/src/icons/slopcamera/mcp.svg +3 -0
- package/src/icons/slopcamera/native-world.svg +3 -0
- package/src/icons/slopcamera/slopcamera.svg +11 -0
- package/src/icons/soundfish/agent-ui.svg +7 -0
- package/src/icons/soundfish/collaborate.svg +5 -0
- package/src/icons/soundfish/compose.svg +3 -0
- package/src/icons/soundfish/hear.svg +6 -0
- package/src/icons/soundfish/human-ui.svg +6 -0
- package/src/icons/soundfish/share.svg +3 -0
- package/src/icons/soundfish/soundfish.svg +6 -0
- package/src/icons/sponge/api.svg +3 -0
- package/src/icons/sponge/documents.svg +3 -0
- package/src/icons/sponge/library.svg +3 -0
- package/src/icons/sponge/one-question.svg +5 -0
- package/src/icons/sponge/people-direct.svg +5 -0
- package/src/icons/sponge/read.svg +3 -0
- package/src/icons/sponge/save.svg +4 -0
- package/src/icons/sponge/sponge.svg +7 -0
- package/src/icons/stripe-history/company-history.svg +3 -0
- package/src/icons/stripe-history/evidence.svg +4 -0
- package/src/icons/stripe-history/independence.svg +7 -0
- package/src/icons/stripe-history/publications.svg +11 -0
- package/src/icons/stripe-history/sources.svg +6 -0
- package/src/icons/stripe-history/stripe-history.svg +3 -0
- package/src/icons/wordcell/backlinks.svg +6 -0
- package/src/icons/wordcell/capture.svg +6 -0
- package/src/icons/wordcell/git-provenance.svg +4 -0
- package/src/icons/wordcell/kb.svg +4 -0
- package/src/icons/wordcell/markdown.svg +4 -0
- package/src/icons/wordcell/scopes.svg +3 -0
- package/src/icons/wordcell/search.svg +7 -0
- package/src/icons.generated.ts +734 -0
- package/src/icons.ts +51 -0
- package/src/index.ts +275 -0
- package/src/lantern-material.css +213 -0
- package/src/launch.ts +624 -0
- package/src/marketing-assets/UPSTREAM.md +18 -0
- package/src/marketing-assets/cells.svg +1 -0
- package/src/marketing-assets/grain.svg +1 -0
- package/src/marketing-forced-colors.css +12 -0
- package/src/mockups/client.tsx +415 -0
- package/src/mockups/core.tsx +318 -0
- package/src/mockups/frames.tsx +368 -0
- package/src/mockups/index.ts +14 -0
- package/src/mockups/surfaces.tsx +681 -0
- package/src/mockups.css +2607 -0
- package/src/palette-appearance.ts +45 -0
- package/src/palette-bridge.css +124 -0
- package/src/palette-color.ts +41 -0
- package/src/palette-system.css +721 -0
- package/src/palette-themes.ts +23 -0
- package/src/palette-tokens.stylex.ts +519 -0
- package/src/palettes.css +3 -0
- package/src/palettes.ts +161 -0
- package/src/paper-theme.css +244 -0
- package/src/plain-publication.css +1241 -0
- package/src/plain-site.css +397 -0
- package/src/platforms.ts +151 -0
- package/src/portfolio.generated.json +1595 -0
- package/src/portfolio.generated.ts +1596 -0
- package/src/portfolio.ts +226 -0
- package/src/product-marketing-foundation.css +433 -0
- package/src/product-marketing-preset.css +261 -0
- package/src/product-marketing.css +2186 -0
- package/src/provider-marks.generated.ts +112 -0
- package/src/provider-marks.ts +143 -0
- package/src/react/animated-rail-stage.stylex.ts +15 -0
- package/src/react/animated-rail-stage.tsx +51 -0
- package/src/react/app-shell.stylex.ts +104 -0
- package/src/react/app-shell.tsx +121 -0
- package/src/react/article.tsx +602 -0
- package/src/react/aurora-dots-background.tsx +34 -0
- package/src/react/charts.stylex.ts +563 -0
- package/src/react/charts.tsx +610 -0
- package/src/react/chat.stylex.ts +34 -0
- package/src/react/chat.tsx +155 -0
- package/src/react/design-gallery.tsx +943 -0
- package/src/react/design-palette.stylex.ts +124 -0
- package/src/react/design-palette.tsx +196 -0
- package/src/react/design-theme-context.tsx +41 -0
- package/src/react/effects.stylex.ts +325 -0
- package/src/react/fader.stylex.ts +71 -0
- package/src/react/fader.tsx +151 -0
- package/src/react/foil-card-math.ts +100 -0
- package/src/react/foil-card-surface.stylex.ts +326 -0
- package/src/react/foil-card-surface.tsx +742 -0
- package/src/react/foil-mark.tsx +35 -0
- package/src/react/foil.stylex.ts +163 -0
- package/src/react/haptics.ts +228 -0
- package/src/react/hero-backdrop.tsx +22 -0
- package/src/react/index.ts +38 -0
- package/src/react/keyboard-shortcuts.ts +228 -0
- package/src/react/lantern-material-gallery.tsx +166 -0
- package/src/react/lantern-material.stylex.ts +39 -0
- package/src/react/launch-beats.tsx +73 -0
- package/src/react/navigation-rail.stylex.ts +130 -0
- package/src/react/navigation-rail.tsx +228 -0
- package/src/react/particle-halo.tsx +115 -0
- package/src/react/phaser-dots.tsx +501 -0
- package/src/react/platform-icons.tsx +94 -0
- package/src/react/platform-install.stylex.ts +385 -0
- package/src/react/platform-install.tsx +389 -0
- package/src/react/playback-transport.stylex.ts +14 -0
- package/src/react/playback-transport.tsx +112 -0
- package/src/react/procedural-backdrop.tsx +192 -0
- package/src/react/procedural-recipe.ts +323 -0
- package/src/react/product-marketing.stylex.ts +4469 -0
- package/src/react/product-marketing.tsx +1611 -0
- package/src/react/production-data-preview-notice.stylex.ts +40 -0
- package/src/react/production-data-preview-notice.tsx +34 -0
- package/src/react/provider-mark.stylex.ts +132 -0
- package/src/react/provider-mark.tsx +120 -0
- package/src/react/relative-time.tsx +117 -0
- package/src/react/route-state.stylex.ts +39 -0
- package/src/react/route-state.tsx +350 -0
- package/src/react/server.ts +11 -0
- package/src/react/social-kit-panel.tsx +103 -0
- package/src/react/sticky-offset.tsx +33 -0
- package/src/react/surfaces.stylex.ts +179 -0
- package/src/react/surfaces.tsx +330 -0
- package/src/react/syntax-code.tsx +33 -0
- package/src/react/theme-color-sync.ts +1 -0
- package/src/react/theme-resolution.ts +11 -0
- package/src/react/theme.stylex.ts +276 -0
- package/src/react/theme.tsx +402 -0
- package/src/reading.css +72 -0
- package/src/relative-time.ts +185 -0
- package/src/reset.css +2 -0
- package/src/site-shell.css +16 -0
- package/src/status-page-html.ts +63 -0
- package/src/status-page.css +276 -0
- package/src/status-page.ts +323 -0
- package/src/styles.css +21 -0
- package/src/syntax-code-lexers.ts +303 -0
- package/src/syntax-highlighting.css +78 -0
- package/src/syntax-highlighting.ts +477 -0
- package/src/syntax-tokens.ts +33 -0
- package/src/testing.ts +307 -0
- package/src/tokens.css +3 -0
- package/src/typography.css +86 -0
- package/vendor/evilcharts/LICENSE +21 -0
- package/vendor/evilcharts/UPSTREAM.md +14 -0
- package/vendor/platform-marks/LICENSE +30 -0
- package/vendor/platform-marks/UPSTREAM.md +15 -0
- package/vendor/platform-marks/apple.svg +1 -0
- package/vendor/platform-marks/linux.svg +1 -0
- package/vendor/provider-marks/CRUSH-LICENSE.md +134 -0
- package/vendor/provider-marks/LICENSE +21 -0
- package/vendor/provider-marks/UPSTREAM.md +27 -0
- package/vendor/provider-marks/aider.svg +3 -0
- package/vendor/provider-marks/crush-heartbit.svg +8 -0
- package/vendor/provider-marks/lobehub/alibabacloud-color.svg +1 -0
- package/vendor/provider-marks/lobehub/alibabacloud.svg +1 -0
- package/vendor/provider-marks/lobehub/amp-color.svg +1 -0
- package/vendor/provider-marks/lobehub/amp.svg +1 -0
- package/vendor/provider-marks/lobehub/anthropic.svg +1 -0
- package/vendor/provider-marks/lobehub/claude-color.svg +1 -0
- package/vendor/provider-marks/lobehub/claude.svg +1 -0
- package/vendor/provider-marks/lobehub/claudecode-color.svg +1 -0
- package/vendor/provider-marks/lobehub/claudecode.svg +1 -0
- package/vendor/provider-marks/lobehub/codex-color.svg +1 -0
- package/vendor/provider-marks/lobehub/codex.svg +1 -0
- package/vendor/provider-marks/lobehub/cursor.svg +1 -0
- package/vendor/provider-marks/lobehub/deepseek-color.svg +1 -0
- package/vendor/provider-marks/lobehub/deepseek.svg +1 -0
- package/vendor/provider-marks/lobehub/devin-color.svg +1 -0
- package/vendor/provider-marks/lobehub/devin.svg +1 -0
- package/vendor/provider-marks/lobehub/gemini-color.svg +1 -0
- package/vendor/provider-marks/lobehub/gemini.svg +1 -0
- package/vendor/provider-marks/lobehub/geminicli-color.svg +1 -0
- package/vendor/provider-marks/lobehub/geminicli.svg +1 -0
- package/vendor/provider-marks/lobehub/goose.svg +1 -0
- package/vendor/provider-marks/lobehub/meta-color.svg +1 -0
- package/vendor/provider-marks/lobehub/meta.svg +1 -0
- package/vendor/provider-marks/lobehub/mistral-color.svg +1 -0
- package/vendor/provider-marks/lobehub/mistral.svg +1 -0
- package/vendor/provider-marks/lobehub/moonshot.svg +1 -0
- package/vendor/provider-marks/lobehub/nvidia-color.svg +1 -0
- package/vendor/provider-marks/lobehub/nvidia.svg +1 -0
- package/vendor/provider-marks/lobehub/openai.svg +1 -0
- package/vendor/provider-marks/lobehub/opencode.svg +1 -0
- package/vendor/provider-marks/lobehub/perplexity-color.svg +1 -0
- package/vendor/provider-marks/lobehub/perplexity.svg +1 -0
- package/vendor/provider-marks/lobehub/qwen-color.svg +1 -0
- package/vendor/provider-marks/lobehub/qwen.svg +1 -0
- package/vendor/provider-marks/lobehub/xai.svg +1 -0
- package/vendor/provider-marks/lobehub/zai.svg +1 -0
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
HTMLAttributes,
|
|
3
|
+
ReactNode,
|
|
4
|
+
} from "react";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import * as stylex from "@stylexjs/stylex";
|
|
7
|
+
|
|
8
|
+
import { ThemedSurface, cn, type ThemedSurfaceProps } from "@hraness/ui";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
ditherSurfaceStyles,
|
|
12
|
+
layoutSurfaceStyles,
|
|
13
|
+
} from "./surfaces.stylex.js";
|
|
14
|
+
|
|
15
|
+
export type DitherSurfaceDensity = "coarse" | "fine" | "medium";
|
|
16
|
+
|
|
17
|
+
export interface DitherSurfaceProps extends ThemedSurfaceProps {
|
|
18
|
+
readonly density?: DitherSurfaceDensity;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const ditherSurfaceDensityStyles = {
|
|
22
|
+
coarse: ditherSurfaceStyles.coarse,
|
|
23
|
+
fine: ditherSurfaceStyles.fine,
|
|
24
|
+
medium: undefined,
|
|
25
|
+
} as const satisfies Readonly<Record<DitherSurfaceDensity, unknown>>;
|
|
26
|
+
|
|
27
|
+
export function DitherSurface({
|
|
28
|
+
className,
|
|
29
|
+
density = "medium",
|
|
30
|
+
xstyle,
|
|
31
|
+
...props
|
|
32
|
+
}: DitherSurfaceProps) {
|
|
33
|
+
return (
|
|
34
|
+
<ThemedSurface
|
|
35
|
+
{...props}
|
|
36
|
+
className={cn("hraness-design-dither-surface", className)}
|
|
37
|
+
data-density={density}
|
|
38
|
+
xstyle={[
|
|
39
|
+
ditherSurfaceStyles.texture,
|
|
40
|
+
// The public ThemedSurface seam intentionally types standard CSS
|
|
41
|
+
// properties. StyleX still extracts this package-owned literal custom
|
|
42
|
+
// property, so keep the narrow cast at the composition boundary.
|
|
43
|
+
ditherSurfaceDensityStyles[density] as ThemedSurfaceProps["xstyle"],
|
|
44
|
+
xstyle,
|
|
45
|
+
]}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface TopBarProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
51
|
+
readonly actions?: ReactNode;
|
|
52
|
+
readonly leading?: ReactNode;
|
|
53
|
+
readonly position?: "static" | "sticky";
|
|
54
|
+
readonly surface?: "glass" | "solid";
|
|
55
|
+
readonly title?: ReactNode;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function TopBar({
|
|
59
|
+
actions,
|
|
60
|
+
children,
|
|
61
|
+
className,
|
|
62
|
+
leading,
|
|
63
|
+
position = "static",
|
|
64
|
+
surface = "solid",
|
|
65
|
+
title,
|
|
66
|
+
...props
|
|
67
|
+
}: TopBarProps) {
|
|
68
|
+
const rootPresentation = stylex.props(
|
|
69
|
+
layoutSurfaceStyles.surface,
|
|
70
|
+
layoutSurfaceStyles.bar,
|
|
71
|
+
layoutSurfaceStyles.topBar,
|
|
72
|
+
position === "sticky"
|
|
73
|
+
? layoutSurfaceStyles.topBarSticky
|
|
74
|
+
: layoutSurfaceStyles.topBarStatic,
|
|
75
|
+
surface === "glass" && layoutSurfaceStyles.topBarGlass,
|
|
76
|
+
);
|
|
77
|
+
const leadingPresentation = stylex.props(layoutSurfaceStyles.barPart);
|
|
78
|
+
const titlePresentation = stylex.props(layoutSurfaceStyles.topBarTitle);
|
|
79
|
+
const contentPresentation = stylex.props(
|
|
80
|
+
layoutSurfaceStyles.barPart,
|
|
81
|
+
layoutSurfaceStyles.barContent,
|
|
82
|
+
);
|
|
83
|
+
const actionsPresentation = stylex.props(
|
|
84
|
+
layoutSurfaceStyles.barPart,
|
|
85
|
+
layoutSurfaceStyles.topBarActions,
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<header
|
|
90
|
+
{...rootPresentation}
|
|
91
|
+
{...props}
|
|
92
|
+
className={cn(
|
|
93
|
+
"hraness-design-top-bar",
|
|
94
|
+
rootPresentation.className,
|
|
95
|
+
className,
|
|
96
|
+
)}
|
|
97
|
+
data-position={position}
|
|
98
|
+
data-surface={surface}
|
|
99
|
+
>
|
|
100
|
+
<div
|
|
101
|
+
{...leadingPresentation}
|
|
102
|
+
className={cn(
|
|
103
|
+
"hraness-design-top-bar__leading",
|
|
104
|
+
leadingPresentation.className,
|
|
105
|
+
)}
|
|
106
|
+
>
|
|
107
|
+
{leading}
|
|
108
|
+
{title === undefined
|
|
109
|
+
? null
|
|
110
|
+
: (
|
|
111
|
+
<div
|
|
112
|
+
{...titlePresentation}
|
|
113
|
+
className={cn(
|
|
114
|
+
"hraness-design-top-bar__title",
|
|
115
|
+
titlePresentation.className,
|
|
116
|
+
)}
|
|
117
|
+
>
|
|
118
|
+
{title}
|
|
119
|
+
</div>
|
|
120
|
+
)}
|
|
121
|
+
</div>
|
|
122
|
+
{children === undefined
|
|
123
|
+
? null
|
|
124
|
+
: (
|
|
125
|
+
<div
|
|
126
|
+
{...contentPresentation}
|
|
127
|
+
className={cn(
|
|
128
|
+
"hraness-design-top-bar__content",
|
|
129
|
+
contentPresentation.className,
|
|
130
|
+
)}
|
|
131
|
+
>
|
|
132
|
+
{children}
|
|
133
|
+
</div>
|
|
134
|
+
)}
|
|
135
|
+
{actions === undefined
|
|
136
|
+
? null
|
|
137
|
+
: (
|
|
138
|
+
<div
|
|
139
|
+
{...actionsPresentation}
|
|
140
|
+
className={cn(
|
|
141
|
+
"hraness-design-top-bar__actions",
|
|
142
|
+
actionsPresentation.className,
|
|
143
|
+
)}
|
|
144
|
+
>
|
|
145
|
+
{actions}
|
|
146
|
+
</div>
|
|
147
|
+
)}
|
|
148
|
+
</header>
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface BottomBarProps extends HTMLAttributes<HTMLElement> {
|
|
153
|
+
readonly actions?: ReactNode;
|
|
154
|
+
readonly leading?: ReactNode;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function BottomBar({ actions, children, className, leading, ...props }: BottomBarProps) {
|
|
158
|
+
const rootPresentation = stylex.props(
|
|
159
|
+
layoutSurfaceStyles.surface,
|
|
160
|
+
layoutSurfaceStyles.bar,
|
|
161
|
+
layoutSurfaceStyles.bottomBar,
|
|
162
|
+
);
|
|
163
|
+
const leadingPresentation = stylex.props(layoutSurfaceStyles.barPart);
|
|
164
|
+
const contentPresentation = stylex.props(
|
|
165
|
+
layoutSurfaceStyles.barPart,
|
|
166
|
+
layoutSurfaceStyles.barContent,
|
|
167
|
+
);
|
|
168
|
+
const actionsPresentation = stylex.props(layoutSurfaceStyles.barPart);
|
|
169
|
+
|
|
170
|
+
return (
|
|
171
|
+
<footer
|
|
172
|
+
{...rootPresentation}
|
|
173
|
+
{...props}
|
|
174
|
+
className={cn(
|
|
175
|
+
"hraness-design-bottom-bar",
|
|
176
|
+
rootPresentation.className,
|
|
177
|
+
className,
|
|
178
|
+
)}
|
|
179
|
+
>
|
|
180
|
+
{leading === undefined
|
|
181
|
+
? null
|
|
182
|
+
: (
|
|
183
|
+
<div
|
|
184
|
+
{...leadingPresentation}
|
|
185
|
+
className={cn(
|
|
186
|
+
"hraness-design-bottom-bar__leading",
|
|
187
|
+
leadingPresentation.className,
|
|
188
|
+
)}
|
|
189
|
+
>
|
|
190
|
+
{leading}
|
|
191
|
+
</div>
|
|
192
|
+
)}
|
|
193
|
+
<div
|
|
194
|
+
{...contentPresentation}
|
|
195
|
+
className={cn(
|
|
196
|
+
"hraness-design-bottom-bar__content",
|
|
197
|
+
contentPresentation.className,
|
|
198
|
+
)}
|
|
199
|
+
>
|
|
200
|
+
{children}
|
|
201
|
+
</div>
|
|
202
|
+
{actions === undefined
|
|
203
|
+
? null
|
|
204
|
+
: (
|
|
205
|
+
<div
|
|
206
|
+
{...actionsPresentation}
|
|
207
|
+
className={cn(
|
|
208
|
+
"hraness-design-bottom-bar__actions",
|
|
209
|
+
actionsPresentation.className,
|
|
210
|
+
)}
|
|
211
|
+
>
|
|
212
|
+
{actions}
|
|
213
|
+
</div>
|
|
214
|
+
)}
|
|
215
|
+
</footer>
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface PageCanvasProps extends HTMLAttributes<HTMLElement> {
|
|
220
|
+
readonly as?: "div" | "main";
|
|
221
|
+
readonly inset?: "content" | "none";
|
|
222
|
+
readonly size?: "default" | "full" | "wide";
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export function PageCanvas({
|
|
226
|
+
as = "main",
|
|
227
|
+
className,
|
|
228
|
+
inset = "content",
|
|
229
|
+
size = "default",
|
|
230
|
+
...props
|
|
231
|
+
}: PageCanvasProps) {
|
|
232
|
+
const Element = as;
|
|
233
|
+
const presentation = stylex.props(
|
|
234
|
+
layoutSurfaceStyles.pageCanvas,
|
|
235
|
+
inset === "content"
|
|
236
|
+
? layoutSurfaceStyles.pageContentInset
|
|
237
|
+
: layoutSurfaceStyles.pageNoInset,
|
|
238
|
+
size === "wide" && layoutSurfaceStyles.wideSize,
|
|
239
|
+
size === "full" && layoutSurfaceStyles.fullSize,
|
|
240
|
+
);
|
|
241
|
+
|
|
242
|
+
return (
|
|
243
|
+
<Element
|
|
244
|
+
{...presentation}
|
|
245
|
+
{...props}
|
|
246
|
+
className={cn(
|
|
247
|
+
"hraness-design-page-canvas",
|
|
248
|
+
presentation.className,
|
|
249
|
+
className,
|
|
250
|
+
)}
|
|
251
|
+
data-inset={inset}
|
|
252
|
+
data-size={size}
|
|
253
|
+
/>
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface DockedFooterProps extends HTMLAttributes<HTMLElement> {
|
|
258
|
+
readonly contentClassName?: string;
|
|
259
|
+
readonly density?: "compact" | "default";
|
|
260
|
+
readonly inset?: "content" | "none";
|
|
261
|
+
readonly position?: "absolute" | "fixed" | "sticky";
|
|
262
|
+
readonly size?: "default" | "full" | "wide";
|
|
263
|
+
readonly surface?: "glass" | "solid";
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export const DockedFooter = forwardRef<HTMLElement, DockedFooterProps>(function DockedFooter(
|
|
267
|
+
{
|
|
268
|
+
children,
|
|
269
|
+
className,
|
|
270
|
+
contentClassName,
|
|
271
|
+
density = "default",
|
|
272
|
+
inset = "content",
|
|
273
|
+
position = "fixed",
|
|
274
|
+
size = "default",
|
|
275
|
+
surface = "solid",
|
|
276
|
+
...props
|
|
277
|
+
},
|
|
278
|
+
ref,
|
|
279
|
+
) {
|
|
280
|
+
const rootPresentation = stylex.props(
|
|
281
|
+
layoutSurfaceStyles.surface,
|
|
282
|
+
layoutSurfaceStyles.dockedFooter,
|
|
283
|
+
position === "absolute"
|
|
284
|
+
? layoutSurfaceStyles.dockedAbsolute
|
|
285
|
+
: position === "sticky"
|
|
286
|
+
? layoutSurfaceStyles.dockedSticky
|
|
287
|
+
: layoutSurfaceStyles.dockedFixed,
|
|
288
|
+
);
|
|
289
|
+
const contentPresentation = stylex.props(
|
|
290
|
+
layoutSurfaceStyles.dockedContent,
|
|
291
|
+
density === "compact"
|
|
292
|
+
? inset === "content"
|
|
293
|
+
? layoutSurfaceStyles.dockedContentCompactInset
|
|
294
|
+
: layoutSurfaceStyles.dockedContentCompactNoInset
|
|
295
|
+
: inset === "content"
|
|
296
|
+
? layoutSurfaceStyles.dockedContentDefaultInset
|
|
297
|
+
: layoutSurfaceStyles.dockedContentDefaultNoInset,
|
|
298
|
+
size === "wide" && layoutSurfaceStyles.wideSize,
|
|
299
|
+
size === "full" && layoutSurfaceStyles.fullSize,
|
|
300
|
+
);
|
|
301
|
+
|
|
302
|
+
return (
|
|
303
|
+
<footer
|
|
304
|
+
{...rootPresentation}
|
|
305
|
+
{...props}
|
|
306
|
+
className={cn(
|
|
307
|
+
"hraness-design-docked-footer",
|
|
308
|
+
rootPresentation.className,
|
|
309
|
+
className,
|
|
310
|
+
)}
|
|
311
|
+
data-position={position}
|
|
312
|
+
data-surface={surface}
|
|
313
|
+
ref={ref}
|
|
314
|
+
>
|
|
315
|
+
<div
|
|
316
|
+
{...contentPresentation}
|
|
317
|
+
className={cn(
|
|
318
|
+
"hraness-design-docked-footer__content",
|
|
319
|
+
contentPresentation.className,
|
|
320
|
+
contentClassName,
|
|
321
|
+
)}
|
|
322
|
+
data-density={density}
|
|
323
|
+
data-inset={inset}
|
|
324
|
+
data-size={size}
|
|
325
|
+
>
|
|
326
|
+
{children}
|
|
327
|
+
</div>
|
|
328
|
+
</footer>
|
|
329
|
+
);
|
|
330
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
highlightCode,
|
|
3
|
+
type HighlightCodeOptions,
|
|
4
|
+
} from "../syntax-highlighting.js";
|
|
5
|
+
|
|
6
|
+
export interface SyntaxCodeProps {
|
|
7
|
+
readonly className?: string;
|
|
8
|
+
readonly code: string;
|
|
9
|
+
/** A language/fence hint; omitted hints use conservative automatic selection. */
|
|
10
|
+
readonly language?: string;
|
|
11
|
+
readonly styles?: HighlightCodeOptions["styles"];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Server-rendered syntax markup with no client runtime or hydration cost. */
|
|
15
|
+
export function SyntaxCode({
|
|
16
|
+
className,
|
|
17
|
+
code,
|
|
18
|
+
language,
|
|
19
|
+
styles,
|
|
20
|
+
}: SyntaxCodeProps) {
|
|
21
|
+
const highlighted = highlightCode(code, language, styles === undefined ? {} : { styles });
|
|
22
|
+
const classes = className === undefined
|
|
23
|
+
? highlighted.className
|
|
24
|
+
: `${highlighted.className} ${className}`;
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<code
|
|
28
|
+
className={classes}
|
|
29
|
+
data-language={highlighted.language}
|
|
30
|
+
dangerouslySetInnerHTML={{ __html: highlighted.html }}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../browser/theme-color-sync.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ConcreteDesignTheme } from "../appearance.js";
|
|
2
|
+
|
|
3
|
+
/** next-themes keeps the saved/resolved preference separate from a forced mode. */
|
|
4
|
+
export function resolveEffectiveTheme(
|
|
5
|
+
forcedTheme: unknown,
|
|
6
|
+
resolvedTheme: unknown,
|
|
7
|
+
): ConcreteDesignTheme | undefined {
|
|
8
|
+
if (forcedTheme === "light" || forcedTheme === "dark") return forcedTheme;
|
|
9
|
+
if (resolvedTheme === "light" || resolvedTheme === "dark") return resolvedTheme;
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import * as stylex from "@stylexjs/stylex";
|
|
2
|
+
|
|
3
|
+
const coarsePointer = "@media (pointer: coarse)";
|
|
4
|
+
const forcedColors = "@media (forced-colors: active)";
|
|
5
|
+
const reducedMotion = "@media (prefers-reduced-motion: reduce)";
|
|
6
|
+
const disabled = ":disabled";
|
|
7
|
+
const focusVisible = ":is([data-focus-visible], :focus-visible)";
|
|
8
|
+
const hidden = ":is([hidden])";
|
|
9
|
+
const hovered = ":is([data-hovered], :hover)";
|
|
10
|
+
const itemFocusedOrHovered =
|
|
11
|
+
":is([data-focused], [data-hovered], :focus-visible, :hover)";
|
|
12
|
+
const pressed = ":is([data-pressed], :active)";
|
|
13
|
+
|
|
14
|
+
// The popover is portalled outside the menu root, so its paint reads the
|
|
15
|
+
// inherited Lantern tokens directly after any caller-set appearance variable.
|
|
16
|
+
const lanternAccent =
|
|
17
|
+
"var(--hraness-material-warm-plane, var(--ui-accent, ButtonFace))";
|
|
18
|
+
const lanternAccentForeground =
|
|
19
|
+
"var(--hraness-material-ink, var(--ui-accent-foreground, ButtonText))";
|
|
20
|
+
const lanternPopoverBackground =
|
|
21
|
+
"var(--hraness-material-plane, var(--ui-popover, Canvas))";
|
|
22
|
+
const lanternPopoverForeground =
|
|
23
|
+
"var(--hraness-material-ink, var(--ui-popover-foreground, CanvasText))";
|
|
24
|
+
const accent = `var(--hraness-appearance-accent, ${lanternAccent})`;
|
|
25
|
+
const accentForeground =
|
|
26
|
+
`var(--hraness-appearance-accent-foreground, ${lanternAccentForeground})`;
|
|
27
|
+
const popoverForeground =
|
|
28
|
+
`var(--hraness-appearance-popover-foreground, ${lanternPopoverForeground})`;
|
|
29
|
+
const controlBorder =
|
|
30
|
+
"var(--hraness-appearance-control-border, var(--hraness-material-seam, var(--ui-input, GrayText)))";
|
|
31
|
+
|
|
32
|
+
export const themeStyles = stylex.create({
|
|
33
|
+
item: {
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
backgroundAttachment: { default: null, [itemFocusedOrHovered]: "scroll" },
|
|
36
|
+
backgroundClip: { default: null, [itemFocusedOrHovered]: "border-box" },
|
|
37
|
+
backgroundImage: { default: null, [itemFocusedOrHovered]: "none" },
|
|
38
|
+
backgroundOrigin: { default: null, [itemFocusedOrHovered]: "padding-box" },
|
|
39
|
+
backgroundPosition: { default: null, [itemFocusedOrHovered]: "0% 0%" },
|
|
40
|
+
backgroundRepeat: { default: null, [itemFocusedOrHovered]: "repeat" },
|
|
41
|
+
backgroundSize: { default: null, [itemFocusedOrHovered]: "auto auto" },
|
|
42
|
+
backgroundColor: {
|
|
43
|
+
default: null,
|
|
44
|
+
[itemFocusedOrHovered]: accent,
|
|
45
|
+
},
|
|
46
|
+
borderRadius: "var(--radius-md, 0.5rem)",
|
|
47
|
+
color: {
|
|
48
|
+
default: popoverForeground,
|
|
49
|
+
[itemFocusedOrHovered]: accentForeground,
|
|
50
|
+
},
|
|
51
|
+
cursor: "default",
|
|
52
|
+
display: "grid",
|
|
53
|
+
fontSize: "var(--text-label, 0.875rem)",
|
|
54
|
+
gap: "0.75rem",
|
|
55
|
+
gridTemplateColumns: "auto minmax(0, 1fr)",
|
|
56
|
+
lineHeight: 1.25,
|
|
57
|
+
"min-block-size": {
|
|
58
|
+
default: "2.5rem",
|
|
59
|
+
[coarsePointer]: "3rem",
|
|
60
|
+
},
|
|
61
|
+
outlineStyle: "none",
|
|
62
|
+
paddingBlock: "0.5rem",
|
|
63
|
+
paddingInline: "0.75rem",
|
|
64
|
+
userSelect: "none",
|
|
65
|
+
},
|
|
66
|
+
itemSelected: {
|
|
67
|
+
backgroundAttachment: { default: null, [itemFocusedOrHovered]: "scroll", [forcedColors]: "scroll" },
|
|
68
|
+
backgroundClip: { default: null, [itemFocusedOrHovered]: "border-box", [forcedColors]: "border-box" },
|
|
69
|
+
backgroundImage: { default: null, [itemFocusedOrHovered]: "none", [forcedColors]: "none" },
|
|
70
|
+
backgroundOrigin: { default: null, [itemFocusedOrHovered]: "padding-box", [forcedColors]: "padding-box" },
|
|
71
|
+
backgroundPosition: { default: null, [itemFocusedOrHovered]: "0% 0%", [forcedColors]: "0% 0%" },
|
|
72
|
+
backgroundRepeat: { default: null, [itemFocusedOrHovered]: "repeat", [forcedColors]: "repeat" },
|
|
73
|
+
backgroundSize: { default: null, [itemFocusedOrHovered]: "auto auto", [forcedColors]: "auto auto" },
|
|
74
|
+
// Lantern marks the selected appearance with its warm plane at rest.
|
|
75
|
+
backgroundColor: {
|
|
76
|
+
default: "var(--hraness-material-warm-plane, transparent)",
|
|
77
|
+
[itemFocusedOrHovered]: accent,
|
|
78
|
+
[forcedColors]: "Highlight",
|
|
79
|
+
},
|
|
80
|
+
color: {
|
|
81
|
+
default: popoverForeground,
|
|
82
|
+
[itemFocusedOrHovered]: accentForeground,
|
|
83
|
+
[forcedColors]: "HighlightText",
|
|
84
|
+
},
|
|
85
|
+
fontWeight: "var(--font-weight-medium, 550)",
|
|
86
|
+
},
|
|
87
|
+
menu: {
|
|
88
|
+
display: "grid",
|
|
89
|
+
"max-block-size": "min(24rem, 70vh)",
|
|
90
|
+
outlineStyle: "none",
|
|
91
|
+
overflow: "auto",
|
|
92
|
+
paddingBlock: "0.25rem",
|
|
93
|
+
paddingInline: "0.25rem",
|
|
94
|
+
},
|
|
95
|
+
menuRoot: {
|
|
96
|
+
// Lantern tokens exist only inside a data-hraness-material="lantern"
|
|
97
|
+
// island, so each chain falls through to the palette outside one.
|
|
98
|
+
"--hraness-appearance-accent": lanternAccent,
|
|
99
|
+
"--hraness-appearance-accent-foreground": lanternAccentForeground,
|
|
100
|
+
"--hraness-appearance-control-background":
|
|
101
|
+
"var(--hraness-material-plane, var(--ui-background, Canvas))",
|
|
102
|
+
"--hraness-appearance-control-border":
|
|
103
|
+
"var(--hraness-material-seam, var(--ui-input, GrayText))",
|
|
104
|
+
"--hraness-appearance-control-foreground":
|
|
105
|
+
"var(--hraness-material-ink, var(--ui-foreground, CanvasText))",
|
|
106
|
+
"--hraness-appearance-focus":
|
|
107
|
+
"var(--hraness-material-focus, var(--ui-ring, Highlight))",
|
|
108
|
+
"--hraness-appearance-popover-background": lanternPopoverBackground,
|
|
109
|
+
"--hraness-appearance-popover-foreground": lanternPopoverForeground,
|
|
110
|
+
color: "var(--hraness-appearance-control-foreground)",
|
|
111
|
+
position: "relative",
|
|
112
|
+
},
|
|
113
|
+
notReady: {
|
|
114
|
+
opacity: 0.64,
|
|
115
|
+
},
|
|
116
|
+
popover: {
|
|
117
|
+
borderImageSource: "none",
|
|
118
|
+
borderImageSlice: "100%",
|
|
119
|
+
borderImageWidth: "1",
|
|
120
|
+
borderImageOutset: "0",
|
|
121
|
+
borderImageRepeat: "stretch",
|
|
122
|
+
backgroundAttachment: "scroll",
|
|
123
|
+
backgroundClip: "border-box",
|
|
124
|
+
backgroundImage: "none",
|
|
125
|
+
backgroundOrigin: "padding-box",
|
|
126
|
+
backgroundPosition: "0% 0%",
|
|
127
|
+
backgroundRepeat: "repeat",
|
|
128
|
+
backgroundSize: "auto auto",
|
|
129
|
+
backgroundColor:
|
|
130
|
+
`var(--hraness-appearance-popover-background, ${lanternPopoverBackground})`,
|
|
131
|
+
borderColor: {
|
|
132
|
+
default: controlBorder,
|
|
133
|
+
[forcedColors]: "CanvasText",
|
|
134
|
+
},
|
|
135
|
+
borderRadius: "var(--radius-lg, 0.75rem)",
|
|
136
|
+
borderStyle: "solid",
|
|
137
|
+
borderWidth: 1,
|
|
138
|
+
boxShadow: {
|
|
139
|
+
default:
|
|
140
|
+
"var(--hraness-material-lift, var(--elevation-overlay, 0 18px 48px -18px rgb(0 0 0 / 32%)))",
|
|
141
|
+
[forcedColors]: "none",
|
|
142
|
+
},
|
|
143
|
+
color: popoverForeground,
|
|
144
|
+
display: {
|
|
145
|
+
default: null,
|
|
146
|
+
[hidden]: "none",
|
|
147
|
+
},
|
|
148
|
+
forcedColorAdjust: {
|
|
149
|
+
default: null,
|
|
150
|
+
[forcedColors]: "auto",
|
|
151
|
+
},
|
|
152
|
+
"max-inline-size": "calc(100vw - 2rem)",
|
|
153
|
+
outlineStyle: "none",
|
|
154
|
+
overflow: "hidden",
|
|
155
|
+
"inline-size": "min(12rem, calc(100vw - 2rem))",
|
|
156
|
+
"z-index": "var(--z-tooltip, 3000)",
|
|
157
|
+
},
|
|
158
|
+
root: {
|
|
159
|
+
display: "inline-flex",
|
|
160
|
+
"min-inline-size": 0,
|
|
161
|
+
},
|
|
162
|
+
trigger: {
|
|
163
|
+
borderImageSource: "none",
|
|
164
|
+
borderImageSlice: "100%",
|
|
165
|
+
borderImageWidth: "1",
|
|
166
|
+
borderImageOutset: "0",
|
|
167
|
+
borderImageRepeat: "stretch",
|
|
168
|
+
backgroundAttachment: { default: "scroll", [hovered]: "scroll" },
|
|
169
|
+
backgroundClip: { default: "border-box", [hovered]: "border-box" },
|
|
170
|
+
backgroundImage: { default: "none", [hovered]: "none" },
|
|
171
|
+
backgroundOrigin: { default: "padding-box", [hovered]: "padding-box" },
|
|
172
|
+
backgroundPosition: { default: "0% 0%", [hovered]: "0% 0%" },
|
|
173
|
+
backgroundRepeat: { default: "repeat", [hovered]: "repeat" },
|
|
174
|
+
backgroundSize: { default: "auto auto", [hovered]: "auto auto" },
|
|
175
|
+
backgroundColor: {
|
|
176
|
+
default:
|
|
177
|
+
"var(--hraness-appearance-control-background, var(--hraness-material-plane, var(--ui-background, Canvas)))",
|
|
178
|
+
[hovered]: accent,
|
|
179
|
+
},
|
|
180
|
+
borderColor: {
|
|
181
|
+
default: controlBorder,
|
|
182
|
+
[forcedColors]: "CanvasText",
|
|
183
|
+
},
|
|
184
|
+
borderRadius: "var(--radius-md, 0.5rem)",
|
|
185
|
+
borderStyle: "solid",
|
|
186
|
+
borderWidth: 1,
|
|
187
|
+
// Lantern raises the trigger at rest and sets it into the plane while
|
|
188
|
+
// pressed. Both tokens are undefined outside Lantern and none in forced
|
|
189
|
+
// colors, so other palettes keep a flat trigger.
|
|
190
|
+
boxShadow: {
|
|
191
|
+
default: "var(--hraness-material-raised, none)",
|
|
192
|
+
[focusVisible]:
|
|
193
|
+
"0 0 0 4px color-mix(in srgb, var(--hraness-appearance-focus, var(--hraness-material-focus, var(--ui-ring, Highlight))) 24%, transparent)",
|
|
194
|
+
[pressed]: "var(--hraness-material-inset, none)",
|
|
195
|
+
[forcedColors]: "none",
|
|
196
|
+
},
|
|
197
|
+
color: {
|
|
198
|
+
default:
|
|
199
|
+
"var(--hraness-appearance-control-foreground, var(--hraness-material-ink, var(--ui-foreground, CanvasText)))",
|
|
200
|
+
[hovered]: accentForeground,
|
|
201
|
+
},
|
|
202
|
+
cursor: {
|
|
203
|
+
default: "pointer",
|
|
204
|
+
[disabled]: "not-allowed",
|
|
205
|
+
},
|
|
206
|
+
display: "inline-grid",
|
|
207
|
+
fontFamily: "inherit",
|
|
208
|
+
fontFeatureSettings: "inherit",
|
|
209
|
+
fontKerning: "inherit",
|
|
210
|
+
fontLanguageOverride: "inherit",
|
|
211
|
+
fontOpticalSizing: "inherit",
|
|
212
|
+
fontSizeAdjust: "inherit",
|
|
213
|
+
fontVariationSettings: "inherit",
|
|
214
|
+
fontSize: "inherit",
|
|
215
|
+
fontStretch: "inherit",
|
|
216
|
+
fontStyle: "inherit",
|
|
217
|
+
fontVariant: "inherit",
|
|
218
|
+
fontWeight: "inherit",
|
|
219
|
+
forcedColorAdjust: {
|
|
220
|
+
default: null,
|
|
221
|
+
[forcedColors]: "auto",
|
|
222
|
+
},
|
|
223
|
+
"inline-size": {
|
|
224
|
+
default: "2rem",
|
|
225
|
+
[coarsePointer]: "3rem",
|
|
226
|
+
},
|
|
227
|
+
lineHeight: "inherit",
|
|
228
|
+
"min-block-size": {
|
|
229
|
+
default: "2rem",
|
|
230
|
+
[coarsePointer]: "3rem",
|
|
231
|
+
},
|
|
232
|
+
"min-inline-size": {
|
|
233
|
+
default: "2rem",
|
|
234
|
+
[coarsePointer]: "3rem",
|
|
235
|
+
},
|
|
236
|
+
opacity: {
|
|
237
|
+
default: null,
|
|
238
|
+
[disabled]: 0.5,
|
|
239
|
+
},
|
|
240
|
+
outlineColor: {
|
|
241
|
+
default: null,
|
|
242
|
+
[focusVisible]:
|
|
243
|
+
"var(--hraness-appearance-focus, var(--hraness-material-focus, var(--ui-ring, Highlight)))",
|
|
244
|
+
[forcedColors]: "Highlight",
|
|
245
|
+
},
|
|
246
|
+
outlineOffset: {
|
|
247
|
+
default: null,
|
|
248
|
+
[focusVisible]: 2,
|
|
249
|
+
},
|
|
250
|
+
outlineStyle: {
|
|
251
|
+
default: "none",
|
|
252
|
+
[focusVisible]: "solid",
|
|
253
|
+
},
|
|
254
|
+
outlineWidth: {
|
|
255
|
+
default: null,
|
|
256
|
+
[focusVisible]: 2,
|
|
257
|
+
},
|
|
258
|
+
paddingBlock: 0,
|
|
259
|
+
paddingInline: 0,
|
|
260
|
+
placeItems: "center",
|
|
261
|
+
touchAction: "manipulation",
|
|
262
|
+
transform: {
|
|
263
|
+
default: null,
|
|
264
|
+
[pressed]: "translateY(1px)",
|
|
265
|
+
},
|
|
266
|
+
transitionDelay: "0s, 0s, 0s, 0s, 0s",
|
|
267
|
+
transitionDuration: {
|
|
268
|
+
default: "120ms, 120ms, 120ms, 120ms, 120ms",
|
|
269
|
+
[reducedMotion]: "0.01ms",
|
|
270
|
+
},
|
|
271
|
+
transitionProperty:
|
|
272
|
+
"background-color, border-color, box-shadow, color, transform",
|
|
273
|
+
transitionTimingFunction:
|
|
274
|
+
"cubic-bezier(0.2, 0, 0, 1), cubic-bezier(0.2, 0, 0, 1), cubic-bezier(0.2, 0, 0, 1), cubic-bezier(0.2, 0, 0, 1), cubic-bezier(0.2, 0, 0, 1)",
|
|
275
|
+
},
|
|
276
|
+
});
|