Files
supabase/apps/studio/styles/grid.css
T
Ivan VasilovandClaude Opus 4.7 72f57dde89 chore: migrate remaining opacity utilities to slash syntax
Finishes the `*-opacity-*` → slash-modifier conversion that the
`@tailwindcss/upgrade` tool couldn't complete because the paired
color/opacity classes weren't always adjacent (intervening tokens,
variant prefixes, or absent base color).

Mechanical same-line paired rewrites (perl):
  bg-{color} bg-opacity-N           → bg-{color}/N
  bg-opacity-N bg-{color}           → bg-{color}/N   (reversed order)
  bg bg-opacity-N                   → bg/N           (bare `bg` alias)
  (analogous for border-, ring-, divide-)

Hand-edited ambiguous stragglers:

- Rewrote `{variant}:{prefix}-opacity-N` to `{variant}:{prefix}-{base-color}/N`
  where a base color was present on the same element (TriggerSheet,
  ExitSurveyModal, UpgradeModal, DeleteProjectModal, CommandMenu,
  MultiSelectDeprecated).
- Dropped no-op `bg-opacity-100` / `hover:bg-opacity-100` where the
  companion rule already implied full opacity (BillingChangeBadge,
  SupportAccessToggle, MobileNavigationBar, Announcement/Badge,
  LWAnnouncement, Button link variant).
- Rewrote `hover:border-opacity-30` paired with a later base color to
  `hover:border-foreground-muted/30` in Announcement/Badge.
- Reworked ComputeBadge state-open styles: `group-data-[state=open]:
  bg-opacity-20` / `ring-2/20` (invalid) → `group-data-[state=open]:
  bg-{color}/20 ring-{color}/20` mapped per `smallCompute` branch.
- Migrated `defaultTheme.ts` badge theme: dropped `bg-opacity-10` from
  base, applied `/10` to each color variant's bg. Deleted dead `utils`
  block (declared but never referenced/exported). Fixed stray `bg-200`
  typo → `bg-gray-200/10`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> (+16 squashed commits)
Squashed commits:
[3f18aa64d5] chore(packages/marketing): run @tailwindcss/upgrade v4 codemods

Automated output from `pnpm dlx @tailwindcss/upgrade --force` executed
within `packages/marketing/`, using the same temporary
`_upgrade-entry.css` pattern. Spurious tailwindcss dep addition was
reverted.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[dfd9039173] chore(packages/dev-tools): run @tailwindcss/upgrade v4 codemods

Automated output from `pnpm dlx @tailwindcss/upgrade --force` executed
within `packages/dev-tools/`, using the same temporary `_upgrade-entry.css`
pattern as the other shared packages. The spurious tailwindcss dep
addition was reverted — this package is a consumer, not a Tailwind
owner.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[f815ff2905] chore(packages/ui-patterns): run @tailwindcss/upgrade v4 codemods

Automated output from `pnpm dlx @tailwindcss/upgrade --force` executed
within `packages/ui-patterns/`. Same temporary `_upgrade-entry.css`
pattern as the `packages/ui` run — added to give the tool a CSS entry
to scan templates against, removed before committing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[999168249a] chore(packages/ui): run @tailwindcss/upgrade v4 codemods

Automated output from `pnpm dlx @tailwindcss/upgrade --force` executed
within `packages/ui/`. A temporary `_upgrade-entry.css` was added during
the run (with `@import "tailwindcss"` + `@config` bridge to the shared
config) so the tool could discover a CSS entry and drive template
migration across `src/**/*.tsx`; it's removed before committing.

Per-app upgrade runs skip `packages/ui` as "outside repository", so this
is the only way to cover it without running the tool at the workspace
root.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[32cdf2253a] chore(ui-library): run @tailwindcss/upgrade v4 codemods

Automated output from `pnpm dlx @tailwindcss/upgrade --force` executed
within `apps/ui-library/`. Also bundles minor `pnpm-lock.yaml` churn
(peer-dep reshuffling triggered by the tool's install pass).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[bf54bac2f1] chore(lite-studio): run @tailwindcss/upgrade v4 codemods

Automated output from `pnpm dlx @tailwindcss/upgrade --force` executed
within `apps/lite-studio/`. The first attempt failed on an unknown
utility (`text-foreground-light`) because `typography.css` loaded its
own Tailwind context without access to the shared plugin. After
switching to `@reference './app.css'` (the same pattern used in
`apps/studio/styles/typography.css`), the tool ran cleanly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[e7373cf938] chore(www): run @tailwindcss/upgrade v4 codemods

Automated output from `pnpm dlx @tailwindcss/upgrade --force` executed
within `apps/www/`. Also:

- Bumps `apps/www/package.json` tailwindcss from `^3.4.1` to `^4.2.4`
  (www had an explicit dep rather than the catalog reference).
- Fixes a double-slash path glitch the tool emitted in
  `apps/www/styles/index.css` (`@config '..//tailwind.config.js'` →
  `@config '../tailwind.config.js'`).
- `pnpm-lock.yaml` bundled here as it reflects cumulative dep changes
  from www plus the earlier `apps/learn` addition.

The tool warned that `apps/www/postcss.config.js` contains dynamic
JavaScript and was not auto-migrated — that file needs a manual pass
in a follow-up.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[9fcbb5f28c] chore(studio): run @tailwindcss/upgrade v4 codemods

Automated output from `pnpm dlx @tailwindcss/upgrade --force` executed
within `apps/studio/`. Biggest diff of any single app.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[e77b3b9a27] chore(learn): run @tailwindcss/upgrade v4 codemods

Automated output from `pnpm dlx @tailwindcss/upgrade --force` executed
within `apps/learn/`. Also adds `tailwindcss: ^4.2.4` to the app's
package.json (the upgrade tool injects this when the app didn't
previously declare tailwindcss directly).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[5ad834d688] chore(docs): run @tailwindcss/upgrade v4 codemods

Automated output from `pnpm dlx @tailwindcss/upgrade --force` executed
within `apps/docs/`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[f3101bf306] chore(design-system): run @tailwindcss/upgrade v4 codemods

Automated output from `pnpm dlx @tailwindcss/upgrade --force` executed
within `apps/design-system/`. Handles deprecated-class renames, `@apply`
prefix-bang → suffix-bang syntax, gradient utility renames, and related
v4-aware rewrites. Only files under `apps/design-system/` are touched;
shared packages are skipped by the tool when run from a single app.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[f60e5d01d1] chore: pin tailwindcss to 4.2.4 in all package.json files

Replace `"tailwindcss": "catalog:"` and `"@tailwindcss/postcss": "catalog:"`
with explicit `4.2.4` pins so `@tailwindcss/upgrade` can run without a
catalog-vs-node_modules version mismatch.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[0676c22a12] chore: rename deprecated Tailwind utility classes

Apply the non-opacity class renames from Tailwind v3.4 → v4, across all
source files (`*.tsx`, `*.ts`, `*.jsx`, `*.js`, `*.css`, `*.mdx`),
excluding `examples/` and the vendored `apps/studio/public/monaco-editor`
bundle.

- `flex-grow` → `grow`
- `flex-shrink` → `shrink`
- `overflow-ellipsis` → `text-ellipsis`
- `shadow-sm` → `shadow-xs`
- `rounded-sm` → `rounded-xs`
- `blur-sm` → `blur-xs`
- `outline-none` → `outline-hidden` (preserves v3's accessibility-friendly
  behavior; v4's `outline-none` now means `outline-style: none` only)

CSS property syntax (`flex-grow: 1;`, `outline: none;`, etc.) was
protected with a negative lookahead for `\s*:` so raw CSS is untouched.

Opacity utilities (`bg-opacity-*`, `border-opacity-*`, `ring-opacity-*`,
`divide-opacity-*`) and `ring` → `ring-3` are context-dependent and are
deferred to a follow-up commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
[3d8e96069e] Bunch of fixes.
[9dadccf323] Migrate studio.

Co-authored-by: Copilot <copilot@github.com>
[9e706b3092] chore(config): bump Tailwind to v4 via @config bridge

- Bump catalog `tailwindcss` from 3.4.1 to 4.2.3 and add
  `@tailwindcss/postcss` 4.2.3.
- Swap shared PostCSS config to `@tailwindcss/postcss` and drop
  `tailwindcss/nesting` (v4 handles nesting internally via Lightning
  CSS).
- Replace `@tailwind base/components/utilities` with
  `@import "tailwindcss"` + `@config "../../packages/config/tailwind.config.js"`
  in the 10 app-level CSS entry files (studio, www, docs, design-system,
  ui-library, learn, lite-studio). Skips `examples/*` which aren't part
  of the monorepo build.
- Remove `<alpha-value>` placeholders from
  `packages/config/tailwind.config.js` (4 occurrences) and from
  `apps/www/tailwind.config.js` (purple-sos color scale, 9 occurrences).
  Trade-off: opacity modifiers like `bg-studio/50` no longer work for
  these theme colors — they're used with static classes today.
- Remove `@tailwindcss/container-queries` — it's built into v4. Dropped
  from `apps/studio`, `apps/design-system`, `apps/docs` package.jsons and
  their Tailwind configs.

Custom plugins (`hit-area`, `motion-safe-transition`), `tailwindcss-radix`,
`@mertasan/tailwindcss-variables`, and `tailwindcss-animate` are kept
as-is; the v3-style `plugin()` / `matchUtilities()` / `addVariant()` APIs
still work under v4. Swapping `hit-area` to the v4-native CSS `@utility`
version and replacing `tailwindcss-radix` with native `data-[state=*]:`
variants is deferred to follow-up PRs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 14:19:37 +02:00

549 lines
10 KiB
CSS

@reference "./main.css";
.sb-grid {
@apply flex h-full flex-col;
}
.sb-grid-fill-container:after {
content: '';
display: inline-block;
width: 100%;
}
.rdg-cell {
@apply flex;
@apply text-grid;
@apply border-secondary border-r border-b;
@apply text-foreground;
padding-inline: 0.5rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: inherit;
}
/* Apply parent bg colour while editing */
.rdg-cell.rdg-editor-container > * {
background-color: inherit;
}
.rdg-cell > div[draggable='true'] {
@apply h-full;
}
.rdg-cell-frozen-last {
@apply border-secondary border-r-2 shadow-none;
}
.rdg-cell[aria-selected='true'] {
box-shadow: inset 0 0 0 1px #24b47e;
}
.rdg:not(:focus-within):not(.rdg-context-menu-open) .rdg-cell[aria-selected='true'] {
box-shadow: none;
outline: none;
}
/* Cell with unsaved changes - warning (amber) background/text color */
.rdg-cell.rdg-cell--dirty {
background-color: hsl(var(--warning-300) / 0.75);
color: hsl(var(--warning-default));
}
/* Row pending addition - green background, green text */
.rdg-row.rdg-row--added {
background-color: hsl(var(--brand-200) / 0.3);
&:hover {
background-color: hsl(var(--brand-200) / 0.5);
}
.rdg-cell {
border-left-color: hsl(var(--brand-default));
color: hsl(var(--brand-link));
}
/* First cell gets a stronger left border to indicate new row */
.rdg-cell:first-child {
box-shadow: inset 2px 0 0 0 hsl(var(--brand-default));
}
}
/* Row pending deletion - red background with strikethrough effect, red text */
.rdg-row.rdg-row--deleted {
background-color: hsl(var(--destructive-300) / 0.3);
&:hover {
background-color: hsl(var(--destructive-300) / 0.5);
}
.rdg-cell {
text-decoration: line-through;
text-decoration-color: hsl(var(--destructive-default));
border-left-color: hsl(var(--destructive-default));
color: hsl(var(--destructive-default));
}
/* First cell gets a stronger left border to indicate deleted row */
.rdg-cell:first-child {
box-shadow: inset 2px 0 0 0 hsl(var(--destructive-default));
}
}
.rdg {
@apply box-border select-none overflow-x-auto overflow-y-scroll bg-dash-canvas;
@apply border-t border-r-0 border-l-0;
contain: strict;
font-size: 14px;
}
.rdg *,
.rdg ::after,
.rdg ::before {
box-sizing: inherit;
}
@supports not (contain: strict) {
.rdg {
position: relative;
z-index: 0;
}
}
.rdg-focus-sink {
position: sticky;
top: 0;
left: 0;
height: 0;
width: 0;
outline: 0;
}
/*
Row header
*/
.rdg-header-row {
@apply bg-surface-200 select-none border-none;
}
.rdg-header-row {
height: var(--header-row-height);
line-height: var(--header-row-height);
top: 0;
}
.rdg-header-row .rdg-cell {
@apply bg-surface-200 border-default border-b;
}
.rdg-header-row .rdg-cell p {
@apply text-typography-body-light [[data-theme*=dark]_&]:text-typography-body-dark;
}
.rdg-header-row .rdg-checkbox {
@apply bg-surface-200 border-default rounded-xs border;
}
.rdg-header-row .rdg-checkbox-input:checked + .rdg-checkbox {
@apply border-default border-4 bg-green-900;
}
.rdg-header-row .rdg-checkbox-input:focus + .rdg-checkbox {
box-shadow: none;
}
.rdg-cell .Select {
max-height: 30px;
font-size: 12px;
font-weight: 400;
}
/*
Row
*/
.rdg-row {
@apply bg-dash-sidebar transition-colors;
@apply hover:bg-surface-200;
}
/* edit button */
.rdg-row__select-column__edit-action {
@apply opacity-0;
}
.rdg-row:hover .rdg-row__select-column__edit-action {
@apply opacity-100;
}
.rdg-row__select-column__edit-action:hover {
opacity: 1 !important;
}
/* select row */
.rdg-row[aria-selected='true'] {
@apply bg-surface-200;
}
.tab-cursor {
cursor: pointer !important;
}
/*
Checkbox
*/
.sb-grid {
/* reset styles */
[type='checkbox'] {
webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding: 0;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
display: inline-block;
vertical-align: middle;
background-origin: border-box;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
flex-shrink: 0;
height: 1rem;
width: 1rem;
color: #2563eb;
background-color: #fff;
border-color: #6b7280;
border-width: 1px;
}
[type='checkbox']:checked {
@apply bg-foreground;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='hsl(0, 0%, 100%)'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E") !important;
}
[type='checkbox']:indeterminate {
@apply bg-foreground;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='hsl(0, 0%, 100%)'%3E%3Crect x='3' y='7' width='10' height='2'/%3E%3C/svg%3E") !important;
[data-theme='dark'] & {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='hsl(0, 0%, 0%)'%3E%3Crect x='3' y='7' width='10' height='2'/%3E%3C/svg%3E") !important;
}
}
[type='checkbox'] {
@apply cursor-pointer rounded-sm border border-solid;
@apply text-foreground border-strong transition-all;
@apply hover:border-foreground focus:ring-0 focus:outline-hidden;
@apply bg-control;
margin-top: 2px;
}
}
/* Dark mode */
[data-theme='dark'] .sb-grid [type='checkbox']:checked {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='hsl(0, 0%, 0%)'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E") !important;
}
.rdg__segmented-control {
@apply border-default relative mx-2 h-8 rounded-md border;
}
.rdg__segmented-control__button {
@apply absolute top-0 inline-flex h-full items-center justify-center;
@apply text-xs font-medium;
@apply text-border-muted;
@apply active:bg-alternative hover:text-white focus:z-10 focus:outline-hidden;
@apply transition duration-150 ease-in-out;
@apply cursor-pointer;
z-index: 1;
}
.rdg__segmented-control__button--option {
@apply text-background;
}
.rdg__segmented-control__button--right {
@apply right-0;
}
.rdg__segmented-control__button--left {
@apply left-0;
}
.rdg__segmented-control__label {
@apply bg-overlay-hover border-control z-0 inline-block h-full transform rounded-sm border shadow-sm transition duration-200 ease-in-out;
}
.rdg__segmented-control__label--left {
@apply translate-x-0;
}
.rdg__segmented-control__label--right {
@apply translate-x-12;
}
.rdg__segmented-control__options-label {
@apply uppercase;
color: inherit;
}
/*
DropdownControl
*/
.dropdown-control {
@apply overflow-auto;
}
.dropdown-control .sbui-typography {
@apply block px-2 py-4;
}
/*
NullValue
*/
.null-value {
@apply block;
}
/*
CheckboxEditor
*/
.sb-grid-checkbox-editor {
@apply flex h-full w-full;
}
.sb-grid-checkbox-editor__input {
@apply h-4 w-4;
outline: 4px auto -webkit-focus-ring-color;
}
/*
JsonEditor
*/
.sb-grid-json-editor__trigger {
@apply text-grid overflow-hidden text-ellipsis px-2;
}
/*
NumberEditor
*/
.sb-grid-number-editor {
@apply h-full w-full px-2;
}
/*
SelectEditor
*/
.sb-grid-select-editor {
button {
@apply border-none rounded-none shadow-none;
box-shadow: none !important;
}
}
/*
TextEditor
*/
.sb-grid-text-editor__trigger {
@apply text-grid overflow-hidden text-ellipsis px-2;
}
/*
TimeEditor
*/
.sb-grid-time-editor {
@apply h-full w-full px-2;
}
/*
Footer
*/
.sb-grid-footer {
@apply bg-surface-100 flex h-10 items-center justify-between px-2;
}
.sb-grid-footer__inner {
@apply flex items-center;
}
/*
ForeignKeyFormatter
*/
.sb-grid-foreign-key-formatter {
@apply flex w-full items-center justify-between;
}
.sb-grid-foreign-key-formatter__text {
@apply m-0 grow overflow-hidden text-ellipsis;
}
/*
ColumnHeader
*/
.sb-grid-column-header {
@apply flex h-full w-full items-center justify-between;
}
.sb-grid-column-header--cursor {
@apply cursor-default;
}
.sb-grid-column-header__inner {
@apply flex items-center gap-2 overflow-hidden text-ellipsis;
}
.sb-grid-column-header__inner__name {
@apply text-foreground overflow-hidden text-ellipsis text-xs select-text;
}
.sb-grid-column-header__inner__format {
@apply text-xs;
@apply overflow-hidden text-ellipsis font-normal;
@apply text-foreground-light;
}
.sb-grid-column-header__inner__primary-key {
@apply flex rotate-45 transform items-center;
}
.sb-grid-column-header__inner svg {
@apply border-brand text-brand;
}
/*
Grid
*/
.sb-grid-grid--loading {
@apply flex justify-center bg-transparent;
}
.sb-grid-grid--loading__inner {
@apply flex items-center;
}
.sb-grid-grid--loading__inner__text {
@apply m-8;
}
/*
SelectColumn
*/
.sb-grid-select-cell__formatter {
@apply flex h-full w-full items-center justify-between;
}
.sb-grid-select-cell__header {
@apply flex h-full w-full items-center justify-between;
}
.sb-grid-select-cell__header__input {
/* @apply focus:ring-brand-300; */
@apply border-background-surface-100;
}
/*
Header
*/
.sb-grid-header {
@apply bg-surface-100 flex h-10 justify-between px-2;
}
.sb-grid-header__inner {
@apply flex items-center space-x-2;
}
.sb-grid-header__inner__divider {
@apply py-2;
}
.row_header__selected-rows {
@apply ml-2 mr-2;
}
/*
StatusLabel
*/
.sb-grid-status-label {
@apply text-grid text-white;
}
.sb-grid-status-label__no-msg {
@apply flex h-5 w-5;
}
.sb-grid-status-label__no-msg > div {
@apply m-auto h-2 w-2 rounded-full bg-green-900;
}
/*
Empty value
*/
.sb-grid-empty-value {
@apply block;
}
/*
header/sort/SortDropdown
*/
.sb-grid-sort-popover {
@apply w-96;
}
.sb-grid-dropdown__empty {
@apply py-2;
}
.sb-grid-dropdown__empty__text {
@apply block;
}
.sb-grid-dropdown__item-trigger {
@apply my-1;
}
/*
header/sort/SortRow
*/
.sb-grid-sort-row {
@apply flex justify-between space-x-3;
}
.sb-grid-sort-row__item {
@apply flex items-center space-x-3;
}
.sb-grid-sort-row__item__remove {
@apply bg-transparent p-0 hover:bg-transparent;
}
.sb-grid-sort-row__item__label {
@apply flex items-center space-x-2;
}
.sb-grid-sort-row__item_toogle {
@apply flex w-28 items-center gap-0 space-x-3;
}
.sb-grid-sort-row__item__move {
@apply flex cursor-move;
}