@brightlocal/ui-components 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/accordion.cjs +1 -1
  2. package/dist/accordion.js +1 -1
  3. package/dist/blocks/data-table.cjs +1 -1
  4. package/dist/blocks/data-table.js +30 -30
  5. package/dist/blocks/sidebar.cjs +1 -1
  6. package/dist/blocks/sidebar.d.ts.map +1 -1
  7. package/dist/blocks/sidebar.js +4 -3
  8. package/dist/breadcrumb.cjs +1 -1
  9. package/dist/breadcrumb.js +10 -10
  10. package/dist/calendar.cjs +1 -1
  11. package/dist/calendar.d.ts.map +1 -1
  12. package/dist/calendar.js +6 -3
  13. package/dist/card.cjs +1 -1
  14. package/dist/card.d.ts +5 -0
  15. package/dist/card.d.ts.map +1 -1
  16. package/dist/card.js +49 -36
  17. package/dist/centred-layout.cjs +1 -1
  18. package/dist/centred-layout.d.ts +3 -8
  19. package/dist/centred-layout.d.ts.map +1 -1
  20. package/dist/centred-layout.js +33 -48
  21. package/dist/checkbox.cjs +1 -1
  22. package/dist/checkbox.js +7 -7
  23. package/dist/combobox.cjs +1 -1
  24. package/dist/combobox.d.ts +6 -1
  25. package/dist/combobox.d.ts.map +1 -1
  26. package/dist/combobox.js +116 -103
  27. package/dist/command.cjs +1 -1
  28. package/dist/command.js +3 -3
  29. package/dist/context-menu.cjs +1 -1
  30. package/dist/context-menu.js +3 -3
  31. package/dist/dropdown-menu.cjs +1 -1
  32. package/dist/dropdown-menu.js +10 -10
  33. package/dist/field.cjs +1 -1
  34. package/dist/field.d.ts.map +1 -1
  35. package/dist/field.js +12 -19
  36. package/dist/header.d.ts.map +1 -1
  37. package/dist/header.js +4 -1
  38. package/dist/input-password.cjs +1 -1
  39. package/dist/input-password.js +63 -63
  40. package/dist/link.cjs +1 -1
  41. package/dist/link.js +2 -2
  42. package/dist/logo.cjs +1 -1
  43. package/dist/logo.d.ts.map +1 -1
  44. package/dist/logo.js +17 -16
  45. package/dist/menubar.cjs +1 -1
  46. package/dist/menubar.js +3 -3
  47. package/dist/navigation-menu.cjs +1 -1
  48. package/dist/navigation-menu.d.ts.map +1 -1
  49. package/dist/navigation-menu.js +2 -1
  50. package/dist/pagination.cjs +1 -1
  51. package/dist/pagination.js +16 -16
  52. package/dist/rating.cjs +1 -1
  53. package/dist/rating.js +8 -8
  54. package/dist/resizable.cjs +1 -1
  55. package/dist/resizable.d.ts +1 -1
  56. package/dist/resizable.js +1 -1
  57. package/dist/select.cjs +1 -1
  58. package/dist/select.js +20 -20
  59. package/dist/sheet.d.ts +1 -1
  60. package/dist/sonner.cjs +1 -1
  61. package/dist/sonner.d.ts.map +1 -1
  62. package/dist/sonner.js +9 -8
  63. package/package.json +1 -1
  64. package/src/blocks/data-table.tsx +5 -5
  65. package/src/blocks/sidebar.tsx +3 -2
  66. package/src/components/accordion.tsx +1 -1
  67. package/src/components/breadcrumb.tsx +1 -1
  68. package/src/components/calendar.tsx +6 -3
  69. package/src/components/card.tsx +24 -1
  70. package/src/components/centred-layout.tsx +6 -29
  71. package/src/components/checkbox.tsx +1 -1
  72. package/src/components/combobox.tsx +21 -5
  73. package/src/components/command.tsx +3 -3
  74. package/src/components/context-menu.tsx +3 -3
  75. package/src/components/dropdown-menu.tsx +4 -4
  76. package/src/components/field.tsx +9 -14
  77. package/src/components/header.tsx +4 -1
  78. package/src/components/input-password.tsx +4 -4
  79. package/src/components/link.tsx +1 -1
  80. package/src/components/logo.tsx +10 -9
  81. package/src/components/menubar.tsx +3 -3
  82. package/src/components/navigation-menu.tsx +2 -1
  83. package/src/components/pagination.tsx +3 -3
  84. package/src/components/rating.tsx +2 -2
  85. package/src/components/resizable.tsx +1 -1
  86. package/src/components/select.tsx +4 -4
  87. package/src/components/sonner.tsx +6 -5
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),y=require("react"),j=require("@radix-ui/react-accordion"),A=require("@brightlocal/icons"),c=require("@brightlocal/ui-components/lib/utils");function g(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const i=g(y),r=g(j),b=i.forwardRef((e,a)=>{const{dataHook:t,trackingEl:o,trackingLabel:d,disabled:l,dir:s,orientation:u,className:m,children:f}=e;return e.type==="single"?n.jsx(r.Root,{ref:a,className:m,collapsible:e.collapsible,"data-hook":t,"data-slot":"accordion","data-tracking-el":o,"data-tracking-label":d,defaultValue:e.defaultValue,dir:s,disabled:l,orientation:u,type:"single",value:e.value,onValueChange:e.onValueChange,children:f}):n.jsx(r.Root,{ref:a,className:m,"data-hook":t,"data-slot":"accordion","data-tracking-el":o,"data-tracking-label":d,defaultValue:e.defaultValue,dir:s,disabled:l,orientation:u,type:"multiple",value:e.value,onValueChange:e.onValueChange,children:f})});b.displayName="Accordion";const v=i.forwardRef(({className:e,...a},t)=>n.jsx(r.Item,{ref:t,className:c.cn("border-b last:border-b-0",e),"data-slot":"accordion-item",...a}));v.displayName="AccordionItem";const h=i.forwardRef(({className:e,children:a,...t},o)=>n.jsx(r.Header,{className:"flex",children:n.jsxs(r.Trigger,{ref:o,className:c.cn("focus-visible:border-ring focus-visible:shadow-default flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-shadow outline-none hover:underline disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),"data-slot":"accordion-trigger",...t,children:[a,n.jsx(A.ChevronDownIcon,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})}));h.displayName="AccordionTrigger";const x=i.forwardRef(({className:e,children:a,...t},o)=>n.jsx(r.Content,{ref:o,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm","data-slot":"accordion-content",...t,children:n.jsx("div",{className:c.cn("pt-0 pb-4",e),children:a})}));x.displayName="AccordionContent";exports.Accordion=b;exports.AccordionContent=x;exports.AccordionItem=v;exports.AccordionTrigger=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),y=require("react"),j=require("@radix-ui/react-accordion"),A=require("@brightlocal/icons"),c=require("@brightlocal/ui-components/lib/utils");function g(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const i=g(y),r=g(j),b=i.forwardRef((e,a)=>{const{dataHook:t,trackingEl:o,trackingLabel:d,disabled:l,dir:s,orientation:u,className:m,children:f}=e;return e.type==="single"?n.jsx(r.Root,{ref:a,className:m,collapsible:e.collapsible,"data-hook":t,"data-slot":"accordion","data-tracking-el":o,"data-tracking-label":d,defaultValue:e.defaultValue,dir:s,disabled:l,orientation:u,type:"single",value:e.value,onValueChange:e.onValueChange,children:f}):n.jsx(r.Root,{ref:a,className:m,"data-hook":t,"data-slot":"accordion","data-tracking-el":o,"data-tracking-label":d,defaultValue:e.defaultValue,dir:s,disabled:l,orientation:u,type:"multiple",value:e.value,onValueChange:e.onValueChange,children:f})});b.displayName="Accordion";const v=i.forwardRef(({className:e,...a},t)=>n.jsx(r.Item,{ref:t,className:c.cn("border-b last:border-b-0",e),"data-slot":"accordion-item",...a}));v.displayName="AccordionItem";const h=i.forwardRef(({className:e,children:a,...t},o)=>n.jsx(r.Header,{className:"flex",children:n.jsxs(r.Trigger,{ref:o,className:c.cn("focus-visible:border-ring focus-visible:shadow-default flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-shadow outline-none hover:underline disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),"data-slot":"accordion-trigger",...t,children:[a,n.jsx(A.ChevronDownIcon,{className:"text-muted-foreground pointer-events-none shrink-0 translate-y-0.5 transition-transform duration-200",size:16})]})}));h.displayName="AccordionTrigger";const x=i.forwardRef(({className:e,children:a,...t},o)=>n.jsx(r.Content,{ref:o,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm","data-slot":"accordion-content",...t,children:n.jsx("div",{className:c.cn("pt-0 pb-4",e),children:a})}));x.displayName="AccordionContent";exports.Accordion=b;exports.AccordionContent=x;exports.AccordionItem=v;exports.AccordionTrigger=h;
package/dist/accordion.js CHANGED
@@ -78,7 +78,7 @@ const y = r.forwardRef(({ className: a, children: e, ...t }, n) => /* @__PURE__
78
78
  ...t,
79
79
  children: [
80
80
  e,
81
- /* @__PURE__ */ o(b, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
81
+ /* @__PURE__ */ o(b, { className: "text-muted-foreground pointer-events-none shrink-0 translate-y-0.5 transition-transform duration-200", size: 16 })
82
82
  ]
83
83
  }
84
84
  ) }));
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),Xe=require("react"),r=require("@tanstack/react-table"),S=require("@brightlocal/icons"),j=require("@brightlocal/ui-components/lib/utils"),X=require("../button.cjs"),Y=require("../checkbox.cjs"),_=require("../input-group.cjs"),Ye=require("../skeleton.cjs"),B=require("../dropdown-menu.cjs"),u=require("../table.cjs"),b=require("../pagination.cjs");function Ze(n){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(l,o,s.get?s:{enumerable:!0,get:()=>n[o]})}}return l.default=n,Object.freeze(l)}const c=Ze(Xe);function et({columns:n,data:l,dataHook:o,trackingEl:s,trackingLabel:i,enableRowSelection:f=!1,enableSorting:d=!0,enableFiltering:g=!1,enableGlobalFiltering:p=!1,enablePagination:w=!1,enableColumnPinning:C=!1,enableRowPinning:x=!1,enableColumnOrdering:T=!1,enableGrouping:h=!1,enableExpanding:k=!1,enableFaceting:ce=!1,pageSize:U=10,noResultsMessage:re="No results.",isLoading:de=!1,skeletonRowCount:ue,getSubRows:ge,sorting:be,onSortingChange:y,columnFilters:fe,onColumnFiltersChange:P,globalFilter:xe,onGlobalFilterChange:D,rowSelection:me,onRowSelectionChange:I,columnOrder:he,onColumnOrderChange:M,columnPinning:pe,onColumnPinningChange:N,rowPinning:we,onRowPinningChange:F,grouping:je,onGroupingChange:v,expanded:Ce,onExpandedChange:V,className:Se,renderToolbar:W,renderFooter:J,renderPagination:K},Re){const[Te,ke]=c.useState([]),[ye,Pe]=c.useState([]),[De,Ie]=c.useState(""),[Me,Ne]=c.useState({}),[Fe,ve]=c.useState([]),[Ve,$e]=c.useState({}),[qe,Ae]=c.useState({}),[Oe,Ge]=c.useState([]),[He,ze]=c.useState({}),$=be??Te,q=fe??ye,A=xe??De,O=me??Me,G=he??Fe,H=pe??Ve,z=we??qe,E=je??Oe,L=Ce??He,Ee=c.useCallback(t=>{const a=typeof t=="function"?t($):t;y?y(a):ke(a)},[$,y]),Le=c.useCallback(t=>{const a=typeof t=="function"?t(q):t;P?P(a):Pe(a)},[q,P]),_e=c.useCallback(t=>{const a=typeof t=="function"?t(A):t;D?D(a):Ie(a)},[A,D]),Be=c.useCallback(t=>{const a=typeof t=="function"?t(O):t;I?I(a):Ne(a)},[O,I]),Ue=c.useCallback(t=>{const a=typeof t=="function"?t(G):t;M?M(a):ve(a)},[G,M]),We=c.useCallback(t=>{const a=typeof t=="function"?t(H):t;N?N(a):$e(a)},[H,N]),Je=c.useCallback(t=>{const a=typeof t=="function"?t(z):t;F?F(a):Ae(a)},[z,F]),Ke=c.useCallback(t=>{const a=typeof t=="function"?t(E):t;v?v(a):Ge(a)},[E,v]),Q=c.useCallback(t=>{const a=typeof t=="function"?t(L):t;V?V(a):ze(a)},[L,V]),m=r.useReactTable({data:l,columns:n,getCoreRowModel:r.getCoreRowModel(),...w&&{getPaginationRowModel:r.getPaginationRowModel(),initialState:{pagination:{pageSize:U}}},...d&&{getSortedRowModel:r.getSortedRowModel(),onSortingChange:Ee},...g&&{getFilteredRowModel:r.getFilteredRowModel(),onColumnFiltersChange:Le},...p&&{getFilteredRowModel:r.getFilteredRowModel(),onGlobalFilterChange:_e,globalFilterFn:"includesString"},...f&&{enableRowSelection:!0,onRowSelectionChange:Be},...T&&{onColumnOrderChange:Ue},...C&&{onColumnPinningChange:We},...x&&{enableRowPinning:!0,onRowPinningChange:Je,keepPinnedRows:!0},...h&&{getGroupedRowModel:r.getGroupedRowModel(),getExpandedRowModel:r.getExpandedRowModel(),onGroupingChange:Ke,onExpandedChange:Q},...k&&{getExpandedRowModel:r.getExpandedRowModel(),onExpandedChange:Q,getSubRows:ge},...ce&&{getFacetedRowModel:r.getFacetedRowModel(),getFacetedUniqueValues:r.getFacetedUniqueValues(),getFacetedMinMaxValues:r.getFacetedMinMaxValues()},state:{sorting:$,columnFilters:q,globalFilter:A,rowSelection:O,columnOrder:G,columnPinning:H,rowPinning:z,grouping:E,expanded:L}});return e.jsxs("div",{ref:Re,className:Se,"data-hook":o,"data-slot":"data-table","data-tracking-el":s,"data-tracking-label":i,children:[W&&W(m),e.jsxs(u.Table,{dataHook:`${o}-table`,children:[e.jsx(u.TableHeader,{children:m.getHeaderGroups().map(t=>e.jsx(u.TableRow,{children:t.headers.map(a=>e.jsx(u.TableHead,{colSpan:a.colSpan,children:a.isPlaceholder?null:r.flexRender(a.column.columnDef.header,a.getContext())},a.id))},t.id))}),e.jsx(u.TableBody,{children:de?Array.from({length:ue??U}).map((t,a)=>e.jsx(u.TableRow,{children:m.getVisibleLeafColumns().map((tt,Qe)=>e.jsx(u.TableCell,{children:e.jsx(Ye.Skeleton,{className:"h-4 w-full"})},`skeleton-${a}-${Qe}`))},`skeleton-${a}`)):e.jsxs(e.Fragment,{children:[x&&m.getTopRows().map(t=>e.jsx(u.TableRow,{"data-state":t.getIsSelected()&&"selected",children:t.getVisibleCells().map(a=>e.jsx(u.TableCell,{children:r.flexRender(a.column.columnDef.cell,a.getContext())},a.id))},t.id)),m.getRowModel().rows?.length?m.getRowModel().rows.map(t=>e.jsx(u.TableRow,{"data-state":t.getIsSelected()&&"selected",children:t.getVisibleCells().map(a=>e.jsx(u.TableCell,{children:r.flexRender(a.column.columnDef.cell,a.getContext())},a.id))},t.id)):e.jsx(u.TableRow,{children:e.jsx(u.TableCell,{colSpan:m.getVisibleLeafColumns().length,children:re})}),x&&m.getBottomRows().map(t=>e.jsx(u.TableRow,{"data-state":t.getIsSelected()&&"selected",children:t.getVisibleCells().map(a=>e.jsx(u.TableCell,{children:r.flexRender(a.column.columnDef.cell,a.getContext())},a.id))},t.id))]})}),J&&J(m)]}),K&&K(m)]})}const Z=c.forwardRef(et);Z.displayName="DataTable";function ee({column:n,title:l,className:o,dataHook:s,trackingEl:i,trackingLabel:f,align:d="left"}){if(!n.getCanSort())return e.jsx("div",{className:j.cn("text-muted-foreground text-left text-sm leading-normal font-medium",d==="right"&&"text-right",d==="center"&&"text-center",o),"data-hook":s,"data-slot":"data-table-column-header","data-tracking-el":i,"data-tracking-label":f,children:l});const g=n.getIsSorted(),p=g==="desc"?`Sort by ${l}, currently descending`:g==="asc"?`Sort by ${l}, currently ascending`:`Sort by ${l}`;return e.jsx("div",{className:j.cn("flex items-center",d==="right"&&"justify-end",d==="center"&&"justify-center",o),"data-slot":"data-table-column-header","data-tracking-el":i,"data-tracking-label":f,children:e.jsxs(X.Button,{"aria-label":p,className:j.cn("text-muted-foreground h-auto p-0 text-sm font-medium"),dataHook:s||`column-header-${n.id}`,size:"sm",variant:"ghost",onClick:()=>n.toggleSorting(g==="asc"),children:[e.jsx("span",{"aria-hidden":"true",children:l}),e.jsx("span",{"aria-hidden":"true",className:"flex size-3 items-center justify-center",children:g==="desc"?e.jsx(S.ArrowDownIcon,{className:"size-3"}):g==="asc"?e.jsx(S.ArrowUpIcon,{className:"size-3"}):e.jsx(S.ArrowUpDownIcon,{className:"size-3"})})]})})}ee.displayName="DataTableColumnHeader";function te({row:n,dataHook:l,trackingEl:o,trackingLabel:s,ariaLabel:i="Open row actions menu",children:f}){return e.jsxs(B.DropdownMenu,{children:[e.jsx(B.DropdownMenuTrigger,{asChild:!0,"data-slot":"data-table-row-actions",children:e.jsx(X.Button,{"aria-label":i,dataHook:l||`row-actions-${n.id}`,size:"sm",trackingEl:o,trackingLabel:s,variant:"ghost",children:e.jsx(S.EllipsisIcon,{className:"size-4"})})}),e.jsx(B.DropdownMenuContent,{align:"end",dataHook:`${l}-menu`,children:f})]})}te.displayName="DataTableRowActions";function R({dataHook:n,trackingEl:l,trackingLabel:o,className:s,children:i}){return e.jsx("div",{className:j.cn("flex flex-wrap items-center justify-between gap-2 py-4",s),"data-hook":n,"data-slot":"data-table-toolbar","data-tracking-el":l,"data-tracking-label":o,children:i})}function ae({dataHook:n,trackingEl:l,trackingLabel:o,className:s,children:i}){return e.jsx("div",{className:j.cn("flex items-center gap-2",s),"data-hook":n,"data-slot":"data-table-toolbar-left","data-tracking-el":l,"data-tracking-label":o,children:i})}ae.displayName="DataTableToolbar.Left";function ne({dataHook:n,trackingEl:l,trackingLabel:o,className:s,children:i}){return e.jsx("div",{className:j.cn("flex items-center gap-2",s),"data-hook":n,"data-slot":"data-table-toolbar-right","data-tracking-el":l,"data-tracking-label":o,children:i})}ne.displayName="DataTableToolbar.Right";R.Left=ae;R.Right=ne;R.displayName="DataTableToolbar";function le({table:n,dataHook:l,trackingEl:o,trackingLabel:s,ariaLabel:i="Search table",placeholder:f="Search...",column:d,width:g,className:p}){const w=d?n.getColumn(d)?.getFilterValue()??"":n.getState().globalFilter??"",C=x=>{d?n.getColumn(d)?.setFilterValue(x):n.setGlobalFilter(x)};return e.jsx("div",{className:j.cn(!g&&"w-full max-w-sm",p),"data-slot":"data-table-search",style:g?{width:g,minWidth:g}:void 0,children:e.jsxs(_.InputGroup,{className:"rounded-full",dataHook:l,children:[e.jsx(_.InputGroupInput,{"aria-label":i,placeholder:f,trackingEl:o,trackingLabel:s,type:"text",value:w,onChange:x=>C(x.target.value)}),e.jsx(_.InputGroupAddon,{className:"pr-3",children:e.jsx(S.SearchIcon,{className:"size-4"})})]})})}le.displayName="DataTableSearch";function oe({table:n,dataHook:l,trackingEl:o,trackingLabel:s,className:i,ariaLabel:f="Table pagination"}){const d=n.getState().pagination.pageIndex+1,g=n.getPageCount(),p=n.getState().pagination.pageSize,w=n.getFilteredRowModel().rows.length,C=w===0?0:(d-1)*p+1,x=Math.min(d*p,w),T=b.usePagination({page:d,totalPages:g,siblingCount:1,boundaryCount:1});return e.jsxs("div",{className:j.cn("flex items-center justify-end gap-4",i),"data-hook":l,"data-slot":"data-table-pagination","data-tracking-el":o,"data-tracking-label":s,children:[e.jsx("span",{className:"text-muted-foreground text-sm",children:w===0?"0 of 0":`${C}-${x} of ${w}`}),e.jsx(b.Pagination,{ariaLabel:f,className:"mx-0 w-auto justify-end",dataHook:`${l}-nav`,children:e.jsx(b.PaginationContent,{children:T.map((h,k)=>h==="previous"?e.jsx(b.PaginationItem,{children:e.jsx(b.PaginationPrevious,{disabled:!n.getCanPreviousPage(),onClick:()=>n.previousPage()})},"previous"):h==="next"?e.jsx(b.PaginationItem,{children:e.jsx(b.PaginationNext,{disabled:!n.getCanNextPage(),onClick:()=>n.nextPage()})},"next"):h==="ellipsis"?e.jsx(b.PaginationItem,{children:e.jsx(b.PaginationEllipsis,{})},`ellipsis-${k}`):e.jsx(b.PaginationItem,{children:e.jsx(b.PaginationLink,{isActive:h===d,page:h,onClick:()=>n.setPageIndex(h-1)})},h))})})]})}oe.displayName="DataTablePagination";function se({table:n,dataHook:l,trackingEl:o,trackingLabel:s}){return e.jsx(Y.Checkbox,{"aria-label":"Select all",checked:n.getIsAllPageRowsSelected()||n.getIsSomePageRowsSelected()&&"indeterminate",dataHook:l||"select-all-checkbox",trackingEl:o,trackingLabel:s,onCheckedChange:i=>n.toggleAllPageRowsSelected(!!i)})}se.displayName="DataTableSelectAllCheckbox";function ie({row:n,dataHook:l,trackingEl:o,trackingLabel:s}){return e.jsx(Y.Checkbox,{"aria-label":"Select row",checked:n.getIsSelected(),dataHook:l||`select-row-${n.id}`,disabled:!n.getCanSelect(),trackingEl:o,trackingLabel:s,onCheckedChange:i=>n.toggleSelected(!!i)})}ie.displayName="DataTableSelectRowCheckbox";Object.defineProperty(exports,"createColumnHelper",{enumerable:!0,get:()=>r.createColumnHelper});Object.defineProperty(exports,"flexRender",{enumerable:!0,get:()=>r.flexRender});exports.DataTable=Z;exports.DataTableColumnHeader=ee;exports.DataTablePagination=oe;exports.DataTableRowActions=te;exports.DataTableSearch=le;exports.DataTableSelectAllCheckbox=se;exports.DataTableSelectRowCheckbox=ie;exports.DataTableToolbar=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),Xe=require("react"),r=require("@tanstack/react-table"),S=require("@brightlocal/icons"),j=require("@brightlocal/ui-components/lib/utils"),X=require("../button.cjs"),Y=require("../checkbox.cjs"),_=require("../input-group.cjs"),Ye=require("../skeleton.cjs"),B=require("../dropdown-menu.cjs"),u=require("../table.cjs"),b=require("../pagination.cjs");function Ze(n){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(l,o,s.get?s:{enumerable:!0,get:()=>n[o]})}}return l.default=n,Object.freeze(l)}const c=Ze(Xe);function et({columns:n,data:l,dataHook:o,trackingEl:s,trackingLabel:i,enableRowSelection:f=!1,enableSorting:d=!0,enableFiltering:g=!1,enableGlobalFiltering:p=!1,enablePagination:w=!1,enableColumnPinning:C=!1,enableRowPinning:x=!1,enableColumnOrdering:T=!1,enableGrouping:h=!1,enableExpanding:k=!1,enableFaceting:ce=!1,pageSize:U=10,noResultsMessage:re="No results.",isLoading:de=!1,skeletonRowCount:ue,getSubRows:ge,sorting:be,onSortingChange:y,columnFilters:fe,onColumnFiltersChange:P,globalFilter:xe,onGlobalFilterChange:D,rowSelection:me,onRowSelectionChange:I,columnOrder:he,onColumnOrderChange:M,columnPinning:pe,onColumnPinningChange:N,rowPinning:we,onRowPinningChange:F,grouping:je,onGroupingChange:v,expanded:Ce,onExpandedChange:V,className:Se,renderToolbar:W,renderFooter:J,renderPagination:K},Re){const[Te,ke]=c.useState([]),[ye,Pe]=c.useState([]),[De,Ie]=c.useState(""),[Me,Ne]=c.useState({}),[Fe,ve]=c.useState([]),[Ve,$e]=c.useState({}),[qe,Ae]=c.useState({}),[Oe,Ge]=c.useState([]),[He,ze]=c.useState({}),$=be??Te,q=fe??ye,A=xe??De,O=me??Me,G=he??Fe,H=pe??Ve,z=we??qe,E=je??Oe,L=Ce??He,Ee=c.useCallback(t=>{const a=typeof t=="function"?t($):t;y?y(a):ke(a)},[$,y]),Le=c.useCallback(t=>{const a=typeof t=="function"?t(q):t;P?P(a):Pe(a)},[q,P]),_e=c.useCallback(t=>{const a=typeof t=="function"?t(A):t;D?D(a):Ie(a)},[A,D]),Be=c.useCallback(t=>{const a=typeof t=="function"?t(O):t;I?I(a):Ne(a)},[O,I]),Ue=c.useCallback(t=>{const a=typeof t=="function"?t(G):t;M?M(a):ve(a)},[G,M]),We=c.useCallback(t=>{const a=typeof t=="function"?t(H):t;N?N(a):$e(a)},[H,N]),Je=c.useCallback(t=>{const a=typeof t=="function"?t(z):t;F?F(a):Ae(a)},[z,F]),Ke=c.useCallback(t=>{const a=typeof t=="function"?t(E):t;v?v(a):Ge(a)},[E,v]),Q=c.useCallback(t=>{const a=typeof t=="function"?t(L):t;V?V(a):ze(a)},[L,V]),m=r.useReactTable({data:l,columns:n,getCoreRowModel:r.getCoreRowModel(),...w&&{getPaginationRowModel:r.getPaginationRowModel(),initialState:{pagination:{pageSize:U}}},...d&&{getSortedRowModel:r.getSortedRowModel(),onSortingChange:Ee},...g&&{getFilteredRowModel:r.getFilteredRowModel(),onColumnFiltersChange:Le},...p&&{getFilteredRowModel:r.getFilteredRowModel(),onGlobalFilterChange:_e,globalFilterFn:"includesString"},...f&&{enableRowSelection:!0,onRowSelectionChange:Be},...T&&{onColumnOrderChange:Ue},...C&&{onColumnPinningChange:We},...x&&{enableRowPinning:!0,onRowPinningChange:Je,keepPinnedRows:!0},...h&&{getGroupedRowModel:r.getGroupedRowModel(),getExpandedRowModel:r.getExpandedRowModel(),onGroupingChange:Ke,onExpandedChange:Q},...k&&{getExpandedRowModel:r.getExpandedRowModel(),onExpandedChange:Q,getSubRows:ge},...ce&&{getFacetedRowModel:r.getFacetedRowModel(),getFacetedUniqueValues:r.getFacetedUniqueValues(),getFacetedMinMaxValues:r.getFacetedMinMaxValues()},state:{sorting:$,columnFilters:q,globalFilter:A,rowSelection:O,columnOrder:G,columnPinning:H,rowPinning:z,grouping:E,expanded:L}});return e.jsxs("div",{ref:Re,className:Se,"data-hook":o,"data-slot":"data-table","data-tracking-el":s,"data-tracking-label":i,children:[W&&W(m),e.jsxs(u.Table,{dataHook:`${o}-table`,children:[e.jsx(u.TableHeader,{children:m.getHeaderGroups().map(t=>e.jsx(u.TableRow,{children:t.headers.map(a=>e.jsx(u.TableHead,{colSpan:a.colSpan,children:a.isPlaceholder?null:r.flexRender(a.column.columnDef.header,a.getContext())},a.id))},t.id))}),e.jsx(u.TableBody,{children:de?Array.from({length:ue??U}).map((t,a)=>e.jsx(u.TableRow,{children:m.getVisibleLeafColumns().map((tt,Qe)=>e.jsx(u.TableCell,{children:e.jsx(Ye.Skeleton,{className:"h-4 w-full"})},`skeleton-${a}-${Qe}`))},`skeleton-${a}`)):e.jsxs(e.Fragment,{children:[x&&m.getTopRows().map(t=>e.jsx(u.TableRow,{"data-state":t.getIsSelected()&&"selected",children:t.getVisibleCells().map(a=>e.jsx(u.TableCell,{children:r.flexRender(a.column.columnDef.cell,a.getContext())},a.id))},t.id)),m.getRowModel().rows?.length?m.getRowModel().rows.map(t=>e.jsx(u.TableRow,{"data-state":t.getIsSelected()&&"selected",children:t.getVisibleCells().map(a=>e.jsx(u.TableCell,{children:r.flexRender(a.column.columnDef.cell,a.getContext())},a.id))},t.id)):e.jsx(u.TableRow,{children:e.jsx(u.TableCell,{colSpan:m.getVisibleLeafColumns().length,children:re})}),x&&m.getBottomRows().map(t=>e.jsx(u.TableRow,{"data-state":t.getIsSelected()&&"selected",children:t.getVisibleCells().map(a=>e.jsx(u.TableCell,{children:r.flexRender(a.column.columnDef.cell,a.getContext())},a.id))},t.id))]})}),J&&J(m)]}),K&&K(m)]})}const Z=c.forwardRef(et);Z.displayName="DataTable";function ee({column:n,title:l,className:o,dataHook:s,trackingEl:i,trackingLabel:f,align:d="left"}){if(!n.getCanSort())return e.jsx("div",{className:j.cn("text-muted-foreground text-left text-sm leading-normal font-medium",d==="right"&&"text-right",d==="center"&&"text-center",o),"data-hook":s,"data-slot":"data-table-column-header","data-tracking-el":i,"data-tracking-label":f,children:l});const g=n.getIsSorted(),p=g==="desc"?`Sort by ${l}, currently descending`:g==="asc"?`Sort by ${l}, currently ascending`:`Sort by ${l}`;return e.jsx("div",{className:j.cn("flex items-center",d==="right"&&"justify-end",d==="center"&&"justify-center",o),"data-slot":"data-table-column-header","data-tracking-el":i,"data-tracking-label":f,children:e.jsxs(X.Button,{"aria-label":p,className:j.cn("text-muted-foreground h-auto p-0 text-sm font-medium"),dataHook:s||`column-header-${n.id}`,size:"sm",variant:"ghost",onClick:()=>n.toggleSorting(g==="asc"),children:[e.jsx("span",{"aria-hidden":"true",children:l}),e.jsx("span",{"aria-hidden":"true",className:"flex size-3 items-center justify-center",children:g==="desc"?e.jsx(S.ArrowDownIcon,{size:12}):g==="asc"?e.jsx(S.ArrowUpIcon,{size:12}):e.jsx(S.ArrowUpDownIcon,{size:12})})]})})}ee.displayName="DataTableColumnHeader";function te({row:n,dataHook:l,trackingEl:o,trackingLabel:s,ariaLabel:i="Open row actions menu",children:f}){return e.jsxs(B.DropdownMenu,{children:[e.jsx(B.DropdownMenuTrigger,{asChild:!0,"data-slot":"data-table-row-actions",children:e.jsx(X.Button,{"aria-label":i,dataHook:l||`row-actions-${n.id}`,size:"sm",trackingEl:o,trackingLabel:s,variant:"ghost",children:e.jsx(S.EllipsisIcon,{size:16})})}),e.jsx(B.DropdownMenuContent,{align:"end",dataHook:`${l}-menu`,children:f})]})}te.displayName="DataTableRowActions";function R({dataHook:n,trackingEl:l,trackingLabel:o,className:s,children:i}){return e.jsx("div",{className:j.cn("flex flex-wrap items-center justify-between gap-2 py-4",s),"data-hook":n,"data-slot":"data-table-toolbar","data-tracking-el":l,"data-tracking-label":o,children:i})}function ae({dataHook:n,trackingEl:l,trackingLabel:o,className:s,children:i}){return e.jsx("div",{className:j.cn("flex items-center gap-2",s),"data-hook":n,"data-slot":"data-table-toolbar-left","data-tracking-el":l,"data-tracking-label":o,children:i})}ae.displayName="DataTableToolbar.Left";function ne({dataHook:n,trackingEl:l,trackingLabel:o,className:s,children:i}){return e.jsx("div",{className:j.cn("flex items-center gap-2",s),"data-hook":n,"data-slot":"data-table-toolbar-right","data-tracking-el":l,"data-tracking-label":o,children:i})}ne.displayName="DataTableToolbar.Right";R.Left=ae;R.Right=ne;R.displayName="DataTableToolbar";function le({table:n,dataHook:l,trackingEl:o,trackingLabel:s,ariaLabel:i="Search table",placeholder:f="Search...",column:d,width:g,className:p}){const w=d?n.getColumn(d)?.getFilterValue()??"":n.getState().globalFilter??"",C=x=>{d?n.getColumn(d)?.setFilterValue(x):n.setGlobalFilter(x)};return e.jsx("div",{className:j.cn(!g&&"w-full max-w-sm",p),"data-slot":"data-table-search",style:g?{width:g,minWidth:g}:void 0,children:e.jsxs(_.InputGroup,{className:"rounded-full",dataHook:l,children:[e.jsx(_.InputGroupInput,{"aria-label":i,placeholder:f,trackingEl:o,trackingLabel:s,type:"text",value:w,onChange:x=>C(x.target.value)}),e.jsx(_.InputGroupAddon,{className:"pr-3",children:e.jsx(S.SearchIcon,{size:16})})]})})}le.displayName="DataTableSearch";function oe({table:n,dataHook:l,trackingEl:o,trackingLabel:s,className:i,ariaLabel:f="Table pagination"}){const d=n.getState().pagination.pageIndex+1,g=n.getPageCount(),p=n.getState().pagination.pageSize,w=n.getFilteredRowModel().rows.length,C=w===0?0:(d-1)*p+1,x=Math.min(d*p,w),T=b.usePagination({page:d,totalPages:g,siblingCount:1,boundaryCount:1});return e.jsxs("div",{className:j.cn("flex items-center justify-end gap-4",i),"data-hook":l,"data-slot":"data-table-pagination","data-tracking-el":o,"data-tracking-label":s,children:[e.jsx("span",{className:"text-muted-foreground text-sm",children:w===0?"0 of 0":`${C}-${x} of ${w}`}),e.jsx(b.Pagination,{ariaLabel:f,className:"mx-0 w-auto justify-end",dataHook:`${l}-nav`,children:e.jsx(b.PaginationContent,{children:T.map((h,k)=>h==="previous"?e.jsx(b.PaginationItem,{children:e.jsx(b.PaginationPrevious,{disabled:!n.getCanPreviousPage(),onClick:()=>n.previousPage()})},"previous"):h==="next"?e.jsx(b.PaginationItem,{children:e.jsx(b.PaginationNext,{disabled:!n.getCanNextPage(),onClick:()=>n.nextPage()})},"next"):h==="ellipsis"?e.jsx(b.PaginationItem,{children:e.jsx(b.PaginationEllipsis,{})},`ellipsis-${k}`):e.jsx(b.PaginationItem,{children:e.jsx(b.PaginationLink,{isActive:h===d,page:h,onClick:()=>n.setPageIndex(h-1)})},h))})})]})}oe.displayName="DataTablePagination";function se({table:n,dataHook:l,trackingEl:o,trackingLabel:s}){return e.jsx(Y.Checkbox,{"aria-label":"Select all",checked:n.getIsAllPageRowsSelected()||n.getIsSomePageRowsSelected()&&"indeterminate",dataHook:l||"select-all-checkbox",trackingEl:o,trackingLabel:s,onCheckedChange:i=>n.toggleAllPageRowsSelected(!!i)})}se.displayName="DataTableSelectAllCheckbox";function ie({row:n,dataHook:l,trackingEl:o,trackingLabel:s}){return e.jsx(Y.Checkbox,{"aria-label":"Select row",checked:n.getIsSelected(),dataHook:l||`select-row-${n.id}`,disabled:!n.getCanSelect(),trackingEl:o,trackingLabel:s,onCheckedChange:i=>n.toggleSelected(!!i)})}ie.displayName="DataTableSelectRowCheckbox";Object.defineProperty(exports,"createColumnHelper",{enumerable:!0,get:()=>r.createColumnHelper});Object.defineProperty(exports,"flexRender",{enumerable:!0,get:()=>r.flexRender});exports.DataTable=Z;exports.DataTableColumnHeader=ee;exports.DataTablePagination=oe;exports.DataTableRowActions=te;exports.DataTableSearch=le;exports.DataTableSelectAllCheckbox=se;exports.DataTableSelectRowCheckbox=ie;exports.DataTableToolbar=R;
@@ -36,13 +36,13 @@ function Rt({
36
36
  sorting: se,
37
37
  onSortingChange: P,
38
38
  columnFilters: re,
39
- onColumnFiltersChange: N,
39
+ onColumnFiltersChange: D,
40
40
  globalFilter: ce,
41
- onGlobalFilterChange: D,
41
+ onGlobalFilterChange: I,
42
42
  rowSelection: de,
43
- onRowSelectionChange: I,
43
+ onRowSelectionChange: M,
44
44
  columnOrder: ge,
45
- onColumnOrderChange: M,
45
+ onColumnOrderChange: N,
46
46
  columnPinning: ue,
47
47
  onColumnPinningChange: F,
48
48
  rowPinning: me,
@@ -58,11 +58,11 @@ function Rt({
58
58
  }, be) {
59
59
  const [we, Ce] = r.useState(
60
60
  []
61
- ), [Se, xe] = r.useState([]), [ke, Re] = r.useState(""), [ye, Te] = r.useState({}), [Pe, Ne] = r.useState([]), [De, Ie] = r.useState({}), [Me, Fe] = r.useState({}), [Ve, ve] = r.useState(
61
+ ), [Se, xe] = r.useState([]), [ke, Re] = r.useState(""), [ye, Te] = r.useState({}), [Pe, De] = r.useState([]), [Ie, Me] = r.useState({}), [Ne, Fe] = r.useState({}), [Ve, ve] = r.useState(
62
62
  []
63
63
  ), [$e, Ae] = r.useState(
64
64
  {}
65
- ), A = se ?? we, G = re ?? Se, z = ce ?? ke, H = de ?? ye, j = ge ?? Pe, E = ue ?? De, L = me ?? Me, O = fe ?? Ve, U = he ?? $e, Ge = r.useCallback(
65
+ ), A = se ?? we, G = re ?? Se, z = ce ?? ke, H = de ?? ye, j = ge ?? Pe, E = ue ?? Ie, L = me ?? Ne, O = fe ?? Ve, U = he ?? $e, Ge = r.useCallback(
66
66
  (e) => {
67
67
  const t = typeof e == "function" ? e(A) : e;
68
68
  P ? P(t) : Ce(t);
@@ -71,31 +71,31 @@ function Rt({
71
71
  ), ze = r.useCallback(
72
72
  (e) => {
73
73
  const t = typeof e == "function" ? e(G) : e;
74
- N ? N(t) : xe(t);
74
+ D ? D(t) : xe(t);
75
75
  },
76
- [G, N]
76
+ [G, D]
77
77
  ), He = r.useCallback(
78
78
  (e) => {
79
79
  const t = typeof e == "function" ? e(z) : e;
80
- D ? D(t) : Re(t);
80
+ I ? I(t) : Re(t);
81
81
  },
82
- [z, D]
82
+ [z, I]
83
83
  ), je = r.useCallback(
84
84
  (e) => {
85
85
  const t = typeof e == "function" ? e(H) : e;
86
- I ? I(t) : Te(t);
86
+ M ? M(t) : Te(t);
87
87
  },
88
- [H, I]
88
+ [H, M]
89
89
  ), Ee = r.useCallback(
90
90
  (e) => {
91
91
  const t = typeof e == "function" ? e(j) : e;
92
- M ? M(t) : Ne(t);
92
+ N ? N(t) : De(t);
93
93
  },
94
- [j, M]
94
+ [j, N]
95
95
  ), Le = r.useCallback(
96
96
  (e) => {
97
97
  const t = typeof e == "function" ? e(E) : e;
98
- F ? F(t) : Ie(t);
98
+ F ? F(t) : Me(t);
99
99
  },
100
100
  [E, F]
101
101
  ), Oe = r.useCallback(
@@ -313,7 +313,7 @@ function Tt({
313
313
  {
314
314
  "aria-hidden": "true",
315
315
  className: "flex size-3 items-center justify-center",
316
- children: d === "desc" ? /* @__PURE__ */ a(et, { className: "size-3" }) : d === "asc" ? /* @__PURE__ */ a(tt, { className: "size-3" }) : /* @__PURE__ */ a(at, { className: "size-3" })
316
+ children: d === "desc" ? /* @__PURE__ */ a(et, { size: 12 }) : d === "asc" ? /* @__PURE__ */ a(tt, { size: 12 }) : /* @__PURE__ */ a(at, { size: 12 })
317
317
  }
318
318
  )
319
319
  ]
@@ -341,7 +341,7 @@ function Pt({
341
341
  trackingEl: o,
342
342
  trackingLabel: i,
343
343
  variant: "ghost",
344
- children: /* @__PURE__ */ a(nt, { className: "size-4" })
344
+ children: /* @__PURE__ */ a(nt, { size: 16 })
345
345
  }
346
346
  ) }),
347
347
  /* @__PURE__ */ a(gt, { align: "end", dataHook: `${l}-menu`, children: g })
@@ -413,7 +413,7 @@ te.displayName = "DataTableToolbar.Right";
413
413
  B.Left = ee;
414
414
  B.Right = te;
415
415
  B.displayName = "DataTableToolbar";
416
- function Nt({
416
+ function Dt({
417
417
  table: n,
418
418
  dataHook: l,
419
419
  trackingEl: o,
@@ -446,13 +446,13 @@ function Nt({
446
446
  onChange: (u) => S(u.target.value)
447
447
  }
448
448
  ),
449
- /* @__PURE__ */ a(st, { className: "pr-3", children: /* @__PURE__ */ a(lt, { className: "size-4" }) })
449
+ /* @__PURE__ */ a(st, { className: "pr-3", children: /* @__PURE__ */ a(lt, { size: 16 }) })
450
450
  ] })
451
451
  }
452
452
  );
453
453
  }
454
- Nt.displayName = "DataTableSearch";
455
- function Dt({
454
+ Dt.displayName = "DataTableSearch";
455
+ function It({
456
456
  table: n,
457
457
  dataHook: l,
458
458
  trackingEl: o,
@@ -508,8 +508,8 @@ function Dt({
508
508
  }
509
509
  );
510
510
  }
511
- Dt.displayName = "DataTablePagination";
512
- function It({
511
+ It.displayName = "DataTablePagination";
512
+ function Mt({
513
513
  table: n,
514
514
  dataHook: l,
515
515
  trackingEl: o,
@@ -527,8 +527,8 @@ function It({
527
527
  }
528
528
  );
529
529
  }
530
- It.displayName = "DataTableSelectAllCheckbox";
531
- function Mt({
530
+ Mt.displayName = "DataTableSelectAllCheckbox";
531
+ function Nt({
532
532
  row: n,
533
533
  dataHook: l,
534
534
  trackingEl: o,
@@ -547,15 +547,15 @@ function Mt({
547
547
  }
548
548
  );
549
549
  }
550
- Mt.displayName = "DataTableSelectRowCheckbox";
550
+ Nt.displayName = "DataTableSelectRowCheckbox";
551
551
  export {
552
552
  yt as DataTable,
553
553
  Tt as DataTableColumnHeader,
554
- Dt as DataTablePagination,
554
+ It as DataTablePagination,
555
555
  Pt as DataTableRowActions,
556
- Nt as DataTableSearch,
557
- It as DataTableSelectAllCheckbox,
558
- Mt as DataTableSelectRowCheckbox,
556
+ Dt as DataTableSearch,
557
+ Mt as DataTableSelectAllCheckbox,
558
+ Nt as DataTableSelectRowCheckbox,
559
559
  B as DataTableToolbar,
560
560
  qt as createColumnHelper,
561
561
  _t as flexRender
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),fe=require("react"),k=require("@radix-ui/react-slot"),R=require("class-variance-authority"),f=require("@brightlocal/icons"),d=require("@brightlocal/ui-components/lib/utils"),ge=require("../button.cjs"),me=require("../input.cjs"),he=require("../separator.cjs"),C=require("../sheet.cjs"),D=require("../skeleton.cjs"),M=require("../tooltip.cjs"),xe=require("../hooks/use-mobile.cjs");function ve(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const i=ve(fe);var E=(e=>(e.LEFT="left",e))(E||{}),z=(e=>(e.SIDEBAR="sidebar",e))(z||{}),O=(e=>(e.OFFCANVAS="offcanvas",e.ICON="icon",e.NONE="none",e))(O||{}),A=(e=>(e.DEFAULT="default",e.SM="sm",e.XS="xs",e))(A||{}),T=(e=>(e.DEFAULT="default",e.COLLAPSIBLE="collapsible",e.ACTION="action",e))(T||{}),_=(e=>(e.SIMPLE="simple",e.COLLAPSIBLE="collapsible",e.DROPDOWN="dropdown",e.TREE="tree",e.BADGE="badge",e.BIG_ICON="bigIcon",e.CHECKBOX="checkbox",e))(_||{}),L=(e=>(e.DEFAULT="default",e.SM="sm",e.LG="lg",e))(L||{}),B=(e=>(e.DEFAULT="default",e.BORDER="border",e.INDENT="indent",e))(B||{}),P=(e=>(e.SM="sm",e.MD="md",e))(P||{}),q=(e=>(e.CARET="caret",e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e.UP_DOWN="upDown",e.PLUS_MINUS="plusMinus",e.DOTS="dots",e))(q||{});const Se="sidebar:state",we=3600*24*7,ke="256px",Ne="288px",ye="48px",je="b",G=i.createContext(null);function N(){const e=i.useContext(G);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const F=i.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:t,defaultOpen:o=!0,open:s,onOpenChange:n,className:l,style:c,children:g,...m},v)=>{const u=xe.useIsMobile(),[b,h]=i.useState(!1),[S,be]=i.useState(o),w=s??S,y=i.useCallback(p=>{const x=typeof p=="function"?p(w):p;n?n(x):be(x),document.cookie=`${Se}=${x}; path=/; max-age=${we}`},[n,w]),j=i.useCallback(()=>u?h(p=>!p):y(p=>!p),[u,y,h]);i.useEffect(()=>{const p=x=>{x.key===je&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),j())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[j]);const I=w?"expanded":"collapsed",pe=i.useMemo(()=>({state:I,open:w,setOpen:y,isMobile:u,openMobile:b,setOpenMobile:h,toggleSidebar:j}),[I,w,y,u,b,h,j]);return r.jsx(G.Provider,{value:pe,children:r.jsx(M.TooltipProvider,{delayDuration:0,children:r.jsx("div",{ref:v,className:d.cn("group/sidebar-wrapper flex min-h-svh w-full",l),"data-hook":e,"data-slot":"sidebar-provider","data-tracking-el":a||"sidebar-provider","data-tracking-label":t,style:{"--sidebar-width":ke,"--sidebar-width-icon":ye,...c},...m,children:g})})})});F.displayName="SidebarProvider";const H=i.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:t,side:o="left",variant:s="sidebar",collapsible:n="offcanvas",className:l,children:c,...g},m)=>{const{isMobile:v,state:u,openMobile:b,setOpenMobile:h}=N();return n==="none"?r.jsx("div",{ref:m,className:d.cn("bg-sidebar text-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",l),"data-hook":e,"data-slot":"sidebar","data-tracking-el":a||"sidebar","data-tracking-label":t,...g,children:c}):v?r.jsx(C.Sheet,{open:b,onOpenChange:h,children:r.jsx(C.SheetContent,{className:"bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>button]:hidden","data-hook":`${e}-mobile-content`,"data-mobile":"true","data-sidebar":"sidebar",side:"left",style:{"--sidebar-width":Ne},children:r.jsx("div",{className:"flex h-full w-full flex-col",children:c})})}):r.jsxs("div",{ref:m,className:"group peer text-sidebar-foreground hidden md:block","data-collapsible":u==="collapsed"?n:"","data-hook":e,"data-side":o,"data-slot":"sidebar","data-state":u,"data-tracking-el":a||"sidebar","data-tracking-label":t,"data-variant":s,children:[r.jsx("div",{className:d.cn("relative h-svh w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")}),r.jsx("div",{className:d.cn("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex","left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]","group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]",l),...g,children:r.jsx("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:c})})]})});H.displayName="Sidebar";const K=i.forwardRef(({className:e,onClick:a,dataHook:t="sidebar-trigger",...o},s)=>{const{toggleSidebar:n}=N();return r.jsxs(ge.Button,{ref:s,"aria-label":"Toggle Sidebar",className:d.cn("h-7 w-7",e),"data-slot":"sidebar-trigger",dataHook:t,size:"sm",variant:"ghost",onClick:l=>{a?.(l),n()},...o,children:[r.jsx(f.PanelLeft,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});K.displayName="SidebarTrigger";const U=i.forwardRef(({className:e,...a},t)=>{const{toggleSidebar:o}=N();return r.jsx("button",{ref:t,"aria-label":"Toggle Sidebar",className:d.cn("hover:after:bg-sidebar-border absolute inset-y-0 -right-4 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] sm:flex","cursor-w-resize","[[data-state=collapsed]_&]:cursor-e-resize","group-data-[collapsible=offcanvas]:hover:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-collapsible=offcanvas]_&]:-right-2",e),"data-slot":"sidebar-rail",tabIndex:-1,title:"Toggle Sidebar",onClick:o,...a})});U.displayName="SidebarRail";const W=i.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:o,...s},n)=>r.jsx("main",{ref:n,className:d.cn("bg-background relative flex min-h-svh flex-1 flex-col",e),"data-hook":a,"data-slot":"sidebar-inset","data-tracking-el":t||"sidebar-inset","data-tracking-label":o,...s}));W.displayName="SidebarInset";const V=i.forwardRef(({className:e,...a},t)=>r.jsx(me.Input,{ref:t,className:d.cn("bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2",e),"data-slot":"sidebar-input",dataHook:"sidebar-input",...a}));V.displayName="SidebarInput";const X=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("flex flex-col gap-2 p-2",e),"data-hook":a,"data-slot":"sidebar-header",...t}));X.displayName="SidebarHeader";const Y=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("flex flex-col gap-2 p-2",e),"data-hook":a,"data-slot":"sidebar-footer",...t}));Y.displayName="SidebarFooter";const Z=i.forwardRef(({className:e,...a},t)=>r.jsx(he.Separator,{ref:t,className:d.cn("bg-sidebar-border mx-2 w-auto group-data-[collapsible=icon]:mx-0",e),"data-slot":"sidebar-separator",...a}));Z.displayName="SidebarSeparator";const J=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),"data-hook":a,"data-slot":"sidebar-content",...t}));J.displayName="SidebarContent";const Q=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("relative flex w-full min-w-0 flex-col p-2",e),"data-hook":a,"data-slot":"sidebar-group",...t}));Q.displayName="SidebarGroup";const Me=R.cva("flex h-8 shrink-0 items-center rounded-md px-2 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",{variants:{size:{default:"text-sm",sm:"text-sm",xs:"text-xs"},variant:{default:"",collapsible:"w-full justify-between cursor-pointer hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",action:"w-full justify-between cursor-pointer hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"}},defaultVariants:{size:"sm",variant:"default"}}),$=i.forwardRef(({className:e,dataHook:a,asChild:t=!1,size:o="sm",variant:s="default",isOpen:n=!1,onToggle:l,onAction:c,children:g,...m},v)=>{const u=t?k.Slot:"div",b=()=>{s==="collapsible"&&l?l():s==="action"&&c&&c()},h=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),b())};return r.jsxs(u,{ref:v,className:d.cn(Me({size:o,variant:s}),e),"data-hook":a,"data-slot":"sidebar-group-label","data-variant":s,role:s!=="default"?"button":void 0,tabIndex:s!=="default"?0:void 0,onClick:s!=="default"?b:void 0,onKeyDown:s!=="default"?h:void 0,...m,children:[r.jsx("span",{children:g}),s==="collapsible"&&r.jsx(f.ChevronDown,{className:d.cn("size-4 shrink-0 transition-transform duration-200",n&&"rotate-180")}),s==="action"&&r.jsx(f.Plus,{className:"size-4 shrink-0"})]})});$.displayName="SidebarGroupLabel";const ee=i.forwardRef(({className:e,asChild:a=!1,...t},o)=>{const s=a?k.Slot:"button";return r.jsx(s,{ref:o,className:d.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),"data-slot":"sidebar-group-action",...t})});ee.displayName="SidebarGroupAction";const ae=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("w-full text-sm",e),"data-hook":a,"data-slot":"sidebar-group-content",...t}));ae.displayName="SidebarGroupContent";const te=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("ul",{ref:o,className:d.cn("flex w-full min-w-0 flex-col gap-1",e),"data-hook":a,"data-slot":"sidebar-menu",...t}));te.displayName="SidebarMenu";const re=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("li",{ref:o,className:d.cn("group/menu-item relative",e),"data-hook":a,"data-slot":"sidebar-menu-item",...t}));re.displayName="SidebarMenuItem";const oe=i.forwardRef(({type:e="caret",isActive:a=!1,className:t,...o},s)=>{const n={ref:s,className:d.cn("size-4 shrink-0 transition-transform",a&&e==="caret"&&"rotate-90",t),"data-slot":"sidebar-collapse-icon",...o};switch(e){case"horizontal":return r.jsx(f.ChevronRight,{...n});case"vertical":return r.jsx(f.ChevronDown,{...n});case"upDown":return r.jsx(f.ChevronsUpDown,{...n});case"plusMinus":return a?r.jsx(f.Minus,{...n}):r.jsx(f.Plus,{...n});case"dots":return r.jsx(f.Ellipsis,{...n});default:return r.jsx(f.ChevronRight,{...n})}});oe.displayName="SidebarCollapseIcon";const Re=R.cva("peer/menu-button flex w-full items-center gap-3 overflow-hidden rounded-full px-6 py-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 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 group-data-[collapsible=icon]:rounded-md [&>span:last-child]:truncate [&>svg]:size-4.5 [&>svg]:shrink-0 [&>svg]:stroke-2 [&>svg]:opacity-70 data-[active=true]:[&>svg]:opacity-100 group-data-[collapsible=icon]:[&>span]:hidden group-data-[collapsible=icon]:[&>div]:hidden",{variants:{variant:{simple:"",collapsible:"[&>[data-collapse-icon]]:ml-auto [&>[data-collapse-icon]]:transition-transform data-[state=open]:[&>[data-collapse-icon]]:rotate-90",dropdown:"group-has-[[data-sidebar=menu-action]]/menu-item:pr-8",tree:"[&>[data-tree-icon]]:size-4 [&>[data-tree-icon]]:shrink-0 [&>[data-tree-icon]]:opacity-70 [&>[data-tree-icon]]:transition-transform data-[state=open]:[&>[data-tree-icon]]:rotate-90 group-data-[collapsible=icon]:[&>[data-tree-icon]]:hidden",badge:"group-has-[[data-sidebar=menu-badge]]/menu-item:pr-8",bigIcon:"h-auto flex-col items-start gap-1 rounded-lg p-3 [&>svg]:size-6 [&>svg]:rounded-md [&>svg]:bg-sidebar-foreground [&>svg]:p-1 [&>svg]:text-sidebar [&>svg]:opacity-100 hover:[&>svg]:bg-sidebar-foreground hover:[&>svg]:text-sidebar group-data-[collapsible=icon]:!size-10 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:[&>svg]:size-6",checkbox:"[&>[data-checkbox]]:size-4 [&>[data-checkbox]]:shrink-0 [&>[data-checkbox]]:rounded [&>[data-checkbox]]:border [&>[data-checkbox]]:border-sidebar-foreground/30 data-[checked=true]:[&>[data-checkbox]]:bg-primary data-[checked=true]:[&>[data-checkbox]]:border-primary data-[checked=true]:[&>[data-checkbox]]:text-primary-foreground"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"simple",size:"default"}}),se=i.forwardRef(({asChild:e=!1,isActive:a=!1,variant:t="simple",size:o="default",tooltip:s,className:n,dataHook:l,...c},g)=>{const m=e?k.Slot:"button",{isMobile:v,state:u}=N(),b=r.jsx(m,{ref:g,className:d.cn(Re({variant:t,size:o}),n),"data-active":a,"data-hook":l,"data-size":o,"data-slot":"sidebar-menu-button","data-variant":t,...c});return s?(typeof s=="string"&&(s={children:s,dataHook:"sidebar-menu-button-tooltip"}),r.jsxs(M.Tooltip,{children:[r.jsx(M.TooltipTrigger,{asChild:!0,children:b}),r.jsx(M.TooltipContent,{hideArrow:!0,...s,align:"center",className:d.cn("bg-foreground text-background border-none",s.className),hidden:u!=="collapsed"||v,side:"right",sideOffset:8})]})):b});se.displayName="SidebarMenuButton";const ie=i.forwardRef(({className:e,asChild:a=!1,showOnHover:t=!1,...o},s)=>{const n=a?k.Slot:"button";return r.jsx(n,{ref:s,className:d.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>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","peer-data-[size=bigIcon]/menu-button:top-2.5","peer-data-[size=tree]/menu-button:top-1.5","group-data-[collapsible=icon]:hidden",t&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",e),"data-slot":"sidebar-menu-action",...o})});ie.displayName="SidebarMenuAction";const ne=i.forwardRef(({className:e,...a},t)=>r.jsx("div",{ref:t,className:d.cn("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","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","peer-data-[size=bigIcon]/menu-button:top-2.5","peer-data-[size=tree]/menu-button:top-1.5","group-data-[collapsible=icon]:hidden",e),"data-slot":"sidebar-menu-badge",...a}));ne.displayName="SidebarMenuBadge";const de=i.forwardRef(({className:e,showIcon:a=!1,...t},o)=>{const s=i.useId(),n=i.useMemo(()=>{let l=0;for(let c=0;c<s.length;c++)l=(l<<5)-l+s.charCodeAt(c),l|=0;return`${Math.abs(l)%40+50}%`},[s]);return r.jsxs("div",{ref:o,className:d.cn("flex h-8 items-center gap-2 rounded-md px-2",e),"data-slot":"sidebar-menu-skeleton",...t,children:[a&&r.jsx(D.Skeleton,{className:"size-4 rounded-md","data-slot":"sidebar-menu-skeleton-icon"}),r.jsx(D.Skeleton,{className:"h-4 max-w-[--skeleton-width] flex-1","data-slot":"sidebar-menu-skeleton-text",style:{"--skeleton-width":n}})]})});de.displayName="SidebarMenuSkeleton";const Ie=R.cva("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",{variants:{variant:{default:"",border:"border-l border-sidebar-border",indent:"ml-0 border-l-0"}},defaultVariants:{variant:"border"}}),le=i.forwardRef(({className:e,variant:a="border",dataHook:t,...o},s)=>r.jsx("ul",{ref:s,className:d.cn(Ie({variant:a}),e),"data-hook":t,"data-slot":"sidebar-menu-sub",...o}));le.displayName="SidebarMenuSub";const ce=i.forwardRef(({dataHook:e,...a},t)=>r.jsx("li",{ref:t,"data-hook":e,"data-slot":"sidebar-menu-sub-item",...a}));ce.displayName="SidebarMenuSubItem";const ue=i.forwardRef(({asChild:e=!1,size:a="md",isActive:t,className:o,dataHook:s,...n},l)=>{const c=e?k.Slot:"a";return r.jsx(c,{ref:l,className:d.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-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",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),"data-active":t,"data-hook":s,"data-size":a,"data-slot":"sidebar-menu-sub-button",...n})});ue.displayName="SidebarMenuSubButton";exports.Sidebar=H;exports.SidebarCollapseIcon=oe;exports.SidebarCollapseIconType=q;exports.SidebarCollapsible=O;exports.SidebarContent=J;exports.SidebarFooter=Y;exports.SidebarGroup=Q;exports.SidebarGroupAction=ee;exports.SidebarGroupContent=ae;exports.SidebarGroupLabel=$;exports.SidebarGroupLabelSize=A;exports.SidebarGroupLabelVariant=T;exports.SidebarHeader=X;exports.SidebarInput=V;exports.SidebarInset=W;exports.SidebarMenu=te;exports.SidebarMenuAction=ie;exports.SidebarMenuBadge=ne;exports.SidebarMenuButton=se;exports.SidebarMenuButtonSize=L;exports.SidebarMenuButtonVariant=_;exports.SidebarMenuItem=re;exports.SidebarMenuSkeleton=de;exports.SidebarMenuSub=le;exports.SidebarMenuSubButton=ue;exports.SidebarMenuSubButtonSize=P;exports.SidebarMenuSubItem=ce;exports.SidebarMenuSubVariant=B;exports.SidebarProvider=F;exports.SidebarRail=U;exports.SidebarSeparator=Z;exports.SidebarSide=E;exports.SidebarTrigger=K;exports.SidebarVariant=z;exports.useSidebar=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),fe=require("react"),k=require("@radix-ui/react-slot"),R=require("class-variance-authority"),f=require("@brightlocal/icons"),d=require("@brightlocal/ui-components/lib/utils"),ge=require("../button.cjs"),me=require("../input.cjs"),he=require("../separator.cjs"),C=require("../sheet.cjs"),D=require("../skeleton.cjs"),M=require("../tooltip.cjs"),xe=require("../hooks/use-mobile.cjs");function ve(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const i=ve(fe);var E=(e=>(e.LEFT="left",e))(E||{}),z=(e=>(e.SIDEBAR="sidebar",e))(z||{}),O=(e=>(e.OFFCANVAS="offcanvas",e.ICON="icon",e.NONE="none",e))(O||{}),A=(e=>(e.DEFAULT="default",e.SM="sm",e.XS="xs",e))(A||{}),T=(e=>(e.DEFAULT="default",e.COLLAPSIBLE="collapsible",e.ACTION="action",e))(T||{}),_=(e=>(e.SIMPLE="simple",e.COLLAPSIBLE="collapsible",e.DROPDOWN="dropdown",e.TREE="tree",e.BADGE="badge",e.BIG_ICON="bigIcon",e.CHECKBOX="checkbox",e))(_||{}),L=(e=>(e.DEFAULT="default",e.SM="sm",e.LG="lg",e))(L||{}),B=(e=>(e.DEFAULT="default",e.BORDER="border",e.INDENT="indent",e))(B||{}),P=(e=>(e.SM="sm",e.MD="md",e))(P||{}),q=(e=>(e.CARET="caret",e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e.UP_DOWN="upDown",e.PLUS_MINUS="plusMinus",e.DOTS="dots",e))(q||{});const Se="sidebar:state",we=3600*24*7,ke="256px",Ne="288px",ye="48px",je="b",G=i.createContext(null);function N(){const e=i.useContext(G);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const F=i.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:t,defaultOpen:o=!0,open:s,onOpenChange:n,className:l,style:c,children:g,...m},v)=>{const u=xe.useIsMobile(),[b,h]=i.useState(!1),[S,be]=i.useState(o),w=s??S,y=i.useCallback(p=>{const x=typeof p=="function"?p(w):p;n?n(x):be(x),document.cookie=`${Se}=${x}; path=/; max-age=${we}`},[n,w]),j=i.useCallback(()=>u?h(p=>!p):y(p=>!p),[u,y,h]);i.useEffect(()=>{const p=x=>{x.key===je&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),j())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[j]);const I=w?"expanded":"collapsed",pe=i.useMemo(()=>({state:I,open:w,setOpen:y,isMobile:u,openMobile:b,setOpenMobile:h,toggleSidebar:j}),[I,w,y,u,b,h,j]);return r.jsx(G.Provider,{value:pe,children:r.jsx(M.TooltipProvider,{delayDuration:0,children:r.jsx("div",{ref:v,className:d.cn("group/sidebar-wrapper flex min-h-svh w-full",l),"data-hook":e,"data-slot":"sidebar-provider","data-tracking-el":a||"sidebar-provider","data-tracking-label":t,style:{"--sidebar-width":ke,"--sidebar-width-icon":ye,...c},...m,children:g})})})});F.displayName="SidebarProvider";const H=i.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:t,side:o="left",variant:s="sidebar",collapsible:n="offcanvas",className:l,children:c,...g},m)=>{const{isMobile:v,state:u,openMobile:b,setOpenMobile:h}=N();return n==="none"?r.jsx("div",{ref:m,className:d.cn("bg-sidebar text-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",l),"data-hook":e,"data-slot":"sidebar","data-tracking-el":a||"sidebar","data-tracking-label":t,...g,children:c}):v?r.jsx(C.Sheet,{open:b,onOpenChange:h,children:r.jsx(C.SheetContent,{className:"bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>button]:hidden","data-hook":`${e}-mobile-content`,"data-mobile":"true","data-sidebar":"sidebar",side:"left",style:{"--sidebar-width":Ne},children:r.jsx("div",{className:"flex h-full w-full flex-col",children:c})})}):r.jsxs("div",{ref:m,className:"group peer text-sidebar-foreground hidden md:block","data-collapsible":u==="collapsed"?n:"","data-hook":e,"data-side":o,"data-slot":"sidebar","data-state":u,"data-tracking-el":a||"sidebar","data-tracking-label":t,"data-variant":s,children:[r.jsx("div",{className:d.cn("relative h-svh w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")}),r.jsx("div",{className:d.cn("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex","left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]","group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]",l),...g,children:r.jsx("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:c})})]})});H.displayName="Sidebar";const K=i.forwardRef(({className:e,onClick:a,dataHook:t="sidebar-trigger",...o},s)=>{const{toggleSidebar:n}=N();return r.jsxs(ge.Button,{ref:s,"aria-label":"Toggle Sidebar",className:d.cn("h-7 w-7",e),"data-slot":"sidebar-trigger",dataHook:t,size:"sm",variant:"ghost",onClick:l=>{a?.(l),n()},...o,children:[r.jsx(f.PanelLeft,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});K.displayName="SidebarTrigger";const U=i.forwardRef(({className:e,...a},t)=>{const{toggleSidebar:o}=N();return r.jsx("button",{ref:t,"aria-label":"Toggle Sidebar",className:d.cn("hover:after:bg-sidebar-border absolute inset-y-0 -right-4 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] sm:flex","cursor-w-resize","[[data-state=collapsed]_&]:cursor-e-resize","group-data-[collapsible=offcanvas]:hover:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-collapsible=offcanvas]_&]:-right-2",e),"data-slot":"sidebar-rail",tabIndex:-1,title:"Toggle Sidebar",onClick:o,...a})});U.displayName="SidebarRail";const W=i.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:o,...s},n)=>r.jsx("main",{ref:n,className:d.cn("bg-background relative flex min-h-svh flex-1 flex-col",e),"data-hook":a,"data-slot":"sidebar-inset","data-tracking-el":t||"sidebar-inset","data-tracking-label":o,...s}));W.displayName="SidebarInset";const V=i.forwardRef(({className:e,...a},t)=>r.jsx(me.Input,{ref:t,className:d.cn("bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2",e),"data-slot":"sidebar-input",dataHook:"sidebar-input",...a}));V.displayName="SidebarInput";const X=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("flex flex-col gap-2 p-2",e),"data-hook":a,"data-slot":"sidebar-header",...t}));X.displayName="SidebarHeader";const Y=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("flex flex-col gap-2 p-2",e),"data-hook":a,"data-slot":"sidebar-footer",...t}));Y.displayName="SidebarFooter";const Z=i.forwardRef(({className:e,...a},t)=>r.jsx(he.Separator,{ref:t,className:d.cn("bg-sidebar-border mx-2 w-auto group-data-[collapsible=icon]:mx-0",e),"data-slot":"sidebar-separator",...a}));Z.displayName="SidebarSeparator";const J=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),"data-hook":a,"data-slot":"sidebar-content",...t}));J.displayName="SidebarContent";const Q=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("relative flex w-full min-w-0 flex-col p-2",e),"data-hook":a,"data-slot":"sidebar-group",...t}));Q.displayName="SidebarGroup";const Me=R.cva("flex h-8 shrink-0 items-center rounded-md px-2 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",{variants:{size:{default:"text-sm",sm:"text-sm",xs:"text-xs"},variant:{default:"",collapsible:"w-full justify-between cursor-pointer hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",action:"w-full justify-between cursor-pointer hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"}},defaultVariants:{size:"sm",variant:"default"}}),$=i.forwardRef(({className:e,dataHook:a,asChild:t=!1,size:o="sm",variant:s="default",isOpen:n=!1,onToggle:l,onAction:c,children:g,...m},v)=>{const u=t?k.Slot:"div",b=()=>{s==="collapsible"&&l?l():s==="action"&&c&&c()},h=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),b())};return r.jsxs(u,{ref:v,className:d.cn(Me({size:o,variant:s}),e),"data-hook":a,"data-slot":"sidebar-group-label","data-variant":s,role:s!=="default"?"button":void 0,tabIndex:s!=="default"?0:void 0,onClick:s!=="default"?b:void 0,onKeyDown:s!=="default"?h:void 0,...m,children:[r.jsx("span",{children:g}),s==="collapsible"&&r.jsx(f.ChevronDown,{className:d.cn("shrink-0 transition-transform duration-200",n&&"rotate-180"),size:16}),s==="action"&&r.jsx(f.Plus,{className:"shrink-0",size:16})]})});$.displayName="SidebarGroupLabel";const ee=i.forwardRef(({className:e,asChild:a=!1,...t},o)=>{const s=a?k.Slot:"button";return r.jsx(s,{ref:o,className:d.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),"data-slot":"sidebar-group-action",...t})});ee.displayName="SidebarGroupAction";const ae=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("w-full text-sm",e),"data-hook":a,"data-slot":"sidebar-group-content",...t}));ae.displayName="SidebarGroupContent";const te=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("ul",{ref:o,className:d.cn("flex w-full min-w-0 flex-col gap-1",e),"data-hook":a,"data-slot":"sidebar-menu",...t}));te.displayName="SidebarMenu";const re=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("li",{ref:o,className:d.cn("group/menu-item relative",e),"data-hook":a,"data-slot":"sidebar-menu-item",...t}));re.displayName="SidebarMenuItem";const oe=i.forwardRef(({type:e="caret",isActive:a=!1,className:t,...o},s)=>{const n={ref:s,className:d.cn("size-4 shrink-0 transition-transform",a&&e==="caret"&&"rotate-90",t),"data-slot":"sidebar-collapse-icon",...o};switch(e){case"horizontal":return r.jsx(f.ChevronRight,{...n});case"vertical":return r.jsx(f.ChevronDown,{...n});case"upDown":return r.jsx(f.ChevronsUpDown,{...n});case"plusMinus":return a?r.jsx(f.Minus,{...n}):r.jsx(f.Plus,{...n});case"dots":return r.jsx(f.Ellipsis,{...n});default:return r.jsx(f.ChevronRight,{...n})}});oe.displayName="SidebarCollapseIcon";const Re=R.cva("peer/menu-button flex w-full items-center gap-3 overflow-hidden rounded-full px-6 py-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 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 group-data-[collapsible=icon]:rounded-md [&>span:last-child]:truncate [&>svg]:size-4.5 [&>svg]:shrink-0 [&>svg]:stroke-2 [&>svg]:opacity-70 data-[active=true]:[&>svg]:opacity-100 group-data-[collapsible=icon]:[&>span]:hidden group-data-[collapsible=icon]:[&>div]:hidden",{variants:{variant:{simple:"",collapsible:"[&>[data-collapse-icon]]:ml-auto [&>[data-collapse-icon]]:transition-transform data-[state=open]:[&>[data-collapse-icon]]:rotate-90",dropdown:"group-has-[[data-sidebar=menu-action]]/menu-item:pr-8",tree:"[&>[data-tree-icon]]:size-4 [&>[data-tree-icon]]:shrink-0 [&>[data-tree-icon]]:opacity-70 [&>[data-tree-icon]]:transition-transform data-[state=open]:[&>[data-tree-icon]]:rotate-90 group-data-[collapsible=icon]:[&>[data-tree-icon]]:hidden",badge:"group-has-[[data-sidebar=menu-badge]]/menu-item:pr-8",bigIcon:"h-auto flex-col items-start gap-1 rounded-lg p-3 [&>svg]:size-6 [&>svg]:rounded-md [&>svg]:bg-sidebar-foreground [&>svg]:p-1 [&>svg]:text-sidebar [&>svg]:opacity-100 hover:[&>svg]:bg-sidebar-foreground hover:[&>svg]:text-sidebar group-data-[collapsible=icon]:!size-10 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:[&>svg]:size-6",checkbox:"[&>[data-checkbox]]:size-4 [&>[data-checkbox]]:shrink-0 [&>[data-checkbox]]:rounded [&>[data-checkbox]]:border [&>[data-checkbox]]:border-sidebar-foreground/30 data-[checked=true]:[&>[data-checkbox]]:bg-primary data-[checked=true]:[&>[data-checkbox]]:border-primary data-[checked=true]:[&>[data-checkbox]]:text-primary-foreground"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"simple",size:"default"}}),se=i.forwardRef(({asChild:e=!1,isActive:a=!1,variant:t="simple",size:o="default",tooltip:s,className:n,dataHook:l,...c},g)=>{const m=e?k.Slot:"button",{isMobile:v,state:u}=N(),b=r.jsx(m,{ref:g,className:d.cn(Re({variant:t,size:o}),n),"data-active":a,"data-hook":l,"data-size":o,"data-slot":"sidebar-menu-button","data-variant":t,...c});return s?(typeof s=="string"&&(s={children:s,dataHook:"sidebar-menu-button-tooltip"}),r.jsxs(M.Tooltip,{children:[r.jsx(M.TooltipTrigger,{asChild:!0,children:b}),r.jsx(M.TooltipContent,{hideArrow:!0,...s,align:"center",className:d.cn("bg-foreground text-background border-none",s.className),hidden:u!=="collapsed"||v,side:"right",sideOffset:8})]})):b});se.displayName="SidebarMenuButton";const ie=i.forwardRef(({className:e,asChild:a=!1,showOnHover:t=!1,...o},s)=>{const n=a?k.Slot:"button";return r.jsx(n,{ref:s,className:d.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>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","peer-data-[size=bigIcon]/menu-button:top-2.5","peer-data-[size=tree]/menu-button:top-1.5","group-data-[collapsible=icon]:hidden",t&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",e),"data-slot":"sidebar-menu-action",...o})});ie.displayName="SidebarMenuAction";const ne=i.forwardRef(({className:e,...a},t)=>r.jsx("div",{ref:t,className:d.cn("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","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","peer-data-[size=bigIcon]/menu-button:top-2.5","peer-data-[size=tree]/menu-button:top-1.5","group-data-[collapsible=icon]:hidden",e),"data-slot":"sidebar-menu-badge",...a}));ne.displayName="SidebarMenuBadge";const de=i.forwardRef(({className:e,showIcon:a=!1,...t},o)=>{const s=i.useId(),n=i.useMemo(()=>{let l=0;for(let c=0;c<s.length;c++)l=(l<<5)-l+s.charCodeAt(c),l|=0;return`${Math.abs(l)%40+50}%`},[s]);return r.jsxs("div",{ref:o,className:d.cn("flex h-8 items-center gap-2 rounded-md px-2",e),"data-slot":"sidebar-menu-skeleton",...t,children:[a&&r.jsx(D.Skeleton,{className:"size-4 rounded-md","data-slot":"sidebar-menu-skeleton-icon"}),r.jsx(D.Skeleton,{className:"h-4 max-w-[--skeleton-width] flex-1","data-slot":"sidebar-menu-skeleton-text",style:{"--skeleton-width":n}})]})});de.displayName="SidebarMenuSkeleton";const Ie=R.cva("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",{variants:{variant:{default:"",border:"border-l border-sidebar-border",indent:"ml-0 border-l-0"}},defaultVariants:{variant:"border"}}),le=i.forwardRef(({className:e,variant:a="border",dataHook:t,...o},s)=>r.jsx("ul",{ref:s,className:d.cn(Ie({variant:a}),e),"data-hook":t,"data-slot":"sidebar-menu-sub",...o}));le.displayName="SidebarMenuSub";const ce=i.forwardRef(({dataHook:e,...a},t)=>r.jsx("li",{ref:t,"data-hook":e,"data-slot":"sidebar-menu-sub-item",...a}));ce.displayName="SidebarMenuSubItem";const ue=i.forwardRef(({asChild:e=!1,size:a="md",isActive:t,className:o,dataHook:s,...n},l)=>{const c=e?k.Slot:"a";return r.jsx(c,{ref:l,className:d.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-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",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),"data-active":t,"data-hook":s,"data-size":a,"data-slot":"sidebar-menu-sub-button",...n})});ue.displayName="SidebarMenuSubButton";exports.Sidebar=H;exports.SidebarCollapseIcon=oe;exports.SidebarCollapseIconType=q;exports.SidebarCollapsible=O;exports.SidebarContent=J;exports.SidebarFooter=Y;exports.SidebarGroup=Q;exports.SidebarGroupAction=ee;exports.SidebarGroupContent=ae;exports.SidebarGroupLabel=$;exports.SidebarGroupLabelSize=A;exports.SidebarGroupLabelVariant=T;exports.SidebarHeader=X;exports.SidebarInput=V;exports.SidebarInset=W;exports.SidebarMenu=te;exports.SidebarMenuAction=ie;exports.SidebarMenuBadge=ne;exports.SidebarMenuButton=se;exports.SidebarMenuButtonSize=L;exports.SidebarMenuButtonVariant=_;exports.SidebarMenuItem=re;exports.SidebarMenuSkeleton=de;exports.SidebarMenuSub=le;exports.SidebarMenuSubButton=ue;exports.SidebarMenuSubButtonSize=P;exports.SidebarMenuSubItem=ce;exports.SidebarMenuSubVariant=B;exports.SidebarProvider=F;exports.SidebarRail=U;exports.SidebarSeparator=Z;exports.SidebarSide=E;exports.SidebarTrigger=K;exports.SidebarVariant=z;exports.useSidebar=N;
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/blocks/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAYlE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5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,SAAQ,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC;IACnE,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,oBAAoB,kHAoCzB,CAAC;AAIF,OAAO,EACL,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,CAAC;AAGF,YAAY,EACV,oBAAoB,EACpB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,GAC1B,CAAC"}
1
+ {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/blocks/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAYlE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;A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,kBAAkB,4GAUtB,CAAC;AAGH;;GAEG;AACH,UAAU,yBAA0B,SAAQ,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC;IACnE,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,oBAAoB,kHAoCzB,CAAC;AAIF,OAAO,EACL,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,CAAC;AAGF,YAAY,EACV,oBAAoB,EACpB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,GAC1B,CAAC"}
@@ -379,12 +379,13 @@ const ke = C(
379
379
  z,
380
380
  {
381
381
  className: n(
382
- "size-4 shrink-0 transition-transform duration-200",
382
+ "shrink-0 transition-transform duration-200",
383
383
  d && "rotate-180"
384
- )
384
+ ),
385
+ size: 16
385
386
  }
386
387
  ),
387
- s === "action" && /* @__PURE__ */ r(M, { className: "size-4 shrink-0" })
388
+ s === "action" && /* @__PURE__ */ r(M, { className: "shrink-0", size: 16 })
388
389
  ]
389
390
  }
390
391
  );
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react"),B=require("@radix-ui/react-slot"),d=require("@brightlocal/icons"),o=require("@brightlocal/ui-components/lib/utils");function x(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const c=x(g),i=c.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:r,...s},n)=>t.jsx("nav",{ref:n,"aria-label":"breadcrumb","data-hook":e,"data-slot":"breadcrumb","data-tracking-el":a,"data-tracking-label":r,...s}));i.displayName="Breadcrumb";const l=c.forwardRef(({className:e,...a},r)=>t.jsx("ol",{ref:r,className:o.cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),"data-slot":"breadcrumb-list",...a}));l.displayName="BreadcrumbList";const m=c.forwardRef(({className:e,...a},r)=>t.jsx("li",{ref:r,className:o.cn("inline-flex items-center gap-1.5",e),"data-slot":"breadcrumb-item",...a}));m.displayName="BreadcrumbItem";const u=c.forwardRef(({asChild:e,className:a,...r},s)=>{const n=e?B.Slot:"a";return t.jsx(n,{ref:s,className:o.cn("hover:text-foreground transition-colors",a),"data-slot":"breadcrumb-link",...r})});u.displayName="BreadcrumbLink";const b=c.forwardRef(({className:e,...a},r)=>t.jsx("span",{ref:r,"aria-current":"page","aria-disabled":"true",className:o.cn("text-foreground font-normal",e),"data-slot":"breadcrumb-page",role:"link",...a}));b.displayName="BreadcrumbPage";const p=c.forwardRef(({children:e,className:a,...r},s)=>t.jsx("li",{ref:s,"aria-hidden":"true",className:o.cn("[&>svg]:size-3.5",a),"data-slot":"breadcrumb-separator",role:"presentation",...r,children:e??t.jsx(d.ChevronRight,{})}));p.displayName="BreadcrumbSeparator";const f=c.forwardRef(({className:e,...a},r)=>t.jsxs("span",{ref:r,"aria-hidden":"true",className:o.cn("flex size-9 items-center justify-center",e),"data-slot":"breadcrumb-ellipsis",role:"presentation",...a,children:[t.jsx(d.MoreHorizontal,{className:"size-4"}),t.jsx("span",{className:"sr-only",children:"More"})]}));f.displayName="BreadcrumbEllipsis";exports.Breadcrumb=i;exports.BreadcrumbEllipsis=f;exports.BreadcrumbItem=m;exports.BreadcrumbLink=u;exports.BreadcrumbList=l;exports.BreadcrumbPage=b;exports.BreadcrumbSeparator=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react"),B=require("@radix-ui/react-slot"),d=require("@brightlocal/icons"),o=require("@brightlocal/ui-components/lib/utils");function x(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const c=x(g),i=c.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:r,...s},n)=>t.jsx("nav",{ref:n,"aria-label":"breadcrumb","data-hook":e,"data-slot":"breadcrumb","data-tracking-el":a,"data-tracking-label":r,...s}));i.displayName="Breadcrumb";const l=c.forwardRef(({className:e,...a},r)=>t.jsx("ol",{ref:r,className:o.cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),"data-slot":"breadcrumb-list",...a}));l.displayName="BreadcrumbList";const m=c.forwardRef(({className:e,...a},r)=>t.jsx("li",{ref:r,className:o.cn("inline-flex items-center gap-1.5",e),"data-slot":"breadcrumb-item",...a}));m.displayName="BreadcrumbItem";const u=c.forwardRef(({asChild:e,className:a,...r},s)=>{const n=e?B.Slot:"a";return t.jsx(n,{ref:s,className:o.cn("hover:text-foreground transition-colors",a),"data-slot":"breadcrumb-link",...r})});u.displayName="BreadcrumbLink";const b=c.forwardRef(({className:e,...a},r)=>t.jsx("span",{ref:r,"aria-current":"page","aria-disabled":"true",className:o.cn("text-foreground font-normal",e),"data-slot":"breadcrumb-page",role:"link",...a}));b.displayName="BreadcrumbPage";const p=c.forwardRef(({children:e,className:a,...r},s)=>t.jsx("li",{ref:s,"aria-hidden":"true",className:o.cn("[&>svg]:size-3.5",a),"data-slot":"breadcrumb-separator",role:"presentation",...r,children:e??t.jsx(d.ChevronRight,{})}));p.displayName="BreadcrumbSeparator";const f=c.forwardRef(({className:e,...a},r)=>t.jsxs("span",{ref:r,"aria-hidden":"true",className:o.cn("flex size-9 items-center justify-center",e),"data-slot":"breadcrumb-ellipsis",role:"presentation",...a,children:[t.jsx(d.MoreHorizontal,{size:16}),t.jsx("span",{className:"sr-only",children:"More"})]}));f.displayName="BreadcrumbEllipsis";exports.Breadcrumb=i;exports.BreadcrumbEllipsis=f;exports.BreadcrumbItem=m;exports.BreadcrumbLink=u;exports.BreadcrumbList=l;exports.BreadcrumbPage=b;exports.BreadcrumbSeparator=p;
@@ -53,7 +53,7 @@ const f = s.forwardRef(
53
53
  )
54
54
  );
55
55
  f.displayName = "BreadcrumbLink";
56
- const N = s.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
56
+ const g = s.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
57
57
  "span",
58
58
  {
59
59
  ref: e,
@@ -65,8 +65,8 @@ const N = s.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
65
65
  ...r
66
66
  }
67
67
  ));
68
- N.displayName = "BreadcrumbPage";
69
- const g = s.forwardRef(({ children: a, className: r, ...e }, d) => /* @__PURE__ */ t(
68
+ g.displayName = "BreadcrumbPage";
69
+ const B = s.forwardRef(({ children: a, className: r, ...e }, d) => /* @__PURE__ */ t(
70
70
  "li",
71
71
  {
72
72
  ref: d,
@@ -78,8 +78,8 @@ const g = s.forwardRef(({ children: a, className: r, ...e }, d) => /* @__PURE__
78
78
  children: a ?? /* @__PURE__ */ t(n, {})
79
79
  }
80
80
  ));
81
- g.displayName = "BreadcrumbSeparator";
82
- const B = s.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ i(
81
+ B.displayName = "BreadcrumbSeparator";
82
+ const N = s.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ i(
83
83
  "span",
84
84
  {
85
85
  ref: e,
@@ -89,18 +89,18 @@ const B = s.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ i(
89
89
  role: "presentation",
90
90
  ...r,
91
91
  children: [
92
- /* @__PURE__ */ t(c, { className: "size-4" }),
92
+ /* @__PURE__ */ t(c, { size: 16 }),
93
93
  /* @__PURE__ */ t("span", { className: "sr-only", children: "More" })
94
94
  ]
95
95
  }
96
96
  ));
97
- B.displayName = "BreadcrumbEllipsis";
97
+ N.displayName = "BreadcrumbEllipsis";
98
98
  export {
99
99
  b as Breadcrumb,
100
- B as BreadcrumbEllipsis,
100
+ N as BreadcrumbEllipsis,
101
101
  u as BreadcrumbItem,
102
102
  f as BreadcrumbLink,
103
103
  p as BreadcrumbList,
104
- N as BreadcrumbPage,
105
- g as BreadcrumbSeparator
104
+ g as BreadcrumbPage,
105
+ B as BreadcrumbSeparator
106
106
  };
package/dist/calendar.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),k=require("react"),g=require("@brightlocal/icons"),f=require("react-day-picker"),e=require("@brightlocal/ui-components/lib/utils");function D(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const d=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(a,n,d.get?d:{enumerable:!0,get:()=>r[n]})}}return a.default=r,Object.freeze(a)}const p=D(k),x=e.cn("inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:shadow-default","h-8 w-8 p-0"),m=({className:r,day:a,modifiers:n,...d})=>{const s=f.getDefaultClassNames(),c=p.useRef(null);return p.useEffect(()=>{n.focused&&c.current?.focus()},[n.focused]),o.jsx("button",{ref:c,className:e.cn("text-foreground h-8 w-8 rounded-md p-0 font-sans text-sm leading-5 font-normal","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:outline-none","group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10","data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[selected-single=true]:rounded-md","data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-start=true]:rounded-md","data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-end=true]:rounded-md","data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground",s.day,r),"data-day":a.date.toLocaleDateString(),"data-range-end":n.range_end,"data-range-middle":n.range_middle,"data-range-start":n.range_start,"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,type:"button",...d})};m.displayName="CalendarDayButton";function b({className:r,classNames:a,showOutsideDays:n=!0,numberOfMonths:d=1,captionLayout:s,fixedWeeks:c=!0,dataHook:y,trackingEl:h,trackingLabel:w,components:_,formatters:v,...j}){const t=f.getDefaultClassNames();return o.jsx(f.DayPicker,{captionLayout:s,className:e.cn("bg-background border-border group/calendar relative rounded-lg border p-3 shadow-sm",r),classNames:{months:e.cn("flex flex-col sm:flex-row gap-4",t.months),month:e.cn("flex flex-col gap-4",t.month),month_caption:e.cn("flex justify-center relative items-center w-full h-8",t.month_caption),caption_label:e.cn("text-sm font-sans leading-5 text-foreground select-none",s==="dropdown"?"font-normal":"font-medium","[&>svg]:text-muted-foreground [&>svg]:size-4","flex h-[34px] items-center gap-1 rounded-md pl-2 pr-1",t.caption_label),dropdowns:e.cn("flex w-full items-center justify-center gap-1.5 text-sm font-normal",t.dropdowns),dropdown_root:e.cn("relative rounded-md border border-input shadow-xs h-[34px]","has-focus:shadow-default",t.dropdown_root),dropdown:e.cn("absolute inset-0 z-10 opacity-0 cursor-pointer",t.dropdown),months_dropdown:e.cn("w-[58px]",t.months_dropdown),years_dropdown:e.cn("w-[69px]",t.years_dropdown),nav:e.cn("absolute top-3 left-3 right-3 flex items-center justify-between z-10",t.nav),button_previous:e.cn(x,t.button_previous),button_next:e.cn(x,t.button_next),month_grid:e.cn("w-full border-collapse flex flex-col",t.month_grid),weekdays:e.cn("flex",t.weekdays),weekday:e.cn("text-muted-foreground rounded-md w-8 h-5 flex items-center justify-center font-normal font-sans text-xs leading-4",t.weekday),week:e.cn(t.week,"flex w-full mt-2"),day:e.cn("relative w-full h-full p-0 text-center text-sm focus-within:relative focus-within:z-20 group/day select-none","[&:first-child[data-selected=true]_button]:!rounded-l-md","[&:last-child[data-selected=true]_button]:!rounded-r-md",t.day),range_start:e.cn("rounded-l-md bg-accent",t.range_start),range_middle:e.cn("rounded-none bg-accent","first:rounded-l-md last:rounded-r-md",t.range_middle),range_end:e.cn("rounded-r-md bg-accent",t.range_end),today:e.cn("bg-accent text-accent-foreground rounded-md",t.today),outside:e.cn("text-muted-foreground opacity-50 aria-selected:text-muted-foreground aria-selected:opacity-50",t.outside),disabled:e.cn("text-foreground opacity-50 cursor-not-allowed",t.disabled),hidden:e.cn(t.hidden),...a},components:{Chevron:({orientation:u,className:l,...i})=>u==="left"?o.jsx(g.ChevronLeft,{className:e.cn("size-4",l),...i}):u==="right"?o.jsx(g.ChevronRight,{className:e.cn("size-4",l),...i}):o.jsx(g.ChevronDown,{className:e.cn("size-4",l),...i}),DayButton:m,..._},"data-hook":y,"data-slot":"calendar","data-tracking-el":h,"data-tracking-label":w,fixedWeeks:c,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...v},numberOfMonths:d,showOutsideDays:n,...j})}b.displayName="Calendar";exports.Calendar=b;exports.CalendarDayButton=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),k=require("react"),g=require("@brightlocal/icons"),f=require("react-day-picker"),e=require("@brightlocal/ui-components/lib/utils");function D(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const d=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(a,n,d.get?d:{enumerable:!0,get:()=>r[n]})}}return a.default=r,Object.freeze(a)}const p=D(k),x=e.cn("inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:shadow-default","h-8 w-8 p-0"),m=({className:r,day:a,modifiers:n,...d})=>{const s=f.getDefaultClassNames(),u=p.useRef(null);return p.useEffect(()=>{n.focused&&u.current?.focus()},[n.focused]),o.jsx("button",{ref:u,className:e.cn("text-foreground h-8 w-8 rounded-md p-0 font-sans text-sm leading-5 font-normal","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:outline-none","group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10","data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[selected-single=true]:rounded-md","data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-start=true]:rounded-md","data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-end=true]:rounded-md","data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground",s.day,r),"data-day":a.date.toLocaleDateString(),"data-range-end":n.range_end,"data-range-middle":n.range_middle,"data-range-start":n.range_start,"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,type:"button",...d})};m.displayName="CalendarDayButton";function b({className:r,classNames:a,showOutsideDays:n=!0,numberOfMonths:d=1,captionLayout:s,fixedWeeks:u=!0,dataHook:y,trackingEl:h,trackingLabel:w,components:_,formatters:v,...j}){const t=f.getDefaultClassNames();return o.jsx(f.DayPicker,{captionLayout:s,className:e.cn("bg-background border-border group/calendar relative rounded-lg border p-3 shadow-sm",r),classNames:{months:e.cn("flex flex-col sm:flex-row gap-4",t.months),month:e.cn("flex flex-col gap-4",t.month),month_caption:e.cn("flex justify-center relative items-center w-full h-8",t.month_caption),caption_label:e.cn("text-sm font-sans leading-5 text-foreground select-none",s==="dropdown"?"font-normal":"font-medium","[&>svg]:text-muted-foreground [&>svg]:size-4","flex h-[34px] items-center gap-1 rounded-md pl-2 pr-1",t.caption_label),dropdowns:e.cn("flex w-full items-center justify-center gap-1.5 text-sm font-normal",t.dropdowns),dropdown_root:e.cn("relative rounded-md border border-input shadow-xs h-[34px]","has-focus:shadow-default",t.dropdown_root),dropdown:e.cn("absolute inset-0 z-10 opacity-0 cursor-pointer",t.dropdown),months_dropdown:e.cn("w-[58px]",t.months_dropdown),years_dropdown:e.cn("w-[69px]",t.years_dropdown),nav:e.cn("absolute top-3 left-3 right-3 flex items-center justify-between z-10",t.nav),button_previous:e.cn(x,t.button_previous),button_next:e.cn(x,t.button_next),month_grid:e.cn("w-full border-collapse flex flex-col",t.month_grid),weekdays:e.cn("flex",t.weekdays),weekday:e.cn("text-muted-foreground rounded-md w-8 h-5 flex items-center justify-center font-normal font-sans text-xs leading-4",t.weekday),week:e.cn(t.week,"flex w-full mt-2"),day:e.cn("relative w-full h-full p-0 text-center text-sm focus-within:relative focus-within:z-20 group/day select-none","[&:first-child[data-selected=true]_button]:!rounded-l-md","[&:last-child[data-selected=true]_button]:!rounded-r-md",t.day),range_start:e.cn("rounded-l-md bg-accent",t.range_start),range_middle:e.cn("rounded-none bg-accent","first:rounded-l-md last:rounded-r-md",t.range_middle),range_end:e.cn("rounded-r-md bg-accent",t.range_end),today:e.cn("bg-accent text-accent-foreground rounded-md",t.today),outside:e.cn("text-muted-foreground opacity-50 aria-selected:text-muted-foreground aria-selected:opacity-50",t.outside),disabled:e.cn("text-foreground opacity-50 cursor-not-allowed",t.disabled),hidden:e.cn(t.hidden),...a},components:{Chevron:({orientation:c,className:l,...i})=>c==="left"?o.jsx(g.ChevronLeft,{className:l,size:16,...i}):c==="right"?o.jsx(g.ChevronRight,{className:l,size:16,...i}):o.jsx(g.ChevronDown,{className:l,size:16,...i}),DayButton:m,..._},"data-hook":y,"data-slot":"calendar","data-tracking-el":h,"data-tracking-label":w,fixedWeeks:u,formatters:{formatMonthDropdown:c=>c.toLocaleString("default",{month:"short"}),...v},numberOfMonths:d,showOutsideDays:n,...j})}b.displayName="Calendar";exports.Calendar=b;exports.CalendarDayButton=m;
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/components/calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,SAAS,EAGT,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAI1B;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG;IAC3C;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAUF;;;GAGG;AACH,QAAA,MAAM,iBAAiB;8CAKpB,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC;;CAqCxC,CAAC;AAIF;;;;GAIG;AACH,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,cAAkB,EAClB,aAAa,EACb,UAAiB,EACjB,QAAQ,EACR,UAAU,EACV,aAAa,EACb,UAAU,EACV,UAAU,EACV,GAAG,KAAK,EACT,EAAE,aAAa,2CAqIf;kBAlJQ,QAAQ;;;AAsJjB,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/components/calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,SAAS,EAGT,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAI1B;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG;IAC3C;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAUF;;;GAGG;AACH,QAAA,MAAM,iBAAiB;8CAKpB,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC;;CAqCxC,CAAC;AAIF;;;;GAIG;AACH,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,cAAkB,EAClB,aAAa,EACb,UAAiB,EACjB,QAAQ,EACR,UAAU,EACV,aAAa,EACb,UAAU,EACV,UAAU,EACV,GAAG,KAAK,EACT,EAAE,aAAa,2CAwIf;kBArJQ,QAAQ;;;AAyJjB,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC"}
package/dist/calendar.js CHANGED
@@ -152,19 +152,22 @@ function z({
152
152
  }) => o === "left" ? /* @__PURE__ */ a(
153
153
  v,
154
154
  {
155
- className: e("size-4", c),
155
+ className: c,
156
+ size: 16,
156
157
  ...i
157
158
  }
158
159
  ) : o === "right" ? /* @__PURE__ */ a(
159
160
  k,
160
161
  {
161
- className: e("size-4", c),
162
+ className: c,
163
+ size: 16,
162
164
  ...i
163
165
  }
164
166
  ) : /* @__PURE__ */ a(
165
167
  N,
166
168
  {
167
- className: e("size-4", c),
169
+ className: c,
170
+ size: 16,
168
171
  ...i
169
172
  }
170
173
  ),
package/dist/card.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),y=require("react"),N=require("class-variance-authority"),d=require("@brightlocal/ui-components/lib/utils");function h(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(a,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return a.default=t,Object.freeze(a)}const e=h(y),n=e.createContext({flush:!1}),v=N.cva(["flex","flex-col","gap-8","rounded-[14px]","py-8","transition-colors"],{variants:{variant:{default:["bg-card","text-card-foreground","border","border-card-border"],transparent:["bg-transparent","text-foreground"],border:["bg-transparent","text-foreground","border","border-border"],"transparent-flush":["bg-transparent","text-foreground"]}},defaultVariants:{variant:"default"}}),c=e.forwardRef(({className:t,variant:a="default",dataHook:r,trackingEl:o,trackingLabel:m,children:x,...g},b)=>{const j=a==="transparent-flush";return s.jsx(n.Provider,{value:{flush:j},children:s.jsx("div",{ref:b,className:d.cn(v({variant:a}),t),"data-hook":r,"data-slot":"card","data-tracking-el":o||`card-${a}`,"data-tracking-label":m,...g,children:x})})});c.displayName="Card";const i=e.forwardRef(({className:t,...a},r)=>{const{flush:o}=e.useContext(n);return s.jsx("div",{ref:r,className:d.cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 has-data-[slot=card-action]:grid-cols-[1fr_auto]",!o&&"px-8",t),"data-slot":"card-header",...a})});i.displayName="CardHeader";const l=e.forwardRef(({className:t,...a},r)=>s.jsx("div",{ref:r,className:d.cn("heading-sm",t),"data-slot":"card-title",...a}));l.displayName="CardTitle";const u=e.forwardRef(({className:t,...a},r)=>s.jsx("div",{ref:r,className:d.cn("text-muted-foreground text-sm leading-normal font-normal",t),"data-slot":"card-description",...a}));u.displayName="CardDescription";const f=e.forwardRef(({className:t,...a},r)=>s.jsx("div",{ref:r,className:d.cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),"data-slot":"card-action",...a}));f.displayName="CardAction";const p=e.forwardRef(({className:t,...a},r)=>{const{flush:o}=e.useContext(n);return s.jsx("div",{ref:r,className:d.cn(!o&&"px-8",t),"data-slot":"card-content",...a})});p.displayName="CardContent";const C=e.forwardRef(({className:t,...a},r)=>{const{flush:o}=e.useContext(n);return s.jsx("div",{ref:r,className:d.cn("flex items-center",!o&&"px-8",t),"data-slot":"card-footer",...a})});C.displayName="CardFooter";exports.Card=c;exports.CardAction=f;exports.CardContent=p;exports.CardDescription=u;exports.CardFooter=C;exports.CardHeader=i;exports.CardTitle=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),h=require("react"),w=require("class-variance-authority"),d=require("@brightlocal/ui-components/lib/utils");function R(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(r,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return r.default=t,Object.freeze(r)}const e=R(h),c=e.createContext({flush:!1}),O=w.cva(["flex","flex-col","gap-8","rounded-xl","py-8","transition-colors","w-full"],{variants:{variant:{default:["bg-card","text-card-foreground","border","border-card-border"],transparent:["bg-transparent","text-foreground"],border:["bg-transparent","text-foreground","border","border-border"],"transparent-flush":["bg-transparent","text-foreground"]}},defaultVariants:{variant:"default"}}),l=e.forwardRef(({className:t,variant:r="default",dataHook:a,trackingEl:o,trackingLabel:x,maxWidth:n="400px",children:g,style:b,...y},j)=>{const v=r==="transparent-flush",N=n!==void 0?{maxWidth:typeof n=="number"?`${n}px`:n}:void 0;return s.jsx(c.Provider,{value:{flush:v},children:s.jsx("div",{ref:j,className:d.cn(O({variant:r}),t),"data-hook":a,"data-slot":"card","data-tracking-el":o||`card-${r}`,"data-tracking-label":x,style:{...N,...b},...y,children:g})})});l.displayName="Card";const i=e.forwardRef(({className:t,...r},a)=>{const{flush:o}=e.useContext(c);return s.jsx("div",{ref:a,className:d.cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 has-data-[slot=card-action]:grid-cols-[1fr_auto]",!o&&"px-8",t),"data-slot":"card-header",...r})});i.displayName="CardHeader";const u=e.forwardRef(({className:t,...r},a)=>s.jsx("div",{ref:a,className:d.cn("heading-sm",t),"data-slot":"card-title",...r}));u.displayName="CardTitle";const f=e.forwardRef(({className:t,...r},a)=>s.jsx("div",{ref:a,className:d.cn("text-muted-foreground text-sm leading-normal font-normal",t),"data-slot":"card-description",...r}));f.displayName="CardDescription";const p=e.forwardRef(({className:t,...r},a)=>s.jsx("div",{ref:a,className:d.cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),"data-slot":"card-action",...r}));p.displayName="CardAction";const C=e.forwardRef(({className:t,...r},a)=>{const{flush:o}=e.useContext(c);return s.jsx("div",{ref:a,className:d.cn(!o&&"px-8",t),"data-slot":"card-content",...r})});C.displayName="CardContent";const m=e.forwardRef(({className:t,...r},a)=>{const{flush:o}=e.useContext(c);return s.jsx("div",{ref:a,className:d.cn("flex items-center",!o&&"px-8",t),"data-slot":"card-footer",...r})});m.displayName="CardFooter";exports.Card=l;exports.CardAction=p;exports.CardContent=C;exports.CardDescription=f;exports.CardFooter=m;exports.CardHeader=i;exports.CardTitle=u;
package/dist/card.d.ts CHANGED
@@ -24,6 +24,11 @@ type CardProps = React.ComponentProps<"div"> & {
24
24
  * Tracking label for analytics context
25
25
  */
26
26
  trackingLabel?: string;
27
+ /**
28
+ * Maximum width of the card (e.g., "420px", "600px", "100%")
29
+ * @default "400px"
30
+ */
31
+ maxWidth?: string | number;
27
32
  };
28
33
  /**
29
34
  * Container component for grouping related content with visual separation.
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;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