Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

GDGT-2467: Curate Paper radius tokens (#81700)

Stas Gavrylov0e7e969925ab
diff --git a/.loki/reference/chrome_laptop_Components_Overlays_Modal_Opened.png b/.loki/reference/chrome_laptop_Components_Overlays_Modal_Opened.png
index e52e0d913d7..87a0332f3ab 100644
Binary files a/.loki/reference/chrome_laptop_Components_Overlays_Modal_Opened.png and b/.loki/reference/chrome_laptop_Components_Overlays_Modal_Opened.png differ
diff --git a/.loki/reference/chrome_laptop_Components_Utils_Paper_Shadow_matrix.png b/.loki/reference/chrome_laptop_Components_Utils_Paper_Shadow_matrix.png
index af6ce14a71b..8777553b325 100644
Binary files a/.loki/reference/chrome_laptop_Components_Utils_Paper_Shadow_matrix.png and b/.loki/reference/chrome_laptop_Components_Utils_Paper_Shadow_matrix.png differ
diff --git a/.loki/reference/chrome_laptop_Design_System_Colors_Default.png b/.loki/reference/chrome_laptop_Design_System_Colors_Default.png
index a6f15260f1d..b598426561b 100644
Binary files a/.loki/reference/chrome_laptop_Design_System_Colors_Default.png and b/.loki/reference/chrome_laptop_Design_System_Colors_Default.png differ
diff --git a/frontend/src/metabase/ui/components/utils/Paper/Paper.config.tsx b/frontend/src/metabase/ui/components/utils/Paper/Paper.config.tsx
index b872db06cfe..9eec7c8756c 100644
--- a/frontend/src/metabase/ui/components/utils/Paper/Paper.config.tsx
+++ b/frontend/src/metabase/ui/components/utils/Paper/Paper.config.tsx
@@ -5,7 +5,7 @@ import PaperStyles from "./Paper.module.css";
export const paperOverrides: MantineThemeOverride["components"] = {
Paper: Paper.extend({
defaultProps: {
- radius: "sm",
+ radius: "xxs",
shadow: "xs_outline",
},
classNames: {
diff --git a/frontend/src/metabase/ui/components/utils/Paper/Paper.stories.tsx b/frontend/src/metabase/ui/components/utils/Paper/Paper.stories.tsx
index 7f26fac2a20..9f579c03037 100644
--- a/frontend/src/metabase/ui/components/utils/Paper/Paper.stories.tsx
+++ b/frontend/src/metabase/ui/components/utils/Paper/Paper.stories.tsx
@@ -1,17 +1,18 @@
import { Fragment } from "react";
import { Grid, Paper, type PaperProps, Stack, Text } from "metabase/ui";
+import type { RadiusScaleKey } from "metabase/ui/theme";
import { getThemeOverrides } from "metabase/ui/theme";
const theme = getThemeOverrides();
const spacingOptions = Object.keys(theme.spacing ?? {});
-const radiusOptions = Object.keys(theme.radius ?? {});
+const PAPER_RADIUS_OPTIONS = ["xxs", "md"] satisfies readonly RadiusScaleKey[];
const shadowOptions = Object.keys(theme.shadows ?? {});
const args = {
p: "lg",
- radius: "sm",
+ radius: "xxs",
shadow: "xs_outline",
withBorder: false,
};
@@ -26,7 +27,7 @@ const argTypes = {
control: { type: "inline-radio" },
},
radius: {
- options: radiusOptions,
+ options: PAPER_RADIUS_OPTIONS,
control: { type: "inline-radio" },
},
shadow: {