ShtukbaseStandard
archivo del paquete→ .shtukbase/packages/keer-ui/library/styles/keer-ui.css

library/styles/keer-ui.css

525 líneas, 20.0 KB.

El archivo tal como está en el paquete: el código y sus comentarios no se traducen.

  1. /*
  2. * keer-ui: the Tailwind theme and the map of shadcn roles over the keer-style tokens.
  3. * There are no values here: only references to --ds-* from design/keer-style/tokens.css.
  4. * The @import line of the tokens is written by the place action: the path from this folder to the tokens of the project.
  5. * Source: the source app, packages/ui/src/styles/globals.css (28.11.2026); the app themes (themes.css) are not taken.
  6. */
  7. @import "tailwindcss";
  8. @import "tw-animate-css";
  9. @import "shadcn/tailwind.css";
  10. @import "{{tokens}}";
  11. @import "./typography.css";
  12. @import "./frame.css";
  13. @source "../**/*.{ts,tsx}";
  14. /*
  15. * No value is written here: only references to the roles from tokens.css.
  16. * The shadcn variables are a map of roles; the Tailwind theme reads them, and its own keys
  17. * (fonts, font sizes, spacing, radii, shadows, motion) it takes straight from --ds-*.
  18. * This way any shadcn component is recolored without edits.
  19. */
  20. /*
  21. * There is no dark styling in the design code. The dark: variants in shadcn components
  22. * stay, but are turned on only by the attribute data-appearance="dark", which
  23. * nobody sets: the class .dark on <html> recolors nothing any more.
  24. */
  25. @custom-variant dark (&:is([data-appearance="dark"] *));
  26. [data-theme],
  27. :root {
  28. /* Where to use: the page background. */
  29. --background: var(--ds-bg);
  30. /* Where to use: the main text color. */
  31. --foreground: var(--ds-text-primary);
  32. /* Where to use: the card background. */
  33. --card: var(--ds-bg-raised);
  34. /* Where to use: text on a card. */
  35. --card-foreground: var(--ds-text-primary);
  36. /* Where to use: the background of dropdown menus and tooltips. */
  37. --popover: var(--ds-menu-colour);
  38. /* Where to use: text in dropdown menus. */
  39. --popover-foreground: var(--ds-text-primary);
  40. /* Where to use: the main action: the dark fill of the default button. */
  41. --primary: var(--ds-bg-inverse);
  42. /* Where to use: text on the primary button. */
  43. --primary-foreground: var(--ds-text-inverse);
  44. /* Where to use: a secondary fill: the secondary button, the tab strip. */
  45. --secondary: var(--ds-bg-tertiary);
  46. /* Where to use: text on a secondary fill. */
  47. --secondary-foreground: var(--ds-text-primary);
  48. /* Where to use: a quiet backing: empty areas, a table header, a skeleton. */
  49. --muted: var(--ds-bg-tertiary);
  50. /* Where to use: muted text: notes, captions, metadata. */
  51. --muted-foreground: var(--ds-text-secondary);
  52. /* Where to use: hover and the chosen item (in shadcn this is not a brand color). */
  53. --accent: var(--ds-wash-hover);
  54. /* Where to use: text on hover and on the chosen item. */
  55. --accent-foreground: var(--ds-text-primary);
  56. /* Where to use: a dangerous action and a field error. */
  57. --destructive: var(--ds-danger);
  58. /* Where to use: text on the danger fill. */
  59. --destructive-foreground: var(--ds-fg-on-accent);
  60. /* Where to use: success: saved, connected, done. */
  61. --success: var(--ds-success);
  62. /* Where to use: text on the success fill. */
  63. --success-foreground: var(--ds-fg-on-status);
  64. /* Where to use: a warning: needs attention but is not broken. */
  65. --warning: var(--ds-warning);
  66. /* Where to use: text on the warning fill. */
  67. --warning-foreground: var(--ds-fg-on-status);
  68. /* Where to use: info: a neutral hint, a section not connected. */
  69. --info: var(--ds-info);
  70. /* Where to use: text on the info fill. */
  71. --info-foreground: var(--ds-fg-on-status);
  72. /* Where to use: borders of cards, tables and dividers. */
  73. --border: var(--ds-border-primary);
  74. /* Where to use: the border of inputs and outline buttons. */
  75. --input: var(--ds-border-strong);
  76. /* Where to use: the focus ring. */
  77. --ring: var(--ds-ring);
  78. /* Where to use: the base radius: sm, md, lg, xl are counted from it. */
  79. --radius: var(--ds-radius-lg);
  80. /* Where to use: chart series 1. */
  81. --chart-1: var(--ds-chart-series-1);
  82. /* Where to use: chart series 2. */
  83. --chart-2: var(--ds-chart-series-2);
  84. /* Where to use: chart series 3. */
  85. --chart-3: var(--ds-chart-series-3);
  86. /* Where to use: chart series 4. */
  87. --chart-4: var(--ds-chart-series-4);
  88. /* Where to use: chart series 5. */
  89. --chart-5: var(--ds-chart-series-5);
  90. /* Where to use: the side menu background. */
  91. --sidebar: var(--ds-bg-sidebar);
  92. /* Where to use: the side menu text. */
  93. --sidebar-foreground: var(--ds-text-lane);
  94. /* Where to use: a highlight in the side menu: the product icon, a marker. */
  95. --sidebar-primary: var(--ds-bg-inverse);
  96. /* Where to use: text on a highlight in the side menu. */
  97. --sidebar-primary-foreground: var(--ds-text-inverse);
  98. /* Where to use: hover and the active item of the side menu. */
  99. --sidebar-accent: var(--ds-wash-hover-lane);
  100. /* Where to use: text on the active item of the side menu. */
  101. --sidebar-accent-foreground: var(--ds-text-primary);
  102. /* Where to use: the side menu border. */
  103. --sidebar-border: var(--ds-border-secondary);
  104. /* Where to use: the focus ring in the side menu. */
  105. --sidebar-ring: var(--ds-ring);
  106. }
  107. @theme inline {
  108. /* shadcn colors: the theme reads the map of roles above, not --ds-* directly, so that a role is written once. */
  109. --color-background: var(--background);
  110. --color-foreground: var(--foreground);
  111. --color-card: var(--card);
  112. --color-card-foreground: var(--card-foreground);
  113. --color-popover: var(--popover);
  114. --color-popover-foreground: var(--popover-foreground);
  115. --color-primary: var(--primary);
  116. --color-primary-foreground: var(--primary-foreground);
  117. --color-secondary: var(--secondary);
  118. --color-secondary-foreground: var(--secondary-foreground);
  119. --color-muted: var(--muted);
  120. --color-muted-foreground: var(--muted-foreground);
  121. --color-accent: var(--accent);
  122. --color-accent-foreground: var(--accent-foreground);
  123. --color-destructive: var(--destructive);
  124. --color-destructive-foreground: var(--destructive-foreground);
  125. --color-border: var(--border);
  126. --color-input: var(--input);
  127. --color-ring: var(--ring);
  128. --color-success-foreground: var(--success-foreground);
  129. --color-warning-foreground: var(--warning-foreground);
  130. --color-info: var(--info);
  131. --color-info-foreground: var(--info-foreground);
  132. --color-chart-1: var(--chart-1);
  133. --color-chart-2: var(--chart-2);
  134. --color-chart-3: var(--chart-3);
  135. --color-chart-4: var(--chart-4);
  136. --color-chart-5: var(--chart-5);
  137. --color-sidebar: var(--sidebar);
  138. --color-sidebar-foreground: var(--sidebar-foreground);
  139. --color-sidebar-primary: var(--sidebar-primary);
  140. --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  141. --color-sidebar-accent: var(--sidebar-accent);
  142. --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  143. --color-sidebar-border: var(--sidebar-border);
  144. --color-sidebar-ring: var(--sidebar-ring);
  145. /* Design-code roles that shadcn does not have. */
  146. --color-tertiary-foreground: var(--ds-text-tertiary);
  147. --color-mark: var(--ds-mark-secondary);
  148. --color-mark-strong: var(--ds-mark-primary);
  149. --color-mark-quiet: var(--ds-mark-tertiary);
  150. --color-border-subtle: var(--ds-border-secondary);
  151. --color-border-strong: var(--ds-border-strong);
  152. /* The blue accent: ds-accent, so as not to confuse it with the shadcn accent (hover). */
  153. --color-ds-accent: var(--ds-accent);
  154. --color-ds-accent-hover: var(--ds-accent-hover);
  155. --color-ds-accent-soft: var(--ds-accent-soft);
  156. --color-pressed: var(--ds-wash-pressed);
  157. --color-field: var(--ds-bg-field);
  158. --color-destructive-strong: var(--ds-danger-fg);
  159. --color-destructive-soft: var(--ds-danger-bg);
  160. --color-warning: var(--warning);
  161. --color-warning-soft: var(--ds-warning-bg);
  162. --color-success: var(--success);
  163. --color-needs-you: var(--ds-needs-you);
  164. --color-tone-blue: var(--ds-tone-blue-fg);
  165. --color-tone-blue-soft: var(--ds-tone-blue-bg);
  166. --color-tone-green: var(--ds-tone-green-fg);
  167. --color-tone-green-soft: var(--ds-tone-green-bg);
  168. --color-tone-amber: var(--ds-tone-amber-fg);
  169. --color-tone-amber-soft: var(--ds-tone-amber-bg);
  170. --color-tone-red: var(--ds-tone-red-fg);
  171. --color-tone-red-soft: var(--ds-tone-red-bg);
  172. --color-table-header: var(--ds-bg-database-header);
  173. --color-row-hover: var(--ds-bg-record-hover);
  174. --color-chat-bubble: var(--ds-chat-bubble-bg);
  175. --color-chat-bubble-foreground: var(--ds-chat-bubble-fg);
  176. --color-backdrop: var(--ds-backdrop);
  177. --color-backdrop-light: var(--ds-backdrop-light);
  178. --color-veil: var(--ds-veil);
  179. /* Where to use: the page header. */
  180. --color-topbar: var(--ds-bg-topbar);
  181. /* Where to use: the active item of the side menu and its edge. */
  182. --color-sidebar-active: var(--ds-nav-active-bg);
  183. --color-sidebar-active-ring: var(--ds-nav-active-ring);
  184. --color-sidebar-active-foreground: var(--ds-nav-active-fg);
  185. --color-sidebar-active-mark: var(--ds-nav-active-mark);
  186. /* Where to use: a field on a gray panel. */
  187. --color-field-lane: var(--ds-bg-field-lane);
  188. /* Where to use: lines of the page frame. */
  189. --color-frame: var(--ds-frame-line);
  190. --color-frame-brand: var(--ds-frame-brand-line);
  191. --color-champagne: var(--ds-champagne);
  192. /* Where to use: a calm badge with no tone. */
  193. --color-tone-neutral: var(--ds-tone-neutral-fg);
  194. --color-tone-neutral-soft: var(--ds-tone-neutral-bg);
  195. --color-quiet: var(--ds-bg-secondary);
  196. /* Font and font sizes. */
  197. --font-sans: var(--ds-font-sans);
  198. --font-mono: var(--ds-font-mono);
  199. --font-serif: var(--ds-font-serif);
  200. --font-count: var(--ds-count-font);
  201. --font-weight-normal: var(--ds-font-weight-regular);
  202. --font-weight-book: var(--ds-font-weight-book);
  203. --font-weight-medium: var(--ds-font-weight-medium);
  204. --font-weight-strong: var(--ds-font-weight-strong);
  205. --font-weight-semibold: var(--ds-font-weight-semibold);
  206. --font-weight-bold: var(--ds-font-weight-bold);
  207. --text-xs: var(--ds-font-ui-small-size);
  208. --text-xs--line-height: var(--ds-line-ui-small);
  209. --text-sm: var(--ds-font-ui-size);
  210. --text-sm--line-height: var(--ds-line-ui);
  211. --text-base: var(--ds-font-page-reading-size);
  212. --text-base--line-height: var(--ds-line-page-reading);
  213. --text-lg: var(--ds-font-heading-4-size);
  214. --text-lg--line-height: var(--ds-line-heading-4);
  215. --text-xl: var(--ds-font-heading-3-size);
  216. --text-xl--line-height: var(--ds-line-heading-3);
  217. --text-2xl: var(--ds-font-heading-2-size);
  218. --text-2xl--line-height: var(--ds-line-heading-2);
  219. --text-3xl: var(--ds-font-heading-1-size);
  220. --text-3xl--line-height: var(--ds-line-heading-1);
  221. --text-4xl: var(--ds-font-page-title-size);
  222. --text-4xl--line-height: var(--ds-line-page-title);
  223. --leading-none: var(--ds-line-none);
  224. --leading-normal: var(--ds-line-ui-relaxed);
  225. --tracking-tight: var(--ds-letter-spacing-title);
  226. --tracking-wide: var(--ds-letter-spacing-label);
  227. /* Spacing: the Tailwind step is --ds-space-1, so p-2, gap-1.5 and h-8 are right on the design-code scale. */
  228. --spacing: var(--ds-space-1);
  229. /* Where to use: the line width of notes and the main text: the class `max-w-measure`. */
  230. --container-measure: var(--ds-reading-measure);
  231. --spacing-control: var(--ds-control-height);
  232. --spacing-control-sm: var(--ds-control-height-sm);
  233. --spacing-menu-item: var(--ds-menu-item-height);
  234. --spacing-chip: var(--ds-chip-height);
  235. --spacing-touch: var(--ds-touch-target);
  236. --spacing-table-header: var(--ds-database-header-height);
  237. --spacing-table-row: var(--ds-database-row-height);
  238. --spacing-table-cell-x: var(--ds-database-cell-padding-inline);
  239. --spacing-table-cell-y: var(--ds-database-cell-padding-block);
  240. --spacing-table-toolbar: var(--ds-database-toolbar-height);
  241. --spacing-chat-user: var(--ds-chat-user-max-width);
  242. --spacing-composer-max: var(--ds-composer-body-max-height);
  243. --spacing-tooltip: var(--ds-tooltip-max-width);
  244. --spacing-sidebar: var(--ds-sidebar-width);
  245. --spacing-topbar: var(--ds-topbar-height);
  246. --spacing-gutter: var(--ds-page-gutter);
  247. /* Where to use: the sign-in form column (max-w-login-form). */
  248. --spacing-login-form: var(--ds-login-form-width);
  249. /* Radii. There is nothing larger than --ds-radius-xl in the design code: 2xl and up are the same step. */
  250. --radius-xs: var(--ds-radius-xs);
  251. /* Where to use: small elements: checkboxes, badges. */
  252. --radius-sm: var(--ds-radius-sm);
  253. /* Where to use: inputs, menus, list items. */
  254. --radius-md: var(--ds-radius-md);
  255. /* Where to use: tabs, panels, select lists. */
  256. --radius-lg: var(--ds-radius-lg);
  257. /* Where to use: cards. */
  258. --radius-xl: var(--ds-radius-xl);
  259. --radius-2xl: var(--ds-radius-xl);
  260. --radius-3xl: var(--ds-radius-xl);
  261. --radius-4xl: var(--ds-radius-xl);
  262. --radius-composer: var(--ds-composer-radius);
  263. /* Shadows. */
  264. --shadow-2xs: var(--ds-shadow-control);
  265. /* Where to use: fields and outline buttons. */
  266. --shadow-xs: var(--ds-shadow-control);
  267. /* Where to use: cards. */
  268. --shadow-sm: var(--ds-shadow-soft);
  269. /* Where to use: dropdown menus and tooltips. */
  270. --shadow-md: var(--ds-shadow-popover);
  271. /* Where to use: dialogs and side panels. */
  272. --shadow-lg: var(--ds-shadow-overlay);
  273. --shadow-xl: var(--ds-shadow-overlay);
  274. --shadow-2xl: var(--ds-shadow-overlay);
  275. /* Where to use: the primary button. */
  276. --shadow-primary: var(--ds-shadow-primary);
  277. /* Where to use: the active tab, a tile on a gray strip. */
  278. --shadow-tile: var(--ds-shadow-tile);
  279. --shadow-card: var(--ds-shadow-card);
  280. --shadow-hair: var(--ds-shadow-hair);
  281. --shadow-hair-strong: var(--ds-shadow-hair-strong);
  282. --shadow-hair-pressed: var(--ds-shadow-hair-pressed);
  283. --shadow-primary-pressed: var(--ds-shadow-primary-pressed);
  284. /* Motion. */
  285. --ease-in: var(--ds-motion-exit);
  286. --ease-out: var(--ds-motion-enter);
  287. --ease-in-out: var(--ds-motion-move);
  288. /* Where to use: collapsing the side panel and sliding out panels. */
  289. --ease-panel: var(--ds-motion-panel-ease);
  290. --default-transition-duration: var(--ds-motion-instant);
  291. --default-transition-timing-function: var(--ds-motion-move);
  292. }
  293. /* Where to use: the content of an opened row of a wide table: the width of the visible area of the container (`@container`). */
  294. @utility w-table-view {
  295. width: var(--ds-table-view-width);
  296. }
  297. /* 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. */
  298. @utility edge-copilot {
  299. border: var(--ds-copilot-edge-border);
  300. background:
  301. linear-gradient(var(--card), var(--card)) padding-box,
  302. var(--ds-copilot-edge) border-box;
  303. }
  304. /*
  305. * Where to use: the edge of the request line while a task runs (RequestLine `glow`). The “Shine” mode (Magic UI, Shine Border, MIT):
  306. * a thin rim over the card border, along which a radial white-gold shine travels from corner to corner and back.
  307. * The radius is inherited from the card. `data-on="true"` means it is lit; otherwise it fades out smoothly and stays.
  308. * With “reduced motion” the shine is visible but does not move.
  309. */
  310. @utility rim-shine {
  311. position: absolute;
  312. inset: var(--ds-rim-inset);
  313. border-radius: inherit;
  314. padding: var(--ds-rim-width);
  315. pointer-events: none;
  316. background-image: radial-gradient(
  317. transparent,
  318. transparent,
  319. var(--ds-rim-2),
  320. var(--ds-rim-3),
  321. var(--ds-rim-4),
  322. transparent,
  323. transparent
  324. );
  325. background-size: var(--ds-rim-field-size);
  326. -webkit-mask: var(--ds-rim-mask-webkit);
  327. -webkit-mask-composite: xor;
  328. mask: var(--ds-rim-mask);
  329. opacity: var(--ds-rim-opacity-off);
  330. transition: var(--ds-rim-fade);
  331. animation: ds-rim-shine var(--ds-rim-duration) linear infinite;
  332. animation-play-state: paused;
  333. &[data-on="true"] {
  334. opacity: var(--ds-rim-opacity-on);
  335. animation-play-state: running;
  336. }
  337. @media (prefers-reduced-motion: reduce) {
  338. &,
  339. &[data-on="true"] {
  340. animation-play-state: paused;
  341. transition: none;
  342. }
  343. }
  344. }
  345. @keyframes ds-rim-shine {
  346. 0% {
  347. background-position: var(--ds-rim-field-start);
  348. }
  349. 50% {
  350. background-position: var(--ds-rim-field-end);
  351. }
  352. to {
  353. background-position: var(--ds-rim-field-start);
  354. }
  355. }
  356. /* Where to use: a “caption: value” row in forms and settings lists: a narrow caption column (up to 12rem) and a field. */
  357. @utility grid-cols-label-field {
  358. grid-template-columns: var(--ds-grid-label-field);
  359. }
  360. /* 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. */
  361. @utility grid-cols-main-aside {
  362. grid-template-columns: var(--ds-grid-main-aside);
  363. }
  364. /* Where to use: a “badge: text” row: the badge at its own width, the text stretches. */
  365. @utility grid-cols-aside-main {
  366. grid-template-columns: var(--ds-grid-aside-main);
  367. }
  368. /* Where to use: a list table: a title and two numbers. */
  369. @utility grid-cols-figures {
  370. grid-template-columns: var(--ds-grid-figures);
  371. }
  372. /* Where to use: a list table on a wide screen: a title, two numbers and an address. */
  373. @utility grid-cols-figures-wide {
  374. grid-template-columns: var(--ds-grid-figures-wide);
  375. }
  376. /* Where to use: a list table: a title and two equal columns of values. */
  377. @utility grid-cols-pair-values {
  378. grid-template-columns: var(--ds-grid-pair-values);
  379. }
  380. /* Where to use: a “value: change” cell. */
  381. @utility grid-cols-value-delta {
  382. grid-template-columns: var(--ds-grid-value-delta);
  383. }
  384. /*
  385. * Where to use: parts of the sign-in screen, appearing in turn, together with
  386. * animate-in fade-in motion-safe:slide-in-from-bottom-1.5; N is the place in the queue.
  387. */
  388. @utility rise-step-* {
  389. --tw-animation-duration: var(--ds-motion-lane);
  390. --tw-ease: var(--ds-motion-enter);
  391. --tw-animation-fill-mode: both;
  392. --tw-animation-delay: calc(var(--ds-login-stagger) * --value(integer));
  393. }
  394. @utility outline-focus {
  395. outline: var(--ds-focus-ring);
  396. outline-offset: var(--ds-focus-ring-offset);
  397. }
  398. @layer base {
  399. * {
  400. @apply border-border outline-ring/50;
  401. /* A thin scroll bar, visible only under the pointer. */
  402. scrollbar-width: var(--ds-scrollbar-width);
  403. scrollbar-color: var(--ds-scrollbar-thumb-rest) var(--ds-scrollbar-track);
  404. }
  405. :hover {
  406. scrollbar-color: var(--ds-scrollbar-thumb) var(--ds-scrollbar-track);
  407. }
  408. html {
  409. font-family: var(--ds-font-sans);
  410. /* 16px: rem is counted from it. */
  411. font-size: var(--ds-font-root-size);
  412. line-height: var(--ds-line-root);
  413. -webkit-font-smoothing: antialiased;
  414. }
  415. body {
  416. /* The main interface text is 14px, like text-body. */
  417. font-size: var(--ds-font-ui-size);
  418. line-height: var(--ds-line-ui);
  419. letter-spacing: var(--ds-letter-spacing-ui);
  420. @apply bg-background text-foreground;
  421. }
  422. /* On a touch screen a field is no smaller than 16px: otherwise iOS zooms the page on focus. */
  423. @media (hover: none) and (pointer: coarse) {
  424. input:not(
  425. [type="checkbox"],
  426. [type="radio"],
  427. [type="range"],
  428. [type="file"],
  429. [type="hidden"]
  430. ),
  431. textarea {
  432. font-size: max(
  433. var(--ds-font-field-touch-size),
  434. var(--ds-font-size-inherited)
  435. );
  436. }
  437. }
  438. }
  439. /*
  440. * Changing screens when a task starts (View Transitions, a transition with `viewTransition`): the request line
  441. * (RequestLine `lg` and `task`, `data-transition="request"`) is the shared element: from the function page or
  442. * the dashboard it moves to the place of the task screen line, the rest of the screen changes by cross-fade.
  443. * There is one such line on the screen.
  444. */
  445. [data-transition="request"] {
  446. view-transition-name: request;
  447. }
  448. @keyframes ds-vt-out {
  449. to {
  450. opacity: var(--ds-motion-page-opacity-gone);
  451. }
  452. }
  453. @keyframes ds-vt-in {
  454. from {
  455. opacity: var(--ds-motion-page-opacity-gone);
  456. }
  457. }
  458. ::view-transition-old(root) {
  459. animation: ds-vt-out var(--ds-motion-page-swap) var(--ds-motion-page-ease)
  460. both;
  461. }
  462. ::view-transition-new(root) {
  463. animation: ds-vt-in var(--ds-motion-page-swap) var(--ds-motion-page-ease) both;
  464. }
  465. ::view-transition-group(request) {
  466. animation-duration: var(--ds-motion-request-move);
  467. animation-timing-function: var(--ds-motion-request-ease);
  468. }
  469. ::view-transition-old(request),
  470. ::view-transition-new(request) {
  471. height: var(--ds-motion-request-snapshot-height);
  472. object-fit: none;
  473. object-position: left top;
  474. overflow: clip;
  475. }
  476. ::view-transition-old(request) {
  477. animation: ds-vt-out var(--ds-motion-request-out) ease both;
  478. }
  479. ::view-transition-new(request) {
  480. animation: ds-vt-in var(--ds-motion-request-in)
  481. var(--ds-motion-request-in-delay) ease both;
  482. }
  483. @media (prefers-reduced-motion: reduce) {
  484. ::view-transition-group(*),
  485. ::view-transition-old(*),
  486. ::view-transition-new(*) {
  487. animation: none;
  488. }
  489. }