tw-react-components 0.0.155 → 0.0.158

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/index.esm.js +8 -13
  2. package/package.json +1 -1
  3. package/src/components/Badge/index.d.ts +1 -1
  4. package/src/components/Block/index.d.ts +1 -1
  5. package/src/components/Button/index.d.ts +3 -3
  6. package/src/components/DataTable/index.d.ts +5 -5
  7. package/src/components/Dialog/ConfirmDialog.d.ts +1 -1
  8. package/src/components/Dialog/Dialog.d.ts +1 -1
  9. package/src/components/Dialog/FormDialog.d.ts +3 -3
  10. package/src/components/Dialog/ListSorterDialog.d.ts +1 -1
  11. package/src/components/Dialog/PdfViewerDialog.d.ts +1 -1
  12. package/src/components/DropdownMenu/index.d.ts +1 -1
  13. package/src/components/Flex/index.d.ts +1 -1
  14. package/src/components/Form/controls/FormGroup.d.ts +1 -1
  15. package/src/components/Form/controls/Label.d.ts +1 -1
  16. package/src/components/Form/controls/custom/date-time/DateSelector.d.ts +1 -1
  17. package/src/components/Form/controls/custom/date-time/DaysView.d.ts +1 -1
  18. package/src/components/Form/controls/custom/date-time/MonthsView.d.ts +1 -1
  19. package/src/components/Form/controls/custom/date-time/TimeSelector.d.ts +1 -1
  20. package/src/components/Form/controls/custom/date-time/YearsView.d.ts +1 -1
  21. package/src/components/Form/controls/custom/date-time/index.d.ts +1 -1
  22. package/src/components/Form/controls/custom/file.d.ts +1 -1
  23. package/src/components/Form/controls/custom/select/index.d.ts +2 -2
  24. package/src/components/Form/controls/primitive/BasicInput.d.ts +2 -2
  25. package/src/components/Form/controls/primitive/CheckBoxInput.d.ts +1 -1
  26. package/src/components/Form/controls/primitive/EmailInput.d.ts +1 -1
  27. package/src/components/Form/controls/primitive/NumberInput.d.ts +2 -2
  28. package/src/components/Form/controls/primitive/PasswordInput.d.ts +1 -1
  29. package/src/components/Form/controls/primitive/TextInput.d.ts +1 -1
  30. package/src/components/Form/controls/primitive/TextareaInput.d.ts +1 -1
  31. package/src/components/Form/controls/with-form.d.ts +4 -4
  32. package/src/components/Hint/index.d.ts +2 -2
  33. package/src/components/Layout/index.d.ts +5 -5
  34. package/src/components/List/index.d.ts +2 -2
  35. package/src/components/ListSorter/index.d.ts +2 -2
  36. package/src/components/Navbar/index.d.ts +1 -1
  37. package/src/components/Pagination/index.d.ts +1 -1
  38. package/src/components/Sheet/index.d.ts +1 -1
  39. package/src/components/Sidebar/index.d.ts +1 -1
  40. package/src/components/Skeleton/index.d.ts +1 -1
  41. package/src/components/Spinner/index.d.ts +1 -1
  42. package/src/components/Switch/index.d.ts +1 -1
  43. package/src/components/Table/index.d.ts +1 -1
  44. package/src/components/ThemeSelector/index.d.ts +1 -1
  45. package/src/components/Tooltip/index.d.ts +1 -1
  46. package/src/contexts/LayoutContext.d.ts +1 -1
  47. package/src/helpers/compareDates.d.ts +1 -1
  48. package/src/helpers/mergeRefs.d.ts +1 -1
  49. package/src/hooks/useOnSwipe.d.ts +1 -1
  50. package/src/hooks/useOutsideClick.d.ts +1 -1
package/index.esm.js CHANGED
@@ -2038,29 +2038,24 @@ const Sidebar = Object.assign($Sidebar, {
2038
2038
  const Navbar = ({ className, sidebarTriggerClassName, leftSlot, rightSlot, }) => (jsx(Block, { className: cn('border-b p-3 dark:border-slate-700', className), fullWidth: true, children: jsxs(Flex, { align: "center", justify: "between", children: [jsxs(Flex, { align: "center", children: [jsx(Sidebar.Trigger, { className: sidebarTriggerClassName }), leftSlot] }), rightSlot] }) }));
2039
2039
 
2040
2040
  const Layout = (_a) => {
2041
- var { children, className } = _a, _b = _a.sidebarProps, { basePath, header, items, extraContent, footer } = _b, sidebarProps = __rest(_b, ["basePath", "header", "items", "extraContent", "footer"]), { navbarProps, Link, useLocation } = _a;
2041
+ var { children, className } = _a, _b = _a.sidebarProps, { basePath, header, items, extraContent, footer } = _b, sidebarProps = __rest(_b, ["basePath", "header", "items", "extraContent", "footer"]), { navbarProps, NavLink, useLocation } = _a;
2042
2042
  return (jsxs(Flex, { className: "h-screen w-screen gap-0 text-black dark:bg-slate-900 dark:text-white", children: [jsxs(Sidebar, Object.assign({ collapsible: "icon" }, sidebarProps, { children: [header && (jsx(Sidebar.Header, { children: jsx(Sidebar.Menu, { children: jsx(Sidebar.MenuItem, { children: header }) }) })), jsxs(Sidebar.Content, { className: "gap-0", children: [items
2043
2043
  .filter((item) => !item.hidden)
2044
- .map((item, index) => item.type === 'item' ? (jsx(Sidebar.Group, { children: jsx(Sidebar.Menu, { children: jsx(RenderSideBarItem, Object.assign({ basePath: basePath, Link: Link, useLocation: useLocation }, item)) }) }, index)) : (jsxs(Sidebar.Group, { children: [item.title && jsx(Sidebar.GroupLabel, { children: item.title }), jsx(Sidebar.GroupContent, { children: jsx(Sidebar.Menu, { children: item.items
2044
+ .map((item, index) => item.type === 'item' ? (jsx(Sidebar.Group, { children: jsx(Sidebar.Menu, { children: jsx(RenderSideBarItem, Object.assign({ basePath: basePath }, item, { NavLink: NavLink, useLocation: useLocation })) }) }, index)) : (jsxs(Sidebar.Group, { children: [item.title && jsx(Sidebar.GroupLabel, { children: item.title }), jsx(Sidebar.GroupContent, { children: jsx(Sidebar.Menu, { children: item.items
2045
2045
  .filter((subItem) => !subItem.hidden)
2046
- .map((subItem, index) => (jsx(RenderSideBarItem, Object.assign({ basePath: basePath, Link: Link, useLocation: useLocation }, subItem), index))) }) })] }, index))), extraContent] }), footer && (jsx(Sidebar.Footer, { children: jsx(Sidebar.Menu, { children: jsx(Sidebar.MenuItem, { children: footer }) }) })), jsx(Sidebar.Rail, {})] })), jsxs(Flex, { className: "gap-0 overflow-hidden", direction: "column", fullHeight: true, fullWidth: true, children: [navbarProps && jsx(Navbar, Object.assign({}, navbarProps)), jsx(Flex, { className: cn('overflow-hidden p-3', className), direction: "column", fullWidth: true, fullHeight: true, children: children })] })] }));
2046
+ .map((subItem, index) => (jsx(RenderSideBarItem, Object.assign({ basePath: basePath }, subItem, { NavLink: NavLink, useLocation: useLocation }), index))) }) })] }, index))), extraContent] }), footer && (jsx(Sidebar.Footer, { children: jsx(Sidebar.Menu, { children: jsx(Sidebar.MenuItem, { children: footer }) }) })), jsx(Sidebar.Rail, {})] })), jsxs(Flex, { className: "gap-0 overflow-hidden", direction: "column", fullHeight: true, fullWidth: true, children: [navbarProps && jsx(Navbar, Object.assign({}, navbarProps)), jsx(Flex, { className: cn('overflow-hidden p-3', className), direction: "column", fullWidth: true, fullHeight: true, children: children })] })] }));
2047
2047
  };
2048
- const RenderSideBarItem = ({ basePath = '/', pathname, title, Icon, items, Link, useLocation }) => {
2048
+ const RenderSideBarItem = ({ basePath = '/', pathname, title, Icon, items, NavLink, useLocation }) => {
2049
2049
  const location = useLocation();
2050
2050
  const { open } = useSidebar();
2051
2051
  const currentPath = useMemo(() => location.pathname.replace(basePath, '').replace(/^\/*/, ''), [basePath, location.pathname]);
2052
2052
  if (!(items === null || items === void 0 ? void 0 : items.filter((subItem) => !subItem.hidden).length)) {
2053
- return (jsx(Sidebar.MenuItem, { children: jsx(Sidebar.MenuButton, { asChild: true, isActive: isLinkStartsWithPathname(currentPath, pathname), children: jsxs(Link, { to: pathname, className: "font-medium", children: [Icon && jsx(Icon, {}), title] }) }) }));
2053
+ return (jsx(Sidebar.MenuItem, { children: jsx(NavLink, { to: pathname, className: "font-medium", children: ({ isActive }) => (jsxs(Sidebar.MenuButton, { isActive: isActive, children: [Icon && jsx(Icon, {}), title] })) }) }));
2054
2054
  }
2055
- const isOpen = open &&
2056
- (isLinkStartsWithPathname(currentPath, pathname) ||
2057
- items.some((subItem) => isLinkStartsWithPathname(currentPath, `${pathname}/${subItem.pathname}`)));
2058
- return (jsx(Collapsible, { asChild: true, open: isOpen, className: "group/collapsible", children: jsxs(Sidebar.MenuItem, { children: [jsx(Collapsible.Trigger, { asChild: true, children: jsx(Sidebar.MenuButton, { asChild: true, tooltip: title, isActive: open
2059
- ? currentPath === pathname &&
2060
- !items.some((subItem) => isLinkStartsWithPathname(currentPath, `${pathname}/${subItem.pathname}`))
2061
- : isLinkStartsWithPathname(currentPath, pathname), children: jsxs(Link, { to: pathname, className: "font-medium", children: [Icon && jsx(Icon, {}), title, jsx(ChevronRightIcon, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })] }) }) }), items && (jsx(Collapsible.Content, { children: jsx(Sidebar.MenuSub, { children: items
2055
+ const isOpen = open && isLinkStartsWithPathname(currentPath, pathname);
2056
+ return (jsx(Collapsible, { asChild: true, open: isOpen, className: "group/collapsible", children: jsxs(Sidebar.MenuItem, { children: [jsx(Collapsible.Trigger, { asChild: true, children: jsx(NavLink, { to: pathname, className: "font-medium", children: ({ isActive }) => (jsxs(Sidebar.MenuButton, { tooltip: title, isActive: !open && isActive, children: [Icon && jsx(Icon, {}), title, jsx(ChevronRightIcon, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })] })) }) }), items && (jsx(Collapsible.Content, { children: jsx(Sidebar.MenuSub, { children: items
2062
2057
  .filter((subItem) => !subItem.hidden)
2063
- .map((subItem, index) => (jsx(Sidebar.MenuSubItem, { children: jsx(Sidebar.MenuSubButton, { asChild: true, isActive: isLinkStartsWithPathname(currentPath, `${pathname}/${subItem.pathname}`), children: jsx(Link, { to: `${pathname}/${subItem.pathname}`, children: subItem.title }) }) }, index))) }) }))] }) }));
2058
+ .map((subItem, index) => (jsx(Sidebar.MenuSubItem, { children: jsx(NavLink, { to: `${pathname}/${subItem.pathname}`, children: ({ isActive }) => (jsx(Sidebar.MenuSubButton, { isActive: isActive, children: subItem.title })) }) }, index))) }) }))] }) }));
2064
2059
  };
2065
2060
  function isLinkStartsWithPathname(link, pathname) {
2066
2061
  return pathname === '' ? link === pathname : link.startsWith(pathname);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tw-react-components",
3
3
  "description": "A set of React components build with TailwindCSS to make a nice dashboard.",
4
- "version": "0.0.155",
4
+ "version": "0.0.158",
5
5
  "license": "MIT",
6
6
  "homepage": "https://bacali95.github.io/tw-react-components",
7
7
  "type": "module",
@@ -1,4 +1,4 @@
1
- import { ButtonProps, ButtonVariant } from '../Button';
1
+ import type { ButtonProps, ButtonVariant } from '../Button';
2
2
  export type BadgeVariant = Exclude<ButtonVariant, 'text'>;
3
3
  export type BadgeProps = Omit<ButtonProps, 'variant'> & {
4
4
  variant?: BadgeVariant;
@@ -1,4 +1,4 @@
1
- import { ComponentProps, PropsWithoutRef } from 'react';
1
+ import type { ComponentProps, PropsWithoutRef } from 'react';
2
2
  export type BlockProps = PropsWithoutRef<ComponentProps<'div'> & {
3
3
  className?: string;
4
4
  centered?: boolean;
@@ -1,6 +1,6 @@
1
- import { LucideIcon } from 'lucide-react';
2
- import { ComponentProps, PropsWithoutRef } from 'react';
3
- import { Color, Size } from '../types';
1
+ import type { LucideIcon } from 'lucide-react';
2
+ import type { ComponentProps, PropsWithoutRef } from 'react';
3
+ import type { Color, Size } from '../types';
4
4
  export type ButtonVariant = 'filled' | 'outlined' | 'text';
5
5
  export type ButtonProps = PropsWithoutRef<ComponentProps<'button'>> & {
6
6
  size?: Size;
@@ -1,8 +1,8 @@
1
- import { LucideIcon } from 'lucide-react';
2
- import { ComponentProps, FC, ReactNode } from 'react';
3
- import { HintBadgeProps, HintDotProps } from '../Hint';
4
- import { PaginationProps } from '../Pagination';
5
- import { Color, Paths, ResolvePath } from '../types';
1
+ import type { LucideIcon } from 'lucide-react';
2
+ import type { ComponentProps, FC, ReactNode } from 'react';
3
+ import type { HintBadgeProps, HintDotProps } from '../Hint';
4
+ import type { PaginationProps } from '../Pagination';
5
+ import type { Color, Paths, ResolvePath } from '../types';
6
6
  export type DataTableColumn<T, Field extends Paths<T> = Paths<T>> = {
7
7
  className?: string;
8
8
  header: ReactNode;
@@ -1,4 +1,4 @@
1
- import { FC, PropsWithChildren, ReactNode } from 'react';
1
+ import type { FC, PropsWithChildren, ReactNode } from 'react';
2
2
  type Props = {
3
3
  open: boolean;
4
4
  title: ReactNode;
@@ -1,5 +1,5 @@
1
1
  import * as DialogPrimitive from '@radix-ui/react-dialog';
2
- import { FC, HTMLAttributes } from 'react';
2
+ import type { FC, HTMLAttributes } from 'react';
3
3
  export declare const Dialog: FC<DialogPrimitive.DialogProps> & {
4
4
  Portal: FC<DialogPrimitive.DialogPortalProps>;
5
5
  Overlay: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,7 @@
1
- import { PropsWithChildren, ReactNode } from 'react';
2
- import { FieldValues, SubmitErrorHandler, SubmitHandler, UseFormReturn } from 'react-hook-form';
1
+ import type { PropsWithChildren, ReactNode } from 'react';
2
+ import type { FieldValues, SubmitErrorHandler, SubmitHandler, UseFormReturn } from 'react-hook-form';
3
3
  import { Sheet } from '../Sheet';
4
- import { Dialog } from './Dialog';
4
+ import type { Dialog } from './Dialog';
5
5
  type Props<T extends FieldValues> = {
6
6
  className?: string;
7
7
  formClassName?: string;
@@ -1,4 +1,4 @@
1
- import { ListSorterItem, ListSorterProps } from '../ListSorter';
1
+ import type { ListSorterItem, ListSorterProps } from '../ListSorter';
2
2
  export type ListSorterDialogProps<T extends ListSorterItem> = {
3
3
  className?: string;
4
4
  open: boolean;
@@ -1,4 +1,4 @@
1
- import { FC, ReactNode } from 'react';
1
+ import type { FC, ReactNode } from 'react';
2
2
  type Props = {
3
3
  open: boolean;
4
4
  title: ReactNode;
@@ -1,5 +1,5 @@
1
1
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
2
- import { HTMLAttributes } from 'react';
2
+ import type { HTMLAttributes } from 'react';
3
3
  export declare const DropdownMenu: import("react").FC<DropdownMenuPrimitive.DropdownMenuProps> & {
4
4
  Trigger: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
5
5
  Content: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
- import { BlockProps } from '../Block';
1
+ import type { BlockProps } from '../Block';
2
2
  type Direction = 'row' | 'column';
3
3
  type Position = 'start' | 'center' | 'end';
4
4
  export type FlexProps = BlockProps & {
@@ -1,4 +1,4 @@
1
- import { FC, PropsWithChildren } from 'react';
1
+ import type { FC, PropsWithChildren } from 'react';
2
2
  export type FormGroupProps = PropsWithChildren<{
3
3
  className?: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { FC, PropsWithChildren, ReactNode } from 'react';
1
+ import type { FC, PropsWithChildren, ReactNode } from 'react';
2
2
  type Props = {
3
3
  className?: string;
4
4
  description?: ReactNode;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import type { FC } from 'react';
2
2
  export type View = 'days' | 'months' | 'years';
3
3
  type DateSelectorProps = {
4
4
  date: Date;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import type { FC } from 'react';
2
2
  type DaysViewProps = {
3
3
  date: Date;
4
4
  value?: string | Date | null;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import type { FC } from 'react';
2
2
  type MonthsViewProps = {
3
3
  date: Date;
4
4
  value?: string | Date | null;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import type { FC } from 'react';
2
2
  type TimeSelectorProps = {
3
3
  date: Date;
4
4
  step?: number;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import type { FC } from 'react';
2
2
  type YearsViewProps = {
3
3
  date: Date;
4
4
  value?: string | Date | null;
@@ -1,4 +1,4 @@
1
- import { BasicInputProps } from '../../primitive';
1
+ import type { BasicInputProps } from '../../primitive';
2
2
  export type DateTimeInputType = 'date' | 'time' | 'datetime-local';
3
3
  export type DateTimeInputProps = {
4
4
  value?: string | Date | null;
@@ -1,4 +1,4 @@
1
- import { BasicInputProps } from '../primitive';
1
+ import type { BasicInputProps } from '../primitive';
2
2
  export type FileInputProps = {
3
3
  value?: string | null;
4
4
  onChange?: (item?: string) => void;
@@ -1,5 +1,5 @@
1
- import { ForwardedRef, JSX, ReactNode, RefObject } from 'react';
2
- import { BasicInputProps } from '../../primitive';
1
+ import type { ForwardedRef, JSX, ReactNode, RefObject } from 'react';
2
+ import type { BasicInputProps } from '../../primitive';
3
3
  export type SelectInputType = 'select';
4
4
  export type SelectItem<T, Group extends boolean = false> = {
5
5
  id: string | number;
@@ -1,5 +1,5 @@
1
- import { ComponentProps, FC, MouseEvent, PropsWithChildren, ReactNode } from 'react';
2
- import { Size } from '../../../types';
1
+ import type { ComponentProps, FC, MouseEvent, PropsWithChildren, ReactNode } from 'react';
2
+ import type { Size } from '../../../types';
3
3
  export type InputType = ComponentProps<'input'>['type'] | 'textarea';
4
4
  export type BasicInputProps<Type extends InputType> = {
5
5
  inputClassName?: string;
@@ -1,3 +1,3 @@
1
- import { BasicInputProps } from './BasicInput';
1
+ import type { BasicInputProps } from './BasicInput';
2
2
  export type CheckboxInputProps = Omit<BasicInputProps<'checkbox'>, 'type'>;
3
3
  export declare const CheckboxInput: import("react").ForwardRefExoticComponent<CheckboxInputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,3 +1,3 @@
1
- import { BasicInputProps } from './BasicInput';
1
+ import type { BasicInputProps } from './BasicInput';
2
2
  export type EmailInputProps = Omit<BasicInputProps<'email'>, 'type'>;
3
3
  export declare const EmailInput: import("react").ForwardRefExoticComponent<EmailInputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BasicInputProps } from './BasicInput';
1
+ import type { ReactNode } from 'react';
2
+ import type { BasicInputProps } from './BasicInput';
3
3
  export type NumberInputProps = Omit<BasicInputProps<'number'>, 'type'> & {
4
4
  unit?: ReactNode;
5
5
  };
@@ -1,3 +1,3 @@
1
- import { BasicInputProps } from './BasicInput';
1
+ import type { BasicInputProps } from './BasicInput';
2
2
  export type PasswordInputProps = Omit<BasicInputProps<'number'>, 'type'>;
3
3
  export declare const PasswordInput: import("react").ForwardRefExoticComponent<PasswordInputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,3 +1,3 @@
1
- import { BasicInputProps } from './BasicInput';
1
+ import type { BasicInputProps } from './BasicInput';
2
2
  export type TextInputProps = Omit<BasicInputProps<'text'>, 'type'>;
3
3
  export declare const TextInput: import("react").ForwardRefExoticComponent<TextInputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,3 +1,3 @@
1
- import { BasicInputProps } from './BasicInput';
1
+ import type { BasicInputProps } from './BasicInput';
2
2
  export type TextareaInputProps = Omit<BasicInputProps<'textarea'>, 'type'>;
3
3
  export declare const TextareaInput: import("react").ForwardRefExoticComponent<TextareaInputProps & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -1,7 +1,7 @@
1
- import { ForwardRefExoticComponent } from 'react';
2
- import { ControllerRenderProps, Validate } from 'react-hook-form';
3
- import { DateTimeInputProps, DateTimeInputType, FileInputProps, SelectInputProps, SelectInputType } from './custom';
4
- import { BasicInputProps, CheckboxInputProps, EmailInputProps, InputType, NumberInputProps, PasswordInputProps, TextInputProps, TextareaInputProps } from './primitive';
1
+ import type { ForwardRefExoticComponent } from 'react';
2
+ import type { ControllerRenderProps, Validate } from 'react-hook-form';
3
+ import type { DateTimeInputProps, DateTimeInputType, FileInputProps, SelectInputProps, SelectInputType } from './custom';
4
+ import type { BasicInputProps, CheckboxInputProps, EmailInputProps, InputType, NumberInputProps, PasswordInputProps, TextInputProps, TextareaInputProps } from './primitive';
5
5
  export type WithFormProps<Type extends InputType | SelectInputType, Props = Type extends DateTimeInputType ? DateTimeInputProps : Type extends SelectInputType ? SelectInputProps : Omit<BasicInputProps<Type>, 'type'>> = {
6
6
  name: string;
7
7
  pattern?: RegExp;
@@ -1,5 +1,5 @@
1
- import { BadgeProps, BadgeVariant } from '../Badge';
2
- import { Color, Size } from '../types';
1
+ import type { BadgeProps, BadgeVariant } from '../Badge';
2
+ import type { Color, Size } from '../types';
3
3
  export type HintPlacement = 'top-left' | 'top-right' | 'bottom-right' | 'bottom-left';
4
4
  export type HintVariant = BadgeVariant;
5
5
  export type HintDotProps = {
@@ -1,7 +1,7 @@
1
- import { LucideIcon } from 'lucide-react';
2
- import { ComponentProps, FC, PropsWithChildren, ReactNode } from 'react';
3
- import type { LinkProps, useLocation } from 'react-router-dom';
4
- import { NavbarProps } from '../Navbar';
1
+ import type { LucideIcon } from 'lucide-react';
2
+ import type { ComponentProps, FC, PropsWithChildren, ReactNode } from 'react';
3
+ import type { NavLinkProps, useLocation } from 'react-router';
4
+ import type { NavbarProps } from '../Navbar';
5
5
  import { Sidebar } from '../Sidebar';
6
6
  export type SidebarItem = {
7
7
  pathname: string;
@@ -28,7 +28,7 @@ type Props = {
28
28
  className?: string;
29
29
  sidebarProps: SidebarProps;
30
30
  navbarProps?: NavbarProps;
31
- Link: FC<LinkProps>;
31
+ NavLink: FC<NavLinkProps>;
32
32
  useLocation: typeof useLocation;
33
33
  };
34
34
  export declare const Layout: FC<PropsWithChildren<Props>>;
@@ -1,5 +1,5 @@
1
- import { LucideIcon } from 'lucide-react';
2
- import { Size } from '../types';
1
+ import type { LucideIcon } from 'lucide-react';
2
+ import type { Size } from '../types';
3
3
  export declare const List: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
4
4
  Item: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
5
5
  size?: Size;
@@ -1,5 +1,5 @@
1
- import { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities';
2
- import { ReactElement, ReactNode } from 'react';
1
+ import type { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities';
2
+ import type { ReactElement, ReactNode } from 'react';
3
3
  export type ListSorterItem = number | string | boolean | Record<'rank', number>;
4
4
  export type ListSorterProps<T extends ListSorterItem> = {
5
5
  className?: string;
@@ -1,4 +1,4 @@
1
- import { FC, ReactNode } from 'react';
1
+ import type { FC, ReactNode } from 'react';
2
2
  export type NavbarProps = {
3
3
  className?: string;
4
4
  sidebarTriggerClassName?: string;
@@ -1,4 +1,4 @@
1
- import { Dispatch, FC, SetStateAction } from 'react';
1
+ import type { Dispatch, FC, SetStateAction } from 'react';
2
2
  export type PaginationProps = {
3
3
  disabled?: boolean;
4
4
  pageSize?: number;
@@ -1,6 +1,6 @@
1
1
  import * as SheetPrimitive from '@radix-ui/react-dialog';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
- import { ComponentPropsWithoutRef, FC, HTMLAttributes } from 'react';
3
+ import type { ComponentPropsWithoutRef, FC, HTMLAttributes } from 'react';
4
4
  declare const sheetVariants: (props?: ({
5
5
  side?: "top" | "bottom" | "left" | "right" | null | undefined;
6
6
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -1,5 +1,5 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
- import { ComponentProps } from 'react';
2
+ import type { ComponentProps } from 'react';
3
3
  import { Tooltip } from '../Tooltip';
4
4
  export declare const SIDEBAR_COOKIE_NAME = "sidebar:state";
5
5
  export declare const SIDEBAR_COOKIE_MAX_AGE: number;
@@ -1,2 +1,2 @@
1
- import { FC, HTMLAttributes } from 'react';
1
+ import type { FC, HTMLAttributes } from 'react';
2
2
  export declare const Skeleton: FC<HTMLAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import type { FC } from 'react';
2
2
  type Props = {
3
3
  className?: string;
4
4
  fullScreen?: boolean;
@@ -1,5 +1,5 @@
1
1
  import * as SwitchPrimitives from '@radix-ui/react-switch';
2
- import { ComponentProps, ComponentPropsWithoutRef } from 'react';
2
+ import type { ComponentProps, ComponentPropsWithoutRef } from 'react';
3
3
  export type SwitchProps = ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> & {
4
4
  thumbProps?: ComponentProps<typeof SwitchPrimitives.Thumb>;
5
5
  };
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import type { FC } from 'react';
2
2
  export declare const Table: FC<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>> & {
3
3
  Head: FC<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>>;
4
4
  HeadCell: FC<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>>;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import type { FC } from 'react';
2
2
  type Props = {
3
3
  className?: string;
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
2
- import { FC, PropsWithChildren, ReactNode } from 'react';
2
+ import type { FC, PropsWithChildren, ReactNode } from 'react';
3
3
  export type TooltipProps = PropsWithChildren<{
4
4
  className?: string;
5
5
  content: ReactNode;
@@ -1,4 +1,4 @@
1
- import { FC, PropsWithChildren } from 'react';
1
+ import type { FC, PropsWithChildren } from 'react';
2
2
  export type ThemeState = 'dark' | 'light' | 'system';
3
3
  export type LayoutContext = {
4
4
  theme: ThemeState;
@@ -1,2 +1,2 @@
1
- import { OpUnitType } from 'dayjs';
1
+ import type { OpUnitType } from 'dayjs';
2
2
  export declare function compareDates(date1: Date, date2: Date, startOf?: OpUnitType): number;
@@ -1,2 +1,2 @@
1
- import { LegacyRef, MutableRefObject, RefCallback } from 'react';
1
+ import type { LegacyRef, MutableRefObject, RefCallback } from 'react';
2
2
  export declare function mergeRefs<T = any>(refs: Array<MutableRefObject<T> | LegacyRef<T> | undefined | null>): RefCallback<T>;
@@ -1,4 +1,4 @@
1
- import { RefObject } from 'react';
1
+ import type { RefObject } from 'react';
2
2
  type SwipeDirection = 'up' | 'left' | 'bottom' | 'right';
3
3
  export declare function useOnSwipe(element: RefObject<HTMLElement>, onSwipe: (direction: SwipeDirection) => any | false, minSwipeDistance?: number): void;
4
4
  export {};
@@ -1,2 +1,2 @@
1
- import { RefObject } from 'react';
1
+ import type { RefObject } from 'react';
2
2
  export declare function useOutsideClick(ref: RefObject<HTMLDivElement>, callback: () => void): void;