@brightlocal/ui-components 2.12.0 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/component-meta.json +316 -19
  2. package/dist/blocks/sidebar.cjs +1 -1
  3. package/dist/blocks/sidebar.d.ts +203 -4
  4. package/dist/blocks/sidebar.d.ts.map +1 -1
  5. package/dist/blocks/sidebar.js +667 -393
  6. package/dist/card.cjs +1 -1
  7. package/dist/card.d.ts +5 -1
  8. package/dist/card.d.ts.map +1 -1
  9. package/dist/card.js +48 -31
  10. package/dist/combobox.cjs +3 -3
  11. package/dist/combobox.d.ts +8 -0
  12. package/dist/combobox.d.ts.map +1 -1
  13. package/dist/combobox.js +227 -226
  14. package/dist/dropdown-menu.cjs +1 -1
  15. package/dist/dropdown-menu.js +1 -1
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.js +450 -441
  18. package/dist/list.cjs +1 -1
  19. package/dist/list.d.ts +25 -4
  20. package/dist/list.d.ts.map +1 -1
  21. package/dist/list.js +71 -53
  22. package/dist/popover.cjs +1 -1
  23. package/dist/popover.js +7 -7
  24. package/dist/rating.cjs +1 -1
  25. package/dist/rating.js +13 -13
  26. package/dist/select.cjs +2 -2
  27. package/dist/select.d.ts +10 -2
  28. package/dist/select.d.ts.map +1 -1
  29. package/dist/select.js +36 -30
  30. package/dist/table.cjs +1 -1
  31. package/dist/table.d.ts +14 -0
  32. package/dist/table.d.ts.map +1 -1
  33. package/dist/table.js +57 -39
  34. package/dist/tabs.cjs +1 -1
  35. package/dist/tabs.d.ts +25 -9
  36. package/dist/tabs.d.ts.map +1 -1
  37. package/dist/tabs.js +128 -113
  38. package/package.json +2 -2
  39. package/src/blocks/sidebar.tsx +596 -9
  40. package/src/components/card.tsx +23 -0
  41. package/src/components/combobox.tsx +10 -0
  42. package/src/components/dropdown-menu.tsx +1 -1
  43. package/src/components/list.tsx +45 -2
  44. package/src/components/popover.tsx +1 -1
  45. package/src/components/rating.tsx +1 -1
  46. package/src/components/select.tsx +24 -2
  47. package/src/components/table.tsx +39 -2
  48. package/src/components/tabs.tsx +195 -146
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "2.12.0",
3
+ "version": "2.14.0",
4
4
  "description": "Machine-readable registry of all components in the BrightLocal Design System",
5
5
  "components": [
6
6
  {
@@ -108,10 +108,25 @@
108
108
  "confirm modal",
109
109
  "destructive action dialog"
110
110
  ],
111
+ "whenToUse": [
112
+ "User is about to perform an irreversible or destructive action (delete, discard, overwrite)",
113
+ "Action has significant consequences that require explicit confirmation",
114
+ "Two clear actions: confirm or cancel — no other options needed"
115
+ ],
111
116
  "doNotUseFor": [
112
117
  "informational dialogs (use Dialog)",
113
118
  "toast messages (use Sonner)"
114
119
  ],
120
+ "alternatives": [
121
+ {
122
+ "component": "Dialog",
123
+ "rule": "Use Dialog when content is informational or includes a form — not a simple confirm/cancel"
124
+ },
125
+ {
126
+ "component": "Sonner",
127
+ "rule": "Use Sonner for non-blocking success/error feedback after an action completes"
128
+ }
129
+ ],
115
130
  "replaces": [],
116
131
  "states": [
117
132
  "open",
@@ -187,10 +202,25 @@
187
202
  "label",
188
203
  "status indicator"
189
204
  ],
205
+ "whenToUse": [
206
+ "Displaying a status label (active/inactive, new, draft)",
207
+ "Showing a count or numeric indicator",
208
+ "Non-interactive categorical labels"
209
+ ],
190
210
  "doNotUseFor": [
191
211
  "removable tags (use Chip)",
192
212
  "interactive elements (use Button)"
193
213
  ],
214
+ "alternatives": [
215
+ {
216
+ "component": "Chip",
217
+ "rule": "Use Chip when the user can remove/dismiss the tag — Badge is non-interactive"
218
+ },
219
+ {
220
+ "component": "Button",
221
+ "rule": "Use Button for interactive status toggles"
222
+ }
223
+ ],
194
224
  "replaces": [],
195
225
  "states": [
196
226
  "default"
@@ -268,10 +298,36 @@
268
298
  "submit button",
269
299
  "confirm button"
270
300
  ],
301
+ "whenToUse": [
302
+ "Triggering an action (submit, save, delete, open)",
303
+ "Primary and secondary CTAs in forms, dialogs, and cards",
304
+ "Icon-only actions using the iconOnly prop"
305
+ ],
271
306
  "doNotUseFor": [
272
307
  "navigation links (use Link)",
273
308
  "toggle state (use Toggle or Switch)"
274
309
  ],
310
+ "alternatives": [
311
+ {
312
+ "component": "Link",
313
+ "rule": "Use Link for navigation to a URL — even if it looks like a button, use Button with asChild wrapping a router Link for button-styled navigation"
314
+ },
315
+ {
316
+ "component": "Toggle",
317
+ "rule": "Use Toggle for on/off state that persists (e.g., bold, italic)"
318
+ },
319
+ {
320
+ "component": "DropdownMenu",
321
+ "rule": "Use Button + DropdownMenu for a button with secondary actions (SplitButton recipe)"
322
+ }
323
+ ],
324
+ "knownGaps": [
325
+ {
326
+ "description": "No ButtonLink variant for navigation-styled buttons",
327
+ "ticket": "DS-530",
328
+ "workaround": "Use Button with asChild wrapping a router Link component"
329
+ }
330
+ ],
275
331
  "replaces": [
276
332
  "native <button>"
277
333
  ],
@@ -346,11 +402,12 @@
346
402
  "exports": [
347
403
  "Card",
348
404
  "CardHeader",
405
+ "CardFooter",
349
406
  "CardTitle",
350
- "CardDescription",
351
407
  "CardAction",
352
- "CardContent",
353
- "CardFooter"
408
+ "CardDescription",
409
+ "CardMedia",
410
+ "CardContent"
354
411
  ],
355
412
  "compound": true,
356
413
  "dataHookRequired": true,
@@ -369,7 +426,7 @@
369
426
  "props": [
370
427
  "maxWidth"
371
428
  ],
372
- "description": "Content container with consistent styling",
429
+ "description": "Content container with consistent styling. Supports a density prop: 'default' uses generous spacing (gap-8, py-section-md, px-section-md) for standalone cards; 'condensed' uses compact spacing (gap-3, py-3, px-3) for cards nested inside other cards as sub-sections, inline stat panels, or dense dashboard widgets.",
373
430
  "aliases": [
374
431
  "container",
375
432
  "panel",
@@ -377,6 +434,18 @@
377
434
  "wrapper",
378
435
  "content card"
379
436
  ],
437
+ "whenToUse": [
438
+ "Grouping related content with a visual boundary (form sections, detail panels, stat cards)",
439
+ "Page-level content containers that need consistent padding and border styling",
440
+ "Nested sub-sections within a parent card — use density='condensed' for compact inline panels (e.g., stat summaries, ranking grids, metric tiles)"
441
+ ],
442
+ "knownGaps": [
443
+ {
444
+ "description": "CardTitle text size too large for some contexts — smaller variant needed",
445
+ "ticket": "DS-535",
446
+ "workaround": "Override CardTitle with className='text-lg' or 'text-base' for smaller titles"
447
+ }
448
+ ],
380
449
  "doNotUseFor": [
381
450
  "clickable list items (use List)",
382
451
  "modal content (use Dialog)"
@@ -450,7 +519,25 @@
450
519
  "dataHookRequired": true,
451
520
  "variants": {},
452
521
  "props": [],
453
- "description": "Full-page centered content layout"
522
+ "description": "Full-page centered content layout",
523
+ "whenToUse": [
524
+ "Single-column centered pages (login, signup, password reset, onboarding)",
525
+ "Pages with a centered Card and branded header"
526
+ ],
527
+ "doNotUseFor": [
528
+ "two-column layouts (use SplitLayout)",
529
+ "app shells with sidebar navigation (use GlobalLayout + Sidebar)"
530
+ ],
531
+ "alternatives": [
532
+ {
533
+ "component": "SplitLayout",
534
+ "rule": "Use SplitLayout for two-column pages with marketing content on one side"
535
+ },
536
+ {
537
+ "component": "GlobalLayout",
538
+ "rule": "Use GlobalLayout for full app shells with sidebar navigation"
539
+ }
540
+ ]
454
541
  },
455
542
  {
456
543
  "name": "Chart",
@@ -543,7 +630,26 @@
543
630
  "removeAriaLabel": "string — default: \"Remove {name}\""
544
631
  }
545
632
  },
546
- "description": "Removable chip/tag element"
633
+ "description": "Removable chip/tag element",
634
+ "whenToUse": [
635
+ "Displaying user-created tags that can be removed",
636
+ "Selected filter values that can be dismissed",
637
+ "Multi-select token display with remove capability"
638
+ ],
639
+ "doNotUseFor": [
640
+ "non-interactive status labels (use Badge)",
641
+ "category labels without remove action (use Badge)"
642
+ ],
643
+ "alternatives": [
644
+ {
645
+ "component": "Badge",
646
+ "rule": "Use Badge for non-interactive status indicators or labels"
647
+ },
648
+ {
649
+ "component": "InputChip",
650
+ "rule": "Use InputChip when users need to both add and remove tags via an input field"
651
+ }
652
+ ]
547
653
  },
548
654
  {
549
655
  "name": "Collapsible",
@@ -611,10 +717,35 @@
611
717
  "typeahead",
612
718
  "filterable dropdown"
613
719
  ],
720
+ "whenToUse": [
721
+ "Dropdown with 10+ options where search/filtering improves UX",
722
+ "Autocomplete or typeahead for large lists (cities, categories, users)",
723
+ "Multi-select with search capability"
724
+ ],
614
725
  "doNotUseFor": [
615
726
  "simple select without search (use Select)",
616
727
  "command palette (use Command)"
617
728
  ],
729
+ "alternatives": [
730
+ {
731
+ "component": "Select",
732
+ "rule": "Use Select for short lists (under 10 options) where search is unnecessary"
733
+ },
734
+ {
735
+ "component": "Command",
736
+ "rule": "Use Command for keyboard-driven command palettes or action search"
737
+ },
738
+ {
739
+ "component": "DropdownMenu",
740
+ "rule": "Use DropdownMenu for action menus triggered by a button — not form selection"
741
+ }
742
+ ],
743
+ "knownGaps": [
744
+ {
745
+ "description": "Missing onValueChange callback — consumers need @ts-expect-error workaround",
746
+ "workaround": "Use @ts-expect-error when passing onValueChange to Combobox until the API is updated"
747
+ }
748
+ ],
618
749
  "replaces": [],
619
750
  "states": [
620
751
  "open",
@@ -772,10 +903,29 @@
772
903
  "popup",
773
904
  "lightbox"
774
905
  ],
906
+ "whenToUse": [
907
+ "Presenting informational content or forms that require focused attention",
908
+ "Content that should block interaction with the page behind it",
909
+ "Multi-step flows or forms that don't fit inline"
910
+ ],
775
911
  "doNotUseFor": [
776
912
  "confirmation actions (use AlertDialog)",
777
913
  "side panels (use Sheet or Drawer)"
778
914
  ],
915
+ "alternatives": [
916
+ {
917
+ "component": "AlertDialog",
918
+ "rule": "Use AlertDialog when the user must confirm or cancel a destructive/irreversible action"
919
+ },
920
+ {
921
+ "component": "Sheet",
922
+ "rule": "Use Sheet for side panels with supplementary content or forms that don't need centered focus"
923
+ },
924
+ {
925
+ "component": "Drawer",
926
+ "rule": "Use Drawer for mobile-friendly bottom/side slide-out panels"
927
+ }
928
+ ],
779
929
  "replaces": [
780
930
  "native <dialog>"
781
931
  ],
@@ -816,7 +966,26 @@
816
966
  "onOpenChange",
817
967
  "direction"
818
968
  ],
819
- "description": "Slide-out drawer panel"
969
+ "description": "Slide-out drawer panel",
970
+ "whenToUse": [
971
+ "Mobile-friendly slide-out panel from any edge",
972
+ "Non-modal supplementary content on touch devices",
973
+ "Bottom sheet pattern on mobile viewports"
974
+ ],
975
+ "doNotUseFor": [
976
+ "centered dialogs (use Dialog)",
977
+ "confirmation prompts (use AlertDialog)"
978
+ ],
979
+ "alternatives": [
980
+ {
981
+ "component": "Sheet",
982
+ "rule": "Use Sheet for always-modal side panels with overlay — Sheet is modal-only, Drawer supports non-modal"
983
+ },
984
+ {
985
+ "component": "Dialog",
986
+ "rule": "Use Dialog when content should be centered and focused, not sliding from an edge"
987
+ }
988
+ ]
820
989
  },
821
990
  {
822
991
  "name": "DropdownMenu",
@@ -905,10 +1074,21 @@
905
1074
  "input group",
906
1075
  "field wrapper"
907
1076
  ],
1077
+ "whenToUse": [
1078
+ "Wrapping any form input with label, description, and error message",
1079
+ "Canonical pattern: Field > FieldLabel + Input/Select/Textarea + FieldDescription + FieldError",
1080
+ "When integrating with React Hook Form — use Field with Controller to wire up error state"
1081
+ ],
908
1082
  "doNotUseFor": [
909
1083
  "standalone labels (use Label)",
910
1084
  "inline text (use Typography)"
911
1085
  ],
1086
+ "alternatives": [
1087
+ {
1088
+ "component": "Label",
1089
+ "rule": "Use standalone Label only when building a custom field layout — Field includes FieldLabel with proper a11y wiring"
1090
+ }
1091
+ ],
912
1092
  "replaces": [],
913
1093
  "states": [
914
1094
  "default",
@@ -1177,7 +1357,22 @@
1177
1357
  "showExternalIcon",
1178
1358
  "asChild"
1179
1359
  ],
1180
- "description": "Styled hyperlink with external link support"
1360
+ "description": "Styled hyperlink with external link support",
1361
+ "whenToUse": [
1362
+ "Inline text links within paragraphs or sentences",
1363
+ "Navigation to internal or external URLs",
1364
+ "Links inside i18n <Trans> blocks — use Link as a component in the components map"
1365
+ ],
1366
+ "doNotUseFor": [
1367
+ "actions that don't navigate (use Button)",
1368
+ "button-styled navigation (use Button with asChild wrapping a router link)"
1369
+ ],
1370
+ "alternatives": [
1371
+ {
1372
+ "component": "Button",
1373
+ "rule": "Use Button for actions (submit, delete, open). For button-styled navigation, use Button asChild wrapping your router's Link component"
1374
+ }
1375
+ ]
1181
1376
  },
1182
1377
  {
1183
1378
  "name": "List",
@@ -1186,20 +1381,25 @@
1186
1381
  "exports": [
1187
1382
  "List",
1188
1383
  "Item",
1384
+ "ItemMedia",
1189
1385
  "ItemContent",
1190
1386
  "ItemTitle",
1191
- "ItemActions"
1387
+ "ItemDescription",
1388
+ "ItemActions",
1389
+ "ItemSubheader"
1192
1390
  ],
1193
1391
  "compound": true,
1194
1392
  "dataHookRequired": true,
1195
1393
  "variants": {
1196
1394
  "variant": [
1197
1395
  "default",
1198
- "outline"
1396
+ "filled",
1397
+ "outline",
1398
+ "loading"
1199
1399
  ]
1200
1400
  },
1201
1401
  "props": [],
1202
- "description": "Vertical item list"
1402
+ "description": "Vertical item list with optional section headings"
1203
1403
  },
1204
1404
  {
1205
1405
  "name": "Logo",
@@ -1612,10 +1812,29 @@
1612
1812
  "tray",
1613
1813
  "slide-out"
1614
1814
  ],
1815
+ "whenToUse": [
1816
+ "Side panel for editing details, settings, or supplementary info",
1817
+ "Right-side panel pattern (most common: filters, detail views, forms)",
1818
+ "Content that should slide in from an edge without navigating away"
1819
+ ],
1615
1820
  "doNotUseFor": [
1616
1821
  "centered dialogs (use Dialog)",
1617
1822
  "confirmations (use AlertDialog)"
1618
1823
  ],
1824
+ "alternatives": [
1825
+ {
1826
+ "component": "Dialog",
1827
+ "rule": "Use Dialog for centered content requiring focused attention"
1828
+ },
1829
+ {
1830
+ "component": "Drawer",
1831
+ "rule": "Use Drawer when you need non-modal behavior or mobile bottom-sheet pattern"
1832
+ },
1833
+ {
1834
+ "component": "Sidebar",
1835
+ "rule": "Use Sidebar for persistent collapsible navigation — Sheet is for temporary overlays"
1836
+ }
1837
+ ],
1619
1838
  "replaces": [],
1620
1839
  "states": [
1621
1840
  "open",
@@ -1727,7 +1946,27 @@
1727
1946
  "left",
1728
1947
  "right"
1729
1948
  ],
1730
- "description": "Two-column responsive layout with composition pattern"
1949
+ "description": "Two-column responsive layout with composition pattern",
1950
+ "whenToUse": [
1951
+ "Two-column pages where one side is content and the other is decorative/marketing",
1952
+ "Auth pages with form on the left and branding on the right",
1953
+ "Any page where the right column should be hidden on mobile"
1954
+ ],
1955
+ "doNotUseFor": [
1956
+ "centered single-column layouts (use CentredLayout)",
1957
+ "app shells with sidebar navigation (use GlobalLayout + Sidebar)",
1958
+ "equal-width columns that should both be visible on mobile (use CSS grid)"
1959
+ ],
1960
+ "alternatives": [
1961
+ {
1962
+ "component": "CentredLayout",
1963
+ "rule": "Use CentredLayout for single-column centered content"
1964
+ },
1965
+ {
1966
+ "component": "GlobalLayout",
1967
+ "rule": "Use GlobalLayout for full app shells with persistent sidebar"
1968
+ }
1969
+ ]
1731
1970
  },
1732
1971
  {
1733
1972
  "name": "Switch",
@@ -1802,10 +2041,21 @@
1802
2041
  "grid",
1803
2042
  "list table"
1804
2043
  ],
2044
+ "whenToUse": [
2045
+ "Simple read-only data display with no sorting, filtering, or pagination",
2046
+ "Static tables like pricing tiers, feature comparisons, or settings summaries",
2047
+ "When you control the exact columns and rows — no dynamic column configuration needed"
2048
+ ],
1805
2049
  "doNotUseFor": [
1806
2050
  "complex filtering and sorting (use DataTable block)",
1807
2051
  "layout grids (use CSS grid)"
1808
2052
  ],
2053
+ "alternatives": [
2054
+ {
2055
+ "component": "DataTable",
2056
+ "rule": "Use DataTable for sortable, filterable, paginated tables with row selection — it wraps TanStack Table"
2057
+ }
2058
+ ],
1809
2059
  "replaces": [
1810
2060
  "native <table>"
1811
2061
  ],
@@ -2029,7 +2279,22 @@
2029
2279
  "props": [
2030
2280
  "asChild"
2031
2281
  ],
2032
- "description": "Semantic text components for headings, paragraphs, and inline styles"
2282
+ "description": "Semantic text components for headings, paragraphs, and inline styles",
2283
+ "whenToUse": [
2284
+ "Page and section headings (H1–H4) with consistent font and spacing",
2285
+ "Body text, lead text, muted captions, and inline code",
2286
+ "Any heading or paragraph that should follow the design system type scale"
2287
+ ],
2288
+ "doNotUseFor": [
2289
+ "display-sized hero text larger than H1 — not yet covered, use custom Tailwind classes",
2290
+ "form labels (use Label or FieldLabel)"
2291
+ ],
2292
+ "alternatives": [
2293
+ {
2294
+ "component": "Label",
2295
+ "rule": "Use Label for form input labels — Typography is for content headings and body text"
2296
+ }
2297
+ ]
2033
2298
  }
2034
2299
  ],
2035
2300
  "blocks": [
@@ -2120,21 +2385,43 @@
2120
2385
  "category": "block",
2121
2386
  "exports": [
2122
2387
  "Sidebar",
2388
+ "SidebarAccountDropdown",
2389
+ "SidebarCollapseIcon",
2123
2390
  "SidebarContent",
2124
- "SidebarHeader",
2125
2391
  "SidebarFooter",
2392
+ "SidebarGroup",
2393
+ "SidebarGroupAction",
2394
+ "SidebarGroupContent",
2395
+ "SidebarGroupLabel",
2396
+ "SidebarHeader",
2397
+ "SidebarHeaderButton",
2398
+ "SidebarInboxItem",
2399
+ "SidebarInput",
2400
+ "SidebarInset",
2126
2401
  "SidebarMenu",
2402
+ "SidebarMenuAction",
2403
+ "SidebarMenuBadge",
2127
2404
  "SidebarMenuButton",
2405
+ "SidebarMenuCollapsible",
2406
+ "SidebarMenuCollapsibleContent",
2407
+ "SidebarMenuCollapsibleTrigger",
2128
2408
  "SidebarMenuItem",
2409
+ "SidebarMenuSkeleton",
2129
2410
  "SidebarMenuSub",
2130
- "SidebarMenuAction",
2131
- "SidebarMenuBadge",
2411
+ "SidebarMenuSubButton",
2412
+ "SidebarMenuSubItem",
2413
+ "SidebarPopoverMenu",
2414
+ "SidebarPopoverMenuItem",
2415
+ "SidebarPopoverTrigger",
2416
+ "SidebarProvider",
2132
2417
  "SidebarRail",
2418
+ "SidebarSeparator",
2419
+ "SidebarSwitcher",
2133
2420
  "SidebarTrigger",
2134
- "SidebarInset"
2421
+ "useSidebar"
2135
2422
  ],
2136
2423
  "compound": true,
2137
- "dataHookRequired": false,
2424
+ "dataHookRequired": true,
2138
2425
  "variants": {
2139
2426
  "side": [
2140
2427
  "left"
@@ -2162,6 +2449,16 @@
2162
2449
  },
2163
2450
  "SidebarRail": {
2164
2451
  "toggleAriaLabel": "string — default: \"Toggle Sidebar\""
2452
+ },
2453
+ "SidebarPopoverTrigger": {
2454
+ "triggerAriaLabel": "string — default: \"Switch workspace\""
2455
+ },
2456
+ "SidebarPopoverMenu": {
2457
+ "groupTitle": "string — default: \"Teams\"",
2458
+ "addActionLabel": "string — default: \"Add team\""
2459
+ },
2460
+ "SidebarSwitcher": {
2461
+ "triggerAriaLabel": "string — default: \"Switch workspace\""
2165
2462
  }
2166
2463
  },
2167
2464
  "description": "Complex sidebar navigation with collapsible support"
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),Se=require("react"),y=require("@radix-ui/react-slot"),D=require("class-variance-authority"),u=require("@brightlocal/icons"),d=require("@brightlocal/ui-components/lib/utils"),we=require("../button.cjs"),ke=require("../input.cjs"),ye=require("../separator.cjs"),M=require("../sheet.cjs"),I=require("../accordion.cjs"),Ne=require("@radix-ui/react-accordion"),je=require("../scroll-area.cjs"),L=require("../skeleton.cjs"),C=require("../tooltip.cjs"),Me=require("../hooks/use-breakpoint.cjs");function _(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 n=_(Se),Ce=_(Ne);var z=(e=>(e.LEFT="left",e))(z||{}),P=(e=>(e.SIDEBAR="sidebar",e))(P||{}),q=(e=>(e.OFFCANVAS="offcanvas",e.ICON="icon",e.NONE="none",e))(q||{}),G=(e=>(e.DEFAULT="default",e.SM="sm",e.XS="xs",e))(G||{}),H=(e=>(e.DEFAULT="default",e.COLLAPSIBLE="collapsible",e.ACTION="action",e))(H||{}),F=(e=>(e.SIMPLE="simple",e.COLLAPSIBLE="collapsible",e.DROPDOWN="dropdown",e.BADGE="badge",e.BIG_ICON="bigIcon",e.CHECKBOX="checkbox",e))(F||{}),K=(e=>(e.DEFAULT="default",e.SM="sm",e.LG="lg",e))(K||{}),U=(e=>(e.DEFAULT="default",e.BORDER="border",e.INDENT="indent",e))(U||{}),V=(e=>(e.SM="sm",e.MD="md",e))(V||{}),W=(e=>(e.CARET="caret",e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e.UP_DOWN="upDown",e.PLUS_MINUS="plusMinus",e.DOTS="dots",e))(W||{});const Re="sidebar:state",Ie=3600*24*7,De="224px",Ae="336px",Oe="48px",Ee="b",X=n.createContext(null);function k(){const e=n.useContext(X);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const $=n.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:t,defaultOpen:o=!0,open:s,onOpenChange:i,className:l,style:c,children:m,...g},x)=>{const b=Me.useIsBelowBreakpoint("lg"),[p,v]=n.useState(!1),[f,R]=n.useState(o),w=s??f,N=n.useCallback(h=>{const S=typeof h=="function"?h(w):h;i?i(S):R(S),document.cookie=`${Re}=${S}; path=/; max-age=${Ie}`},[i,w]),j=n.useCallback(()=>b?v(h=>!h):N(h=>!h),[b,N,v]);n.useEffect(()=>{const h=S=>{S.key===Ee&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),j())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[j]);const B=w?"expanded":"collapsed",ve=n.useMemo(()=>({state:B,open:w,setOpen:N,isMobile:b,openMobile:p,setOpenMobile:v,toggleSidebar:j}),[B,w,N,b,p,v,j]);return r.jsx(X.Provider,{value:ve,children:r.jsx(C.TooltipProvider,{delayDuration:0,children:r.jsx("div",{ref:x,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":De,"--sidebar-width-icon":Oe,...c},...g,children:m})})})});$.displayName="SidebarProvider";const Y=n.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:t,side:o="left",variant:s="sidebar",collapsible:i="offcanvas",embedded:l,mobileTitle:c,mobileDescription:m,className:g,children:x,...b},p)=>{const{isMobile:v,state:f,openMobile:R,setOpenMobile:w}=k();return i==="none"?r.jsx("div",{ref:p,className:d.cn("text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",g),"data-hook":e,"data-slot":"sidebar","data-tracking-el":a||"sidebar","data-tracking-label":t,...b,children:x}):v?r.jsx(M.Sheet,{open:R,onOpenChange:w,children:r.jsxs(M.SheetContent,{className:"bg-sidebar-background text-sidebar-foreground w-(--sidebar-width) p-6","data-hook":`${e}-mobile-content`,"data-mobile":"true","data-sidebar":"sidebar",side:"left",style:{"--sidebar-width":`min(${Ae}, calc(100vw - 40px))`},children:[r.jsx(M.SheetTitle,{className:"sr-only",children:c??"Navigation"}),r.jsx(M.SheetDescription,{className:"sr-only",children:m??"Main navigation menu"}),r.jsx("div",{className:"flex h-full w-full flex-col",children:x})]})}):r.jsx("div",{ref:p,className:d.cn("group text-sidebar-foreground flex h-full shrink-0 flex-col overflow-hidden transition-[width] duration-200 ease-linear",f==="expanded"&&"w-(--sidebar-width)",i==="icon"&&f==="collapsed"&&"w-(--sidebar-width-icon)",i==="offcanvas"&&f==="collapsed"&&"w-0",g),"data-collapsible":f==="collapsed"?i:"","data-hook":e,"data-side":o,"data-slot":"sidebar","data-state":f,"data-tracking-el":a||"sidebar","data-tracking-label":t,"data-variant":s,...b,children:x})});Y.displayName="Sidebar";const A=n.forwardRef(({className:e,onClick:a,dataHook:t="sidebar-trigger",toggleAriaLabel:o,children:s,...i},l)=>{const{toggleSidebar:c}=k(),m=o??"Toggle Sidebar";return r.jsxs(we.Button,{ref:l,iconOnly:!0,"aria-label":m,className:d.cn("h-7 w-7",e),"data-slot":"sidebar-trigger",dataHook:t,size:"sm",variant:"ghost",onClick:g=>{a?.(g),c()},...i,children:[s||r.jsx(u.PanelLeft,{}),r.jsx("span",{className:"sr-only",children:m})]})});A.displayName="SidebarTrigger";const Z=n.forwardRef(({className:e,toggleAriaLabel:a,...t},o)=>{const{toggleSidebar:s}=k(),i=a??"Toggle Sidebar";return r.jsx("button",{ref:o,"aria-label":i,className:d.cn("hover:after:bg-sidebar-border absolute inset-y-0 -right-4 z-20 hidden w-4 -translate-x-1/2 transition-transform ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-0.5 sm:flex","cursor-w-resize","in-data-[state=collapsed]:cursor-e-resize","group-data-[collapsible=offcanvas]:hover:bg-sidebar-background group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","in-data-[collapsible=offcanvas]:-right-2",e),"data-slot":"sidebar-rail",tabIndex:-1,title:i,onClick:s,...t})});Z.displayName="SidebarRail";const J=n.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:o,...s},i)=>r.jsx("main",{ref:i,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}));J.displayName="SidebarInset";const Q=n.forwardRef(({className:e,...a},t)=>r.jsx(ke.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}));Q.displayName="SidebarInput";const ee=n.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("header",{ref:o,className:d.cn("pr-section-xs flex flex-col gap-2 pt-2 pb-9 pl-8",e),"data-hook":a,"data-slot":"sidebar-header",...t}));ee.displayName="SidebarHeader";const ae=n.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("footer",{ref:o,className:d.cn("flex flex-col gap-2 p-2",e),"data-hook":a,"data-slot":"sidebar-footer",...t}));ae.displayName="SidebarFooter";const te=n.forwardRef(({className:e,...a},t)=>r.jsx(ye.Separator,{ref:t,className:d.cn("bg-sidebar-border mx-2 my-5 w-auto group-data-[collapsible=icon]:mx-0",e),"data-slot":"sidebar-separator",...a}));te.displayName="SidebarSeparator";const re=n.forwardRef(({className:e,dataHook:a,ariaLabel:t="Sidebar",children:o,...s},i)=>{const{isMobile:l}=k();return r.jsx(je.ScrollArea,{ref:i,className:d.cn("min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden *:data-[slot=scroll-area-viewport]:p-0 [&_[data-slot=scroll-area-viewport]>div]:block!",e),dataHook:a??"sidebar-content-scroll",scrollOrientation:l?"both":"vertical",...s,children:r.jsx("nav",{"aria-label":t,className:"flex flex-col gap-2","data-slot":"sidebar-content",children:o})})});re.displayName="SidebarContent";const oe=n.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}));oe.displayName="SidebarGroup";const Te=D.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]: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"}}),se=n.forwardRef(({className:e,dataHook:a,asChild:t=!1,size:o="sm",variant:s="default",isOpen:i=!1,onToggle:l,onAction:c,children:m,...g},x)=>{const b=t?y.Slot:"div",p=()=>{s==="collapsible"&&l?l():s==="action"&&c&&c()},v=f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),p())};return r.jsxs(b,{ref:x,className:d.cn(Te({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"?p:void 0,onKeyDown:s!=="default"?v:void 0,...g,children:[r.jsx("span",{children:m}),s==="collapsible"&&r.jsx(u.ChevronDown,{className:d.cn("shrink-0 transition-transform duration-200",i&&"rotate-180"),size:16}),s==="action"&&r.jsx(u.Plus,{className:"shrink-0",size:16})]})});se.displayName="SidebarGroupLabel";const ie=n.forwardRef(({className:e,asChild:a=!1,...t},o)=>{const s=a?y.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]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),"data-slot":"sidebar-group-action",...t})});ie.displayName="SidebarGroupAction";const ne=n.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}));ne.displayName="SidebarGroupContent";const de=n.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}));de.displayName="SidebarMenu";const O=n.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}));O.displayName="SidebarMenuItem";const le=n.forwardRef(({type:e="caret",isActive:a=!1,className:t,...o},s)=>{const i={ref:s,className:d.cn("shrink-0 transition-transform",a&&e==="caret"&&"rotate-90",t),"data-slot":"sidebar-collapse-icon",...o};switch(e){case"horizontal":return r.jsx(u.ChevronRight,{...i});case"vertical":return r.jsx(u.ChevronDown,{...i});case"upDown":return r.jsx(u.ChevronsUpDown,{...i});case"plusMinus":return a?r.jsx(u.Minus,{...i}):r.jsx(u.Plus,{...i});case"dots":return r.jsx(u.Ellipsis,{...i});default:return r.jsx(u.ChevronRight,{...i})}});le.displayName="SidebarCollapseIcon";const Be=D.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-full px-6 py-2 text-left text-sm font-medium outline-none ring-sidebar-ring transition-[color,background-color,border-color,box-shadow,opacity,width,height,padding] duration-150 ease-in-out 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-semibold 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-of-type]:truncate [&>svg]:shrink-0 [&>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",badge:"group-has-[[data-sidebar=menu-badge]]/menu-item:pr-16",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-background [&>svg]:opacity-100 hover:[&>svg]:bg-sidebar-foreground hover:[&>svg]:text-sidebar-background 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:"px-3 [&>[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-12 text-sm/4",sm:"h-7 text-xs/4",lg:"h-12 text-sm/4 group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"simple",size:"default"}}),E=n.forwardRef(({asChild:e=!1,isActive:a=!1,variant:t="simple",size:o="default",tooltip:s,className:i,dataHook:l,...c},m)=>{const g=e?y.Slot:"button",{isMobile:x,state:b}=k(),p=r.jsx(g,{ref:m,className:d.cn(Be({variant:t,size:o}),i),"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(C.Tooltip,{children:[r.jsx(C.TooltipTrigger,{asChild:!0,children:p}),r.jsx(C.TooltipContent,{hideArrow:!0,...s,align:"center",className:d.cn("bg-foreground text-background border-none",s.className),hidden:b!=="collapsed"||x,side:"right",sideOffset:8})]})):p});E.displayName="SidebarMenuButton";const ce=n.forwardRef(({className:e,asChild:a=!1,showOnHover:t=!1,...o},s)=>{const i=a?y.Slot:"button";return r.jsx(i,{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]: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","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})});ce.displayName="SidebarMenuAction";const ue=n.forwardRef(({className:e,...a},t)=>r.jsx("div",{ref:t,className:d.cn("text-sidebar-foreground pointer-events-none absolute inset-y-0 right-4 my-auto 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","group-data-[collapsible=icon]:hidden",e),"data-slot":"sidebar-menu-badge",...a}));ue.displayName="SidebarMenuBadge";const be=n.forwardRef(({className:e,showIcon:a=!1,...t},o)=>{const s=n.useId(),i=n.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(L.Skeleton,{className:"size-4 rounded-md","data-slot":"sidebar-menu-skeleton-icon"}),r.jsx(L.Skeleton,{className:"h-4 max-w-[--skeleton-width] flex-1","data-slot":"sidebar-menu-skeleton-text",style:{"--skeleton-width":i}})]})});be.displayName="SidebarMenuSkeleton";const Le=D.cva("flex min-w-0 flex-col items-start gap-1 py-0.5 group-data-[collapsible=icon]:hidden",{variants:{variant:{default:"px-10",border:"border-l border-sidebar-border ml-10 pl-1 pr-10",indent:"px-10"}},defaultVariants:{variant:"border"}}),T=n.forwardRef(({className:e,variant:a="border",dataHook:t,...o},s)=>r.jsx("ul",{ref:s,className:d.cn(Le({variant:a}),e),"data-hook":t,"data-slot":"sidebar-menu-sub",...o}));T.displayName="SidebarMenuSub";const pe=n.forwardRef(({dataHook:e,...a},t)=>r.jsx("li",{ref:t,"data-hook":e,"data-slot":"sidebar-menu-sub-item",...a}));pe.displayName="SidebarMenuSubItem";const fe=n.forwardRef(({asChild:e=!1,size:a="md",isActive:t,className:o,dataHook:s,...i},l)=>{const c=e?y.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 items-center gap-2 overflow-hidden rounded-md px-2 transition-[color,background-color,box-shadow,opacity] duration-150 ease-in-out outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-of-type]:truncate [&>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",...i})});fe.displayName="SidebarMenuSubButton";function me({dataHook:e,className:a,children:t,defaultOpen:o,open:s,onOpenChange:i}){return r.jsx(O,{children:r.jsx(I.Accordion,{collapsible:!0,className:a,dataHook:e??"sidebar-menu-collapsible",defaultValue:o?"item":void 0,type:"single",value:s!==void 0?s?"item":"":void 0,onValueChange:i?l=>i(l==="item"):void 0,children:r.jsx(I.AccordionItem,{className:"group/collapsible border-none",value:"item",children:t})})})}me.displayName="SidebarMenuCollapsible";const ge=n.forwardRef(({children:e,className:a,...t},o)=>r.jsx(Ce.Trigger,{asChild:!0,children:r.jsxs(E,{ref:o,className:a,variant:"collapsible",...t,children:[e,r.jsx(u.ChevronRight,{"data-collapse-icon":!0,className:"opacity-100! transition-transform duration-200 ease-out group-data-[collapsible=icon]:hidden",size:12})]})}));ge.displayName="SidebarMenuCollapsibleTrigger";const he=n.forwardRef(({dataHook:e,children:a,...t},o)=>r.jsx(I.AccordionContent,{className:"p-0",children:r.jsx(T,{ref:o,dataHook:e,...t,children:a})}));he.displayName="SidebarMenuCollapsibleContent";const xe=n.forwardRef(({className:e,dataHook:a="sidebar-drawer",trackingEl:t,trackingLabel:o,children:s,...i},l)=>r.jsx("div",{ref:l,className:e,"data-hook":a,"data-slot":"sidebar-drawer","data-tracking-el":t,"data-tracking-label":o,...i,children:r.jsx(A,{dataHook:`${a}-trigger`,children:r.jsx(u.Menu,{size:24})})}));xe.displayName="SidebarDrawer";exports.Sidebar=Y;exports.SidebarCollapseIcon=le;exports.SidebarCollapseIconType=W;exports.SidebarCollapsible=q;exports.SidebarContent=re;exports.SidebarDrawer=xe;exports.SidebarFooter=ae;exports.SidebarGroup=oe;exports.SidebarGroupAction=ie;exports.SidebarGroupContent=ne;exports.SidebarGroupLabel=se;exports.SidebarGroupLabelSize=G;exports.SidebarGroupLabelVariant=H;exports.SidebarHeader=ee;exports.SidebarInput=Q;exports.SidebarInset=J;exports.SidebarMenu=de;exports.SidebarMenuAction=ce;exports.SidebarMenuBadge=ue;exports.SidebarMenuButton=E;exports.SidebarMenuButtonSize=K;exports.SidebarMenuButtonVariant=F;exports.SidebarMenuCollapsible=me;exports.SidebarMenuCollapsibleContent=he;exports.SidebarMenuCollapsibleTrigger=ge;exports.SidebarMenuItem=O;exports.SidebarMenuSkeleton=be;exports.SidebarMenuSub=T;exports.SidebarMenuSubButton=fe;exports.SidebarMenuSubButtonSize=V;exports.SidebarMenuSubItem=pe;exports.SidebarMenuSubVariant=U;exports.SidebarProvider=$;exports.SidebarRail=Z;exports.SidebarSeparator=te;exports.SidebarSide=z;exports.SidebarTrigger=A;exports.SidebarVariant=P;exports.useSidebar=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),Oe=require("react"),k=require("@radix-ui/react-slot"),T=require("class-variance-authority"),m=require("@brightlocal/icons"),l=require("@brightlocal/ui-components/lib/utils"),H=require("../button.cjs"),_e=require("../input.cjs"),F=require("../separator.cjs"),N=require("../dropdown-menu.cjs"),_=require("../popover.cjs"),R=require("../sheet.cjs"),E=require("../accordion.cjs"),Ee=require("@radix-ui/react-accordion"),Te=require("../scroll-area.cjs"),G=require("../skeleton.cjs"),I=require("../tooltip.cjs"),Pe=require("../hooks/use-breakpoint.cjs");function U(e){const r=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(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const i=U(Oe),ze=U(Ee),v="focus-visible:[box-shadow:0_0_0_1px_color-mix(in_srgb,var(--color-sidebar-ring)_50%,transparent),0_0_0_3px_rgba(0,0,0,0.1)]";var K=(e=>(e.LEFT="left",e))(K||{}),V=(e=>(e.SIDEBAR="sidebar",e))(V||{}),$=(e=>(e.OFFCANVAS="offcanvas",e.ICON="icon",e.NONE="none",e))($||{}),W=(e=>(e.DEFAULT="default",e.SM="sm",e.XS="xs",e))(W||{}),X=(e=>(e.DEFAULT="default",e.COLLAPSIBLE="collapsible",e.ACTION="action",e))(X||{}),Y=(e=>(e.SIMPLE="simple",e.COLLAPSIBLE="collapsible",e.DROPDOWN="dropdown",e.BADGE="badge",e.BIG_ICON="bigIcon",e.CHECKBOX="checkbox",e))(Y||{}),Z=(e=>(e.DEFAULT="default",e.SM="sm",e.LG="lg",e))(Z||{}),J=(e=>(e.DEFAULT="default",e.BORDER="border",e.INDENT="indent",e))(J||{}),Q=(e=>(e.SM="sm",e.MD="md",e))(Q||{}),ee=(e=>(e.CARET="caret",e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e.UP_DOWN="upDown",e.PLUS_MINUS="plusMinus",e.DOTS="dots",e))(ee||{});const Be="sidebar:state",Le=3600*24*7,qe="224px",Ge="336px",He="48px",Fe="b",ae=i.createContext(null);function y(){const e=i.useContext(ae);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const te=i.forwardRef(({dataHook:e,trackingEl:r,trackingLabel:t,defaultOpen:o=!0,open:s,onOpenChange:n,className:d,style:c,children:u,...b},f)=>{const p=Pe.useIsBelowBreakpoint("lg"),[x,S]=i.useState(!1),[g,O]=i.useState(o),j=s??g,M=i.useCallback(h=>{const w=typeof h=="function"?h(j):h;n?n(w):O(w),document.cookie=`${Be}=${w}; path=/; max-age=${Le}`},[n,j]),C=i.useCallback(()=>p?S(h=>!h):M(h=>!h),[p,M,S]);i.useEffect(()=>{const h=w=>{w.key===Fe&&(w.metaKey||w.ctrlKey)&&(w.preventDefault(),C())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[C]);const q=j?"expanded":"collapsed",Ae=i.useMemo(()=>({state:q,open:j,setOpen:M,isMobile:p,openMobile:x,setOpenMobile:S,toggleSidebar:C}),[q,j,M,p,x,S,C]);return a.jsx(ae.Provider,{value:Ae,children:a.jsx(I.TooltipProvider,{delayDuration:0,children:a.jsx("div",{ref:f,className:l.cn("group/sidebar-wrapper flex min-h-svh w-full",d),"data-hook":e,"data-slot":"sidebar-provider","data-tracking-el":r||"sidebar-provider","data-tracking-label":t,style:{"--sidebar-width":qe,"--sidebar-width-icon":He,...c},...b,children:u})})})});te.displayName="SidebarProvider";const re=i.forwardRef(({dataHook:e,trackingEl:r,trackingLabel:t,side:o="left",variant:s="sidebar",collapsible:n="offcanvas",embedded:d,mobileTitle:c,mobileDescription:u,className:b,children:f,...p},x)=>{const{isMobile:S,state:g,openMobile:O,setOpenMobile:j}=y();return n==="none"?a.jsx("div",{ref:x,className:l.cn("text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",b),"data-hook":e,"data-slot":"sidebar","data-tracking-el":r||"sidebar","data-tracking-label":t,...p,children:f}):S?a.jsx(R.Sheet,{open:O,onOpenChange:j,children:a.jsxs(R.SheetContent,{className:"bg-sidebar-background text-sidebar-foreground w-(--sidebar-width) p-6","data-hook":`${e}-mobile-content`,"data-mobile":"true","data-sidebar":"sidebar",side:"left",style:{"--sidebar-width":`min(${Ge}, calc(100vw - 40px))`},children:[a.jsx(R.SheetTitle,{className:"sr-only",children:c??"Navigation"}),a.jsx(R.SheetDescription,{className:"sr-only",children:u??"Main navigation menu"}),a.jsx("div",{className:"flex h-full w-full flex-col",children:f})]})}):a.jsx("div",{ref:x,className:l.cn("group text-sidebar-foreground flex h-full shrink-0 flex-col overflow-hidden transition-[width] duration-200 ease-linear",g==="expanded"&&"w-(--sidebar-width)",n==="icon"&&g==="collapsed"&&"w-(--sidebar-width-icon)",n==="offcanvas"&&g==="collapsed"&&"w-0",b),"data-collapsible":g==="collapsed"?n:"","data-hook":e,"data-side":o,"data-slot":"sidebar","data-state":g,"data-tracking-el":r||"sidebar","data-tracking-label":t,"data-variant":s,...p,children:f})});re.displayName="Sidebar";const P=i.forwardRef(({className:e,onClick:r,dataHook:t="sidebar-trigger",toggleAriaLabel:o,children:s,...n},d)=>{const{toggleSidebar:c}=y(),u=o??"Toggle Sidebar";return a.jsxs(H.Button,{ref:d,iconOnly:!0,"aria-label":u,className:l.cn("h-7 w-7",e),"data-slot":"sidebar-trigger",dataHook:t,size:"sm",variant:"ghost",onClick:b=>{r?.(b),c()},...n,children:[s||a.jsx(m.PanelLeft,{}),a.jsx("span",{className:"sr-only",children:u})]})});P.displayName="SidebarTrigger";const oe=i.forwardRef(({className:e,toggleAriaLabel:r,...t},o)=>{const{toggleSidebar:s}=y(),n=r??"Toggle Sidebar";return a.jsx("button",{ref:o,"aria-label":n,className:l.cn("hover:after:bg-sidebar-border absolute inset-y-0 -right-4 z-20 hidden w-4 -translate-x-1/2 transition-transform ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-0.5 sm:flex","cursor-w-resize","in-data-[state=collapsed]:cursor-e-resize","group-data-[collapsible=offcanvas]:hover:bg-sidebar-background group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","in-data-[collapsible=offcanvas]:-right-2",e),"data-slot":"sidebar-rail",tabIndex:-1,title:n,onClick:s,...t})});oe.displayName="SidebarRail";const se=i.forwardRef(({className:e,dataHook:r,trackingEl:t,trackingLabel:o,...s},n)=>a.jsx("main",{ref:n,className:l.cn("bg-background relative flex min-h-svh flex-1 flex-col",e),"data-hook":r,"data-slot":"sidebar-inset","data-tracking-el":t||"sidebar-inset","data-tracking-label":o,...s}));se.displayName="SidebarInset";const ne=i.forwardRef(({className:e,...r},t)=>a.jsx(_e.Input,{ref:t,className:l.cn("bg-background h-8 w-full shadow-none",v,e),"data-slot":"sidebar-input",dataHook:"sidebar-input",...r}));ne.displayName="SidebarInput";const ie=i.forwardRef(({className:e,dataHook:r,...t},o)=>a.jsx("header",{ref:o,className:l.cn("pr-section-xs flex flex-col gap-2 pt-2 pb-9 pl-8",e),"data-hook":r,"data-slot":"sidebar-header",...t}));ie.displayName="SidebarHeader";const de=i.forwardRef(({className:e,dataHook:r,...t},o)=>a.jsx("footer",{ref:o,className:l.cn("flex flex-col gap-2 p-2",e),"data-hook":r,"data-slot":"sidebar-footer",...t}));de.displayName="SidebarFooter";const le=i.forwardRef(({className:e,...r},t)=>a.jsx(F.Separator,{ref:t,className:l.cn("bg-sidebar-border mx-2 my-5 w-auto group-data-[collapsible=icon]:mx-0",e),"data-slot":"sidebar-separator",...r}));le.displayName="SidebarSeparator";const ce=i.forwardRef(({className:e,dataHook:r,ariaLabel:t="Sidebar",children:o,...s},n)=>{const{isMobile:d}=y(),c=i.useCallback(u=>{const b=u?.querySelector('[data-slot="scroll-area-viewport"]');b&&(b.tabIndex=-1),typeof n=="function"?n(u):n&&(n.current=u)},[n]);return a.jsx(Te.ScrollArea,{ref:c,className:l.cn("min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden [&_[data-slot=scroll-area-viewport]>div]:block!",e),dataHook:r??"sidebar-content-scroll",scrollOrientation:d?"both":"vertical",...s,children:a.jsx("nav",{"aria-label":t,className:"flex flex-col gap-2","data-slot":"sidebar-content",children:o})})});ce.displayName="SidebarContent";const ue=i.forwardRef(({className:e,dataHook:r,...t},o)=>a.jsx("div",{ref:o,className:l.cn("relative flex w-full min-w-0 flex-col p-2",e),"data-hook":r,"data-slot":"sidebar-group",...t}));ue.displayName="SidebarGroup";const Ue=T.cva(["flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 outline-none transition-[margin,opacity] duration-200 ease-linear [&>svg]:shrink-0 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",v],{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"}}),be=i.forwardRef(({className:e,dataHook:r,asChild:t=!1,size:o="sm",variant:s="default",isOpen:n=!1,onToggle:d,onAction:c,children:u,...b},f)=>{const p=t?k.Slot:"div",x=()=>{s==="collapsible"&&d?d():s==="action"&&c&&c()},S=g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),x())};return a.jsxs(p,{ref:f,className:l.cn(Ue({size:o,variant:s}),e),"data-hook":r,"data-slot":"sidebar-group-label","data-variant":s,role:s!=="default"?"button":void 0,tabIndex:s!=="default"?0:void 0,onClick:s!=="default"?x:void 0,onKeyDown:s!=="default"?S:void 0,...b,children:[a.jsx("span",{children:u}),s==="collapsible"&&a.jsx(m.ChevronDown,{className:l.cn("shrink-0 transition-transform duration-200",n&&"rotate-180"),size:16}),s==="action"&&a.jsx(m.Plus,{className:"shrink-0",size:16})]})});be.displayName="SidebarGroupLabel";const pe=i.forwardRef(({className:e,asChild:r=!1,...t},o)=>{const s=r?k.Slot:"button";return a.jsx(s,{ref:o,className:l.cn("text-sidebar-foreground 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 [&>svg]:shrink-0",v,"after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),"data-slot":"sidebar-group-action",...t})});pe.displayName="SidebarGroupAction";const fe=i.forwardRef(({className:e,dataHook:r,...t},o)=>a.jsx("div",{ref:o,className:l.cn("w-full text-sm",e),"data-hook":r,"data-slot":"sidebar-group-content",...t}));fe.displayName="SidebarGroupContent";const me=i.forwardRef(({className:e,dataHook:r,...t},o)=>a.jsx("ul",{ref:o,className:l.cn("flex w-full min-w-0 flex-col gap-1",e),"data-hook":r,"data-slot":"sidebar-menu",...t}));me.displayName="SidebarMenu";const z=i.forwardRef(({className:e,dataHook:r,...t},o)=>a.jsx("li",{ref:o,className:l.cn("group/menu-item relative",e),"data-hook":r,"data-slot":"sidebar-menu-item",...t}));z.displayName="SidebarMenuItem";const xe=i.forwardRef(({type:e="caret",isActive:r=!1,className:t,...o},s)=>{const n={ref:s,className:l.cn("shrink-0 transition-transform",r&&e==="caret"&&"rotate-90",t),"data-slot":"sidebar-collapse-icon",...o};switch(e){case"horizontal":return a.jsx(m.ChevronRight,{...n});case"vertical":return a.jsx(m.ChevronDown,{...n});case"upDown":return a.jsx(m.ChevronsUpDown,{...n});case"plusMinus":return r?a.jsx(m.Minus,{...n}):a.jsx(m.Plus,{...n});case"dots":return a.jsx(m.Ellipsis,{...n});default:return a.jsx(m.ChevronRight,{...n})}});xe.displayName="SidebarCollapseIcon";const Ke=T.cva(["peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-full px-6 py-2 text-left text-sm font-medium outline-none transition-[color,background-color,border-color,box-shadow,opacity,width,height,padding] duration-150 ease-in-out hover:bg-sidebar-accent hover:text-sidebar-accent-foreground 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-semibold 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-of-type]:truncate [&>svg]:shrink-0 [&>svg]:opacity-70 data-[active=true]:[&>svg]:opacity-100 group-data-[collapsible=icon]:[&>span]:hidden group-data-[collapsible=icon]:[&>div]:hidden",v],{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",badge:"group-has-[[data-sidebar=menu-badge]]/menu-item:pr-16",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-background [&>svg]:opacity-100 hover:[&>svg]:bg-sidebar-foreground hover:[&>svg]:text-sidebar-background 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:"px-3 [&>[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-12 text-sm/4",sm:"h-7 text-xs/4",lg:"h-12 text-sm/4 group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"simple",size:"default"}}),A=i.forwardRef(({asChild:e=!1,isActive:r=!1,variant:t="simple",size:o="default",tooltip:s,className:n,dataHook:d,...c},u)=>{const b=e?k.Slot:"button",{isMobile:f,state:p}=y(),x=a.jsx(b,{ref:u,className:l.cn(Ke({variant:t,size:o}),n),"data-active":r,"data-hook":d,"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"}),a.jsxs(I.Tooltip,{children:[a.jsx(I.TooltipTrigger,{asChild:!0,children:x}),a.jsx(I.TooltipContent,{hideArrow:!0,...s,align:"center",className:l.cn("bg-foreground text-background border-none",s.className),hidden:p!=="collapsed"||f,side:"right",sideOffset:8})]})):x});A.displayName="SidebarMenuButton";const ge=i.forwardRef(({className:e,asChild:r=!1,showOnHover:t=!1,...o},s)=>{const n=r?k.Slot:"button";return a.jsx(n,{ref:s,className:l.cn("text-sidebar-foreground 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 [&>svg]:shrink-0",v,"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","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})});ge.displayName="SidebarMenuAction";const he=i.forwardRef(({className:e,...r},t)=>a.jsx("div",{ref:t,className:l.cn("text-sidebar-foreground pointer-events-none absolute inset-y-0 right-4 my-auto 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","group-data-[collapsible=icon]:hidden",e),"data-slot":"sidebar-menu-badge",...r}));he.displayName="SidebarMenuBadge";const ve=i.forwardRef(({className:e,showIcon:r=!1,...t},o)=>{const s=i.useId(),n=i.useMemo(()=>{let d=0;for(let c=0;c<s.length;c++)d=(d<<5)-d+s.charCodeAt(c),d|=0;return`${Math.abs(d)%40+50}%`},[s]);return a.jsxs("div",{ref:o,className:l.cn("flex h-8 items-center gap-2 rounded-md px-2",e),"data-slot":"sidebar-menu-skeleton",...t,children:[r&&a.jsx(G.Skeleton,{className:"size-4 rounded-md","data-slot":"sidebar-menu-skeleton-icon"}),a.jsx(G.Skeleton,{className:"h-4 max-w-[--skeleton-width] flex-1","data-slot":"sidebar-menu-skeleton-text",style:{"--skeleton-width":n}})]})});ve.displayName="SidebarMenuSkeleton";const Ve=T.cva("flex min-w-0 flex-col items-start gap-1 py-1 group-data-[collapsible=icon]:hidden",{variants:{variant:{default:"px-10",border:"border-l border-sidebar-border ml-10 pl-1 pr-10",indent:"px-10"}},defaultVariants:{variant:"border"}}),B=i.forwardRef(({className:e,variant:r="border",dataHook:t,...o},s)=>a.jsx("ul",{ref:s,className:l.cn(Ve({variant:r}),e),"data-hook":t,"data-slot":"sidebar-menu-sub",...o}));B.displayName="SidebarMenuSub";const Se=i.forwardRef(({dataHook:e,...r},t)=>a.jsx("li",{ref:t,"data-hook":e,"data-slot":"sidebar-menu-sub-item",...r}));Se.displayName="SidebarMenuSubItem";const we=i.forwardRef(({asChild:e=!1,size:r="md",isActive:t,className:o,dataHook:s,...n},d)=>{const c=e?k.Slot:"a";return a.jsx(c,{ref:d,className:l.cn("text-sidebar-foreground 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 items-center gap-2 overflow-hidden rounded-md px-2 transition-[color,background-color,box-shadow,opacity] duration-150 ease-in-out outline-none disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-of-type]:truncate [&>svg]:shrink-0",v,"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",r==="sm"&&"text-xs",r==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),"data-active":t,"data-hook":s,"data-size":r,"data-slot":"sidebar-menu-sub-button",...n})});we.displayName="SidebarMenuSubButton";function je({dataHook:e,className:r,children:t,defaultOpen:o,open:s,onOpenChange:n}){return a.jsx(z,{children:a.jsx(E.Accordion,{collapsible:!0,className:r,dataHook:e??"sidebar-menu-collapsible",defaultValue:o?"item":void 0,type:"single",value:s!==void 0?s?"item":"":void 0,onValueChange:n?d=>n(d==="item"):void 0,children:a.jsx(E.AccordionItem,{className:"group/collapsible border-none",value:"item",children:t})})})}je.displayName="SidebarMenuCollapsible";const Ne=i.forwardRef(({children:e,className:r,...t},o)=>a.jsx(ze.Trigger,{asChild:!0,children:a.jsxs(A,{ref:o,className:r,variant:"collapsible",...t,children:[e,a.jsx(m.ChevronRight,{"data-collapse-icon":!0,className:"opacity-100! transition-transform duration-200 ease-out group-data-[collapsible=icon]:hidden",size:12})]})}));Ne.displayName="SidebarMenuCollapsibleTrigger";const ye=i.forwardRef(({dataHook:e,children:r,...t},o)=>a.jsx(E.AccordionContent,{className:"p-0",children:a.jsx(B,{ref:o,dataHook:e,...t,children:r})}));ye.displayName="SidebarMenuCollapsibleContent";const ke=i.forwardRef(({className:e,dataHook:r="sidebar-drawer",trackingEl:t,trackingLabel:o,children:s,...n},d)=>a.jsx("div",{ref:d,className:e,"data-hook":r,"data-slot":"sidebar-drawer","data-tracking-el":t,"data-tracking-label":o,...n,children:a.jsx(P,{dataHook:`${r}-trigger`,children:a.jsx(m.Menu,{size:24})})}));ke.displayName="SidebarDrawer";const Me=i.forwardRef(({className:e,dataHook:r="sidebar-header-button",children:t,...o},s)=>a.jsx(H.Button,{ref:s,...o,iconOnly:!0,className:l.cn("hover:bg-sidebar-accent hover:text-sidebar-accent-foreground size-7 rounded-md shadow-none",v,e),"data-slot":"sidebar-header-button",dataHook:r,size:"sm",variant:"ghost",children:t}));Me.displayName="SidebarHeaderButton";const L=i.forwardRef(({className:e,dataHook:r="sidebar-popover-trigger",icon:t,triggerAriaLabel:o,children:s,...n},d)=>a.jsxs("button",{ref:d,"aria-label":o??"Switch workspace",className:l.cn("text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground flex items-center gap-2 rounded-md px-1.5 py-2 text-sm font-semibold transition-colors duration-200 ease-out outline-none",v,e),"data-hook":r,"data-slot":"sidebar-popover-trigger",type:"button",...n,children:[t&&a.jsx("span",{className:"bg-sidebar-primary text-sidebar-primary-foreground flex size-5 shrink-0 items-center justify-center rounded-md",children:t}),a.jsx("span",{className:"truncate",children:s}),a.jsx(m.ChevronDown,{className:"shrink-0 opacity-50",size:16})]}));L.displayName="SidebarPopoverTrigger";const D=i.forwardRef(({className:e,dataHook:r,icon:t,shortcut:o,children:s,...n},d)=>a.jsxs("button",{ref:d,className:l.cn("text-popover-foreground hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground flex h-10 w-full items-center gap-2 rounded-xs p-2 text-sm transition-colors duration-150 ease-in-out outline-none",v,e),"data-hook":r,"data-slot":"sidebar-popover-menu-item",type:"button",...n,children:[t&&a.jsx("span",{className:"border-border flex size-6 shrink-0 items-center justify-center rounded-xs border [&_svg]:size-4",children:t}),a.jsx("span",{className:"min-w-px flex-1 truncate text-left",children:s}),o&&a.jsx("span",{className:"text-popover-foreground/60 shrink-0 text-xs",children:o})]}));D.displayName="SidebarPopoverMenuItem";const Ce=i.forwardRef(({className:e,dataHook:r="sidebar-popover-menu",groupTitle:t="Teams",items:o,addActionLabel:s,addActionIcon:n,onAddAction:d,children:c,...u},b)=>a.jsx("div",{ref:b,className:l.cn("flex flex-col",e),"data-hook":r,"data-slot":"sidebar-popover-menu",...u,children:c||a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex flex-col items-start p-1",children:[t&&a.jsx("div",{className:"flex w-full items-center px-2 py-1.5",children:a.jsx("span",{className:"text-muted-foreground flex-1 text-xs font-medium",children:t})}),o?.map((f,p)=>a.jsx(D,{icon:f.icon,shortcut:f.shortcut,onClick:f.onClick,children:f.label},p))]}),d&&a.jsxs(a.Fragment,{children:[a.jsx(F.Separator,{}),a.jsx("div",{className:"flex flex-col items-start p-1",children:a.jsx(D,{icon:n||a.jsx(m.Plus,{size:16}),onClick:d,children:s??"Add team"})})]})]})}));Ce.displayName="SidebarPopoverMenu";function Re({dataHook:e="sidebar-switcher",icon:r,label:t,triggerAriaLabel:o,triggerClassName:s,children:n}){return a.jsxs(_.Popover,{children:[a.jsx(_.PopoverTrigger,{asChild:!0,children:a.jsx(L,{className:s,dataHook:`${e}-trigger`,icon:r,triggerAriaLabel:o,children:t})}),a.jsx(_.PopoverContent,{align:"start",className:"w-[316px] p-0",dataHook:`${e}-content`,side:"bottom",sideOffset:4,children:n})]})}Re.displayName="SidebarSwitcher";function Ie({dataHook:e="sidebar-account-dropdown",name:r,email:t,avatar:o,menuGroups:s,triggerAriaLabel:n,align:d="end",side:c="top",children:u}){return a.jsxs(N.DropdownMenu,{children:[a.jsx(N.DropdownMenuTrigger,{asChild:!0,children:a.jsxs(A,{"aria-label":n??"Account menu",className:"h-auto py-1.5",dataHook:`${e}-button`,size:"lg",children:[o,a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5 leading-none",children:[a.jsx("span",{className:"truncate text-sm font-semibold",children:r}),a.jsx("span",{className:"truncate text-xs font-normal",children:t})]})]})}),a.jsx(N.DropdownMenuContent,{align:d,className:"w-56",dataHook:`${e}-content`,side:c,sideOffset:4,children:u||a.jsxs(a.Fragment,{children:[a.jsxs(N.DropdownMenuLabel,{className:"flex items-center gap-2 px-1 py-1.5",children:[o,a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5 leading-none",children:[a.jsx("span",{className:"truncate text-sm font-semibold",children:r}),a.jsx("span",{className:"truncate text-xs font-normal",children:t})]})]}),s?.map((b,f)=>a.jsxs(i.Fragment,{children:[a.jsx(N.DropdownMenuSeparator,{}),b.map((p,x)=>a.jsxs(N.DropdownMenuItem,{onClick:p.onClick,children:[p.icon,p.label]},x))]},f))]})})]})}Ie.displayName="SidebarAccountDropdown";const De=i.forwardRef(({className:e,dataHook:r,senderName:t,title:o,description:s,timestamp:n,...d},c)=>a.jsxs("button",{ref:c,className:l.cn("border-sidebar-border text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent flex w-full flex-col gap-2 border-b p-4 text-left transition-colors duration-150 ease-in-out outline-none",v,e),"data-hook":r,"data-slot":"sidebar-inbox-item",type:"button",...d,children:[a.jsxs("div",{className:"flex w-full items-center justify-between text-sm",children:[a.jsx("span",{children:t}),n&&a.jsx("span",{children:n})]}),a.jsx("p",{className:"w-full text-sm font-medium",children:o}),s&&a.jsx("p",{className:"w-full truncate text-xs",children:s})]}));De.displayName="SidebarInboxItem";exports.Sidebar=re;exports.SidebarAccountDropdown=Ie;exports.SidebarCollapseIcon=xe;exports.SidebarCollapseIconType=ee;exports.SidebarCollapsible=$;exports.SidebarContent=ce;exports.SidebarDrawer=ke;exports.SidebarFooter=de;exports.SidebarGroup=ue;exports.SidebarGroupAction=pe;exports.SidebarGroupContent=fe;exports.SidebarGroupLabel=be;exports.SidebarGroupLabelSize=W;exports.SidebarGroupLabelVariant=X;exports.SidebarHeader=ie;exports.SidebarHeaderButton=Me;exports.SidebarInboxItem=De;exports.SidebarInput=ne;exports.SidebarInset=se;exports.SidebarMenu=me;exports.SidebarMenuAction=ge;exports.SidebarMenuBadge=he;exports.SidebarMenuButton=A;exports.SidebarMenuButtonSize=Z;exports.SidebarMenuButtonVariant=Y;exports.SidebarMenuCollapsible=je;exports.SidebarMenuCollapsibleContent=ye;exports.SidebarMenuCollapsibleTrigger=Ne;exports.SidebarMenuItem=z;exports.SidebarMenuSkeleton=ve;exports.SidebarMenuSub=B;exports.SidebarMenuSubButton=we;exports.SidebarMenuSubButtonSize=Q;exports.SidebarMenuSubItem=Se;exports.SidebarMenuSubVariant=J;exports.SidebarPopoverMenu=Ce;exports.SidebarPopoverMenuItem=D;exports.SidebarPopoverTrigger=L;exports.SidebarProvider=te;exports.SidebarRail=oe;exports.SidebarSeparator=le;exports.SidebarSide=K;exports.SidebarSwitcher=Re;exports.SidebarTrigger=P;exports.SidebarVariant=V;exports.useSidebar=y;