Skip to content

Commit e508a5a

Browse files
authored
update radius variable (#31)
1 parent d3a04ac commit e508a5a

29 files changed

+72
-72
lines changed

demo/assets/css/globals.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,12 +1099,12 @@
10991099
0px -8px 8px 0px light-dark(rgba(28, 32, 36, 0.02), rgba(0, 0, 0, 0)),
11001100
0px -2px 6px 0px light-dark(rgba(28, 32, 36, 0.02), rgba(0, 0, 0, 0));
11011101
/* Radius */
1102-
--radius-xs: calc(var(--radius) - 0.125rem);
1103-
--radius-sm: var(--radius);
1104-
--radius-md: calc(var(--radius) + 0.125rem);
1105-
--radius-lg: calc(var(--radius) + 0.25rem);
1106-
--radius-xl: calc(var(--radius) + 0.375rem);
1107-
--radius-2xl: calc(var(--radius) + 0.5rem);
1102+
--radius-ui-xs: calc(var(--radius) - 0.125rem);
1103+
--radius-ui-sm: var(--radius);
1104+
--radius-ui-md: calc(var(--radius) + 0.125rem);
1105+
--radius-ui-lg: calc(var(--radius) + 0.25rem);
1106+
--radius-ui-xl: calc(var(--radius) + 0.375rem);
1107+
--radius-ui-2xl: calc(var(--radius) + 0.5rem);
11081108
}
11091109

11101110
@layer base {

reflex_ui/components/base/badge.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656

5757
BADGE_VARIANTS = {
5858
"size": {
59-
"xs": "px-1.5 py-0.5 h-4 rounded-xs text-[11px] [&_svg]:size-3",
60-
"sm": "px-1.5 py-0.5 h-5 rounded-sm text-xs [&_svg]:size-3.5",
61-
"md": "px-2 py-0.5 h-6 rounded-md text-sm [&_svg]:size-4",
59+
"xs": "px-1.5 py-0.5 h-4 rounded-ui-xs text-[11px] [&_svg]:size-3",
60+
"sm": "px-1.5 py-0.5 h-5 rounded-ui-sm text-xs [&_svg]:size-3.5",
61+
"md": "px-2 py-0.5 h-6 rounded-ui-md text-sm [&_svg]:size-4",
6262
}
6363
}
6464

reflex_ui/components/base/badge.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ DEFAULT_BASE_CLASSES = "inline-flex items-center font-medium [&_svg]:pointer-eve
5858
LIGHT_COLORS = {"sky", "mint", "lime", "yellow", "amber", "secondary"}
5959
BADGE_VARIANTS = {
6060
"size": {
61-
"xs": "px-1.5 py-0.5 h-4 rounded-xs text-[11px] [&_svg]:size-3",
62-
"sm": "px-1.5 py-0.5 h-5 rounded-sm text-xs [&_svg]:size-3.5",
63-
"md": "px-2 py-0.5 h-6 rounded-md text-sm [&_svg]:size-4",
61+
"xs": "px-1.5 py-0.5 h-4 rounded-ui-xs text-[11px] [&_svg]:size-3",
62+
"sm": "px-1.5 py-0.5 h-5 rounded-ui-sm text-xs [&_svg]:size-3.5",
63+
"md": "px-2 py-0.5 h-6 rounded-ui-md text-sm [&_svg]:size-4",
6464
}
6565
}
6666

reflex_ui/components/base/button.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@
2929
"dark": "bg-secondary-12 text-secondary-1 hover:bg-secondary-12/80",
3030
},
3131
"size": {
32-
"xs": "px-1.5 h-7 rounded-xs gap-1.5",
33-
"sm": "px-2 h-8 rounded-sm gap-2",
34-
"md": "px-2.5 h-9 rounded-md gap-2",
35-
"lg": "px-3 h-10 rounded-lg gap-2.5",
36-
"xl": "px-3.5 h-12 rounded-xl gap-3",
37-
"icon-xs": "size-7 rounded-xs",
38-
"icon-sm": "size-8 rounded-sm",
39-
"icon-md": "size-9 rounded-md",
40-
"icon-lg": "size-10 rounded-lg",
41-
"icon-xl": "size-12 rounded-xl",
32+
"xs": "px-1.5 h-7 rounded-ui-xs gap-1.5",
33+
"sm": "px-2 h-8 rounded-ui-sm gap-2",
34+
"md": "px-2.5 h-9 rounded-ui-md gap-2",
35+
"lg": "px-3 h-10 rounded-ui-lg gap-2.5",
36+
"xl": "px-3.5 h-12 rounded-ui-xl gap-3",
37+
"icon-xs": "size-7 rounded-ui-xs",
38+
"icon-sm": "size-8 rounded-ui-sm",
39+
"icon-md": "size-9 rounded-ui-md",
40+
"icon-lg": "size-10 rounded-ui-lg",
41+
"icon-xl": "size-12 rounded-ui-xl",
4242
},
4343
}
4444

reflex_ui/components/base/button.pyi

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ BUTTON_VARIANTS = {
3131
"dark": "bg-secondary-12 text-secondary-1 hover:bg-secondary-12/80",
3232
},
3333
"size": {
34-
"xs": "px-1.5 h-7 rounded-xs gap-1.5",
35-
"sm": "px-2 h-8 rounded-sm gap-2",
36-
"md": "px-2.5 h-9 rounded-md gap-2",
37-
"lg": "px-3 h-10 rounded-lg gap-2.5",
38-
"xl": "px-3.5 h-12 rounded-xl gap-3",
39-
"icon-xs": "size-7 rounded-xs",
40-
"icon-sm": "size-8 rounded-sm",
41-
"icon-md": "size-9 rounded-md",
42-
"icon-lg": "size-10 rounded-lg",
43-
"icon-xl": "size-12 rounded-xl",
34+
"xs": "px-1.5 h-7 rounded-ui-xs gap-1.5",
35+
"sm": "px-2 h-8 rounded-ui-sm gap-2",
36+
"md": "px-2.5 h-9 rounded-ui-md gap-2",
37+
"lg": "px-3 h-10 rounded-ui-lg gap-2.5",
38+
"xl": "px-3.5 h-12 rounded-ui-xl gap-3",
39+
"icon-xs": "size-7 rounded-ui-xs",
40+
"icon-sm": "size-8 rounded-ui-sm",
41+
"icon-md": "size-9 rounded-ui-md",
42+
"icon-lg": "size-10 rounded-ui-lg",
43+
"icon-xl": "size-12 rounded-ui-xl",
4444
},
4545
}
4646

reflex_ui/components/base/card.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class ClassNames:
1111
"""Class names for the card component."""
1212

13-
ROOT = "rounded-xl border border-secondary-a4 bg-secondary-1 shadow-small"
13+
ROOT = "rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-small"
1414
HEADER = "flex flex-col gap-2 p-6"
1515
TITLE = "text-2xl font-semibold text-secondary-12"
1616
DESCRIPTION = "text-sm text-secondary-11 font-[450]"

reflex_ui/components/base/card.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ from reflex.vars.base import Var
1515
from reflex_ui.components.component import CoreComponent
1616

1717
class ClassNames:
18-
ROOT = "rounded-xl border border-secondary-a4 bg-secondary-1 shadow-small"
18+
ROOT = "rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-small"
1919
HEADER = "flex flex-col gap-2 p-6"
2020
TITLE = "text-2xl font-semibold text-secondary-12"
2121
DESCRIPTION = "text-sm text-secondary-11 font-[450]"

reflex_ui/components/base/dialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ClassNames:
1717
"""Class names for dialog components."""
1818

1919
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
20-
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[31rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
20+
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[31rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
2121
TITLE = "text-2xl font-semibold text-secondary-12"
2222
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
2323
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"

reflex_ui/components/base/dialog.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ from reflex_ui.components.base_ui import BaseUIComponent
1515

1616
class ClassNames:
1717
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
18-
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[31rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
18+
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[31rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
1919
TITLE = "text-2xl font-semibold text-secondary-12"
2020
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
2121
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"

reflex_ui/components/base/input.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
from reflex_ui.utils.twmerge import cn
1515

1616
INPUT_SIZE_VARIANTS = {
17-
"xs": "px-1.5 h-7 rounded-xs gap-1.5",
18-
"sm": "px-2 h-8 rounded-sm gap-2",
19-
"md": "px-2.5 h-9 rounded-md gap-2",
17+
"xs": "px-1.5 h-7 rounded-ui-xs gap-1.5",
18+
"sm": "px-2 h-8 rounded-ui-sm gap-2",
19+
"md": "px-2.5 h-9 rounded-ui-md gap-2",
2020
"lg": "px-3 h-10 rounded-lg gap-2.5",
21-
"xl": "px-3.5 h-12 rounded-xl gap-3",
21+
"xl": "px-3.5 h-12 rounded-ui-xl gap-3",
2222
}
2323

2424
LiteralControlSize = Literal["xs", "sm", "md", "lg", "xl"]

0 commit comments

Comments
 (0)