@adres/mgda-ui 0.0.0-stage → 0.0.2
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/brand-knowledge.json +451 -0
- package/knowledge/accordion.md +135 -0
- package/knowledge/activity-rings.md +123 -0
- package/knowledge/alert.md +184 -0
- package/knowledge/answer-actions.md +217 -0
- package/knowledge/aspect-ratio.md +82 -0
- package/knowledge/avatar.md +158 -0
- package/knowledge/badge.md +172 -0
- package/knowledge/bar-graph.md +167 -0
- package/knowledge/bento-grid.md +115 -0
- package/knowledge/blockquote.md +153 -0
- package/knowledge/box-list.md +177 -0
- package/knowledge/bullet-list.md +128 -0
- package/knowledge/button-group.md +179 -0
- package/knowledge/button.md +231 -0
- package/knowledge/calendar.md +168 -0
- package/knowledge/card.md +321 -0
- package/knowledge/cards-nav.md +170 -0
- package/knowledge/chain-of-thought.md +164 -0
- package/knowledge/chat-container.md +135 -0
- package/knowledge/chat-message.md +224 -0
- package/knowledge/checkbox-card.md +172 -0
- package/knowledge/checkbox.md +111 -0
- package/knowledge/citations.md +241 -0
- package/knowledge/combobox.md +265 -0
- package/knowledge/countdown-pill.md +153 -0
- package/knowledge/cta.md +118 -0
- package/knowledge/data-list.md +173 -0
- package/knowledge/data-table.md +220 -0
- package/knowledge/dialog.md +249 -0
- package/knowledge/drawer.md +236 -0
- package/knowledge/dropdown-menu.md +238 -0
- package/knowledge/dropzone.md +153 -0
- package/knowledge/email-chips-input.md +161 -0
- package/knowledge/empty-state.md +106 -0
- package/knowledge/entity-header.md +166 -0
- package/knowledge/feature-grid.md +120 -0
- package/knowledge/feedback-bar.md +127 -0
- package/knowledge/footer.md +116 -0
- package/knowledge/heading.md +189 -0
- package/knowledge/hero.md +361 -0
- package/knowledge/input-button.md +187 -0
- package/knowledge/input-group.md +185 -0
- package/knowledge/input.md +256 -0
- package/knowledge/inset.md +177 -0
- package/knowledge/kpi-card.md +206 -0
- package/knowledge/list-nav.md +181 -0
- package/knowledge/logo-cloud.md +102 -0
- package/knowledge/media-gallery.md +158 -0
- package/knowledge/message-actions.md +175 -0
- package/knowledge/nav-sidebar.md +225 -0
- package/knowledge/number-stepper.md +159 -0
- package/knowledge/page-header.md +109 -0
- package/knowledge/pagination.md +225 -0
- package/knowledge/popover.md +159 -0
- package/knowledge/pricing.md +132 -0
- package/knowledge/progress.md +156 -0
- package/knowledge/prompt-input.md +337 -0
- package/knowledge/prompt-suggestions.md +168 -0
- package/knowledge/quota-bar.md +160 -0
- package/knowledge/quote.md +116 -0
- package/knowledge/radio-card.md +172 -0
- package/knowledge/radio-group.md +135 -0
- package/knowledge/reasoning.md +142 -0
- package/knowledge/search.md +131 -0
- package/knowledge/section-nav.md +162 -0
- package/knowledge/segmented-control.md +181 -0
- package/knowledge/select-button.md +205 -0
- package/knowledge/select.md +210 -0
- package/knowledge/separator.md +75 -0
- package/knowledge/shimmer-text.md +140 -0
- package/knowledge/sidebar.md +227 -0
- package/knowledge/skeleton.md +142 -0
- package/knowledge/slider.md +133 -0
- package/knowledge/slideshow.md +159 -0
- package/knowledge/source.md +156 -0
- package/knowledge/spinner.md +120 -0
- package/knowledge/stat-strip.md +128 -0
- package/knowledge/stats.md +117 -0
- package/knowledge/step-indicator.md +157 -0
- package/knowledge/switch.md +88 -0
- package/knowledge/table.md +190 -0
- package/knowledge/tabs.md +169 -0
- package/knowledge/testimonials.md +115 -0
- package/knowledge/text-link.md +192 -0
- package/knowledge/text.md +194 -0
- package/knowledge/thinking-bar.md +115 -0
- package/knowledge/thinking-steps.md +140 -0
- package/knowledge/toaster.md +127 -0
- package/knowledge/toggle.md +113 -0
- package/knowledge/tool-call-card.md +241 -0
- package/knowledge/tooltip.md +120 -0
- package/knowledge/top-nav.md +138 -0
- package/knowledge.json +19854 -0
- package/package.json +94 -4
- package/src/components/accordion.stories.tsx +46 -0
- package/src/components/accordion.tsx +74 -0
- package/src/components/activity-rings.stories.tsx +73 -0
- package/src/components/activity-rings.tsx +121 -0
- package/src/components/alert.stories.tsx +43 -0
- package/src/components/alert.tsx +132 -0
- package/src/components/answer-actions.stories.tsx +54 -0
- package/src/components/answer-actions.test.tsx +37 -0
- package/src/components/answer-actions.tsx +313 -0
- package/src/components/aspect-ratio.stories.tsx +32 -0
- package/src/components/aspect-ratio.tsx +5 -0
- package/src/components/avatar.stories.tsx +40 -0
- package/src/components/avatar.tsx +154 -0
- package/src/components/badge.stories.tsx +27 -0
- package/src/components/badge.tsx +63 -0
- package/src/components/bar-graph.stories.tsx +28 -0
- package/src/components/bar-graph.tsx +204 -0
- package/src/components/bento-grid.stories.tsx +23 -0
- package/src/components/bento-grid.tsx +67 -0
- package/src/components/blockquote.stories.tsx +28 -0
- package/src/components/blockquote.tsx +88 -0
- package/src/components/box-list.stories.tsx +25 -0
- package/src/components/box-list.tsx +108 -0
- package/src/components/bullet-list.stories.tsx +22 -0
- package/src/components/bullet-list.tsx +101 -0
- package/src/components/button-group.stories.tsx +31 -0
- package/src/components/button-group.tsx +156 -0
- package/src/components/button.stories.tsx +66 -0
- package/src/components/button.test.ts +17 -0
- package/src/components/button.tsx +139 -0
- package/src/components/calendar.stories.tsx +25 -0
- package/src/components/calendar.tsx +367 -0
- package/src/components/card.stories.tsx +44 -0
- package/src/components/card.tsx +392 -0
- package/src/components/cards-nav.stories.tsx +35 -0
- package/src/components/cards-nav.tsx +115 -0
- package/src/components/chain-of-thought.stories.tsx +67 -0
- package/src/components/chain-of-thought.test.tsx +50 -0
- package/src/components/chain-of-thought.tsx +170 -0
- package/src/components/chat-container.stories.tsx +47 -0
- package/src/components/chat-container.test.tsx +49 -0
- package/src/components/chat-container.tsx +222 -0
- package/src/components/chat-message.stories.tsx +52 -0
- package/src/components/chat-message.test.tsx +36 -0
- package/src/components/chat-message.tsx +163 -0
- package/src/components/checkbox-card.stories.tsx +27 -0
- package/src/components/checkbox-card.tsx +200 -0
- package/src/components/checkbox.stories.tsx +26 -0
- package/src/components/checkbox.tsx +61 -0
- package/src/components/citations.stories.tsx +64 -0
- package/src/components/citations.test.tsx +61 -0
- package/src/components/citations.tsx +220 -0
- package/src/components/combobox.stories.tsx +184 -0
- package/src/components/combobox.test.tsx +82 -0
- package/src/components/combobox.tsx +407 -0
- package/src/components/countdown-pill.stories.tsx +24 -0
- package/src/components/countdown-pill.tsx +129 -0
- package/src/components/cta.stories.tsx +29 -0
- package/src/components/cta.tsx +52 -0
- package/src/components/data-list.stories.tsx +50 -0
- package/src/components/data-list.test.tsx +35 -0
- package/src/components/data-list.tsx +181 -0
- package/src/components/data-table.stories.tsx +29 -0
- package/src/components/data-table.tsx +200 -0
- package/src/components/dialog.stories.tsx +42 -0
- package/src/components/dialog.tsx +200 -0
- package/src/components/drawer.stories.tsx +48 -0
- package/src/components/drawer.tsx +385 -0
- package/src/components/dropdown-menu.stories.tsx +41 -0
- package/src/components/dropdown-menu.tsx +252 -0
- package/src/components/dropzone.stories.tsx +19 -0
- package/src/components/dropzone.tsx +250 -0
- package/src/components/email-chips-input.stories.tsx +135 -0
- package/src/components/email-chips-input.tsx +210 -0
- package/src/components/empty-state.stories.tsx +22 -0
- package/src/components/empty-state.tsx +35 -0
- package/src/components/entity-header.stories.tsx +43 -0
- package/src/components/entity-header.test.tsx +35 -0
- package/src/components/entity-header.tsx +92 -0
- package/src/components/feature-grid.stories.tsx +25 -0
- package/src/components/feature-grid.tsx +87 -0
- package/src/components/feedback-bar.stories.tsx +25 -0
- package/src/components/feedback-bar.test.tsx +24 -0
- package/src/components/feedback-bar.tsx +62 -0
- package/src/components/footer.stories.tsx +23 -0
- package/src/components/footer.tsx +78 -0
- package/src/components/heading.stories.tsx +45 -0
- package/src/components/heading.test.tsx +22 -0
- package/src/components/heading.tsx +77 -0
- package/src/components/hero.stories.tsx +38 -0
- package/src/components/hero.tsx +498 -0
- package/src/components/input-button.stories.tsx +19 -0
- package/src/components/input-button.tsx +112 -0
- package/src/components/input-group.stories.tsx +38 -0
- package/src/components/input-group.tsx +157 -0
- package/src/components/input.stories.tsx +31 -0
- package/src/components/input.tsx +284 -0
- package/src/components/inset.stories.tsx +29 -0
- package/src/components/inset.tsx +70 -0
- package/src/components/kpi-card.stories.tsx +29 -0
- package/src/components/kpi-card.tsx +284 -0
- package/src/components/list-nav.stories.tsx +22 -0
- package/src/components/list-nav.tsx +145 -0
- package/src/components/logo-cloud.stories.tsx +23 -0
- package/src/components/logo-cloud.tsx +42 -0
- package/src/components/media-gallery.stories.tsx +25 -0
- package/src/components/media-gallery.tsx +347 -0
- package/src/components/message-actions.stories.tsx +45 -0
- package/src/components/message-actions.test.tsx +32 -0
- package/src/components/message-actions.tsx +119 -0
- package/src/components/nav-sidebar.stories.tsx +58 -0
- package/src/components/nav-sidebar.test.tsx +54 -0
- package/src/components/nav-sidebar.tsx +462 -0
- package/src/components/number-stepper.stories.tsx +19 -0
- package/src/components/number-stepper.tsx +158 -0
- package/src/components/page-header.stories.tsx +25 -0
- package/src/components/page-header.tsx +64 -0
- package/src/components/pagination.stories.tsx +110 -0
- package/src/components/pagination.test.tsx +46 -0
- package/src/components/pagination.tsx +144 -0
- package/src/components/popover.stories.tsx +26 -0
- package/src/components/popover.tsx +62 -0
- package/src/components/pricing.stories.tsx +42 -0
- package/src/components/pricing.tsx +130 -0
- package/src/components/progress.stories.tsx +22 -0
- package/src/components/progress.tsx +189 -0
- package/src/components/prompt-input.stories.tsx +62 -0
- package/src/components/prompt-input.test.tsx +106 -0
- package/src/components/prompt-input.tsx +343 -0
- package/src/components/prompt-suggestions.stories.tsx +53 -0
- package/src/components/prompt-suggestions.test.tsx +37 -0
- package/src/components/prompt-suggestions.tsx +122 -0
- package/src/components/quota-bar.stories.tsx +19 -0
- package/src/components/quota-bar.tsx +191 -0
- package/src/components/quote.stories.tsx +18 -0
- package/src/components/quote.tsx +43 -0
- package/src/components/radio-card.stories.tsx +27 -0
- package/src/components/radio-card.tsx +225 -0
- package/src/components/radio-group.stories.tsx +32 -0
- package/src/components/radio-group.tsx +68 -0
- package/src/components/reasoning.stories.tsx +50 -0
- package/src/components/reasoning.test.tsx +48 -0
- package/src/components/reasoning.tsx +143 -0
- package/src/components/search.stories.tsx +18 -0
- package/src/components/search.tsx +133 -0
- package/src/components/section-nav.stories.tsx +59 -0
- package/src/components/section-nav.test.tsx +36 -0
- package/src/components/section-nav.tsx +146 -0
- package/src/components/segmented-control.stories.tsx +22 -0
- package/src/components/segmented-control.tsx +301 -0
- package/src/components/select-button.stories.tsx +27 -0
- package/src/components/select-button.tsx +174 -0
- package/src/components/select.stories.tsx +27 -0
- package/src/components/select.tsx +198 -0
- package/src/components/separator.stories.tsx +22 -0
- package/src/components/separator.tsx +23 -0
- package/src/components/shimmer-text.stories.tsx +23 -0
- package/src/components/shimmer-text.test.tsx +35 -0
- package/src/components/shimmer-text.tsx +43 -0
- package/src/components/sidebar.stories.tsx +25 -0
- package/src/components/sidebar.tsx +234 -0
- package/src/components/skeleton.stories.tsx +22 -0
- package/src/components/skeleton.tsx +96 -0
- package/src/components/slider.stories.tsx +20 -0
- package/src/components/slider.tsx +176 -0
- package/src/components/slideshow.stories.tsx +30 -0
- package/src/components/slideshow.tsx +291 -0
- package/src/components/source.stories.tsx +32 -0
- package/src/components/source.test.tsx +40 -0
- package/src/components/source.tsx +161 -0
- package/src/components/spinner.stories.tsx +19 -0
- package/src/components/spinner.tsx +76 -0
- package/src/components/stat-strip.stories.tsx +36 -0
- package/src/components/stat-strip.test.tsx +25 -0
- package/src/components/stat-strip.tsx +85 -0
- package/src/components/stats.stories.tsx +24 -0
- package/src/components/stats.tsx +83 -0
- package/src/components/step-indicator.stories.tsx +18 -0
- package/src/components/step-indicator.test.tsx +18 -0
- package/src/components/step-indicator.tsx +286 -0
- package/src/components/switch.stories.tsx +26 -0
- package/src/components/switch.tsx +32 -0
- package/src/components/table.stories.tsx +38 -0
- package/src/components/table.tsx +220 -0
- package/src/components/tabs.stories.tsx +25 -0
- package/src/components/tabs.tsx +276 -0
- package/src/components/testimonials.stories.tsx +22 -0
- package/src/components/testimonials.tsx +109 -0
- package/src/components/text-link.stories.tsx +47 -0
- package/src/components/text-link.test.tsx +18 -0
- package/src/components/text-link.tsx +88 -0
- package/src/components/text.stories.tsx +49 -0
- package/src/components/text.tsx +105 -0
- package/src/components/thinking-bar.stories.tsx +19 -0
- package/src/components/thinking-bar.test.tsx +27 -0
- package/src/components/thinking-bar.tsx +64 -0
- package/src/components/thinking-steps.stories.tsx +44 -0
- package/src/components/thinking-steps.test.tsx +42 -0
- package/src/components/thinking-steps.tsx +92 -0
- package/src/components/toaster.stories.tsx +80 -0
- package/src/components/toaster.tsx +36 -0
- package/src/components/toggle.stories.tsx +21 -0
- package/src/components/toggle.tsx +103 -0
- package/src/components/tool-call-card.stories.tsx +97 -0
- package/src/components/tool-call-card.test.tsx +88 -0
- package/src/components/tool-call-card.tsx +231 -0
- package/src/components/tooltip.stories.tsx +25 -0
- package/src/components/tooltip.tsx +43 -0
- package/src/components/top-nav.stories.tsx +20 -0
- package/src/components/top-nav.tsx +76 -0
- package/src/docs/Colors.stories.tsx +192 -0
- package/src/docs/GettingStarted.mdx +72 -0
- package/src/docs/Mcp.mdx +52 -0
- package/src/docs/Typography.stories.tsx +114 -0
- package/src/hooks/use-in-view.ts +32 -0
- package/src/hooks/use-reduced-motion.ts +26 -0
- package/src/index.ts +343 -0
- package/src/lib/cn.test.ts +67 -0
- package/src/lib/cn.ts +81 -0
- package/src/lib/motion.ts +109 -0
- package/src/lib/prefix-utilities.test.ts +56 -0
- package/src/lib/prefix-utilities.ts +50 -0
- package/src/styles/base.css +489 -0
- package/src/styles/motion.css +69 -0
- package/src/styles/overrides.css +44 -0
- package/src/styles/typography.css +173 -0
- package/src/theme/theme.css +391 -0
- package/src/theme/tokens.ts +29 -0
- package/src/theme/types.ts +26 -0
- package/README.md +0 -3
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const PRESERVE = new Set([
|
|
2
|
+
"dark",
|
|
3
|
+
"elevation-0",
|
|
4
|
+
"elevation-1",
|
|
5
|
+
"elevation-2",
|
|
6
|
+
"elevation-3",
|
|
7
|
+
"prose-docs",
|
|
8
|
+
])
|
|
9
|
+
|
|
10
|
+
export type PrefixUtilitiesResult = {
|
|
11
|
+
text: string
|
|
12
|
+
/** Tokens left unchanged because they are not utilities. */
|
|
13
|
+
skipped: string[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Prefix Tailwind utility tokens in a class string or an `@apply` body.
|
|
18
|
+
* The dark-mode hook and hand-written elevation classes stay as they are.
|
|
19
|
+
* Tokens that do not look like utilities are left unchanged and listed in `skipped`.
|
|
20
|
+
*/
|
|
21
|
+
export function prefixUtilities(source: string): PrefixUtilitiesResult {
|
|
22
|
+
const skipped: string[] = []
|
|
23
|
+
|
|
24
|
+
const text = source.replace(/[^\s]+/g, (raw) => {
|
|
25
|
+
const semicolon = raw.endsWith(";")
|
|
26
|
+
const token = semicolon ? raw.slice(0, -1) : raw
|
|
27
|
+
|
|
28
|
+
if (token === "@apply" || token.startsWith("ax:")) return raw
|
|
29
|
+
// Fumadocs utilities compile in a separate unprefixed stylesheet.
|
|
30
|
+
if (token === "fd" || token.startsWith("fd-") || token.includes("-fd-")) {
|
|
31
|
+
skipped.push(token)
|
|
32
|
+
return raw
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (PRESERVE.has(token) || !isUtilityToken(token)) {
|
|
36
|
+
skipped.push(token)
|
|
37
|
+
return raw
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return `ax:${token}${semicolon ? ";" : ""}`
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
return { text, skipped }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function isUtilityToken(token: string): boolean {
|
|
47
|
+
if (token.length === 0) return false
|
|
48
|
+
if (/['"`{}]/.test(token)) return false
|
|
49
|
+
return /^[!a-zA-Z_\[(-]/.test(token)
|
|
50
|
+
}
|
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @adres/mgda-ui - base.css
|
|
3
|
+
*
|
|
4
|
+
* Brand-agnostic core tokens and utility wiring for Tailwind 4.
|
|
5
|
+
*
|
|
6
|
+
* What lives here:
|
|
7
|
+
* - Universal scale primitives (space, radius, motion, breakpoints, type scale)
|
|
8
|
+
* - The semantic-token contract (variable names only, no values)
|
|
9
|
+
* - The Tailwind @theme inline mapping that exposes semantic tokens as utilities
|
|
10
|
+
*
|
|
11
|
+
* What does NOT live here:
|
|
12
|
+
* - ../theme/theme.css: the MGDA values (colors, font family, shadows)
|
|
13
|
+
*
|
|
14
|
+
* Import order in your app:
|
|
15
|
+
* @import "tailwindcss" prefix(ax); <- Tailwind 4 entry (REQUIRED FIRST)
|
|
16
|
+
* @import "@adres/mgda-ui/styles"; <- this file (theme + utility wiring)
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
@import "../theme/theme.css";
|
|
20
|
+
|
|
21
|
+
/* Dark mode is toggled by a `.dark` class on the root (the theme flips
|
|
22
|
+
* its tokens under `:root.dark`). Re-point Tailwind's `dark:`
|
|
23
|
+
* variant at that same class so utilities like `ax:dark:bg-primary-stronger` follow
|
|
24
|
+
* the app toggle, NOT the OS `prefers-color-scheme`, which is Tailwind's
|
|
25
|
+
* default and would otherwise apply in light mode on a dark-set OS. */
|
|
26
|
+
@source "../";
|
|
27
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
28
|
+
|
|
29
|
+
/* ─────────────────────────────────────────────────────────────────────────────
|
|
30
|
+
* Layer 1 - Core (brand-agnostic) primitives
|
|
31
|
+
* Defaults; brand packages MAY override individual values.
|
|
32
|
+
* ─────────────────────────────────────────────────────────────────────────── */
|
|
33
|
+
@layer base {
|
|
34
|
+
:root {
|
|
35
|
+
/* Absolute colour constants as HSL triplets, so they drop into the DS's
|
|
36
|
+
* `hsl(var(--token))` slots like every other token, e.g.
|
|
37
|
+
* `--card: var(--white)` → `--color-card: hsl(var(--card))`.
|
|
38
|
+
* (For a raw CSS colour just use `#fff` / `white`.) */
|
|
39
|
+
--white: 0 0% 100%;
|
|
40
|
+
--black: 0 0% 0%;
|
|
41
|
+
|
|
42
|
+
/* Spacing scale - 4px base, 9 stops */
|
|
43
|
+
--space-2xs: 0.25rem; /* 4px */
|
|
44
|
+
--space-xs: 0.5rem; /* 8px */
|
|
45
|
+
--space-sm: 0.75rem; /* 12px */
|
|
46
|
+
--space-md: 1rem; /* 16px */
|
|
47
|
+
--space-lg: 1.25rem; /* 20px */
|
|
48
|
+
--space-xl: 1.5rem; /* 24px */
|
|
49
|
+
--space-2xl: 2rem; /* 32px */
|
|
50
|
+
--space-3xl: 2.5rem; /* 40px */
|
|
51
|
+
--space-4xl: 3rem; /* 48px */
|
|
52
|
+
--space-5xl: 4rem; /* 64px */
|
|
53
|
+
--space-6xl: 6rem; /* 96px */
|
|
54
|
+
|
|
55
|
+
/* Radius scale - defaults assume the Adres / Airbnb-DLS feel; brands may override */
|
|
56
|
+
--radius-xs: 0.25rem; /* 4px - fine details */
|
|
57
|
+
--radius-sm: 0.375rem;/* 6px - small badges */
|
|
58
|
+
--radius: 0.5rem; /* 8px - DEFAULT - buttons, inputs */
|
|
59
|
+
--radius-md: 0.75rem; /* 12px - cards */
|
|
60
|
+
--radius-lg: 1rem; /* 16px - modals, large panels */
|
|
61
|
+
--radius-xl: 1.5rem; /* 24px */
|
|
62
|
+
--radius-full: 9999px; /* pill */
|
|
63
|
+
--radius-badge: 9999px; /* badge default - pill; overridden by theme panel */
|
|
64
|
+
|
|
65
|
+
/* Motion - duration, easing, stagger */
|
|
66
|
+
--motion-fast: 160ms; /* micro-interactions: hover, feedback */
|
|
67
|
+
--motion-base: 280ms; /* standard UI: dropdowns, tooltips, small panels */
|
|
68
|
+
--motion-slow: 420ms; /* large surfaces: drawers, modals, marketing sections */
|
|
69
|
+
--motion-exit: 200ms; /* exit counterpart of base - 70% duration, use with ease-in */
|
|
70
|
+
/* Ease-out: fast start → smooth deceleration - use for elements entering the screen */
|
|
71
|
+
--motion-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
|
|
72
|
+
/* Ease-in: gentle start → fast exit - use for elements leaving the screen */
|
|
73
|
+
--motion-ease-in: cubic-bezier(0.55, 0, 1, 0.45);
|
|
74
|
+
/* Ease-in-out: balanced arc - use for state transitions between two visible positions */
|
|
75
|
+
--motion-ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
|
|
76
|
+
--motion-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* slight overshoot */
|
|
77
|
+
|
|
78
|
+
/* Shadow scale - neutral elevation, tinted by the brand's own neutral palette.
|
|
79
|
+
* --shadow-color resolves to whatever each brand sets as --neutral-900, so
|
|
80
|
+
* shadows pick up the brand's hue (cool blue-gray on thinkprop, warm gray
|
|
81
|
+
* on adres, etc.). Brands may override --shadow-color directly if they
|
|
82
|
+
* want a different tint than their neutral.
|
|
83
|
+
* Multi-layer drop shadows give a soft, dimensional lift. */
|
|
84
|
+
/* Absolute dark primitive (NOT the emphasis alias): shadows must stay dark
|
|
85
|
+
* in both modes; an emphasis alias would invert to a light colour in dark. */
|
|
86
|
+
--shadow-color: var(--neutral-900);
|
|
87
|
+
--shadow-xs: hsl(var(--shadow-color) / 0.10) 0px 1px 0px;
|
|
88
|
+
--shadow-sm: hsl(var(--shadow-color) / 0.04) 0px 0px 0px 1px, hsl(var(--shadow-color) / 0.04) 0px 0.5625px 0.5625px -0.28125px, hsl(var(--shadow-color) / 0.04) 0px 1.6875px 1.6875px -0.84375px, hsl(var(--shadow-color) / 0.04) 0px 3.375px 3.375px -1.6875px, hsl(var(--shadow-color) / 0.04) 0px 6.75px 6.75px -3.375px, hsl(var(--shadow-color) / 0.04) 0px 13.5px 13.5px -6.75px;
|
|
89
|
+
--shadow-md: hsl(var(--shadow-color) / 0.04) 0px 0px 0px 1px, hsl(var(--shadow-color) / 0.04) 0px 1px 1px -0.5px, hsl(var(--shadow-color) / 0.04) 0px 3px 3px -1.5px, hsl(var(--shadow-color) / 0.04) 0px 6px 6px -3px, hsl(var(--shadow-color) / 0.04) 0px 12px 12px -6px, hsl(var(--shadow-color) / 0.04) 0px 24px 24px -12px;
|
|
90
|
+
--shadow: var(--shadow-sm); /* DEFAULT - alias of --shadow-sm so `shadow` Tailwind class keeps working */
|
|
91
|
+
--shadow-lg: hsl(var(--shadow-color) / 0.04) 0px 0px 0px 1px, hsl(var(--shadow-color) / 0.04) 0px 1.25px 1.25px -0.625px, hsl(var(--shadow-color) / 0.04) 0px 3.75px 3.75px -1.875px, hsl(var(--shadow-color) / 0.04) 0px 7.5px 7.5px -3.75px, hsl(var(--shadow-color) / 0.04) 0px 15px 15px -7.5px, hsl(var(--shadow-color) / 0.04) 0px 30px 30px -15px;
|
|
92
|
+
--shadow-xl: hsl(var(--shadow-color) / 0.04) 0px 0px 0px 1px, hsl(var(--shadow-color) / 0.04) 0px 1.5625px 1.5625px -0.78125px, hsl(var(--shadow-color) / 0.04) 0px 4.6875px 4.6875px -2.34375px, hsl(var(--shadow-color) / 0.04) 0px 9.375px 9.375px -4.6875px, hsl(var(--shadow-color) / 0.04) 0px 18.75px 18.75px -9.375px, hsl(var(--shadow-color) / 0.04) 0px 37.5px 37.5px -18.75px;
|
|
93
|
+
--shadow-2xl: hsl(var(--shadow-color) / 0.2) 0px 7px 29px 0px;
|
|
94
|
+
|
|
95
|
+
/* Tinted button shadows - opt-in via the Button `elevated` prop. Same diffuse
|
|
96
|
+
* falloff as --shadow-sm, but tinted with the variant's own hue so the lift
|
|
97
|
+
* carries the brand / status colour. Uses fixed primitives (not emphasis
|
|
98
|
+
* aliases) so the tint stays consistent in dark. Available to every theme;
|
|
99
|
+
* a brand may override either to retune its own button shadow. */
|
|
100
|
+
--shadow-primary-btn: hsl(var(--primary-700) / 0.12) 0px 0px 0px 1px, hsl(var(--primary-700) / 0.12) 0px 0.5625px 0.5625px -0.28125px, hsl(var(--primary-700) / 0.12) 0px 1.6875px 1.6875px -0.84375px, hsl(var(--primary-600) / 0.12) 0px 3.375px 3.375px -1.6875px, hsl(var(--primary-600) / 0.12) 0px 6.75px 6.75px -3.375px, hsl(var(--primary-600) / 0.12) 0px 13.5px 13.5px -6.75px;
|
|
101
|
+
--shadow-destructive-btn: hsl(var(--destructive-700) / 0.12) 0px 0px 0px 1px, hsl(var(--destructive-700) / 0.12) 0px 0.5625px 0.5625px -0.28125px, hsl(var(--destructive-700) / 0.12) 0px 1.6875px 1.6875px -0.84375px, hsl(var(--destructive-600) / 0.12) 0px 3.375px 3.375px -1.6875px, hsl(var(--destructive-600) / 0.12) 0px 6.75px 6.75px -3.375px, hsl(var(--destructive-600) / 0.12) 0px 13.5px 13.5px -6.75px;
|
|
102
|
+
|
|
103
|
+
/* Input/textarea radius - fixed value, intentionally NOT chained to --radius-sm or --radius
|
|
104
|
+
* so it stays stable when buttonRadius changes (e.g. full-pill buttons still get legible input corners). */
|
|
105
|
+
--input-radius: 0.5rem;
|
|
106
|
+
/* Button corner radius - defaults to the brand's base --radius; brands may
|
|
107
|
+
* override (e.g. Madhmoun sets this to --radius-sm). */
|
|
108
|
+
--button-radius: var(--radius);
|
|
109
|
+
|
|
110
|
+
/* Card-level overridable defaults - brand themes may set these to customise card chrome */
|
|
111
|
+
--card-border-color: transparent;
|
|
112
|
+
--card-shadow: var(--shadow-sm);
|
|
113
|
+
|
|
114
|
+
/* Surface elevation - a self-contained container treatment that bundles a
|
|
115
|
+
* background fill with a shadow into four ascending levels (level0 → level3).
|
|
116
|
+
* Consumed by the Card `elevation` prop and the `.elevation-{0..3}` utilities,
|
|
117
|
+
* so the same ramp is reusable on any container (panels, sections, sheets).
|
|
118
|
+
*
|
|
119
|
+
* Fills default to the themeable --card surface (pure white in the default
|
|
120
|
+
* light theme, the dark card neutral in .dark) so elevation adapts to dark
|
|
121
|
+
* mode and per-brand surfaces with no extra work; brands may override any rung.
|
|
122
|
+
* level0 - transparent, flat
|
|
123
|
+
* level1 - translucent surface (50%) + soft lift shadow
|
|
124
|
+
* level2 - solid surface + flat lift shadow
|
|
125
|
+
* level3 - solid surface + pronounced lift shadow (2xl)
|
|
126
|
+
* All three lift shadows are tinted with --shadow-color (the neutral
|
|
127
|
+
* palette) rather than a fixed colour, so they stay on-brand and invert
|
|
128
|
+
* correctly in dark mode. */
|
|
129
|
+
--elevation-0-surface: transparent;
|
|
130
|
+
--elevation-0-shadow: none;
|
|
131
|
+
--elevation-1-surface: hsl(var(--card) / 0.5);
|
|
132
|
+
--elevation-1-shadow: hsl(var(--shadow-color) / 0.05) 0px 3px 12px;
|
|
133
|
+
--elevation-2-surface: hsl(var(--card));
|
|
134
|
+
--elevation-2-shadow: hsl(var(--shadow-color) / 0.1) 0px 5px 16px;
|
|
135
|
+
--elevation-3-surface: hsl(var(--card));
|
|
136
|
+
--elevation-3-shadow: var(--shadow-2xl);
|
|
137
|
+
|
|
138
|
+
/* Tabs-level overridable defaults - kept off --radius-full intentionally:
|
|
139
|
+
* tabs should not pick up the brand button-pill. Brands can still override. */
|
|
140
|
+
--tabs-list-radius: var(--input-radius);
|
|
141
|
+
--tabs-trigger-radius: calc(var(--input-radius) - 2px);
|
|
142
|
+
|
|
143
|
+
/* Z-index scale */
|
|
144
|
+
--z-base: 0;
|
|
145
|
+
--z-raised: 10;
|
|
146
|
+
--z-sticky: 100;
|
|
147
|
+
--z-overlay: 1000;
|
|
148
|
+
--z-modal: 1100;
|
|
149
|
+
--z-toast: 1200;
|
|
150
|
+
|
|
151
|
+
/* ─── Colour shade scale - luminosity rungs ─────────────────────────────
|
|
152
|
+
* Single source of truth for every palette's lightness steps.
|
|
153
|
+
* Every semantic shade variable in every brand file references these.
|
|
154
|
+
* To shift a step globally: change the value here.
|
|
155
|
+
*
|
|
156
|
+
* Scale: muted → lightest → lighter → light → base → dark → darker → darkest
|
|
157
|
+
* Light: 97 94 88 80 68
|
|
158
|
+
* Dark: 56 44 32
|
|
159
|
+
* The base (68%) is the midpoint of light (80%) ↔ dark (56%), giving equal
|
|
160
|
+
* 12% gaps on both sides. --shade-base-dm is the dark-mode base (4% above base).
|
|
161
|
+
* ─────────────────────────────────────────────────────────────────────── */
|
|
162
|
+
--shade-muted: 97%;
|
|
163
|
+
--shade-lightest: 94%;
|
|
164
|
+
--shade-lighter: 88%;
|
|
165
|
+
--shade-light: 80%;
|
|
166
|
+
--shade-base: 68%;
|
|
167
|
+
--shade-base-dm: 72%; /* dark-mode step - slightly lighter than base */
|
|
168
|
+
--shade-dark: 56%;
|
|
169
|
+
--shade-darker: 44%;
|
|
170
|
+
--shade-darkest: 32%;
|
|
171
|
+
|
|
172
|
+
/* Typography scale - size / line-height pairs */
|
|
173
|
+
--text-3xs: 0.625rem; /* 10px */
|
|
174
|
+
--text-2xs: 0.6875rem; /* 11px */
|
|
175
|
+
--text-xs: 0.75rem; /* 12px */
|
|
176
|
+
--text-sm: 0.875rem; /* 14px */
|
|
177
|
+
--text-base: 1rem; /* 16px */
|
|
178
|
+
--text-lg: 1.125rem; /* 18px */
|
|
179
|
+
--text-xl: 1.375rem; /* 22px - Adres section title */
|
|
180
|
+
--text-2xl: 1.75rem; /* 28px */
|
|
181
|
+
--text-3xl: 2.25rem; /* 36px - Adres display */
|
|
182
|
+
--text-4xl: 3rem; /* 48px */
|
|
183
|
+
--text-5xl: 4rem; /* 64px */
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* ─────────────────────────────────────────────────────────────────────────────
|
|
188
|
+
* Layer 2 - Semantic-token CONTRACT (variable names only).
|
|
189
|
+
* Brand packages provide the actual VALUES for these (in :root and .dark).
|
|
190
|
+
* Components consume them via Tailwind classes (bg-primary, text-foreground, etc.)
|
|
191
|
+
* thanks to the @theme inline mapping below.
|
|
192
|
+
* ─────────────────────────────────────────────────────────────────────────── */
|
|
193
|
+
|
|
194
|
+
@theme inline {
|
|
195
|
+
/* Color utilities derived from semantic tokens */
|
|
196
|
+
--color-background: hsl(var(--background));
|
|
197
|
+
--color-foreground: hsl(var(--foreground));
|
|
198
|
+
--color-foreground-strong: hsl(var(--foreground-strong));
|
|
199
|
+
--color-foreground-muted: hsl(var(--foreground-muted));
|
|
200
|
+
/* Neutral scale - base + named aliases (bg-neutral, bg-neutral-weaker, …) */
|
|
201
|
+
--color-neutral: hsl(var(--neutral));
|
|
202
|
+
--color-neutral-muted: hsl(var(--neutral-muted));
|
|
203
|
+
--color-neutral-weakest: hsl(var(--neutral-weakest));
|
|
204
|
+
--color-neutral-weaker: hsl(var(--neutral-weaker));
|
|
205
|
+
--color-neutral-weak: hsl(var(--neutral-weak));
|
|
206
|
+
--color-neutral-strong: hsl(var(--neutral-strong));
|
|
207
|
+
--color-neutral-stronger: hsl(var(--neutral-stronger));
|
|
208
|
+
--color-neutral-strongest: hsl(var(--neutral-strongest));
|
|
209
|
+
--color-card: hsl(var(--card));
|
|
210
|
+
--color-card-foreground: hsl(var(--card-foreground));
|
|
211
|
+
--color-popover: hsl(var(--popover));
|
|
212
|
+
--color-popover-foreground: hsl(var(--popover-foreground));
|
|
213
|
+
--color-primary: hsl(var(--primary));
|
|
214
|
+
--color-primary-foreground: hsl(var(--primary-foreground));
|
|
215
|
+
--color-primary-muted: hsl(var(--primary-muted));
|
|
216
|
+
--color-primary-weakest: hsl(var(--primary-weakest));
|
|
217
|
+
--color-primary-weaker: hsl(var(--primary-weaker));
|
|
218
|
+
--color-primary-weak: hsl(var(--primary-weak));
|
|
219
|
+
--color-primary-strong: hsl(var(--primary-strong));
|
|
220
|
+
--color-primary-stronger: hsl(var(--primary-stronger));
|
|
221
|
+
--color-primary-strongest: hsl(var(--primary-strongest));
|
|
222
|
+
/* Raw deepest-navy primitive: unlike the emphasis aliases above it does NOT
|
|
223
|
+
invert in dark mode, so it's the stable "app chrome" surface (dark header
|
|
224
|
+
+ rounded-panel backdrop) in both light and dark. */
|
|
225
|
+
--color-primary-900: hsl(var(--primary-900));
|
|
226
|
+
--color-secondary: hsl(var(--secondary));
|
|
227
|
+
--color-secondary-foreground: hsl(var(--secondary-foreground));
|
|
228
|
+
--color-secondary-muted: hsl(var(--secondary-muted));
|
|
229
|
+
--color-secondary-weakest: hsl(var(--secondary-weakest));
|
|
230
|
+
--color-secondary-weaker: hsl(var(--secondary-weaker));
|
|
231
|
+
--color-secondary-weak: hsl(var(--secondary-weak));
|
|
232
|
+
--color-secondary-strong: hsl(var(--secondary-strong));
|
|
233
|
+
--color-secondary-stronger: hsl(var(--secondary-stronger));
|
|
234
|
+
--color-secondary-strongest: hsl(var(--secondary-strongest));
|
|
235
|
+
--color-accent: hsl(var(--accent));
|
|
236
|
+
--color-accent-foreground: hsl(var(--accent-foreground));
|
|
237
|
+
--color-accent-muted: hsl(var(--accent-muted));
|
|
238
|
+
--color-accent-weakest: hsl(var(--accent-weakest));
|
|
239
|
+
--color-accent-weaker: hsl(var(--accent-weaker));
|
|
240
|
+
--color-accent-weak: hsl(var(--accent-weak));
|
|
241
|
+
--color-accent-strong: hsl(var(--accent-strong));
|
|
242
|
+
--color-accent-stronger: hsl(var(--accent-stronger));
|
|
243
|
+
--color-accent-strongest: hsl(var(--accent-strongest));
|
|
244
|
+
/* Tertiary - currently only the Adrec brand defines these primitives; the
|
|
245
|
+
* utilities are inert on brands that don't. */
|
|
246
|
+
--color-tertiary: hsl(var(--tertiary));
|
|
247
|
+
--color-tertiary-foreground: hsl(var(--tertiary-foreground));
|
|
248
|
+
--color-tertiary-muted: hsl(var(--tertiary-muted));
|
|
249
|
+
--color-tertiary-weakest: hsl(var(--tertiary-weakest));
|
|
250
|
+
--color-tertiary-weaker: hsl(var(--tertiary-weaker));
|
|
251
|
+
--color-tertiary-weak: hsl(var(--tertiary-weak));
|
|
252
|
+
--color-tertiary-strong: hsl(var(--tertiary-strong));
|
|
253
|
+
--color-tertiary-stronger: hsl(var(--tertiary-stronger));
|
|
254
|
+
--color-tertiary-strongest: hsl(var(--tertiary-strongest));
|
|
255
|
+
--color-muted: hsl(var(--muted));
|
|
256
|
+
--color-muted-foreground: hsl(var(--muted-foreground));
|
|
257
|
+
--color-selected: hsl(var(--selected));
|
|
258
|
+
--color-destructive: hsl(var(--destructive));
|
|
259
|
+
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
|
260
|
+
--color-destructive-muted: hsl(var(--destructive-muted));
|
|
261
|
+
--color-destructive-weakest: hsl(var(--destructive-weakest));
|
|
262
|
+
--color-destructive-weaker: hsl(var(--destructive-weaker));
|
|
263
|
+
--color-destructive-weak: hsl(var(--destructive-weak));
|
|
264
|
+
--color-destructive-strong: hsl(var(--destructive-strong));
|
|
265
|
+
--color-destructive-stronger: hsl(var(--destructive-stronger));
|
|
266
|
+
--color-destructive-strongest: hsl(var(--destructive-strongest));
|
|
267
|
+
--color-success: hsl(var(--success));
|
|
268
|
+
--color-success-foreground: hsl(var(--success-foreground));
|
|
269
|
+
--color-success-muted: hsl(var(--success-muted));
|
|
270
|
+
--color-success-weakest: hsl(var(--success-weakest));
|
|
271
|
+
--color-success-weaker: hsl(var(--success-weaker));
|
|
272
|
+
--color-success-weak: hsl(var(--success-weak));
|
|
273
|
+
--color-success-strong: hsl(var(--success-strong));
|
|
274
|
+
--color-success-stronger: hsl(var(--success-stronger));
|
|
275
|
+
--color-success-strongest: hsl(var(--success-strongest));
|
|
276
|
+
--color-warning: hsl(var(--warning));
|
|
277
|
+
--color-warning-foreground: hsl(var(--warning-foreground));
|
|
278
|
+
--color-warning-muted: hsl(var(--warning-muted));
|
|
279
|
+
--color-warning-weakest: hsl(var(--warning-weakest));
|
|
280
|
+
--color-warning-weaker: hsl(var(--warning-weaker));
|
|
281
|
+
--color-warning-weak: hsl(var(--warning-weak));
|
|
282
|
+
--color-warning-strong: hsl(var(--warning-strong));
|
|
283
|
+
--color-warning-stronger: hsl(var(--warning-stronger));
|
|
284
|
+
--color-warning-strongest: hsl(var(--warning-strongest));
|
|
285
|
+
/* Background elevation - bg-surface-n1 … bg-surface-3 */
|
|
286
|
+
--color-surface-n1: hsl(var(--surface-n1));
|
|
287
|
+
--color-surface-0: hsl(var(--surface-0));
|
|
288
|
+
--color-surface-1: hsl(var(--surface-1));
|
|
289
|
+
--color-surface-2: hsl(var(--surface-2));
|
|
290
|
+
--color-surface-3: hsl(var(--surface-3));
|
|
291
|
+
|
|
292
|
+
--color-border: hsl(var(--border));
|
|
293
|
+
--color-border-strong: hsl(var(--border-strong));
|
|
294
|
+
--color-input: hsl(var(--input));
|
|
295
|
+
--color-ring: hsl(var(--ring));
|
|
296
|
+
|
|
297
|
+
/* Data-visualisation palette - categorical chart colours */
|
|
298
|
+
--color-chart-1: hsl(var(--chart-1));
|
|
299
|
+
--color-chart-2: hsl(var(--chart-2));
|
|
300
|
+
--color-chart-3: hsl(var(--chart-3));
|
|
301
|
+
--color-chart-4: hsl(var(--chart-4));
|
|
302
|
+
--color-chart-5: hsl(var(--chart-5));
|
|
303
|
+
--color-chart-6: hsl(var(--chart-6));
|
|
304
|
+
--color-chart-7: hsl(var(--chart-7));
|
|
305
|
+
--color-chart-8: hsl(var(--chart-8));
|
|
306
|
+
--color-chart-9: hsl(var(--chart-9));
|
|
307
|
+
--color-chart-10: hsl(var(--chart-10));
|
|
308
|
+
|
|
309
|
+
/* Typography */
|
|
310
|
+
--font-sans: var(--font-family-sans);
|
|
311
|
+
|
|
312
|
+
/* Radius utilities */
|
|
313
|
+
--radius-xs: var(--radius-xs);
|
|
314
|
+
--radius-sm: var(--radius-sm);
|
|
315
|
+
--radius-md: var(--radius-md);
|
|
316
|
+
--radius-lg: var(--radius-lg);
|
|
317
|
+
--radius-xl: var(--radius-xl);
|
|
318
|
+
--radius-full: var(--radius-full);
|
|
319
|
+
--radius-badge: var(--radius-badge);
|
|
320
|
+
|
|
321
|
+
/* Shadow / elevation utilities - reads brand-overridable --shadow-* tokens */
|
|
322
|
+
--shadow-xs: var(--shadow-xs);
|
|
323
|
+
--shadow-sm: var(--shadow-sm);
|
|
324
|
+
--shadow: var(--shadow);
|
|
325
|
+
--shadow-md: var(--shadow-md);
|
|
326
|
+
--shadow-lg: var(--shadow-lg);
|
|
327
|
+
--shadow-xl: var(--shadow-xl);
|
|
328
|
+
--shadow-2xl: var(--shadow-2xl);
|
|
329
|
+
--shadow-primary-btn: var(--shadow-primary-btn);
|
|
330
|
+
--shadow-destructive-btn: var(--shadow-destructive-btn);
|
|
331
|
+
|
|
332
|
+
/* ─── max-width scale for typography & content columns ──────────────
|
|
333
|
+
*
|
|
334
|
+
* Tailwind v4's `max-w-{name}` utility resolves through three namespaces
|
|
335
|
+
* in priority order: `--max-width-*` → `--spacing-*` → `--container-*`.
|
|
336
|
+
*
|
|
337
|
+
* We define `--spacing-{name}` below (so `p-md`, `m-lg`, `gap-2xl` etc.
|
|
338
|
+
* pick up the Adres spacing scale). That `--spacing-*` set ALSO claims
|
|
339
|
+
* names like md / lg / xl / 2xl, which collides with `max-w-{name}`:
|
|
340
|
+
* without an explicit `--max-width-{name}` definition, Tailwind picks the
|
|
341
|
+
* spacing value (~1rem) for `max-w-md` and the page collapses.
|
|
342
|
+
*
|
|
343
|
+
* Defining `--max-width-*` here wins over `--spacing-*` and gives
|
|
344
|
+
* `max-w-{name}` the values devs expect: typography / reading-column
|
|
345
|
+
* widths matching Tailwind v4 defaults. Use these for prose, hero blocks,
|
|
346
|
+
* section intros, paragraph constraints. For full-page wrappers use
|
|
347
|
+
* `max-w-7xl` or `max-w-screen-2xl`; for off-scale needs use a literal
|
|
348
|
+
* like `max-w-[28rem]`.
|
|
349
|
+
*
|
|
350
|
+
* Earlier attempts overrode `--container-*` here with "generous reading
|
|
351
|
+
* widths", but they were inert (spacing took priority anyway) and have been
|
|
352
|
+
* removed.
|
|
353
|
+
*/
|
|
354
|
+
--max-width-2xs: 18rem;
|
|
355
|
+
--max-width-xs: 20rem;
|
|
356
|
+
--max-width-sm: 24rem;
|
|
357
|
+
--max-width-md: 28rem;
|
|
358
|
+
--max-width-lg: 32rem;
|
|
359
|
+
--max-width-xl: 36rem;
|
|
360
|
+
--max-width-2xl: 42rem;
|
|
361
|
+
--max-width-3xl: 48rem;
|
|
362
|
+
--max-width-4xl: 56rem;
|
|
363
|
+
--max-width-5xl: 64rem;
|
|
364
|
+
--max-width-6xl: 72rem;
|
|
365
|
+
--max-width-7xl: 80rem;
|
|
366
|
+
|
|
367
|
+
/* Spacing tokens - mapped into Tailwind v4's --spacing-* namespace so that
|
|
368
|
+
* p-*, px-*, m-*, gap-*, w-*, h-*, size-*, min-w-*, etc. utilities AND all
|
|
369
|
+
* their variants (md:, lg:, hover:, focus:, dark:, …) are generated
|
|
370
|
+
* automatically. */
|
|
371
|
+
--spacing-2xs: var(--space-2xs);
|
|
372
|
+
--spacing-xs: var(--space-xs);
|
|
373
|
+
--spacing-sm: var(--space-sm);
|
|
374
|
+
--spacing-md: var(--space-md);
|
|
375
|
+
--spacing-lg: var(--space-lg);
|
|
376
|
+
--spacing-xl: var(--space-xl);
|
|
377
|
+
--spacing-2xl: var(--space-2xl);
|
|
378
|
+
--spacing-3xl: var(--space-3xl);
|
|
379
|
+
--spacing-4xl: var(--space-4xl);
|
|
380
|
+
--spacing-5xl: var(--space-5xl);
|
|
381
|
+
--spacing-6xl: var(--space-6xl);
|
|
382
|
+
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/* ─────────────────────────────────────────────────────────────────────────────
|
|
386
|
+
* Surface-elevation utilities
|
|
387
|
+
* Apply a single level's fill + shadow to any container. The Card component maps
|
|
388
|
+
* its `elevation` prop onto the same --elevation-* tokens directly (via Tailwind
|
|
389
|
+
* arbitrary-value utilities, so the level wins over the variant's own bg/shadow);
|
|
390
|
+
* these classes expose the identical ramp for non-Card containers.
|
|
391
|
+
* ─────────────────────────────────────────────────────────────────────────── */
|
|
392
|
+
@layer components {
|
|
393
|
+
.elevation-0 { background-color: var(--elevation-0-surface); box-shadow: var(--elevation-0-shadow); }
|
|
394
|
+
.elevation-1 { background-color: var(--elevation-1-surface); box-shadow: var(--elevation-1-shadow); }
|
|
395
|
+
.elevation-2 { background-color: var(--elevation-2-surface); box-shadow: var(--elevation-2-shadow); }
|
|
396
|
+
.elevation-3 { background-color: var(--elevation-3-surface); box-shadow: var(--elevation-3-shadow); }
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/* ─────────────────────────────────────────────────────────────────────────────
|
|
400
|
+
* Accordion open/close keyframes
|
|
401
|
+
* ─────────────────────────────────────────────────────────────────────────── */
|
|
402
|
+
@keyframes accordion-down {
|
|
403
|
+
from { height: 0; }
|
|
404
|
+
to { height: var(--radix-accordion-content-height); }
|
|
405
|
+
}
|
|
406
|
+
@keyframes accordion-up {
|
|
407
|
+
from { height: var(--radix-accordion-content-height); }
|
|
408
|
+
to { height: 0; }
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/* ─────────────────────────────────────────────────────────────────────────────
|
|
412
|
+
* Skeleton shimmer - sliding gradient overlay used by Skeleton variant="shimmer"
|
|
413
|
+
* ─────────────────────────────────────────────────────────────────────────── */
|
|
414
|
+
@keyframes skeleton-shimmer {
|
|
415
|
+
from { transform: translateX(-100%); }
|
|
416
|
+
to { transform: translateX( 100%); }
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/* ─────────────────────────────────────────────────────────────────────────────
|
|
420
|
+
* Text shimmer - a highlight sweeping across clipped text, used by ShimmerText
|
|
421
|
+
* ─────────────────────────────────────────────────────────────────────────── */
|
|
422
|
+
@keyframes text-shimmer {
|
|
423
|
+
from { background-position: 100% center; }
|
|
424
|
+
to { background-position: -100% center; }
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
@theme inline {
|
|
428
|
+
--animate-accordion-down: accordion-down 200ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
429
|
+
--animate-accordion-up: accordion-up 200ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
430
|
+
--animate-skeleton-shimmer: skeleton-shimmer 1.5s linear infinite;
|
|
431
|
+
--animate-text-shimmer: text-shimmer 2.5s linear infinite;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
/* ─────────────────────────────────────────────────────────────────────────────
|
|
436
|
+
* Base element styles
|
|
437
|
+
* ─────────────────────────────────────────────────────────────────────────── */
|
|
438
|
+
|
|
439
|
+
@layer base {
|
|
440
|
+
* {
|
|
441
|
+
border-color: hsl(var(--border));
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
html {
|
|
445
|
+
font-family: var(--font-family-sans, ui-sans-serif, system-ui, sans-serif);
|
|
446
|
+
-webkit-font-smoothing: antialiased;
|
|
447
|
+
-moz-osx-font-smoothing: grayscale;
|
|
448
|
+
text-rendering: optimizeLegibility;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
body {
|
|
452
|
+
background-color: hsl(var(--background));
|
|
453
|
+
color: hsl(var(--foreground));
|
|
454
|
+
font-feature-settings: "rlig" 1, "calt" 1;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/* Numeric data should be tabular-aligned by default in tables and stats */
|
|
458
|
+
[data-tabular="true"], .tabular-nums {
|
|
459
|
+
font-variant-numeric: tabular-nums;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/* Focus-visible - semantic ring colour, generous offset */
|
|
463
|
+
:focus-visible {
|
|
464
|
+
outline: 2px solid hsl(var(--ring));
|
|
465
|
+
outline-offset: 2px;
|
|
466
|
+
border-radius: var(--radius);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/* Reduced motion - collapse durations to near-instant */
|
|
470
|
+
@media (prefers-reduced-motion: reduce) {
|
|
471
|
+
*,
|
|
472
|
+
*::before,
|
|
473
|
+
*::after {
|
|
474
|
+
animation-duration: 0.01ms !important;
|
|
475
|
+
animation-iteration-count: 1 !important;
|
|
476
|
+
transition-duration: 0.01ms !important;
|
|
477
|
+
scroll-behavior: auto !important;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/* ─── Typography utilities ───────────────────────────────────────────────── */
|
|
483
|
+
@import "./typography.css";
|
|
484
|
+
|
|
485
|
+
/* ─── Theme overrides ───────────────────────────────────────────────────── */
|
|
486
|
+
@import "./overrides.css";
|
|
487
|
+
|
|
488
|
+
/* ─── Motion utilities ──────────────────────────────────────────────────── */
|
|
489
|
+
@import "./motion.css";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@layer utilities {
|
|
2
|
+
/* ─── Duration ──────────────────────────────────────────────────────────────
|
|
3
|
+
* Semantic names map to the --motion-* scale defined in base.css.
|
|
4
|
+
* Use these instead of duration-150 / duration-200 / etc.
|
|
5
|
+
* ────────────────────────────────────────────────────────────────────────── */
|
|
6
|
+
|
|
7
|
+
/** Micro-interactions: hover states, feedback, icon swaps. */
|
|
8
|
+
.duration-fast { transition-duration: var(--motion-fast); }
|
|
9
|
+
/** Standard UI: dropdowns, tooltips, form focus rings, small panels. */
|
|
10
|
+
.duration-base { transition-duration: var(--motion-base); }
|
|
11
|
+
/** Large surfaces: drawers, modals, marketing sections. */
|
|
12
|
+
.duration-slow { transition-duration: var(--motion-slow); }
|
|
13
|
+
/** Exit counterpart of base - 70% of base duration so it leaves quickly. */
|
|
14
|
+
.duration-exit { transition-duration: var(--motion-exit); }
|
|
15
|
+
|
|
16
|
+
/* ─── Easing ────────────────────────────────────────────────────────────────
|
|
17
|
+
* Prefixed with `motion-` to avoid collision with Tailwind's built-in
|
|
18
|
+
* ease-in / ease-out / ease-in-out utilities (which use CSS keywords).
|
|
19
|
+
* ────────────────────────────────────────────────────────────────────────── */
|
|
20
|
+
|
|
21
|
+
/** Enter: fast start → smooth deceleration. Use for elements arriving. */
|
|
22
|
+
.ease-motion-out { transition-timing-function: var(--motion-ease-out); }
|
|
23
|
+
/** Exit: gentle start → fast departure. Use for elements leaving. */
|
|
24
|
+
.ease-motion-in { transition-timing-function: var(--motion-ease-in); }
|
|
25
|
+
/** State: balanced arc between two visible positions. */
|
|
26
|
+
.ease-motion-in-out { transition-timing-function: var(--motion-ease-in-out); }
|
|
27
|
+
/** Spring: slight overshoot - physical, tactile feel. */
|
|
28
|
+
.ease-motion-spring { transition-timing-function: var(--motion-spring); }
|
|
29
|
+
|
|
30
|
+
/* ─── Preset transitions ────────────────────────────────────────────────────
|
|
31
|
+
* Compound utilities - set both duration and easing in one class.
|
|
32
|
+
* Pair with transition-* (Tailwind) to set the animated property:
|
|
33
|
+
* transition-colors transition-snappy
|
|
34
|
+
* transition-[border-color,box-shadow] transition-snappy
|
|
35
|
+
*
|
|
36
|
+
* These mirror the `transitions.*` presets in lib/motion.ts so the same
|
|
37
|
+
* semantic names work in both CSS and JS (motion/react) contexts.
|
|
38
|
+
* ────────────────────────────────────────────────────────────────────────── */
|
|
39
|
+
|
|
40
|
+
/** Snappy - micro-interactions: hover, feedback, icon swaps (160ms). */
|
|
41
|
+
.transition-snappy {
|
|
42
|
+
transition-duration: var(--motion-fast);
|
|
43
|
+
transition-timing-function: var(--motion-ease-out);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Smooth - standard UI: dropdowns, tooltips, small panels (280ms). */
|
|
47
|
+
.transition-smooth {
|
|
48
|
+
transition-duration: var(--motion-base);
|
|
49
|
+
transition-timing-function: var(--motion-ease-out);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Slow - large surfaces: drawers, modals, marketing sections (420ms). */
|
|
53
|
+
.transition-slow {
|
|
54
|
+
transition-duration: var(--motion-slow);
|
|
55
|
+
transition-timing-function: var(--motion-ease-out);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Exit - quick departure, 70% of base (200ms ease-in). */
|
|
59
|
+
.transition-exit {
|
|
60
|
+
transition-duration: var(--motion-exit);
|
|
61
|
+
transition-timing-function: var(--motion-ease-in);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Exit slow - large surfaces leaving (280ms ease-in). */
|
|
65
|
+
.transition-exit-slow {
|
|
66
|
+
transition-duration: var(--motion-base);
|
|
67
|
+
transition-timing-function: var(--motion-ease-in);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MGDA type and component overrides on top of the shared utilities.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root :is(.ax\:t-h1, .ax\:t-h2, .ax\:t-h3, .ax\:t-h4, .ax\:t-h5, .ax\:t-h6) {
|
|
6
|
+
font-weight: var(--ax-font-weight-medium);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:root :is(
|
|
10
|
+
.ax\:t-display-3xl,
|
|
11
|
+
.ax\:t-display-2xl,
|
|
12
|
+
.ax\:t-display-xl,
|
|
13
|
+
.ax\:t-display-lg,
|
|
14
|
+
.ax\:t-display-md,
|
|
15
|
+
.ax\:t-display-sm,
|
|
16
|
+
.ax\:t-body-2xl,
|
|
17
|
+
.ax\:t-body-xl,
|
|
18
|
+
.ax\:t-body-lg
|
|
19
|
+
) {
|
|
20
|
+
font-weight: var(--ax-font-weight-light);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Button's primary fill, scoped via its `data-slot="button"` hook so Badge,
|
|
24
|
+
* ButtonGroup, ChatMessage, EntityHeader, and Pagination - which share the
|
|
25
|
+
* same `bg-primary-weaker`/`text-primary-foreground` utility classes - are
|
|
26
|
+
* unaffected. Both light-mode classes and their separate `dark:` utility
|
|
27
|
+
* counterparts are re-pointed; `bg-primary-weakest`/`text-primary-stronger`
|
|
28
|
+
* are themselves mode-aware, so each `@apply` already resolves to the
|
|
29
|
+
* correct value per mode. */
|
|
30
|
+
:root [data-slot="button"].ax\:bg-primary-weaker {
|
|
31
|
+
@apply ax:bg-primary-weakest;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:root [data-slot="button"].ax\:text-primary-foreground {
|
|
35
|
+
@apply ax:text-primary-stronger;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:root.dark [data-slot="button"].ax\:dark\:bg-primary-strong {
|
|
39
|
+
@apply ax:bg-primary-weakest;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:root.dark [data-slot="button"].ax\:dark\:text-primary-weaker {
|
|
43
|
+
@apply ax:text-primary-stronger;
|
|
44
|
+
}
|