@sinnstack/ui 0.0.0-stage → 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/CHANGELOG.md +15 -0
- package/LICENSE +373 -0
- package/README.md +186 -2
- package/docs/blocks.md +364 -0
- package/docs/data.md +128 -0
- package/docs/motion.md +166 -0
- package/docs/primitives.md +510 -0
- package/docs/seo.md +187 -0
- package/docs/tokens.md +122 -0
- package/package.json +141 -3
- package/scripts/check-contrast.mjs +180 -0
- package/src/blocks/BlockRenderer.astro +54 -0
- package/src/blocks/CTABanner.astro +121 -0
- package/src/blocks/CTAPair.astro +110 -0
- package/src/blocks/CardGrid.astro +167 -0
- package/src/blocks/ConsentEmbed.astro +125 -0
- package/src/blocks/ConsentManager.astro +147 -0
- package/src/blocks/ConsentScript.astro +47 -0
- package/src/blocks/ContactCard.astro +164 -0
- package/src/blocks/ContactForm.astro +224 -0
- package/src/blocks/ErrorPage.astro +242 -0
- package/src/blocks/FAQ.astro +135 -0
- package/src/blocks/FeatureGrid.astro +148 -0
- package/src/blocks/Hero.astro +171 -0
- package/src/blocks/HeroCarousel.astro +220 -0
- package/src/blocks/HighlightCards.astro +107 -0
- package/src/blocks/LocationHours.astro +311 -0
- package/src/blocks/LogoCloud.astro +135 -0
- package/src/blocks/MaintenancePage.astro +168 -0
- package/src/blocks/MediaText.astro +177 -0
- package/src/blocks/PageHeader.astro +126 -0
- package/src/blocks/ProseSection.astro +98 -0
- package/src/blocks/Reviews.astro +194 -0
- package/src/blocks/RichText.astro +57 -0
- package/src/blocks/StatsBand.astro +117 -0
- package/src/blocks/Steps.astro +141 -0
- package/src/blocks/Testimonials.astro +144 -0
- package/src/blocks/Topbar.astro +158 -0
- package/src/blocks/cms/card-grid.ts +80 -0
- package/src/blocks/cms/consent.ts +45 -0
- package/src/blocks/cms/contact-card.ts +88 -0
- package/src/blocks/cms/contact-form.ts +55 -0
- package/src/blocks/cms/cta-banner.ts +48 -0
- package/src/blocks/cms/cta-pair.ts +63 -0
- package/src/blocks/cms/data-base.ts +7 -0
- package/src/blocks/cms/data.ts +257 -0
- package/src/blocks/cms/faq.ts +70 -0
- package/src/blocks/cms/feature-grid.ts +80 -0
- package/src/blocks/cms/fixtures.ts +599 -0
- package/src/blocks/cms/hero-carousel.ts +80 -0
- package/src/blocks/cms/hero.ts +77 -0
- package/src/blocks/cms/highlight-cards.ts +76 -0
- package/src/blocks/cms/images.ts +38 -0
- package/src/blocks/cms/index.ts +87 -0
- package/src/blocks/cms/location-hours.ts +149 -0
- package/src/blocks/cms/logo-cloud.ts +62 -0
- package/src/blocks/cms/media-text.ts +44 -0
- package/src/blocks/cms/page-header.ts +49 -0
- package/src/blocks/cms/pages.ts +81 -0
- package/src/blocks/cms/prose-section.ts +45 -0
- package/src/blocks/cms/reviews.ts +101 -0
- package/src/blocks/cms/shared.ts +115 -0
- package/src/blocks/cms/stats-band.ts +61 -0
- package/src/blocks/cms/steps.ts +67 -0
- package/src/blocks/cms/testimonials.ts +80 -0
- package/src/blocks/cms/topbar.ts +64 -0
- package/src/blocks/cms/types.ts +63 -0
- package/src/blocks/consent.ts +14 -0
- package/src/blocks/icons.ts +47 -0
- package/src/blocks/index.ts +42 -0
- package/src/blocks/internal/Actions.astro +29 -0
- package/src/blocks/internal/BlockHeader.astro +45 -0
- package/src/blocks/internal/BlockShell.astro +58 -0
- package/src/blocks/internal/CarouselScript.astro +7 -0
- package/src/blocks/internal/ConsentEmbedScript.astro +7 -0
- package/src/blocks/internal/ConsentManagerScript.astro +7 -0
- package/src/blocks/internal/HoursScript.astro +7 -0
- package/src/blocks/internal/Placeholder.astro +13 -0
- package/src/blocks/internal/RichTextNode.astro +133 -0
- package/src/blocks/internal/StandaloneDocument.astro +53 -0
- package/src/blocks/internal/tina.ts +19 -0
- package/src/blocks/internal/util.ts +23 -0
- package/src/blocks/lib/consent.ts +96 -0
- package/src/blocks/lib/contact.ts +86 -0
- package/src/blocks/lib/error-pages.ts +119 -0
- package/src/blocks/lib/faq.ts +37 -0
- package/src/blocks/lib/hours.ts +201 -0
- package/src/blocks/lib/maintenance.ts +129 -0
- package/src/blocks/lib/reviews.ts +22 -0
- package/src/blocks/lib/rich-text.ts +143 -0
- package/src/blocks/lib/slug.ts +12 -0
- package/src/blocks/registry.ts +79 -0
- package/src/blocks/scripts/carousel.ts +218 -0
- package/src/blocks/scripts/consent-embed.ts +105 -0
- package/src/blocks/scripts/consent-manager.ts +112 -0
- package/src/blocks/scripts/consent-store.ts +86 -0
- package/src/blocks/scripts/error-page.ts +71 -0
- package/src/blocks/scripts/hours.ts +106 -0
- package/src/blocks/scripts/maintenance.ts +109 -0
- package/src/blocks/styles/blocks.css +1320 -0
- package/src/blocks/styles/consent.css +102 -0
- package/src/blocks/styles/faq.css +28 -0
- package/src/blocks/styles/location.css +92 -0
- package/src/blocks/styles/prose-section.css +13 -0
- package/src/blocks/styles/quotes.css +123 -0
- package/src/blocks/styles/rich-text.css +14 -0
- package/src/blocks/types.ts +283 -0
- package/src/data/ChartAxis.astro +19 -0
- package/src/data/ChartContainer.astro +151 -0
- package/src/data/ChartLegend.astro +25 -0
- package/src/data/ChartSeries.astro +14 -0
- package/src/data/ChartTable.astro +17 -0
- package/src/data/ChartTooltip.astro +20 -0
- package/src/data/Sparkline.astro +55 -0
- package/src/data/cms.ts +190 -0
- package/src/data/index.ts +10 -0
- package/src/data/lib/chart.ts +450 -0
- package/src/data/lib/render.ts +219 -0
- package/src/data/lib/scale.ts +107 -0
- package/src/data/lib/sparkline.ts +117 -0
- package/src/data/scripts/chart.ts +324 -0
- package/src/data/styles/chart.css +392 -0
- package/src/motion/Marquee.astro +90 -0
- package/src/motion/MotionProvider.astro +50 -0
- package/src/motion/PageTransitions.astro +61 -0
- package/src/motion/Parallax.astro +44 -0
- package/src/motion/ParallaxLayer.astro +31 -0
- package/src/motion/RevealOnScroll.astro +59 -0
- package/src/motion/SceneRegistry.astro +38 -0
- package/src/motion/ScrollScene.astro +81 -0
- package/src/motion/index.ts +12 -0
- package/src/motion/integration.ts +48 -0
- package/src/motion/runtime/page-transitions.ts +68 -0
- package/src/motion/runtime/runtime.ts +180 -0
- package/src/motion/runtime/scenes.ts +248 -0
- package/src/motion/runtime/types.ts +103 -0
- package/src/motion/styles/motion.css +332 -0
- package/src/motion/transitions.ts +74 -0
- package/src/motion/virtual.d.ts +4 -0
- package/src/primitives/Accordion.astro +129 -0
- package/src/primitives/Breadcrumbs.astro +50 -0
- package/src/primitives/BulletList.astro +69 -0
- package/src/primitives/Button.astro +73 -0
- package/src/primitives/ButtonGroup.astro +54 -0
- package/src/primitives/Callout.astro +137 -0
- package/src/primitives/Caption.astro +35 -0
- package/src/primitives/Card.astro +72 -0
- package/src/primitives/CardContent.astro +24 -0
- package/src/primitives/CardFooter.astro +36 -0
- package/src/primitives/CardHeader.astro +86 -0
- package/src/primitives/Checkbox.astro +38 -0
- package/src/primitives/ChoiceGroup.astro +23 -0
- package/src/primitives/Cluster.astro +49 -0
- package/src/primitives/Container.astro +44 -0
- package/src/primitives/DescriptionList.astro +83 -0
- package/src/primitives/Dialog.astro +38 -0
- package/src/primitives/Disclosure.astro +67 -0
- package/src/primitives/Divider.astro +93 -0
- package/src/primitives/Drawer.astro +33 -0
- package/src/primitives/Fieldset.astro +80 -0
- package/src/primitives/Flex.astro +64 -0
- package/src/primitives/FocusRing.astro +63 -0
- package/src/primitives/FocusTrap.astro +64 -0
- package/src/primitives/Footer.astro +155 -0
- package/src/primitives/Form.astro +68 -0
- package/src/primitives/FormDescription.astro +26 -0
- package/src/primitives/FormError.astro +106 -0
- package/src/primitives/FormField.astro +72 -0
- package/src/primitives/Grid.astro +64 -0
- package/src/primitives/Heading.astro +45 -0
- package/src/primitives/IconButton.astro +48 -0
- package/src/primitives/Image.astro +125 -0
- package/src/primitives/Input.astro +84 -0
- package/src/primitives/Label.astro +50 -0
- package/src/primitives/Link.astro +81 -0
- package/src/primitives/LinkButton.astro +66 -0
- package/src/primitives/List.astro +39 -0
- package/src/primitives/ListItem.astro +178 -0
- package/src/primitives/MediaObject.astro +66 -0
- package/src/primitives/MetricCard.astro +276 -0
- package/src/primitives/NavLink.astro +81 -0
- package/src/primitives/NavMenu.astro +109 -0
- package/src/primitives/Navbar.astro +197 -0
- package/src/primitives/Panel.astro +153 -0
- package/src/primitives/Picture.astro +167 -0
- package/src/primitives/Popover.astro +95 -0
- package/src/primitives/Prose.astro +45 -0
- package/src/primitives/Radio.astro +21 -0
- package/src/primitives/Rating.astro +135 -0
- package/src/primitives/ReducedMotion.astro +90 -0
- package/src/primitives/SegmentedControl.astro +132 -0
- package/src/primitives/Select.astro +107 -0
- package/src/primitives/Sheet.astro +45 -0
- package/src/primitives/SkipLink.astro +31 -0
- package/src/primitives/Slider.astro +186 -0
- package/src/primitives/Spacer.astro +35 -0
- package/src/primitives/Stack.astro +51 -0
- package/src/primitives/Surface.astro +70 -0
- package/src/primitives/Switch.astro +22 -0
- package/src/primitives/Table.astro +382 -0
- package/src/primitives/Tabs.astro +126 -0
- package/src/primitives/Text.astro +56 -0
- package/src/primitives/Textarea.astro +73 -0
- package/src/primitives/Thumbnail.astro +154 -0
- package/src/primitives/Toggle.astro +99 -0
- package/src/primitives/Tooltip.astro +50 -0
- package/src/primitives/VisuallyHidden.astro +29 -0
- package/src/primitives/index.ts +103 -0
- package/src/primitives/internal/AccordionScript.astro +7 -0
- package/src/primitives/internal/ChoiceField.astro +89 -0
- package/src/primitives/internal/FocusTrapScript.astro +8 -0
- package/src/primitives/internal/FormValidationScript.astro +10 -0
- package/src/primitives/internal/IndeterminateScript.astro +13 -0
- package/src/primitives/internal/ModalPanel.astro +114 -0
- package/src/primitives/internal/OverlayScript.astro +7 -0
- package/src/primitives/internal/ReducedMotionScript.astro +7 -0
- package/src/primitives/internal/SliderScript.astro +7 -0
- package/src/primitives/internal/SparklineScript.astro +7 -0
- package/src/primitives/internal/TableSortScript.astro +7 -0
- package/src/primitives/internal/TabsScript.astro +7 -0
- package/src/primitives/internal/TooltipScript.astro +7 -0
- package/src/primitives/lib/deprecate.ts +47 -0
- package/src/primitives/lib/focus-trap.ts +197 -0
- package/src/primitives/lib/focus.ts +60 -0
- package/src/primitives/lib/image-plan.ts +82 -0
- package/src/primitives/lib/image.ts +129 -0
- package/src/primitives/lib/motion.ts +68 -0
- package/src/primitives/lib/slider.ts +170 -0
- package/src/primitives/scripts/accordion.ts +123 -0
- package/src/primitives/scripts/form-validation.ts +225 -0
- package/src/primitives/scripts/overlay.ts +71 -0
- package/src/primitives/scripts/reduced-motion.ts +59 -0
- package/src/primitives/scripts/slider.ts +150 -0
- package/src/primitives/scripts/sparkline.ts +131 -0
- package/src/primitives/scripts/table-sort.ts +68 -0
- package/src/primitives/scripts/tabs.ts +151 -0
- package/src/primitives/scripts/tooltip.ts +28 -0
- package/src/primitives/styles/a11y.css +104 -0
- package/src/primitives/styles/accordion.css +53 -0
- package/src/primitives/styles/breadcrumbs.css +59 -0
- package/src/primitives/styles/bullet-list.css +89 -0
- package/src/primitives/styles/button.css +237 -0
- package/src/primitives/styles/choice.css +164 -0
- package/src/primitives/styles/cluster.css +24 -0
- package/src/primitives/styles/container.css +19 -0
- package/src/primitives/styles/data.css +849 -0
- package/src/primitives/styles/disclosure.css +140 -0
- package/src/primitives/styles/divider.css +50 -0
- package/src/primitives/styles/flex.css +42 -0
- package/src/primitives/styles/form.css +241 -0
- package/src/primitives/styles/grid.css +36 -0
- package/src/primitives/styles/media.css +247 -0
- package/src/primitives/styles/nav.css +792 -0
- package/src/primitives/styles/overlay.css +362 -0
- package/src/primitives/styles/prose.css +146 -0
- package/src/primitives/styles/scale.css +175 -0
- package/src/primitives/styles/segmented.css +165 -0
- package/src/primitives/styles/slider.css +170 -0
- package/src/primitives/styles/spacer.css +17 -0
- package/src/primitives/styles/stack.css +25 -0
- package/src/primitives/styles/surface.css +403 -0
- package/src/primitives/styles/tabs.css +223 -0
- package/src/primitives/styles/typography.css +144 -0
- package/src/primitives/styles/utilities.css +24 -0
- package/src/primitives/types.ts +385 -0
- package/src/primitives/utils.ts +254 -0
- package/src/seo/JSONLD.astro +35 -0
- package/src/seo/SEOHead.astro +47 -0
- package/src/seo/cms.ts +80 -0
- package/src/seo/index.ts +10 -0
- package/src/seo/integration.ts +231 -0
- package/src/seo/lib/jsonld.ts +334 -0
- package/src/seo/lib/meta.ts +205 -0
- package/src/seo/lib/redirects.ts +283 -0
- package/src/seo/lib/robots.ts +33 -0
- package/src/seo/lib/rss.ts +98 -0
- package/src/seo/lib/sitemap.ts +105 -0
- package/src/seo/lib/url.ts +68 -0
- package/src/tokens/base.css +71 -0
- package/src/tokens/tokens.css +210 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @sinnstack/ui — base token set.
|
|
3
|
+
* Import once per site (e.g. in the root layout). Client themes override
|
|
4
|
+
* these variables in their own stylesheet; nothing here is component-specific.
|
|
5
|
+
*
|
|
6
|
+
* Layer order is declared here so every package lands in a predictable
|
|
7
|
+
* cascade position. `sinn.overrides` is the last layer, for a site's own
|
|
8
|
+
* adjustments to library components (keep selectors low-specificity with
|
|
9
|
+
* `:where()`); unlayered site CSS still wins over every layer.
|
|
10
|
+
*
|
|
11
|
+
* Colors use light-dark(): every color token carries both themes.
|
|
12
|
+
* `pnpm --filter @sinnstack/ui check` verifies contrast for both.
|
|
13
|
+
*/
|
|
14
|
+
@layer sinn.reset, sinn.tokens, sinn.primitives, sinn.data, sinn.motion, sinn.blocks, sinn.overrides;
|
|
15
|
+
|
|
16
|
+
@layer sinn.tokens {
|
|
17
|
+
:root {
|
|
18
|
+
color-scheme: light dark;
|
|
19
|
+
|
|
20
|
+
/* ---------- Space (fluid 320px → 1240px; rem bounds keep it zoom-safe) ---------- */
|
|
21
|
+
--sinn-space-none: 0px;
|
|
22
|
+
--sinn-space-3xs: clamp(0.25rem, 0.2283rem + 0.1087vw, 0.3125rem);
|
|
23
|
+
--sinn-space-2xs: clamp(0.5rem, 0.4783rem + 0.1087vw, 0.5625rem);
|
|
24
|
+
--sinn-space-xs: clamp(0.75rem, 0.7065rem + 0.2174vw, 0.875rem);
|
|
25
|
+
--sinn-space-s: clamp(1rem, 0.9565rem + 0.2174vw, 1.125rem);
|
|
26
|
+
--sinn-space-m: clamp(1.5rem, 1.4348rem + 0.3261vw, 1.6875rem);
|
|
27
|
+
--sinn-space-l: clamp(2rem, 1.913rem + 0.4348vw, 2.25rem);
|
|
28
|
+
--sinn-space-xl: clamp(3rem, 2.8696rem + 0.6522vw, 3.375rem);
|
|
29
|
+
--sinn-space-2xl: clamp(4rem, 3.8261rem + 0.8696vw, 4.5rem);
|
|
30
|
+
--sinn-space-3xl: clamp(6rem, 5.7391rem + 1.3043vw, 6.75rem);
|
|
31
|
+
|
|
32
|
+
/* ---------- Measures (Grid min / Flex switch) & containers ---------- */
|
|
33
|
+
--sinn-measure-xs: 12rem;
|
|
34
|
+
--sinn-measure-s: 16rem;
|
|
35
|
+
--sinn-measure-m: 20rem;
|
|
36
|
+
--sinn-measure-l: 26rem;
|
|
37
|
+
--sinn-measure-xl: 34rem;
|
|
38
|
+
--sinn-measure-prose: 65ch;
|
|
39
|
+
|
|
40
|
+
--sinn-container-narrow: 65ch;
|
|
41
|
+
--sinn-container-default: 72rem;
|
|
42
|
+
--sinn-container-wide: 90rem;
|
|
43
|
+
|
|
44
|
+
/* ---------- Typography ---------- */
|
|
45
|
+
--sinn-font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
46
|
+
--sinn-font-heading: var(--sinn-font-sans);
|
|
47
|
+
--sinn-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
|
|
48
|
+
|
|
49
|
+
--sinn-text-xs: clamp(0.75rem, 0.7326rem + 0.087vw, 0.8rem);
|
|
50
|
+
--sinn-text-s: clamp(0.875rem, 0.8533rem + 0.1087vw, 0.9375rem);
|
|
51
|
+
--sinn-text-m: clamp(1rem, 0.9565rem + 0.2174vw, 1.125rem);
|
|
52
|
+
--sinn-text-l: clamp(1.125rem, 1.0598rem + 0.3261vw, 1.3125rem);
|
|
53
|
+
--sinn-text-xl: clamp(1.3125rem, 1.2147rem + 0.4891vw, 1.5938rem);
|
|
54
|
+
--sinn-text-2xl: clamp(1.5625rem, 1.4103rem + 0.7609vw, 2rem);
|
|
55
|
+
--sinn-text-3xl: clamp(1.9375rem, 1.6984rem + 1.1957vw, 2.625rem);
|
|
56
|
+
--sinn-text-4xl: clamp(2.4375rem, 2.0462rem + 1.9565vw, 3.5625rem);
|
|
57
|
+
|
|
58
|
+
--sinn-leading-tight: 1.15;
|
|
59
|
+
--sinn-leading-snug: 1.3;
|
|
60
|
+
--sinn-leading-normal: 1.6;
|
|
61
|
+
|
|
62
|
+
--sinn-weight-regular: 400;
|
|
63
|
+
--sinn-weight-medium: 500;
|
|
64
|
+
--sinn-weight-semibold: 600;
|
|
65
|
+
--sinn-weight-bold: 700;
|
|
66
|
+
|
|
67
|
+
--sinn-tracking-heading: -0.015em;
|
|
68
|
+
|
|
69
|
+
/* ---------- Color ---------- */
|
|
70
|
+
/* Surfaces, lowest to highest. In dark mode "higher" is lighter, which reads as elevation. */
|
|
71
|
+
--sinn-color-surface-sunken: light-dark(oklch(0.955 0.004 262), oklch(0.145 0.005 262));
|
|
72
|
+
--sinn-color-surface: light-dark(oklch(1 0 0), oklch(0.17 0.005 262));
|
|
73
|
+
--sinn-color-surface-subtle: light-dark(oklch(0.975 0.003 262), oklch(0.2 0.006 262));
|
|
74
|
+
--sinn-color-surface-raised: light-dark(oklch(1 0 0), oklch(0.215 0.007 262));
|
|
75
|
+
--sinn-color-text: light-dark(oklch(0.21 0.005 262), oklch(0.95 0.003 262));
|
|
76
|
+
--sinn-color-text-muted: light-dark(oklch(0.46 0.01 262), oklch(0.74 0.01 262));
|
|
77
|
+
|
|
78
|
+
--sinn-color-border-subtle: light-dark(oklch(0.93 0.003 262), oklch(0.27 0.005 262));
|
|
79
|
+
--sinn-color-border: light-dark(oklch(0.86 0.005 262), oklch(0.36 0.008 262));
|
|
80
|
+
/* Control boundaries (unchecked checkbox, switch track): ≥ 3:1 against surface. */
|
|
81
|
+
--sinn-color-border-strong: light-dark(oklch(0.56 0.01 262), oklch(0.64 0.01 262));
|
|
82
|
+
|
|
83
|
+
/* Each tone: solid fill, text on that fill, soft fill, and text on surface/soft. */
|
|
84
|
+
--sinn-color-accent: light-dark(oklch(0.52 0.19 262), oklch(0.74 0.13 262));
|
|
85
|
+
--sinn-color-accent-contrast: light-dark(oklch(1 0 0), oklch(0.17 0.02 262));
|
|
86
|
+
--sinn-color-accent-soft: light-dark(oklch(0.95 0.025 262), oklch(0.29 0.06 262));
|
|
87
|
+
--sinn-color-accent-text: light-dark(oklch(0.48 0.19 262), oklch(0.82 0.1 262));
|
|
88
|
+
|
|
89
|
+
--sinn-color-neutral: light-dark(oklch(0.27 0.005 262), oklch(0.92 0.003 262));
|
|
90
|
+
--sinn-color-neutral-contrast: light-dark(oklch(1 0 0), oklch(0.17 0.005 262));
|
|
91
|
+
--sinn-color-neutral-soft: light-dark(oklch(0.95 0.003 262), oklch(0.26 0.006 262));
|
|
92
|
+
--sinn-color-neutral-text: light-dark(oklch(0.21 0.005 262), oklch(0.95 0.003 262));
|
|
93
|
+
|
|
94
|
+
--sinn-color-danger: light-dark(oklch(0.53 0.2 27), oklch(0.72 0.16 25));
|
|
95
|
+
--sinn-color-danger-contrast: light-dark(oklch(1 0 0), oklch(0.17 0.02 25));
|
|
96
|
+
--sinn-color-danger-soft: light-dark(oklch(0.95 0.025 25), oklch(0.29 0.07 25));
|
|
97
|
+
--sinn-color-danger-text: light-dark(oklch(0.5 0.2 27), oklch(0.8 0.12 25));
|
|
98
|
+
|
|
99
|
+
--sinn-color-success: light-dark(oklch(0.5 0.13 150), oklch(0.76 0.15 150));
|
|
100
|
+
--sinn-color-success-contrast: light-dark(oklch(1 0 0), oklch(0.17 0.02 150));
|
|
101
|
+
--sinn-color-success-soft: light-dark(oklch(0.955 0.03 150), oklch(0.28 0.05 150));
|
|
102
|
+
--sinn-color-success-text: light-dark(oklch(0.46 0.12 150), oklch(0.82 0.13 150));
|
|
103
|
+
|
|
104
|
+
/* Warning's solid fill is light in both themes, so it takes dark text. */
|
|
105
|
+
--sinn-color-warning: light-dark(oklch(0.78 0.15 75), oklch(0.8 0.14 80));
|
|
106
|
+
--sinn-color-warning-contrast: light-dark(oklch(0.2 0.03 75), oklch(0.17 0.02 75));
|
|
107
|
+
--sinn-color-warning-soft: light-dark(oklch(0.965 0.04 85), oklch(0.29 0.05 75));
|
|
108
|
+
--sinn-color-warning-text: light-dark(oklch(0.48 0.11 65), oklch(0.86 0.12 85));
|
|
109
|
+
|
|
110
|
+
--sinn-color-focus: light-dark(oklch(0.52 0.19 262), oklch(0.8 0.12 262));
|
|
111
|
+
|
|
112
|
+
/* ---------- Data display ---------- */
|
|
113
|
+
/* De-emphasis series (sparklines, comparison lines): must hold 3:1 against the surface. */
|
|
114
|
+
--sinn-color-data-muted: light-dark(oklch(0.6 0.015 262), oklch(0.62 0.015 262));
|
|
115
|
+
--sinn-color-data-grid: var(--sinn-color-border-subtle);
|
|
116
|
+
/* Meter / data-bar track: a lighter step of the fill's own ramp. */
|
|
117
|
+
--sinn-color-data-track: light-dark(oklch(0.93 0.03 262), oklch(0.3 0.05 262));
|
|
118
|
+
/*
|
|
119
|
+
* Categorical series, in this order (the order is part of the colorblind safety).
|
|
120
|
+
* Validated with the dataviz six-checks script against our surfaces (#fff light, #0e0f12 and
|
|
121
|
+
* #18191d dark): adjacent CVD ΔE ≥ 8.4, normal-vision ΔE ≥ 19.3. In light mode slots 3, 4, 5
|
|
122
|
+
* sit below 3:1 on white, so every chart ships a legend (2+ series) and a table view.
|
|
123
|
+
* Never a 9th hue: fold extra series into "Other". Never used for text.
|
|
124
|
+
*/
|
|
125
|
+
--sinn-color-series-1: light-dark(#2a78d6, #3987e5);
|
|
126
|
+
--sinn-color-series-2: light-dark(#eb6834, #d95926);
|
|
127
|
+
--sinn-color-series-3: light-dark(#1baf7a, #199e70);
|
|
128
|
+
--sinn-color-series-4: light-dark(#eda100, #c98500);
|
|
129
|
+
--sinn-color-series-5: light-dark(#e87ba4, #d55181);
|
|
130
|
+
--sinn-color-series-6: light-dark(#008300, #0ca30c);
|
|
131
|
+
--sinn-color-series-7: light-dark(#6250d6, #9085e9);
|
|
132
|
+
--sinn-color-series-8: light-dark(#e34948, #e66767);
|
|
133
|
+
/* Chart chrome: hairline grid one step off the surface, a slightly stronger baseline. */
|
|
134
|
+
--sinn-color-chart-grid: light-dark(oklch(0.93 0.004 262), oklch(0.27 0.006 262));
|
|
135
|
+
--sinn-color-chart-axis: light-dark(oklch(0.8 0.006 262), oklch(0.4 0.008 262));
|
|
136
|
+
--sinn-color-rating: light-dark(oklch(0.8 0.16 78), oklch(0.83 0.15 82));
|
|
137
|
+
/* Star outline: gives filled stars a 3:1 edge against the surface. */
|
|
138
|
+
--sinn-color-rating-stroke: light-dark(oklch(0.6 0.13 65), oklch(0.83 0.15 82));
|
|
139
|
+
--sinn-color-rating-empty: light-dark(oklch(0.92 0.005 262), oklch(0.32 0.008 262));
|
|
140
|
+
--sinn-color-rating-track: light-dark(oklch(0.95 0.04 85), oklch(0.3 0.04 80));
|
|
141
|
+
--sinn-color-skeleton: light-dark(oklch(0.93 0.004 262), oklch(0.27 0.006 262));
|
|
142
|
+
|
|
143
|
+
/* Behind modal dialogs, drawers and sheets. */
|
|
144
|
+
--sinn-color-backdrop: light-dark(oklch(0.2 0.02 262 / 0.45), oklch(0 0 0 / 0.65));
|
|
145
|
+
|
|
146
|
+
/* ---------- Elevation ---------- */
|
|
147
|
+
--sinn-shadow-color: light-dark(oklch(0.25 0.02 262 / 0.1), oklch(0 0 0 / 0.45));
|
|
148
|
+
--sinn-shadow-s: 0 1px 2px var(--sinn-shadow-color);
|
|
149
|
+
--sinn-shadow-m: 0 1px 2px var(--sinn-shadow-color), 0 4px 12px var(--sinn-shadow-color);
|
|
150
|
+
--sinn-shadow-l: 0 2px 4px var(--sinn-shadow-color), 0 12px 32px var(--sinn-shadow-color);
|
|
151
|
+
|
|
152
|
+
/* ---------- Borders, radius ---------- */
|
|
153
|
+
--sinn-border-width-thin: 1px;
|
|
154
|
+
--sinn-border-width-thick: 2px;
|
|
155
|
+
|
|
156
|
+
--sinn-radius-s: 0.25rem;
|
|
157
|
+
--sinn-radius-m: 0.5rem;
|
|
158
|
+
--sinn-radius-l: 0.75rem;
|
|
159
|
+
--sinn-radius-full: 999px;
|
|
160
|
+
--sinn-radius-control: var(--sinn-radius-m);
|
|
161
|
+
|
|
162
|
+
/* ---------- Controls (rem, so they scale with zoom; all ≥ 24px for WCAG 2.5.8) ---------- */
|
|
163
|
+
--sinn-control-s: 2rem;
|
|
164
|
+
--sinn-control-m: 2.5rem;
|
|
165
|
+
--sinn-control-l: 3rem;
|
|
166
|
+
|
|
167
|
+
--sinn-focus-width: 2px;
|
|
168
|
+
--sinn-focus-offset: 2px;
|
|
169
|
+
|
|
170
|
+
/* ---------- Layering (dialogs and popovers use the top layer and need no z-index) ---------- */
|
|
171
|
+
--sinn-z-sticky: 50;
|
|
172
|
+
--sinn-z-tooltip: 1100;
|
|
173
|
+
--sinn-z-skip-link: 1200;
|
|
174
|
+
|
|
175
|
+
/* ---------- Overlay sizes ---------- */
|
|
176
|
+
--sinn-dialog-s: 24rem;
|
|
177
|
+
--sinn-dialog-m: 32rem;
|
|
178
|
+
--sinn-dialog-l: 48rem;
|
|
179
|
+
--sinn-dialog-xl: 64rem;
|
|
180
|
+
|
|
181
|
+
/* ---------- Motion ---------- */
|
|
182
|
+
--sinn-duration-fast: 120ms;
|
|
183
|
+
--sinn-duration-base: 200ms;
|
|
184
|
+
--sinn-ease-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
185
|
+
/* 1 = full motion, 0 = reduced. Components scale their movement by it. */
|
|
186
|
+
--sinn-motion-scale: 1;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Force a theme regardless of OS setting: <html data-theme="dark"> */
|
|
190
|
+
:root[data-theme='light'] { color-scheme: light; }
|
|
191
|
+
:root[data-theme='dark'] { color-scheme: dark; }
|
|
192
|
+
|
|
193
|
+
/*
|
|
194
|
+
* Reduced motion: the OS setting, unless the site says otherwise.
|
|
195
|
+
* <html data-motion="reduce"> forces it on, <html data-motion="full"> forces it off
|
|
196
|
+
* (a site-level "Reduce motion" switch; see setMotionPreference in @sinnstack/ui/primitives/motion).
|
|
197
|
+
*/
|
|
198
|
+
@media (prefers-reduced-motion: reduce) {
|
|
199
|
+
:root:not([data-motion='full']) {
|
|
200
|
+
--sinn-duration-fast: 0ms;
|
|
201
|
+
--sinn-duration-base: 0ms;
|
|
202
|
+
--sinn-motion-scale: 0;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
:root[data-motion='reduce'] {
|
|
206
|
+
--sinn-duration-fast: 0ms;
|
|
207
|
+
--sinn-duration-base: 0ms;
|
|
208
|
+
--sinn-motion-scale: 0;
|
|
209
|
+
}
|
|
210
|
+
}
|