@betterinternship/components 3.0.4 → 3.1.1

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.
Files changed (114) hide show
  1. package/README.md +45 -45
  2. package/dist/components/accordion.js.map +1 -1
  3. package/dist/components/animated-count.js.map +1 -1
  4. package/dist/components/animated-shiny-text.js +12 -0
  5. package/dist/components/animated-shiny-text.js.map +1 -0
  6. package/dist/components/app-header.js.map +1 -1
  7. package/dist/components/autocomplete.js +335 -0
  8. package/dist/components/autocomplete.js.map +1 -0
  9. package/dist/components/avatar.js.map +1 -1
  10. package/dist/components/badge.js.map +1 -1
  11. package/dist/components/banner.js.map +1 -1
  12. package/dist/components/button.js.map +1 -1
  13. package/dist/components/calendar.js.map +1 -1
  14. package/dist/components/card.js.map +1 -1
  15. package/dist/components/carousel.js +126 -0
  16. package/dist/components/carousel.js.map +1 -0
  17. package/dist/components/checkbox.js.map +1 -1
  18. package/dist/components/chip-select.js +22 -0
  19. package/dist/components/chip-select.js.map +1 -0
  20. package/dist/components/collapsible.js +45 -0
  21. package/dist/components/collapsible.js.map +1 -0
  22. package/dist/components/context-menu.js +37 -0
  23. package/dist/components/context-menu.js.map +1 -0
  24. package/dist/components/dialog.js +10 -10
  25. package/dist/components/dialog.js.map +1 -1
  26. package/dist/components/divider.js.map +1 -1
  27. package/dist/components/dot-matrix.js +163 -0
  28. package/dist/components/dot-matrix.js.map +1 -0
  29. package/dist/components/dropdown-menu.js.map +1 -1
  30. package/dist/components/dropdown.js +262 -0
  31. package/dist/components/dropdown.js.map +1 -0
  32. package/dist/components/error.js +19 -0
  33. package/dist/components/error.js.map +1 -0
  34. package/dist/components/fab.js +9 -0
  35. package/dist/components/fab.js.map +1 -0
  36. package/dist/components/file-upload.js.map +1 -1
  37. package/dist/components/filter-chip.js.map +1 -1
  38. package/dist/components/form-checkbox-group.js.map +1 -1
  39. package/dist/components/form-checkbox.js.map +1 -1
  40. package/dist/components/form-date-picker.js.map +1 -1
  41. package/dist/components/form-field.js.map +1 -1
  42. package/dist/components/form-input.js.map +1 -1
  43. package/dist/components/form-month-picker.js.map +1 -1
  44. package/dist/components/form-radio.js.map +1 -1
  45. package/dist/components/form-textarea.js.map +1 -1
  46. package/dist/components/form.js +71 -0
  47. package/dist/components/form.js.map +1 -0
  48. package/dist/components/hover-card.js +13 -0
  49. package/dist/components/hover-card.js.map +1 -0
  50. package/dist/components/input-otp.js +24 -0
  51. package/dist/components/input-otp.js.map +1 -0
  52. package/dist/components/input.js.map +1 -1
  53. package/dist/components/label.js.map +1 -1
  54. package/dist/components/loader.js.map +1 -1
  55. package/dist/components/magnetic-button.js +32 -0
  56. package/dist/components/magnetic-button.js.map +1 -0
  57. package/dist/components/messages.js +9 -0
  58. package/dist/components/messages.js.map +1 -0
  59. package/dist/components/mobile-sheet-portal.js +17 -0
  60. package/dist/components/mobile-sheet-portal.js.map +1 -0
  61. package/dist/components/page-header.d.ts +7 -1
  62. package/dist/components/page-header.js +2 -2
  63. package/dist/components/page-header.js.map +1 -1
  64. package/dist/components/paginator.js +44 -0
  65. package/dist/components/paginator.js.map +1 -0
  66. package/dist/components/popover.js.map +1 -1
  67. package/dist/components/progress.js +11 -0
  68. package/dist/components/progress.js.map +1 -0
  69. package/dist/components/radio-group.js.map +1 -1
  70. package/dist/components/select.js.map +1 -1
  71. package/dist/components/sheet.d.ts +1 -1
  72. package/dist/components/sheet.js +40 -0
  73. package/dist/components/sheet.js.map +1 -0
  74. package/dist/components/skeleton.js.map +1 -1
  75. package/dist/components/slider.js +11 -0
  76. package/dist/components/slider.js.map +1 -0
  77. package/dist/components/sonner-toast.js +78 -0
  78. package/dist/components/sonner-toast.js.map +1 -0
  79. package/dist/components/stepper.js.map +1 -1
  80. package/dist/components/switch.js.map +1 -1
  81. package/dist/components/table.js.map +1 -1
  82. package/dist/components/tabs.js.map +1 -1
  83. package/dist/components/textarea.js.map +1 -1
  84. package/dist/components/time-input-native.js.map +1 -1
  85. package/dist/components/timeline.js +16 -0
  86. package/dist/components/timeline.js.map +1 -0
  87. package/dist/components/toggle.js +15 -0
  88. package/dist/components/toggle.js.map +1 -0
  89. package/dist/components/tooltip.js.map +1 -1
  90. package/dist/hooks/use-detect-click-outside.js +29 -0
  91. package/dist/hooks/use-detect-click-outside.js.map +1 -0
  92. package/dist/hooks/use-field-focus.js.map +1 -1
  93. package/dist/hooks/use-mobile-sheet-viewport.js.map +1 -1
  94. package/dist/hooks/use-mobile.js.map +1 -1
  95. package/dist/hooks/use-resource-table.js.map +1 -1
  96. package/dist/hooks/useMQJob.js.map +1 -1
  97. package/dist/index.d.ts +34 -3
  98. package/dist/index.js +30 -0
  99. package/dist/index.js.map +1 -1
  100. package/dist/lib/interaction-styles.js.map +1 -1
  101. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1670 -0
  102. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js.map +1 -0
  103. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +38 -0
  104. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js.map +1 -0
  105. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +39 -0
  106. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js.map +1 -0
  107. package/dist/node_modules/input-otp/dist/index.js +25 -0
  108. package/dist/node_modules/input-otp/dist/index.js.map +1 -0
  109. package/dist/node_modules/react-hook-form/dist/index.esm.js +706 -0
  110. package/dist/node_modules/react-hook-form/dist/index.esm.js.map +1 -0
  111. package/dist/utils.js.map +1 -1
  112. package/package.json +326 -291
  113. package/theme.css +360 -355
  114. package/theme.legacy.css +84 -84
@@ -1 +1 @@
1
- {"version":3,"file":"form-textarea.js","sources":["../../src/components/form-textarea.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\n\r\nimport { cn } from '@/utils';\r\nimport { Textarea } from '@/components/textarea';\r\nimport { FormField } from './form-field';\r\n\r\nexport interface FormTextareaProps extends React.InputHTMLAttributes<HTMLTextAreaElement> {\r\n label?: string;\r\n setter?: (value: string) => void;\r\n required?: boolean;\r\n className?: string;\r\n tooltip?: string;\r\n tooltipId?: string;\r\n labelAddon?: React.ReactNode;\r\n}\r\n\r\nexport const FormTextarea = ({\r\n label,\r\n value,\r\n setter,\r\n required = true,\r\n className,\r\n tooltip,\r\n tooltipId,\r\n labelAddon,\r\n ...props\r\n}: FormTextareaProps) => {\r\n return (\r\n <FormField\r\n label={label}\r\n required={required}\r\n tooltip={tooltip}\r\n tooltipId={tooltipId}\r\n labelAddon={labelAddon}\r\n >\r\n <Textarea\r\n value={value ?? ''}\r\n onChange={(e) => setter && setter(e.target.value)}\r\n className={cn(className)}\r\n {...props}\r\n />\r\n </FormField>\r\n );\r\n};\r\n"],"names":[],"mappings":";;;;;;AAkBO;AAWL;AAgBF;;"}
1
+ {"version":3,"file":"form-textarea.js","sources":["../../src/components/form-textarea.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '@/utils';\nimport { Textarea } from '@/components/textarea';\nimport { FormField } from './form-field';\n\nexport interface FormTextareaProps extends React.InputHTMLAttributes<HTMLTextAreaElement> {\n label?: string;\n setter?: (value: string) => void;\n required?: boolean;\n className?: string;\n tooltip?: string;\n tooltipId?: string;\n labelAddon?: React.ReactNode;\n}\n\nexport const FormTextarea = ({\n label,\n value,\n setter,\n required = true,\n className,\n tooltip,\n tooltipId,\n labelAddon,\n ...props\n}: FormTextareaProps) => {\n return (\n <FormField\n label={label}\n required={required}\n tooltip={tooltip}\n tooltipId={tooltipId}\n labelAddon={labelAddon}\n >\n <Textarea\n value={value ?? ''}\n onChange={(e) => setter && setter(e.target.value)}\n className={cn(className)}\n {...props}\n />\n </FormField>\n );\n};\n"],"names":[],"mappings":";;;;;;AAkBO;AAWL;AAgBF;;"}
@@ -0,0 +1,71 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import * as React from 'react';
4
+ import { Slot } from '@radix-ui/react-slot';
5
+ import { useFormContext, FormProvider, Controller } from '../node_modules/react-hook-form/dist/index.esm.js';
6
+ import { cn } from '../utils.js';
7
+ import { Label } from './label.js';
8
+
9
+ const Form = FormProvider;
10
+ const FormFieldContext = React.createContext({});
11
+ const FormField = ({ ...props }) => {
12
+ return (jsx(FormFieldContext.Provider, { value: { name: props.name }, children: jsx(Controller, { ...props }) }));
13
+ };
14
+ const useFormField = () => {
15
+ const fieldContext = React.useContext(FormFieldContext);
16
+ const itemContext = React.useContext(FormItemContext);
17
+ const { getFieldState, formState } = useFormContext();
18
+ const fieldState = getFieldState(fieldContext.name, formState);
19
+ if (!fieldContext) {
20
+ throw new Error("useFormField should be used within <FormField>");
21
+ }
22
+ const { id } = itemContext;
23
+ return {
24
+ id,
25
+ name: fieldContext.name,
26
+ formItemId: `${id}-form-item`,
27
+ formDescriptionId: `${id}-form-item-description`,
28
+ formMessageId: `${id}-form-item-message`,
29
+ ...fieldState,
30
+ };
31
+ };
32
+ const FormItemContext = React.createContext({});
33
+ const FormItem = React.forwardRef(({ className, ...props }, ref) => {
34
+ const id = React.useId();
35
+ return (jsx(FormItemContext.Provider, { value: { id }, children: jsx("div", { ref: ref, className: cn("space-y-field-label-gap", className), ...props }) }));
36
+ });
37
+ FormItem.displayName = "FormItem";
38
+ const FormLabel = React.forwardRef(({ className, required = false, children, ...props }, ref) => {
39
+ const { error, formItemId } = useFormField();
40
+ return (jsx(Label, { label: children, required: required, className: "mb-0", labelProps: {
41
+ ref,
42
+ htmlFor: formItemId,
43
+ ...props,
44
+ className: cn(error && 'text-destructive', className),
45
+ } }));
46
+ });
47
+ FormLabel.displayName = "FormLabel";
48
+ const FormControl = React.forwardRef(({ ...props }, ref) => {
49
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
50
+ return (jsx(Slot, { ref: ref, id: formItemId, "aria-describedby": !error
51
+ ? `${formDescriptionId}`
52
+ : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error, ...props }));
53
+ });
54
+ FormControl.displayName = "FormControl";
55
+ const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
56
+ const { formDescriptionId } = useFormField();
57
+ return (jsx("p", { ref: ref, id: formDescriptionId, className: cn("text-sm leading-normal text-muted-foreground", className), ...props }));
58
+ });
59
+ FormDescription.displayName = "FormDescription";
60
+ const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
61
+ const { error, formMessageId } = useFormField();
62
+ const body = error ? String(error?.message) : children;
63
+ if (!body) {
64
+ return null;
65
+ }
66
+ return (jsx("p", { ref: ref, id: formMessageId, className: cn("text-sm leading-normal font-medium text-destructive", className), ...props, children: body }));
67
+ });
68
+ FormMessage.displayName = "FormMessage";
69
+
70
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
71
+ //# sourceMappingURL=form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.js","sources":["../../src/components/form.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n Controller,\n ControllerProps,\n FieldPath,\n FieldValues,\n FormProvider,\n useFormContext,\n} from \"react-hook-form\";\n\nimport { cn } from \"@/utils\";\nimport { Label } 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>(\n {} as FormFieldContextValue,\n);\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 const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within <FormField>\");\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-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 = React.forwardRef<\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-field-label-gap\", className)} {...props} />\n </FormItemContext.Provider>\n );\n});\nFormItem.displayName = \"FormItem\";\n\nconst FormLabel = React.forwardRef<\n HTMLLabelElement,\n React.ComponentPropsWithoutRef<'label'> & { required?: boolean }\n>(({ className, required = false, children, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n label={children}\n required={required}\n className=\"mb-0\"\n labelProps={{\n ref,\n htmlFor: formItemId,\n ...props,\n className: cn(error && 'text-destructive', className),\n }}\n />\n );\n});\nFormLabel.displayName = \"FormLabel\";\n\nconst FormControl = React.forwardRef<\n React.ElementRef<typeof Slot>,\n React.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } =\n 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 = React.forwardRef<\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-sm leading-normal text-muted-foreground\", className)}\n {...props}\n />\n );\n});\nFormDescription.displayName = \"FormDescription\";\n\nconst FormMessage = React.forwardRef<\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-sm leading-normal font-medium text-destructive\", className)}\n {...props}\n >\n {body}\n </p>\n );\n});\nFormMessage.displayName = \"FormMessage\";\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n};\n"],"names":[],"mappings":";;;;;;;;AAgBA;AASA;AAIA;;AAWA;AAEA;;;;;;AAQI;;AAGF;;;;;;;AAQE;;AAEJ;AAMA;AAIA;AAIE;AAEA;AAKF;AACA;AAEA;;AAME;;AAOM;AACA;;AAED;AAGP;AACA;AAEA;AAIE;AAGA;;AAOQ;AAMV;AACA;AAEA;AAIE;;AAUF;AACA;AAEA;;AAKE;;AAGE;;;AAaJ;AACA;;"}
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import * as React from 'react';
4
+ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
5
+ import { cn } from '../utils.js';
6
+
7
+ const HoverCard = HoverCardPrimitive.Root;
8
+ const HoverCardTrigger = HoverCardPrimitive.Trigger;
9
+ const HoverCardContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (jsx(HoverCardPrimitive.Portal, { children: jsx(HoverCardPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 w-64 max-w-[calc(100vw-2rem)] rounded-card border border-border bg-popover p-4 text-sm text-popover-foreground shadow-card outline-none data-[state=open]:animate-in motion-reduce:animate-none 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", className), ...props }) })));
10
+ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
11
+
12
+ export { HoverCard, HoverCardContent, HoverCardTrigger };
13
+ //# sourceMappingURL=hover-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hover-card.js","sources":["../../src/components/hover-card.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\";\n\nimport { cn } from \"@/utils\";\n\nconst HoverCard = HoverCardPrimitive.Root;\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\nconst HoverCardContent = React.forwardRef<\n React.ElementRef<typeof HoverCardPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-64 max-w-[calc(100vw-2rem)] rounded-card border border-border bg-popover p-4 text-sm text-popover-foreground shadow-card outline-none data-[state=open]:animate-in motion-reduce:animate-none 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 </HoverCardPrimitive.Portal>\n));\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent };\n"],"names":[],"mappings":";;;;;;AAOA;AAEA;AAEA;AAiBA;;"}
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import * as React from 'react';
4
+ import { OTPInput as $t, OTPInputContext as Nt } from '../node_modules/input-otp/dist/index.js';
5
+ import { Dot } from 'lucide-react';
6
+ import { cn } from '../utils.js';
7
+
8
+ const InputOTPSizeContext = React.createContext('md');
9
+ const InputOTP = React.forwardRef(({ className, containerClassName, ...props }, ref) => (jsx($t, { ref: ref, containerClassName: cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName), className: cn("disabled:cursor-not-allowed", className), ...props })));
10
+ InputOTP.displayName = "InputOTP";
11
+ const InputOTPGroup = React.forwardRef(({ className, size = 'md', ...props }, ref) => (jsx(InputOTPSizeContext.Provider, { value: size, children: jsx("div", { ref: ref, className: cn("flex items-center", className), ...props }) })));
12
+ InputOTPGroup.displayName = "InputOTPGroup";
13
+ const InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
14
+ const inputOTPContext = React.useContext(Nt);
15
+ const size = React.useContext(InputOTPSizeContext);
16
+ const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
17
+ return (jsxs("div", { ref: ref, className: cn("relative flex shrink-0 items-center justify-center border-y border-r border-input bg-background text-foreground transition-colors duration-interactive ease-out-strong motion-reduce:transition-none first:rounded-l-control-lg first:border-l last:rounded-r-control-lg", isActive && "z-10 bg-muted", size === 'md' && 'h-form-control min-h-form-control max-h-form-control w-form-control text-base', size === 'lg' && 'h-16 min-h-16 max-h-16 w-16 text-2xl', size === 'xl' && 'h-20 min-h-20 max-h-20 w-20 text-3xl', className), ...props, children: [char, hasFakeCaret && (jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }))] }));
18
+ });
19
+ InputOTPSlot.displayName = "InputOTPSlot";
20
+ const InputOTPSeparator = React.forwardRef(({ ...props }, ref) => (jsx("div", { ref: ref, role: "separator", ...props, children: jsx(Dot, {}) })));
21
+ InputOTPSeparator.displayName = "InputOTPSeparator";
22
+
23
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
24
+ //# sourceMappingURL=input-otp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-otp.js","sources":["../../src/components/input-otp.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { Dot } from \"lucide-react\";\n\nimport { cn } from \"@/utils\";\n\nexport type InputOTPSize = 'md' | 'lg' | 'xl';\n\nconst InputOTPSizeContext = React.createContext<InputOTPSize>('md');\n\nconst InputOTP = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n \"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 = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\"> & { size?: InputOTPSize }\n>(({ className, size = 'md', ...props }, ref) => (\n <InputOTPSizeContext.Provider value={size}>\n <div ref={ref} className={cn(\"flex items-center\", className)} {...props} />\n </InputOTPSizeContext.Provider>\n));\nInputOTPGroup.displayName = \"InputOTPGroup\";\n\nconst InputOTPSlot = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const size = React.useContext(InputOTPSizeContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n \"relative flex shrink-0 items-center justify-center border-y border-r border-input bg-background text-foreground transition-colors duration-interactive ease-out-strong motion-reduce:transition-none first:rounded-l-control-lg first:border-l last:rounded-r-control-lg\",\n isActive && \"z-10 bg-muted\",\n size === 'md' && 'h-form-control min-h-form-control max-h-form-control w-form-control text-base',\n size === 'lg' && 'h-16 min-h-16 max-h-16 w-16 text-2xl',\n size === 'xl' && 'h-20 min-h-20 max-h-20 w-20 text-3xl',\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 = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n));\nInputOTPSeparator.displayName = \"InputOTPSeparator\";\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"],"names":[],"mappings":";;;;;;;AAUA;AAEA;AAcA;AAEA;AAQA;AAEA;;;AAME;;AAuBF;AACA;AAEA;AAQA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sources":["../../src/components/input.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\nimport { Eye, EyeOff } from 'lucide-react';\r\n\r\nimport { cn } from '@/utils';\r\nimport {\r\n chain,\r\n fieldFocusOutlineClassName,\r\n fieldInteractionClassName,\r\n useFieldChromeOwned,\r\n useFieldFocus,\r\n} from '@/hooks/use-field-focus';\r\n\r\nconst fieldClassName =\r\n 'bg-background pointer-events-auto relative z-10 box-border flex h-form-control min-h-form-control max-h-form-control w-full rounded-control-lg border border-input hover:border-input-hover px-[0.75em] py-0 text-base text-foreground ring-0';\r\nconst fieldDetailsClassName =\r\n 'file:text-foreground placeholder:text-muted-foreground/40 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50';\r\n\r\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(\r\n ({ className, type, disabled, onPointerDown, onFocus, onBlur, ...props }, ref) => {\r\n const [passwordVisible, setPasswordVisible] = React.useState(false);\r\n const chromeOwned = useFieldChromeOwned();\r\n const { keyboardFocus, focusProps } = useFieldFocus();\r\n const handlers = {\r\n onPointerDown: chain(onPointerDown, focusProps.onPointerDown),\r\n onFocus: chain(onFocus, focusProps.onFocus),\r\n onBlur: chain(onBlur, focusProps.onBlur),\r\n };\r\n const chrome = !chromeOwned && !disabled && cn(\r\n fieldInteractionClassName,\r\n keyboardFocus && fieldFocusOutlineClassName,\r\n );\r\n\r\n if (type === 'password') {\r\n const Icon = passwordVisible ? EyeOff : Eye;\r\n\r\n return (\r\n // The wrapper carries the lift and outline so the toggle moves with the field.\r\n <div className={cn('relative', chrome)}>\r\n <input\r\n type={passwordVisible ? 'text' : 'password'}\r\n className={cn(fieldClassName, 'pr-10', fieldDetailsClassName, className)}\r\n ref={ref}\r\n disabled={disabled}\r\n {...handlers}\r\n {...props}\r\n />\r\n <button\r\n type=\"button\"\r\n className=\"text-muted-foreground hover:text-foreground absolute inset-y-0 right-0 z-20 flex w-10 items-center justify-center disabled:cursor-not-allowed disabled:opacity-50\"\r\n onClick={() => setPasswordVisible((current) => !current)}\r\n disabled={disabled}\r\n aria-label={passwordVisible ? 'Hide password' : 'Show password'}\r\n aria-pressed={passwordVisible}\r\n >\r\n <Icon className=\"h-4 w-4\" aria-hidden=\"true\" />\r\n </button>\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <input\r\n type={type}\r\n className={cn(fieldClassName, fieldDetailsClassName, chrome, className)}\r\n ref={ref}\r\n disabled={disabled}\r\n {...handlers}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\nInput.displayName = 'Input';\r\n\r\nexport { Input };\r\n"],"names":[],"mappings":";;;;;;;AAcA;AAEA;AAGA;AAEI;AACA;;AAEA;;;;;AAKA;AAKA;;;;;;AA4BA;AAUF;AAEF;;"}
1
+ {"version":3,"file":"input.js","sources":["../../src/components/input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Eye, EyeOff } from 'lucide-react';\n\nimport { cn } from '@/utils';\nimport {\n chain,\n fieldFocusOutlineClassName,\n fieldInteractionClassName,\n useFieldChromeOwned,\n useFieldFocus,\n} from '@/hooks/use-field-focus';\n\nconst fieldClassName =\n 'bg-background pointer-events-auto relative z-10 box-border flex h-form-control min-h-form-control max-h-form-control w-full rounded-control-lg border border-input hover:border-input-hover px-[0.75em] py-0 text-base text-foreground ring-0';\nconst fieldDetailsClassName =\n 'file:text-foreground placeholder:text-muted-foreground/40 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50';\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(\n ({ className, type, disabled, onPointerDown, onFocus, onBlur, ...props }, ref) => {\n const [passwordVisible, setPasswordVisible] = React.useState(false);\n const chromeOwned = useFieldChromeOwned();\n const { keyboardFocus, focusProps } = useFieldFocus();\n const handlers = {\n onPointerDown: chain(onPointerDown, focusProps.onPointerDown),\n onFocus: chain(onFocus, focusProps.onFocus),\n onBlur: chain(onBlur, focusProps.onBlur),\n };\n const chrome = !chromeOwned && !disabled && cn(\n fieldInteractionClassName,\n keyboardFocus && fieldFocusOutlineClassName,\n );\n\n if (type === 'password') {\n const Icon = passwordVisible ? EyeOff : Eye;\n\n return (\n // The wrapper carries the lift and outline so the toggle moves with the field.\n <div className={cn('relative', chrome)}>\n <input\n type={passwordVisible ? 'text' : 'password'}\n className={cn(fieldClassName, 'pr-10', fieldDetailsClassName, className)}\n ref={ref}\n disabled={disabled}\n {...handlers}\n {...props}\n />\n <button\n type=\"button\"\n className=\"text-muted-foreground hover:text-foreground absolute inset-y-0 right-0 z-20 flex w-10 items-center justify-center disabled:cursor-not-allowed disabled:opacity-50\"\n onClick={() => setPasswordVisible((current) => !current)}\n disabled={disabled}\n aria-label={passwordVisible ? 'Hide password' : 'Show password'}\n aria-pressed={passwordVisible}\n >\n <Icon className=\"h-4 w-4\" aria-hidden=\"true\" />\n </button>\n </div>\n );\n }\n\n return (\n <input\n type={type}\n className={cn(fieldClassName, fieldDetailsClassName, chrome, className)}\n ref={ref}\n disabled={disabled}\n {...handlers}\n {...props}\n />\n );\n },\n);\nInput.displayName = 'Input';\n\nexport { Input };\n"],"names":[],"mappings":";;;;;;;AAcA;AAEA;AAGA;AAEI;AACA;;AAEA;;;;;AAKA;AAKA;;;;;;AA4BA;AAUF;AAEF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"label.js","sources":["../../src/components/label.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport { MessageCircleQuestion } from 'lucide-react';\r\n\r\nimport { cn } from '@/utils';\r\nimport {\r\n Tooltip,\r\n TooltipContent,\r\n TooltipTrigger,\r\n} from '@/components/tooltip';\r\n\r\nexport interface LabelProps {\r\n label: React.ReactNode;\r\n required?: boolean;\r\n tooltip?: string;\r\n /** Kept so existing callers still type-check; the Radix tooltip needs no id. */\r\n tooltipId?: string;\r\n labelAddon?: React.ReactNode;\r\n labelProps?: React.ComponentPropsWithRef<'label'>;\r\n className?: string;\r\n}\r\n\r\n/** Shared label typography with native label association and ref support. */\r\nexport const FieldLabel = React.forwardRef<HTMLLabelElement, React.ComponentPropsWithoutRef<'label'>>(\r\n ({ className, ...props }, ref) => (\r\n <label\r\n ref={ref}\r\n className={cn('text-field-label font-field-label text-[color:var(--color-field-label)]', className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\nFieldLabel.displayName = 'FieldLabel';\r\n\r\n/** The label row shared by every form field: label, help tooltip, addon. */\r\nexport function Label({\r\n label,\r\n required,\r\n tooltip,\r\n labelAddon,\r\n labelProps,\r\n className,\r\n}: LabelProps) {\r\n const hasTooltip = !!tooltip?.trim();\r\n\r\n return (\r\n <div className={cn('mb-field-label-gap flex w-full justify-between gap-2 md:items-center', className)}>\r\n <div className=\"flex gap-2 md:items-center\">\r\n <FieldLabel {...labelProps}>\r\n {label} {required && <span className=\"text-destructive\">*</span>}\r\n </FieldLabel>\r\n {hasTooltip ? (\r\n <Tooltip>\r\n <TooltipTrigger asChild>\r\n <button\r\n type=\"button\"\r\n aria-label=\"More information\"\r\n className=\"hover:cursor-help\"\r\n >\r\n <MessageCircleQuestion className=\"text-primary h-3.5 w-3.5\" />\r\n </button>\r\n </TooltipTrigger>\r\n <TooltipContent side=\"bottom\" className=\"z-[1400] max-w-[80vw]\">\r\n {tooltip}\r\n </TooltipContent>\r\n </Tooltip>\r\n ) : (\r\n // Reserves the icon's space so labels line up with or without help.\r\n <div aria-hidden=\"true\">\r\n <MessageCircleQuestion className={cn('invisible h-3.5 w-3.5')} />\r\n </div>\r\n )}\r\n </div>\r\n {labelAddon && <div>{labelAddon}</div>}\r\n </div>\r\n );\r\n}\r\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;AAqBA;AACO,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC3BA,eACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,yEAAyE,EAAE,SAAS,CAAC,EAAA,GAC/F,KAAK,EAAA,CACT,CACH;AAEH,UAAU,CAAC,WAAW,GAAG,YAAY;AAErC;AACM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,QAAQ,EACR,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,GACE,EAAA;IACX,MAAM,UAAU,GAAG,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE;AAEpC,IAAA,QACEC,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,sEAAsE,EAAE,SAAS,CAAC,aACnGA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,4BAA4B,EAAA,QAAA,EAAA,CACzCA,KAAC,UAAU,EAAA,EAAA,GAAK,UAAU,EAAA,QAAA,EAAA,CACvB,KAAK,EAAA,GAAA,EAAG,QAAQ,IAAID,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,kBAAkB,EAAA,QAAA,EAAA,GAAA,EAAA,CAAS,CAAA,EAAA,CACrD,EACZ,UAAU,IACTC,IAAA,CAAC,OAAO,EAAA,EAAA,QAAA,EAAA,CACND,GAAA,CAAC,cAAc,EAAA,EAAC,OAAO,EAAA,IAAA,EAAA,QAAA,EACrBA,GAAA,CAAA,QAAA,EAAA,EACE,IAAI,EAAC,QAAQ,gBACF,kBAAkB,EAC7B,SAAS,EAAC,mBAAmB,EAAA,QAAA,EAE7BA,GAAA,CAAC,qBAAqB,EAAA,EAAC,SAAS,EAAC,0BAA0B,EAAA,CAAG,EAAA,CACvD,EAAA,CACM,EACjBA,GAAA,CAAC,cAAc,IAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,uBAAuB,YAC5D,OAAO,EAAA,CACO,IACT;;oBAGVA,GAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EAAiB,MAAM,YACrBA,GAAA,CAAC,qBAAqB,IAAC,SAAS,EAAE,EAAE,CAAC,uBAAuB,CAAC,GAAI,EAAA,CAC7D,CACP,CAAA,EAAA,CACG,EACL,UAAU,IAAIA,uBAAM,UAAU,EAAA,CAAO,CAAA,EAAA,CAClC;AAEV;;;;"}
1
+ {"version":3,"file":"label.js","sources":["../../src/components/label.tsx"],"sourcesContent":["import * as React from 'react';\nimport { MessageCircleQuestion } from 'lucide-react';\n\nimport { cn } from '@/utils';\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from '@/components/tooltip';\n\nexport interface LabelProps {\n label: React.ReactNode;\n required?: boolean;\n tooltip?: string;\n /** Kept so existing callers still type-check; the Radix tooltip needs no id. */\n tooltipId?: string;\n labelAddon?: React.ReactNode;\n labelProps?: React.ComponentPropsWithRef<'label'>;\n className?: string;\n}\n\n/** Shared label typography with native label association and ref support. */\nexport const FieldLabel = React.forwardRef<HTMLLabelElement, React.ComponentPropsWithoutRef<'label'>>(\n ({ className, ...props }, ref) => (\n <label\n ref={ref}\n className={cn('text-field-label font-field-label text-[color:var(--color-field-label)]', className)}\n {...props}\n />\n ),\n);\nFieldLabel.displayName = 'FieldLabel';\n\n/** The label row shared by every form field: label, help tooltip, addon. */\nexport function Label({\n label,\n required,\n tooltip,\n labelAddon,\n labelProps,\n className,\n}: LabelProps) {\n const hasTooltip = !!tooltip?.trim();\n\n return (\n <div className={cn('mb-field-label-gap flex w-full justify-between gap-2 md:items-center', className)}>\n <div className=\"flex gap-2 md:items-center\">\n <FieldLabel {...labelProps}>\n {label} {required && <span className=\"text-destructive\">*</span>}\n </FieldLabel>\n {hasTooltip ? (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n aria-label=\"More information\"\n className=\"hover:cursor-help\"\n >\n <MessageCircleQuestion className=\"text-primary h-3.5 w-3.5\" />\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\" className=\"z-[1400] max-w-[80vw]\">\n {tooltip}\n </TooltipContent>\n </Tooltip>\n ) : (\n // Reserves the icon's space so labels line up with or without help.\n <div aria-hidden=\"true\">\n <MessageCircleQuestion className={cn('invisible h-3.5 w-3.5')} />\n </div>\n )}\n </div>\n {labelAddon && <div>{labelAddon}</div>}\n </div>\n );\n}\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;AAqBA;AACO,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC3BA,eACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,yEAAyE,EAAE,SAAS,CAAC,EAAA,GAC/F,KAAK,EAAA,CACT,CACH;AAEH,UAAU,CAAC,WAAW,GAAG,YAAY;AAErC;AACM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,QAAQ,EACR,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,GACE,EAAA;IACX,MAAM,UAAU,GAAG,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE;AAEpC,IAAA,QACEC,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,sEAAsE,EAAE,SAAS,CAAC,aACnGA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,4BAA4B,EAAA,QAAA,EAAA,CACzCA,KAAC,UAAU,EAAA,EAAA,GAAK,UAAU,EAAA,QAAA,EAAA,CACvB,KAAK,EAAA,GAAA,EAAG,QAAQ,IAAID,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,kBAAkB,EAAA,QAAA,EAAA,GAAA,EAAA,CAAS,CAAA,EAAA,CACrD,EACZ,UAAU,IACTC,IAAA,CAAC,OAAO,EAAA,EAAA,QAAA,EAAA,CACND,GAAA,CAAC,cAAc,EAAA,EAAC,OAAO,EAAA,IAAA,EAAA,QAAA,EACrBA,GAAA,CAAA,QAAA,EAAA,EACE,IAAI,EAAC,QAAQ,gBACF,kBAAkB,EAC7B,SAAS,EAAC,mBAAmB,EAAA,QAAA,EAE7BA,GAAA,CAAC,qBAAqB,EAAA,EAAC,SAAS,EAAC,0BAA0B,EAAA,CAAG,EAAA,CACvD,EAAA,CACM,EACjBA,GAAA,CAAC,cAAc,IAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,uBAAuB,YAC5D,OAAO,EAAA,CACO,IACT;;oBAGVA,GAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EAAiB,MAAM,YACrBA,GAAA,CAAC,qBAAqB,IAAC,SAAS,EAAE,EAAE,CAAC,uBAAuB,CAAC,GAAI,EAAA,CAC7D,CACP,CAAA,EAAA,CACG,EACL,UAAU,IAAIA,uBAAM,UAAU,EAAA,CAAO,CAAA,EAAA,CAClC;AAEV;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"loader.js","sources":["../../src/components/loader.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\r\nimport { cn } from '@/utils';\r\n\r\nconst sizes = { sm: 'size-4', md: 'size-6', lg: 'size-10' } as const;\r\n\r\nexport type SpinnerProps = Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {\r\n size?: keyof typeof sizes;\r\n label?: string;\r\n decorative?: boolean;\r\n};\r\n\r\nexport function Spinner({ size = 'sm', label = 'Loading', decorative = false, className, ...props }: SpinnerProps) {\r\n return <span {...props} role={decorative ? undefined : 'status'} aria-hidden={decorative || undefined} className={cn('inline-flex shrink-0 items-center justify-center text-current', className)}>\r\n <span aria-hidden=\"true\" className={cn('block shrink-0 rounded-full border-2 border-current border-r-transparent motion-safe:animate-spin', sizes[size])} />\r\n {!decorative && <span className=\"sr-only\">{label}</span>}\r\n </span>;\r\n}\r\n\r\nexport type LoaderProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {\r\n children?: ReactNode;\r\n label?: string;\r\n size?: SpinnerProps['size'];\r\n};\r\n\r\n/** Centered loading content; the parent owns height and padding. */\r\nexport function Loader({ children, label = 'Loading', size = 'lg', className, ...props }: LoaderProps) {\r\n return <div {...props} role=\"status\" className={cn('flex w-full flex-col items-center justify-center gap-4 text-center text-primary', className)}>\r\n <Spinner size={size} decorative />\r\n {children ? <div className=\"text-sm text-muted-foreground\">{children}</div> : <span className=\"sr-only\">{label}</span>}\r\n </div>;\r\n}\r\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAGA,MAAM,KAAK,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAW;AAQ9D,SAAU,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,KAAK,GAAG,SAAS,EAAE,UAAU,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAgB,EAAA;IAC/G,OAAOA,IAAA,CAAA,MAAA,EAAA,EAAA,GAAU,KAAK,EAAE,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,EAAA,aAAA,EAAe,UAAU,IAAI,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,+DAA+D,EAAE,SAAS,CAAC,aAC9LC,GAAA,CAAA,MAAA,EAAA,EAAA,aAAA,EAAkB,MAAM,EAAC,SAAS,EAAE,EAAE,CAAC,mGAAmG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,GAAI,EAC3J,CAAC,UAAU,IAAIA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,SAAS,EAAA,QAAA,EAAE,KAAK,EAAA,CAAQ,CAAA,EAAA,CACnD;AACT;AAQA;SACgB,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,SAAS,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAe,EAAA;IACnG,OAAOD,IAAA,CAAA,KAAA,EAAA,EAAA,GAAS,KAAK,EAAE,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,EAAE,CAAC,iFAAiF,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,CAC9IC,GAAA,CAAC,OAAO,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,SAAG,EACjC,QAAQ,GAAGA,aAAK,SAAS,EAAC,+BAA+B,EAAA,QAAA,EAAE,QAAQ,EAAA,CAAO,GAAGA,cAAM,SAAS,EAAC,SAAS,EAAA,QAAA,EAAE,KAAK,EAAA,CAAQ,CAAA,EAAA,CAClH;AACR;;;;"}
1
+ {"version":3,"file":"loader.js","sources":["../../src/components/loader.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\nimport { cn } from '@/utils';\n\nconst sizes = { sm: 'size-4', md: 'size-6', lg: 'size-10' } as const;\n\nexport type SpinnerProps = Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {\n size?: keyof typeof sizes;\n label?: string;\n decorative?: boolean;\n};\n\nexport function Spinner({ size = 'sm', label = 'Loading', decorative = false, className, ...props }: SpinnerProps) {\n return <span {...props} role={decorative ? undefined : 'status'} aria-hidden={decorative || undefined} className={cn('inline-flex shrink-0 items-center justify-center text-current', className)}>\n <span aria-hidden=\"true\" className={cn('block shrink-0 rounded-full border-2 border-current border-r-transparent motion-safe:animate-spin', sizes[size])} />\n {!decorative && <span className=\"sr-only\">{label}</span>}\n </span>;\n}\n\nexport type LoaderProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {\n children?: ReactNode;\n label?: string;\n size?: SpinnerProps['size'];\n};\n\n/** Centered loading content; the parent owns height and padding. */\nexport function Loader({ children, label = 'Loading', size = 'lg', className, ...props }: LoaderProps) {\n return <div {...props} role=\"status\" className={cn('flex w-full flex-col items-center justify-center gap-4 text-center text-primary', className)}>\n <Spinner size={size} decorative />\n {children ? <div className=\"text-sm text-muted-foreground\">{children}</div> : <span className=\"sr-only\">{label}</span>}\n </div>;\n}\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAGA,MAAM,KAAK,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAW;AAQ9D,SAAU,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,KAAK,GAAG,SAAS,EAAE,UAAU,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAgB,EAAA;IAC/G,OAAOA,IAAA,CAAA,MAAA,EAAA,EAAA,GAAU,KAAK,EAAE,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,EAAA,aAAA,EAAe,UAAU,IAAI,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,+DAA+D,EAAE,SAAS,CAAC,aAC9LC,GAAA,CAAA,MAAA,EAAA,EAAA,aAAA,EAAkB,MAAM,EAAC,SAAS,EAAE,EAAE,CAAC,mGAAmG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,GAAI,EAC3J,CAAC,UAAU,IAAIA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,SAAS,EAAA,QAAA,EAAE,KAAK,EAAA,CAAQ,CAAA,EAAA,CACnD;AACT;AAQA;SACgB,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,SAAS,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAe,EAAA;IACnG,OAAOD,IAAA,CAAA,KAAA,EAAA,EAAA,GAAS,KAAK,EAAE,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,EAAE,CAAC,iFAAiF,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,CAC9IC,GAAA,CAAC,OAAO,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,SAAG,EACjC,QAAQ,GAAGA,aAAK,SAAS,EAAC,+BAA+B,EAAA,QAAA,EAAE,QAAQ,EAAA,CAAO,GAAGA,cAAM,SAAS,EAAC,SAAS,EAAA,QAAA,EAAE,KAAK,EAAA,CAAQ,CAAA,EAAA,CAClH;AACR;;;;"}
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { useReducedMotion, motion } from 'framer-motion';
4
+ import { useRef, useState } from 'react';
5
+
6
+ function MagneticButton({ children, className = "", asChild = false, }) {
7
+ const prefersReduce = useReducedMotion();
8
+ const ref = useRef(null);
9
+ const [tx, setTx] = useState(0);
10
+ const [ty, setTy] = useState(0);
11
+ const max = 6; // px
12
+ function onMove(e) {
13
+ if (prefersReduce)
14
+ return;
15
+ const el = ref.current;
16
+ if (!el)
17
+ return;
18
+ const r = el.getBoundingClientRect();
19
+ const x = (e.clientX - r.left) / r.width - 0.5;
20
+ const y = (e.clientY - r.top) / r.height - 0.5;
21
+ setTx(x * max * 2);
22
+ setTy(y * max * 2);
23
+ }
24
+ function onLeave() {
25
+ setTx(0);
26
+ setTy(0);
27
+ }
28
+ return (jsx(motion.div, { ref: ref, onMouseMove: onMove, onMouseLeave: onLeave, animate: { x: tx, y: ty, rotate: tx * 0.3 }, transition: { type: "spring", stiffness: 200, damping: 15, mass: 0.3 }, className: className, children: children }));
29
+ }
30
+
31
+ export { MagneticButton as default };
32
+ //# sourceMappingURL=magnetic-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"magnetic-button.js","sources":["../../src/components/magnetic-button.tsx"],"sourcesContent":["'use client';\n\nimport { useReducedMotion, motion } from \"framer-motion\";\nimport { useRef, useState } from \"react\";\n\nexport default function MagneticButton({\n children,\n className = \"\",\n asChild = false,\n}: {\n children: React.ReactNode;\n className?: string;\n asChild?: boolean;\n}) {\n const prefersReduce = useReducedMotion();\n const ref = useRef<HTMLDivElement>(null);\n const [tx, setTx] = useState(0);\n const [ty, setTy] = useState(0);\n\n const max = 6; // px\n function onMove(e: React.MouseEvent) {\n if (prefersReduce) return;\n const el = ref.current;\n if (!el) return;\n const r = el.getBoundingClientRect();\n const x = (e.clientX - r.left) / r.width - 0.5;\n const y = (e.clientY - r.top) / r.height - 0.5;\n setTx(x * max * 2);\n setTy(y * max * 2);\n }\n function onLeave() {\n setTx(0);\n setTy(0);\n }\n\n return (\n <motion.div\n ref={ref}\n onMouseMove={onMove}\n onMouseLeave={onLeave}\n animate={{ x: tx, y: ty, rotate: tx * 0.3 }}\n transition={{ type: \"spring\", stiffness: 200, damping: 15, mass: 0.3 }}\n className={className}\n >\n {children}\n </motion.div>\n );\n}\n"],"names":[],"mappings":";;;;;AAKc;AASZ;AACA;;;AAIA;;AAEE;;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;;AAEF;;;;AAKA;AAYF;;"}
@@ -0,0 +1,9 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Card } from './card.js';
3
+
4
+ const Message = ({ message, them, self, prevSelf, }) => {
5
+ return !self ? (jsxs("div", { className: "flex flex-col max-w-[80%]", children: [prevSelf && (jsx("div", { className: "text-xs pl-1 pb-1 text-muted-foreground", children: them })), jsx(Card, { className: "py-2 px-4 break-all text-sm w-fit", children: message })] })) : (jsxs("div", { className: "flex flex-col items-end max-w-[80%] ml-auto", children: [!prevSelf && (jsx("div", { className: "text-right text-xs pr-1 pb-1 text-muted-foreground", children: "You" })), jsx(Card, { className: "py-2 px-4 text-sm break-all bg-primary text-white text-wrap", children: message })] }));
6
+ };
7
+
8
+ export { Message };
9
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sources":["../../src/components/messages.tsx"],"sourcesContent":["import { Card } from \"./card\";\n\nexport const Message = ({\n message,\n them,\n self,\n prevSelf,\n}: {\n message: string;\n them: string;\n self: boolean;\n prevSelf: boolean;\n}) => {\n return !self ? (\n <div className=\"flex flex-col max-w-[80%]\">\n {prevSelf && (\n <div className=\"text-xs pl-1 pb-1 text-muted-foreground\">{them}</div>\n )}\n <Card className=\"py-2 px-4 break-all text-sm w-fit\">\n {message}\n </Card>\n </div>\n ) : (\n <div className=\"flex flex-col items-end max-w-[80%] ml-auto\">\n {!prevSelf && (\n <div className=\"text-right text-xs pr-1 pb-1 text-muted-foreground\">You</div>\n )}\n <Card className=\"py-2 px-4 text-sm break-all bg-primary text-white text-wrap\">\n {message}\n </Card>\n </div>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAEO,MAAM,OAAO,GAAG,CAAC,EACtB,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,QAAQ,GAMT,KAAI;AACH,IAAA,OAAO,CAAC,IAAI,IACVA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,2BAA2B,EAAA,QAAA,EAAA,CACvC,QAAQ,KACPC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,yCAAyC,EAAA,QAAA,EAAE,IAAI,EAAA,CAAO,CACtE,EACDA,GAAA,CAAC,IAAI,EAAA,EAAC,SAAS,EAAC,mCAAmC,YAChD,OAAO,EAAA,CACH,CAAA,EAAA,CACH,KAEND,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,6CAA6C,EAAA,QAAA,EAAA,CACzD,CAAC,QAAQ,KACRC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,oDAAoD,EAAA,QAAA,EAAA,KAAA,EAAA,CAAU,CAC9E,EACDA,GAAA,CAAC,IAAI,EAAA,EAAC,SAAS,EAAC,6DAA6D,EAAA,QAAA,EAC1E,OAAO,EAAA,CACH,CAAA,EAAA,CACH,CACP;AACH;;;;"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { jsx, Fragment } from 'react/jsx-runtime';
3
+ import { createPortal } from 'react-dom';
4
+
5
+ /**
6
+ * Renders a mobile selection sheet at the end of the document so accordions
7
+ * and animated panels can't clip it. Interactions inside are kept from reaching
8
+ * the document's outside-click handlers, which would otherwise close it.
9
+ */
10
+ function MobileSheetPortal({ enabled, children, }) {
11
+ if (!enabled)
12
+ return jsx(Fragment, { children: children });
13
+ return createPortal(jsx("div", { onClick: (event) => event.stopPropagation(), onTouchStart: (event) => event.stopPropagation(), children: children }), document.body);
14
+ }
15
+
16
+ export { MobileSheetPortal };
17
+ //# sourceMappingURL=mobile-sheet-portal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile-sheet-portal.js","sources":["../../src/components/mobile-sheet-portal.tsx"],"sourcesContent":["\"use client\";\n\nimport { createPortal } from \"react-dom\";\n\n/**\n * Renders a mobile selection sheet at the end of the document so accordions\n * and animated panels can't clip it. Interactions inside are kept from reaching\n * the document's outside-click handlers, which would otherwise close it.\n */\nexport function MobileSheetPortal({\n enabled,\n children,\n}: {\n enabled: boolean;\n children: React.ReactNode;\n}) {\n if (!enabled) return <>{children}</>;\n\n return createPortal(\n <div\n onClick={(event) => event.stopPropagation()}\n onTouchStart={(event) => event.stopPropagation()}\n >\n {children}\n </div>,\n document.body,\n );\n}\n"],"names":[],"mappings":";;;;AAIA;;;;AAIG;;AAQD;;AAEA;AASF;;"}
@@ -1,6 +1,12 @@
1
1
  import * as React from 'react';
2
- export declare function PageHeader({ title, description, className, }: {
2
+ export declare function PageHeader({ title, description, animated, className, }: {
3
3
  title: string;
4
4
  description?: React.ReactNode;
5
+ /**
6
+ * Fades the header up into place when it mounts (skipped under reduced
7
+ * motion). Give the header a new `key` to play it again, e.g. on tab change.
8
+ * Leave it off in loading skeletons so the effect plays once, on the page.
9
+ */
10
+ animated?: boolean;
5
11
  className?: string;
6
12
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { cn } from '../utils.js';
3
3
 
4
- function PageHeader({ title, description, className, }) {
5
- return (jsxs("header", { className: cn('text-foreground', className), children: [jsx("h1", { className: "text-page-heading font-page-heading", children: title }), description && (jsx("p", { className: "mt-page-description-gap max-w-page-description text-muted-foreground text-base leading-page-description", children: description }))] }));
4
+ function PageHeader({ title, description, animated = false, className, }) {
5
+ return (jsxs("header", { className: cn('text-foreground', animated && 'motion-safe:animate-page-enter', className), children: [jsx("h1", { className: "text-page-heading font-page-heading", children: title }), description && (jsx("p", { className: "mt-page-description-gap max-w-page-description text-muted-foreground text-base leading-page-description", children: description }))] }));
6
6
  }
7
7
 
8
8
  export { PageHeader };
@@ -1 +1 @@
1
- {"version":3,"file":"page-header.js","sources":["../../src/components/page-header.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport { cn } from '@/utils';\r\n\r\n\r\nexport function PageHeader({\r\n title,\r\n description,\r\n className,\r\n}: {\r\n title: string;\r\n description?: React.ReactNode;\r\n className?: string;\r\n}) {\r\n return (\r\n <header className={cn('text-foreground', className)}>\r\n <h1 className=\"text-page-heading font-page-heading\">\r\n {title}\r\n </h1>\r\n {description && (\r\n <p className=\"mt-page-description-gap max-w-page-description text-muted-foreground text-base leading-page-description\">{description}</p>\r\n )}\r\n </header>\r\n );\r\n}\r\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAIM,SAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,SAAS,GAKV,EAAA;AACC,IAAA,QACEA,IAAA,CAAA,QAAA,EAAA,EAAQ,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,CAC/CC,GAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAC,qCAAqC,EAAA,QAAA,EAChD,KAAK,EAAA,CACH,EACJ,WAAW,KACVA,WAAG,SAAS,EAAC,yGAAyG,EAAA,QAAA,EAAE,WAAW,EAAA,CAAK,CACzI,CAAA,EAAA,CACI;AAEb;;;;"}
1
+ {"version":3,"file":"page-header.js","sources":["../../src/components/page-header.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@/utils';\n\n\nexport function PageHeader({\n title,\n description,\n animated = false,\n className,\n}: {\n title: string;\n description?: React.ReactNode;\n /**\n * Fades the header up into place when it mounts (skipped under reduced\n * motion). Give the header a new `key` to play it again, e.g. on tab change.\n * Leave it off in loading skeletons so the effect plays once, on the page.\n */\n animated?: boolean;\n className?: string;\n}) {\n return (\n <header\n className={cn(\n 'text-foreground',\n animated && 'motion-safe:animate-page-enter',\n className,\n )}\n >\n <h1 className=\"text-page-heading font-page-heading\">\n {title}\n </h1>\n {description && (\n <p className=\"mt-page-description-gap max-w-page-description text-muted-foreground text-base leading-page-description\">{description}</p>\n )}\n </header>\n );\n}\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAIM,SAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,QAAQ,GAAG,KAAK,EAChB,SAAS,GAWV,EAAA;AACC,IAAA,QACEA,IAAA,CAAA,QAAA,EAAA,EACE,SAAS,EAAE,EAAE,CACX,iBAAiB,EACjB,QAAQ,IAAI,gCAAgC,EAC5C,SAAS,CACV,EAAA,QAAA,EAAA,CAECC,YAAI,SAAS,EAAC,qCAAqC,EAAA,QAAA,EAChD,KAAK,EAAA,CACH,EACJ,WAAW,KACVA,GAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,yGAAyG,YAAE,WAAW,EAAA,CAAK,CACzI,CAAA,EAAA,CACI;AAEb;;;;"}
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { ChevronLeft, ChevronRight } from 'lucide-react';
4
+ import { useState } from 'react';
5
+ import { Button } from './button.js';
6
+
7
+ const Paginator = ({ totalItems, itemsPerPage, currentPage: controlledPage, onPageChange, }) => {
8
+ const [internalPage, setInternalPage] = useState(1);
9
+ const isControlled = controlledPage !== undefined;
10
+ const currentPage = isControlled ? controlledPage : internalPage;
11
+ const totalPages = Math.ceil(totalItems / itemsPerPage);
12
+ const goToPage = (page) => {
13
+ const clamped = Math.max(1, Math.min(page, totalPages));
14
+ if (!isControlled)
15
+ setInternalPage(clamped);
16
+ if (onPageChange)
17
+ onPageChange(clamped);
18
+ };
19
+ const getDisplayedPages = () => {
20
+ const pages = [];
21
+ // Always show first page
22
+ pages.push(1);
23
+ const left = Math.max(2, currentPage - 1);
24
+ const right = Math.min(totalPages - 1, currentPage + 1);
25
+ if (left > 2) {
26
+ pages.push("ellipsis-left");
27
+ }
28
+ for (let i = left; i <= right; i++) {
29
+ pages.push(i);
30
+ }
31
+ if (right < totalPages - 1) {
32
+ pages.push("ellipsis-right");
33
+ }
34
+ // Always show last page if more than one
35
+ if (totalPages > 1) {
36
+ pages.push(totalPages);
37
+ }
38
+ return pages;
39
+ };
40
+ return (jsxs("div", { className: "flex justify-center items-center space-x-2 mt-4", children: [jsx(Button, { variant: "ghost", iconOnly: true, "aria-label": "Previous page", onClick: () => goToPage(currentPage - 1), disabled: currentPage === 1, children: jsx(ChevronLeft, {}) }), getDisplayedPages().map((page, idx) => typeof page === "number" ? (jsx(Button, { variant: currentPage === page ? "solid" : "ghost", className: "size-11 p-0", onClick: () => goToPage(page), children: page }, idx)) : (jsx("span", { className: "px-2 text-muted-foreground", children: "\u2026" }, idx))), jsx(Button, { variant: "ghost", iconOnly: true, "aria-label": "Next page", onClick: () => goToPage(currentPage + 1), disabled: currentPage === totalPages, children: jsx(ChevronRight, {}) })] }));
41
+ };
42
+
43
+ export { Paginator };
44
+ //# sourceMappingURL=paginator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginator.js","sources":["../../src/components/paginator.tsx"],"sourcesContent":["'use client';\n\nimport { ChevronLeft, ChevronRight } from \"lucide-react\";\nimport React, { useState } from \"react\";\nimport { Button } from \"./button\";\n\ninterface PaginatorProps {\n totalItems: number;\n itemsPerPage: number;\n currentPage?: number;\n onPageChange?: (page: number) => void;\n}\n\nexport const Paginator: React.FC<PaginatorProps> = ({\n totalItems,\n itemsPerPage,\n currentPage: controlledPage,\n onPageChange,\n}) => {\n const [internalPage, setInternalPage] = useState(1);\n const isControlled = controlledPage !== undefined;\n const currentPage = isControlled ? controlledPage : internalPage;\n const totalPages = Math.ceil(totalItems / itemsPerPage);\n\n const goToPage = (page: number) => {\n const clamped = Math.max(1, Math.min(page, totalPages));\n if (!isControlled) setInternalPage(clamped);\n if (onPageChange) onPageChange(clamped);\n };\n\n const getDisplayedPages = () => {\n const pages = [];\n\n // Always show first page\n pages.push(1);\n\n const left = Math.max(2, currentPage - 1);\n const right = Math.min(totalPages - 1, currentPage + 1);\n\n if (left > 2) {\n pages.push(\"ellipsis-left\");\n }\n\n for (let i = left; i <= right; i++) {\n pages.push(i);\n }\n\n if (right < totalPages - 1) {\n pages.push(\"ellipsis-right\");\n }\n\n // Always show last page if more than one\n if (totalPages > 1) {\n pages.push(totalPages);\n }\n\n return pages;\n };\n\n return (\n <div className=\"flex justify-center items-center space-x-2 mt-4\">\n <Button\n variant={\"ghost\"}\n iconOnly\n aria-label=\"Previous page\"\n onClick={() => goToPage(currentPage - 1)}\n disabled={currentPage === 1}\n >\n <ChevronLeft></ChevronLeft>\n </Button>\n\n {getDisplayedPages().map((page, idx) =>\n typeof page === \"number\" ? (\n <Button\n key={idx}\n variant={currentPage === page ? \"solid\" : \"ghost\"}\n className=\"size-11 p-0\"\n onClick={() => goToPage(page)}\n >\n {page}\n </Button>\n ) : (\n <span key={idx} className=\"px-2 text-muted-foreground\">\n &hellip;\n </span>\n ),\n )}\n\n <Button\n variant={\"ghost\"}\n iconOnly\n aria-label=\"Next page\"\n onClick={() => goToPage(currentPage + 1)}\n disabled={currentPage === totalPages}\n >\n <ChevronRight></ChevronRight>\n </Button>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAaO;;AAOL;;;AAIA;AACE;AACA;;AACA;;AACF;;;;AAME;AAEA;AACA;AAEA;AACE;;AAGF;AACE;;AAGF;AACE;;;AAIF;AACE;;AAGF;AACF;AAEA;AAwCF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","sources":["../../src/components/popover.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\r\n\r\nimport { cn } from '@/utils';\r\n\r\nfunction Popover({\r\n ...props\r\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\r\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\r\n}\r\n\r\nconst PopoverTrigger = React.forwardRef<\r\n React.ElementRef<typeof PopoverPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>\r\n>(({ className, ...props }, ref) => (\r\n <PopoverPrimitive.Trigger\r\n ref={ref}\r\n className={className}\r\n data-slot=\"popover-trigger\"\r\n {...props}\r\n />\r\n));\r\nPopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName;\r\n\r\nconst PopoverContent = React.forwardRef<\r\n React.ElementRef<typeof PopoverPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\r\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\r\n <PopoverPrimitive.Portal>\r\n <PopoverPrimitive.Content\r\n ref={ref}\r\n data-slot=\"popover-content\"\r\n align={align}\r\n sideOffset={sideOffset}\r\n className={cn(\r\n 'bg-popover text-popover-foreground data-[state=open]:animate-in motion-reduce:animate-none 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border border-border p-4 shadow-card outline-hidden',\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </PopoverPrimitive.Portal>\r\n));\r\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\r\n\r\nconst PopoverAnchor = React.forwardRef<\r\n React.ElementRef<typeof PopoverPrimitive.Anchor>,\r\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>\r\n>(({ className, ...props }, ref) => (\r\n <PopoverPrimitive.Anchor\r\n ref={ref}\r\n data-slot=\"popover-anchor\"\r\n className={className}\r\n {...props}\r\n />\r\n));\r\nPopoverAnchor.displayName = PopoverPrimitive.Anchor.displayName;\r\n\r\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\r\n"],"names":["_jsx"],"mappings":";;;;;AAKA,SAAS,OAAO,CAAC,EACf,GAAG,KAAK,EAC2C,EAAA;IACnD,OAAOA,GAAA,CAAC,gBAAgB,CAAC,IAAI,iBAAW,SAAS,EAAA,GAAK,KAAK,EAAA,CAAI;AACjE;AAEA,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAC,gBAAgB,CAAC,OAAO,EAAA,EACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,eACV,iBAAiB,EAAA,GACvB,KAAK,EAAA,CACT,CACH;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW;AAEjE,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC/DA,GAAA,CAAC,gBAAgB,CAAC,MAAM,EAAA,EAAA,QAAA,EACtBA,GAAA,CAAC,gBAAgB,CAAC,OAAO,EAAA,EACvB,GAAG,EAAE,GAAG,EAAA,WAAA,EACE,iBAAiB,EAC3B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,6gBAA6gB,EAC7gB,SAAS,CACV,EAAA,GACG,KAAK,EAAA,CACT,EAAA,CACsB,CAC3B;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW;AAEjE,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAC,gBAAgB,CAAC,MAAM,EAAA,EACtB,GAAG,EAAE,GAAG,EAAA,WAAA,EACE,gBAAgB,EAC1B,SAAS,EAAE,SAAS,EAAA,GAChB,KAAK,EAAA,CACT,CACH;AACD,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW;;;;"}
1
+ {"version":3,"file":"popover.js","sources":["../../src/components/popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/utils';\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nconst PopoverTrigger = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <PopoverPrimitive.Trigger\n ref={ref}\n className={className}\n data-slot=\"popover-trigger\"\n {...props}\n />\n));\nPopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName;\n\nconst PopoverContent = React.forwardRef<\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 data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in motion-reduce:animate-none 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border border-border p-4 shadow-card outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nconst PopoverAnchor = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Anchor>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>\n>(({ className, ...props }, ref) => (\n <PopoverPrimitive.Anchor\n ref={ref}\n data-slot=\"popover-anchor\"\n className={className}\n {...props}\n />\n));\nPopoverAnchor.displayName = PopoverPrimitive.Anchor.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"names":["_jsx"],"mappings":";;;;;AAKA,SAAS,OAAO,CAAC,EACf,GAAG,KAAK,EAC2C,EAAA;IACnD,OAAOA,GAAA,CAAC,gBAAgB,CAAC,IAAI,iBAAW,SAAS,EAAA,GAAK,KAAK,EAAA,CAAI;AACjE;AAEA,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAC,gBAAgB,CAAC,OAAO,EAAA,EACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,eACV,iBAAiB,EAAA,GACvB,KAAK,EAAA,CACT,CACH;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW;AAEjE,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC/DA,GAAA,CAAC,gBAAgB,CAAC,MAAM,EAAA,EAAA,QAAA,EACtBA,GAAA,CAAC,gBAAgB,CAAC,OAAO,EAAA,EACvB,GAAG,EAAE,GAAG,EAAA,WAAA,EACE,iBAAiB,EAC3B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,6gBAA6gB,EAC7gB,SAAS,CACV,EAAA,GACG,KAAK,EAAA,CACT,EAAA,CACsB,CAC3B;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW;AAEjE,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAC,gBAAgB,CAAC,MAAM,EAAA,EACtB,GAAG,EAAE,GAAG,EAAA,WAAA,EACE,gBAAgB,EAC1B,SAAS,EAAE,SAAS,EAAA,GAChB,KAAK,EAAA,CACT,CACH;AACD,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW;;;;"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import * as React from 'react';
4
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
5
+ import { cn } from '../utils.js';
6
+
7
+ const Progress = React.forwardRef(({ className, value, ...props }, ref) => (jsx(ProgressPrimitive.Root, { ref: ref, className: cn("relative h-2 w-full overflow-hidden rounded-pill bg-muted", className), value: value, ...props, children: jsx(ProgressPrimitive.Indicator, { className: "h-full rounded-pill bg-primary transition-[width] duration-state ease-landing-out motion-reduce:transition-none", style: { width: `${Math.max(0, Math.min(100, ((value ?? 0) / (props.max ?? 100)) * 100))}%` } }) })));
8
+ Progress.displayName = ProgressPrimitive.Root.displayName;
9
+
10
+ export { Progress };
11
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.js","sources":["../../src/components/progress.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\n\nimport { cn } from \"@/utils\";\n\nconst Progress = React.forwardRef<\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 \"relative h-2 w-full overflow-hidden rounded-pill bg-muted\",\n className,\n )}\n value={value}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full rounded-pill bg-primary transition-[width] duration-state ease-landing-out motion-reduce:transition-none\"\n style={{ width: `${Math.max(0, Math.min(100, ((value ?? 0) / (props.max ?? 100)) * 100))}%` }}\n />\n </ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n"],"names":[],"mappings":";;;;;;AAOA;AAmBA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","sources":["../../src/components/radio-group.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\r\n\r\nimport { cn } from \"@/utils\";\r\n\r\nconst RadioGroup = React.forwardRef<\r\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n <RadioGroupPrimitive.Root\r\n className={cn(\"grid gap-2\", className)}\r\n {...props}\r\n ref={ref}\r\n />\r\n );\r\n});\r\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\r\n\r\nconst RadioGroupItem = React.forwardRef<\r\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n <RadioGroupPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative aspect-square h-4 w-4 shrink-0 rounded-full border border-input bg-muted text-primary transition-colors duration-state data-[state=checked]:border-primary data-[state=checked]:bg-primary hover:border-primary focus:outline-none focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-landing-blue disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none after:absolute after:-inset-3 after:content-['']\",\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\r\n <span className=\"h-2 w-2 rounded-full bg-background\" />\r\n </RadioGroupPrimitive.Indicator>\r\n </RadioGroupPrimitive.Item>\r\n );\r\n});\r\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\r\n\r\nexport { RadioGroup, RadioGroupItem };\r\n"],"names":[],"mappings":";;;;;;AAOA;;AAWA;AACA;AAEA;AAIE;AAcF;AACA;;"}
1
+ {"version":3,"file":"radio-group.js","sources":["../../src/components/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\n\nimport { cn } from \"@/utils\";\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(\"grid gap-2\", className)}\n {...props}\n ref={ref}\n />\n );\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\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 \"relative aspect-square h-4 w-4 shrink-0 rounded-full border border-input bg-muted text-primary transition-colors duration-state data-[state=checked]:border-primary data-[state=checked]:bg-primary hover:border-primary focus:outline-none focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-landing-blue disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none after:absolute after:-inset-3 after:content-['']\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <span className=\"h-2 w-2 rounded-full bg-background\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"],"names":[],"mappings":";;;;;;AAOA;;AAWA;AACA;AAEA;AAIE;AAcF;AACA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sources":["../../src/components/select.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\nimport * as SelectPrimitive from '@radix-ui/react-select';\r\nimport { Check, ChevronDown, ChevronUp, X } from 'lucide-react';\r\n\r\nimport { cn } from '@/utils';\r\nimport { fieldInteractionClassName } from '@/hooks/use-field-focus';\r\nimport { useMobile } from '@/hooks/use-mobile';\r\nimport { useMobileSheetViewport } from '@/hooks/use-mobile-sheet-viewport';\r\n\r\nconst SelectContext = React.createContext({ open: false, setOpen: (_open: boolean) => {} });\r\n\r\nfunction Select({ open: controlledOpen, defaultOpen = false, onOpenChange, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\r\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\r\n const open = controlledOpen ?? internalOpen;\r\n const setOpen = (next: boolean) => {\r\n if (controlledOpen === undefined) setInternalOpen(next);\r\n onOpenChange?.(next);\r\n };\r\n\r\n return (\r\n <SelectContext.Provider value={{ open, setOpen }}>\r\n <SelectPrimitive.Root {...props} open={open} onOpenChange={setOpen}>\r\n {children}\r\n </SelectPrimitive.Root>\r\n </SelectContext.Provider>\r\n );\r\n}\r\n\r\nconst SelectGroup = SelectPrimitive.Group;\r\n\r\nconst SelectValue = SelectPrimitive.Value;\r\n\r\nconst SelectTrigger = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\r\n>(({ className, children, ...props }, ref) => (\r\n <SelectPrimitive.Trigger\r\n ref={ref}\r\n className={cn(\r\n 'group bg-background text-foreground placeholder:text-muted-foreground/40 data-[placeholder]:text-muted-foreground/40 border-input enabled:hover:border-input-hover flex h-form-control min-h-form-control max-h-form-control w-full cursor-pointer items-center justify-between gap-2 rounded-control-lg border px-field-padding-x py-0 text-base font-normal outline-none aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',\r\n 'focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-landing-blue',\r\n fieldInteractionClassName,\r\n className,\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <SelectPrimitive.Icon asChild>\r\n <ChevronDown className=\"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-interactive ease-out-strong group-data-[state=open]:rotate-180 motion-reduce:transition-none\" />\r\n </SelectPrimitive.Icon>\r\n </SelectPrimitive.Trigger>\r\n));\r\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\r\n\r\nconst SelectScrollUpButton = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\r\n>(({ className, ...props }, ref) => (\r\n <SelectPrimitive.ScrollUpButton\r\n ref={ref}\r\n className={cn(\r\n 'flex cursor-default items-center justify-center py-1',\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <ChevronUp className=\"h-4 w-4\" />\r\n </SelectPrimitive.ScrollUpButton>\r\n));\r\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\r\n\r\nconst SelectScrollDownButton = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\r\n>(({ className, ...props }, ref) => (\r\n <SelectPrimitive.ScrollDownButton\r\n ref={ref}\r\n className={cn(\r\n 'flex cursor-default items-center justify-center py-1',\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <ChevronDown className=\"h-4 w-4\" />\r\n </SelectPrimitive.ScrollDownButton>\r\n));\r\nSelectScrollDownButton.displayName =\r\n SelectPrimitive.ScrollDownButton.displayName;\r\n\r\nconst SelectContent = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & { title?: string }\r\n>(({ className, children, position = 'popper', title = 'Choose an option', style, ...props }, ref) => {\r\n const mobile = useMobile();\r\n const { open, setOpen } = React.useContext(SelectContext);\r\n const viewport = useMobileSheetViewport(open && mobile);\r\n\r\n return (\r\n <SelectPrimitive.Portal>\r\n <div\r\n className={mobile ? '[&>[data-radix-popper-content-wrapper]]:!fixed [&>[data-radix-popper-content-wrapper]]:!inset-x-0 [&>[data-radix-popper-content-wrapper]]:!top-auto [&>[data-radix-popper-content-wrapper]]:!bottom-[var(--select-sheet-bottom)] [&>[data-radix-popper-content-wrapper]]:!transform-none [&>[data-radix-popper-content-wrapper]]:!z-[1100] [&>[data-radix-popper-content-wrapper]]:!min-w-0' : undefined}\r\n style={{ '--select-sheet-bottom': `${viewport?.bottom ?? 0}px` } as React.CSSProperties}\r\n >\r\n {mobile && open && (\r\n <div aria-hidden=\"true\" className=\"fixed inset-0 z-[1090] bg-black/25 backdrop-blur-[1px]\" />\r\n )}\r\n <SelectPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n 'relative flex flex-col overflow-hidden border border-border bg-background text-sm text-foreground shadow-card duration-interactive ease-out-strong motion-reduce:animate-none',\r\n mobile\r\n ? 'w-full rounded-t-control-lg border-b-0 pb-[env(safe-area-inset-bottom)]'\r\n : 'z-50 max-h-[400px] min-w-[8rem] rounded-control-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',\r\n className,\r\n )}\r\n position={mobile ? 'popper' : position}\r\n sideOffset={4}\r\n style={{\r\n ...(mobile ? { maxHeight: viewport ? Math.min(viewport.height, 640) : '80dvh' } : {}),\r\n ...style,\r\n }}\r\n {...props}\r\n >\r\n {mobile && (\r\n <div role=\"presentation\" className=\"flex shrink-0 items-center justify-between gap-4 px-4 pb-3 pt-4\">\r\n <h2 className=\"text-base font-semibold text-foreground\">{title}</h2>\r\n <button\r\n type=\"button\"\r\n aria-label=\"Close options\"\r\n className=\"-mr-3 flex h-11 w-11 shrink-0 items-center justify-center rounded-control-lg text-muted-foreground hover:bg-muted\"\r\n onPointerDown={(event) => event.stopPropagation()}\r\n onClick={() => setOpen(false)}\r\n >\r\n <X className=\"h-5 w-5\" aria-hidden=\"true\" />\r\n </button>\r\n </div>\r\n )}\r\n {!mobile && <SelectScrollUpButton />}\r\n <SelectPrimitive.Viewport\r\n className={cn(\r\n 'min-h-0 overflow-y-auto overscroll-contain',\r\n mobile ? 'w-full flex-1' : position === 'popper' && 'w-full min-w-[var(--radix-select-trigger-width)]',\r\n )}\r\n >\r\n {children}\r\n </SelectPrimitive.Viewport>\r\n {!mobile && <SelectScrollDownButton />}\r\n </SelectPrimitive.Content>\r\n </div>\r\n </SelectPrimitive.Portal>\r\n );\r\n});\r\nSelectContent.displayName = SelectPrimitive.Content.displayName;\r\n\r\nconst SelectLabel = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\r\n>(({ className, ...props }, ref) => (\r\n <SelectPrimitive.Label\r\n ref={ref}\r\n className={cn('py-2 pr-4 pl-8 text-sm font-semibold text-foreground', className)}\r\n {...props}\r\n />\r\n));\r\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\r\n\r\nconst SelectItem = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\r\n>(({ className, children, ...props }, ref) => (\r\n <SelectPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n 'relative flex w-full cursor-pointer items-center gap-2 px-4 py-2 pr-10 text-sm text-muted-foreground outline-none select-none transition-colors duration-interactive ease-out-strong focus:bg-muted data-[state=checked]:bg-primary-tint data-[disabled]:pointer-events-none data-[disabled]:opacity-50 motion-reduce:transition-none max-md:min-h-12',\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <span className=\"absolute right-4 flex h-4 w-4 items-center justify-center\">\r\n <SelectPrimitive.ItemIndicator>\r\n <Check className=\"h-4 w-4\" />\r\n </SelectPrimitive.ItemIndicator>\r\n </span>\r\n\r\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\r\n </SelectPrimitive.Item>\r\n));\r\nSelectItem.displayName = SelectPrimitive.Item.displayName;\r\n\r\nconst SelectSeparator = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\r\n>(({ className, ...props }, ref) => (\r\n <SelectPrimitive.Separator\r\n ref={ref}\r\n className={cn('bg-border h-px', className)}\r\n {...props}\r\n />\r\n));\r\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\r\n\r\nexport {\r\n Select,\r\n SelectGroup,\r\n SelectValue,\r\n SelectTrigger,\r\n SelectContent,\r\n SelectLabel,\r\n SelectItem,\r\n SelectSeparator,\r\n SelectScrollUpButton,\r\n SelectScrollDownButton,\r\n};\r\n"],"names":[],"mappings":";;;;;;;;;;AAWA;AAEA;AACE;AACA;AACA;;;AAEE;AACF;AAEA;AAOF;AAEA;AAEA;AAEA;AAoBA;AAEA;AAeA;AAEA;AAeA;AACE;AAEF;AAIE;AACA;;AAGA;AAcQ;;AAOF;AACA;;AAgCR;AACA;AAEA;AAUA;AAEA;AAqBA;AAEA;AAUA;;"}
1
+ {"version":3,"file":"select.js","sources":["../../src/components/select.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { Check, ChevronDown, ChevronUp, X } from 'lucide-react';\n\nimport { cn } from '@/utils';\nimport { fieldInteractionClassName } from '@/hooks/use-field-focus';\nimport { useMobile } from '@/hooks/use-mobile';\nimport { useMobileSheetViewport } from '@/hooks/use-mobile-sheet-viewport';\n\nconst SelectContext = React.createContext({ open: false, setOpen: (_open: boolean) => {} });\n\nfunction Select({ open: controlledOpen, defaultOpen = false, onOpenChange, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const open = controlledOpen ?? internalOpen;\n const setOpen = (next: boolean) => {\n if (controlledOpen === undefined) setInternalOpen(next);\n onOpenChange?.(next);\n };\n\n return (\n <SelectContext.Provider value={{ open, setOpen }}>\n <SelectPrimitive.Root {...props} open={open} onOpenChange={setOpen}>\n {children}\n </SelectPrimitive.Root>\n </SelectContext.Provider>\n );\n}\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'group bg-background text-foreground placeholder:text-muted-foreground/40 data-[placeholder]:text-muted-foreground/40 border-input enabled:hover:border-input-hover flex h-form-control min-h-form-control max-h-form-control w-full cursor-pointer items-center justify-between gap-2 rounded-control-lg border px-field-padding-x py-0 text-base font-normal outline-none aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',\n 'focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-landing-blue',\n fieldInteractionClassName,\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-interactive ease-out-strong group-data-[state=open]:rotate-180 motion-reduce:transition-none\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\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 <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\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 <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & { title?: string }\n>(({ className, children, position = 'popper', title = 'Choose an option', style, ...props }, ref) => {\n const mobile = useMobile();\n const { open, setOpen } = React.useContext(SelectContext);\n const viewport = useMobileSheetViewport(open && mobile);\n\n return (\n <SelectPrimitive.Portal>\n <div\n className={mobile ? '[&>[data-radix-popper-content-wrapper]]:!fixed [&>[data-radix-popper-content-wrapper]]:!inset-x-0 [&>[data-radix-popper-content-wrapper]]:!top-auto [&>[data-radix-popper-content-wrapper]]:!bottom-[var(--select-sheet-bottom)] [&>[data-radix-popper-content-wrapper]]:!transform-none [&>[data-radix-popper-content-wrapper]]:!z-[1100] [&>[data-radix-popper-content-wrapper]]:!min-w-0' : undefined}\n style={{ '--select-sheet-bottom': `${viewport?.bottom ?? 0}px` } as React.CSSProperties}\n >\n {mobile && open && (\n <div aria-hidden=\"true\" className=\"fixed inset-0 z-[1090] bg-black/25 backdrop-blur-[1px]\" />\n )}\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n 'relative flex flex-col overflow-hidden border border-border bg-background text-sm text-foreground shadow-card duration-interactive ease-out-strong motion-reduce:animate-none',\n mobile\n ? 'w-full rounded-t-control-lg border-b-0 pb-[env(safe-area-inset-bottom)]'\n : 'z-50 max-h-[400px] min-w-[8rem] rounded-control-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',\n className,\n )}\n position={mobile ? 'popper' : position}\n sideOffset={4}\n style={{\n ...(mobile ? { maxHeight: viewport ? Math.min(viewport.height, 640) : '80dvh' } : {}),\n ...style,\n }}\n {...props}\n >\n {mobile && (\n <div role=\"presentation\" className=\"flex shrink-0 items-center justify-between gap-4 px-4 pb-3 pt-4\">\n <h2 className=\"text-base font-semibold text-foreground\">{title}</h2>\n <button\n type=\"button\"\n aria-label=\"Close options\"\n className=\"-mr-3 flex h-11 w-11 shrink-0 items-center justify-center rounded-control-lg text-muted-foreground hover:bg-muted\"\n onPointerDown={(event) => event.stopPropagation()}\n onClick={() => setOpen(false)}\n >\n <X className=\"h-5 w-5\" aria-hidden=\"true\" />\n </button>\n </div>\n )}\n {!mobile && <SelectScrollUpButton />}\n <SelectPrimitive.Viewport\n className={cn(\n 'min-h-0 overflow-y-auto overscroll-contain',\n mobile ? 'w-full flex-1' : position === 'popper' && 'w-full min-w-[var(--radix-select-trigger-width)]',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n {!mobile && <SelectScrollDownButton />}\n </SelectPrimitive.Content>\n </div>\n </SelectPrimitive.Portal>\n );\n});\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\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('py-2 pr-4 pl-8 text-sm font-semibold text-foreground', className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\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-pointer items-center gap-2 px-4 py-2 pr-10 text-sm text-muted-foreground outline-none select-none transition-colors duration-interactive ease-out-strong focus:bg-muted data-[state=checked]:bg-primary-tint data-[disabled]:pointer-events-none data-[disabled]:opacity-50 motion-reduce:transition-none max-md:min-h-12',\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-4 flex h-4 w-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\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('bg-border h-px', className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n"],"names":[],"mappings":";;;;;;;;;;AAWA;AAEA;AACE;AACA;AACA;;;AAEE;AACF;AAEA;AAOF;AAEA;AAEA;AAEA;AAoBA;AAEA;AAeA;AAEA;AAeA;AACE;AAEF;AAIE;AACA;;AAGA;AAcQ;;AAOF;AACA;;AAgCR;AACA;AAEA;AAUA;AAEA;AAqBA;AAEA;AAUA;;"}
@@ -7,7 +7,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogC
7
7
  declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
8
8
  declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
9
  declare const sheetVariants: (props?: ({
10
- side?: "left" | "right" | "bottom" | "top" | null | undefined;
10
+ side?: "left" | "right" | "top" | "bottom" | null | undefined;
11
11
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
12
12
  interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
13
13
  showCloseButton?: boolean;
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import * as React from 'react';
4
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
5
+ import { cva } from '../node_modules/class-variance-authority/dist/index.js';
6
+ import { X } from 'lucide-react';
7
+ import { cn } from '../utils.js';
8
+
9
+ const Sheet = SheetPrimitive.Root;
10
+ const SheetTrigger = SheetPrimitive.Trigger;
11
+ const SheetClose = SheetPrimitive.Close;
12
+ const SheetPortal = SheetPrimitive.Portal;
13
+ const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => (jsx(SheetPrimitive.Overlay, { className: cn("fixed inset-0 z-[1100] bg-black/30 data-[state=open]:animate-in motion-reduce:animate-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props, ref: ref })));
14
+ SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
15
+ const sheetVariants = cva("fixed z-[1101] gap-4 overflow-y-auto overscroll-contain border-border bg-background p-6 text-base text-foreground shadow-card transition ease-out-strong data-[state=open]:animate-in motion-reduce:animate-none data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-200", {
16
+ variants: {
17
+ side: {
18
+ top: "inset-x-0 top-0 max-h-[90dvh] rounded-b-control-lg border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
19
+ bottom: "inset-x-0 bottom-0 max-h-[90dvh] rounded-t-control-lg border-t pb-[max(1.5rem,env(safe-area-inset-bottom))] data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
20
+ left: "inset-y-0 left-0 h-full w-3/4 rounded-r-control-lg border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
21
+ right: "inset-y-0 right-0 h-full w-3/4 rounded-l-control-lg border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
22
+ },
23
+ },
24
+ defaultVariants: {
25
+ side: "right",
26
+ },
27
+ });
28
+ const SheetContent = React.forwardRef(({ side = "right", className, children, showCloseButton = true, overlayClassName, ...props }, ref) => (jsxs(SheetPortal, { children: [jsx(SheetOverlay, { className: overlayClassName }), jsxs(SheetPrimitive.Content, { ref: ref, className: cn(sheetVariants({ side }), className), ...props, children: [children, showCloseButton && jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 flex size-11 items-center justify-center rounded-control-lg text-muted-foreground transition-colors duration-state hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none motion-reduce:transition-none [&_svg]:size-4", children: [jsx(X, { className: "h-4 w-4" }), jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
29
+ SheetContent.displayName = SheetPrimitive.Content.displayName;
30
+ const SheetHeader = ({ className, ...props }) => (jsx("div", { className: cn("flex flex-col space-y-2 pr-10 text-left", className), ...props }));
31
+ SheetHeader.displayName = "SheetHeader";
32
+ const SheetFooter = ({ className, ...props }) => (jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
33
+ SheetFooter.displayName = "SheetFooter";
34
+ const SheetTitle = React.forwardRef(({ className, ...props }, ref) => (jsx(SheetPrimitive.Title, { ref: ref, className: cn("text-xl font-semibold text-foreground", className), ...props })));
35
+ SheetTitle.displayName = SheetPrimitive.Title.displayName;
36
+ const SheetDescription = React.forwardRef(({ className, ...props }, ref) => (jsx(SheetPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
37
+ SheetDescription.displayName = SheetPrimitive.Description.displayName;
38
+
39
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
40
+ //# sourceMappingURL=sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.js","sources":["../../src/components/sheet.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@/utils\";\n\nconst Sheet = SheetPrimitive.Root;\n\nconst SheetTrigger = SheetPrimitive.Trigger;\n\nconst SheetClose = SheetPrimitive.Close;\n\nconst SheetPortal = SheetPrimitive.Portal;\n\nconst SheetOverlay = React.forwardRef<\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-[1100] bg-black/30 data-[state=open]:animate-in motion-reduce:animate-none 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 \"fixed z-[1101] gap-4 overflow-y-auto overscroll-contain border-border bg-background p-6 text-base text-foreground shadow-card transition ease-out-strong data-[state=open]:animate-in motion-reduce:animate-none data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-200\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 max-h-[90dvh] rounded-b-control-lg border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 max-h-[90dvh] rounded-t-control-lg border-t pb-[max(1.5rem,env(safe-area-inset-bottom))] 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 rounded-r-control-lg 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 rounded-l-control-lg 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\ninterface SheetContentProps\n extends\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> {\n showCloseButton?: boolean;\n overlayClassName?: string;\n}\n\nconst SheetContent = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", className, children, showCloseButton = true, overlayClassName, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay className={overlayClassName} />\n <SheetPrimitive.Content\n ref={ref}\n className={cn(sheetVariants({ side }), className)}\n {...props}\n >\n {children}\n {showCloseButton && <SheetPrimitive.Close className=\"absolute right-4 top-4 flex size-11 items-center justify-center rounded-control-lg text-muted-foreground transition-colors duration-state hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none motion-reduce:transition-none [&_svg]:size-4\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>}\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 pr-10 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 = React.forwardRef<\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-xl font-semibold text-foreground\", className)}\n {...props}\n />\n));\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\nconst SheetDescription = React.forwardRef<\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"],"names":[],"mappings":";;;;;;;;AASA;AAEA;AAEA;AAEA;AAEA;AAaA;AAEA;AAGI;AACE;AACE;AACA;AAEA;AACA;AAED;AACF;AACD;AACE;AACD;AACF;AAWH;AAmBA;AAEA;AAYA;AAEA;AAYA;AAEA;AAUA;AAEA;AAUA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.js","sources":["../../src/components/skeleton.tsx"],"sourcesContent":["import { cn } from '@/utils';\r\n\r\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\r\n return (\r\n <div\r\n data-slot=\"skeleton\"\r\n className={cn('bg-muted animate-pulse rounded-control-lg motion-reduce:animate-none', className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport { Skeleton };\r\n"],"names":["_jsx"],"mappings":";;;AAEA,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B,EAAA;AACpE,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EAAA,WAAA,EACY,UAAU,EACpB,SAAS,EAAE,EAAE,CAAC,sEAAsE,EAAE,SAAS,CAAC,EAAA,GAC5F,KAAK,EAAA,CACT;AAEN;;;;"}
1
+ {"version":3,"file":"skeleton.js","sources":["../../src/components/skeleton.tsx"],"sourcesContent":["import { cn } from '@/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"skeleton\"\n className={cn('bg-muted animate-pulse rounded-control-lg motion-reduce:animate-none', className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n"],"names":["_jsx"],"mappings":";;;AAEA,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B,EAAA;AACpE,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EAAA,WAAA,EACY,UAAU,EACpB,SAAS,EAAE,EAAE,CAAC,sEAAsE,EAAE,SAAS,CAAC,EAAA,GAC5F,KAAK,EAAA,CACT;AAEN;;;;"}