diff --git a/components/ui/aside.tsx b/components/ui/aside.tsx index 89cc4c39..bd88a62b 100644 --- a/components/ui/aside.tsx +++ b/components/ui/aside.tsx @@ -16,7 +16,6 @@ import { tv } from "tailwind-variants" import { Button, ButtonPrimitive } from "./button" import { cr, useMediaQuery } from "./primitive" import { Sheet } from "./sheet" -import { TouchTarget } from "./touch-target" const aside = tv({ slots: { @@ -162,9 +161,7 @@ const Item = ({ isCurrent, children, className, icon: Icon, ...props }: ItemProp <> {Icon && } - - {typeof children === "function" ? children(values) : children} - + {typeof children === "function" ? children(values) : children} {props.badge && (
{props.badge} diff --git a/components/ui/button.tsx b/components/ui/button.tsx index 590c720f..a15e53c8 100644 --- a/components/ui/button.tsx +++ b/components/ui/button.tsx @@ -9,7 +9,6 @@ import { import { tv } from "tailwind-variants" import { cr, focusButtonStyles } from "./primitive" -import { TouchTarget } from "./touch-target" const buttonStyles = tv( { @@ -119,9 +118,7 @@ const Button = React.forwardRef( )} > {(values) => ( - - {typeof props.children === "function" ? props.children(values) : props.children} - + <>{typeof props.children === "function" ? props.children(values) : props.children} )} ) diff --git a/components/ui/dialog.tsx b/components/ui/dialog.tsx index 52bde5c5..3b73193d 100644 --- a/components/ui/dialog.tsx +++ b/components/ui/dialog.tsx @@ -18,7 +18,6 @@ import { tv } from "tailwind-variants" import { Button, type ButtonProps } from "./button" import { useMediaQuery } from "./primitive" -import { TouchTarget } from "./touch-target" const dialogStyles = tv({ slots: { @@ -53,9 +52,7 @@ type DialogHeaderProps = React.HTMLAttributes & { const Trigger = (props: ButtonPrimitiveProps) => ( {(values) => ( - - {typeof props.children === "function" ? props.children(values) : props.children} - + <>{typeof props.children === "function" ? props.children(values) : props.children} )} ) diff --git a/components/ui/disclosure.tsx b/components/ui/disclosure.tsx index f6d43d20..801e82a8 100644 --- a/components/ui/disclosure.tsx +++ b/components/ui/disclosure.tsx @@ -18,7 +18,6 @@ import { import { tv } from "tailwind-variants" import { cn, cr, tm } from "./primitive" -import { TouchTarget } from "./touch-target" interface DisclosureGroupProps extends DisclosureGroupPrimitiveProps { hideBorder?: boolean @@ -128,7 +127,7 @@ const Trigger = ({ className, ...props }: ButtonProps) => { )} > {(values) => ( - + <> {typeof props.children === "function" ? props.children(values) : props.children} {!hideIndicator && ( { )} /> )} - + )} ) diff --git a/components/ui/index.ts b/components/ui/index.ts index 39915851..66e9060a 100644 --- a/components/ui/index.ts +++ b/components/ui/index.ts @@ -1,6 +1,5 @@ export * from './primitive'; export * from './progress-circle'; -export * from './touch-target'; export * from './aside'; export * from './tree'; export * from './chart'; diff --git a/components/ui/link.tsx b/components/ui/link.tsx index b93090a0..e7de31f8 100644 --- a/components/ui/link.tsx +++ b/components/ui/link.tsx @@ -6,7 +6,6 @@ import { Link as LinkPrimitive, type LinkProps as LinkPrimitiveProps } from "rea import { tv } from "tailwind-variants" import { cr } from "./primitive" -import { TouchTarget } from "./touch-target" const linkStyles = tv({ base: "forced-colors:outline-[Highlight] relative focus-visible:outline-2 outline outline-offset-2 disabled:focus-visible:outline-0 outline-0 outline-primary rounded disabled:opacity-60 forced-colors:disabled:text-[GrayText] border-transparent transition-colors disabled:cursor-default", @@ -38,9 +37,7 @@ const Link = ({ className, ...props }: LinkProps) => { )} > {(values) => ( - - {typeof props.children === "function" ? props.children(values) : props.children} - + <>{typeof props.children === "function" ? props.children(values) : props.children} )} ) diff --git a/components/ui/menu.tsx b/components/ui/menu.tsx index 6380bba1..421564ec 100644 --- a/components/ui/menu.tsx +++ b/components/ui/menu.tsx @@ -27,7 +27,6 @@ import { DropdownItemDetails, dropdownItemStyles, DropdownSection } from "./drop import { Keyboard } from "./keyboard" import { Popover } from "./popover" import { cn, cr, tm } from "./primitive" -import { TouchTarget } from "./touch-target" interface MenuContextProps { respectScreen: boolean @@ -72,9 +71,7 @@ interface MenuTriggerProps extends ButtonProps { const Trigger = ({ className, ...props }: MenuTriggerProps) => ( ) diff --git a/components/ui/show-more.tsx b/components/ui/show-more.tsx index 9950880a..8a9a2842 100644 --- a/components/ui/show-more.tsx +++ b/components/ui/show-more.tsx @@ -7,7 +7,6 @@ import { tv } from "tailwind-variants" import { buttonStyles } from "./button" import { cr } from "./primitive" -import { TouchTarget } from "./touch-target" const showMoreStyles = tv({ base: "text-sm leading-6 after:border-muted before:border-muted", @@ -55,7 +54,7 @@ const ShowMore = ({ className={buttonStyles({ shape: "circle", appearance: "outline", size: "small" })} > {cr(props.children, (children) => ( - {children} + <>{children} ))} ) : ( diff --git a/components/ui/table.tsx b/components/ui/table.tsx index ae2088eb..9a06179b 100644 --- a/components/ui/table.tsx +++ b/components/ui/table.tsx @@ -29,7 +29,6 @@ import { tv } from "tailwind-variants" import { Checkbox } from "./checkbox" import { cn, cr } from "./primitive" -import { TouchTarget } from "./touch-target" const table = tv({ slots: { @@ -143,13 +142,13 @@ const TableColumn = ({ children, isResizable = false, className, ...props }: Tab <> {children} {allowsSorting && ( - + <> - + )} {isResizable && } @@ -204,9 +203,9 @@ const TableRow = ({ className="relative bg-transparent pl-3.5 py-1.5 text-muted-fg pressed:text-fg" slot="drag" > - + <> - + )} diff --git a/components/ui/text-field.tsx b/components/ui/text-field.tsx index 2bd328ea..f692c74b 100644 --- a/components/ui/text-field.tsx +++ b/components/ui/text-field.tsx @@ -13,7 +13,6 @@ import { import type { FieldProps } from "./field" import { Description, FieldError, FieldGroup, fieldGroupPrefixStyles, Input, Label } from "./field" import { ctr } from "./primitive" -import { TouchTarget } from "./touch-target" type InputType = Exclude @@ -80,13 +79,13 @@ const TextField = ({ onPress={handleTogglePasswordVisibility} className="atrs relative isSfx x2e2 [&_[data-slot=icon]]:text-muted-fg focus:outline-none focus-visible:ring-1 focus-visible:ring-primary rounded" > - + <> {isPasswordVisible ? ( ) : ( )} - + ) : isLoading && indicatorPlace === "suffix" ? ( diff --git a/components/ui/toggle.tsx b/components/ui/toggle.tsx index 1431cfaf..35a402b1 100644 --- a/components/ui/toggle.tsx +++ b/components/ui/toggle.tsx @@ -6,7 +6,6 @@ import { ToggleButton as ToggleButtonPrimitive, ToggleButtonProps } from "react- import { tv, VariantProps } from "tailwind-variants" import { cr, focusButtonStyles } from "./primitive" -import { TouchTarget } from "./touch-target" const toggleStyles = tv({ extend: focusButtonStyles, @@ -59,7 +58,7 @@ const Toggle = ({ className, ...props }: ToggleProps) => { )} > {cr(props.children, (children) => ( - {children} + <>{children} ))} ) diff --git a/components/ui/touch-target.tsx b/components/ui/touch-target.tsx deleted file mode 100644 index dc852430..00000000 --- a/components/ui/touch-target.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import * as React from "react" - -const TouchTarget = ({ children }: { children: React.ReactNode }) => { - return ( - <> -