@hexclave/ui 1.0.0 → 1.0.2
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/components/action-dialog.d.ts +3 -3
- package/dist/components/action-dialog.d.ts.map +1 -1
- package/dist/components/action-dialog.js.map +1 -1
- package/dist/components/brand-icons.js +3 -3
- package/dist/components/brand-icons.js.map +1 -1
- package/dist/components/copy-button.d.ts +2 -2
- package/dist/components/copy-button.js +2 -2
- package/dist/components/copy-button.js.map +1 -1
- package/dist/components/data-table/data-table.js +2 -2
- package/dist/components/data-table/data-table.js.map +1 -1
- package/dist/components/data-table/toolbar.js +3 -3
- package/dist/components/data-table/toolbar.js.map +1 -1
- package/dist/components/ui/accordion.js +4 -4
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert.js +4 -4
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/avatar.js +4 -4
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.js +2 -2
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.js +6 -6
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/button.js +7 -7
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/card.js +8 -8
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/checkbox.js +2 -2
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/command.js +8 -8
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.js +9 -9
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.js +5 -5
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dropdown-menu.js +16 -16
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/form.js +8 -8
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/hover-card.js +2 -2
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/inline-code.js +7 -7
- package/dist/components/ui/inline-code.js.map +1 -1
- package/dist/components/ui/input-otp.js +5 -5
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.js +3 -3
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/label.js +3 -3
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.js +2 -2
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.js +7 -7
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/password-input.js +2 -2
- package/dist/components/ui/password-input.js.map +1 -1
- package/dist/components/ui/popover.js +2 -2
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.js +2 -2
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.js +3 -3
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +3 -3
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.js +8 -8
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.js +2 -2
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.js +5 -5
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/slider.js +2 -2
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/spinner.js +2 -2
- package/dist/components/ui/spinner.js.map +1 -1
- package/dist/components/ui/switch.js +9 -9
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.js +9 -9
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.js +4 -4
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toast.js +7 -7
- package/dist/components/ui/toast.js.map +1 -1
- package/dist/components/ui/toggle-group.js +3 -3
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.js +2 -2
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.js +3 -3
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/typography.d.ts +1 -1
- package/dist/components/ui/typography.js +2 -2
- package/dist/components/ui/typography.js.map +1 -1
- package/dist/esm/components/action-dialog.d.ts +3 -3
- package/dist/esm/components/action-dialog.d.ts.map +1 -1
- package/dist/esm/components/action-dialog.js.map +1 -1
- package/dist/esm/components/brand-icons.js.map +1 -1
- package/dist/esm/components/copy-button.d.ts +2 -2
- package/dist/esm/components/copy-button.js.map +1 -1
- package/dist/esm/components/data-table/data-table.js.map +1 -1
- package/dist/esm/components/data-table/toolbar.js.map +1 -1
- package/dist/esm/components/ui/accordion.js.map +1 -1
- package/dist/esm/components/ui/alert.js.map +1 -1
- package/dist/esm/components/ui/avatar.js.map +1 -1
- package/dist/esm/components/ui/badge.js.map +1 -1
- package/dist/esm/components/ui/breadcrumb.js.map +1 -1
- package/dist/esm/components/ui/button.js.map +1 -1
- package/dist/esm/components/ui/card.js.map +1 -1
- package/dist/esm/components/ui/checkbox.js.map +1 -1
- package/dist/esm/components/ui/command.js.map +1 -1
- package/dist/esm/components/ui/context-menu.js.map +1 -1
- package/dist/esm/components/ui/dialog.js.map +1 -1
- package/dist/esm/components/ui/dropdown-menu.js.map +1 -1
- package/dist/esm/components/ui/form.js.map +1 -1
- package/dist/esm/components/ui/hover-card.js.map +1 -1
- package/dist/esm/components/ui/inline-code.js.map +1 -1
- package/dist/esm/components/ui/input-otp.js.map +1 -1
- package/dist/esm/components/ui/input.js.map +1 -1
- package/dist/esm/components/ui/label.js.map +1 -1
- package/dist/esm/components/ui/menubar.js.map +1 -1
- package/dist/esm/components/ui/navigation-menu.js.map +1 -1
- package/dist/esm/components/ui/password-input.js.map +1 -1
- package/dist/esm/components/ui/popover.js.map +1 -1
- package/dist/esm/components/ui/progress.js.map +1 -1
- package/dist/esm/components/ui/radio-group.js.map +1 -1
- package/dist/esm/components/ui/resizable.d.ts +1 -1
- package/dist/esm/components/ui/resizable.d.ts.map +1 -1
- package/dist/esm/components/ui/scroll-area.js.map +1 -1
- package/dist/esm/components/ui/select.js.map +1 -1
- package/dist/esm/components/ui/separator.js.map +1 -1
- package/dist/esm/components/ui/sheet.js.map +1 -1
- package/dist/esm/components/ui/slider.js.map +1 -1
- package/dist/esm/components/ui/spinner.js.map +1 -1
- package/dist/esm/components/ui/switch.js.map +1 -1
- package/dist/esm/components/ui/table.js.map +1 -1
- package/dist/esm/components/ui/tabs.js.map +1 -1
- package/dist/esm/components/ui/textarea.js.map +1 -1
- package/dist/esm/components/ui/toast.js.map +1 -1
- package/dist/esm/components/ui/toggle-group.js.map +1 -1
- package/dist/esm/components/ui/toggle.js.map +1 -1
- package/dist/esm/components/ui/tooltip.js.map +1 -1
- package/dist/esm/components/ui/typography.d.ts +1 -1
- package/dist/esm/components/ui/typography.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","names":[],"sources":["../../../../src/components/ui/form.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"form.js","names":[],"sources":["../../../../src/components/ui/form.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport {\n Controller,\n ControllerProps,\n FieldPath,\n FieldValues,\n FormProvider,\n useFormContext,\n} from \"react-hook-form\";\n\nimport { HexclaveAssertionError } from \"@hexclave/shared/dist/utils/errors\";\nimport { cn } from \"../../lib/utils\";\nimport { SpanLabel } from \"./label\";\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> = {\n name: TName,\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n ...props\n }: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext) {\n throw new HexclaveAssertionError(\"useFormField should be used within <FormField>\");\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n const formItemId = React.useId();\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${formItemId}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\ntype FormItemContextValue = {\n id: string,\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue\n);\n\nconst FormItem = forwardRefIfNeeded<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n </FormItemContext.Provider>\n );\n});\nFormItem.displayName = \"FormItem\";\n\nconst FormLabel = forwardRefIfNeeded<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { error } = useFormField();\n\n return (\n <SpanLabel\n ref={ref}\n className={cn(error && \"text-destructive\", className)}\n {...props}\n />\n );\n});\nFormLabel.displayName = \"FormLabel\";\n\nconst FormControl = forwardRefIfNeeded<\n React.ElementRef<typeof Slot>,\n React.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n );\n});\nFormControl.displayName = \"FormControl\";\n\nconst FormDescription = forwardRefIfNeeded<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn(\"text-[0.8rem] text-muted-foreground\", className)}\n {...props}\n />\n );\n});\nFormDescription.displayName = \"FormDescription\";\n\nconst FormMessage = forwardRefIfNeeded<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn(\"text-[0.8rem] font-medium text-destructive\", className)}\n {...props}\n >\n {body}\n </p>\n );\n});\nFormMessage.displayName = \"FormMessage\";\n\nexport {\n Form, FormControl,\n FormDescription, FormField, FormItem,\n FormLabel, FormMessage, useFormField\n};\n"],"mappings":";;;;;;;;;;;;AAmBA,MAAM,OAAO;AASb,MAAM,mBAAmB,MAAM,cAA4C,KAAK;AAEhF,MAAM,aAGJ,EACE,GAAG,YACuC;AAC5C,QACE,oBAAC,iBAAiB;EAAS,OAAO,EAAE,MAAM,MAAM,MAAM;YACpD,oBAAC,cAAW,GAAI,QAAS;GACC;;AAIhC,MAAM,qBAAqB;CACzB,MAAM,eAAe,MAAM,WAAW,iBAAiB;CACvD,MAAM,cAAc,MAAM,WAAW,gBAAgB;CACrD,MAAM,EAAE,eAAe,cAAc,gBAAgB;AAErD,KAAI,CAAC,aACH,OAAM,IAAI,uBAAuB,iDAAiD;CAGpF,MAAM,aAAa,cAAc,aAAa,MAAM,UAAU;CAE9D,MAAM,EAAE,OAAO;CACf,MAAM,aAAa,MAAM,OAAO;AAEhC,QAAO;EACL;EACA,MAAM,aAAa;EACnB,YAAY,GAAG,WAAW;EAC1B,mBAAmB,GAAG,GAAG;EACzB,eAAe,GAAG,GAAG;EACrB,GAAG;EACJ;;AAOH,MAAM,kBAAkB,MAAM,cAC5B,EAAE,CACH;AAED,MAAM,WAAW,oBAGd,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,MAAM,KAAK,MAAM,OAAO;AAExB,QACE,oBAAC,gBAAgB;EAAS,OAAO,EAAE,IAAI;YACrC,oBAAC;GAAS;GAAK,WAAW,GAAG,aAAa,UAAU;GAAE,GAAI;IAAS;GAC1C;EAE7B;AACF,SAAS,cAAc;AAEvB,MAAM,YAAY,oBAGf,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,MAAM,EAAE,UAAU,cAAc;AAEhC,QACE,oBAAC;EACM;EACL,WAAW,GAAG,SAAS,oBAAoB,UAAU;EACrD,GAAI;GACJ;EAEJ;AACF,UAAU,cAAc;AAExB,MAAM,cAAc,oBAGjB,EAAE,GAAG,SAAS,QAAQ;CACvB,MAAM,EAAE,OAAO,YAAY,mBAAmB,kBAAkB,cAAc;AAE9E,QACE,oBAAC;EACM;EACL,IAAI;EACJ,oBACE,CAAC,QACG,GAAG,sBACH,GAAG,kBAAkB,GAAG;EAE9B,gBAAc,CAAC,CAAC;EAChB,GAAI;GACJ;EAEJ;AACF,YAAY,cAAc;AAE1B,MAAM,kBAAkB,oBAGrB,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,MAAM,EAAE,sBAAsB,cAAc;AAE5C,QACE,oBAAC;EACM;EACL,IAAI;EACJ,WAAW,GAAG,uCAAuC,UAAU;EAC/D,GAAI;GACJ;EAEJ;AACF,gBAAgB,cAAc;AAE9B,MAAM,cAAc,oBAGjB,EAAE,WAAW,UAAU,GAAG,SAAS,QAAQ;CAC5C,MAAM,EAAE,OAAO,kBAAkB,cAAc;CAC/C,MAAM,OAAO,QAAQ,OAAO,MAAM,QAAQ,GAAG;AAE7C,KAAI,CAAC,KACH,QAAO;AAGT,QACE,oBAAC;EACM;EACL,IAAI;EACJ,WAAW,GAAG,8CAA8C,UAAU;EACtE,GAAI;YAEH;GACC;EAEN;AACF,YAAY,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.js","names":[],"sources":["../../../../src/components/ui/hover-card.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"hover-card.js","names":[],"sources":["../../../../src/components/ui/hover-card.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst HoverCard = HoverCardPrimitive.Root;\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\nconst HoverCardContent = forwardRefIfNeeded<\n React.ElementRef<typeof HoverCardPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"stack-scope z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n));\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent };\n"],"mappings":";;;;;;;;;AAQA,MAAM,YAAY,mBAAmB;AAErC,MAAM,mBAAmB,mBAAmB;AAE5C,MAAM,mBAAmB,oBAGtB,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,GAAG,SAAS,QAC5D,oBAAC,mBAAmB;CACb;CACE;CACK;CACZ,WAAW,GACT,0bACA,UACD;CACD,GAAI;EACJ,CACF;AACF,iBAAiB,cAAc,mBAAmB,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-code.js","names":[],"sources":["../../../../src/components/ui/inline-code.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../../lib/utils\";\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"inline-code.js","names":[],"sources":["../../../../src/components/ui/inline-code.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../../lib/utils\";\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport { hasClickableParent } from \"@hexclave/shared/dist/utils/dom\";\nimport { getNodeText } from \"@hexclave/shared/dist/utils/react\";\nimport { runAsynchronously } from \"@hexclave/shared/dist/utils/promises\";\nimport { useToast } from \"./use-toast\";\n\nconst InlineCode = forwardRefIfNeeded<\n React.ElementRef<\"code\">,\n React.ComponentPropsWithoutRef<\"code\">\n>((props, ref) => {\n const { toast } = useToast();\n\n return <code\n ref={ref}\n {...props}\n className={cn(\"stack-scope bg-zinc-200 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 rounded-sm px-1 cursor-pointer\", props.className)}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n props.onClick?.(e);\n if (!hasClickableParent(e.currentTarget)) {\n e.stopPropagation();\n e.preventDefault();\n runAsynchronously(async () => {\n try {\n await navigator.clipboard.writeText(getNodeText(props.children));\n toast({ description: 'Copied to clipboard!', variant: 'success' });\n } catch (e) {\n toast({ description: 'Failed to copy to clipboard', variant: 'destructive' });\n }\n });\n }\n }}\n />;\n});\nInlineCode.displayName = \"Code\";\n\nexport { InlineCode };\n"],"mappings":";;;;;;;;;;;AAUA,MAAM,aAAa,oBAGhB,OAAO,QAAQ;CAChB,MAAM,EAAE,UAAW,UAAU;AAE7B,QAAO,oBAAC;EACD;EACL,GAAI;EACJ,WAAW,GAAG,4GAA4G,MAAM,UAAU;EAC1I,UAAU,MAAqC;AAC7C,SAAM,UAAU,EAAE;AAClB,OAAI,CAAC,mBAAmB,EAAE,cAAc,EAAE;AACxC,MAAE,iBAAiB;AACnB,MAAE,gBAAgB;AAClB,sBAAkB,YAAY;AAC5B,SAAI;AACF,YAAM,UAAU,UAAU,UAAU,YAAY,MAAM,SAAS,CAAC;AAChE,YAAM;OAAE,aAAa;OAAwB,SAAS;OAAW,CAAC;cAC3D,GAAG;AACV,YAAM;OAAE,aAAa;OAA+B,SAAS;OAAe,CAAC;;MAE/E;;;GAGN;EACF;AACF,WAAW,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.js","names":[],"sources":["../../../../src/components/ui/input-otp.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"input-otp.js","names":[],"sources":["../../../../src/components/ui/input-otp.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport { DashIcon } from \"@radix-ui/react-icons\";\nimport { OTPInput, OTPInputContext } from \"input-otp\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst InputOTP: React.FC<React.ComponentPropsWithoutRef<typeof OTPInput>> = forwardRefIfNeeded<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n \"stack-scope flex items-center gap-2 has-[:disabled]:opacity-50\",\n containerClassName\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n));\nInputOTP.displayName = \"InputOTP\";\n\nconst InputOTPGroup = forwardRefIfNeeded<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex items-center gap-1\", className)} {...props} />\n));\nInputOTPGroup.displayName = \"InputOTPGroup\";\n\nconst InputOTPSlot = forwardRefIfNeeded<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\"> & { index: number, size?: 'default' | 'lg' }\n>(({ index, className, size = 'default', ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n \"relative flex h-9 w-9 items-center justify-center border border-input text-sm rounded-md\",\n size === 'lg' ? 'h-10 w-10 text-lg font-medium' : '',\n isActive && \"z-10 ring-1 ring-ring\",\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"h-4 w-px animate-caret-blink bg-foreground duration-1000\" />\n </div>\n )}\n </div>\n );\n});\nInputOTPSlot.displayName = \"InputOTPSlot\";\n\nconst InputOTPSeparator = forwardRefIfNeeded<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <DashIcon />\n </div>\n));\nInputOTPSeparator.displayName = \"InputOTPSeparator\";\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"],"mappings":";;;;;;;;;;AASA,MAAM,WAAsE,oBAGzE,EAAE,WAAW,oBAAoB,GAAG,SAAS,QAC9C,oBAAC;CACM;CACL,oBAAoB,GAClB,kEACA,mBACD;CACD,WAAW,GAAG,+BAA+B,UAAU;CACvD,GAAI;EACJ,CACF;AACF,SAAS,cAAc;AAEvB,MAAM,gBAAgB,oBAGnB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CAAS;CAAK,WAAW,GAAG,2BAA2B,UAAU;CAAE,GAAI;EAAS,CACjF;AACF,cAAc,cAAc;AAE5B,MAAM,eAAe,oBAGlB,EAAE,OAAO,WAAW,OAAO,WAAW,GAAG,SAAS,QAAQ;CAE3D,MAAM,EAAE,MAAM,cAAc,aADJ,MAAM,WAAW,gBAAgB,CACA,MAAM;AAE/D,QACE,qBAAC;EACM;EACL,WAAW,GACT,4FACA,SAAS,OAAO,kCAAkC,IAClD,YAAY,yBACZ,UACD;EACD,GAAI;aAEH,MACA,gBACC,oBAAC;GAAI,WAAU;aACb,oBAAC,SAAI,WAAU,6DAA6D;IACxE;GAEJ;EAER;AACF,aAAa,cAAc;AAE3B,MAAM,oBAAoB,oBAGvB,EAAE,GAAG,SAAS,QACf,oBAAC;CAAS;CAAK,MAAK;CAAY,GAAI;WAClC,oBAAC,aAAW;EACR,CACN;AACF,kBAAkB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","names":[],"sources":["../../../../src/components/ui/input.tsx"],"sourcesContent":["import { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"input.js","names":[],"sources":["../../../../src/components/ui/input.tsx"],"sourcesContent":["import { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nexport type InputProps = {\n prefixItem?: React.ReactNode,\n} & React.InputHTMLAttributes<HTMLInputElement>\n\nexport const Input = forwardRefIfNeeded<HTMLInputElement, InputProps>(\n ({ className, type, prefixItem, ...props }, ref) => {\n const baseClasses = \"stack-scope flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\";\n\n if (prefixItem) {\n return (\n <div className=\"flex flex-row items-center backdrop-blur-md bg-white/20 dark:bg-black/20 flex-1\">\n <div className={'flex self-stretch justify-center items-center text-muted-foreground pl-3 select-none bg-muted/70 pr-3 border-r border-input rounded-l-md'}>\n {prefixItem}\n </div>\n <input\n type={type}\n className={cn(baseClasses, 'rounded-l-none', className)}\n ref={ref}\n {...props}\n />\n </div>\n );\n } else {\n return (\n <div className=\"flex flex-row items-center backdrop-blur-md bg-white/20 dark:bg-black/20 flex-1\">\n <input\n type={type}\n className={cn(baseClasses, className)}\n ref={ref}\n {...props}\n />\n </div>\n );\n }\n }\n);\nInput.displayName = \"Input\";\n\n\nexport type DelayedInputProps = {\n delay?: number,\n} & InputProps\n\nexport const DelayedInput = forwardRefIfNeeded<HTMLInputElement, DelayedInputProps>(\n ({ delay = 500, defaultValue, ...props }, ref) => {\n const [value, setValue] = React.useState(defaultValue ?? \"\");\n\n const timeout = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n setValue(e.target.value);\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = setTimeout(() => {\n props.onChange?.(e);\n }, delay);\n };\n\n return <Input ref={ref} {...props} value={value} onChange={onChange} />;\n }\n);\nDelayedInput.displayName = \"DelayedInput\";\n"],"mappings":";;;;;;AASA,MAAa,QAAQ,oBAClB,EAAE,WAAW,MAAM,YAAY,GAAG,SAAS,QAAQ;CAClD,MAAM,cAAe;AAErB,KAAI,WACF,QACE,qBAAC;EAAI,WAAU;aACb,oBAAC;GAAI,WAAW;aACb;IACG,EACN,oBAAC;GACO;GACN,WAAW,GAAG,aAAa,kBAAkB,UAAU;GAClD;GACL,GAAI;IACJ;GACE;KAGR,QACE,oBAAC;EAAI,WAAU;YACb,oBAAC;GACO;GACN,WAAW,GAAG,aAAa,UAAU;GAChC;GACL,GAAI;IACJ;GACE;EAIb;AACD,MAAM,cAAc;AAOpB,MAAa,eAAe,oBACzB,EAAE,QAAQ,KAAK,cAAc,GAAG,SAAS,QAAQ;CAChD,MAAM,CAAC,OAAO,YAAY,MAAM,SAAS,gBAAgB,GAAG;CAE5D,MAAM,UAAU,MAAM,OAA6C,KAAK;CAExE,MAAM,YAAY,MAA2C;AAC3D,WAAS,EAAE,OAAO,MAAM;AACxB,MAAI,QAAQ,QACV,cAAa,QAAQ,QAAQ;AAE/B,UAAQ,UAAU,iBAAiB;AACjC,SAAM,WAAW,EAAE;KAClB,MAAM;;AAGX,QAAO,oBAAC;EAAW;EAAK,GAAI;EAAc;EAAiB;GAAY;EAE1E;AACD,aAAa,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","names":[],"sources":["../../../../src/components/ui/label.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"label.js","names":[],"sources":["../../../../src/components/ui/label.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst labelVariants = cva(\n \"stack-scope text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-gray-600 dark:text-gray-400\",\n);\n\nconst Label = forwardRefIfNeeded<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <label\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nconst SpanLabel = forwardRefIfNeeded<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n));\nSpanLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label, SpanLabel };\n"],"mappings":";;;;;;;;;;AASA,MAAM,gBAAgB,IACpB,0IACD;AAED,MAAM,QAAQ,oBAIX,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GAAG,eAAe,EAAE,UAAU;CACzC,GAAI;EACJ,CACF;AACF,MAAM,cAAc,eAAe,KAAK;AAExC,MAAM,YAAY,oBAIf,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GAAG,eAAe,EAAE,UAAU;CACzC,GAAI;EACJ,CACF;AACF,UAAU,cAAc,eAAe,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menubar.js","names":[],"sources":["../../../../src/components/ui/menubar.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@stackframe/stack-shared/dist/utils/react\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\";\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst MenubarMenu = MenubarPrimitive.Menu as any;\n\nconst MenubarGroup = MenubarPrimitive.Group;\n\nconst MenubarPortal = MenubarPrimitive.Portal;\n\nconst MenubarSub = MenubarPrimitive.Sub;\n\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"stack-scope flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm\",\n className\n )}\n {...props}\n />\n));\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n));\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean,\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n));\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n));\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n )\n);\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean,\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n));\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n));\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"h-4 w-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n));\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean,\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n));\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\nconst MenubarSeparator = forwardRefIfNeeded<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n );\n};\nMenubarShortcut.displayname = \"MenubarShortcut\";\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n};\n"],"mappings":";;;;;;;;;;AAaA,MAAM,cAAc,iBAAiB;AAErC,MAAM,eAAe,iBAAiB;AAEtC,MAAM,gBAAgB,iBAAiB;AAEvC,MAAM,aAAa,iBAAiB;AAEpC,MAAM,oBAAoB,iBAAiB;AAE3C,MAAM,UAAU,MAAM,YAGnB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,iBAAiB;CACX;CACL,WAAW,GACT,6FACA,UACD;CACD,GAAI;EACJ,CACF;AACF,QAAQ,cAAc,iBAAiB,KAAK;AAE5C,MAAM,iBAAiB,MAAM,YAG1B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,iBAAiB;CACX;CACL,WAAW,GACT,wNACA,UACD;CACD,GAAI;EACJ,CACF;AACF,eAAe,cAAc,iBAAiB,QAAQ;AAEtD,MAAM,oBAAoB,MAAM,YAK7B,EAAE,WAAW,OAAO,UAAU,GAAG,SAAS,QAC3C,qBAAC,iBAAiB;CACX;CACL,WAAW,GACT,8MACA,SAAS,QACT,UACD;CACD,GAAI;YAEH,UACD,oBAAC,oBAAiB,WAAU,oBAAoB;EACpB,CAC9B;AACF,kBAAkB,cAAc,iBAAiB,WAAW;AAE5D,MAAM,oBAAoB,MAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,iBAAiB;CACX;CACL,WAAW,GACT,ybACA,UACD;CACD,GAAI;EACJ,CACF;AACF,kBAAkB,cAAc,iBAAiB,WAAW;AAE5D,MAAM,iBAAiB,MAAM,YAKzB,EAAE,WAAW,QAAQ,SAAS,cAAc,IAAI,aAAa,GAAG,GAAG,SACnE,QAEA,oBAAC,iBAAiB,oBAChB,oBAAC,iBAAiB;CACX;CACE;CACM;CACD;CACZ,WAAW,GACT,0ZACA,UACD;CACD,GAAI;EACJ,GACsB,CAE7B;AACD,eAAe,cAAc,iBAAiB,QAAQ;AAEtD,MAAM,cAAc,MAAM,YAKvB,EAAE,WAAW,OAAO,GAAG,SAAS,QACjC,oBAAC,iBAAiB;CACX;CACL,WAAW,GACT,iNACA,SAAS,QACT,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,iBAAiB,KAAK;AAEhD,MAAM,sBAAsB,MAAM,YAG/B,EAAE,WAAW,UAAU,SAAS,GAAG,SAAS,QAC7C,qBAAC,iBAAiB;CACX;CACL,WAAW,GACT,sNACA,UACD;CACQ;CACT,GAAI;YAEJ,oBAAC;EAAK,WAAU;YACd,oBAAC,iBAAiB,2BAChB,oBAAC,aAAU,WAAU,YAAY,GACF;GAC5B,EACN;EAC6B,CAChC;AACF,oBAAoB,cAAc,iBAAiB,aAAa;AAEhE,MAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,iBAAiB;CACX;CACL,WAAW,GACT,sNACA,UACD;CACD,GAAI;YAEJ,oBAAC;EAAK,WAAU;YACd,oBAAC,iBAAiB,2BAChB,oBAAC,iBAAc,WAAU,yBAAyB,GACnB;GAC5B,EACN;EAC0B,CAC7B;AACF,iBAAiB,cAAc,iBAAiB,UAAU;AAE1D,MAAM,eAAe,MAAM,YAKxB,EAAE,WAAW,OAAO,GAAG,SAAS,QACjC,oBAAC,iBAAiB;CACX;CACL,WAAW,GACT,qCACA,SAAS,QACT,UACD;CACD,GAAI;EACJ,CACF;AACF,aAAa,cAAc,iBAAiB,MAAM;AAElD,MAAM,mBAAmB,oBAGtB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,iBAAiB;CACX;CACL,WAAW,GAAG,4BAA4B,UAAU;CACpD,GAAI;EACJ,CACF;AACF,iBAAiB,cAAc,iBAAiB,UAAU;AAE1D,MAAM,mBAAmB,EACvB,WACA,GAAG,YACwC;AAC3C,QACE,oBAAC;EACC,WAAW,GACT,yDACA,UACD;EACD,GAAI;GACJ;;AAGN,gBAAgB,cAAc"}
|
|
1
|
+
{"version":3,"file":"menubar.js","names":[],"sources":["../../../../src/components/ui/menubar.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\";\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst MenubarMenu = MenubarPrimitive.Menu as any;\n\nconst MenubarGroup = MenubarPrimitive.Group;\n\nconst MenubarPortal = MenubarPrimitive.Portal;\n\nconst MenubarSub = MenubarPrimitive.Sub;\n\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"stack-scope flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm\",\n className\n )}\n {...props}\n />\n));\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n));\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean,\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n));\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n));\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n )\n);\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean,\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n));\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n));\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"h-4 w-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n));\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean,\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n));\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\nconst MenubarSeparator = forwardRefIfNeeded<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n );\n};\nMenubarShortcut.displayname = \"MenubarShortcut\";\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n};\n"],"mappings":";;;;;;;;;;AAaA,MAAM,cAAc,iBAAiB;AAErC,MAAM,eAAe,iBAAiB;AAEtC,MAAM,gBAAgB,iBAAiB;AAEvC,MAAM,aAAa,iBAAiB;AAEpC,MAAM,oBAAoB,iBAAiB;AAE3C,MAAM,UAAU,MAAM,YAGnB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,iBAAiB;CACX;CACL,WAAW,GACT,6FACA,UACD;CACD,GAAI;EACJ,CACF;AACF,QAAQ,cAAc,iBAAiB,KAAK;AAE5C,MAAM,iBAAiB,MAAM,YAG1B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,iBAAiB;CACX;CACL,WAAW,GACT,wNACA,UACD;CACD,GAAI;EACJ,CACF;AACF,eAAe,cAAc,iBAAiB,QAAQ;AAEtD,MAAM,oBAAoB,MAAM,YAK7B,EAAE,WAAW,OAAO,UAAU,GAAG,SAAS,QAC3C,qBAAC,iBAAiB;CACX;CACL,WAAW,GACT,8MACA,SAAS,QACT,UACD;CACD,GAAI;YAEH,UACD,oBAAC,oBAAiB,WAAU,oBAAoB;EACpB,CAC9B;AACF,kBAAkB,cAAc,iBAAiB,WAAW;AAE5D,MAAM,oBAAoB,MAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,iBAAiB;CACX;CACL,WAAW,GACT,ybACA,UACD;CACD,GAAI;EACJ,CACF;AACF,kBAAkB,cAAc,iBAAiB,WAAW;AAE5D,MAAM,iBAAiB,MAAM,YAKzB,EAAE,WAAW,QAAQ,SAAS,cAAc,IAAI,aAAa,GAAG,GAAG,SACnE,QAEA,oBAAC,iBAAiB,oBAChB,oBAAC,iBAAiB;CACX;CACE;CACM;CACD;CACZ,WAAW,GACT,0ZACA,UACD;CACD,GAAI;EACJ,GACsB,CAE7B;AACD,eAAe,cAAc,iBAAiB,QAAQ;AAEtD,MAAM,cAAc,MAAM,YAKvB,EAAE,WAAW,OAAO,GAAG,SAAS,QACjC,oBAAC,iBAAiB;CACX;CACL,WAAW,GACT,iNACA,SAAS,QACT,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,iBAAiB,KAAK;AAEhD,MAAM,sBAAsB,MAAM,YAG/B,EAAE,WAAW,UAAU,SAAS,GAAG,SAAS,QAC7C,qBAAC,iBAAiB;CACX;CACL,WAAW,GACT,sNACA,UACD;CACQ;CACT,GAAI;YAEJ,oBAAC;EAAK,WAAU;YACd,oBAAC,iBAAiB,2BAChB,oBAAC,aAAU,WAAU,YAAY,GACF;GAC5B,EACN;EAC6B,CAChC;AACF,oBAAoB,cAAc,iBAAiB,aAAa;AAEhE,MAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,iBAAiB;CACX;CACL,WAAW,GACT,sNACA,UACD;CACD,GAAI;YAEJ,oBAAC;EAAK,WAAU;YACd,oBAAC,iBAAiB,2BAChB,oBAAC,iBAAc,WAAU,yBAAyB,GACnB;GAC5B,EACN;EAC0B,CAC7B;AACF,iBAAiB,cAAc,iBAAiB,UAAU;AAE1D,MAAM,eAAe,MAAM,YAKxB,EAAE,WAAW,OAAO,GAAG,SAAS,QACjC,oBAAC,iBAAiB;CACX;CACL,WAAW,GACT,qCACA,SAAS,QACT,UACD;CACD,GAAI;EACJ,CACF;AACF,aAAa,cAAc,iBAAiB,MAAM;AAElD,MAAM,mBAAmB,oBAGtB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,iBAAiB;CACX;CACL,WAAW,GAAG,4BAA4B,UAAU;CACpD,GAAI;EACJ,CACF;AACF,iBAAiB,cAAc,iBAAiB,UAAU;AAE1D,MAAM,mBAAmB,EACvB,WACA,GAAG,YACwC;AAC3C,QACE,oBAAC;EACC,WAAW,GACT,yDACA,UACD;EACD,GAAI;GACJ;;AAGN,gBAAgB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-menu.js","names":[],"sources":["../../../../src/components/ui/navigation-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"navigation-menu.js","names":[],"sources":["../../../../src/components/ui/navigation-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\";\nimport { cva } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst NavigationMenu = forwardRefIfNeeded<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"stack-scope relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n));\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\n\nconst NavigationMenuList = forwardRefIfNeeded<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"stack-scope group flex flex-1 list-none items-center justify-center space-x-1\",\n className\n )}\n {...props}\n />\n));\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\nconst navigationMenuTriggerStyle = cva(\n \"stack-scope group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50\"\n);\n\nconst NavigationMenuTrigger = forwardRefIfNeeded<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon\n className=\"relative top-[1px] ml-1 h-3 w-3 duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n));\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\n\nconst NavigationMenuContent = forwardRefIfNeeded<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"stack-scope left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n )}\n {...props}\n />\n));\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\nconst NavigationMenuViewport = forwardRefIfNeeded<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"stack-scope origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n));\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName;\n\nconst NavigationMenuIndicator = forwardRefIfNeeded<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"stack-scope top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n));\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName;\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n};\n"],"mappings":";;;;;;;;;;;AAUA,MAAM,iBAAiB,oBAGpB,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,wBAAwB;CAClB;CACL,WAAW,GACT,+EACA,UACD;CACD,GAAI;YAEH,UACD,oBAAC,2BAAyB;EACG,CAC/B;AACF,eAAe,cAAc,wBAAwB,KAAK;AAE1D,MAAM,qBAAqB,oBAGxB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,wBAAwB;CAClB;CACL,WAAW,GACT,iFACA,UACD;CACD,GAAI;EACJ,CACF;AACF,mBAAmB,cAAc,wBAAwB,KAAK;AAE9D,MAAM,qBAAqB,wBAAwB;AAEnD,MAAM,6BAA6B,IACjC,qVACD;AAED,MAAM,wBAAwB,oBAG3B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,wBAAwB;CAClB;CACL,WAAW,GAAG,4BAA4B,EAAE,SAAS,UAAU;CAC/D,GAAI;;EAEH;EAAU;EACX,oBAAC;GACC,WAAU;GACV,eAAY;IACZ;;EAC8B,CAClC;AACF,sBAAsB,cAAc,wBAAwB,QAAQ;AAEpE,MAAM,wBAAwB,oBAG3B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,wBAAwB;CAClB;CACL,WAAW,GACT,sWACA,UACD;CACD,GAAI;EACJ,CACF;AACF,sBAAsB,cAAc,wBAAwB,QAAQ;AAEpE,MAAM,qBAAqB,wBAAwB;AAEnD,MAAM,yBAAyB,oBAG5B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CAAI,WAAW,GAAG,+CAA+C;WAChE,oBAAC,wBAAwB;EACvB,WAAW,GACT,kWACA,UACD;EACI;EACL,GAAI;GACJ;EACE,CACN;AACF,uBAAuB,cACrB,wBAAwB,SAAS;AAEnC,MAAM,0BAA0B,oBAG7B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,wBAAwB;CAClB;CACL,WAAW,GACT,4MACA,UACD;CACD,GAAI;WAEJ,oBAAC,SAAI,WAAU,2EAA2E;EACxD,CACpC;AACF,wBAAwB,cACtB,wBAAwB,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-input.js","names":[],"sources":["../../../../src/components/ui/password-input.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { EyeIcon, EyeOffIcon } from \"lucide-react\";\nimport { Button } from \"./button\";\nimport { Input, InputProps } from \"./input\";\nimport { cn } from \"../../lib/utils\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"password-input.js","names":[],"sources":["../../../../src/components/ui/password-input.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { EyeIcon, EyeOffIcon } from \"lucide-react\";\nimport { Button } from \"./button\";\nimport { Input, InputProps } from \"./input\";\nimport { cn } from \"../../lib/utils\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\n\nconst PasswordInput = forwardRefIfNeeded<HTMLInputElement, InputProps>(\n\t({ className, ...props }, ref) => {\n\t const [showPassword, setShowPassword] = useState(false);\n\n\t return (\n\t <div className=\"relative\">\n\t <Input\n\t type={showPassword ? \"text\" : \"password\"}\n\t className={cn(\"stack-scope hide-password-toggle pr-10\", className)}\n\t ref={ref}\n\t {...props}\n\t />\n\t <Button\n\t type=\"button\"\n\t variant=\"ghost\"\n\t size=\"sm\"\n\t className=\"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent\"\n\t onClick={() => setShowPassword((prev) => !prev)}\n\t disabled={props.disabled}\n\t aria-label={showPassword ? \"Hide password\" : \"Show password\"}\n\t tabIndex={-1}\n\t >\n\t {showPassword ? (\n\t <EyeIcon\n\t className=\"h-4 w-4\"\n\t aria-hidden=\"true\"\n\t />\n\t ) : (\n\t <EyeOffIcon\n\t className=\"h-4 w-4\"\n\t aria-hidden=\"true\"\n\t />\n\t )}\n\t </Button>\n\t </div>\n\t );\n\t},\n);\nPasswordInput.displayName = \"PasswordInput\";\n\nexport { PasswordInput };\n"],"mappings":";;;;;;;;;;;AASA,MAAM,gBAAgB,oBACpB,EAAE,WAAW,GAAG,SAAS,QAAQ;CAChC,MAAM,CAAC,cAAc,mBAAmB,SAAS,MAAM;AAEvD,QACE,qBAAC;EAAI,WAAU;aACb,oBAAC;GACC,MAAM,eAAe,SAAS;GAC9B,WAAW,GAAG,0CAA0C,UAAU;GAC7D;GACL,GAAI;IACJ,EACF,oBAAC;GACC,MAAK;GACL,SAAQ;GACR,MAAK;GACL,WAAU;GACV,eAAe,iBAAiB,SAAS,CAAC,KAAK;GAC/C,UAAU,MAAM;GAChB,cAAY,eAAe,kBAAkB;GAC7C,UAAU;aAET,eACC,oBAAC;IACC,WAAU;IACV,eAAY;KACZ,GAEF,oBAAC;IACC,WAAU;IACV,eAAY;KACZ;IAEG;GACL;EAGV;AACD,cAAc,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","names":[],"sources":["../../../../src/components/ui/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"popover.js","names":[],"sources":["../../../../src/components/ui/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = forwardRefIfNeeded<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"stack-scope z-50 pointer-events-auto w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"mappings":";;;;;;;;;AAQA,MAAM,UAAU,iBAAiB;AAEjC,MAAM,iBAAiB,iBAAiB;AAExC,MAAM,gBAAgB,iBAAiB;AAEvC,MAAM,iBAAiB,oBAGpB,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,GAAG,SAAS,QAC5D,oBAAC,iBAAiB,oBAChB,oBAAC,iBAAiB;CACX;CACE;CACK;CACZ,WAAW,GACT,8cACA,UACD;CACD,GAAI;EACJ,GACsB,CAC1B;AACF,eAAe,cAAc,iBAAiB,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","names":[],"sources":["../../../../src/components/ui/progress.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"progress.js","names":[],"sources":["../../../../src/components/ui/progress.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Progress = forwardRefIfNeeded<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\n \"stack-scope relative h-2 w-full overflow-hidden rounded-full bg-primary/20\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full w-full flex-1 bg-primary transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n"],"mappings":";;;;;;;;;AAQA,MAAM,WAAW,oBAGd,EAAE,WAAW,OAAO,GAAG,SAAS,QACjC,oBAAC,kBAAkB;CACZ;CACL,WAAW,GACT,8EACA,UACD;CACD,GAAI;WAEJ,oBAAC,kBAAkB;EACjB,WAAU;EACV,OAAO,EAAE,WAAW,eAAe,OAAO,SAAS,GAAG,KAAK;GAC3D;EACqB,CACzB;AACF,SAAS,cAAc,kBAAkB,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","names":[],"sources":["../../../../src/components/ui/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"radio-group.js","names":[],"sources":["../../../../src/components/ui/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst RadioGroup = forwardRefIfNeeded<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(\"stack-scope grid gap-2\", className)}\n {...props}\n ref={ref}\n />\n );\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = forwardRefIfNeeded<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <CheckIcon className=\"h-3.5 w-3.5 fill-primary\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"],"mappings":";;;;;;;;;;AASA,MAAM,aAAa,oBAGhB,EAAE,WAAW,GAAG,SAAS,QAAQ;AAClC,QACE,oBAAC,oBAAoB;EACnB,WAAW,GAAG,0BAA0B,UAAU;EAClD,GAAI;EACC;GACL;EAEJ;AACF,WAAW,cAAc,oBAAoB,KAAK;AAElD,MAAM,iBAAiB,oBAGpB,EAAE,WAAW,GAAG,SAAS,QAAQ;AAClC,QACE,oBAAC,oBAAoB;EACd;EACL,WAAW,GACT,gMACA,UACD;EACD,GAAI;YAEJ,oBAAC,oBAAoB;GAAU,WAAU;aACvC,oBAAC,aAAU,WAAU,6BAA6B;IACpB;GACP;EAE7B;AACF,eAAe,cAAc,oBAAoB,KAAK"}
|
|
@@ -7,7 +7,7 @@ declare const ResizablePanelGroup: ({
|
|
|
7
7
|
className,
|
|
8
8
|
...props
|
|
9
9
|
}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => react_jsx_runtime0.JSX.Element;
|
|
10
|
-
declare const ResizablePanel: react.ForwardRefExoticComponent<Omit<react.HTMLAttributes<HTMLButtonElement | HTMLElement |
|
|
10
|
+
declare const ResizablePanel: react.ForwardRefExoticComponent<Omit<react.HTMLAttributes<HTMLButtonElement | HTMLElement | HTMLLIElement | HTMLDivElement | HTMLSpanElement | HTMLImageElement | HTMLParagraphElement | HTMLHeadingElement | HTMLOListElement | HTMLAnchorElement | HTMLInputElement | HTMLLabelElement | HTMLUListElement | HTMLObjectElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement>, "id" | "onResize"> & {
|
|
11
11
|
className?: string | undefined;
|
|
12
12
|
collapsedSize?: number | undefined;
|
|
13
13
|
collapsible?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.d.ts","names":[],"sources":["../../../../src/components/ui/resizable.tsx"],"mappings":";;;;;cAOM,mBAAA;EAAuB,SAAA;EAAA,GAAA;AAAA,GAG1B,KAAA,CAAM,cAAA,QAAsB,kBAAA,CAAmB,UAAA,MAAW,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,cAUvD,cAAA,QAAc,yBAAA,CAAA,IAAA,CAAA,KAAA,CAAA,cAAA,CAAA,iBAAA,GAAA,WAAA,GAAA,
|
|
1
|
+
{"version":3,"file":"resizable.d.ts","names":[],"sources":["../../../../src/components/ui/resizable.tsx"],"mappings":";;;;;cAOM,mBAAA;EAAuB,SAAA;EAAA,GAAA;AAAA,GAG1B,KAAA,CAAM,cAAA,QAAsB,kBAAA,CAAmB,UAAA,MAAW,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,cAUvD,cAAA,QAAc,yBAAA,CAAA,IAAA,CAAA,KAAA,CAAA,cAAA,CAAA,iBAAA,GAAA,WAAA,GAAA,aAAA,GAAA,cAAA,GAAA,eAAA,GAAA,gBAAA,GAAA,oBAAA,GAAA,kBAAA,GAAA,gBAAA,GAAA,iBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,iBAAA,GAAA,eAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,eAAA,GAAA,gBAAA,GAAA,eAAA,GAAA,gBAAA,GAAA,eAAA,GAAA,aAAA,GAAA,iBAAA,GAAA,uBAAA,GAAA,mBAAA,GAAA,eAAA,GAAA,mBAAA,GAAA,cAAA,GAAA,kBAAA,GAAA,iBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,mBAAA,GAAA,eAAA,GAAA,eAAA,GAAA,aAAA,GAAA,eAAA,GAAA,iBAAA,GAAA,iBAAA,GAAA,eAAA,GAAA,cAAA,GAAA,eAAA,GAAA,eAAA,GAAA,gBAAA,GAAA,mBAAA,GAAA,iBAAA,GAAA,iBAAA,GAAA,kBAAA,GAAA,cAAA,GAAA,mBAAA,GAAA,iBAAA,GAAA,iBAAA,GAAA,iBAAA,GAAA,gBAAA,GAAA,uBAAA,GAAA,oBAAA,GAAA,mBAAA,GAAA,mBAAA,GAAA,eAAA,GAAA,mBAAA,GAAA,gBAAA,GAAA,gBAAA;;;;;;;;;;;;;;;;;cAEd,eAAA;EAAmB,UAAA;EAAA,SAAA;EAAA,GAAA;AAAA,GAItB,KAAA,CAAM,cAAA,QAAsB,kBAAA,CAAmB,iBAAA;EAChD,UAAA;AAAA,MACD,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.js","names":[],"sources":["../../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"scroll-area.js","names":[],"sources":["../../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst ScrollArea = forwardRefIfNeeded<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn(\"stack-scope relative overflow-hidden\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\nconst ScrollBar = forwardRefIfNeeded<\n React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n \"flex touch-none select-none\",\n orientation === \"vertical\" &&\n \"h-full w-2.5 border-l border-l-transparent p-[1px]\",\n orientation === \"horizontal\" &&\n \"h-2.5 flex-col border-t border-t-transparent p-[1px]\",\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n));\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;\n\nexport { ScrollArea, ScrollBar };\n"],"mappings":";;;;;;;;;AAQA,MAAM,aAAa,oBAGhB,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,oBAAoB;CACd;CACL,WAAW,GAAG,wCAAwC,UAAU;CAChE,GAAI;;EAEJ,oBAAC,oBAAoB;GAAS,WAAU;GACrC;IAC4B;EAC/B,oBAAC,cAAY;EACb,oBAAC,oBAAoB,WAAS;;EACL,CAC3B;AACF,WAAW,cAAc,oBAAoB,KAAK;AAElD,MAAM,YAAY,oBAGf,EAAE,WAAW,cAAc,YAAY,GAAG,SAAS,QACpD,oBAAC,oBAAoB;CACd;CACQ;CACb,WAAW,GACT,+BACA,gBAAgB,cACd,sDACF,gBAAgB,gBACd,wDACF,UACD;CACD,GAAI;WAEJ,oBAAC,oBAAoB,mBAAgB,WAAU,2CAA2C;EAClD,CAC1C;AACF,UAAU,cAAc,oBAAoB,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","names":[],"sources":["../../../../src/components/ui/select.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n CaretSortIcon,\n CheckIcon,\n ChevronDownIcon,\n ChevronUpIcon,\n} from \"@radix-ui/react-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"select.js","names":[],"sources":["../../../../src/components/ui/select.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n CaretSortIcon,\n CheckIcon,\n ChevronDownIcon,\n ChevronUpIcon,\n} from \"@radix-ui/react-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = forwardRefIfNeeded<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & { loading?: boolean }\n>(({ className, children, loading, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"backdrop-blur-md bg-white/20 dark:bg-black/20 flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n loading && \"cursor-wait\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n {loading ? (\n <div className=\"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent opacity-50\" />\n ) : (\n <CaretSortIcon className=\"h-4 w-4 opacity-50\" />\n )}\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = forwardRefIfNeeded<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = forwardRefIfNeeded<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = forwardRefIfNeeded<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"stack-scope relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = forwardRefIfNeeded<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = forwardRefIfNeeded<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = forwardRefIfNeeded<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue\n};\n\n"],"mappings":";;;;;;;;;;AAcA,MAAM,SAAS,gBAAgB;AAE/B,MAAM,cAAc,gBAAgB;AAEpC,MAAM,cAAc,gBAAgB;AAEpC,MAAM,gBAAgB,oBAGnB,EAAE,WAAW,UAAU,SAAS,GAAG,SAAS,QAC7C,qBAAC,gBAAgB;CACV;CACL,WAAW,GACT,yWACA,WAAW,eACX,UACD;CACD,GAAI;YAEH,UACD,oBAAC,gBAAgB;EAAK;YACnB,UACC,oBAAC,SAAI,WAAU,8FAA8F,GAE7G,oBAAC,iBAAc,WAAU,uBAAuB;GAE7B;EACC,CAC1B;AACF,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,MAAM,uBAAuB,oBAG1B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GACT,wDACA,UACD;CACD,GAAI;WAEJ,oBAAC,kBAAgB;EACc,CACjC;AACF,qBAAqB,cAAc,gBAAgB,eAAe;AAElE,MAAM,yBAAyB,oBAG5B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GACT,wDACA,UACD;CACD,GAAI;WAEJ,oBAAC,oBAAkB;EACc,CACnC;AACF,uBAAuB,cACrB,gBAAgB,iBAAiB;AAEnC,MAAM,gBAAgB,oBAGnB,EAAE,WAAW,UAAU,WAAW,UAAU,GAAG,SAAS,QACzD,oBAAC,gBAAgB,oBACf,qBAAC,gBAAgB;CACV;CACL,WAAW,GACT,mdACA,aAAa,YACX,mIACF,UACD;CACS;CACV,GAAI;;EAEJ,oBAAC,yBAAuB;EACxB,oBAAC,gBAAgB;GACf,WAAW,GACT,OACA,aAAa,YACX,0FACH;GAEA;IACwB;EAC3B,oBAAC,2BAAyB;;EACF,GACH,CACzB;AACF,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,MAAM,cAAc,oBAGjB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GAAG,qCAAqC,UAAU;CAC7D,GAAI;EACJ,CACF;AACF,YAAY,cAAc,gBAAgB,MAAM;AAEhD,MAAM,aAAa,oBAGhB,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,gBAAgB;CACV;CACL,WAAW,GACT,6NACA,UACD;CACD,GAAI;YAEJ,oBAAC;EAAK,WAAU;YACd,oBAAC,gBAAgB,2BACf,oBAAC,aAAU,WAAU,YAAY,GACH;GAC3B,EACP,oBAAC,gBAAgB,YAAU,WAAoC;EAC1C,CACvB;AACF,WAAW,cAAc,gBAAgB,KAAK;AAE9C,MAAM,kBAAkB,oBAGrB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GAAG,4BAA4B,UAAU;CACpD,GAAI;EACJ,CACF;AACF,gBAAgB,cAAc,gBAAgB,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.js","names":[],"sources":["../../../../src/components/ui/separator.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"separator.js","names":[],"sources":["../../../../src/components/ui/separator.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Separator = forwardRefIfNeeded<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n (\n { className, orientation = \"horizontal\", decorative = true, ...props },\n ref\n ) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"stack-scope shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className\n )}\n {...props}\n />\n )\n);\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"],"mappings":";;;;;;;;;AAQA,MAAM,YAAY,oBAKd,EAAE,WAAW,cAAc,cAAc,aAAa,MAAM,GAAG,SAC/D,QAEA,oBAAC,mBAAmB;CACb;CACO;CACC;CACb,WAAW,GACT,kCACA,gBAAgB,eAAe,mBAAmB,kBAClD,UACD;CACD,GAAI;EACJ,CAEL;AACD,UAAU,cAAc,mBAAmB,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.js","names":[],"sources":["../../../../src/components/ui/sheet.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"sheet.js","names":[],"sources":["../../../../src/components/ui/sheet.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { Cross2Icon } from \"@radix-ui/react-icons\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Sheet = SheetPrimitive.Root;\n\nconst SheetTrigger = SheetPrimitive.Trigger;\n\nconst SheetClose = SheetPrimitive.Close;\n\nconst SheetPortal = SheetPrimitive.Portal;\n\nconst SheetOverlay = forwardRefIfNeeded<\n React.ElementRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n ref={ref}\n />\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst sheetVariants = cva(\n \"stack-scope fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-100 data-[state=open]:duration-100\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n }\n);\n\ntype SheetContentProps = { hasCloseButton?: boolean } & React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> & VariantProps<typeof sheetVariants>\n\nconst SheetContent = forwardRefIfNeeded<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", hasCloseButton = true, className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n ref={ref}\n className={cn(sheetVariants({ side }), className)}\n {...props}\n >\n {children}\n {hasCloseButton ? <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <Cross2Icon className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close> : null}\n </SheetPrimitive.Content>\n </SheetPortal>\n));\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\nconst SheetHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n);\nSheetHeader.displayName = \"SheetHeader\";\n\nconst SheetFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n);\nSheetFooter.displayName = \"SheetFooter\";\n\nconst SheetTitle = forwardRefIfNeeded<\n React.ElementRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold text-foreground\", className)}\n {...props}\n />\n));\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\nconst SheetDescription = forwardRefIfNeeded<\n React.ElementRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n};\n"],"mappings":";;;;;;;;;;;AAUA,MAAM,QAAQ,eAAe;AAE7B,MAAM,eAAe,eAAe;AAEpC,MAAM,aAAa,eAAe;AAElC,MAAM,cAAc,eAAe;AAEnC,MAAM,eAAe,oBAGlB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,eAAe;CACd,WAAW,GACT,2JACA,UACD;CACD,GAAI;CACC;EACL,CACF;AACF,aAAa,cAAc,eAAe,QAAQ;AAElD,MAAM,gBAAgB,IACpB,gNACA;CACE,UAAU,EACR,MAAM;EACJ,KAAK;EACL,QACE;EACF,MAAM;EACN,OACE;EACH,EACF;CACD,iBAAiB,EACf,MAAM,SACP;CACF,CACF;AAID,MAAM,eAAe,oBAGlB,EAAE,OAAO,SAAS,iBAAiB,MAAM,WAAW,UAAU,GAAG,SAAS,QAC3E,qBAAC,0BACC,oBAAC,iBAAe,EAChB,qBAAC,eAAe;CACT;CACL,WAAW,GAAG,cAAc,EAAE,MAAM,CAAC,EAAE,UAAU;CACjD,GAAI;YAEH,UACA,iBAAiB,qBAAC,eAAe;EAAM,WAAU;aAChD,oBAAC,cAAW,WAAU,YAAY,EAClC,oBAAC;GAAK,WAAU;aAAU;IAAY;GACjB,GAAG;EACH,IACb,CACd;AACF,aAAa,cAAc,eAAe,QAAQ;AAElD,MAAM,eAAe,EACnB,WACA,GAAG,YAEH,oBAAC;CACC,WAAW,GACT,oDACA,UACD;CACD,GAAI;EACJ;AAEJ,YAAY,cAAc;AAE1B,MAAM,eAAe,EACnB,WACA,GAAG,YAEH,oBAAC;CACC,WAAW,GACT,iEACA,UACD;CACD,GAAI;EACJ;AAEJ,YAAY,cAAc;AAE1B,MAAM,aAAa,oBAGhB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,eAAe;CACT;CACL,WAAW,GAAG,yCAAyC,UAAU;CACjE,GAAI;EACJ,CACF;AACF,WAAW,cAAc,eAAe,MAAM;AAE9C,MAAM,mBAAmB,oBAGtB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,eAAe;CACT;CACL,WAAW,GAAG,iCAAiC,UAAU;CACzD,GAAI;EACJ,CACF;AACF,iBAAiB,cAAc,eAAe,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.js","names":[],"sources":["../../../../src/components/ui/slider.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"slider.js","names":[],"sources":["../../../../src/components/ui/slider.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport * as SliderPrimitive from \"@radix-ui/react-slider\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Slider = forwardRefIfNeeded<\n React.ElementRef<typeof SliderPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <SliderPrimitive.Root\n ref={ref}\n className={cn(\n \"stack-scope relative flex w-full touch-none select-none items-center\",\n className\n )}\n {...props}\n >\n <SliderPrimitive.Track className=\"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20\">\n <SliderPrimitive.Range className=\"absolute h-full bg-primary\" />\n </SliderPrimitive.Track>\n <SliderPrimitive.Thumb className=\"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\" />\n </SliderPrimitive.Root>\n));\nSlider.displayName = SliderPrimitive.Root.displayName;\n\nexport { Slider };\n"],"mappings":";;;;;;;;;AAQA,MAAM,SAAS,oBAGZ,EAAE,WAAW,GAAG,SAAS,QAC1B,qBAAC,gBAAgB;CACV;CACL,WAAW,GACT,wEACA,UACD;CACD,GAAI;YAEJ,oBAAC,gBAAgB;EAAM,WAAU;YAC/B,oBAAC,gBAAgB,SAAM,WAAU,+BAA+B;GAC1C,EACxB,oBAAC,gBAAgB,SAAM,WAAU,sMAAsM;EAClN,CACvB;AACF,OAAO,cAAc,gBAAgB,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.js","names":[],"sources":["../../../../src/components/ui/spinner.tsx"],"sourcesContent":["import { ReloadIcon } from \"@radix-ui/react-icons\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"spinner.js","names":[],"sources":["../../../../src/components/ui/spinner.tsx"],"sourcesContent":["import { ReloadIcon } from \"@radix-ui/react-icons\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport React from \"react\";\nimport { cn } from \"../../lib/utils\";\n\nexport const Spinner = forwardRefIfNeeded<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<'span'> & {\n size?: number,\n }\n>(({ size = 15, ...props }, ref) => {\n return (\n <span ref={ref} {...props} className={cn(\"stack-scope\", props.className)}>\n <ReloadIcon className=\"animate-spin\" width={size} height={size} />\n </span>\n );\n});\nSpinner.displayName = \"Spinner\";\n"],"mappings":";;;;;;;AAKA,MAAa,UAAU,oBAKpB,EAAE,OAAO,IAAI,GAAG,SAAS,QAAQ;AAClC,QACE,oBAAC;EAAU;EAAK,GAAI;EAAO,WAAW,GAAG,eAAe,MAAM,UAAU;YACtE,oBAAC;GAAW,WAAU;GAAe,OAAO;GAAM,QAAQ;IAAQ;GAC7D;EAET;AACF,QAAQ,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","names":[],"sources":["../../../../src/components/ui/switch.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"switch.js","names":[],"sources":["../../../../src/components/ui/switch.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\n\nimport { cn } from \"../../lib/utils\";\nimport { runAsynchronouslyWithAlert } from \"@hexclave/shared/dist/utils/promises\";\nimport { useAsyncCallback } from \"@hexclave/shared/dist/hooks/use-async-callback\";\nimport { Spinner } from \"./spinner\";\n\ntype OriginalSwitchProps = {} & React.ComponentProps<typeof SwitchPrimitives.Root>\n\nconst OriginalSwitch = forwardRefIfNeeded<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n OriginalSwitchProps\n>(({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n \"stack-scope peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n className\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0\"\n )}\n />\n </SwitchPrimitives.Root>\n));\nOriginalSwitch.displayName = SwitchPrimitives.Root.displayName;\ntype AsyncSwitchProps = {\n onCheckedChange?: (checked: boolean) => Promise<void> | void,\n onClick?: (e: React.MouseEvent<HTMLButtonElement>) => Promise<void> | void,\n loading?: boolean,\n} & OriginalSwitchProps\n\nconst Switch = forwardRefIfNeeded<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n AsyncSwitchProps\n>(({ loading: loadingProp, onClick, onCheckedChange, ...props }, ref) => {\n const [handleClick, isLoadingClick] = useAsyncCallback(async (e: React.MouseEvent<HTMLButtonElement>) => {\n await onClick?.(e);\n }, [onClick]);\n\n const [handleCheckedChange, isLoadingCheckedChange] = useAsyncCallback(async (checked: boolean) => {\n await onCheckedChange?.(checked);\n }, [onCheckedChange]);\n\n const loading = loadingProp || isLoadingClick || isLoadingCheckedChange;\n\n return (\n <span className=\"relative leading-[0]\">\n <OriginalSwitch\n {...props}\n ref={ref}\n onClick={(e) => runAsynchronouslyWithAlert(handleClick(e))}\n onCheckedChange={(checked) => runAsynchronouslyWithAlert(handleCheckedChange(checked))}\n disabled={props.disabled || loading}\n style={{\n visibility: loading ? \"hidden\" : \"visible\",\n ...props.style,\n }}\n />\n <span className={cn(\"absolute inset-0 flex items-center justify-center\", !loading && \"hidden\")}>\n <Spinner />\n </span>\n </span>\n );\n});\nSwitch.displayName = \"Switch\";\n\nexport { Switch };\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,iBAAiB,oBAGpB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,iBAAiB;CAChB,WAAW,GACT,2YACA,UACD;CACD,GAAI;CACC;WAEL,oBAAC,iBAAiB,SAChB,WAAW,GACT,6KACD,GACD;EACoB,CACxB;AACF,eAAe,cAAc,iBAAiB,KAAK;AAOnD,MAAM,SAAS,oBAGZ,EAAE,SAAS,aAAa,SAAS,iBAAiB,GAAG,SAAS,QAAQ;CACvE,MAAM,CAAC,aAAa,kBAAkB,iBAAiB,OAAO,MAA2C;AACvG,QAAM,UAAU,EAAE;IACjB,CAAC,QAAQ,CAAC;CAEb,MAAM,CAAC,qBAAqB,0BAA0B,iBAAiB,OAAO,YAAqB;AACjG,QAAM,kBAAkB,QAAQ;IAC/B,CAAC,gBAAgB,CAAC;CAErB,MAAM,UAAU,eAAe,kBAAkB;AAEjD,QACE,qBAAC;EAAK,WAAU;aACd,oBAAC;GACC,GAAI;GACC;GACL,UAAU,MAAM,2BAA2B,YAAY,EAAE,CAAC;GAC1D,kBAAkB,YAAY,2BAA2B,oBAAoB,QAAQ,CAAC;GACtF,UAAU,MAAM,YAAY;GAC5B,OAAO;IACL,YAAY,UAAU,WAAW;IACjC,GAAG,MAAM;IACV;IACD,EACF,oBAAC;GAAK,WAAW,GAAG,qDAAqD,CAAC,WAAW,SAAS;aAC5F,oBAAC,YAAU;IACN;GACF;EAET;AACF,OAAO,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","names":[],"sources":["../../../../src/components/ui/table.tsx"],"sourcesContent":["import { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"table.js","names":[],"sources":["../../../../src/components/ui/table.tsx"],"sourcesContent":["import { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Table = forwardRefIfNeeded<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement>\n>(({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table\n ref={ref}\n className={cn(\"stack-scope w-full caption-bottom text-sm\", className)}\n {...props}\n />\n </div>\n));\nTable.displayName = \"Table\";\n\nconst TableHeader = forwardRefIfNeeded<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n));\nTableHeader.displayName = \"TableHeader\";\n\nconst TableBody = forwardRefIfNeeded<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody\n ref={ref}\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n));\nTableBody.displayName = \"TableBody\";\n\nconst TableFooter = forwardRefIfNeeded<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n \"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n));\nTableFooter.displayName = \"TableFooter\";\n\nconst TableRow = forwardRefIfNeeded<\n HTMLTableRowElement,\n React.HTMLAttributes<HTMLTableRowElement>\n>(({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n \"border-b data-[state=selected]:bg-muted\",\n props.onClick ? \"hover:bg-muted/50 cursor-pointer\" : \"\",\n className\n )}\n {...props}\n />\n));\nTableRow.displayName = \"TableRow\";\n\nconst TableHead = forwardRefIfNeeded<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n \"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n));\nTableHead.displayName = \"TableHead\";\n\nconst TableCell = forwardRefIfNeeded<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\n \"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n));\nTableCell.displayName = \"TableCell\";\n\nconst TableCaption = forwardRefIfNeeded<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption\n ref={ref}\n className={cn(\"mt-4 text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nTableCaption.displayName = \"TableCaption\";\n\nexport {\n Table, TableBody, TableCaption, TableCell, TableFooter,\n TableHead, TableHeader, TableRow\n};\n\n"],"mappings":";;;;;;AAKA,MAAM,QAAQ,oBAGX,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CAAI,WAAU;WACb,oBAAC;EACM;EACL,WAAW,GAAG,6CAA6C,UAAU;EACrE,GAAI;GACJ;EACE,CACN;AACF,MAAM,cAAc;AAEpB,MAAM,cAAc,oBAGjB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CAAW;CAAK,WAAW,GAAG,mBAAmB,UAAU;CAAE,GAAI;EAAS,CAC3E;AACF,YAAY,cAAc;AAE1B,MAAM,YAAY,oBAGf,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GAAG,8BAA8B,UAAU;CACtD,GAAI;EACJ,CACF;AACF,UAAU,cAAc;AAExB,MAAM,cAAc,oBAGjB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GACT,2DACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc;AAE1B,MAAM,WAAW,oBAGd,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GACT,2CACA,MAAM,UAAU,qCAAqC,IACrD,UACD;CACD,GAAI;EACJ,CACF;AACF,SAAS,cAAc;AAEvB,MAAM,YAAY,oBAGf,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GACT,0IACA,UACD;CACD,GAAI;EACJ,CACF;AACF,UAAU,cAAc;AAExB,MAAM,YAAY,oBAGf,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GACT,wFACA,UACD;CACD,GAAI;EACJ,CACF;AACF,UAAU,cAAc;AAExB,MAAM,eAAe,oBAGlB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GAAG,sCAAsC,UAAU;CAC9D,GAAI;EACJ,CACF;AACF,aAAa,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","names":[],"sources":["../../../../src/components/ui/tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"tabs.js","names":[],"sources":["../../../../src/components/ui/tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Tabs = TabsPrimitive.Root;\n\nconst TabsList = forwardRefIfNeeded<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"stack-scope inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground\",\n className\n )}\n {...props}\n />\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = forwardRefIfNeeded<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm\",\n className\n )}\n {...props}\n />\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = forwardRefIfNeeded<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"mappings":";;;;;;;;;AAQA,MAAM,OAAO,cAAc;AAE3B,MAAM,WAAW,oBAGd,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,cAAc;CACR;CACL,WAAW,GACT,yGACA,UACD;CACD,GAAI;EACJ,CACF;AACF,SAAS,cAAc,cAAc,KAAK;AAE1C,MAAM,cAAc,oBAGjB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,cAAc;CACR;CACL,WAAW,GACT,qYACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,cAAc,QAAQ;AAEhD,MAAM,cAAc,oBAGjB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,cAAc;CACR;CACL,WAAW,GACT,mIACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,cAAc,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","names":[],"sources":["../../../../src/components/ui/textarea.tsx"],"sourcesContent":["import { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"textarea.js","names":[],"sources":["../../../../src/components/ui/textarea.tsx"],"sourcesContent":["import { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nexport type TextareaProps = {} & React.TextareaHTMLAttributes<HTMLTextAreaElement>\n\nconst Textarea = forwardRefIfNeeded<HTMLTextAreaElement, TextareaProps>(\n ({ className, ...props }, ref) => {\n return (\n <textarea\n className={cn(\n \"stack-scope flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\nTextarea.displayName = \"Textarea\";\n\nexport { Textarea };\n"],"mappings":";;;;;;AAOA,MAAM,WAAW,oBACd,EAAE,WAAW,GAAG,SAAS,QAAQ;AAChC,QACE,oBAAC;EACC,WAAW,GACT,4QACA,UACD;EACI;EACL,GAAI;GACJ;EAGP;AACD,SAAS,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","names":[],"sources":["../../../../src/components/ui/toast.tsx"],"sourcesContent":["'use client';\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"toast.js","names":[],"sources":["../../../../src/components/ui/toast.tsx"],"sourcesContent":["'use client';\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport { Cross2Icon } from \"@radix-ui/react-icons\";\nimport * as ToastPrimitives from \"@radix-ui/react-toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst ToastProvider = ToastPrimitives.Provider;\n\nconst ToastViewport = forwardRefIfNeeded<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"stack-scope fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n )}\n {...props}\n />\n));\nToastViewport.displayName = ToastPrimitives.Viewport.displayName;\n\nconst toastVariants = cva(\n \"stack-scope group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default:\n \"border border-border bg-background text-foreground shadow-lg dark:border-gray-600 dark:bg-gray-800 dark:text-foreground\",\n destructive:\n 'destructive group border-destructive bg-destructive text-destructive-foreground',\n success:\n 'success group border-success bg-success text-success-foreground',\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst Toast = forwardRefIfNeeded<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n );\n});\nToast.displayName = ToastPrimitives.Root.displayName;\n\nconst ToastAction = forwardRefIfNeeded<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive\",\n className\n )}\n {...props}\n />\n));\nToastAction.displayName = ToastPrimitives.Action.displayName;\n\nconst ToastClose = forwardRefIfNeeded<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n 'absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100',\n 'group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',\n 'group-[.success]:text-green-300 group-[.success]:hover:text-green-50 group-[.success]:focus:ring-green-400 group-[.success]:focus:ring-offset-green-600',\n className\n )}\n toast-close=''\n {...props}\n >\n <Cross2Icon className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close.displayName;\n\nconst ToastTitle = forwardRefIfNeeded<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold [&+div]:text-xs\", className)}\n {...props}\n />\n));\nToastTitle.displayName = ToastPrimitives.Title.displayName;\n\nconst ToastDescription = forwardRefIfNeeded<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n));\nToastDescription.displayName = ToastPrimitives.Description.displayName;\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;\n\ntype ToastActionElement = React.ReactElement<typeof ToastAction>;\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n};\n"],"mappings":";;;;;;;;;;;AAUA,MAAM,gBAAgB,gBAAgB;AAEtC,MAAM,gBAAgB,oBAGnB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GACT,iJACA,UACD;CACD,GAAI;EACJ,CACF;AACF,cAAc,cAAc,gBAAgB,SAAS;AAErD,MAAM,gBAAgB,IACpB,ymBACA;CACE,UAAU,EACR,SAAS;EACP,SACE;EACF,aACE;EACF,SACE;EACH,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CACF;AAED,MAAM,QAAQ,oBAIX,EAAE,WAAW,SAAS,GAAG,SAAS,QAAQ;AAC3C,QACE,oBAAC,gBAAgB;EACV;EACL,WAAW,GAAG,cAAc,EAAE,SAAS,CAAC,EAAE,UAAU;EACpD,GAAI;GACJ;EAEJ;AACF,MAAM,cAAc,gBAAgB,KAAK;AAEzC,MAAM,cAAc,oBAGjB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GACT,2dACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,gBAAgB,OAAO;AAEjD,MAAM,aAAa,oBAGhB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GACT,yLACA,mKACA,2JACA,UACD;CACD,eAAY;CACZ,GAAI;WAEJ,oBAAC,cAAW,WAAU,YAAY;EACZ,CACxB;AACF,WAAW,cAAc,gBAAgB,MAAM;AAE/C,MAAM,aAAa,oBAGhB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GAAG,yCAAyC,UAAU;CACjE,GAAI;EACJ,CACF;AACF,WAAW,cAAc,gBAAgB,MAAM;AAE/C,MAAM,mBAAmB,oBAGtB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GAAG,sBAAsB,UAAU;CAC9C,GAAI;EACJ,CACF;AACF,iBAAiB,cAAc,gBAAgB,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.js","names":[],"sources":["../../../../src/components/ui/toggle-group.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"toggle-group.js","names":[],"sources":["../../../../src/components/ui/toggle-group.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport { VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\nimport { toggleVariants } from \"./toggle\";\n\nconst ToggleGroupContext = React.createContext<\n VariantProps<typeof toggleVariants>\n>({\n size: \"default\",\n variant: \"default\",\n});\n\nconst ToggleGroup = forwardRefIfNeeded<\n React.ElementRef<typeof ToggleGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &\n VariantProps<typeof toggleVariants>\n>(({ className, variant, size, children, ...props }, ref) => (\n <ToggleGroupPrimitive.Root\n ref={ref}\n className={cn(\"flex items-center justify-center gap-1\", className)}\n {...props}\n >\n <ToggleGroupContext.Provider value={{ variant, size }}>\n {children}\n </ToggleGroupContext.Provider>\n </ToggleGroupPrimitive.Root>\n));\n\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;\n\nconst ToggleGroupItem = forwardRefIfNeeded<\n React.ElementRef<typeof ToggleGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &\n VariantProps<typeof toggleVariants>\n>(({ className, children, variant, size, ...props }, ref) => {\n const context = React.useContext(ToggleGroupContext);\n\n return (\n <ToggleGroupPrimitive.Item\n ref={ref}\n className={cn(\n toggleVariants({\n variant: context.variant || variant,\n size: context.size || size,\n }),\n className\n )}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n );\n});\n\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;\n\nexport { ToggleGroup, ToggleGroupItem };\n"],"mappings":";;;;;;;;;;AAUA,MAAM,qBAAqB,MAAM,cAE/B;CACA,MAAM;CACN,SAAS;CACV,CAAC;AAEF,MAAM,cAAc,oBAIjB,EAAE,WAAW,SAAS,MAAM,UAAU,GAAG,SAAS,QACnD,oBAAC,qBAAqB;CACf;CACL,WAAW,GAAG,0CAA0C,UAAU;CAClE,GAAI;WAEJ,oBAAC,mBAAmB;EAAS,OAAO;GAAE;GAAS;GAAM;EAClD;GAC2B;EACJ,CAC5B;AAEF,YAAY,cAAc,qBAAqB,KAAK;AAEpD,MAAM,kBAAkB,oBAIrB,EAAE,WAAW,UAAU,SAAS,MAAM,GAAG,SAAS,QAAQ;CAC3D,MAAM,UAAU,MAAM,WAAW,mBAAmB;AAEpD,QACE,oBAAC,qBAAqB;EACf;EACL,WAAW,GACT,eAAe;GACb,SAAS,QAAQ,WAAW;GAC5B,MAAM,QAAQ,QAAQ;GACvB,CAAC,EACF,UACD;EACD,GAAI;EAEH;GACyB;EAE9B;AAEF,gBAAgB,cAAc,qBAAqB,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.js","names":[],"sources":["../../../../src/components/ui/toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@
|
|
1
|
+
{"version":3,"file":"toggle.js","names":[],"sources":["../../../../src/components/ui/toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@hexclave/shared/dist/utils/react\";\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst toggleVariants = cva(\n \"stack-scope inline-flex items-center justify-center rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline:\n \"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground\",\n },\n size: {\n default: \"h-9 px-3\",\n sm: \"h-8 px-2\",\n lg: \"h-10 px-3\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nconst Toggle = forwardRefIfNeeded<\n React.ElementRef<typeof TogglePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &\n VariantProps<typeof toggleVariants>\n>(({ className, variant, size, ...props }, ref) => (\n <TogglePrimitive.Root\n ref={ref}\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle, toggleVariants };\n"],"mappings":";;;;;;;;;;AASA,MAAM,iBAAiB,IACrB,2TACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SACE;GACH;EACD,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GACL;EACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACP;CACF,CACF;AAED,MAAM,SAAS,oBAIZ,EAAE,WAAW,SAAS,MAAM,GAAG,SAAS,QACzC,oBAAC,gBAAgB;CACV;CACL,WAAW,GAAG,eAAe;EAAE;EAAS;EAAM;EAAW,CAAC,CAAC;CAC3D,GAAI;EACJ,CACF;AAEF,OAAO,cAAc,gBAAgB,KAAK"}
|