) => {
+ onChange={(e) => {
onContrastModeChanged(e.target.value as 'aa' | 'aaa');
}}
>
@@ -98,6 +103,24 @@ export const ThemeToolbar = ({
+
+ onBorderRadiusChanged(e.target.value)}
+ >
+ {borderRadii.map((radius) => (
+
+ ))}
+
+
void;
selectedColor: { color: ColorInfo; type: ColorType };
setSelectedColor: (color: ColorInfo, type: ColorType) => void;
+ borderRadius: string;
+ setBorderRadius: (radius: string) => void;
};
const defaultTheme = () => {
@@ -67,6 +69,8 @@ export const useThemeStore = create(
},
type: 'accent',
},
+ borderRadius: '0.25rem',
+ setBorderRadius: (radius) => set({ borderRadius: radius }),
setSelectedColor: (color, type) =>
set({ selectedColor: { color: color, type: type } }),
setAccentTheme: (theme, color) => set({ accentTheme: { theme, color } }),
diff --git a/apps/theme/utils/tokenMapping.ts b/apps/theme/utils/tokenMapping.ts
index 46b7c5b29a..c31adb4852 100644
--- a/apps/theme/utils/tokenMapping.ts
+++ b/apps/theme/utils/tokenMapping.ts
@@ -86,6 +86,15 @@ export const mapTokens = () => {
setToken('--ds-color-focus-outer', 'var(--neutral-13)');
setToken('--ds-color-focus-inner', 'var(--neutral-1)');
+
+ setToken('--ds-border-radius-sm', 'calc(var(--ds-border-radius-base)*0.5)');
+ setToken('--ds-border-radius-md', 'calc(var(--ds-border-radius-base)*1)');
+ setToken('--ds-border-radius-lg', 'calc(var(--ds-border-radius-base)*2)');
+ setToken('--ds-border-radius-xl', 'calc(var(--ds-border-radius-base)*3)');
+ setToken('--ds-border-radius-2xl', 'calc(var(--ds-border-radius-base)*4)');
+ setToken('--ds-border-radius-3xl', 'calc(var(--ds-border-radius-base)*6)');
+ setToken('--ds-border-radius-4xl', 'calc(var(--ds-border-radius-base)*8)');
+ setToken('--ds-border-radius-full', '624.9375rem');
};
const setToken = (token: string, color: string) => {
diff --git a/packages/css/checkbox.css b/packages/css/checkbox.css
index e78800ac2b..c6d4daacfd 100644
--- a/packages/css/checkbox.css
+++ b/packages/css/checkbox.css
@@ -29,7 +29,7 @@
cursor: pointer;
box-shadow: inset 0 0 0 2px var(--dsc-checkbox-border-color);
background: var(--dsc-checkbox-background);
- border-radius: var(--ds-border-radius-md);
+ border-radius: min(0.25rem, var(--ds-border-radius-md));
}
.ds-checkbox__input::before {