From a5491f73862c3b18824546dc281d1b133876e285 Mon Sep 17 00:00:00 2001 From: Ryan Leichty Date: Mon, 6 May 2024 13:34:30 -0500 Subject: [PATCH 1/2] Update arbitrary classes Updated a number of redundant arbitrary classes with native Tailwind classes. There were a number of inconsistencies that I noticed when using the Tailwind examples as a starting place, so this smoothes things out. It might be worth considering adding the Radix design system within the Tailwind config files versus using arbitrary values for everything. I found a number of old design system values, but wasn't 100% positive which were used for the primitives when they were first created. --- .../demos/AlertDialog/tailwind/index.jsx | 10 +-- .../demos/AspectRatio/tailwind/index.jsx | 2 +- components/demos/Avatar/tailwind/index.jsx | 16 ++-- components/demos/Checkbox/tailwind/index.jsx | 2 +- .../demos/Collapsible/tailwind/index.jsx | 12 +-- .../demos/ContextMenu/tailwind/index.jsx | 30 +++---- components/demos/Dialog/tailwind/index.jsx | 14 ++-- .../demos/DropdownMenu/tailwind/index.jsx | 44 +++++----- components/demos/Form/tailwind/index.jsx | 16 ++-- components/demos/HoverCard/tailwind/index.jsx | 18 ++--- components/demos/Label/tailwind/index.jsx | 2 +- components/demos/Menubar/tailwind/index.jsx | 80 +++++++++---------- .../demos/NavigationMenu/tailwind/index.jsx | 28 +++---- components/demos/Popover/tailwind/index.jsx | 4 +- components/demos/Progress/tailwind/index.jsx | 2 +- .../demos/RadioGroup/tailwind/index.jsx | 12 +-- .../demos/ScrollArea/tailwind/index.jsx | 6 +- components/demos/Select/tailwind/index.jsx | 4 +- components/demos/Slider/tailwind/index.jsx | 2 +- components/demos/Switch/tailwind/index.jsx | 2 +- components/demos/Toast/tailwind/index.jsx | 4 +- components/demos/Toggle/tailwind/index.jsx | 2 +- .../demos/ToggleGroup/tailwind/index.jsx | 2 +- components/demos/Toolbar/tailwind/index.jsx | 8 +- components/demos/Tooltip/tailwind/index.jsx | 4 +- 25 files changed, 163 insertions(+), 163 deletions(-) diff --git a/components/demos/AlertDialog/tailwind/index.jsx b/components/demos/AlertDialog/tailwind/index.jsx index 2e1fafb63..3b3cb2fc1 100644 --- a/components/demos/AlertDialog/tailwind/index.jsx +++ b/components/demos/AlertDialog/tailwind/index.jsx @@ -4,28 +4,28 @@ import * as AlertDialog from '@radix-ui/react-alert-dialog'; const AlertDialogDemo = () => ( - - + Are you absolutely sure? - + This action cannot be undone. This will permanently delete your account and remove your data from our servers.
- - diff --git a/components/demos/AspectRatio/tailwind/index.jsx b/components/demos/AspectRatio/tailwind/index.jsx index b26d6775f..baff0cc6d 100644 --- a/components/demos/AspectRatio/tailwind/index.jsx +++ b/components/demos/AspectRatio/tailwind/index.jsx @@ -5,7 +5,7 @@ const AspectRatioDemo = () => (
Landscape photograph by Tobias Tullius diff --git a/components/demos/Avatar/tailwind/index.jsx b/components/demos/Avatar/tailwind/index.jsx index 2d01aee64..e3d8b431b 100644 --- a/components/demos/Avatar/tailwind/index.jsx +++ b/components/demos/Avatar/tailwind/index.jsx @@ -3,34 +3,34 @@ import * as Avatar from '@radix-ui/react-avatar'; const AvatarDemo = () => (
- + CT - + JD - - + + PD diff --git a/components/demos/Checkbox/tailwind/index.jsx b/components/demos/Checkbox/tailwind/index.jsx index 72a1b0d2d..06aa86fe8 100644 --- a/components/demos/Checkbox/tailwind/index.jsx +++ b/components/demos/Checkbox/tailwind/index.jsx @@ -6,7 +6,7 @@ const CheckboxDemo = () => (
diff --git a/components/demos/Collapsible/tailwind/index.jsx b/components/demos/Collapsible/tailwind/index.jsx index ebb8eb4d7..67701bcf6 100644 --- a/components/demos/Collapsible/tailwind/index.jsx +++ b/components/demos/Collapsible/tailwind/index.jsx @@ -6,26 +6,26 @@ const CollapsibleDemo = () => { const [open, setOpen] = React.useState(false); return ( -
- +
+ @peduarte starred 3 repositories -
-
+
@radix-ui/primitives
-
+
@radix-ui/colors
-
+
@stitches/react
diff --git a/components/demos/ContextMenu/tailwind/index.jsx b/components/demos/ContextMenu/tailwind/index.jsx index 60fae27d8..0f74a36ad 100644 --- a/components/demos/ContextMenu/tailwind/index.jsx +++ b/components/demos/ContextMenu/tailwind/index.jsx @@ -18,14 +18,14 @@ const ContextMenuDemo = () => { sideOffset={5} align="end" > - + Back{' '}
⌘+[
Forward{' '} @@ -33,14 +33,14 @@ const ContextMenuDemo = () => { ⌘+]
- + Reload{' '}
⌘+R
- + More Tools
@@ -52,30 +52,30 @@ const ContextMenuDemo = () => { sideOffset={2} alignOffset={-5} > - + Save Page As…{' '}
⌘+S
- + Create Shortcut… - + Name Window… - - + + Developer Tools - + @@ -88,7 +88,7 @@ const ContextMenuDemo = () => {
@@ -98,14 +98,14 @@ const ContextMenuDemo = () => { Show Full URLs - + People @@ -114,7 +114,7 @@ const ContextMenuDemo = () => { Pedro Duarte diff --git a/components/demos/Dialog/tailwind/index.jsx b/components/demos/Dialog/tailwind/index.jsx index 6bcec1ab0..b45720de6 100644 --- a/components/demos/Dialog/tailwind/index.jsx +++ b/components/demos/Dialog/tailwind/index.jsx @@ -5,17 +5,17 @@ import { Cross2Icon } from '@radix-ui/react-icons'; const DialogDemo = () => ( - - + Edit profile - + Make changes to your profile here. Click save when you're done.
@@ -23,7 +23,7 @@ const DialogDemo = () => ( Name @@ -33,21 +33,21 @@ const DialogDemo = () => ( Username
-