@me1a/ui 2.1.8 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms.cjs.js +1 -1
- package/dist/atoms.d.mts +546 -16
- package/dist/atoms.d.ts +546 -16
- package/dist/atoms.esm.js +1 -1
- package/dist/checkbox-DxgDKaHx.d.mts +108 -0
- package/dist/checkbox-DxgDKaHx.d.ts +108 -0
- package/dist/chunk-23T2PH5G.esm.js +2 -0
- package/dist/{chunk-5ZMFQLBF.esm.js.map → chunk-23T2PH5G.esm.js.map} +1 -1
- package/dist/chunk-2QG3QTSW.cjs.js +2 -0
- package/dist/chunk-2QG3QTSW.cjs.js.map +1 -0
- package/dist/chunk-DTM5LZHM.cjs.js +2 -0
- package/dist/chunk-DTM5LZHM.cjs.js.map +1 -0
- package/dist/chunk-HW32JE75.cjs.js +2 -0
- package/dist/chunk-HW32JE75.cjs.js.map +1 -0
- package/dist/chunk-J5A6PILI.cjs.js +2 -0
- package/dist/chunk-J5A6PILI.cjs.js.map +1 -0
- package/dist/{chunk-IXYLGKQT.cjs.js → chunk-JIRS6MWF.cjs.js} +2 -2
- package/dist/{chunk-IXYLGKQT.cjs.js.map → chunk-JIRS6MWF.cjs.js.map} +1 -1
- package/dist/chunk-JUZG25DH.esm.js +2 -0
- package/dist/chunk-JUZG25DH.esm.js.map +1 -0
- package/dist/chunk-MOYOCJW6.esm.js +2 -0
- package/dist/chunk-MOYOCJW6.esm.js.map +1 -0
- package/dist/chunk-Q76IMLQ3.esm.js +2 -0
- package/dist/chunk-Q76IMLQ3.esm.js.map +1 -0
- package/dist/chunk-STRDPP3B.esm.js +2 -0
- package/dist/chunk-STRDPP3B.esm.js.map +1 -0
- package/dist/chunk-UK47BFA3.cjs.js +2 -0
- package/dist/chunk-UK47BFA3.cjs.js.map +1 -0
- package/dist/chunk-YEZB7AOJ.esm.js +2 -0
- package/dist/chunk-YEZB7AOJ.esm.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.mts +11 -3
- package/dist/index.d.ts +11 -3
- package/dist/index.esm.js +1 -1
- package/dist/molecules.cjs.js +1 -1
- package/dist/molecules.d.mts +30 -1
- package/dist/molecules.d.ts +30 -1
- package/dist/molecules.esm.js +1 -1
- package/dist/organisms.cjs.js +1 -1
- package/dist/organisms.esm.js +1 -1
- package/dist/rhf.cjs.js +1 -1
- package/dist/rhf.cjs.js.map +1 -1
- package/dist/rhf.d.mts +211 -2
- package/dist/rhf.d.ts +211 -2
- package/dist/rhf.esm.js +1 -1
- package/dist/rhf.esm.js.map +1 -1
- package/package.json +24 -12
- package/dist/chunk-3HTFCAYW.esm.js +0 -2
- package/dist/chunk-3HTFCAYW.esm.js.map +0 -1
- package/dist/chunk-5ZMFQLBF.esm.js +0 -2
- package/dist/chunk-7NN2L46N.esm.js +0 -2
- package/dist/chunk-7NN2L46N.esm.js.map +0 -1
- package/dist/chunk-BR7Z6MCL.cjs.js +0 -2
- package/dist/chunk-BR7Z6MCL.cjs.js.map +0 -1
- package/dist/chunk-C4ZAMI2P.cjs.js +0 -2
- package/dist/chunk-C4ZAMI2P.cjs.js.map +0 -1
- package/dist/chunk-EBPUGBUT.esm.js +0 -2
- package/dist/chunk-EBPUGBUT.esm.js.map +0 -1
- package/dist/chunk-ELZV2CGE.cjs.js +0 -2
- package/dist/chunk-ELZV2CGE.cjs.js.map +0 -1
- package/dist/chunk-LCAU4YZI.esm.js +0 -2
- package/dist/chunk-LCAU4YZI.esm.js.map +0 -1
- package/dist/chunk-OZY26HWB.cjs.js +0 -2
- package/dist/chunk-OZY26HWB.cjs.js.map +0 -1
- package/dist/chunk-PEQ3VT44.esm.js +0 -2
- package/dist/chunk-PEQ3VT44.esm.js.map +0 -1
- package/dist/chunk-UAZIJGWR.cjs.js +0 -2
- package/dist/chunk-UAZIJGWR.cjs.js.map +0 -1
- package/dist/input-Ruz0ZoY6.d.mts +0 -12
- package/dist/input-Ruz0ZoY6.d.ts +0 -12
package/dist/rhf.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/rhf/form/form.tsx","../src/components/rhf/rhf-text-field/rhf-text-field.tsx","../src/components/atoms/textarea/textarea.tsx","../src/components/rhf/rhf-textarea/rhf-textarea.tsx"],"names":["Form","FormProvider","FormFieldContext","FormField","props","jsx","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","fieldState","id","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body","RHFTextField","name","label","description","type","warningText","required","disabled","readOnly","placeholder","ariaLabel","ariaDescribedby","onBlur","other","control","field","jsxs","Input","e","Textarea","R","autoResize","internalRef","textarea","resizeTextarea","RHFTextarea"],"mappings":"oTAiBA,IAAMA,CAAOC,CAAAA,YAAAA,CASPC,EAAyB,CAAqC,CAAA,aAAA,CAAA,EAA2B,CAEzFC,CAAAA,CAAAA,CAAY,CAGhB,CACA,GAAGC,CACL,CAAA,GAEIC,GAACH,CAAAA,CAAAA,CAAiB,SAAjB,CAA0B,KAAA,CAAO,CAAE,IAAME,CAAAA,CAAAA,CAAM,IAAK,CACnD,CAAA,QAAA,CAAAC,GAACC,CAAAA,UAAAA,CAAA,CAAY,GAAGF,EAAO,CACzB,CAAA,CAAA,CAIEG,EAAe,IAAM,CACzB,IAAMC,CAAqB,CAAA,CAAA,CAAA,UAAA,CAAWN,CAAgB,CAAA,CAChDO,CAAoB,CAAA,CAAA,CAAA,UAAA,CAAWC,CAAe,CAC9C,CAAA,CAAE,cAAAC,CAAe,CAAA,SAAA,CAAAC,CAAU,CAAIC,CAAAA,cAAAA,EAE/BC,CAAAA,CAAAA,CAAaH,CAAcH,CAAAA,CAAAA,CAAa,KAAMI,CAAS,CAAA,CAE7D,GAAI,CAACJ,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,gDAAgD,CAAA,CAGlE,GAAM,CAAE,GAAAO,C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,CACrC,CAAA,CAACA,GAASgB,GACThC,EAAAA,GAAAA,CAAC,GAAE,CAAA,CAAA,SAAA,CAAU,8CAA+C,CAAA,IAAA,CAAK,QAC9D,QAAAgC,CAAAA,GAAAA,CACH,CAEJ,CAAA,CAAA,CAAA,CAEJ,CAEJ","file":"rhf.esm.js","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport {\n Controller,\n FormProvider,\n useFormContext,\n type ControllerProps,\n type FieldPath,\n type FieldValues\n} from \"react-hook-form\"\n\nimport { cn } from \"@/utils/cn\"\nimport { Label } from \"@/components/atoms/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>({} as FormFieldContextValue)\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>({} as FormItemContextValue)\n\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n </FormItemContext.Provider>\n )\n }\n)\nFormItem.displayName = \"FormItem\"\n\nconst FormLabel = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n ref={ref}\n className={cn(error && \"text-destructive\", className)}\n htmlFor={formItemId}\n {...props}\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 } = useFormField()\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\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 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 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","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { Input } from \"@/components/atoms/input\"\nimport { cn } from \"@/utils/cn\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFTextFieldProps } from \"./rhf-text-field.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A text field component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhftextfield--docs\n *\n * * @example\n * ```tsx\n * <Form>\n * <RHFTextField name=\"name\" label=\"Name\" />\n * <RHFTextField name=\"email\" label=\"Email\" />\n * </Form>\n * ```\n */\nexport function RHFTextField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n type = \"text\",\n warningText,\n required,\n disabled,\n readOnly,\n placeholder,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n onBlur,\n ...other\n}: RHFTextFieldProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem>\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <Input\n {...field}\n type={type}\n value={type === \"number\" && field.value === 0 ? \"\" : field.value}\n onChange={(e) => {\n if (type === \"number\") {\n field.onChange(Number(e.target.value))\n } else {\n field.onChange(e.target.value)\n }\n }}\n onBlur={(e) => {\n // trim if a string\n if (type !== \"number\" && typeof field.value === \"string\") {\n field.onChange(field.value.trim())\n }\n field.onBlur() // pass to react-hook-form\n onBlur?.(e) // pass to wrapper\n }}\n className={cn(\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n placeholder={placeholder}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n {...other}\n />\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </FormItem>\n )}\n />\n )\n}\n","import * as React from \"react\"\nimport { cn } from \"@/utils/index\"\nimport { TextareaProps } from \"./textarea.types\"\n\n/**\n * Textarea component for creating accessible text areas.\n * Built on top of shadcn/ui's Textarea component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-textarea--docs\n *\n * @example\n * ```tsx\n * <Textarea placeholder=\"Enter text\" />\n * ```\n */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, autoResize = false, ...props }, ref) => {\n const internalRef = React.useRef<HTMLTextAreaElement>(null)\n\n React.useEffect(() => {\n if (!autoResize || !internalRef.current) return\n\n const textarea = internalRef.current\n const resizeTextarea = () => {\n textarea.style.height = \"auto\"\n textarea.style.height = `${textarea.scrollHeight}px`\n }\n\n textarea.addEventListener(\"input\", resizeTextarea)\n resizeTextarea() // Initial resize\n\n return () => textarea.removeEventListener(\"input\", resizeTextarea)\n }, [autoResize])\n\n return (\n <textarea\n className={cn(\n \"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\n\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { Textarea } from \"@/components/atoms/textarea\"\nimport { cn } from \"@/utils/cn\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFTextareaProps } from \"./rhf-textarea.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A textarea component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhftextarea--docs\n *\n * @example\n * ```tsx\n * <Form>\n * <RHFTextarea name=\"description\" label=\"Description\" />\n * </Form>\n * ```\n */\nexport function RHFTextarea<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n placeholder,\n autoResize,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n onBlur,\n ...other\n}: RHFTextareaProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem>\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <Textarea\n {...field}\n value={field.value}\n onChange={(e) => {\n field.onChange(e.target.value)\n }}\n onBlur={(e) => {\n // trim if a string\n if (typeof field.value === \"string\") {\n field.onChange(field.value.trim())\n }\n field.onBlur() // pass to react-hook-form\n onBlur?.(e) // pass to wrapper\n }}\n className={cn(\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n placeholder={placeholder}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n autoResize={autoResize}\n {...other}\n />\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </FormItem>\n )}\n />\n )\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/rhf/form/form.tsx","../src/components/rhf/rhf-text-field/rhf-text-field.tsx","../src/components/atoms/textarea/textarea.tsx","../src/components/rhf/rhf-textarea/rhf-textarea.tsx","../src/components/rhf/rhf-checkbox/rhf-checkbox.tsx","../src/components/rhf/rhf-switch/rhf-switch.tsx","../src/components/rhf/rhf-radio-group/rhf-radio-group.tsx","../src/components/rhf/rhf-radio-button-group/rhf-radio-button-group.tsx"],"names":["Form","FormProvider","FormFieldContext","FormField","props","jsx","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","fieldState","id","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body","RHFTextField","name","label","description","type","warningText","required","disabled","readOnly","placeholder","ariaLabel","ariaDescribedby","onBlur","other","control","field","jsxs","Input","e","Textarea","D","autoResize","internalRef","textarea","resizeTextarea","RHFTextarea","RHFCheckbox","Checkbox","RHFSwitch","Switch","RHFRadioGroup","hasOptions","RadioGroup","option","RadioItemContainer","RadioGroupItem","RadioItemLabel","RHFRadioButtonGroup","options","Button"],"mappings":"2VAiBMA,EAAOC,CAAAA,YAAAA,CASPC,EAAyB,CAAqC,CAAA,aAAA,CAAA,EAA2B,CAEzFC,CAAAA,CAAAA,CAAY,CAGhB,CACA,GAAGC,CACL,CAEIC,GAAAA,GAAAA,CAACH,EAAiB,QAAjB,CAAA,CAA0B,MAAO,CAAE,IAAA,CAAME,EAAM,IAAK,CAAA,CACnD,QAAAC,CAAAA,GAAAA,CAACC,WAAA,CAAY,GAAGF,EAAO,CACzB,CAAA,CAAA,CAIEG,EAAe,IAAM,CACzB,IAAMC,CAAqB,CAAA,CAAA,CAAA,UAAA,CAAWN,CAAgB,CAChDO,CAAAA,CAAAA,CAAoB,aAAWC,CAAe,CAAA,CAC9C,CAAE,aAAAC,C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,CAAM,CAAA,QAAA,CAASkB,EAAO,EAAE,CAAA,CACvC,KAAK,OACL,CAAA,cAAA,CAAclB,EAAM,KAAUkB,GAAAA,CAAAA,CAAO,GACrC,QAAU1B,CAAAA,CAAAA,CAET,SAAA0B,CAAO,CAAA,KAAA,CAAA,CARHA,EAAO,EASd,CACD,EACH,CACF,CAAA,CAAA,CACC9B,GAAe9B,GAACuB,CAAAA,CAAAA,CAAA,CAAiB,QAAAO,CAAAA,CAAAA,CAAY,EAC7CE,CAAehC,EAAAA,GAAAA,CAACuB,EAAA,CAAgB,SAAA,CAAU,eAAgB,QAAAS,CAAAA,CAAAA,CAAY,EACtEhB,CAAShB,EAAAA,GAAAA,CAACwB,EAAA,CAAa,QAAA,CAAAR,EAAM,OAAQ,CAAA,CAAA,CAAA,CACxC,EAEJ,CAEJ","file":"rhf.esm.js","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport {\n Controller,\n FormProvider,\n useFormContext,\n type ControllerProps,\n type FieldPath,\n type FieldValues\n} from \"react-hook-form\"\n\nimport { cn } from \"@/utils/cn\"\nimport { Label } from \"@/components/atoms/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>({} as FormFieldContextValue)\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>({} as FormItemContextValue)\n\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n </FormItemContext.Provider>\n )\n }\n)\nFormItem.displayName = \"FormItem\"\n\nconst FormLabel = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n ref={ref}\n className={cn(error && \"text-destructive\", className)}\n htmlFor={formItemId}\n {...props}\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 } = useFormField()\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\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 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 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","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { Input } from \"@/components/atoms/input\"\nimport { cn } from \"@/utils/cn\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFTextFieldProps } from \"./rhf-text-field.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A text field component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhftextfield--docs\n *\n * * @example\n * ```tsx\n * <Form>\n * <RHFTextField name=\"name\" label=\"Name\" />\n * <RHFTextField name=\"email\" label=\"Email\" />\n * </Form>\n * ```\n */\nexport function RHFTextField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n type = \"text\",\n warningText,\n required,\n disabled,\n readOnly,\n placeholder,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n onBlur,\n ...other\n}: RHFTextFieldProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem>\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <Input\n {...field}\n type={type}\n value={type === \"number\" && field.value === 0 ? \"\" : field.value}\n onChange={(e) => {\n if (type === \"number\") {\n field.onChange(Number(e.target.value))\n } else {\n field.onChange(e.target.value)\n }\n }}\n onBlur={(e) => {\n // trim if a string\n if (type !== \"number\" && typeof field.value === \"string\") {\n field.onChange(field.value.trim())\n }\n field.onBlur() // pass to react-hook-form\n onBlur?.(e) // pass to wrapper\n }}\n className={cn(\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n placeholder={placeholder}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n {...other}\n />\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </FormItem>\n )}\n />\n )\n}\n","import * as React from \"react\"\nimport { cn } from \"@/utils/index\"\nimport { TextareaProps } from \"./textarea.types\"\n\n/**\n * Textarea component for creating accessible text areas.\n * Built on top of shadcn/ui's Textarea component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-textarea--docs\n *\n * @example\n * ```tsx\n * <Textarea placeholder=\"Enter text\" />\n * ```\n */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, autoResize = false, ...props }, ref) => {\n const internalRef = React.useRef<HTMLTextAreaElement>(null)\n\n React.useEffect(() => {\n if (!autoResize || !internalRef.current) return\n\n const textarea = internalRef.current\n const resizeTextarea = () => {\n textarea.style.height = \"auto\"\n textarea.style.height = `${textarea.scrollHeight}px`\n }\n\n textarea.addEventListener(\"input\", resizeTextarea)\n resizeTextarea() // Initial resize\n\n return () => textarea.removeEventListener(\"input\", resizeTextarea)\n }, [autoResize])\n\n return (\n <textarea\n className={cn(\n \"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\n\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { Textarea } from \"@/components/atoms/textarea\"\nimport { cn } from \"@/utils/cn\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFTextareaProps } from \"./rhf-textarea.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A textarea component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhftextarea--docs\n *\n * @example\n * ```tsx\n * <Form>\n * <RHFTextarea name=\"description\" label=\"Description\" />\n * </Form>\n * ```\n */\nexport function RHFTextarea<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n placeholder,\n autoResize,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n onBlur,\n ...other\n}: RHFTextareaProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem>\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <Textarea\n {...field}\n value={field.value}\n onChange={(e) => {\n field.onChange(e.target.value)\n }}\n onBlur={(e) => {\n // trim if a string\n if (typeof field.value === \"string\") {\n field.onChange(field.value.trim())\n }\n field.onBlur() // pass to react-hook-form\n onBlur?.(e) // pass to wrapper\n }}\n className={cn(\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n placeholder={placeholder}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n autoResize={autoResize}\n {...other}\n />\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </FormItem>\n )}\n />\n )\n}\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { Checkbox } from \"@/components/atoms/checkbox\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFCheckboxProps } from \"./rhf-checkbox.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A checkbox component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfcheckbox--docs\n *\n * @example\n * ```tsx\n * <Form>\n * <RHFCheckbox name=\"terms\" label=\"Accept terms and conditions\" />\n * </Form>\n * ```\n */\nexport function RHFCheckbox<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n ...other\n}: RHFCheckboxProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem className=\"flex flex-row items-start space-x-3 space-y-0\">\n <FormControl>\n <Checkbox\n checked={field.value}\n onCheckedChange={field.onChange}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n {...other}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </div>\n </FormItem>\n )}\n />\n )\n}\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { Switch } from \"@/components/atoms/switch\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFSwitchProps } from \"./rhf-switch.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A switch component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfswitch--docs\n *\n * @example\n * ```tsx\n * <Form>\n * <RHFSwitch name=\"notifications\" label=\"Enable notifications\" />\n * </Form>\n * ```\n */\nexport function RHFSwitch<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n ...other\n}: RHFSwitchProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem className=\"flex flex-row items-start space-x-3 space-y-0\">\n <FormControl>\n <Switch\n checked={field.value}\n onCheckedChange={field.onChange}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n {...other}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </div>\n </FormItem>\n )}\n />\n )\n}\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport {\n RadioGroup,\n RadioGroupItem,\n RadioItemLabel,\n RadioItemContainer\n} from \"@/components/atoms/radio-group\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport {\n RHFRadioGroupOption,\n type RHFRadioGroupProps,\n type RHFRadioGroupWithOptionsProps\n} from \"./rhf-radio-group.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A radio group component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfradiogroup--docs\n *\n * @example\n * ```tsx\n * // Using children\n * <Form>\n * <RHFRadioGroup name=\"preference\" label=\"Select your preference\">\n * <RadioGroupItem value=\"option1\" label=\"Option 1\" />\n * <RadioGroupItem value=\"option2\" label=\"Option 2\" />\n * </RHFRadioGroup>\n * </Form>\n *\n * // Using options prop\n * <Form>\n * <RHFRadioGroup\n * name=\"preference\"\n * label=\"Select your preference\"\n * options={[\n * { id: \"option1\", label: \"Option 1\" },\n * { id: \"option2\", label: \"Option 2\" }\n * ]}\n * />\n * </Form>\n * ```\n */\nexport function RHFRadioGroup<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n children,\n ...other\n}: RHFRadioGroupProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n const hasOptions = \"options\" in other\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem className=\"space-y-3\">\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <RadioGroup\n onValueChange={field.onChange}\n defaultValue={field.value}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n {...other}\n >\n {hasOptions &&\n (other as RHFRadioGroupWithOptionsProps<TFieldValues, TName>).options.map(\n (option: RHFRadioGroupOption) => (\n <RadioItemContainer key={option.id}>\n <RadioGroupItem value={option.id} id={option.id} />\n <RadioItemLabel htmlFor={option.id}>{option.label}</RadioItemLabel>\n </RadioItemContainer>\n )\n )}\n {!hasOptions && children}\n </RadioGroup>\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </FormItem>\n )}\n />\n )\n}\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { RadioGroup } from \"@/components/atoms/radio-group\"\nimport { Button } from \"@/components/atoms/button\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFRadioButtonGroupProps } from \"./rhf-radio-button-group.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A radio button group component that integrates with React Hook Form.\n * Uses buttons instead of traditional radio inputs for a more modern look.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfradiobuttongroup--docs\n *\n * @example\n * ```tsx\n * <Form>\n * <RHFRadioButtonGroup\n * name=\"preference\"\n * label=\"Select your preference\"\n * options={[\n * { value: \"option1\", label: \"Option 1\" },\n * { value: \"option2\", label: \"Option 2\" },\n * { value: \"option3\", label: \"Option 3\" }\n * ]}\n * />\n * </Form>\n * ```\n */\nexport function RHFRadioButtonGroup<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n options,\n ...other\n}: RHFRadioButtonGroupProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem className=\"space-y-3\">\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <RadioGroup\n onValueChange={field.onChange}\n defaultValue={field.value}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n className=\"flex gap-2 p-2 border border-gray-200 rounded-md w-fit\"\n {...other}\n >\n {options.map((option) => (\n <Button\n key={option.id}\n size={option.size ?? \"sm\"}\n variant={field.value === option.id ? \"default\" : \"secondary\"}\n onClick={() => field.onChange(option.id)}\n role=\"radio\"\n aria-checked={field.value === option.id}\n disabled={disabled}\n >\n {option.label}\n </Button>\n ))}\n </RadioGroup>\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {warningText && <FormDescription className=\"text-warning\">{warningText}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n </FormItem>\n )}\n />\n )\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@me1a/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -73,13 +73,11 @@
|
|
|
73
73
|
"@babel/preset-env": "^7.27.2",
|
|
74
74
|
"@babel/preset-react": "^7.27.1",
|
|
75
75
|
"@babel/preset-typescript": "^7.27.1",
|
|
76
|
-
"@storybook/addon-a11y": "^
|
|
77
|
-
"@storybook/addon-
|
|
78
|
-
"@storybook/addon-
|
|
79
|
-
"@storybook/addon-onboarding": "^8.6.14",
|
|
76
|
+
"@storybook/addon-a11y": "^9.1.0-alpha.1",
|
|
77
|
+
"@storybook/addon-docs": "^9.1.0-alpha.1",
|
|
78
|
+
"@storybook/addon-onboarding": "^9.1.0-alpha.1",
|
|
80
79
|
"@storybook/blocks": "^8.6.14",
|
|
81
|
-
"@storybook/react": "^
|
|
82
|
-
"@storybook/react-vite": "^8.6.14",
|
|
80
|
+
"@storybook/react-vite": "^9.1.0-alpha.1",
|
|
83
81
|
"@storybook/test": "^8.6.14",
|
|
84
82
|
"@testing-library/jest-dom": "^6.6.3",
|
|
85
83
|
"@testing-library/react": "^16.3.0",
|
|
@@ -100,13 +98,13 @@
|
|
|
100
98
|
"eslint-plugin-prettier": "^5.4.0",
|
|
101
99
|
"eslint-plugin-react": "^7.33.2",
|
|
102
100
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
103
|
-
"eslint-plugin-storybook": "^
|
|
101
|
+
"eslint-plugin-storybook": "^9.1.0-alpha.1",
|
|
104
102
|
"jest": "^29.7.0",
|
|
105
103
|
"jest-environment-jsdom": "^29.7.0",
|
|
106
104
|
"postcss": "^8.5.3",
|
|
107
105
|
"prettier": "^3.2.5",
|
|
108
106
|
"prettier-plugin-tailwindcss": "^0.5.11",
|
|
109
|
-
"storybook": "^
|
|
107
|
+
"storybook": "^9.1.0-alpha.1",
|
|
110
108
|
"tailwindcss": "^3.4.17",
|
|
111
109
|
"tailwindcss-animate": "^1.0.7",
|
|
112
110
|
"ts-node": "^10.9.2",
|
|
@@ -115,19 +113,30 @@
|
|
|
115
113
|
},
|
|
116
114
|
"dependencies": {
|
|
117
115
|
"@hookform/resolvers": "^5.0.1",
|
|
116
|
+
"@radix-ui/react-accordion": "^1.2.11",
|
|
118
117
|
"@radix-ui/react-avatar": "^1.1.9",
|
|
119
|
-
"@radix-ui/react-
|
|
118
|
+
"@radix-ui/react-checkbox": "^1.3.2",
|
|
119
|
+
"@radix-ui/react-collapsible": "^1.1.11",
|
|
120
|
+
"@radix-ui/react-dialog": "^1.1.14",
|
|
120
121
|
"@radix-ui/react-dropdown-menu": "^2.1.14",
|
|
121
122
|
"@radix-ui/react-icons": "^1.3.0",
|
|
122
123
|
"@radix-ui/react-label": "^2.1.6",
|
|
123
124
|
"@radix-ui/react-navigation-menu": "^1.2.12",
|
|
125
|
+
"@radix-ui/react-popover": "^1.1.14",
|
|
126
|
+
"@radix-ui/react-radio-group": "^1.3.7",
|
|
127
|
+
"@radix-ui/react-select": "^2.2.5",
|
|
124
128
|
"@radix-ui/react-separator": "^1.1.6",
|
|
125
|
-
"@radix-ui/react-slot": "^1.2.
|
|
129
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
130
|
+
"@radix-ui/react-switch": "^1.2.5",
|
|
131
|
+
"@radix-ui/react-tabs": "^1.1.12",
|
|
126
132
|
"@radix-ui/react-toast": "^1.2.13",
|
|
127
133
|
"@radix-ui/react-tooltip": "^1.2.6",
|
|
134
|
+
"@tanstack/react-table": "^8.21.3",
|
|
128
135
|
"class-variance-authority": "^0.7.1",
|
|
129
136
|
"clsx": "^2.1.1",
|
|
137
|
+
"cmdk": "^1.1.1",
|
|
130
138
|
"lucide-react": "^0.511.0",
|
|
139
|
+
"react-resizable-panels": "^3.0.2",
|
|
131
140
|
"vaul": "^1.1.2",
|
|
132
141
|
"vite": "^6.3.5"
|
|
133
142
|
},
|
|
@@ -145,5 +154,8 @@
|
|
|
145
154
|
},
|
|
146
155
|
"homepage": "https://github.com/sergii-melnykov/ui#readme",
|
|
147
156
|
"description": "A modern UI library for Next.js applications",
|
|
148
|
-
"storybook": "https://sergii-melnykov.github.io/ui"
|
|
157
|
+
"storybook": "https://sergii-melnykov.github.io/ui",
|
|
158
|
+
"overrides": {
|
|
159
|
+
"storybook": "$storybook"
|
|
160
|
+
}
|
|
149
161
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-C26U3FL4.esm.js';import*as l from'react';import {Slot}from'@radix-ui/react-slot';import {cva}from'class-variance-authority';import {Loader2,X as X$1}from'lucide-react';import {jsx,jsxs}from'react/jsx-runtime';import*as v from'@radix-ui/react-separator';import*as t from'@radix-ui/react-dialog';import*as r from'@radix-ui/react-tooltip';var x=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),V=l.forwardRef(({className:o,variant:e,size:a$1,asChild:s=false,startIcon:m,endIcon:b,loading:p=false,disabled:k,children:f,type:g="button","aria-label":D,...c},P)=>{let R=s?Slot:"button",d=k||p,S=D||(typeof f=="string"?f:void 0),L=u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),!d&&c.onClick&&c.onClick(u));};return s?jsx(R,{className:a(x({variant:e,size:a$1,className:o})),ref:P,disabled:d,type:g,"aria-label":S,"aria-disabled":d,...c,children:f}):jsxs(R,{className:a(x({variant:e,size:a$1,className:o})),ref:P,disabled:d,type:g,"aria-label":S,"aria-disabled":d,onKeyDown:L,...c,children:[p&&jsx(Loader2,{className:"mr-2 h-4 w-4 animate-spin",role:"status","aria-label":"Loading","aria-hidden":"true"}),!p&&m&&jsx("span",{className:"mr-2","aria-hidden":"true",children:m}),f,!p&&b&&jsx("span",{className:"ml-2","aria-hidden":"true",children:b})]})});V.displayName="Button";var O=l.forwardRef(({className:o,orientation:e="horizontal",decorative:a$1=true,...s},m)=>jsx(v.Root,{ref:m,decorative:a$1,orientation:e,className:a("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",o),...s}));O.displayName=v.Root.displayName;var me=t.Root,de=t.Trigger,le=t.Close,F=t.Portal,w=l.forwardRef(({className:o,...e},a$1)=>jsx(t.Overlay,{className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",o),...e,ref:a$1}));w.displayName=t.Overlay.displayName;var X=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),q=l.forwardRef(({side:o="right",className:e,children:a$1,...s},m)=>jsxs(F,{children:[jsx(w,{}),jsxs(t.Content,{ref:m,className:a(X({side:o}),e),...s,children:[jsxs(t.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),a$1]})]}));q.displayName=t.Content.displayName;var G=({className:o,...e})=>jsx("div",{className:a("flex flex-col space-y-2 text-center sm:text-left",o),...e});G.displayName="SheetHeader";var J=({className:o,...e})=>jsx("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",o),...e});J.displayName="SheetFooter";var Q=l.forwardRef(({className:o,...e},a$1)=>jsx(t.Title,{ref:a$1,className:a("text-lg font-semibold text-foreground",o),...e}));Q.displayName=t.Title.displayName;var U=l.forwardRef(({className:o,...e},a$1)=>jsx(t.Description,{ref:a$1,className:a("text-sm text-muted-foreground",o),...e}));U.displayName=t.Description.displayName;function ue({className:o,...e}){return jsx("div",{className:a("animate-pulse rounded-md bg-primary/10",o),...e})}var be=r.Provider,ge=r.Root,Pe=r.Trigger,Z=l.forwardRef(({className:o,sideOffset:e=4,...a$1},s)=>jsx(r.Portal,{children:jsx(r.Content,{ref:s,sideOffset:e,className:a("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]",o),...a$1})}));Z.displayName=r.Content.displayName;export{x as a,V as b,O as c,me as d,de as e,le as f,F as g,w as h,q as i,G as j,J as k,Q as l,U as m,ue as n,be as o,ge as p,Pe as q,Z as r};//# sourceMappingURL=chunk-3HTFCAYW.esm.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-3HTFCAYW.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/atoms/button/button.tsx","../src/components/atoms/separator/separator.tsx","../src/components/atoms/sheet/sheet.tsx","../src/components/atoms/skeleton/skeleton.tsx","../src/components/atoms/tooltip/tooltip.tsx"],"names":["buttonVariants","cva","Button","N","className","variant","size","asChild","startIcon","endIcon","loading","disabled","children","type","ariaLabel","props","ref","Comp","Slot","isDisabled","buttonAriaLabel","handleKeyDown","event","jsx","cn","jsxs","Loader2","Separator","T","orientation","decorative","Sheet","SheetTrigger","SheetClose","SheetPortal","SheetOverlay","sheetVariants","SheetContent","side","X","SheetHeader","SheetFooter","SheetTitle","SheetDescription","Skeleton","TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","E","sideOffset"],"mappings":"2WAiBMA,CAAiBC,CAAAA,GAAAA,CACrB,wRACA,CAAA,CACE,SAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,gEACT,WAAa,CAAA,8EAAA,CACb,OACE,CAAA,0FAAA,CACF,UAAW,wEACX,CAAA,KAAA,CAAO,8CACP,CAAA,IAAA,CAAM,iDACR,CAAA,CACA,IAAM,CAAA,CACJ,QAAS,eACT,CAAA,EAAA,CAAI,6BACJ,CAAA,EAAA,CAAI,uBACJ,IAAM,CAAA,SACR,CACF,CAAA,CACA,gBAAiB,CACf,OAAA,CAAS,SACT,CAAA,IAAA,CAAM,SACR,CACF,CACF,CAmCMC,CAAAA,CAAAA,CAAeC,aACnB,CACE,CACE,SAAAC,CAAAA,CAAAA,CACA,QAAAC,CACA,CAAA,IAAA,CAAAC,GACA,CAAA,OAAA,CAAAC,EAAU,KACV,CAAA,SAAA,CAAAC,CACA,CAAA,OAAA,CAAAC,CACA,CAAA,OAAA,CAAAC,CAAU,CAAA,KAAA,CACV,SAAAC,CACA,CAAA,QAAA,CAAAC,CACA,CAAA,IAAA,CAAAC,EAAO,QACP,CAAA,YAAA,CAAcC,CACd,CAAA,GAAGC,CACL,CACAC,CAAAA,CAAAA,GACG,CACH,IAAMC,EAAOV,CAAUW,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mC,CAAA,CAAA,CAAA,QAAA,CAEnCC,GAA2B,CAE3BC,CAAAA,IAAAA,CAAAA,EAAAA,CAAkC,CAElCC,CAAAA,OAAAA,CAAAA,CAAAA,CAAuBC,CAG3B,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAA7C,EAAW,UAAA8C,CAAAA,CAAAA,CAAa,CAAG,CAAA,GAAGnC,GAAM,CAAGC,CAAAA,CAAAA,GAC1CO,GAAkB,CAAA,CAAA,CAAA,MAAA,CAAjB,CACC,QAAAA,CAAAA,GAAAA,CAAkB,CAAjB,CAAA,OAAA,CAAA,CACC,IAAKP,CACL,CAAA,UAAA,CAAYkC,CACZ,CAAA,SAAA,CAAW1B,EACT,qaACApB,CAAAA,CACF,CACC,CAAA,GAAGW,IACN,CACF,CAAA,CACD,EACDiC,CAAAA,CAAe,YAA+B,CAAQ,CAAA,OAAA,CAAA,WAAA","file":"chunk-3HTFCAYW.esm.js","sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@/utils/cn\"\nimport { ButtonProps } from \"./button.types\"\nimport { Loader2 } from \"lucide-react\"\n\n/**\n * Button variant styles using class-variance-authority.\n * Defines the visual styles for different button variants and sizes.\n * Follows WCAG 2.1 Level AA guidelines for accessibility.\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" size=\"lg\">Click me</Button>\n * ```\n */\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive: \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\"\n } as const,\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\"\n } as const\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n)\n\n/**\n * A versatile button component that supports multiple variants, sizes, and can be rendered as a child component.\n * Built on top of Radix UI's Slot primitive for maximum flexibility.\n * Implements proper accessibility features and follows WCAG 2.1 Level AA guidelines.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-button--docs\n *\n * @component\n * @example\n * ```tsx\n * // Default button\n * <Button>Click me</Button>\n *\n * // Destructive button with small size\n * <Button variant=\"destructive\" size=\"sm\">Delete</Button>\n *\n * // As a link\n * <Button variant=\"link\" asChild>\n * <a href=\"/about\">About</a>\n * </Button>\n *\n * // With icons\n * <Button startIcon={<Icon />}>With Start Icon</Button>\n * <Button endIcon={<Icon />}>With End Icon</Button>\n *\n * // Loading state\n * <Button loading>Loading</Button>\n * ```\n *\n * @param {ButtonProps} props - The component props\n * @param {React.Ref<HTMLButtonElement>} ref - Forwarded ref\n * @returns {JSX.Element} A button element\n */\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n startIcon,\n endIcon,\n loading = false,\n disabled,\n children,\n type = \"button\",\n \"aria-label\": ariaLabel,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const isDisabled = disabled || loading\n const buttonAriaLabel = ariaLabel || (typeof children === \"string\" ? children : undefined)\n\n // Handle keyboard interaction\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault()\n if (!isDisabled && props.onClick) {\n props.onClick(event as unknown as React.MouseEvent<HTMLButtonElement>)\n }\n }\n }\n\n if (asChild) {\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={isDisabled}\n type={type}\n aria-label={buttonAriaLabel}\n aria-disabled={isDisabled}\n {...props}\n >\n {children}\n </Comp>\n )\n }\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={isDisabled}\n type={type}\n aria-label={buttonAriaLabel}\n aria-disabled={isDisabled}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {loading && (\n <Loader2\n className=\"mr-2 h-4 w-4 animate-spin\"\n role=\"status\"\n aria-label=\"Loading\"\n aria-hidden=\"true\"\n />\n )}\n {!loading && startIcon && (\n <span className=\"mr-2\" aria-hidden=\"true\">\n {startIcon}\n </span>\n )}\n {children}\n {!loading && endIcon && (\n <span className=\"ml-2\" aria-hidden=\"true\">\n {endIcon}\n </span>\n )}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import * as React from \"react\"\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\n\nimport { cn } from \"@/utils/index\"\n\n/**\n * Separator component for creating horizontal or vertical dividers.\n * Built on top of Radix UI's Separator primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-separator--docs\n *\n */\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = \"horizontal\", decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className\n )}\n {...props}\n />\n))\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }\n","\"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/index\"\n\n/**\n * Sheet component for creating accessible sheets with overlay and content.\n * Built on top of Radix UI's Sheet primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-sheet--docs\n *\n * @example\n * ```tsx\n * <Sheet>\n * <SheetTrigger>Open Sheet</SheetTrigger>\n * <SheetContent>Sheet Content</SheetContent>\n * </Sheet>\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-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n ref={ref}\n />\n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\"\n }\n },\n defaultVariants: {\n side: \"right\"\n }\n }\n)\n\ninterface SheetContentProps\n extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> {}\n\nconst SheetContent = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n {children}\n </SheetPrimitive.Content>\n </SheetPortal>\n))\nSheetContent.displayName = SheetPrimitive.Content.displayName\n\nconst SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)} {...props} />\n)\nSheetHeader.displayName = \"SheetHeader\"\n\nconst SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\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-lg 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","import { cn } from \"@/utils/index\"\n\n/**\n * Skeleton component for creating a loading state.\n * Built on top of shadcn/ui's Skeleton component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-skeleton--docs\n *\n * @example\n * ```tsx\n * <Skeleton className=\"w-10 h-10\" />\n * ```\n */\nfunction Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return <div className={cn(\"animate-pulse rounded-md bg-primary/10\", className)} {...props} />\n}\n\nexport { Skeleton }\n","import * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/utils/index\"\n\n/**\n * TooltipProvider component for creating accessible tooltips.\n * Built on top of Radix UI's Tooltip primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-tooltip--docs\n *\n * @example\n * ```tsx\n * <TooltipProvider>\n * <Tooltip>\n * <TooltipTrigger>Hover me</TooltipTrigger>\n * <TooltipContent>Tooltip content</TooltipContent>\n * </Tooltip>\n * </TooltipProvider>\n * ```\n */\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-M4S5YZ56.esm.js';import {o,d,i,j as j$1,l,m,b,c,p,q as q$1,r as r$1,n as n$1}from'./chunk-3HTFCAYW.esm.js';import {a as a$2}from'./chunk-EBPUGBUT.esm.js';import {a}from'./chunk-C26U3FL4.esm.js';import*as n from'react';import {Drawer}from'vaul';import {jsx,jsxs}from'react/jsx-runtime';import {Slot}from'@radix-ui/react-slot';import {cva}from'class-variance-authority';import {PanelLeft,ChevronRight,Check,Circle}from'lucide-react';import*as r from'@radix-ui/react-dropdown-menu';var ne=({shouldScaleBackground:t=true,...e})=>jsx(Drawer.Root,{shouldScaleBackground:t,...e});ne.displayName="Drawer";var tt=Drawer.Trigger,ie=Drawer.Portal,ot=Drawer.Close,U=n.forwardRef(({className:t,...e},o)=>jsx(Drawer.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-black/80",t),...e}));U.displayName=Drawer.Overlay.displayName;var de=n.forwardRef(({className:t,children:e,...o},d)=>jsxs(ie,{children:[jsx(U,{}),jsxs(Drawer.Content,{ref:d,className:a("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...o,children:[jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),e]})]}));de.displayName="DrawerContent";var se=({className:t,...e})=>jsx("div",{className:a("grid gap-1.5 p-4 text-center sm:text-left",t),...e});se.displayName="DrawerHeader";var le=({className:t,...e})=>jsx("div",{className:a("mt-auto flex flex-col gap-2 p-4",t),...e});le.displayName="DrawerFooter";var pe=n.forwardRef(({className:t,...e},o)=>jsx(Drawer.Title,{ref:o,className:a("text-lg font-semibold leading-none tracking-tight",t),...e}));pe.displayName=Drawer.Title.displayName;var ce=n.forwardRef(({className:t,...e},o)=>jsx(Drawer.Description,{ref:o,className:a("text-sm text-muted-foreground",t),...e}));ce.displayName=Drawer.Description.displayName;var fe="sidebar_state",be=60*60*24*7,ge="16rem",we="18rem",ve="3rem",Re="b",j=n.createContext(null);function N(){let t=n.useContext(j);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}var he=n.forwardRef(({defaultOpen:t=true,open:e,onOpenChange:o$1,className:d,style:s,children:p,...v},M)=>{let m=a$1(),[R,b]=n.useState(false),[S,ae]=n.useState(t),x=e??S,P=n.useCallback(u=>{let g=typeof u=="function"?u(x):u;o$1?o$1(g):ae(g),document.cookie=`${fe}=${g}; path=/; max-age=${be}`;},[o$1,x]),C=n.useCallback(()=>m?b(u=>!u):P(u=>!u),[m,P,b]);n.useEffect(()=>{let u=g=>{g.key===Re&&(g.metaKey||g.ctrlKey)&&(g.preventDefault(),C());};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[C]);let E=x?"expanded":"collapsed",re=n.useMemo(()=>({state:E,open:x,setOpen:P,isMobile:m,openMobile:R,setOpenMobile:b,toggleSidebar:C}),[E,x,P,m,R,b,C]);return jsx(j.Provider,{value:re,children:jsx(o,{delayDuration:0,children:jsx("div",{style:{"--sidebar-width":ge,"--sidebar-width-icon":ve,...s},className:a("group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar",d),ref:M,...v,children:p})})})});he.displayName="SidebarProvider";var Me=n.forwardRef(({side:t="left",variant:e="sidebar",collapsible:o="offcanvas",className:d$1,children:s,...p},v)=>{let{isMobile:M,state:m$1,openMobile:R,setOpenMobile:b}=N();return o==="none"?jsx("div",{className:a("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",d$1),ref:v,...p,children:s}):M?jsx(d,{open:R,onOpenChange:b,...p,children:jsxs(i,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":we},side:t,children:[jsxs(j$1,{className:"sr-only",children:[jsx(l,{children:"Sidebar"}),jsx(m,{children:"Displays the mobile sidebar."})]}),jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):jsxs("div",{ref:v,className:"group peer hidden text-sidebar-foreground md:block","data-state":m$1,"data-collapsible":m$1==="collapsed"?o:"","data-variant":e,"data-side":t,children:[jsx("div",{className:a("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),jsx("div",{className:a("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",d$1),...p,children:jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:s})})]})});Me.displayName="Sidebar";var xe=n.forwardRef(({className:t,onClick:e,...o},d)=>{let{toggleSidebar:s}=N();return jsxs(b,{ref:d,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:a("h-7 w-7",t),onClick:p=>{e?.(p),s();},...o,children:[jsx(PanelLeft,{}),jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});xe.displayName="SidebarTrigger";var De=n.forwardRef(({className:t,...e},o)=>{let{toggleSidebar:d}=N();return jsx("button",{ref:o,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:d,title:"Toggle Sidebar",className:a("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t),...e})});De.displayName="SidebarRail";var ye=n.forwardRef(({className:t,...e},o)=>jsx("main",{ref:o,className:a("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",t),...e}));ye.displayName="SidebarInset";var Se=n.forwardRef(({className:t,...e},o)=>jsx(a$2,{ref:o,"data-sidebar":"input",className:a("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",t),...e}));Se.displayName="SidebarInput";var Pe=n.forwardRef(({className:t,...e},o)=>jsx("div",{ref:o,"data-sidebar":"header",className:a("flex flex-col gap-2 p-2",t),...e}));Pe.displayName="SidebarHeader";var Ce=n.forwardRef(({className:t,...e},o)=>jsx("div",{ref:o,"data-sidebar":"footer",className:a("flex flex-col gap-2 p-2",t),...e}));Ce.displayName="SidebarFooter";var Ne=n.forwardRef(({className:t,...e},o)=>jsx(c,{ref:o,"data-sidebar":"separator",className:a("mx-2 w-auto bg-sidebar-border",t),...e}));Ne.displayName="SidebarSeparator";var Te=n.forwardRef(({className:t,...e},o)=>jsx("div",{ref:o,"data-sidebar":"content",className:a("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...e}));Te.displayName="SidebarContent";var Ie=n.forwardRef(({className:t,...e},o)=>jsx("div",{ref:o,"data-sidebar":"group",className:a("relative flex w-full min-w-0 flex-col p-2",t),...e}));Ie.displayName="SidebarGroup";var Ee=n.forwardRef(({className:t,asChild:e=false,...o},d)=>jsx(e?Slot:"div",{ref:d,"data-sidebar":"group-label",className:a("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...o}));Ee.displayName="SidebarGroupLabel";var Le=n.forwardRef(({className:t,asChild:e=false,...o},d)=>jsx(e?Slot:"button",{ref:d,"data-sidebar":"group-action",className:a("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",t),...o}));Le.displayName="SidebarGroupAction";var ke=n.forwardRef(({className:t,...e},o)=>jsx("div",{ref:o,"data-sidebar":"group-content",className:a("w-full text-sm",t),...e}));ke.displayName="SidebarGroupContent";var He=n.forwardRef(({className:t,...e},o)=>jsx("ul",{ref:o,"data-sidebar":"menu",className:a("flex w-full min-w-0 flex-col gap-1",t),...e}));He.displayName="SidebarMenu";var _e=n.forwardRef(({className:t,...e},o)=>jsx("li",{ref:o,"data-sidebar":"menu-item",className:a("group/menu-item relative",t),...e}));_e.displayName="SidebarMenuItem";var ze=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Be=n.forwardRef(({asChild:t=false,isActive:e=false,variant:o="default",size:d="default",tooltip:s,className:p$1,...v},M)=>{let m=t?Slot:"button",{isMobile:R,state:b}=N(),S=jsx(m,{ref:M,"data-sidebar":"menu-button","data-size":d,"data-active":e,className:a(ze({variant:o,size:d}),p$1),...v});return s?(typeof s=="string"&&(s={children:s}),jsxs(p,{children:[jsx(q$1,{asChild:true,children:S}),jsx(r$1,{side:"right",align:"center",hidden:b!=="collapsed"||R,...s})]})):S});Be.displayName="SidebarMenuButton";var Oe=n.forwardRef(({className:t,asChild:e=false,showOnHover:o=false,...d},s)=>jsx(e?Slot:"button",{ref:s,"data-sidebar":"menu-action",className:a("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",o&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",t),...d}));Oe.displayName="SidebarMenuAction";var Ae=n.forwardRef(({className:t,...e},o)=>jsx("div",{ref:o,"data-sidebar":"menu-badge",className:a("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t),...e}));Ae.displayName="SidebarMenuBadge";var Ge=n.forwardRef(({className:t,showIcon:e=false,...o},d)=>{let s=n.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return jsxs("div",{ref:d,"data-sidebar":"menu-skeleton",className:a("flex h-8 items-center gap-2 rounded-md px-2",t),...o,children:[e&&jsx(n$1,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),jsx(n$1,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});Ge.displayName="SidebarMenuSkeleton";var We=n.forwardRef(({className:t,...e},o)=>jsx("ul",{ref:o,"data-sidebar":"menu-sub",className:a("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...e}));We.displayName="SidebarMenuSub";var Ke=n.forwardRef(({...t},e)=>jsx("li",{ref:e,...t}));Ke.displayName="SidebarMenuSubItem";var Ve=n.forwardRef(({asChild:t=false,size:e="md",isActive:o,className:d,...s},p)=>jsx(t?Slot:"a",{ref:p,"data-sidebar":"menu-sub-button","data-size":e,"data-active":o,className:a("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",d),...s}));Ve.displayName="SidebarMenuSubButton";var je=r.Root,qe=r.Trigger,Xe=r.Group,Ye=r.Portal,Je=r.Sub,Qe=r.RadioGroup,q=n.forwardRef(({className:t,inset:e,children:o,...d},s)=>jsxs(r.SubTrigger,{ref:s,className:a("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",e&&"pl-8",t),...d,children:[o,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]}));q.displayName=r.SubTrigger.displayName;var X=n.forwardRef(({className:t,...e},o)=>jsx(r.SubContent,{ref:o,className:a("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));X.displayName=r.SubContent.displayName;var Y=n.forwardRef(({className:t,sideOffset:e=4,...o},d)=>jsx(r.Portal,{children:jsx(r.Content,{ref:d,sideOffset:e,className:a("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...o})}));Y.displayName=r.Content.displayName;var J=n.forwardRef(({className:t,inset:e,...o},d)=>jsx(r.Item,{ref:d,className:a("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...o}));J.displayName=r.Item.displayName;var Q=n.forwardRef(({className:t,children:e,checked:o,...d},s)=>jsxs(r.CheckboxItem,{ref:s,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:o,...d,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(r.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),e]}));Q.displayName=r.CheckboxItem.displayName;var Z=n.forwardRef(({className:t,children:e,...o},d)=>jsxs(r.RadioItem,{ref:d,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(r.ItemIndicator,{children:jsx(Circle,{className:"h-2 w-2 fill-current"})})}),e]}));Z.displayName=r.RadioItem.displayName;var ee=n.forwardRef(({className:t,inset:e,...o},d)=>jsx(r.Label,{ref:d,className:a("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...o}));ee.displayName=r.Label.displayName;var te=n.forwardRef(({className:t,...e},o)=>jsx(r.Separator,{ref:o,className:a("-mx-1 my-1 h-px bg-muted",t),...e}));te.displayName=r.Separator.displayName;var oe=({className:t,...e})=>jsx("span",{className:a("ml-auto text-xs tracking-widest opacity-60",t),...e});oe.displayName="DropdownMenuShortcut";export{_e as A,ze as B,Be as C,Oe as D,Ae as E,Ge as F,We as G,Ke as H,Ve as I,je as J,qe as K,Xe as L,Ye as M,Je as N,Qe as O,q as P,X as Q,Y as R,J as S,Q as T,Z as U,ee as V,te as W,oe as X,ne as a,tt as b,ie as c,ot as d,U as e,de as f,se as g,le as h,pe as i,ce as j,N as k,he as l,Me as m,xe as n,De as o,ye as p,Se as q,Pe as r,Ce as s,Ne as t,Te as u,Ie as v,Ee as w,Le as x,ke as y,He as z};//# sourceMappingURL=chunk-5ZMFQLBF.esm.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-5ZMFQLBF.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-C26U3FL4.esm.js';import*as t from'react';import*as e from'@radix-ui/react-label';import {cva}from'class-variance-authority';import {jsx}from'react/jsx-runtime';var m=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),a=t.forwardRef(({className:r,...i},p)=>jsx(e.Root,{ref:p,className:a$1(m(),r),...i}));a.displayName=e.Root.displayName;export{a};//# sourceMappingURL=chunk-7NN2L46N.esm.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-7NN2L46N.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/atoms/label/label.tsx"],"names":["labelVariants","cva","Label","className","props","ref","jsx","cn"],"mappings":"8LAMA,IAAMA,EAAgBC,GACpB,CAAA,4FACF,EAaMC,CAAc,CAAA,CAAA,CAAA,UAAA,CAClB,CAAC,CAAE,SAAA,CAAAC,EAAW,GAAGC,CAAM,EAAGC,CACxBC,GAAAA,GAAAA,CAAgB,OAAf,CAAoB,GAAA,CAAKD,EAAK,SAAWE,CAAAA,GAAAA,CAAGP,GAAiBG,CAAAA,CAAS,EAAI,GAAGC,CAAAA,CAAO,CAEzF,EACAF,CAAAA,CAAM,YAA6B,CAAK,CAAA,IAAA,CAAA,WAAA","file":"chunk-7NN2L46N.esm.js","sourcesContent":["import * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils/index\"\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n)\n\nexport interface LabelProps\n extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>,\n VariantProps<typeof labelVariants> {}\n\n/**\n * Label component for creating accessible labels.\n * Built on top of Radix UI's Label primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-label--docs\n *\n */\nconst Label = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, LabelProps>(\n ({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n )\n)\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkSL2ZUI4G_cjs_js=require('./chunk-SL2ZUI4G.cjs.js'),t=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var t__namespace=/*#__PURE__*/_interopNamespace(t);var s=t__namespace.forwardRef(({className:o,type:r,...n},i)=>jsxRuntime.jsx("input",{type:r,className:chunkSL2ZUI4G_cjs_js.a("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",o),ref:i,...n}));s.displayName="Input";exports.a=s;//# sourceMappingURL=chunk-BR7Z6MCL.cjs.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-BR7Z6MCL.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/atoms/input/input.tsx"],"names":["Input","t","className","type","props","ref","jsx","cn"],"mappings":"0eAWMA,IAAAA,CAAAA,CAAcC,YAClB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAAC,CAAAA,CAAAA,CAAW,IAAAC,CAAAA,CAAAA,CAAM,GAAGC,CAAM,CAAA,CAAGC,CAE5BC,GAAAA,cAAAA,CAAC,OACC,CAAA,CAAA,IAAA,CAAMH,CACN,CAAA,SAAA,CAAWI,uBACT,yWACAL,CAAAA,CACF,CACA,CAAA,GAAA,CAAKG,EACJ,GAAGD,CAAAA,CACN,CAGN,EACAJ,EAAM,WAAc,CAAA,OAAA","file":"chunk-BR7Z6MCL.cjs.js","sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@/utils/cn\"\n\n/**\n * Input component for creating accessible input fields.\n * Built on top of shadcn/ui's Input component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-input--docs\n *\n */\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkSL2ZUI4G_cjs_js=require('./chunk-SL2ZUI4G.cjs.js'),l=require('react'),reactSlot=require('@radix-ui/react-slot'),classVarianceAuthority=require('class-variance-authority'),lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime'),v=require('@radix-ui/react-separator'),t=require('@radix-ui/react-dialog'),r=require('@radix-ui/react-tooltip');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var l__namespace=/*#__PURE__*/_interopNamespace(l);var v__namespace=/*#__PURE__*/_interopNamespace(v);var t__namespace=/*#__PURE__*/_interopNamespace(t);var r__namespace=/*#__PURE__*/_interopNamespace(r);var x=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),V=l__namespace.forwardRef(({className:o,variant:e,size:a,asChild:s=false,startIcon:m,endIcon:b,loading:p=false,disabled:k,children:f,type:g="button","aria-label":D,...c},P)=>{let R=s?reactSlot.Slot:"button",d=k||p,S=D||(typeof f=="string"?f:void 0),L=u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),!d&&c.onClick&&c.onClick(u));};return s?jsxRuntime.jsx(R,{className:chunkSL2ZUI4G_cjs_js.a(x({variant:e,size:a,className:o})),ref:P,disabled:d,type:g,"aria-label":S,"aria-disabled":d,...c,children:f}):jsxRuntime.jsxs(R,{className:chunkSL2ZUI4G_cjs_js.a(x({variant:e,size:a,className:o})),ref:P,disabled:d,type:g,"aria-label":S,"aria-disabled":d,onKeyDown:L,...c,children:[p&&jsxRuntime.jsx(lucideReact.Loader2,{className:"mr-2 h-4 w-4 animate-spin",role:"status","aria-label":"Loading","aria-hidden":"true"}),!p&&m&&jsxRuntime.jsx("span",{className:"mr-2","aria-hidden":"true",children:m}),f,!p&&b&&jsxRuntime.jsx("span",{className:"ml-2","aria-hidden":"true",children:b})]})});V.displayName="Button";var O=l__namespace.forwardRef(({className:o,orientation:e="horizontal",decorative:a=true,...s},m)=>jsxRuntime.jsx(v__namespace.Root,{ref:m,decorative:a,orientation:e,className:chunkSL2ZUI4G_cjs_js.a("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",o),...s}));O.displayName=v__namespace.Root.displayName;var me=t__namespace.Root,de=t__namespace.Trigger,le=t__namespace.Close,F=t__namespace.Portal,w=l__namespace.forwardRef(({className:o,...e},a)=>jsxRuntime.jsx(t__namespace.Overlay,{className:chunkSL2ZUI4G_cjs_js.a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",o),...e,ref:a}));w.displayName=t__namespace.Overlay.displayName;var X=classVarianceAuthority.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),q=l__namespace.forwardRef(({side:o="right",className:e,children:a,...s},m)=>jsxRuntime.jsxs(F,{children:[jsxRuntime.jsx(w,{}),jsxRuntime.jsxs(t__namespace.Content,{ref:m,className:chunkSL2ZUI4G_cjs_js.a(X({side:o}),e),...s,children:[jsxRuntime.jsxs(t__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));q.displayName=t__namespace.Content.displayName;var G=({className:o,...e})=>jsxRuntime.jsx("div",{className:chunkSL2ZUI4G_cjs_js.a("flex flex-col space-y-2 text-center sm:text-left",o),...e});G.displayName="SheetHeader";var J=({className:o,...e})=>jsxRuntime.jsx("div",{className:chunkSL2ZUI4G_cjs_js.a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",o),...e});J.displayName="SheetFooter";var Q=l__namespace.forwardRef(({className:o,...e},a)=>jsxRuntime.jsx(t__namespace.Title,{ref:a,className:chunkSL2ZUI4G_cjs_js.a("text-lg font-semibold text-foreground",o),...e}));Q.displayName=t__namespace.Title.displayName;var U=l__namespace.forwardRef(({className:o,...e},a)=>jsxRuntime.jsx(t__namespace.Description,{ref:a,className:chunkSL2ZUI4G_cjs_js.a("text-sm text-muted-foreground",o),...e}));U.displayName=t__namespace.Description.displayName;function ue({className:o,...e}){return jsxRuntime.jsx("div",{className:chunkSL2ZUI4G_cjs_js.a("animate-pulse rounded-md bg-primary/10",o),...e})}var be=r__namespace.Provider,ge=r__namespace.Root,Pe=r__namespace.Trigger,Z=l__namespace.forwardRef(({className:o,sideOffset:e=4,...a},s)=>jsxRuntime.jsx(r__namespace.Portal,{children:jsxRuntime.jsx(r__namespace.Content,{ref:s,sideOffset:e,className:chunkSL2ZUI4G_cjs_js.a("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]",o),...a})}));Z.displayName=r__namespace.Content.displayName;exports.a=x;exports.b=V;exports.c=O;exports.d=me;exports.e=de;exports.f=le;exports.g=F;exports.h=w;exports.i=q;exports.j=G;exports.k=J;exports.l=Q;exports.m=U;exports.n=ue;exports.o=be;exports.p=ge;exports.q=Pe;exports.r=Z;//# sourceMappingURL=chunk-C4ZAMI2P.cjs.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-C4ZAMI2P.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/atoms/button/button.tsx","../src/components/atoms/separator/separator.tsx","../src/components/atoms/sheet/sheet.tsx","../src/components/atoms/skeleton/skeleton.tsx","../src/components/atoms/tooltip/tooltip.tsx"],"names":["buttonVariants","cva","Button","N","className","variant","size","asChild","startIcon","endIcon","loading","disabled","children","type","ariaLabel","props","ref","Comp","Slot","isDisabled","buttonAriaLabel","handleKeyDown","event","jsx","cn","jsxs","Loader2","Separator","T","orientation","decorative","v","Sheet","t","SheetTrigger","SheetClose","SheetPortal","SheetOverlay","l","sheetVariants","SheetContent","side","X","SheetHeader","SheetFooter","SheetTitle","SheetDescription","Skeleton","TooltipProvider","r","Tooltip","TooltipTrigger","TooltipContent","E","sideOffset"],"mappings":"g4BAiBMA,CAAiBC,CAAAA,0BAAAA,CACrB,wRACA,CAAA,CACE,SAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,gEACT,WAAa,CAAA,8EAAA,CACb,OACE,CAAA,0FAAA,CACF,UAAW,wEACX,CAAA,KAAA,CAAO,8CACP,CAAA,IAAA,CAAM,iDACR,CAAA,CACA,IAAM,CAAA,CACJ,QAAS,eACT,CAAA,EAAA,CAAI,6BACJ,CAAA,EAAA,CAAI,uBACJ,IAAM,CAAA,SACR,CACF,CAAA,CACA,gBAAiB,CACf,OAAA,CAAS,SACT,CAAA,IAAA,CAAM,SACR,CACF,CACF,CAmCMC,CAAAA,CAAAA,CAAeC,wBACnB,CACE,CACE,SAAAC,CAAAA,CAAAA,CACA,QAAAC,CACA,CAAA,IAAA,CAAAC,CACA,CAAA,OAAA,CAAAC,EAAU,KACV,CAAA,SAAA,CAAAC,CACA,CAAA,OAAA,CAAAC,CACA,CAAA,OAAA,CAAAC,CAAU,CAAA,KAAA,CACV,SAAAC,CACA,CAAA,QAAA,CAAAC,CACA,CAAA,IAAA,CAAAC,EAAO,QACP,CAAA,YAAA,CAAcC,CACd,CAAA,GAAGC,CACL,CACAC,CAAAA,CAAAA,GACG,CACH,IAAMC,EAAOV,CAAUW,CAAAA,cAAAA,CAAO,QACxBC,CAAAA,CAAAA,CAAaR,GAAYD,CACzBU,CAAAA,CAAAA,CAAkBN,CAAc,GAAA,OAAOF,GAAa,QAAWA,CAAAA,CAAAA,CAAW,MAG1ES,CAAAA,CAA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AA,OAAAA,CAAAA,CAAAA,CAAuBC,YAG3B,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAjD,EAAW,UAAAkD,CAAAA,CAAAA,CAAa,CAAG,CAAA,GAAGvC,CAAM,CAAGC,CAAAA,CAAAA,GAC1CO,cAAkB,CAAA0B,YAAA,CAAA,MAAA,CAAjB,CACC,QAAA1B,CAAAA,cAAAA,CAAkB0B,YAAjB,CAAA,OAAA,CAAA,CACC,IAAKjC,CACL,CAAA,UAAA,CAAYsC,CACZ,CAAA,SAAA,CAAW9B,uBACT,qaACApB,CAAAA,CACF,CACC,CAAA,GAAGW,EACN,CACF,CAAA,CACD,EACDqC,CAAAA,CAAe,YAA+BH,YAAQ,CAAA,OAAA,CAAA,WAAA","file":"chunk-C4ZAMI2P.cjs.js","sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@/utils/cn\"\nimport { ButtonProps } from \"./button.types\"\nimport { Loader2 } from \"lucide-react\"\n\n/**\n * Button variant styles using class-variance-authority.\n * Defines the visual styles for different button variants and sizes.\n * Follows WCAG 2.1 Level AA guidelines for accessibility.\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" size=\"lg\">Click me</Button>\n * ```\n */\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive: \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\"\n } as const,\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\"\n } as const\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n)\n\n/**\n * A versatile button component that supports multiple variants, sizes, and can be rendered as a child component.\n * Built on top of Radix UI's Slot primitive for maximum flexibility.\n * Implements proper accessibility features and follows WCAG 2.1 Level AA guidelines.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-button--docs\n *\n * @component\n * @example\n * ```tsx\n * // Default button\n * <Button>Click me</Button>\n *\n * // Destructive button with small size\n * <Button variant=\"destructive\" size=\"sm\">Delete</Button>\n *\n * // As a link\n * <Button variant=\"link\" asChild>\n * <a href=\"/about\">About</a>\n * </Button>\n *\n * // With icons\n * <Button startIcon={<Icon />}>With Start Icon</Button>\n * <Button endIcon={<Icon />}>With End Icon</Button>\n *\n * // Loading state\n * <Button loading>Loading</Button>\n * ```\n *\n * @param {ButtonProps} props - The component props\n * @param {React.Ref<HTMLButtonElement>} ref - Forwarded ref\n * @returns {JSX.Element} A button element\n */\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n startIcon,\n endIcon,\n loading = false,\n disabled,\n children,\n type = \"button\",\n \"aria-label\": ariaLabel,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const isDisabled = disabled || loading\n const buttonAriaLabel = ariaLabel || (typeof children === \"string\" ? children : undefined)\n\n // Handle keyboard interaction\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault()\n if (!isDisabled && props.onClick) {\n props.onClick(event as unknown as React.MouseEvent<HTMLButtonElement>)\n }\n }\n }\n\n if (asChild) {\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={isDisabled}\n type={type}\n aria-label={buttonAriaLabel}\n aria-disabled={isDisabled}\n {...props}\n >\n {children}\n </Comp>\n )\n }\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={isDisabled}\n type={type}\n aria-label={buttonAriaLabel}\n aria-disabled={isDisabled}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {loading && (\n <Loader2\n className=\"mr-2 h-4 w-4 animate-spin\"\n role=\"status\"\n aria-label=\"Loading\"\n aria-hidden=\"true\"\n />\n )}\n {!loading && startIcon && (\n <span className=\"mr-2\" aria-hidden=\"true\">\n {startIcon}\n </span>\n )}\n {children}\n {!loading && endIcon && (\n <span className=\"ml-2\" aria-hidden=\"true\">\n {endIcon}\n </span>\n )}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import * as React from \"react\"\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\n\nimport { cn } from \"@/utils/index\"\n\n/**\n * Separator component for creating horizontal or vertical dividers.\n * Built on top of Radix UI's Separator primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-separator--docs\n *\n */\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = \"horizontal\", decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className\n )}\n {...props}\n />\n))\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }\n","\"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/index\"\n\n/**\n * Sheet component for creating accessible sheets with overlay and content.\n * Built on top of Radix UI's Sheet primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-sheet--docs\n *\n * @example\n * ```tsx\n * <Sheet>\n * <SheetTrigger>Open Sheet</SheetTrigger>\n * <SheetContent>Sheet Content</SheetContent>\n * </Sheet>\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-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n ref={ref}\n />\n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\"\n }\n },\n defaultVariants: {\n side: \"right\"\n }\n }\n)\n\ninterface SheetContentProps\n extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> {}\n\nconst SheetContent = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n {children}\n </SheetPrimitive.Content>\n </SheetPortal>\n))\nSheetContent.displayName = SheetPrimitive.Content.displayName\n\nconst SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)} {...props} />\n)\nSheetHeader.displayName = \"SheetHeader\"\n\nconst SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\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-lg 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","import { cn } from \"@/utils/index\"\n\n/**\n * Skeleton component for creating a loading state.\n * Built on top of shadcn/ui's Skeleton component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-skeleton--docs\n *\n * @example\n * ```tsx\n * <Skeleton className=\"w-10 h-10\" />\n * ```\n */\nfunction Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return <div className={cn(\"animate-pulse rounded-md bg-primary/10\", className)} {...props} />\n}\n\nexport { Skeleton }\n","import * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/utils/index\"\n\n/**\n * TooltipProvider component for creating accessible tooltips.\n * Built on top of Radix UI's Tooltip primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-tooltip--docs\n *\n * @example\n * ```tsx\n * <TooltipProvider>\n * <Tooltip>\n * <TooltipTrigger>Hover me</TooltipTrigger>\n * <TooltipContent>Tooltip content</TooltipContent>\n * </Tooltip>\n * </TooltipProvider>\n * ```\n */\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-C26U3FL4.esm.js';import*as t from'react';import {jsx}from'react/jsx-runtime';var s=t.forwardRef(({className:o,type:r,...n},i)=>jsx("input",{type:r,className:a("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",o),ref:i,...n}));s.displayName="Input";export{s as a};//# sourceMappingURL=chunk-EBPUGBUT.esm.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-EBPUGBUT.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/atoms/input/input.tsx"],"names":["Input","className","type","props","ref","jsx","cn"],"mappings":"oGAWMA,IAAAA,CAAAA,CAAc,CAClB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAAC,CAAAA,CAAAA,CAAW,IAAAC,CAAAA,CAAAA,CAAM,GAAGC,CAAM,CAAA,CAAGC,CAE5BC,GAAAA,GAAAA,CAAC,OACC,CAAA,CAAA,IAAA,CAAMH,CACN,CAAA,SAAA,CAAWI,EACT,yWACAL,CAAAA,CACF,CACA,CAAA,GAAA,CAAKG,EACJ,GAAGD,CAAAA,CACN,CAGN,EACAH,EAAM,WAAc,CAAA,OAAA","file":"chunk-EBPUGBUT.esm.js","sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@/utils/cn\"\n\n/**\n * Input component for creating accessible input fields.\n * Built on top of shadcn/ui's Input component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-input--docs\n *\n */\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkSL2ZUI4G_cjs_js=require('./chunk-SL2ZUI4G.cjs.js'),r=require('react'),jsxRuntime=require('react/jsx-runtime'),i=require('@radix-ui/react-navigation-menu'),lucideReact=require('lucide-react'),classVarianceAuthority=require('class-variance-authority');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var r__namespace=/*#__PURE__*/_interopNamespace(r);var i__namespace=/*#__PURE__*/_interopNamespace(i);var P=r__namespace.forwardRef(({className:e,...t},a)=>jsxRuntime.jsx("div",{ref:a,className:chunkSL2ZUI4G_cjs_js.a("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));P.displayName="Card";var R=r__namespace.forwardRef(({className:e,...t},a)=>jsxRuntime.jsx("div",{ref:a,className:chunkSL2ZUI4G_cjs_js.a("flex flex-col space-y-1.5 p-6",e),...t}));R.displayName="CardHeader";var y=r__namespace.forwardRef(({className:e,...t},a)=>jsxRuntime.jsx("h3",{ref:a,className:chunkSL2ZUI4G_cjs_js.a("text-2xl font-semibold leading-none tracking-tight",e),...t}));y.displayName="CardTitle";var w=r__namespace.forwardRef(({className:e,...t},a)=>jsxRuntime.jsx("p",{ref:a,className:chunkSL2ZUI4G_cjs_js.a("text-sm text-muted-foreground",e),...t}));w.displayName="CardDescription";var x=r__namespace.forwardRef(({className:e,...t},a)=>jsxRuntime.jsx("div",{ref:a,className:chunkSL2ZUI4G_cjs_js.a("p-6 pt-0",e),...t}));x.displayName="CardContent";var b=r__namespace.forwardRef(({className:e,...t},a)=>jsxRuntime.jsx("div",{ref:a,className:chunkSL2ZUI4G_cjs_js.a("flex items-center p-6 pt-0",e),...t}));b.displayName="CardFooter";var g=classVarianceAuthority.cva("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50",{variants:{variant:{default:"text-foreground",ghost:"hover:bg-transparent hover:underline",link:"text-primary underline-offset-4 hover:underline",mobile:"w-full justify-between border-b border-border py-4 text-base font-medium"}},defaultVariants:{variant:"default"}});var u=r__namespace.forwardRef(({className:e,children:t,...a},m)=>jsxRuntime.jsxs(i__namespace.Root,{ref:m,className:chunkSL2ZUI4G_cjs_js.a("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...a,children:[t,jsxRuntime.jsx(v,{})]}));u.displayName=i__namespace.Root.displayName;var l=r__namespace.forwardRef(({className:e,...t},a)=>jsxRuntime.jsx(i__namespace.List,{ref:a,className:chunkSL2ZUI4G_cjs_js.a("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));l.displayName=i__namespace.List.displayName;var h=i__namespace.Item,f=r__namespace.forwardRef(({className:e,children:t,variant:a,...m},M)=>jsxRuntime.jsxs(i__namespace.Trigger,{ref:M,className:chunkSL2ZUI4G_cjs_js.a(g({variant:a}),e),...m,children:[t," ",jsxRuntime.jsx(lucideReact.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));f.displayName=i__namespace.Trigger.displayName;var p=r__namespace.forwardRef(({className:e,...t},a)=>jsxRuntime.jsx(i__namespace.Content,{ref:a,className:chunkSL2ZUI4G_cjs_js.a("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",e),...t}));p.displayName=i__namespace.Content.displayName;var C=i__namespace.Link,v=r__namespace.forwardRef(({className:e,...t},a)=>jsxRuntime.jsx("div",{className:chunkSL2ZUI4G_cjs_js.a("absolute left-0 top-full flex justify-center"),children:jsxRuntime.jsx(i__namespace.Viewport,{className:chunkSL2ZUI4G_cjs_js.a("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:a,...t})}));v.displayName=i__namespace.Viewport.displayName;var c=r__namespace.forwardRef(({className:e,...t},a)=>jsxRuntime.jsx(i__namespace.Indicator,{ref:a,className:chunkSL2ZUI4G_cjs_js.a("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:jsxRuntime.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));c.displayName=i__namespace.Indicator.displayName;exports.a=P;exports.b=R;exports.c=y;exports.d=w;exports.e=x;exports.f=b;exports.g=u;exports.h=l;exports.i=h;exports.j=f;exports.k=p;exports.l=C;exports.m=v;exports.n=c;//# sourceMappingURL=chunk-ELZV2CGE.cjs.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-ELZV2CGE.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/molecules/card/card.tsx","../src/components/molecules/navigation-menu/navigation-menu.variants.ts","../src/components/molecules/navigation-menu/navigation-menu.tsx"],"names":["Card","r","className","props","ref","jsx","cn","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","navigationMenuTriggerStyle","cva","NavigationMenu","s","children","jsxs","i","NavigationMenuViewport","NavigationMenuList","NavigationMenuItem","NavigationMenuTrigger","variant","ChevronDown","NavigationMenuContent","NavigationMenuLink","NavigationMenuIndicator"],"mappings":"yqBAwCMA,IAAAA,CAAAA,CAAaC,YACjB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAC,EAAW,GAAGC,CAAM,CAAGC,CAAAA,CAAAA,GACxBC,cAAC,CAAA,KAAA,CAAA,CACC,IAAKD,CACL,CAAA,SAAA,CAAWE,sBAAG,CAAA,0DAAA,CAA4DJ,CAAS,CAAA,CAClF,GAAGC,CACN,CAAA,CAEJ,EACAH,CAAK,CAAA,WAAA,CAAc,OAObO,IAAAA,CAAAA,CAAmBN,YACvB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAC,EAAW,GAAGC,CAAM,CAAGC,CAAAA,CAAAA,GACxBC,cAAC,CAAA,KAAA,CAAA,CAAI,IAAKD,CAAK,CAAA,SAAA,CAAWE,sBAAG,CAAA,+BAAA,CAAiCJ,CAAS,CAAA,CAAI,GAAGC,CAAO,CAAA,CAEzF,EACAI,CAAW,CAAA,WAAA,CAAc,aAOnBC,IAAAA,CAAAA,CAAkBP,YACtB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAC,EAAW,GAAGC,CAAM,CAAGC,CAAAA,CAAAA,GACxBC,cAAC,CAAA,IAAA,CAAA,CACC,IAAKD,CACL,CAAA,SAAA,CAAWE,sBAAG,CAAA,oDAAA,CAAsDJ,CAAS,CAAA,CAC5E,G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AAwB,CAAA,WAAA,CAAsCT,YAAU,CAAA,SAAA,CAAA,WAAA","file":"chunk-ELZV2CGE.cjs.js","sourcesContent":["/**\n * Card is a flexible container component that can be used to group related content and actions.\n * It provides a consistent visual style with a subtle border, shadow, and rounded corners.\n *\n */\nimport * as React from \"react\"\nimport { cn } from \"@/utils\"\n\n/**\n * The main card container component.\n * Provides the base styling for the card including border, shadow, and rounded corners.\n * * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-card--docs\n *\n * @example\n * ```tsx\n * // Basic card\n * <Card>\n * <CardHeader>\n * <CardTitle>Card Title</CardTitle>\n * <CardDescription>Card Description</CardDescription>\n * </CardHeader>\n * <CardContent>\n * <p>Card content goes here.</p>\n * </CardContent>\n * <CardFooter>\n * <Button>Action</Button>\n * </CardFooter>\n * </Card>\n *\n * // Card with custom styling\n * <Card className=\"bg-primary text-primary-foreground\">\n * <CardHeader>\n * <CardTitle>Custom Styled Card</CardTitle>\n * </CardHeader>\n * <CardContent>\n * <p>This card has custom background and text colors.</p>\n * </CardContent>\n * </Card>\n * ```\n */\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"rounded-lg border bg-card text-card-foreground shadow-sm\", className)}\n {...props}\n />\n )\n)\nCard.displayName = \"Card\"\n\n/**\n * Header section of the card.\n * Typically contains the card title and description.\n * Includes padding and spacing for consistent layout.\n */\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex flex-col space-y-1.5 p-6\", className)} {...props} />\n )\n)\nCardHeader.displayName = \"CardHeader\"\n\n/**\n * Title component for the card.\n * Should be used within CardHeader.\n * Provides consistent typography styling for card titles.\n */\nconst CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(\n ({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"text-2xl font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n )\n)\nCardTitle.displayName = \"CardTitle\"\n\n/**\n * Description component for the card.\n * Should be used within CardHeader.\n * Provides consistent typography styling for card descriptions.\n */\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm text-muted-foreground\", className)} {...props} />\n))\nCardDescription.displayName = \"CardDescription\"\n\n/**\n * Main content section of the card.\n * Includes padding and removes top padding to maintain consistent spacing with the header.\n */\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n )\n)\nCardContent.displayName = \"CardContent\"\n\n/**\n * Footer section of the card.\n * Typically contains action buttons or additional information.\n * Includes padding and removes top padding to maintain consistent spacing with the content.\n */\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex items-center p-6 pt-0\", className)} {...props} />\n )\n)\nCardFooter.displayName = \"CardFooter\"\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n","import { cva } from \"class-variance-authority\"\n\nexport const navigationMenuTriggerStyle = cva(\n \"group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50\",\n {\n variants: {\n variant: {\n default: \"text-foreground\",\n ghost: \"hover:bg-transparent hover:underline\",\n link: \"text-primary underline-offset-4 hover:underline\",\n mobile: \"w-full justify-between border-b border-border py-4 text-base font-medium\"\n }\n },\n defaultVariants: {\n variant: \"default\"\n }\n }\n)\n","import * as React from \"react\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { ChevronDown } from \"lucide-react\"\nimport { cn } from \"@/utils/index\"\nimport { navigationMenuTriggerStyle } from \"./navigation-menu.variants\"\nimport type {\n NavigationMenuProps,\n NavigationMenuListProps,\n NavigationMenuItemProps,\n NavigationMenuTriggerProps,\n NavigationMenuContentProps,\n NavigationMenuLinkProps,\n NavigationMenuViewportProps,\n NavigationMenuIndicatorProps\n} from \"./navigation-menu.types\"\n\n/**\n * NavigationMenu component for creating accessible navigation menus with dropdowns.\n * Built on top of Radix UI's NavigationMenu primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-navigation-menu--docs\n *\n * @example\n * ```\n * <NavigationMenu>\n * <NavigationMenuList>\n * <NavigationMenuItem>\n * <NavigationMenuTrigger>Getting Started</NavigationMenuTrigger>\n * <NavigationMenuContent>\n * <ul className=\"grid gap-3 p-4 md:w-[400px] lg:w-[500px]\">\n * <li className=\"row-span-3\">\n * <NavigationMenuLink asChild>\n * <a className=\"flex h-full w-full select-none flex-col justify-end rounded-md bg-gradient-to-b from-muted/50 to-muted p-6 no-underline outline-none focus:shadow-md\">\n * <div className=\"mb-2 mt-4 text-lg font-medium\">shadcn/ui</div>\n * <p className=\"text-sm leading-tight text-muted-foreground\">\n * Beautifully designed components built with Radix UI and Tailwind CSS.\n * </p>\n * </a>\n * </NavigationMenuLink>\n * </li>\n * </ul>\n * </NavigationMenuContent>\n * </NavigationMenuItem>\n * </NavigationMenuList>\n * </NavigationMenu>\n * ```\n */\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n NavigationMenuProps\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\"relative z-10 flex max-w-max flex-1 items-center justify-center\", className)}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n NavigationMenuListProps\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\"group flex flex-1 list-none items-center justify-center space-x-1\", className)}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n NavigationMenuTriggerProps\n>(({ className, children, variant, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle({ variant }), className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDown\n className=\"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n NavigationMenuContentProps\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto\",\n className\n )}\n {...props}\n />\n))\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n NavigationMenuViewportProps\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n))\nNavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n NavigationMenuIndicatorProps\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n))\nNavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName\n\nexport {\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport\n}\n"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {c}from'./chunk-JKTYFZ5M.esm.js';import {a}from'./chunk-7NN2L46N.esm.js';import {a as a$1}from'./chunk-EBPUGBUT.esm.js';import {a as a$2}from'./chunk-C26U3FL4.esm.js';import*as u from'react';import {cva}from'class-variance-authority';import {Loader2,X as X$1}from'lucide-react';import {jsxs,jsx}from'react/jsx-runtime';import*as s from'@radix-ui/react-dialog';import*as p from'@radix-ui/react-avatar';import*as l from'@radix-ui/react-toast';var te=cva("w-full",{variants:{variant:{default:"",error:"border-destructive focus-visible:ring-destructive"},size:{default:"h-10",sm:"h-8 text-xs",lg:"h-12 text-base"}},defaultVariants:{variant:"default",size:"default"}}),I=u.forwardRef(({className:a$3,variant:t,size:e,startIcon:r,endIcon:n,loading:i=false,error:m,label:d,helperText:x,disabled:D,...C},A)=>{let F=u.useId();return jsxs("div",{className:"w-full space-y-2",children:[d&&jsx(a,{htmlFor:F,children:d}),jsxs("div",{className:"relative",children:[r&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:r}),jsx(a$1,{id:F,className:a$2(te({variant:m?"error":t,size:e,className:a$3}),r&&"pl-9",(n||i)&&"pr-9"),ref:A,disabled:D||i,...C}),(n||i)&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:i?jsx(Loader2,{className:"h-4 w-4 animate-spin"}):n})]}),(m||x)&&jsx("p",{className:a$2("text-sm",m?"text-destructive":"text-muted-foreground"),children:m||x})]})});I.displayName="TextField";var ae=u.forwardRef(({className:a,maxWidth:t="lg",disablePadding:e=false,fluid:r=false,...n},i)=>jsx("div",{ref:i,className:a$2("mx-auto w-full",!e&&"px-4 sm:px-6 lg:px-8",!r&&{"max-w-screen-sm":t==="sm","max-w-screen-md":t==="md","max-w-screen-lg":t==="lg","max-w-screen-xl":t==="xl","max-w-full":t==="full"},a),...n}));ae.displayName="Container";var re=u.forwardRef(({as:a="div",className:t,width:e,height:r,style:n,...i},m)=>{let d={width:typeof e=="number"?`${e}px`:e,height:typeof r=="number"?`${r}px`:r,...n};return jsx(a,{ref:m,className:a$2(t),style:d,...i})});re.displayName="Box";var se=u.forwardRef(({className:a,direction:t="vertical",spacing:e="md",wrap:r=false,center:n=false,justify:i,align:m,width:d,height:x,style:D,...C},A)=>jsx("div",{ref:A,className:a$2("flex",t==="vertical"?"flex-col":"flex-row",{"gap-0":e==="none","gap-1":e==="xs","gap-2":e==="sm","gap-4":e==="md","gap-6":e==="lg","gap-8":e==="xl"},r&&"flex-wrap",n&&"items-center justify-center",i&&{"justify-start":i==="start","justify-end":i==="end","justify-center":i==="center","justify-between":i==="between","justify-around":i==="around","justify-evenly":i==="evenly"},m&&{"items-start":m==="start","items-end":m==="end","items-center":m==="center","items-stretch":m==="stretch","items-baseline":m==="baseline"},a),style:{width:d,height:x,...D},...C}));se.displayName="Stack";var Ke=s.Root,Qe=s.Trigger,me=s.Portal,Ue=s.Close,q=u.forwardRef(({className:a,...t},e)=>jsx(s.Overlay,{ref:e,className:a$2("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...t}));q.displayName=s.Overlay.displayName;var pe=u.forwardRef(({className:a,children:t,...e},r)=>jsxs(me,{children:[jsx(q,{}),jsxs(s.Content,{ref:r,className:a$2("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...e,children:[t,jsxs(s.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pe.displayName=s.Content.displayName;var de=({className:a,...t})=>jsx("div",{className:a$2("flex flex-col space-y-1.5 text-center sm:text-left",a),...t});de.displayName="DialogHeader";var fe=({className:a,...t})=>jsx("div",{className:a$2("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...t});fe.displayName="DialogFooter";var ce=u.forwardRef(({className:a,...t},e)=>jsx(s.Title,{ref:e,className:a$2("text-lg font-semibold leading-none tracking-tight",a),...t}));ce.displayName=s.Title.displayName;var ue=u.forwardRef(({className:a,...t},e)=>jsx(s.Description,{ref:e,className:a$2("text-sm text-muted-foreground",a),...t}));ue.displayName=s.Description.displayName;var X=u.forwardRef(({className:a,...t},e)=>jsx(p.Root,{ref:e,className:a$2("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",a),...t}));X.displayName=p.Root.displayName;var G=u.forwardRef(({className:a,...t},e)=>jsx(p.Image,{ref:e,className:a$2("aspect-square h-full w-full",a),...t}));G.displayName=p.Image.displayName;var J=u.forwardRef(({className:a,...t},e)=>jsx(p.Fallback,{ref:e,className:a$2("flex h-full w-full items-center justify-center rounded-full bg-muted",a),...t}));J.displayName=p.Fallback.displayName;var V=cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-green-500 text-white hover:bg-green-500/80",warning:"border-transparent bg-yellow-500 text-white hover:bg-yellow-500/80",info:"border-transparent bg-blue-500 text-white hover:bg-blue-500/80"},size:{default:"h-5",sm:"h-4 text-[10px]",lg:"h-6 text-sm"}},defaultVariants:{variant:"default",size:"default"}});var U=u.forwardRef(({className:a,variant:t,size:e,icon:r,iconAfter:n,children:i,...m},d)=>jsxs("div",{ref:d,className:a$2(V({variant:t,size:e}),a),...m,children:[r&&jsx("span",{className:"mr-1",children:r}),i,n&&jsx("span",{className:"ml-1",children:n})]}));U.displayName="Badge";var ye=cva("",{variants:{variant:{h1:"scroll-m-5 text-4xl font-extrabold tracking-tight lg:text-5xl",h2:"scroll-m-5 text-3xl font-semibold tracking-tight",h3:"scroll-m-5 text-2xl font-semibold tracking-tight",h4:"scroll-m-5 text-xl font-semibold tracking-tight",h5:"scroll-m-5 text-lg font-semibold tracking-tight",h6:"scroll-m-5 text-base font-semibold tracking-tight",p:"leading-7 [&:not(:first-child)]:mt-6",blockquote:"mt-6 border-l-2 border-slate-300 pl-6 italic",list:"my-6 ml-6 list-disc [&>li]:mt-2",lead:"text-xl text-muted-foreground",large:"text-lg font-semibold",small:"text-sm font-medium leading-none",muted:"text-sm text-muted-foreground"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"p",align:"left"}}),Pe=u.forwardRef(({className:a,variant:t,align:e,as:r="p",...n},i)=>jsx(r,{className:a$2(ye({variant:t,align:e,className:a})),ref:i,...n}));Pe.displayName="Typography";function xt({className:a,size:t="default",text:e,color:r="primary"}){let n={sm:"h-4 w-4",default:"h-8 w-8",lg:"h-12 w-12"},m={primary:"text-primary",secondary:"text-secondary",accent:"text-accent",muted:"text-muted-foreground",destructive:"text-destructive"}[r]||`text-[${r}]`;return jsxs("div",{className:a$2("fixed inset-0 z-50 flex min-h-screen flex-col items-center justify-center bg-background/80 backdrop-blur-sm",a),role:"alert","aria-live":"assertive",children:[jsx(Loader2,{className:a$2("animate-spin",m,n[t]),"aria-hidden":"true"}),e&&jsx("p",{className:"mt-4 text-sm text-muted-foreground","aria-label":e,children:e})]})}var L=l.Provider,R=u.forwardRef(({className:a,...t},e)=>jsx(l.Viewport,{ref:e,className:a$2("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",a),...t}));R.displayName=l.Viewport.displayName;var Ne=cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),b=u.forwardRef(({className:a,variant:t,...e},r)=>jsx(l.Root,{ref:r,className:a$2(Ne({variant:t}),a),...e}));b.displayName=l.Root.displayName;var _=u.forwardRef(({className:a,...t},e)=>jsx(l.Action,{ref:e,className:a$2("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",a),...t}));_.displayName=l.Action.displayName;var T=u.forwardRef(({className:a,...t},e)=>jsx(l.Close,{ref:e,className:a$2("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",a),"toast-close":"","aria-label":"Close toast",...t,children:jsx(X$1,{className:"h-4 w-4"})}));T.displayName=l.Close.displayName;var h=u.forwardRef(({className:a,...t},e)=>jsx(l.Title,{ref:e,className:a$2("text-sm font-semibold [&+div]:text-xs",a),...t}));h.displayName=l.Title.displayName;var w=u.forwardRef(({className:a,...t},e)=>jsx(l.Description,{ref:e,className:a$2("text-sm opacity-90",a),...t}));w.displayName=l.Description.displayName;function De(){let{toasts:a}=c();return jsxs(L,{children:[a.map(function({id:t,title:e,description:r,action:n,...i}){return jsxs(b,{...i,children:[jsxs("div",{className:"grid gap-1",children:[e&&jsx(h,{children:e}),r&&jsx(w,{children:r})]}),n,jsx(T,{})]},t)}),jsx(R,{})]})}export{T as A,h as B,w as C,De as D,I as a,ae as b,re as c,se as d,Ke as e,Qe as f,me as g,Ue as h,q as i,pe as j,de as k,fe as l,ce as m,ue as n,X as o,G as p,J as q,V as r,U as s,ye as t,Pe as u,xt as v,L as w,R as x,b as y,_ as z};//# sourceMappingURL=chunk-LCAU4YZI.esm.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-LCAU4YZI.esm.js.map
|