* Fix breadcrumb colors * HorizontalTabs * Team List Item WIP * Horizontal Tabs * Cards * Remove team list item WIP * Login Page * Add welcome back i118n * EventType page work * Update EventType Icons * WIP Availability * Horizontal Tab Work * Add build command for in root * Update build DIr/command * Add Edit Button + change buttons to v2 * Availablitiy page * Fix IPAD * Make mobile look a little nicer * WIP bookingshell * Remove list items from breaking build * Mian bulk of Booking Page. * Few updates to components * Fix chormatic feedback * Fix banner * Fix Empty Screen * Text area + embded window fixes * Semi fix avatar * Troubleshoot container + Active on count * Improve mobile * NITS * Fix padding on input * Fix icons * Starting to move event types settings to tabs * Begin migration to single page form * Single page tabs * Limits Page * Advanced tab * Add RHF to dependancies * Most of advanced tab * Solved RHF mismtach * Build fixes * RHF conditionals fixes * Improved legibility * Major refactor/organisation into optional V2 UI * Portal EditLocationModal * Fix dialoug form * Update imports * Auto Animate + custom inputs WIP * Custom Inputs * WIP Apps * Fixing stories imports * Stripe app * Remove duplicate dialog * Remove duplicate dialog * Fix embed URL * Fix app toggles + number of active apps * Fix container padding on disabledBorder prop * Removes strict * EventType Team page WIP * Fix embed * NIT * Add Darkmode gray color * V2 Shell WIP * Fix headings on shell V2 * Fix mobile layout with V2 shell * V2 create event type button * Checked Team Select * Hidden to happen on save - not on toggle * Team Attendee Select animation * Fix scheduling type and remove multi select label * Fix overflow on teams url * Even Type move order handles * Fix Embed TS errors * Fix TS errors * Fix Eslint errors * Fix TS errors for UI * Fix ESLINT error * added SidebarCard for promo to v2 and storybook (#3906) Co-authored-by: Julian Benegas <[email protected]> Co-authored-by: Alan <[email protected]> Co-authored-by: sean-brydon <[email protected]> * Tooltip Provider - Wrapper due to dep upgrade * public event type list darkmode * V2 Color changes to public booking * Remove unused component * Fix typecheck * Removed extra buttons on create ET dialog * ET edit page refactoring * Avoids form wrapping the whole Shell * Nitpicks Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: zomars <[email protected]> Co-authored-by: Hariom Balhara <[email protected]> Co-authored-by: Julian Benegas <[email protected]> Co-authored-by: Alan <[email protected]>
95 lines
3.7 KiB
TypeScript
95 lines
3.7 KiB
TypeScript
import { CheckCircleIcon } from "@heroicons/react/outline";
|
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
import { ComponentProps, forwardRef } from "react";
|
|
|
|
export const Dropdown = DropdownMenuPrimitive.Root;
|
|
|
|
type DropdownMenuTriggerProps = ComponentProps<typeof DropdownMenuPrimitive["Trigger"]>;
|
|
export const DropdownMenuTrigger = forwardRef<HTMLButtonElement, DropdownMenuTriggerProps>(
|
|
({ className = "", ...props }, forwardedRef) => (
|
|
<DropdownMenuPrimitive.Trigger
|
|
{...props}
|
|
className={
|
|
props.asChild
|
|
? className
|
|
: `inline-flex items-center rounded-md bg-transparent px-3 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-neutral-500 focus:ring-offset-1 group-hover:text-black ${className}`
|
|
}
|
|
ref={forwardedRef}
|
|
/>
|
|
)
|
|
);
|
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
|
|
export const DropdownMenuTriggerItem = DropdownMenuPrimitive.TriggerItem;
|
|
|
|
type DropdownMenuContentProps = ComponentProps<typeof DropdownMenuPrimitive["Content"]>;
|
|
export const DropdownMenuContent = forwardRef<HTMLDivElement, DropdownMenuContentProps>(
|
|
({ children, ...props }, forwardedRef) => {
|
|
return (
|
|
<DropdownMenuPrimitive.Content
|
|
portalled={props.portalled}
|
|
{...props}
|
|
className="w-50 relative z-10 mt-1 -ml-0 origin-top-right bg-white text-sm ring-1 ring-black ring-opacity-5 focus:outline-none"
|
|
ref={forwardedRef}>
|
|
{children}
|
|
</DropdownMenuPrimitive.Content>
|
|
);
|
|
}
|
|
);
|
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
|
|
type DropdownMenuLabelProps = ComponentProps<typeof DropdownMenuPrimitive["Label"]>;
|
|
export const DropdownMenuLabel = (props: DropdownMenuLabelProps) => (
|
|
<DropdownMenuPrimitive.Label {...props} className="px-3 py-2 text-neutral-500" />
|
|
);
|
|
|
|
type DropdownMenuItemProps = ComponentProps<typeof DropdownMenuPrimitive["CheckboxItem"]>;
|
|
export const DropdownMenuItem = forwardRef<HTMLDivElement, DropdownMenuItemProps>(
|
|
({ className = "", ...props }, forwardedRef) => (
|
|
<DropdownMenuPrimitive.Item
|
|
className={`text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 ${className}`}
|
|
{...props}
|
|
ref={forwardedRef}
|
|
/>
|
|
)
|
|
);
|
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
|
|
export const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
|
|
type DropdownMenuCheckboxItemProps = ComponentProps<typeof DropdownMenuPrimitive["CheckboxItem"]>;
|
|
export const DropdownMenuCheckboxItem = forwardRef<HTMLDivElement, DropdownMenuCheckboxItemProps>(
|
|
({ children, ...props }, forwardedRef) => {
|
|
return (
|
|
<DropdownMenuPrimitive.CheckboxItem {...props} ref={forwardedRef}>
|
|
{children}
|
|
<DropdownMenuPrimitive.ItemIndicator>
|
|
<CheckCircleIcon />
|
|
</DropdownMenuPrimitive.ItemIndicator>
|
|
</DropdownMenuPrimitive.CheckboxItem>
|
|
);
|
|
}
|
|
);
|
|
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
|
|
export const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
|
|
type DropdownMenuRadioItemProps = ComponentProps<typeof DropdownMenuPrimitive["RadioItem"]>;
|
|
export const DropdownMenuRadioItem = forwardRef<HTMLDivElement, DropdownMenuRadioItemProps>(
|
|
({ children, ...props }, forwardedRef) => {
|
|
return (
|
|
<DropdownMenuPrimitive.RadioItem {...props} ref={forwardedRef}>
|
|
{children}
|
|
<DropdownMenuPrimitive.ItemIndicator>
|
|
<CheckCircleIcon />
|
|
</DropdownMenuPrimitive.ItemIndicator>
|
|
</DropdownMenuPrimitive.RadioItem>
|
|
);
|
|
}
|
|
);
|
|
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
|
|
export const DropdownMenuSeparator = DropdownMenuPrimitive.Separator;
|
|
|
|
export default Dropdown;
|