Skip to content

Commit

Permalink
mib
Browse files Browse the repository at this point in the history
  • Loading branch information
irsyadadl committed Aug 17, 2024
1 parent 3bbbd4b commit 59d6caf
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion components/docs/generated/previews.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file is autogenerated by scripts/create-pr-content.ts.
// Do not edit this file directly.

import React from 'react'
import React from 'react';

export const previews: Record<string, any> = {
"date-and-time/date-field-demo": {
Expand Down
34 changes: 21 additions & 13 deletions components/ui/field.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
'use client';

import * as React from 'react';



import { FieldError as FieldErrorPrimitive, type FieldErrorProps, Group, type GroupProps, Input as InputPrimitive, type InputProps, Label as LabelPrimitive, type LabelProps, Text, type TextFieldProps as TextFieldPrimitiveProps, type TextProps, type ValidationResult } from 'react-aria-components';
import { tv } from 'tailwind-variants';



import { cr, ctr } from './primitive';

"use client"

import * as React from "react"

import {
FieldError as FieldErrorPrimitive,
type FieldErrorProps,
Group,
type GroupProps,
Input as InputPrimitive,
type InputProps,
Label as LabelPrimitive,
type LabelProps,
Text,
type TextFieldProps as TextFieldPrimitiveProps,
type TextProps,
type ValidationResult
} from "react-aria-components"
import { tv } from "tailwind-variants"

import { cr, ctr } from "./primitive"

// primitive styles

Expand Down
4 changes: 2 additions & 2 deletions components/ui/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const Item = ({ className, isDanger = false, children, ...props }: MenuItemProps
className={cr(className, (className, renderProps) =>
dropdownItemStyles({
...renderProps,
className
className: cn("pl-2.5", className)
})
)}
data-danger={isDanger ? "true" : undefined}
Expand Down Expand Up @@ -174,7 +174,7 @@ const Radio = ({ className, children, ...props }: MenuItemProps) => (
{(values) => (
<>
{values.isSelected && (
<span className="absolute left-3.5 flex size-[0.650rem] items-center animate-in justify-center">
<span className="absolute left-3 flex size-[0.650rem] items-center animate-in justify-center">
<IconBulletFill className="size-[0.650rem]" />
</span>
)}
Expand Down
6 changes: 3 additions & 3 deletions components/ui/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ const Content = ({
const isMenuTrigger = popoverContext?.trigger === "MenuTrigger"
const isSubmenuTrigger = popoverContext?.trigger === "SubmenuTrigger"
const isMenu = isMenuTrigger || isSubmenuTrigger
let offset = showArrow ? 12 : 8
offset = isSubmenuTrigger ? offset - 6 : offset
const offset = showArrow ? 12 : 8
const effectiveOffset = isSubmenuTrigger ? offset - 5 : offset
return isMobile && respectScreen ? (
<ModalOverlay
className={twJoin(
Expand All @@ -136,7 +136,7 @@ const Content = ({
</ModalOverlay>
) : (
<PopoverPrimitive
offset={offset}
offset={effectiveOffset}
{...props}
className={cr(className, (className, renderProps) =>
popoverContentStyles({
Expand Down

0 comments on commit 59d6caf

Please sign in to comment.