tw-react-components 0.0.158 → 0.0.161

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/index.esm.js CHANGED
@@ -557,19 +557,19 @@ const variantClassNames = {
557
557
  };
558
558
  const sizeClassNames = {
559
559
  small: {
560
- base: 'gap-1.5 text-sm h-7',
561
- withChildren: 'px-2',
560
+ base: 'gap-1 text-sm h-6',
561
+ withChildren: 'px-1.5',
562
562
  icon: {
563
- base: 'h-4 w-4',
564
- withChildren: 'h-3 w-3',
563
+ base: 'h-3 w-3',
564
+ withChildren: 'h-2 w-2',
565
565
  },
566
566
  },
567
567
  medium: {
568
- base: 'gap-2 text-base h-10',
569
- withChildren: 'px-2.5',
568
+ base: 'gap-1.5 text-base h-9',
569
+ withChildren: 'px-2',
570
570
  icon: {
571
- base: 'h-5 w-5',
572
- withChildren: 'h-4 w-4',
571
+ base: 'h-4 w-4',
572
+ withChildren: 'h-3 w-3',
573
573
  },
574
574
  },
575
575
  };
@@ -594,7 +594,7 @@ const Block = forwardRef((_a, ref) => {
594
594
 
595
595
  const Card = forwardRef((_a, ref) => {
596
596
  var { children, className } = _a, blockProps = __rest(_a, ["children", "className"]);
597
- return (jsx(Block, Object.assign({ className: cn('rounded-lg border p-3 dark:border-slate-700 dark:bg-slate-900', className) }, blockProps, { ref: ref, children: children })));
597
+ return (jsx(Block, Object.assign({ className: cn('rounded-lg border p-2 dark:border-slate-700 dark:bg-slate-900', className) }, blockProps, { ref: ref, children: children })));
598
598
  });
599
599
 
600
600
  const $Collapsible = CollapsiblePrimitive.Root;
@@ -628,7 +628,7 @@ const justifyClasses = {
628
628
  };
629
629
  const Flex = forwardRef((_a, ref) => {
630
630
  var { children, className, reverse, wrap, direction = 'row', align = 'start', justify = 'start' } = _a, blockProps = __rest(_a, ["children", "className", "reverse", "wrap", "direction", "align", "justify"]);
631
- return (jsx(Block, Object.assign({ className: cn('flex gap-3', wrap && 'flex-wrap', directionClasses[direction][reverse ? 'reverse' : 'normal'], alignClasses[align], justifyClasses[justify], className) }, blockProps, { ref: ref, children: children })));
631
+ return (jsx(Block, Object.assign({ className: cn('flex gap-2', wrap && 'flex-wrap', directionClasses[direction][reverse ? 'reverse' : 'normal'], alignClasses[align], justifyClasses[justify], className) }, blockProps, { ref: ref, children: children })));
632
632
  });
633
633
 
634
634
  dayjs.extend(localeData);
@@ -804,35 +804,35 @@ const inputClasses = {
804
804
  };
805
805
  const sizeClasses = {
806
806
  small: {
807
- label: 'text-sm',
808
- input: 'text-sm py-1 px-2 h-7',
807
+ label: 'text-xs',
808
+ input: 'text-xs py-1 px-2 h-6',
809
809
  checkbox: {
810
- input: 'w-4 h-4',
810
+ input: 'w-3 h-3',
811
811
  wrapper: 'h-6 gap-1',
812
812
  },
813
813
  suffix: {
814
- wrapper: 'h-7',
815
- icon: 'h-4 w-4 mx-1.5',
814
+ wrapper: 'h-6',
815
+ icon: 'h-3 w-3 mx-1.5',
816
816
  },
817
817
  clearButton: {
818
- base: 'h-5 w-5',
818
+ base: 'h-4 w-4',
819
819
  withSuffixIcon: 'right-8',
820
820
  },
821
821
  },
822
822
  medium: {
823
- label: 'text-base',
824
- input: 'text-base py-2 px-3 h-10',
823
+ label: 'text-sm',
824
+ input: 'text-sm py-2 px-3 h-9',
825
825
  checkbox: {
826
- input: 'w-5 h-5',
826
+ input: 'w-4 h-4',
827
827
  wrapper: 'h-8 gap-2',
828
828
  },
829
829
  suffix: {
830
- wrapper: 'h-10',
831
- icon: 'w-5 h-5 mx-2',
830
+ wrapper: 'h-9',
831
+ icon: 'w-4 h-4 mx-2',
832
832
  },
833
833
  clearButton: {
834
- base: 'h-6 w-6',
835
- withSuffixIcon: 'right-12',
834
+ base: 'h-5 w-5',
835
+ withSuffixIcon: 'right-9',
836
836
  },
837
837
  },
838
838
  };
@@ -879,7 +879,7 @@ const EmailInput = forwardRef((props, ref) => (jsx(BasicInput, Object.assign({ t
879
879
 
880
880
  const NumberInput = forwardRef((_a, ref) => {
881
881
  var { unit } = _a, props = __rest(_a, ["unit"]);
882
- return (jsx(BasicInput, Object.assign({ type: "number" }, props, { suffixIcon: unit
882
+ return (jsx(BasicInput, Object.assign({ type: "number", inputClassName: cn(props.clearable && !!props.value && 'pr-8', props.className) }, props, { suffixIcon: unit
883
883
  ? ({ className }) => (jsx("div", { className: cn(className, 'flex w-min items-center'), onClick: props.onSuffixIconClick, children: unit }))
884
884
  : props.suffixIcon, ref: ref })));
885
885
  });
@@ -1241,8 +1241,11 @@ const DropdownMenu = Object.assign(DropdownMenuPrimitive.Root, {
1241
1241
  RadioGroup: DropdownMenuRadioGroup,
1242
1242
  });
1243
1243
 
1244
+ const defaultRenderItem = (item, selected) => item.label;
1245
+ const defaultSearchPredicate = (item, searchValue) => item.label.toLowerCase().includes(searchValue.toLowerCase());
1246
+ const defaultSelectPredicate = (a, b) => a === b;
1244
1247
  const SelectInput = forwardRef((_a, ref) => {
1245
- var { className, items, renderItem = (item) => item.label, value, multiple, clearable, allowAddition, onNewItemAdded, search, searchPredicate = (item, searchValue) => item.label.toLowerCase().includes(searchValue.toLowerCase()), selectPredicate = (a, b) => a === b, onChange, readOnly, parentRef } = _a, props = __rest(_a, ["className", "items", "renderItem", "value", "multiple", "clearable", "allowAddition", "onNewItemAdded", "search", "searchPredicate", "selectPredicate", "onChange", "readOnly", "parentRef"]);
1248
+ var { className, items, renderItem = defaultRenderItem, value, multiple, clearable, allowAddition, onNewItemAdded, search, searchPredicate = defaultSearchPredicate, selectPredicate = defaultSelectPredicate, onChange, readOnly, parentRef } = _a, props = __rest(_a, ["className", "items", "renderItem", "value", "multiple", "clearable", "allowAddition", "onNewItemAdded", "search", "searchPredicate", "selectPredicate", "onChange", "readOnly", "parentRef"]);
1246
1249
  const [open, setOpen] = useState(false);
1247
1250
  const [searchValue, setSearchValue] = useState('');
1248
1251
  const pureItems = useMemo(() => items.flatMap((item) => (item.group ? item.items : [item])), [items]);
@@ -1260,14 +1263,14 @@ const SelectInput = forwardRef((_a, ref) => {
1260
1263
  const filteredItems = useMemo(() => !search || !searchValue
1261
1264
  ? items
1262
1265
  : items.flatMap((item) => item.group
1263
- ? item.items.some((subItem) => subItem.label.toLowerCase().includes(searchValue.toLowerCase()))
1266
+ ? item.items.some((subItem) => searchPredicate(subItem, searchValue))
1264
1267
  ? [
1265
- Object.assign(Object.assign({}, item), { items: item.items.filter((subItem) => subItem.label.toLowerCase().includes(searchValue.toLowerCase())) }),
1268
+ Object.assign(Object.assign({}, item), { items: item.items.filter((subItem) => searchPredicate(subItem, searchValue)) }),
1266
1269
  ]
1267
1270
  : []
1268
- : item.label.toLowerCase().includes(searchValue.toLowerCase())
1271
+ : searchPredicate(item, searchValue)
1269
1272
  ? [item]
1270
- : []), [items, search, searchValue]);
1273
+ : []), [items, search, searchPredicate, searchValue]);
1271
1274
  const text = useMemo(() => selectedItems.length
1272
1275
  ? !multiple
1273
1276
  ? selectedItems[0].label
@@ -1297,7 +1300,10 @@ const SelectInput = forwardRef((_a, ref) => {
1297
1300
  }
1298
1301
  }
1299
1302
  }, [clearable, multiple, onChange, pureItems, selectedItems, selectedMap]);
1300
- const handleOnSearchValueChange = (event) => setSearchValue(event.target.value);
1303
+ const handleOnSearchValueChange = (event) => {
1304
+ event.stopPropagation();
1305
+ setSearchValue(event.target.value);
1306
+ };
1301
1307
  const clearSearchValue = () => setSearchValue('');
1302
1308
  const handleOnClear = () => {
1303
1309
  if (readOnly)
@@ -1318,7 +1324,7 @@ const SelectInput = forwardRef((_a, ref) => {
1318
1324
  handleOnSelect(option.id);
1319
1325
  }, children: jsx("span", { children: renderItem(option, isNotNullOrUndefined(selectedMap[option.id])) }) }));
1320
1326
  }, [ItemComponent, handleOnSelect, multiple, renderItem, selectedMap]);
1321
- return (jsxs(DropdownMenu, { open: open, onOpenChange: setOpen, children: [jsx(DropdownMenu.Trigger, { className: cn('w-full', className), children: jsx(TextInput, Object.assign({ className: "[&>div>*]:cursor-pointer", inputClassName: "text-left" }, props, { value: text !== null && text !== void 0 ? text : '', clearable: clearable && !!selectedItems.length, onClear: handleOnClear, suffixIcon: ChevronDownIcon, onSuffixIconClick: () => setOpen((open) => !open), ref: ref, readOnly: true })) }), jsxs(DropdownMenu.Content, { className: "flex max-h-80 w-[calc(var(--radix-popper-anchor-width))] flex-col overflow-hidden", children: [search && (jsxs(Fragment, { children: [jsx(TextInput, { value: searchValue, placeholder: "Search...", size: props.size, onChange: handleOnSearchValueChange, clearable: !!searchValue.length, onClear: clearSearchValue }), jsx(DropdownMenu.Separator, { className: "w-full" })] })), filteredItems.length === 0 &&
1327
+ return (jsxs(DropdownMenu, { open: open, onOpenChange: setOpen, children: [jsx(DropdownMenu.Trigger, { className: cn('w-full', className), children: jsx(TextInput, Object.assign({ className: "[&>div>*]:cursor-pointer", inputClassName: "text-left" }, props, { value: text !== null && text !== void 0 ? text : '', clearable: clearable && !!selectedItems.length, onClear: handleOnClear, suffixIcon: ChevronDownIcon, onSuffixIconClick: () => setOpen((open) => !open), ref: ref, readOnly: true })) }), jsxs(DropdownMenu.Content, { className: "flex max-h-80 w-[calc(var(--radix-popper-anchor-width))] flex-col overflow-hidden", children: [search && (jsxs(Fragment, { children: [jsx(TextInput, { value: searchValue, placeholder: "Search...", size: props.size, onChange: handleOnSearchValueChange, onKeyUp: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), clearable: !!searchValue.length, onClear: clearSearchValue }), jsx(DropdownMenu.Separator, { className: "w-full" })] })), filteredItems.length === 0 &&
1322
1328
  (allowAddition && searchValue ? (jsxs("button", { className: "rounded bg-slate-100 py-1.5 text-center hover:bg-slate-200 dark:bg-slate-900/30 dark:hover:bg-slate-700/30", onClick: handleOnAddItemClicked, children: ["Add '", searchValue, "'"] })) : (jsx("div", { className: "py-1.5 text-center text-slate-500", children: "No items." }))), jsx(GroupComponent, { className: "flex flex-col gap-1 overflow-auto", value: !multiple && selectedItems.length ? String(selectedItems[0].id) : undefined, children: filteredItems.map((item, index) => item.group ? (jsxs(Flex, { className: "gap-1", direction: "column", fullWidth: true, children: [jsx(DropdownMenu.Label, { className: "sticky top-0 z-[51] w-full rounded-md border bg-white py-1 dark:bg-slate-900", children: item.label }), item.items.map((subItem) => (jsx(RenderOption, Object.assign({}, subItem), subItem.id))), index < filteredItems.length - 1 && (jsx("div", { className: "mb-1 h-px w-full bg-slate-200 dark:bg-slate-700" }))] }, item.id)) : (jsx(RenderOption, Object.assign({}, item), item.id))) })] })] }));
1323
1329
  });
1324
1330
  function isNotNullOrUndefined(value) {
@@ -1377,14 +1383,14 @@ const HintRoot = forwardRef(({ children }, ref) => (jsx(Block, { className: "rel
1377
1383
  HintRoot.displayName = 'HintRoot';
1378
1384
  const dotSizeClassNames = {
1379
1385
  small: {
1380
- base: 'h-2 w-2',
1386
+ base: 'h-1.5 w-1.5',
1381
1387
  top: '-top-0.5',
1382
1388
  right: '-right-0.5',
1383
1389
  bottom: '-bottom-0.5',
1384
1390
  left: '-left-0.5',
1385
1391
  },
1386
1392
  medium: {
1387
- base: 'h-3 w-3',
1393
+ base: 'h-2.5 w-2.5',
1388
1394
  top: '-top-1',
1389
1395
  right: '-right-1',
1390
1396
  bottom: '-bottom-1',
@@ -1435,7 +1441,7 @@ const badgeSizeClassNames = {
1435
1441
  };
1436
1442
  const HintBadge = forwardRef((_a, ref) => {
1437
1443
  var { className, size = 'small', placement = 'top-right' } = _a, props = __rest(_a, ["className", "size", "placement"]);
1438
- return (jsx(Badge, Object.assign({ className: cn('absolute px-1', size === 'small' ? 'h-5' : 'h-6', {
1444
+ return (jsx(Badge, Object.assign({ className: cn('absolute z-10 px-1', size === 'small' ? 'h-4' : 'h-5', {
1439
1445
  [`${badgeSizeClassNames.top} ${badgeSizeClassNames.left}`]: placement === 'top-left',
1440
1446
  [`${badgeSizeClassNames.top} ${badgeSizeClassNames.right}`]: placement === 'top-right',
1441
1447
  [`${badgeSizeClassNames.bottom} ${badgeSizeClassNames.right}`]: placement === 'bottom-right',
@@ -1451,13 +1457,13 @@ const Pagination = ({ disabled, pageSize = 10, currentPage, totalItems, setCurre
1451
1457
  useEffect(() => {
1452
1458
  setCurrentPage((page) => Math.min(page, Math.max(0, totalPages - 1)));
1453
1459
  }, [setCurrentPage, totalPages]);
1454
- return (jsx(Flex, { justify: "end", children: jsxs(Flex, { className: "h-10 gap-0 divide-x rounded-md border border-slate-300 bg-white dark:divide-slate-700 dark:border-slate-700 dark:bg-slate-800", children: [jsx(PaginationItem, { title: "First page", onClick: () => setCurrentPage(0), disabled: !currentPage || disabled, children: jsx(ChevronsLeftIcon, { className: "h-5 w-5" }) }), jsx(PaginationItem, { title: "Previous page", onClick: () => currentPage && setCurrentPage(currentPage - 1), disabled: !currentPage || disabled, children: jsx(ChevronLeftIcon, { className: "h-5 w-5" }) }), pagination.map((page, index) => (jsx(PaginationItem, { active: page !== '...' && page - 1 === currentPage, title: page !== '...' ? `Page ${page}` : undefined, onClick: page !== '...' ? () => setCurrentPage(page - 1) : undefined, disabled: page === '...' || disabled, children: page }, index))), jsx(PaginationItem, { title: "Next page", onClick: () => currentPage + 1 < totalPages && setCurrentPage(currentPage + 1), disabled: currentPage + 1 === totalPages || disabled, children: jsx(ChevronRightIcon, { className: "h-5 w-5" }) }), jsx(PaginationItem, { title: "Last page", onClick: () => setCurrentPage(Math.floor(totalItems && !(totalItems % pageSize)
1460
+ return (jsx(Flex, { justify: "end", children: jsxs(Flex, { className: "h-9 gap-0 divide-x rounded-md border border-slate-300 bg-white dark:divide-slate-700 dark:border-slate-700 dark:bg-slate-800", children: [jsx(PaginationItem, { title: "First page", onClick: () => setCurrentPage(0), disabled: !currentPage || disabled, children: jsx(ChevronsLeftIcon, { className: "h-4 w-4" }) }), jsx(PaginationItem, { title: "Previous page", onClick: () => currentPage && setCurrentPage(currentPage - 1), disabled: !currentPage || disabled, children: jsx(ChevronLeftIcon, { className: "h-4 w-4" }) }), pagination.map((page, index) => (jsx(PaginationItem, { active: page !== '...' && page - 1 === currentPage, title: page !== '...' ? `Page ${page}` : undefined, onClick: page !== '...' ? () => setCurrentPage(page - 1) : undefined, disabled: page === '...' || disabled, children: page }, index))), jsx(PaginationItem, { title: "Next page", onClick: () => currentPage + 1 < totalPages && setCurrentPage(currentPage + 1), disabled: currentPage + 1 === totalPages || disabled, children: jsx(ChevronRightIcon, { className: "h-4 w-4" }) }), jsx(PaginationItem, { title: "Last page", onClick: () => setCurrentPage(Math.floor(totalItems && !(totalItems % pageSize)
1455
1461
  ? (totalItems - 1) / pageSize
1456
- : totalItems / pageSize)), disabled: currentPage + 1 === totalPages || disabled, children: jsx(ChevronsRightIcon, { className: "h-5 w-5" }) })] }) }));
1462
+ : totalItems / pageSize)), disabled: currentPage + 1 === totalPages || disabled, children: jsx(ChevronsRightIcon, { className: "h-4 w-4" }) })] }) }));
1457
1463
  };
1458
1464
  const PaginationItem = (_a) => {
1459
1465
  var { children, active, disabled } = _a, props = __rest(_a, ["children", "active", "disabled"]);
1460
- return (jsx(Flex, Object.assign({ className: cn('w-10 first:rounded-l-md last:rounded-r-md', {
1466
+ return (jsx(Flex, Object.assign({ className: cn('w-9 text-sm first:rounded-l-md last:rounded-r-md', {
1461
1467
  'text-slate-400 dark:text-slate-500': disabled,
1462
1468
  'bg-slate-100 dark:bg-slate-900': active,
1463
1469
  'cursor-pointer hover:bg-slate-200 dark:hover:bg-slate-900': !disabled && props.onClick,
@@ -1715,7 +1721,7 @@ const FormDialog = ({ className, formClassName, open, title, form, children, sub
1715
1721
  // do nothering
1716
1722
  }
1717
1723
  });
1718
- return (jsx(As, { open: open, onOpenChange: (value) => !value && onClose(), children: jsxs(As.Content, { className: className, children: [jsx(As.Header, { children: jsx(As.Title, { children: title }) }), jsx(FormProvider, Object.assign({}, form, { children: jsx("form", { id: `form-${id}`, className: cn('flex h-full w-full flex-col gap-3 overflow-auto', formClassName), onSubmit: form.handleSubmit(handleSubmit, onInvalid), children: children }) })), jsxs(As.Footer, { className: "w-full sm:justify-between", children: [extraAction, jsxs(As.Footer, { className: "ml-auto", children: [jsx(As.Close, { asChild: true, children: jsx(Button, { color: "red", children: cancelLabel }) }), jsx(Button, { color: "green", type: "submit", form: `form-${id}`, disabled: form.formState.isSubmitting, children: submitLabel })] })] })] }) }));
1724
+ return (jsx(As, { open: open, onOpenChange: (value) => !value && onClose(), children: jsxs(As.Content, { className: className, children: [jsx(As.Header, { children: jsx(As.Title, { children: title }) }), jsx(FormProvider, Object.assign({}, form, { children: jsx("form", { id: `form-${id}`, className: cn('flex h-full w-full flex-col gap-2 overflow-auto', formClassName), onSubmit: form.handleSubmit(handleSubmit, onInvalid), children: children }) })), jsxs(As.Footer, { className: "w-full sm:justify-between", children: [extraAction, jsxs(As.Footer, { className: "ml-auto", children: [jsx(As.Close, { asChild: true, children: jsx(Button, { color: "red", children: cancelLabel }) }), jsx(Button, { color: "green", type: "submit", form: `form-${id}`, disabled: form.formState.isSubmitting, children: submitLabel })] })] })] }) }));
1719
1725
  };
1720
1726
 
1721
1727
  function ListSorter({ className, items, idResolver, renderer, onChange, }) {
@@ -2007,8 +2013,8 @@ const SidebarMenuSubItem = forwardRef((_a, ref) => {
2007
2013
  SidebarMenuSubItem.displayName = 'SidebarMenuSubItem';
2008
2014
  const SidebarMenuSubButton = forwardRef((_a, ref) => {
2009
2015
  var { asChild = false, size = 'md', isActive, className } = _a, props = __rest(_a, ["asChild", "size", "isActive", "className"]);
2010
- const Comp = asChild ? Slot : 'a';
2011
- return (jsx(Comp, Object.assign({ ref: ref, "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn('text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 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', 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground', size === 'sm' && 'text-xs', size === 'md' && 'text-sm', 'group-data-[collapsible=icon]:hidden', className) }, props)));
2016
+ const Comp = asChild ? Slot : 'button';
2017
+ return (jsx(Comp, Object.assign({ ref: ref, "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn('text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 w-full min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 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', 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground', size === 'sm' && 'text-xs', size === 'md' && 'text-sm', 'group-data-[collapsible=icon]:hidden', className) }, props)));
2012
2018
  });
2013
2019
  SidebarMenuSubButton.displayName = 'SidebarMenuSubButton';
2014
2020
  const Sidebar = Object.assign($Sidebar, {
@@ -2035,7 +2041,7 @@ const Sidebar = Object.assign($Sidebar, {
2035
2041
  Trigger: SidebarTrigger,
2036
2042
  });
2037
2043
 
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] }) }));
2044
+ const Navbar = ({ className, sidebarTriggerClassName, leftSlot, rightSlot, }) => (jsx(Block, { className: cn('border-b p-2 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
2045
 
2040
2046
  const Layout = (_a) => {
2041
2047
  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;
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.158",
4
+ "version": "0.0.161",
5
5
  "license": "MIT",
6
6
  "homepage": "https://bacali95.github.io/tw-react-components",
7
7
  "type": "module",
@@ -72,11 +72,11 @@ export declare const Sidebar: import("react").ForwardRefExoticComponent<Omit<imp
72
72
  showIcon?: boolean;
73
73
  }, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
74
74
  MenuSub: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
75
- MenuSubButton: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & {
75
+ MenuSubButton: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
76
76
  asChild?: boolean;
77
77
  size?: "sm" | "md";
78
78
  isActive?: boolean;
79
- }, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
79
+ }, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
80
80
  MenuSubItem: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
81
81
  Rail: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
82
82
  Separator: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-separator").SeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;