файл пакета→ .shtukbase/packages/keer-ui/library/styles/keer-ui.css
library/styles/keer-ui.css
525 строк, 20.0 КБ.
Файл как есть в пакете: код и комментарии в нём не переводятся.
- /*
- * keer-ui: the Tailwind theme and the map of shadcn roles over the keer-style tokens.
- * There are no values here: only references to --ds-* from design/keer-style/tokens.css.
- * The @import line of the tokens is written by the place action: the path from this folder to the tokens of the project.
- * Source: the source app, packages/ui/src/styles/globals.css (28.11.2026); the app themes (themes.css) are not taken.
- */
- @import "tailwindcss";
- @import "tw-animate-css";
- @import "shadcn/tailwind.css";
- @import "{{tokens}}";
- @import "./typography.css";
- @import "./frame.css";
- @source "../**/*.{ts,tsx}";
- /*
- * No value is written here: only references to the roles from tokens.css.
- * The shadcn variables are a map of roles; the Tailwind theme reads them, and its own keys
- * (fonts, font sizes, spacing, radii, shadows, motion) it takes straight from --ds-*.
- * This way any shadcn component is recolored without edits.
- */
- /*
- * There is no dark styling in the design code. The dark: variants in shadcn components
- * stay, but are turned on only by the attribute data-appearance="dark", which
- * nobody sets: the class .dark on <html> recolors nothing any more.
- */
- @custom-variant dark (&:is([data-appearance="dark"] *));
- [data-theme],
- :root {
- /* Where to use: the page background. */
- --background: var(--ds-bg);
- /* Where to use: the main text color. */
- --foreground: var(--ds-text-primary);
- /* Where to use: the card background. */
- --card: var(--ds-bg-raised);
- /* Where to use: text on a card. */
- --card-foreground: var(--ds-text-primary);
- /* Where to use: the background of dropdown menus and tooltips. */
- --popover: var(--ds-menu-colour);
- /* Where to use: text in dropdown menus. */
- --popover-foreground: var(--ds-text-primary);
- /* Where to use: the main action: the dark fill of the default button. */
- --primary: var(--ds-bg-inverse);
- /* Where to use: text on the primary button. */
- --primary-foreground: var(--ds-text-inverse);
- /* Where to use: a secondary fill: the secondary button, the tab strip. */
- --secondary: var(--ds-bg-tertiary);
- /* Where to use: text on a secondary fill. */
- --secondary-foreground: var(--ds-text-primary);
- /* Where to use: a quiet backing: empty areas, a table header, a skeleton. */
- --muted: var(--ds-bg-tertiary);
- /* Where to use: muted text: notes, captions, metadata. */
- --muted-foreground: var(--ds-text-secondary);
- /* Where to use: hover and the chosen item (in shadcn this is not a brand color). */
- --accent: var(--ds-wash-hover);
- /* Where to use: text on hover and on the chosen item. */
- --accent-foreground: var(--ds-text-primary);
- /* Where to use: a dangerous action and a field error. */
- --destructive: var(--ds-danger);
- /* Where to use: text on the danger fill. */
- --destructive-foreground: var(--ds-fg-on-accent);
- /* Where to use: success: saved, connected, done. */
- --success: var(--ds-success);
- /* Where to use: text on the success fill. */
- --success-foreground: var(--ds-fg-on-status);
- /* Where to use: a warning: needs attention but is not broken. */
- --warning: var(--ds-warning);
- /* Where to use: text on the warning fill. */
- --warning-foreground: var(--ds-fg-on-status);
- /* Where to use: info: a neutral hint, a section not connected. */
- --info: var(--ds-info);
- /* Where to use: text on the info fill. */
- --info-foreground: var(--ds-fg-on-status);
- /* Where to use: borders of cards, tables and dividers. */
- --border: var(--ds-border-primary);
- /* Where to use: the border of inputs and outline buttons. */
- --input: var(--ds-border-strong);
- /* Where to use: the focus ring. */
- --ring: var(--ds-ring);
- /* Where to use: the base radius: sm, md, lg, xl are counted from it. */
- --radius: var(--ds-radius-lg);
- /* Where to use: chart series 1. */
- --chart-1: var(--ds-chart-series-1);
- /* Where to use: chart series 2. */
- --chart-2: var(--ds-chart-series-2);
- /* Where to use: chart series 3. */
- --chart-3: var(--ds-chart-series-3);
- /* Where to use: chart series 4. */
- --chart-4: var(--ds-chart-series-4);
- /* Where to use: chart series 5. */
- --chart-5: var(--ds-chart-series-5);
- /* Where to use: the side menu background. */
- --sidebar: var(--ds-bg-sidebar);
- /* Where to use: the side menu text. */
- --sidebar-foreground: var(--ds-text-lane);
- /* Where to use: a highlight in the side menu: the product icon, a marker. */
- --sidebar-primary: var(--ds-bg-inverse);
- /* Where to use: text on a highlight in the side menu. */
- --sidebar-primary-foreground: var(--ds-text-inverse);
- /* Where to use: hover and the active item of the side menu. */
- --sidebar-accent: var(--ds-wash-hover-lane);
- /* Where to use: text on the active item of the side menu. */
- --sidebar-accent-foreground: var(--ds-text-primary);
- /* Where to use: the side menu border. */
- --sidebar-border: var(--ds-border-secondary);
- /* Where to use: the focus ring in the side menu. */
- --sidebar-ring: var(--ds-ring);
- }
- @theme inline {
- /* shadcn colors: the theme reads the map of roles above, not --ds-* directly, so that a role is written once. */
- --color-background: var(--background);
- --color-foreground: var(--foreground);
- --color-card: var(--card);
- --color-card-foreground: var(--card-foreground);
- --color-popover: var(--popover);
- --color-popover-foreground: var(--popover-foreground);
- --color-primary: var(--primary);
- --color-primary-foreground: var(--primary-foreground);
- --color-secondary: var(--secondary);
- --color-secondary-foreground: var(--secondary-foreground);
- --color-muted: var(--muted);
- --color-muted-foreground: var(--muted-foreground);
- --color-accent: var(--accent);
- --color-accent-foreground: var(--accent-foreground);
- --color-destructive: var(--destructive);
- --color-destructive-foreground: var(--destructive-foreground);
- --color-border: var(--border);
- --color-input: var(--input);
- --color-ring: var(--ring);
- --color-success-foreground: var(--success-foreground);
- --color-warning-foreground: var(--warning-foreground);
- --color-info: var(--info);
- --color-info-foreground: var(--info-foreground);
- --color-chart-1: var(--chart-1);
- --color-chart-2: var(--chart-2);
- --color-chart-3: var(--chart-3);
- --color-chart-4: var(--chart-4);
- --color-chart-5: var(--chart-5);
- --color-sidebar: var(--sidebar);
- --color-sidebar-foreground: var(--sidebar-foreground);
- --color-sidebar-primary: var(--sidebar-primary);
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
- --color-sidebar-accent: var(--sidebar-accent);
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
- --color-sidebar-border: var(--sidebar-border);
- --color-sidebar-ring: var(--sidebar-ring);
- /* Design-code roles that shadcn does not have. */
- --color-tertiary-foreground: var(--ds-text-tertiary);
- --color-mark: var(--ds-mark-secondary);
- --color-mark-strong: var(--ds-mark-primary);
- --color-mark-quiet: var(--ds-mark-tertiary);
- --color-border-subtle: var(--ds-border-secondary);
- --color-border-strong: var(--ds-border-strong);
- /* The blue accent: ds-accent, so as not to confuse it with the shadcn accent (hover). */
- --color-ds-accent: var(--ds-accent);
- --color-ds-accent-hover: var(--ds-accent-hover);
- --color-ds-accent-soft: var(--ds-accent-soft);
- --color-pressed: var(--ds-wash-pressed);
- --color-field: var(--ds-bg-field);
- --color-destructive-strong: var(--ds-danger-fg);
- --color-destructive-soft: var(--ds-danger-bg);
- --color-warning: var(--warning);
- --color-warning-soft: var(--ds-warning-bg);
- --color-success: var(--success);
- --color-needs-you: var(--ds-needs-you);
- --color-tone-blue: var(--ds-tone-blue-fg);
- --color-tone-blue-soft: var(--ds-tone-blue-bg);
- --color-tone-green: var(--ds-tone-green-fg);
- --color-tone-green-soft: var(--ds-tone-green-bg);
- --color-tone-amber: var(--ds-tone-amber-fg);
- --color-tone-amber-soft: var(--ds-tone-amber-bg);
- --color-tone-red: var(--ds-tone-red-fg);
- --color-tone-red-soft: var(--ds-tone-red-bg);
- --color-table-header: var(--ds-bg-database-header);
- --color-row-hover: var(--ds-bg-record-hover);
- --color-chat-bubble: var(--ds-chat-bubble-bg);
- --color-chat-bubble-foreground: var(--ds-chat-bubble-fg);
- --color-backdrop: var(--ds-backdrop);
- --color-backdrop-light: var(--ds-backdrop-light);
- --color-veil: var(--ds-veil);
- /* Where to use: the page header. */
- --color-topbar: var(--ds-bg-topbar);
- /* Where to use: the active item of the side menu and its edge. */
- --color-sidebar-active: var(--ds-nav-active-bg);
- --color-sidebar-active-ring: var(--ds-nav-active-ring);
- --color-sidebar-active-foreground: var(--ds-nav-active-fg);
- --color-sidebar-active-mark: var(--ds-nav-active-mark);
- /* Where to use: a field on a gray panel. */
- --color-field-lane: var(--ds-bg-field-lane);
- /* Where to use: lines of the page frame. */
- --color-frame: var(--ds-frame-line);
- --color-frame-brand: var(--ds-frame-brand-line);
- --color-champagne: var(--ds-champagne);
- /* Where to use: a calm badge with no tone. */
- --color-tone-neutral: var(--ds-tone-neutral-fg);
- --color-tone-neutral-soft: var(--ds-tone-neutral-bg);
- --color-quiet: var(--ds-bg-secondary);
- /* Font and font sizes. */
- --font-sans: var(--ds-font-sans);
- --font-mono: var(--ds-font-mono);
- --font-serif: var(--ds-font-serif);
- --font-count: var(--ds-count-font);
- --font-weight-normal: var(--ds-font-weight-regular);
- --font-weight-book: var(--ds-font-weight-book);
- --font-weight-medium: var(--ds-font-weight-medium);
- --font-weight-strong: var(--ds-font-weight-strong);
- --font-weight-semibold: var(--ds-font-weight-semibold);
- --font-weight-bold: var(--ds-font-weight-bold);
- --text-xs: var(--ds-font-ui-small-size);
- --text-xs--line-height: var(--ds-line-ui-small);
- --text-sm: var(--ds-font-ui-size);
- --text-sm--line-height: var(--ds-line-ui);
- --text-base: var(--ds-font-page-reading-size);
- --text-base--line-height: var(--ds-line-page-reading);
- --text-lg: var(--ds-font-heading-4-size);
- --text-lg--line-height: var(--ds-line-heading-4);
- --text-xl: var(--ds-font-heading-3-size);
- --text-xl--line-height: var(--ds-line-heading-3);
- --text-2xl: var(--ds-font-heading-2-size);
- --text-2xl--line-height: var(--ds-line-heading-2);
- --text-3xl: var(--ds-font-heading-1-size);
- --text-3xl--line-height: var(--ds-line-heading-1);
- --text-4xl: var(--ds-font-page-title-size);
- --text-4xl--line-height: var(--ds-line-page-title);
- --leading-none: var(--ds-line-none);
- --leading-normal: var(--ds-line-ui-relaxed);
- --tracking-tight: var(--ds-letter-spacing-title);
- --tracking-wide: var(--ds-letter-spacing-label);
- /* Spacing: the Tailwind step is --ds-space-1, so p-2, gap-1.5 and h-8 are right on the design-code scale. */
- --spacing: var(--ds-space-1);
- /* Where to use: the line width of notes and the main text: the class `max-w-measure`. */
- --container-measure: var(--ds-reading-measure);
- --spacing-control: var(--ds-control-height);
- --spacing-control-sm: var(--ds-control-height-sm);
- --spacing-menu-item: var(--ds-menu-item-height);
- --spacing-chip: var(--ds-chip-height);
- --spacing-touch: var(--ds-touch-target);
- --spacing-table-header: var(--ds-database-header-height);
- --spacing-table-row: var(--ds-database-row-height);
- --spacing-table-cell-x: var(--ds-database-cell-padding-inline);
- --spacing-table-cell-y: var(--ds-database-cell-padding-block);
- --spacing-table-toolbar: var(--ds-database-toolbar-height);
- --spacing-chat-user: var(--ds-chat-user-max-width);
- --spacing-composer-max: var(--ds-composer-body-max-height);
- --spacing-tooltip: var(--ds-tooltip-max-width);
- --spacing-sidebar: var(--ds-sidebar-width);
- --spacing-topbar: var(--ds-topbar-height);
- --spacing-gutter: var(--ds-page-gutter);
- /* Where to use: the sign-in form column (max-w-login-form). */
- --spacing-login-form: var(--ds-login-form-width);
- /* Radii. There is nothing larger than --ds-radius-xl in the design code: 2xl and up are the same step. */
- --radius-xs: var(--ds-radius-xs);
- /* Where to use: small elements: checkboxes, badges. */
- --radius-sm: var(--ds-radius-sm);
- /* Where to use: inputs, menus, list items. */
- --radius-md: var(--ds-radius-md);
- /* Where to use: tabs, panels, select lists. */
- --radius-lg: var(--ds-radius-lg);
- /* Where to use: cards. */
- --radius-xl: var(--ds-radius-xl);
- --radius-2xl: var(--ds-radius-xl);
- --radius-3xl: var(--ds-radius-xl);
- --radius-4xl: var(--ds-radius-xl);
- --radius-composer: var(--ds-composer-radius);
- /* Shadows. */
- --shadow-2xs: var(--ds-shadow-control);
- /* Where to use: fields and outline buttons. */
- --shadow-xs: var(--ds-shadow-control);
- /* Where to use: cards. */
- --shadow-sm: var(--ds-shadow-soft);
- /* Where to use: dropdown menus and tooltips. */
- --shadow-md: var(--ds-shadow-popover);
- /* Where to use: dialogs and side panels. */
- --shadow-lg: var(--ds-shadow-overlay);
- --shadow-xl: var(--ds-shadow-overlay);
- --shadow-2xl: var(--ds-shadow-overlay);
- /* Where to use: the primary button. */
- --shadow-primary: var(--ds-shadow-primary);
- /* Where to use: the active tab, a tile on a gray strip. */
- --shadow-tile: var(--ds-shadow-tile);
- --shadow-card: var(--ds-shadow-card);
- --shadow-hair: var(--ds-shadow-hair);
- --shadow-hair-strong: var(--ds-shadow-hair-strong);
- --shadow-hair-pressed: var(--ds-shadow-hair-pressed);
- --shadow-primary-pressed: var(--ds-shadow-primary-pressed);
- /* Motion. */
- --ease-in: var(--ds-motion-exit);
- --ease-out: var(--ds-motion-enter);
- --ease-in-out: var(--ds-motion-move);
- /* Where to use: collapsing the side panel and sliding out panels. */
- --ease-panel: var(--ds-motion-panel-ease);
- --default-transition-duration: var(--ds-motion-instant);
- --default-transition-timing-function: var(--ds-motion-move);
- }
- /* Where to use: the content of an opened row of a wide table: the width of the visible area of the container (`@container`). */
- @utility w-table-view {
- width: var(--ds-table-view-width);
- }
- /* Where to use: the edge of the assistant output (AgentNote): a hairline of a white-gold shimmer along the card edge, the card background inside. */
- @utility edge-copilot {
- border: var(--ds-copilot-edge-border);
- background:
- linear-gradient(var(--card), var(--card)) padding-box,
- var(--ds-copilot-edge) border-box;
- }
- /*
- * Where to use: the edge of the request line while a task runs (RequestLine `glow`). The “Shine” mode (Magic UI, Shine Border, MIT):
- * a thin rim over the card border, along which a radial white-gold shine travels from corner to corner and back.
- * The radius is inherited from the card. `data-on="true"` means it is lit; otherwise it fades out smoothly and stays.
- * With “reduced motion” the shine is visible but does not move.
- */
- @utility rim-shine {
- position: absolute;
- inset: var(--ds-rim-inset);
- border-radius: inherit;
- padding: var(--ds-rim-width);
- pointer-events: none;
- background-image: radial-gradient(
- transparent,
- transparent,
- var(--ds-rim-2),
- var(--ds-rim-3),
- var(--ds-rim-4),
- transparent,
- transparent
- );
- background-size: var(--ds-rim-field-size);
- -webkit-mask: var(--ds-rim-mask-webkit);
- -webkit-mask-composite: xor;
- mask: var(--ds-rim-mask);
- opacity: var(--ds-rim-opacity-off);
- transition: var(--ds-rim-fade);
- animation: ds-rim-shine var(--ds-rim-duration) linear infinite;
- animation-play-state: paused;
- &[data-on="true"] {
- opacity: var(--ds-rim-opacity-on);
- animation-play-state: running;
- }
- @media (prefers-reduced-motion: reduce) {
- &,
- &[data-on="true"] {
- animation-play-state: paused;
- transition: none;
- }
- }
- }
- @keyframes ds-rim-shine {
- 0% {
- background-position: var(--ds-rim-field-start);
- }
- 50% {
- background-position: var(--ds-rim-field-end);
- }
- to {
- background-position: var(--ds-rim-field-start);
- }
- }
- /* Where to use: a “caption: value” row in forms and settings lists: a narrow caption column (up to 12rem) and a field. */
- @utility grid-cols-label-field {
- grid-template-columns: var(--ds-grid-label-field);
- }
- /* Where to use: a list row: a stretching text on the left and an action or a badge on the right at its own width. */
- @utility grid-cols-main-aside {
- grid-template-columns: var(--ds-grid-main-aside);
- }
- /* Where to use: a “badge: text” row: the badge at its own width, the text stretches. */
- @utility grid-cols-aside-main {
- grid-template-columns: var(--ds-grid-aside-main);
- }
- /* Where to use: a list table: a title and two numbers. */
- @utility grid-cols-figures {
- grid-template-columns: var(--ds-grid-figures);
- }
- /* Where to use: a list table on a wide screen: a title, two numbers and an address. */
- @utility grid-cols-figures-wide {
- grid-template-columns: var(--ds-grid-figures-wide);
- }
- /* Where to use: a list table: a title and two equal columns of values. */
- @utility grid-cols-pair-values {
- grid-template-columns: var(--ds-grid-pair-values);
- }
- /* Where to use: a “value: change” cell. */
- @utility grid-cols-value-delta {
- grid-template-columns: var(--ds-grid-value-delta);
- }
- /*
- * Where to use: parts of the sign-in screen, appearing in turn, together with
- * animate-in fade-in motion-safe:slide-in-from-bottom-1.5; N is the place in the queue.
- */
- @utility rise-step-* {
- --tw-animation-duration: var(--ds-motion-lane);
- --tw-ease: var(--ds-motion-enter);
- --tw-animation-fill-mode: both;
- --tw-animation-delay: calc(var(--ds-login-stagger) * --value(integer));
- }
- @utility outline-focus {
- outline: var(--ds-focus-ring);
- outline-offset: var(--ds-focus-ring-offset);
- }
- @layer base {
- * {
- @apply border-border outline-ring/50;
- /* A thin scroll bar, visible only under the pointer. */
- scrollbar-width: var(--ds-scrollbar-width);
- scrollbar-color: var(--ds-scrollbar-thumb-rest) var(--ds-scrollbar-track);
- }
- :hover {
- scrollbar-color: var(--ds-scrollbar-thumb) var(--ds-scrollbar-track);
- }
- html {
- font-family: var(--ds-font-sans);
- /* 16px: rem is counted from it. */
- font-size: var(--ds-font-root-size);
- line-height: var(--ds-line-root);
- -webkit-font-smoothing: antialiased;
- }
- body {
- /* The main interface text is 14px, like text-body. */
- font-size: var(--ds-font-ui-size);
- line-height: var(--ds-line-ui);
- letter-spacing: var(--ds-letter-spacing-ui);
- @apply bg-background text-foreground;
- }
- /* On a touch screen a field is no smaller than 16px: otherwise iOS zooms the page on focus. */
- @media (hover: none) and (pointer: coarse) {
- input:not(
- [type="checkbox"],
- [type="radio"],
- [type="range"],
- [type="file"],
- [type="hidden"]
- ),
- textarea {
- font-size: max(
- var(--ds-font-field-touch-size),
- var(--ds-font-size-inherited)
- );
- }
- }
- }
- /*
- * Changing screens when a task starts (View Transitions, a transition with `viewTransition`): the request line
- * (RequestLine `lg` and `task`, `data-transition="request"`) is the shared element: from the function page or
- * the dashboard it moves to the place of the task screen line, the rest of the screen changes by cross-fade.
- * There is one such line on the screen.
- */
- [data-transition="request"] {
- view-transition-name: request;
- }
- @keyframes ds-vt-out {
- to {
- opacity: var(--ds-motion-page-opacity-gone);
- }
- }
- @keyframes ds-vt-in {
- from {
- opacity: var(--ds-motion-page-opacity-gone);
- }
- }
- ::view-transition-old(root) {
- animation: ds-vt-out var(--ds-motion-page-swap) var(--ds-motion-page-ease)
- both;
- }
- ::view-transition-new(root) {
- animation: ds-vt-in var(--ds-motion-page-swap) var(--ds-motion-page-ease) both;
- }
- ::view-transition-group(request) {
- animation-duration: var(--ds-motion-request-move);
- animation-timing-function: var(--ds-motion-request-ease);
- }
- ::view-transition-old(request),
- ::view-transition-new(request) {
- height: var(--ds-motion-request-snapshot-height);
- object-fit: none;
- object-position: left top;
- overflow: clip;
- }
- ::view-transition-old(request) {
- animation: ds-vt-out var(--ds-motion-request-out) ease both;
- }
- ::view-transition-new(request) {
- animation: ds-vt-in var(--ds-motion-request-in)
- var(--ds-motion-request-in-delay) ease both;
- }
- @media (prefers-reduced-motion: reduce) {
- ::view-transition-group(*),
- ::view-transition-old(*),
- ::view-transition-new(*) {
- animation: none;
- }
- }