@hexdspace/react 0.1.32 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -707,7 +707,10 @@ interface DropdownMenuItemProps extends React.ComponentPropsWithoutRef<typeof Dr
707
707
  declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
708
708
  declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenu$1.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
709
709
 
710
- interface KbdProps extends React.HTMLAttributes<HTMLSpanElement> {
710
+ declare const kbdVariants: (props?: ({
711
+ variant?: "push" | "flat" | null | undefined;
712
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
713
+ interface KbdProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof kbdVariants> {
711
714
  }
712
715
  declare const Kbd: React.ForwardRefExoticComponent<KbdProps & React.RefAttributes<HTMLSpanElement>>;
713
716
 
package/dist/index.js CHANGED
@@ -2942,7 +2942,9 @@ function DropdownMenu({
2942
2942
  triggerProps.onKeyDown?.(event);
2943
2943
  lastInputRef.current = "keyboard";
2944
2944
  }
2945
- }) : trigger;
2945
+ }) : React13.cloneElement(triggerElement, {
2946
+ ref: composedTriggerRef
2947
+ });
2946
2948
  const contentPropsWithRef = contentProps;
2947
2949
  const {
2948
2950
  className: contentClassName,
@@ -3057,25 +3059,31 @@ var DropdownMenuSeparator = React13.forwardRef(({ className, ...props }, ref) =>
3057
3059
  DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
3058
3060
 
3059
3061
  // src/ui/components/Kbd.tsx
3062
+ import { cva as cva8 } from "class-variance-authority";
3060
3063
  import * as React14 from "react";
3061
3064
  import { jsx as jsx20 } from "react/jsx-runtime";
3062
- var Kbd = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
3063
- "span",
3065
+ var kbdVariants = cva8(
3066
+ cn(
3067
+ "inline-flex min-w-7 items-center justify-center gap-1",
3068
+ "rounded-(--shape-radius-10) px-2",
3069
+ "bg-(--surface-3) text-(--text-1)",
3070
+ "border border-[color-mix(in_oklab,var(--border),transparent_45%)]",
3071
+ "text-[0.75rem] font-(--font-mono) leading-none tracking-[0.04em]",
3072
+ "transition-colors duration-(--motion-fast)"
3073
+ ),
3064
3074
  {
3065
- ref,
3066
- className: cn(
3067
- "inline-flex min-w-7 items-center justify-center gap-1",
3068
- "rounded-(--shape-radius-10) px-2 pt-1 pb-1.5",
3069
- "bg-(--surface-3) text-(--text-1)",
3070
- "border border-[color-mix(in_oklab,var(--border),transparent_45%)]",
3071
- "shadow-[inset_0_-2px_0_color-mix(in_oklab,var(--border),transparent_50%),0_3px_4px_color-mix(in_oklab,var(--border),transparent_80%)]",
3072
- "text-[0.75rem] font-(--font-mono) leading-none tracking-[0.04em]",
3073
- "transition-colors duration-(--motion-fast)",
3074
- className
3075
- ),
3076
- ...props
3075
+ variants: {
3076
+ variant: {
3077
+ flat: "py-1",
3078
+ push: "pb-1.5 pt-1 shadow-[inset_0_-1px_0_color-mix(in_oklab,var(--border),transparent_50%),0_3px_4px_color-mix(in_oklab,var(--border),transparent_80%)]"
3079
+ }
3080
+ },
3081
+ defaultVariants: {
3082
+ variant: "push"
3083
+ }
3077
3084
  }
3078
- ));
3085
+ );
3086
+ var Kbd = React14.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx20("span", { ref, className: cn(kbdVariants({ variant }), className), ...props }));
3079
3087
  Kbd.displayName = "Kbd";
3080
3088
  export {
3081
3089
  AuthController,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexdspace/react",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",