@keboola/design 11.6.0 → 11.9.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 (162) hide show
  1. package/AGENTS.md +16 -1
  2. package/CHANGELOG.md +92 -0
  3. package/COMPONENT-API.md +47 -46
  4. package/README.md +1 -1
  5. package/dist/{AIKit-BExvt9pt.js → AIKit-ELIsegJz.js} +551 -104
  6. package/dist/AIKit-ELIsegJz.js.map +1 -0
  7. package/dist/{Alert-Ba5b2YPq.js → Alert-BsIM_oFK.js} +2 -2
  8. package/dist/{Alert-Ba5b2YPq.js.map → Alert-BsIM_oFK.js.map} +1 -1
  9. package/dist/{Badge-D0pXdekt.js → Badge-o5jURtpB.js} +2 -2
  10. package/dist/{Badge-D0pXdekt.js.map → Badge-o5jURtpB.js.map} +1 -1
  11. package/dist/{BrandEditor-CSANsxUz.js → BrandEditor-BsTBM3s6.js} +5 -5
  12. package/dist/{BrandEditor-CSANsxUz.js.map → BrandEditor-BsTBM3s6.js.map} +1 -1
  13. package/dist/{Breadcrumb-g_xn_-Nf.js → Breadcrumb-xqEUxfwn.js} +2 -2
  14. package/dist/{Breadcrumb-g_xn_-Nf.js.map → Breadcrumb-xqEUxfwn.js.map} +1 -1
  15. package/dist/{Checkbox-CUIn2jap.js → Checkbox-Dq5fPNrO.js} +2 -2
  16. package/dist/{Checkbox-CUIn2jap.js.map → Checkbox-Dq5fPNrO.js.map} +1 -1
  17. package/dist/{Clipboard-BTW6C-b_.js → Clipboard-BZitKiSA.js} +2 -2
  18. package/dist/{Clipboard-BTW6C-b_.js.map → Clipboard-BZitKiSA.js.map} +1 -1
  19. package/dist/{ClipboardButton-CwZJdRaz.js → ClipboardButton-KHQnPEh_.js} +2 -2
  20. package/dist/{ClipboardButton-CwZJdRaz.js.map → ClipboardButton-KHQnPEh_.js.map} +1 -1
  21. package/dist/{CodeEditor-C9zy7PxK.js → CodeEditor-BJKJXA0c.js} +4 -4
  22. package/dist/{CodeEditor-C9zy7PxK.js.map → CodeEditor-BJKJXA0c.js.map} +1 -1
  23. package/dist/{ColorInput-BZV-u_94.js → ColorInput-Bj3dfPFA.js} +3 -3
  24. package/dist/{ColorInput-BZV-u_94.js.map → ColorInput-Bj3dfPFA.js.map} +1 -1
  25. package/dist/{ColorModeSwitch-CsWLiTBX.js → ColorModeSwitch-CWt-DZGC.js} +2 -2
  26. package/dist/{ColorModeSwitch-CsWLiTBX.js.map → ColorModeSwitch-CWt-DZGC.js.map} +1 -1
  27. package/dist/{Combobox-BfIfaVMA.js → Combobox-D8PrEqTG.js} +4 -4
  28. package/dist/{Combobox-BfIfaVMA.js.map → Combobox-D8PrEqTG.js.map} +1 -1
  29. package/dist/{Command-Bfa1kpbt.js → Command-BDU3C1gg.js} +2 -2
  30. package/dist/{Command-Bfa1kpbt.js.map → Command-BDU3C1gg.js.map} +1 -1
  31. package/dist/{CopyField-DpT0Ngz1.js → CopyField-BHRQUyuF.js} +2 -2
  32. package/dist/{CopyField-DpT0Ngz1.js.map → CopyField-BHRQUyuF.js.map} +1 -1
  33. package/dist/{DateInput-DiEd5uCL.js → DateInput-B6N8g0ra.js} +3 -3
  34. package/dist/{DateInput-DiEd5uCL.js.map → DateInput-B6N8g0ra.js.map} +1 -1
  35. package/dist/{DateRangeInput-DPfVYchl.js → DateRangeInput-7M9Z4cVO.js} +3 -3
  36. package/dist/{DateRangeInput-DPfVYchl.js.map → DateRangeInput-7M9Z4cVO.js.map} +1 -1
  37. package/dist/{DropdownMenu-CASr-jgl.js → DropdownMenu-CgVwhDvl.js} +9 -4
  38. package/dist/DropdownMenu-CgVwhDvl.js.map +1 -0
  39. package/dist/{FieldItem-B7XMmZSz.js → FieldItem-DZGIdiXE.js} +3 -3
  40. package/dist/{FieldItem-B7XMmZSz.js.map → FieldItem-DZGIdiXE.js.map} +1 -1
  41. package/dist/{FileUpload-ABThVZyg.js → FileUpload-DYQCTGjU.js} +3 -3
  42. package/dist/{FileUpload-ABThVZyg.js.map → FileUpload-DYQCTGjU.js.map} +1 -1
  43. package/dist/{Form-CsttTHn4.js → Form-CcK7dRrC.js} +5 -5
  44. package/dist/{Form-CsttTHn4.js.map → Form-CcK7dRrC.js.map} +1 -1
  45. package/dist/{FormGroup-DHvTFdno.js → FormGroup-DR_gZ25-.js} +3 -3
  46. package/dist/{FormGroup-DHvTFdno.js.map → FormGroup-DR_gZ25-.js.map} +1 -1
  47. package/dist/{InputGroup-DcZRlVnN.js → InputGroup-Do8K2hvD.js} +2 -1
  48. package/dist/InputGroup-Do8K2hvD.js.map +1 -0
  49. package/dist/{Kbd-Cvvt91Q8.js → Kbd-LCFMumoq.js} +2 -2
  50. package/dist/{Kbd-Cvvt91Q8.js.map → Kbd-LCFMumoq.js.map} +1 -1
  51. package/dist/{MermaidDiagram-DSI7xMu2.js → MermaidDiagram-ZG0iiDV_.js} +2 -2
  52. package/dist/{MermaidDiagram-DSI7xMu2.js.map → MermaidDiagram-ZG0iiDV_.js.map} +1 -1
  53. package/dist/{Modal-Coj-H02o.js → Modal-I3VWk2oo.js} +2 -2
  54. package/dist/{Modal-Coj-H02o.js.map → Modal-I3VWk2oo.js.map} +1 -1
  55. package/dist/{ModalTitle-C76ke2eo.js → ModalTitle-CeLM_mX9.js} +2 -2
  56. package/dist/ModalTitle-CeLM_mX9.js.map +1 -0
  57. package/dist/{MultiActionButtonGroup-DokHbPgM.js → MultiActionButtonGroup-CYZ8IgSf.js} +2 -2
  58. package/dist/{MultiActionButtonGroup-DokHbPgM.js.map → MultiActionButtonGroup-CYZ8IgSf.js.map} +1 -1
  59. package/dist/{PageToolbar-DExqEYGl.js → PageToolbar-BKVJiDAL.js} +2 -2
  60. package/dist/{PageToolbar-DExqEYGl.js.map → PageToolbar-BKVJiDAL.js.map} +1 -1
  61. package/dist/{RadioGroup-DXPbSj8P.js → RadioGroup-Byc2mym4.js} +2 -2
  62. package/dist/{RadioGroup-DXPbSj8P.js.map → RadioGroup-Byc2mym4.js.map} +1 -1
  63. package/dist/{Search-5uQAiNIP.js → Search-Dhig_hPD.js} +2 -2
  64. package/dist/{Search-5uQAiNIP.js.map → Search-Dhig_hPD.js.map} +1 -1
  65. package/dist/{SearchInput-D4UgAXJK.js → SearchInput-92r2bkA7.js} +3 -3
  66. package/dist/{SearchInput-D4UgAXJK.js.map → SearchInput-92r2bkA7.js.map} +1 -1
  67. package/dist/{SectionNav-OkKCjSA-.js → SectionNav-CNLJsiVG.js} +4 -4
  68. package/dist/{SectionNav-OkKCjSA-.js.map → SectionNav-CNLJsiVG.js.map} +1 -1
  69. package/dist/{Sheet-Chf0kX1E.js → Sheet-OparjIi-.js} +2 -2
  70. package/dist/{Sheet-Chf0kX1E.js.map → Sheet-OparjIi-.js.map} +1 -1
  71. package/dist/{Sidebar-D3cY1kha.js → Sidebar-CLEbBtNY.js} +190 -25
  72. package/dist/Sidebar-CLEbBtNY.js.map +1 -0
  73. package/dist/{Slider-CRf-bB4y.js → Slider-DLclvRws.js} +2 -2
  74. package/dist/{Slider-CRf-bB4y.js.map → Slider-DLclvRws.js.map} +1 -1
  75. package/dist/{TextInput-DH5SkbsE.js → TextInput-CFTf4Cz1.js} +5 -4
  76. package/dist/TextInput-CFTf4Cz1.js.map +1 -0
  77. package/dist/{ThemeProvider-2RMdVGxO.js → ThemeProvider-DAmNn9Sd.js} +2 -2
  78. package/dist/{ThemeProvider-2RMdVGxO.js.map → ThemeProvider-DAmNn9Sd.js.map} +1 -1
  79. package/dist/{Timeline-BG5Xogxh.js → Timeline-C8-wnRRr.js} +2 -2
  80. package/dist/{Timeline-BG5Xogxh.js.map → Timeline-C8-wnRRr.js.map} +1 -1
  81. package/dist/{ZoomableSvg-pooPb1Cu.js → ZoomableSvg-BZlk3PFJ.js} +3 -3
  82. package/dist/{ZoomableSvg-pooPb1Cu.js.map → ZoomableSvg-BZlk3PFJ.js.map} +1 -1
  83. package/dist/editors.js +2 -2
  84. package/dist/flint.js +1 -1
  85. package/dist/index.d.ts +900 -561
  86. package/dist/index.js +39 -37
  87. package/dist/internal/blocks/AIKit.js +2 -2
  88. package/dist/internal/blocks/BrandEditor.js +1 -1
  89. package/dist/internal/blocks/ChipEditor.js +137 -0
  90. package/dist/internal/blocks/ChipEditor.js.map +1 -0
  91. package/dist/internal/blocks/ClipboardButton.js +1 -1
  92. package/dist/internal/blocks/ColorInput.js +1 -1
  93. package/dist/internal/blocks/ColorModeSwitch.js +1 -1
  94. package/dist/internal/blocks/Command.js +1 -1
  95. package/dist/internal/blocks/CopyField.js +1 -1
  96. package/dist/internal/blocks/DateInput.js +1 -1
  97. package/dist/internal/blocks/DateRangeInput.js +1 -1
  98. package/dist/internal/blocks/ExportMenu.js +2 -2
  99. package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +1 -1
  100. package/dist/internal/blocks/Form.js +1 -1
  101. package/dist/internal/blocks/FormGroup.js +1 -1
  102. package/dist/internal/blocks/MultiActionButtonGroup.js +1 -1
  103. package/dist/internal/blocks/MultiCombobox.js +18 -28
  104. package/dist/internal/blocks/MultiCombobox.js.map +1 -1
  105. package/dist/internal/blocks/NumberInput.js +1 -1
  106. package/dist/internal/blocks/PageToolbar.js +1 -1
  107. package/dist/internal/blocks/PasswordInput.js +2 -2
  108. package/dist/internal/blocks/SearchInput.js +1 -1
  109. package/dist/internal/blocks/SearchInputWithNavigation.js +2 -2
  110. package/dist/internal/blocks/SectionNav.js +1 -1
  111. package/dist/internal/blocks/SplitButton.js +1 -1
  112. package/dist/internal/blocks/TextInput.js +1 -1
  113. package/dist/internal/blocks/Textarea.js +1 -1
  114. package/dist/internal/blocks/TimeInput.js +2 -2
  115. package/dist/internal/components/Alert.js +1 -1
  116. package/dist/internal/components/Avatar.js +1 -1
  117. package/dist/internal/components/Badge.js +1 -1
  118. package/dist/internal/components/Breadcrumb.js +1 -1
  119. package/dist/internal/components/Checkbox.js +1 -1
  120. package/dist/internal/components/Clipboard.js +1 -1
  121. package/dist/internal/components/CollapsiblePanel.js +1 -1
  122. package/dist/internal/components/Combobox.js +1 -1
  123. package/dist/internal/components/DropdownMenu.js +1 -1
  124. package/dist/internal/components/FileUpload.js +1 -1
  125. package/dist/internal/components/InputGroup.js +1 -1
  126. package/dist/internal/components/Kbd.js +1 -1
  127. package/dist/internal/components/Modal.js +1 -1
  128. package/dist/internal/components/RadioGroup.js +1 -1
  129. package/dist/internal/components/Search.js +1 -1
  130. package/dist/internal/components/Sheet.js +1 -1
  131. package/dist/internal/components/Sidebar.js +1 -1
  132. package/dist/internal/components/Slider.js +1 -1
  133. package/dist/internal/components/StatusDot.js +67 -0
  134. package/dist/internal/components/StatusDot.js.map +1 -0
  135. package/dist/internal/components/ThemeProvider.js +1 -1
  136. package/dist/internal/components/Timeline.js +1 -1
  137. package/dist/internal/components/Tooltip.js +2 -2
  138. package/dist/internal/components/Truncated.js +1 -1
  139. package/dist/internal/components/ZoomableSvg.js +1 -1
  140. package/dist/internal/hooks/useScrollbarPosition.js +1 -1
  141. package/dist/internal/utils/mergeRefs.js +27 -9
  142. package/dist/internal/utils/mergeRefs.js.map +1 -1
  143. package/dist/internal/utils.js +2 -2
  144. package/dist/markdown-editor.js +5 -5
  145. package/dist/mermaid.js +1 -1
  146. package/dist/rjsf.js +9 -9
  147. package/dist/styles.css +1 -1
  148. package/dist/testing.js +1 -1
  149. package/dist/useElement-BK3AAiIf.js +24 -0
  150. package/dist/useElement-BK3AAiIf.js.map +1 -0
  151. package/dist/{utils-DSvrhU8E.js → utils-BW4AE8VP.js} +33 -7
  152. package/dist/utils-BW4AE8VP.js.map +1 -0
  153. package/package.json +14 -13
  154. package/dist/AIKit-BExvt9pt.js.map +0 -1
  155. package/dist/DropdownMenu-CASr-jgl.js.map +0 -1
  156. package/dist/InputGroup-DcZRlVnN.js.map +0 -1
  157. package/dist/ModalTitle-C76ke2eo.js.map +0 -1
  158. package/dist/Sidebar-D3cY1kha.js.map +0 -1
  159. package/dist/TextInput-DH5SkbsE.js.map +0 -1
  160. package/dist/useElement-DkF6esWL.js +0 -15
  161. package/dist/useElement-DkF6esWL.js.map +0 -1
  162. package/dist/utils-DSvrhU8E.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SectionNav-OkKCjSA-.js","names":[],"sources":["../src/blocks/SectionNav/SectionNavItemContent.tsx","../src/blocks/SectionNav/SectionNavGroupRow.tsx","../src/blocks/SectionNav/SectionNav.tsx"],"sourcesContent":["import { Badge } from '../../components/Badge';\nimport { ChevronDown } from '../../icons';\nimport { cn } from '../../utils';\n\nimport type { SectionNavItem } from './types';\n\ntype Props = {\n item: SectionNavItem;\n /** Tints the title. */\n active: boolean;\n showDescription?: boolean;\n /** Group rows only — renders the chevron, pointing the way the list is about to move. */\n expanded?: boolean;\n /**\n * Sub-section rows pass `false`. A group's icon stands for the group, and repeating a glyph on\n * each indented child turns a short list into a column of competing marks: the indent and the\n * rule already say these belong to the row above. An item may still carry an `icon` for surfaces\n * that flatten the tree, such as a tab row, where every destination is top level.\n */\n showIcon?: boolean;\n};\n\n/**\n * One row's body, rendered identically in the tree and in the collapsed dropdown — same title, same\n * badge, same description. Shared rather than written twice so the two cannot drift.\n */\nexport const SectionNavItemContent = ({\n item,\n active,\n showDescription = false,\n expanded,\n showIcon = true,\n}: Props) => {\n const Icon = item.icon;\n\n return (\n <span className=\"tw:flex tw:min-w-0 tw:flex-1 tw:flex-col tw:gap-0.5\">\n <span className=\"tw:flex tw:items-center tw:gap-2\">\n {showIcon && Icon && <Icon className=\"tw:size-4 tw:shrink-0\" />}\n <span\n className={cn(\n 'tw:flex-1 tw:truncate tw:text-sm',\n active ? 'tw:font-medium tw:text-accent-foreground' : 'tw:text-foreground',\n )}\n >\n {item.title}\n </span>\n {item.isNew && (\n <Badge\n color=\"blue-inverse\"\n className=\"tw:min-h-0 tw:text-[10px]\"\n labelClassName=\"tw:px-1.5 tw:py-0\"\n >\n New\n </Badge>\n )}\n {expanded !== undefined && (\n <ChevronDown\n className={cn(\n 'tw:size-4 tw:shrink-0 tw:text-muted-foreground tw:transition-transform tw:duration-200',\n expanded && 'tw:rotate-180',\n )}\n />\n )}\n </span>\n {/* Descriptions wrap rather than truncate — they are the second line, not the label. A token\n with no break opportunity would still paint straight out of the 256px column, so break it. */}\n {showDescription && item.description && (\n <span className=\"tw:text-xs tw:break-words tw:text-muted-foreground\">\n {item.description}\n </span>\n )}\n </span>\n );\n};\n","import { useState } from 'react';\nimport type { MouseEvent, ReactNode } from 'react';\n\nimport { Collapsible } from '../../components/Collapsible';\nimport { cn, noop } from '../../utils';\n\nimport { SectionNavItemContent } from './SectionNavItemContent';\nimport type { SectionNavGroup, SectionNavItemRenderProps } from './types';\n\ntype Props = {\n group: SectionNavGroup;\n activeId: string | undefined;\n renderItem: (props: SectionNavItemRenderProps) => ReactNode;\n showDescriptions: boolean;\n};\n\n/**\n * The ring is **inset**, not an outline. A row is exactly as wide as the nav column, and\n * `PageLayout.Content nav` makes that column a scroll container (`overflow-y-auto`, which forces\n * `overflow-x` to `auto` too) — so there is 0px of slack for anything painted outside the border\n * box, and the browser's default `outline-offset: 1px` ring gets clipped on both edges. Painting\n * inside the box cannot be clipped, at any column width, by any ancestor.\n */\nconst FOCUS_RING =\n 'tw:focus-visible:outline-hidden tw:focus-visible:ring-2 tw:focus-visible:ring-inset tw:focus-visible:ring-ring';\n\nconst rowClass = (active: boolean) =>\n cn(\n 'tw:flex tw:w-full tw:cursor-pointer tw:items-center tw:gap-2 tw:rounded-md tw:border-none tw:px-3 tw:py-2 tw:text-left tw:text-sm tw:no-underline tw:transition-colors',\n FOCUS_RING,\n active\n ? 'tw:bg-accent tw:font-medium tw:text-accent-foreground'\n : 'tw:bg-transparent tw:text-foreground tw:hover:bg-muted',\n );\n\nconst childRowClass = (active: boolean) =>\n cn(\n 'tw:flex tw:w-full tw:cursor-pointer tw:rounded-md tw:border-none tw:px-3 tw:py-1.5 tw:text-left tw:no-underline tw:transition-colors',\n FOCUS_RING,\n active ? 'tw:bg-accent' : 'tw:bg-transparent tw:hover:bg-muted',\n );\n\n/**\n * One group row and its sub-sections. The row is a single control: it opens the group **and** goes to\n * its first section, and only collapses once you are already there — so the chevron never becomes a\n * separate thing to aim at, and one click always makes progress.\n */\nexport const SectionNavGroupRow = ({ group, activeId, renderItem, showDescriptions }: Props) => {\n // Open on arrival: the nav is short enough that hiding any of it costs more than it saves.\n const [open, setOpen] = useState(true);\n\n const hasChildren = group.children.length > 0;\n const targetId = group.children[0]?.id ?? group.id;\n const isCurrent = group.id === activeId;\n const holdsCurrent = isCurrent || group.children.some((child) => child.id === activeId);\n\n const onClick = (event: MouseEvent<HTMLElement>) => {\n if (!hasChildren) return;\n\n // Already on the row's target, so navigating would be a no-op and the only thing left for the\n // click to do is toggle. `preventDefault` is what tells the caller's link not to navigate.\n if (activeId === targetId) {\n event.preventDefault();\n setOpen((isOpen) => !isOpen);\n\n return;\n }\n\n setOpen(true);\n };\n\n return (\n <Collapsible open={open} onOpenChange={setOpen} className=\"tw:flex tw:flex-col tw:gap-0.5\">\n {renderItem({\n targetId,\n isActive: isCurrent,\n children: (\n <SectionNavItemContent\n item={group}\n active={holdsCurrent}\n expanded={hasChildren ? open : undefined}\n />\n ),\n itemProps: {\n className: rowClass(holdsCurrent),\n 'aria-current': isCurrent ? 'page' : undefined,\n 'aria-expanded': hasChildren ? open : undefined,\n 'data-active': holdsCurrent && !isCurrent ? true : undefined,\n onClick,\n },\n })}\n\n {hasChildren && (\n <Collapsible.Content>\n {/* `pl-1` keeps each row's background box off the group's rule — without it an active\n row's `bg-accent` sits flush against the line. 4px is also what lines the child titles\n (20 + 1 + 4 + 12 = 37px) up with the parent's, which its icon puts at 12 + 16 + 8 = 36px. */}\n {/* `my-0 mr-0` and not `m-0`: a host app emits its own `.tw\\:m-0` from its own source, and\n its stylesheet is the later one — shorthand and longhand at equal specificity means the\n app's `m-0` would land after this `ml-5` and flatten the indent. Longhands only, so\n nothing here can be overridden by a copy of a class this block also uses. */}\n <ul className=\"tw:my-0 tw:mr-0 tw:ml-5 tw:flex tw:list-none tw:flex-col tw:gap-0.5 tw:border-l tw:border-border tw:py-0.5 tw:pl-1\">\n {group.children.map((child) => {\n const active = child.id === activeId;\n\n return (\n <li key={child.id}>\n {renderItem({\n targetId: child.id,\n isActive: active,\n children: (\n <SectionNavItemContent\n item={child}\n active={active}\n showDescription={showDescriptions}\n showIcon={false}\n />\n ),\n itemProps: {\n className: childRowClass(active),\n 'aria-current': active ? 'page' : undefined,\n 'aria-expanded': undefined,\n 'data-active': undefined,\n onClick: noop,\n },\n })}\n </li>\n );\n })}\n {group.note && (\n <li className=\"tw:py-1 tw:pl-3 tw:text-xs tw:text-muted-foreground\">{group.note}</li>\n )}\n </ul>\n </Collapsible.Content>\n )}\n </Collapsible>\n );\n};\n","import type { ReactNode } from 'react';\n\nimport { Button } from '../../components/Button';\nimport { DropdownMenu } from '../../components/DropdownMenu';\nimport { ChevronDown } from '../../icons';\nimport { cn, noop } from '../../utils';\n\nimport { SectionNavGroupRow } from './SectionNavGroupRow';\nimport { SectionNavItemContent } from './SectionNavItemContent';\nimport type { SectionNavGroup, SectionNavItemRenderProps } from './types';\n\ntype Props = {\n /**\n * The sections to show, already filtered. Visibility, permissions and feature flags stay in the\n * app — this block renders exactly what it is handed, in order.\n */\n groups: SectionNavGroup[];\n /** `id` of the current section: a child's, or a childless group's. */\n activeId?: string;\n /**\n * Renders the clickable element for one row, so routing never enters the design system. Return a\n * `NavLink` / TanStack `Link` / `<a>` pointing at `targetId` and spread `itemProps` onto it.\n */\n renderItem: (props: SectionNavItemRenderProps) => ReactNode;\n /** Print each section's `description` under its title. Off — the tree stays scannable without it. */\n showDescriptions?: boolean;\n /** Accessible name for the tree's `<nav>`, and the collapsed label with nothing active. */\n label?: string;\n /** Applied to the tree's `<nav>`. The column's own geometry belongs to `PageLayout.Content nav`. */\n className?: string;\n};\n\n/**\n * In-page grouped navigation for one page's sections: a tree above the container's breakpoint, a\n * single dropdown below it. Both are rendered and CSS picks one, and both draw their rows through\n * the same renderer, so the two can never drift apart.\n *\n * **This is not `Sidebar`.** `Sidebar` is the app-level left rail — `SidebarProvider`, icon-collapse,\n * one per app shell, outside `PageLayout`. `SectionNav` is scoped to a single page's sections, lives\n * inside `PageLayout.Content`, and owns no global state. See `AGENTS.md`.\n *\n * **Router-agnostic:** `renderItem` is the seam. Pass it whatever your router calls a link.\n *\n * ```tsx\n * <PageLayout.Content nav={\n * <SectionNav\n * groups={groups}\n * activeId={activeId}\n * renderItem={({ targetId, children, itemProps }) => (\n * <Link to={targetId} {...itemProps}>{children}</Link>\n * )}\n * />\n * }>\n * {page}\n * </PageLayout.Content>\n * ```\n *\n * The tree↔dropdown switch is a **container** query on the content area's width, never the viewport\n * — a product sidebar or a chat panel narrows the page without the window resizing.\n * `PageLayout.Content nav={…}` names that container; standalone, put `tw:@container/section-nav` on\n * an ancestor yourself.\n *\n * @see RECIPES.md#section-nav\n */\nexport const SectionNav = ({\n groups,\n activeId,\n renderItem,\n showDescriptions = false,\n label = 'Sections',\n className,\n}: Props) => {\n /**\n * What the collapsed trigger names. A sub-section carries its group with it — \"Developer settings /\n * CLI agents\" — so the trigger says where you are, not just what page this is.\n */\n const activeChild = groups\n .flatMap((group) => group.children.map((child) => ({ group, child })))\n .find(({ child }) => child.id === activeId);\n const activeGroup = groups.find((group) => group.id === activeId);\n const current = activeChild\n ? {\n icon: activeChild.group.icon,\n title: activeChild.child.title,\n parent: activeChild.group.title,\n }\n : { icon: activeGroup?.icon, title: activeGroup?.title ?? label, parent: undefined };\n const CurrentIcon = current.icon;\n /** A group whose subtree holds the active section: tinted like the tree's row, but not `aria-current`. */\n const holdsActive = (group: SectionNavGroup) =>\n group.id === activeId || group.children.some((child) => child.id === activeId);\n\n return (\n <>\n {/* The reset is scoped (`.tailwindcss-preflight`, see `styles.css`), and the rows are\n caller-owned elements — `renderItem` returns the app's own `<a>`, which never inherits a\n scope this block does not open. Without it those rows are `content-box`, so the `w-full`\n + `px-3` in `rowClass` measures 24px wider than the 256px column and every row bleeds out\n of it. Opening the scope here covers the whole tree, rows included. */}\n {/* `display` is set by TWO container variants and never by a plain utility. A host app that\n emits `tw:flex` or `tw:hidden` from its own source ships an identical `.tw\\:flex` /\n `.tw\\:hidden` rule — same specificity, same layer, and its stylesheet is the later one, so\n whichever of the two this block wrote plainly would lose to the app's copy and the tree\n would be stuck visible or stuck hidden. Both variants are selectors only this block emits,\n and their queries are mutually exclusive, so nothing outside can outrank them. */}\n <nav\n aria-label={label}\n className={cn(\n 'tailwindcss-preflight',\n 'tw:w-full tw:flex-col tw:gap-0.5 tw:@[640px]/section-nav:flex tw:@max-[640px]/section-nav:hidden',\n className,\n )}\n >\n {groups.map((group) => (\n <SectionNavGroupRow\n key={group.id}\n group={group}\n activeId={activeId}\n renderItem={renderItem}\n showDescriptions={showDescriptions}\n />\n ))}\n </nav>\n\n <div className=\"tw:w-full tw:bg-background tw:@[640px]/section-nav:hidden tw:@max-[640px]/section-nav:block\">\n <DropdownMenu>\n <DropdownMenu.Trigger asChild>\n <Button variant=\"outline\" className=\"tw:w-full tw:justify-between\">\n <span className=\"tw:flex tw:min-w-0 tw:items-center tw:gap-2\">\n {CurrentIcon && <CurrentIcon className=\"tw:size-4 tw:shrink-0\" />}\n {current.parent && (\n <>\n <span className=\"tw:truncate tw:font-normal tw:text-muted-foreground\">\n {current.parent}\n </span>\n <span className=\"tw:text-border\">/</span>\n </>\n )}\n <span className=\"tw:truncate tw:font-medium tw:text-foreground\">\n {current.title}\n </span>\n </span>\n <ChevronDown className=\"tw:size-4 tw:shrink-0\" />\n </Button>\n </DropdownMenu.Trigger>\n\n <DropdownMenu.Content\n align=\"start\"\n className=\"tw:w-(--radix-dropdown-menu-trigger-width)\"\n >\n {groups.map((group) =>\n group.children.length > 0 ? (\n <DropdownMenu.Group key={group.id}>\n {/* A real item, not a label: it is a destination in the tree (it goes to the\n group's first section), so a menu that made it unclickable would be a different\n navigation, not a smaller one. Same row treatment as every other item. */}\n <DropdownMenu.Item asChild>\n {renderItem({\n targetId: group.children[0]?.id ?? group.id,\n isActive: false,\n children: <SectionNavItemContent item={group} active={holdsActive(group)} />,\n itemProps: {\n className: 'tw:no-underline',\n 'aria-current': undefined,\n 'aria-expanded': undefined,\n 'data-active': holdsActive(group) ? true : undefined,\n onClick: noop,\n },\n })}\n </DropdownMenu.Item>\n <div className=\"tw:ml-5 tw:border-l tw:border-border tw:py-0.5 tw:pl-1\">\n {group.children.map((child) => (\n <DropdownMenu.Item key={child.id} asChild>\n {renderItem({\n targetId: child.id,\n isActive: child.id === activeId,\n children: (\n <SectionNavItemContent\n item={child}\n active={child.id === activeId}\n showDescription={showDescriptions}\n showIcon={false}\n />\n ),\n itemProps: {\n className: 'tw:no-underline',\n 'aria-current': child.id === activeId ? 'page' : undefined,\n 'aria-expanded': undefined,\n 'data-active': undefined,\n onClick: noop,\n },\n })}\n </DropdownMenu.Item>\n ))}\n </div>\n </DropdownMenu.Group>\n ) : (\n <DropdownMenu.Item key={group.id} asChild>\n {renderItem({\n targetId: group.id,\n isActive: group.id === activeId,\n children: <SectionNavItemContent item={group} active={group.id === activeId} />,\n itemProps: {\n className: 'tw:no-underline',\n 'aria-current': group.id === activeId ? 'page' : undefined,\n 'aria-expanded': undefined,\n 'data-active': undefined,\n onClick: noop,\n },\n })}\n </DropdownMenu.Item>\n ),\n )}\n </DropdownMenu.Content>\n </DropdownMenu>\n </div>\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AA0BA,MAAa,yBAAyB,EACpC,MACA,QACA,kBAAkB,OAClB,UACA,WAAW,WACA;CACX,MAAM,OAAO,KAAK;CAElB,OACE,qBAAC,QAAD;EAAM,WAAU;EAAhB,UAAA,CACE,qBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA;IACG,YAAY,QAAQ,oBAAC,MAAD,EAAM,WAAU,wBAAyB,CAAA;IAC9D,oBAAC,QAAD;KACE,WAAW,GACT,oCACA,SAAS,6CAA6C,oBACxD;KAEC,UAAA,KAAK;IACF,CAAA;IACL,KAAK,SACJ,oBAAC,OAAD;KACE,OAAM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aAAa,MAAd;KAAkC,SAAA;KAC/B,UAAA,WAAW;MACV,UAAU,MAAM;MAChB,UAAU,MAAM,OAAO;MACvB,UACE,oBAAC,uBAAD;OACE,MAAM;OACN,QAAQ,MAAM,OAAO;OACrB,iBAAiB;OACjB,UAAU;MACX,CAAA;MAEH,WAAW;OACT,WAAW;OACX,gBAAgB,MAAM,OAAO,WAAW,SAAS,KAAA;OACjD,iBAAiB,KAAA;OACjB,eAAe,KAAA;OACf,SAAS;MACX;KACF,CAAC;IACgB,GApBK,MAAM,EAoBX,CACpB;GACE,CAAA,CACa,EAAA,GA3CK,MAAM,EA2CX,IAEpB,oBAAC,aAAa,MAAd;IAAkC,SAAA;IAC/B,UAAA,WAAW;KACV,UAAU,MAAM;KAChB,UAAU,MAAM,OAAO;KACvB,UAAU,oBAAC,uBAAD;MAAuB,MAAM;MAAO,QAAQ,MAAM,OAAO;KAAW,CAAA;KAC9E,WAAW;MACT,WAAW;MACX,gBAAgB,MAAM,OAAO,WAAW,SAAS,KAAA;MACjD,iBAAiB,KAAA;MACjB,eAAe,KAAA;MACf,SAAS;KACX;IACF,CAAC;GACgB,GAbK,MAAM,EAaX,CAEvB;EACoB,CAAA,CACV,EAAA,CAAA;CACX,CAAA,CACL,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"SectionNav-CNLJsiVG.js","names":[],"sources":["../src/blocks/SectionNav/SectionNavItemContent.tsx","../src/blocks/SectionNav/SectionNavGroupRow.tsx","../src/blocks/SectionNav/SectionNav.tsx"],"sourcesContent":["import { Badge } from '../../components/Badge';\nimport { ChevronDown } from '../../icons';\nimport { cn } from '../../utils';\n\nimport type { SectionNavItem } from './types';\n\ntype Props = {\n item: SectionNavItem;\n /** Tints the title. */\n active: boolean;\n showDescription?: boolean;\n /** Group rows only — renders the chevron, pointing the way the list is about to move. */\n expanded?: boolean;\n /**\n * Sub-section rows pass `false`. A group's icon stands for the group, and repeating a glyph on\n * each indented child turns a short list into a column of competing marks: the indent and the\n * rule already say these belong to the row above. An item may still carry an `icon` for surfaces\n * that flatten the tree, such as a tab row, where every destination is top level.\n */\n showIcon?: boolean;\n};\n\n/**\n * One row's body, rendered identically in the tree and in the collapsed dropdown — same title, same\n * badge, same description. Shared rather than written twice so the two cannot drift.\n */\nexport const SectionNavItemContent = ({\n item,\n active,\n showDescription = false,\n expanded,\n showIcon = true,\n}: Props) => {\n const Icon = item.icon;\n\n return (\n <span className=\"tw:flex tw:min-w-0 tw:flex-1 tw:flex-col tw:gap-0.5\">\n <span className=\"tw:flex tw:items-center tw:gap-2\">\n {showIcon && Icon && <Icon className=\"tw:size-4 tw:shrink-0\" />}\n <span\n className={cn(\n 'tw:flex-1 tw:truncate tw:text-sm',\n active ? 'tw:font-medium tw:text-accent-foreground' : 'tw:text-foreground',\n )}\n >\n {item.title}\n </span>\n {item.isNew && (\n <Badge\n color=\"blue-inverse\"\n className=\"tw:min-h-0 tw:text-[10px]\"\n labelClassName=\"tw:px-1.5 tw:py-0\"\n >\n New\n </Badge>\n )}\n {expanded !== undefined && (\n <ChevronDown\n className={cn(\n 'tw:size-4 tw:shrink-0 tw:text-muted-foreground tw:transition-transform tw:duration-200',\n expanded && 'tw:rotate-180',\n )}\n />\n )}\n </span>\n {/* Descriptions wrap rather than truncate — they are the second line, not the label. A token\n with no break opportunity would still paint straight out of the 256px column, so break it. */}\n {showDescription && item.description && (\n <span className=\"tw:text-xs tw:break-words tw:text-muted-foreground\">\n {item.description}\n </span>\n )}\n </span>\n );\n};\n","import { useState } from 'react';\nimport type { MouseEvent, ReactNode } from 'react';\n\nimport { Collapsible } from '../../components/Collapsible';\nimport { cn, noop } from '../../utils';\n\nimport { SectionNavItemContent } from './SectionNavItemContent';\nimport type { SectionNavGroup, SectionNavItemRenderProps } from './types';\n\ntype Props = {\n group: SectionNavGroup;\n activeId: string | undefined;\n renderItem: (props: SectionNavItemRenderProps) => ReactNode;\n showDescriptions: boolean;\n};\n\n/**\n * The ring is **inset**, not an outline. A row is exactly as wide as the nav column, and\n * `PageLayout.Content nav` makes that column a scroll container (`overflow-y-auto`, which forces\n * `overflow-x` to `auto` too) — so there is 0px of slack for anything painted outside the border\n * box, and the browser's default `outline-offset: 1px` ring gets clipped on both edges. Painting\n * inside the box cannot be clipped, at any column width, by any ancestor.\n */\nconst FOCUS_RING =\n 'tw:focus-visible:outline-hidden tw:focus-visible:ring-2 tw:focus-visible:ring-inset tw:focus-visible:ring-ring';\n\nconst rowClass = (active: boolean) =>\n cn(\n 'tw:flex tw:w-full tw:cursor-pointer tw:items-center tw:gap-2 tw:rounded-md tw:border-none tw:px-3 tw:py-2 tw:text-left tw:text-sm tw:no-underline tw:transition-colors',\n FOCUS_RING,\n active\n ? 'tw:bg-accent tw:font-medium tw:text-accent-foreground'\n : 'tw:bg-transparent tw:text-foreground tw:hover:bg-muted',\n );\n\nconst childRowClass = (active: boolean) =>\n cn(\n 'tw:flex tw:w-full tw:cursor-pointer tw:rounded-md tw:border-none tw:px-3 tw:py-1.5 tw:text-left tw:no-underline tw:transition-colors',\n FOCUS_RING,\n active ? 'tw:bg-accent' : 'tw:bg-transparent tw:hover:bg-muted',\n );\n\n/**\n * One group row and its sub-sections. The row is a single control: it opens the group **and** goes to\n * its first section, and only collapses once you are already there — so the chevron never becomes a\n * separate thing to aim at, and one click always makes progress.\n */\nexport const SectionNavGroupRow = ({ group, activeId, renderItem, showDescriptions }: Props) => {\n // Open on arrival: the nav is short enough that hiding any of it costs more than it saves.\n const [open, setOpen] = useState(true);\n\n const hasChildren = group.children.length > 0;\n const targetId = group.children[0]?.id ?? group.id;\n const isCurrent = group.id === activeId;\n const holdsCurrent = isCurrent || group.children.some((child) => child.id === activeId);\n\n const onClick = (event: MouseEvent<HTMLElement>) => {\n if (!hasChildren) return;\n\n // Already on the row's target, so navigating would be a no-op and the only thing left for the\n // click to do is toggle. `preventDefault` is what tells the caller's link not to navigate.\n if (activeId === targetId) {\n event.preventDefault();\n setOpen((isOpen) => !isOpen);\n\n return;\n }\n\n setOpen(true);\n };\n\n return (\n <Collapsible open={open} onOpenChange={setOpen} className=\"tw:flex tw:flex-col tw:gap-0.5\">\n {renderItem({\n targetId,\n isActive: isCurrent,\n children: (\n <SectionNavItemContent\n item={group}\n active={holdsCurrent}\n expanded={hasChildren ? open : undefined}\n />\n ),\n itemProps: {\n className: rowClass(holdsCurrent),\n 'aria-current': isCurrent ? 'page' : undefined,\n 'aria-expanded': hasChildren ? open : undefined,\n 'data-active': holdsCurrent && !isCurrent ? true : undefined,\n onClick,\n },\n })}\n\n {hasChildren && (\n <Collapsible.Content>\n {/* `pl-1` keeps each row's background box off the group's rule — without it an active\n row's `bg-accent` sits flush against the line. 4px is also what lines the child titles\n (20 + 1 + 4 + 12 = 37px) up with the parent's, which its icon puts at 12 + 16 + 8 = 36px. */}\n {/* `my-0 mr-0` and not `m-0`: a host app emits its own `.tw\\:m-0` from its own source, and\n its stylesheet is the later one — shorthand and longhand at equal specificity means the\n app's `m-0` would land after this `ml-5` and flatten the indent. Longhands only, so\n nothing here can be overridden by a copy of a class this block also uses. */}\n <ul className=\"tw:my-0 tw:mr-0 tw:ml-5 tw:flex tw:list-none tw:flex-col tw:gap-0.5 tw:border-l tw:border-border tw:py-0.5 tw:pl-1\">\n {group.children.map((child) => {\n const active = child.id === activeId;\n\n return (\n <li key={child.id}>\n {renderItem({\n targetId: child.id,\n isActive: active,\n children: (\n <SectionNavItemContent\n item={child}\n active={active}\n showDescription={showDescriptions}\n showIcon={false}\n />\n ),\n itemProps: {\n className: childRowClass(active),\n 'aria-current': active ? 'page' : undefined,\n 'aria-expanded': undefined,\n 'data-active': undefined,\n onClick: noop,\n },\n })}\n </li>\n );\n })}\n {group.note && (\n <li className=\"tw:py-1 tw:pl-3 tw:text-xs tw:text-muted-foreground\">{group.note}</li>\n )}\n </ul>\n </Collapsible.Content>\n )}\n </Collapsible>\n );\n};\n","import type { ReactNode } from 'react';\n\nimport { Button } from '../../components/Button';\nimport { DropdownMenu } from '../../components/DropdownMenu';\nimport { ChevronDown } from '../../icons';\nimport { cn, noop } from '../../utils';\n\nimport { SectionNavGroupRow } from './SectionNavGroupRow';\nimport { SectionNavItemContent } from './SectionNavItemContent';\nimport type { SectionNavGroup, SectionNavItemRenderProps } from './types';\n\ntype Props = {\n /**\n * The sections to show, already filtered. Visibility, permissions and feature flags stay in the\n * app — this block renders exactly what it is handed, in order.\n */\n groups: SectionNavGroup[];\n /** `id` of the current section: a child's, or a childless group's. */\n activeId?: string;\n /**\n * Renders the clickable element for one row, so routing never enters the design system. Return a\n * `NavLink` / TanStack `Link` / `<a>` pointing at `targetId` and spread `itemProps` onto it.\n */\n renderItem: (props: SectionNavItemRenderProps) => ReactNode;\n /** Print each section's `description` under its title. Off — the tree stays scannable without it. */\n showDescriptions?: boolean;\n /** Accessible name for the tree's `<nav>`, and the collapsed label with nothing active. */\n label?: string;\n /** Applied to the tree's `<nav>`. The column's own geometry belongs to `PageLayout.Content nav`. */\n className?: string;\n};\n\n/**\n * In-page grouped navigation for one page's sections: a tree above the container's breakpoint, a\n * single dropdown below it. Both are rendered and CSS picks one, and both draw their rows through\n * the same renderer, so the two can never drift apart.\n *\n * **This is not `Sidebar`.** `Sidebar` is the app-level left rail — `SidebarProvider`, icon-collapse,\n * one per app shell, outside `PageLayout`. `SectionNav` is scoped to a single page's sections, lives\n * inside `PageLayout.Content`, and owns no global state. See `AGENTS.md`.\n *\n * **Router-agnostic:** `renderItem` is the seam. Pass it whatever your router calls a link.\n *\n * ```tsx\n * <PageLayout.Content nav={\n * <SectionNav\n * groups={groups}\n * activeId={activeId}\n * renderItem={({ targetId, children, itemProps }) => (\n * <Link to={targetId} {...itemProps}>{children}</Link>\n * )}\n * />\n * }>\n * {page}\n * </PageLayout.Content>\n * ```\n *\n * The tree↔dropdown switch is a **container** query on the content area's width, never the viewport\n * — a product sidebar or a chat panel narrows the page without the window resizing.\n * `PageLayout.Content nav={…}` names that container; standalone, put `tw:@container/section-nav` on\n * an ancestor yourself.\n *\n * @see RECIPES.md#section-nav\n */\nexport const SectionNav = ({\n groups,\n activeId,\n renderItem,\n showDescriptions = false,\n label = 'Sections',\n className,\n}: Props) => {\n /**\n * What the collapsed trigger names. A sub-section carries its group with it — \"Developer settings /\n * CLI agents\" — so the trigger says where you are, not just what page this is.\n */\n const activeChild = groups\n .flatMap((group) => group.children.map((child) => ({ group, child })))\n .find(({ child }) => child.id === activeId);\n const activeGroup = groups.find((group) => group.id === activeId);\n const current = activeChild\n ? {\n icon: activeChild.group.icon,\n title: activeChild.child.title,\n parent: activeChild.group.title,\n }\n : { icon: activeGroup?.icon, title: activeGroup?.title ?? label, parent: undefined };\n const CurrentIcon = current.icon;\n /** A group whose subtree holds the active section: tinted like the tree's row, but not `aria-current`. */\n const holdsActive = (group: SectionNavGroup) =>\n group.id === activeId || group.children.some((child) => child.id === activeId);\n\n return (\n <>\n {/* The reset is scoped (`.tailwindcss-preflight`, see `styles.css`), and the rows are\n caller-owned elements — `renderItem` returns the app's own `<a>`, which never inherits a\n scope this block does not open. Without it those rows are `content-box`, so the `w-full`\n + `px-3` in `rowClass` measures 24px wider than the 256px column and every row bleeds out\n of it. Opening the scope here covers the whole tree, rows included. */}\n {/* `display` is set by TWO container variants and never by a plain utility. A host app that\n emits `tw:flex` or `tw:hidden` from its own source ships an identical `.tw\\:flex` /\n `.tw\\:hidden` rule — same specificity, same layer, and its stylesheet is the later one, so\n whichever of the two this block wrote plainly would lose to the app's copy and the tree\n would be stuck visible or stuck hidden. Both variants are selectors only this block emits,\n and their queries are mutually exclusive, so nothing outside can outrank them. */}\n <nav\n aria-label={label}\n className={cn(\n 'tailwindcss-preflight',\n 'tw:w-full tw:flex-col tw:gap-0.5 tw:@[640px]/section-nav:flex tw:@max-[640px]/section-nav:hidden',\n className,\n )}\n >\n {groups.map((group) => (\n <SectionNavGroupRow\n key={group.id}\n group={group}\n activeId={activeId}\n renderItem={renderItem}\n showDescriptions={showDescriptions}\n />\n ))}\n </nav>\n\n <div className=\"tw:w-full tw:bg-background tw:@[640px]/section-nav:hidden tw:@max-[640px]/section-nav:block\">\n <DropdownMenu>\n <DropdownMenu.Trigger asChild>\n <Button variant=\"outline\" className=\"tw:w-full tw:justify-between\">\n <span className=\"tw:flex tw:min-w-0 tw:items-center tw:gap-2\">\n {CurrentIcon && <CurrentIcon className=\"tw:size-4 tw:shrink-0\" />}\n {current.parent && (\n <>\n <span className=\"tw:truncate tw:font-normal tw:text-muted-foreground\">\n {current.parent}\n </span>\n <span className=\"tw:text-border\">/</span>\n </>\n )}\n <span className=\"tw:truncate tw:font-medium tw:text-foreground\">\n {current.title}\n </span>\n </span>\n <ChevronDown className=\"tw:size-4 tw:shrink-0\" />\n </Button>\n </DropdownMenu.Trigger>\n\n <DropdownMenu.Content\n align=\"start\"\n className=\"tw:w-(--radix-dropdown-menu-trigger-width)\"\n >\n {groups.map((group) =>\n group.children.length > 0 ? (\n <DropdownMenu.Group key={group.id}>\n {/* A real item, not a label: it is a destination in the tree (it goes to the\n group's first section), so a menu that made it unclickable would be a different\n navigation, not a smaller one. Same row treatment as every other item. */}\n <DropdownMenu.Item asChild>\n {renderItem({\n targetId: group.children[0]?.id ?? group.id,\n isActive: false,\n children: <SectionNavItemContent item={group} active={holdsActive(group)} />,\n itemProps: {\n className: 'tw:no-underline',\n 'aria-current': undefined,\n 'aria-expanded': undefined,\n 'data-active': holdsActive(group) ? true : undefined,\n onClick: noop,\n },\n })}\n </DropdownMenu.Item>\n <div className=\"tw:ml-5 tw:border-l tw:border-border tw:py-0.5 tw:pl-1\">\n {group.children.map((child) => (\n <DropdownMenu.Item key={child.id} asChild>\n {renderItem({\n targetId: child.id,\n isActive: child.id === activeId,\n children: (\n <SectionNavItemContent\n item={child}\n active={child.id === activeId}\n showDescription={showDescriptions}\n showIcon={false}\n />\n ),\n itemProps: {\n className: 'tw:no-underline',\n 'aria-current': child.id === activeId ? 'page' : undefined,\n 'aria-expanded': undefined,\n 'data-active': undefined,\n onClick: noop,\n },\n })}\n </DropdownMenu.Item>\n ))}\n </div>\n </DropdownMenu.Group>\n ) : (\n <DropdownMenu.Item key={group.id} asChild>\n {renderItem({\n targetId: group.id,\n isActive: group.id === activeId,\n children: <SectionNavItemContent item={group} active={group.id === activeId} />,\n itemProps: {\n className: 'tw:no-underline',\n 'aria-current': group.id === activeId ? 'page' : undefined,\n 'aria-expanded': undefined,\n 'data-active': undefined,\n onClick: noop,\n },\n })}\n </DropdownMenu.Item>\n ),\n )}\n </DropdownMenu.Content>\n </DropdownMenu>\n </div>\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AA0BA,MAAa,yBAAyB,EACpC,MACA,QACA,kBAAkB,OAClB,UACA,WAAW,WACA;CACX,MAAM,OAAO,KAAK;CAElB,OACE,qBAAC,QAAD;EAAM,WAAU;EAAhB,UAAA,CACE,qBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA;IACG,YAAY,QAAQ,oBAAC,MAAD,EAAM,WAAU,wBAAyB,CAAA;IAC9D,oBAAC,QAAD;KACE,WAAW,GACT,oCACA,SAAS,6CAA6C,oBACxD;KAEC,UAAA,KAAK;IACF,CAAA;IACL,KAAK,SACJ,oBAAC,OAAD;KACE,OAAM;KACN,WAAU;KACV,gBAAe;KAChB,UAAA;IAEM,CAAA;IAER,aAAa,KAAA,KACZ,oBAAC,aAAD,EACE,WAAW,GACT,0FACA,YAAY,eACd,EACD,CAAA;GAEC;EAGL,CAAA,GAAA,mBAAmB,KAAK,eACvB,oBAAC,QAAD;GAAM,WAAU;GACb,UAAA,KAAK;EACF,CAAA,CAEJ;;AAEV;;;;;;;;;;ACnDA,MAAM,aACJ;AAEF,MAAM,YAAY,WAChB,GACE,0KACA,YACA,SACI,0DACA,wDACN;AAEF,MAAM,iBAAiB,WACrB,GACE,wIACA,YACA,SAAS,iBAAiB,qCAC5B;;;;;;AAOF,MAAa,sBAAsB,EAAE,OAAO,UAAU,YAAY,uBAA8B;CAE9F,MAAM,CAAC,MAAM,WAAW,SAAS,IAAI;CAErC,MAAM,cAAc,MA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MAAuB,MAAM;MAAO,QAAQ,MAAM,OAAO;KAAW,CAAA;KAC9E,WAAW;MACT,WAAW;MACX,gBAAgB,MAAM,OAAO,WAAW,SAAS,KAAA;MACjD,iBAAiB,KAAA;MACjB,eAAe,KAAA;MACf,SAAS;KACX;IACF,CAAC;GACgB,GAbK,MAAM,EAaX,CAEvB;EACoB,CAAA,CACV,EAAA,CAAA;CACX,CAAA,CACL,EAAA,CAAA;AAEN"}
@@ -2,7 +2,7 @@ import { cn } from "./classNames-BzrkDnOD.js";
2
2
  import { useArgoDesign } from "./context-D7X470dy.js";
3
3
  import { X } from "./icons-Cek151jC.js";
4
4
  import { Button } from "./Button-DsRrU5F1.js";
5
- import { ModalDescription, ModalOverlay, ModalTitle } from "./ModalTitle-C76ke2eo.js";
5
+ import { ModalDescription, ModalOverlay, ModalTitle } from "./ModalTitle-CeLM_mX9.js";
6
6
  import { cva } from "class-variance-authority";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { Close, Content, Portal, Root, Title, Trigger } from "@radix-ui/react-dialog";
@@ -166,4 +166,4 @@ Sheet.Body = SheetBody;
166
166
  //#endregion
167
167
  export { Sheet };
168
168
 
169
- //# sourceMappingURL=Sheet-Chf0kX1E.js.map
169
+ //# sourceMappingURL=Sheet-OparjIi-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet-Chf0kX1E.js","names":[],"sources":["../src/components/Sheet/SheetBody.tsx","../src/components/Sheet/SheetOverlay.tsx","../src/components/Sheet/SheetContent.tsx","../src/components/Sheet/SheetFooter.tsx","../src/components/Sheet/SheetHeader.tsx","../src/components/Sheet/SheetTitle.tsx","../src/components/Sheet/Sheet.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'div'>;\n\nexport const SheetBody = ({ className, ...rest }: Props) => (\n <div\n {...rest}\n className={cn('tw:flex', 'tw:flex-col', 'tw:overflow-x-hidden', 'tw:px-4', className)}\n />\n);\n","import type { ComponentProps } from 'react';\n\nimport { ModalOverlay } from '../Modal/ModalOverlay';\n\ntype Props = ComponentProps<typeof ModalOverlay>;\n\n// Assuming it should have the same style as standard modal, if not remove the modal dependency and style it separately.\nexport const SheetOverlay = ({ ref, ...props }: Props) => <ModalOverlay ref={ref} {...props} />;\n","import type { ComponentProps } from 'react';\nimport { Content, Portal } from '@radix-ui/react-dialog';\nimport type { VariantProps } from 'class-variance-authority';\nimport { cva } from 'class-variance-authority';\n\nimport { cn } from '../../utils';\nimport { useArgoDesign } from '../ThemeProvider/context';\n\nimport { SheetOverlay } from './SheetOverlay';\n\nconst sheetContentVariants = cva(\n [\n // reset\n 'tailwindcss-preflight',\n\n // positioning\n 'tw:fixed',\n\n // Use standard tailwindcss class when, global override in tooltip.less file is removed.\n 'tw:z-[1051]',\n\n 'tw:flex',\n 'tw:flex-col',\n\n 'tw:bg-card',\n 'tw:text-card-foreground',\n 'tw:shadow-lg',\n\n // argo chrome overrides\n 'tw:data-[argo=true]:border',\n 'tw:data-[argo=true]:border-border',\n 'tw:data-[argo=true]:focus-visible:outline-hidden',\n 'tw:data-[argo=true]:focus-visible:ring-2',\n 'tw:data-[argo=true]:focus-visible:ring-ring/50',\n\n 'tw:ease-in-out',\n // opening animation\n 'tw:data-[state=open]:duration-200',\n\n // close animation\n 'tw:data-[state=closed]:duration-200',\n ],\n {\n defaultVariants: {\n side: 'right',\n disableTransition: false,\n },\n variants: {\n disableTransition: {\n true: [],\n false: ['tw:data-[state=open]:animate-in', 'tw:data-[state=closed]:animate-out'],\n },\n side: {\n top: [\n 'tw:inset-x-0',\n 'tw:top-0',\n 'tw:h-auto',\n 'tw:data-[state=closed]:slide-out-to-top',\n 'tw:data-[state=open]:slide-in-from-top',\n 'tw:data-[argo=true]:rounded-b-lg',\n ],\n right: [\n 'tw:inset-y-0',\n 'tw:right-0',\n 'tw:h-full',\n 'tw:data-[state=closed]:slide-out-to-right',\n 'tw:data-[state=open]:slide-in-from-right',\n 'tw:data-[argo=true]:rounded-l-lg',\n ],\n\n bottom: [\n 'tw:inset-x-0',\n 'tw:bottom-0',\n 'tw:h-auto',\n 'tw:data-[state=closed]:slide-out-to-bottom',\n 'tw:data-[state=open]:slide-in-from-bottom',\n 'tw:drop-shadow-2xl', // standard tailwindcss shadow is invisible for a bottom sheet because of positioning\n 'tw:data-[argo=true]:rounded-t-lg',\n ],\n\n left: [\n 'tw:inset-y-0',\n 'tw:left-0',\n 'tw:h-full',\n 'tw:data-[state=closed]:slide-out-to-left',\n 'tw:data-[state=open]:slide-in-from-left',\n 'tw:data-[argo=true]:rounded-r-lg',\n ],\n },\n },\n },\n);\n\ntype Props = ComponentProps<typeof Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n hideOverlay?: boolean;\n keepOpenOnPointerDownOutside?: boolean;\n} & VariantProps<typeof sheetContentVariants> &\n Pick<ComponentProps<typeof Portal>, 'container'>;\n\nexport const SheetContent = ({\n className,\n children,\n side = 'right',\n disableTransition = false,\n hideOverlay = false,\n keepOpenOnPointerDownOutside = false,\n onPointerDownOutside,\n onInteractOutside,\n container,\n ...props\n}: Props) => {\n const renderArgo = useArgoDesign();\n\n const handleOnPointerDownOutside: ComponentProps<typeof Content>['onPointerDownOutside'] = (\n event,\n ) => {\n if (keepOpenOnPointerDownOutside) event.preventDefault();\n onPointerDownOutside?.(event);\n };\n\n const handleOnInteractOutside: ComponentProps<typeof Content>['onInteractOutside'] = (event) => {\n if (keepOpenOnPointerDownOutside) event.preventDefault();\n onInteractOutside?.(event);\n };\n\n return (\n <Portal container={container}>\n {!hideOverlay && <SheetOverlay disableTransition={disableTransition ?? false} />}\n <Content\n {...props}\n /**\n * Intentionally set undefined to avoid warning as suggested in docs, (https://www.radix-ui.com/primitives/docs/components/dialog#description)\n * as of now we don't use modal description anywhere, if we decide to fix this issue, we fix it everywhere at once.\n */\n aria-describedby={undefined}\n className={cn(sheetContentVariants({ side, className, disableTransition }))}\n onPointerDownOutside={handleOnPointerDownOutside}\n onInteractOutside={handleOnInteractOutside}\n data-side={side}\n data-argo={renderArgo}\n >\n {children}\n </Content>\n </Portal>\n );\n};\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'div'>;\n\nexport const SheetFooter = ({ className, ...props }: Props) => (\n <div className={cn('tw:mt-auto tw:flex tw:flex-col tw:gap-2 tw:p-4', className)} {...props} />\n);\n","import type { ComponentProps, ReactNode } from 'react';\nimport { Close } from '@radix-ui/react-dialog';\n\nimport { X } from '../../icons';\nimport { cn } from '../../utils';\nimport { Button } from '../Button';\nimport { ModalDescription } from '../Modal/ModalDescription';\nimport { ModalTitle } from '../Modal/ModalTitle';\n\ntype Props = {\n title?: ReactNode;\n description?: ReactNode;\n hideCloseIcon?: boolean;\n} & ComponentProps<'div'>;\n\nexport const SheetHeader = ({\n className,\n children,\n hideCloseIcon = false,\n title,\n description,\n ...props\n}: Props) => {\n const isHeaderRendered = title || description || !hideCloseIcon;\n\n return (\n <div className={cn('tw:flex', 'tw:flex-col', 'tw:gap-1.5', 'tw:p-4', className)} {...props}>\n {isHeaderRendered && (\n <div className=\"tw:flex tw:flex-col\">\n <div className=\"tw:flex tw:justify-end tw:gap-2\">\n {title && <ModalTitle>{title}</ModalTitle>}\n {!hideCloseIcon && (\n <Close asChild>\n <Button variant=\"invisible\" size=\"icon-sm\">\n <X />\n <span className=\"tw:sr-only\">Close</span>\n </Button>\n </Close>\n )}\n </div>\n {description && <ModalDescription>{description}</ModalDescription>}\n </div>\n )}\n\n {children}\n </div>\n );\n};\n","import type { ComponentProps } from 'react';\nimport { Title } from '@radix-ui/react-dialog';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<typeof Title> & {\n visuallyHidden?: boolean;\n};\n\nexport const SheetTitle = ({ className, visuallyHidden = false, ...props }: Props) => (\n <Title className={cn({ 'tw:sr-only': visuallyHidden }, className)} {...props} />\n);\n","import type { ComponentProps } from 'react';\nimport { Close, Root, Trigger } from '@radix-ui/react-dialog';\n\nimport { SheetBody } from './SheetBody';\nimport { SheetContent } from './SheetContent';\nimport { SheetFooter } from './SheetFooter';\nimport { SheetHeader } from './SheetHeader';\nimport { SheetTitle } from './SheetTitle';\n\ntype Props = ComponentProps<typeof Root>;\n\nexport const Sheet = (props: Props) => <Root {...props} />;\n\nSheet.Close = Close;\nSheet.Trigger = Trigger;\nSheet.Content = SheetContent;\nSheet.Title = SheetTitle;\n\nSheet.Header = SheetHeader;\nSheet.Footer = SheetFooter;\nSheet.Body = SheetBody;\n"],"mappings":";;;;;;;;;AAMA,MAAa,aAAa,EAAE,WAAW,GAAG,WACxC,oBAAC,OAAD;CACE,GAAI;CACJ,WAAW,GAAG,WAAW,eAAe,wBAAwB,WAAW,SAAS;AACrF,CAAA;;;ACHH,MAAa,gBAAgB,EAAE,KAAK,GAAG,YAAmB,oBAAC,cAAD;CAAmB;CAAK,GAAI;AAAQ,CAAA;;;ACG9F,MAAM,uBAAuB,IAC3B;CAEE;CAGA;CAGA;CAEA;CACA;CAEA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CAEA;CAEA;CAGA;AACF,GACA;CACE,iBAAiB;EACf,MAAM;EACN,mBAAmB;CACrB;CACA,UAAU;EACR,mBAAmB;GACjB,MAAM,CAAC;GACP,OAAO,CAAC,mCAAmC,oCAAoC;EACjF;EACA,MAAM;GACJ,KAAK;IACH;IACA;IACA;IACA;IACA;IACA;GACF;GACA,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;GACF;GAEA,QAAQ;IACN;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GAEA,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;GACF;EACF;CACF;AACF,CACF;AASA,MAAa,gBAAgB,EAC3B,WACA,UACA,OAAO,SACP,oBAAoB,OACpB,cAAc,OACd,+BAA+B,OAC/B,sBACA,mBACA,WACA,GAAG,YACQ;CACX,MAAM,aAAa,cAAc;CAEjC,MAAM,8BACJ,UACG;EACH,IAAI,8BAA8B,MAAM,e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Aa,cAAc,EAAE,WAAW,iBAAiB,OAAO,GAAG,YACjE,oBAAC,OAAD;CAAO,WAAW,GAAG,EAAE,cAAc,eAAe,GAAG,SAAS;CAAG,GAAI;AAAQ,CAAA;;;ACCjF,MAAa,SAAS,UAAiB,oBAAC,MAAD,EAAM,GAAI,MAAQ,CAAA;AAEzD,MAAM,QAAQ;AACd,MAAM,UAAU;AAChB,MAAM,UAAU;AAChB,MAAM,QAAQ;AAEd,MAAM,SAAS;AACf,MAAM,SAAS;AACf,MAAM,OAAO"}
1
+ {"version":3,"file":"Sheet-OparjIi-.js","names":[],"sources":["../src/components/Sheet/SheetBody.tsx","../src/components/Sheet/SheetOverlay.tsx","../src/components/Sheet/SheetContent.tsx","../src/components/Sheet/SheetFooter.tsx","../src/components/Sheet/SheetHeader.tsx","../src/components/Sheet/SheetTitle.tsx","../src/components/Sheet/Sheet.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'div'>;\n\nexport const SheetBody = ({ className, ...rest }: Props) => (\n <div\n {...rest}\n className={cn('tw:flex', 'tw:flex-col', 'tw:overflow-x-hidden', 'tw:px-4', className)}\n />\n);\n","import type { ComponentProps } from 'react';\n\nimport { ModalOverlay } from '../Modal/ModalOverlay';\n\ntype Props = ComponentProps<typeof ModalOverlay>;\n\n// Assuming it should have the same style as standard modal, if not remove the modal dependency and style it separately.\nexport const SheetOverlay = ({ ref, ...props }: Props) => <ModalOverlay ref={ref} {...props} />;\n","import type { ComponentProps } from 'react';\nimport { Content, Portal } from '@radix-ui/react-dialog';\nimport type { VariantProps } from 'class-variance-authority';\nimport { cva } from 'class-variance-authority';\n\nimport { cn } from '../../utils';\nimport { useArgoDesign } from '../ThemeProvider/context';\n\nimport { SheetOverlay } from './SheetOverlay';\n\nconst sheetContentVariants = cva(\n [\n // reset\n 'tailwindcss-preflight',\n\n // positioning\n 'tw:fixed',\n\n // Use standard tailwindcss class when, global override in tooltip.less file is removed.\n 'tw:z-[1051]',\n\n 'tw:flex',\n 'tw:flex-col',\n\n 'tw:bg-card',\n 'tw:text-card-foreground',\n 'tw:shadow-lg',\n\n // argo chrome overrides\n 'tw:data-[argo=true]:border',\n 'tw:data-[argo=true]:border-border',\n 'tw:data-[argo=true]:focus-visible:outline-hidden',\n 'tw:data-[argo=true]:focus-visible:ring-2',\n 'tw:data-[argo=true]:focus-visible:ring-ring/50',\n\n 'tw:ease-in-out',\n // opening animation\n 'tw:data-[state=open]:duration-200',\n\n // close animation\n 'tw:data-[state=closed]:duration-200',\n ],\n {\n defaultVariants: {\n side: 'right',\n disableTransition: false,\n },\n variants: {\n disableTransition: {\n true: [],\n false: ['tw:data-[state=open]:animate-in', 'tw:data-[state=closed]:animate-out'],\n },\n side: {\n top: [\n 'tw:inset-x-0',\n 'tw:top-0',\n 'tw:h-auto',\n 'tw:data-[state=closed]:slide-out-to-top',\n 'tw:data-[state=open]:slide-in-from-top',\n 'tw:data-[argo=true]:rounded-b-lg',\n ],\n right: [\n 'tw:inset-y-0',\n 'tw:right-0',\n 'tw:h-full',\n 'tw:data-[state=closed]:slide-out-to-right',\n 'tw:data-[state=open]:slide-in-from-right',\n 'tw:data-[argo=true]:rounded-l-lg',\n ],\n\n bottom: [\n 'tw:inset-x-0',\n 'tw:bottom-0',\n 'tw:h-auto',\n 'tw:data-[state=closed]:slide-out-to-bottom',\n 'tw:data-[state=open]:slide-in-from-bottom',\n 'tw:drop-shadow-2xl', // standard tailwindcss shadow is invisible for a bottom sheet because of positioning\n 'tw:data-[argo=true]:rounded-t-lg',\n ],\n\n left: [\n 'tw:inset-y-0',\n 'tw:left-0',\n 'tw:h-full',\n 'tw:data-[state=closed]:slide-out-to-left',\n 'tw:data-[state=open]:slide-in-from-left',\n 'tw:data-[argo=true]:rounded-r-lg',\n ],\n },\n },\n },\n);\n\ntype Props = ComponentProps<typeof Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n hideOverlay?: boolean;\n keepOpenOnPointerDownOutside?: boolean;\n} & VariantProps<typeof sheetContentVariants> &\n Pick<ComponentProps<typeof Portal>, 'container'>;\n\nexport const SheetContent = ({\n className,\n children,\n side = 'right',\n disableTransition = false,\n hideOverlay = false,\n keepOpenOnPointerDownOutside = false,\n onPointerDownOutside,\n onInteractOutside,\n container,\n ...props\n}: Props) => {\n const renderArgo = useArgoDesign();\n\n const handleOnPointerDownOutside: ComponentProps<typeof Content>['onPointerDownOutside'] = (\n event,\n ) => {\n if (keepOpenOnPointerDownOutside) event.preventDefault();\n onPointerDownOutside?.(event);\n };\n\n const handleOnInteractOutside: ComponentProps<typeof Content>['onInteractOutside'] = (event) => {\n if (keepOpenOnPointerDownOutside) event.preventDefault();\n onInteractOutside?.(event);\n };\n\n return (\n <Portal container={container}>\n {!hideOverlay && <SheetOverlay disableTransition={disableTransition ?? false} />}\n <Content\n {...props}\n /**\n * Intentionally set undefined to avoid warning as suggested in docs, (https://www.radix-ui.com/primitives/docs/components/dialog#description)\n * as of now we don't use modal description anywhere, if we decide to fix this issue, we fix it everywhere at once.\n */\n aria-describedby={undefined}\n className={cn(sheetContentVariants({ side, className, disableTransition }))}\n onPointerDownOutside={handleOnPointerDownOutside}\n onInteractOutside={handleOnInteractOutside}\n data-side={side}\n data-argo={renderArgo}\n >\n {children}\n </Content>\n </Portal>\n );\n};\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'div'>;\n\nexport const SheetFooter = ({ className, ...props }: Props) => (\n <div className={cn('tw:mt-auto tw:flex tw:flex-col tw:gap-2 tw:p-4', className)} {...props} />\n);\n","import type { ComponentProps, ReactNode } from 'react';\nimport { Close } from '@radix-ui/react-dialog';\n\nimport { X } from '../../icons';\nimport { cn } from '../../utils';\nimport { Button } from '../Button';\nimport { ModalDescription } from '../Modal/ModalDescription';\nimport { ModalTitle } from '../Modal/ModalTitle';\n\ntype Props = {\n title?: ReactNode;\n description?: ReactNode;\n hideCloseIcon?: boolean;\n} & ComponentProps<'div'>;\n\nexport const SheetHeader = ({\n className,\n children,\n hideCloseIcon = false,\n title,\n description,\n ...props\n}: Props) => {\n const isHeaderRendered = title || description || !hideCloseIcon;\n\n return (\n <div className={cn('tw:flex', 'tw:flex-col', 'tw:gap-1.5', 'tw:p-4', className)} {...props}>\n {isHeaderRendered && (\n <div className=\"tw:flex tw:flex-col\">\n <div className=\"tw:flex tw:justify-end tw:gap-2\">\n {title && <ModalTitle>{title}</ModalTitle>}\n {!hideCloseIcon && (\n <Close asChild>\n <Button variant=\"invisible\" size=\"icon-sm\">\n <X />\n <span className=\"tw:sr-only\">Close</span>\n </Button>\n </Close>\n )}\n </div>\n {description && <ModalDescription>{description}</ModalDescription>}\n </div>\n )}\n\n {children}\n </div>\n );\n};\n","import type { ComponentProps } from 'react';\nimport { Title } from '@radix-ui/react-dialog';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<typeof Title> & {\n visuallyHidden?: boolean;\n};\n\nexport const SheetTitle = ({ className, visuallyHidden = false, ...props }: Props) => (\n <Title className={cn({ 'tw:sr-only': visuallyHidden }, className)} {...props} />\n);\n","import type { ComponentProps } from 'react';\nimport { Close, Root, Trigger } from '@radix-ui/react-dialog';\n\nimport { SheetBody } from './SheetBody';\nimport { SheetContent } from './SheetContent';\nimport { SheetFooter } from './SheetFooter';\nimport { SheetHeader } from './SheetHeader';\nimport { SheetTitle } from './SheetTitle';\n\ntype Props = ComponentProps<typeof Root>;\n\nexport const Sheet = (props: Props) => <Root {...props} />;\n\nSheet.Close = Close;\nSheet.Trigger = Trigger;\nSheet.Content = SheetContent;\nSheet.Title = SheetTitle;\n\nSheet.Header = SheetHeader;\nSheet.Footer = SheetFooter;\nSheet.Body = SheetBody;\n"],"mappings":";;;;;;;;;AAMA,MAAa,aAAa,EAAE,WAAW,GAAG,WACxC,oBAAC,OAAD;CACE,GAAI;CACJ,WAAW,GAAG,WAAW,eAAe,wBAAwB,WAAW,SAAS;AACrF,CAAA;;;ACHH,MAAa,gBA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AD;CAAK,WAAW,GAAG,kDAAkD,SAAS;CAAG,GAAI;AAAQ,CAAA;;;ACQ/F,MAAa,eAAe,EAC1B,WACA,UACA,gBAAgB,OAChB,OACA,aACA,GAAG,YACQ;CACX,MAAM,mBAAmB,SAAS,eAAe,CAAC;CAElD,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,WAAW,eAAe,cAAc,UAAU,SAAS;EAAG,GAAI;EAArF,UAAA,CACG,oBACC,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACG,SAAS,oBAAC,YAAD,EAAA,UAAa,MAAkB,CAAA,GACxC,CAAC,iBACA,oBAAC,OAAD;KAAO,SAAA;KACL,UAAA,qBAAC,QAAD;MAAQ,SAAQ;MAAY,MAAK;MAAjC,UAAA,CACE,oBAAC,GAAD,CAAI,CAAA,GACJ,oBAAC,QAAD;OAAM,WAAU;OAAa,UAAA;MAAW,CAAA,CAClC;;IACH,CAAA,CAEN;GACJ,CAAA,GAAA,eAAe,oBAAC,kBAAD,EAAA,UAAmB,YAA8B,CAAA,CAC9D;EAGN,CAAA,GAAA,QACE;;AAET;;;ACtCA,MAAa,cAAc,EAAE,WAAW,iBAAiB,OAAO,GAAG,YACjE,oBAAC,OAAD;CAAO,WAAW,GAAG,EAAE,cAAc,eAAe,GAAG,SAAS;CAAG,GAAI;AAAQ,CAAA;;;ACCjF,MAAa,SAAS,UAAiB,oBAAC,MAAD,EAAM,GAAI,MAAQ,CAAA;AAEzD,MAAM,QAAQ;AACd,MAAM,UAAU;AAChB,MAAM,UAAU;AAChB,MAAM,QAAQ;AAEd,MAAM,SAAS;AACf,MAAM,SAAS;AACf,MAAM,OAAO"}
@@ -1,17 +1,19 @@
1
1
  import { cn } from "./classNames-BzrkDnOD.js";
2
- import { Tooltip, TooltipProvider } from "./utils-DSvrhU8E.js";
2
+ import { Tooltip, TooltipProvider } from "./utils-BW4AE8VP.js";
3
3
  import { mergeRefs } from "./internal/utils/mergeRefs.js";
4
4
  import { ChevronDown, Search } from "./icons-Cek151jC.js";
5
- import { DropdownMenu } from "./DropdownMenu-CASr-jgl.js";
5
+ import { DropdownMenu } from "./DropdownMenu-CgVwhDvl.js";
6
6
  import { ScrollArea } from "./internal/components/ScrollArea.js";
7
7
  import { Separator } from "./internal/components/Separator.js";
8
+ import { Sheet } from "./Sheet-OparjIi-.js";
8
9
  import { HoverCard } from "./HoverCard-B9ZMJxjn.js";
9
10
  import { Collapsible } from "./Collapsible-BQXWEOBC.js";
11
+ import { useThemeScopeContainer } from "./ThemeProvider-DAmNn9Sd.js";
10
12
  import { BrandLogo } from "./BrandLogo-CoKBk4MI.js";
11
- import { useElement } from "./useElement-DkF6esWL.js";
13
+ import { useElement } from "./useElement-BK3AAiIf.js";
12
14
  import { useScrollbarPosition } from "./internal/hooks/useScrollbarPosition.js";
13
15
  import { Root, Slot, Slottable } from "@radix-ui/react-slot";
14
- import { createContext, use, useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
16
+ import { createContext, use, useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
15
17
  import { jsx, jsxs } from "react/jsx-runtime";
16
18
  //#region src/components/Sidebar/SidebarProvider/useTransitionPresence.ts
17
19
  const FALLBACK_TIMEOUT_MS = 500;
@@ -79,20 +81,47 @@ const SidebarContent = ({ ref, className, children, contentRef }) => {
79
81
  });
80
82
  };
81
83
  //#endregion
84
+ //#region src/hooks/useMediaQuery.ts
85
+ /**
86
+ * Whether a CSS media query currently matches, re-rendering when it flips.
87
+ *
88
+ * - `false` wherever `matchMedia` is absent (SSR, a stubbed test environment), so the
89
+ * caller renders its desktop branch rather than crashing.
90
+ * - The subscription is the query's own `change` event — no resize listener, no polling.
91
+ */
92
+ const useMediaQuery = (query) => {
93
+ const subscribe = useCallback((onStoreChange) => {
94
+ const list = globalThis.matchMedia?.(query);
95
+ list?.addEventListener?.("change", onStoreChange);
96
+ return () => list?.removeEventListener?.("change", onStoreChange);
97
+ }, [query]);
98
+ const getSnapshot = useCallback(() => globalThis.matchMedia?.(query).matches ?? false, [query]);
99
+ return useSyncExternalStore(subscribe, getSnapshot, () => false);
100
+ };
101
+ //#endregion
82
102
  //#region src/components/Sidebar/utils.ts
83
103
  const SidebarWidthInPx = {
84
104
  MIN_DEFAULT: 256,
85
105
  COLLAPSED_ICON: 52,
86
106
  FLOATING_VARIANT_PADDING: 8
87
107
  };
108
+ /**
109
+ * The query a rail watches to know whether it is a sheet.
110
+ *
111
+ * - `max-width`, so it is exclusive of the breakpoint itself — the width passed in is the
112
+ * first one at which the rail is a column again.
113
+ * - Per side, because the width at which a rail stops fitting is the rail's own: a 320px
114
+ * panel beside a capped reading column runs out of room long before a navigation rail does.
115
+ */
116
+ const sidebarMobileMediaQuery = (breakpointPx) => `(max-width: ${breakpointPx - .02}px)`;
88
117
  const floatingSideCount = {
89
118
  "sided-floating": 1,
90
119
  floating: 2,
91
120
  inset: 0,
92
121
  none: 0
93
122
  };
94
- const calcEffectiveWidths = ({ variant, width: customWidth, collapsible, state, mode }) => {
95
- if (variant === "none") return {
123
+ const calcEffectiveWidths = ({ variant, width: customWidth, collapsible, state, mode, isMobile = false }) => {
124
+ if (variant === "none" || isMobile) return {
96
125
  sidebar: 0,
97
126
  gap: 0,
98
127
  fill: 0
@@ -140,14 +169,16 @@ const useSidebar = (side = "left") => {
140
169
  //#region src/components/Sidebar/SidebarProvider/useHoverTracking.ts
141
170
  const PORTAL_OPEN_SELECTORS_STRING = ["[aria-haspopup=\"menu\"][aria-expanded=true]", "[aria-haspopup=\"dialog\"][aria-expanded=true]"].join(",");
142
171
  const useHoverTracking = (sidebarElement) => {
143
- const [isHovered, setIsHovered] = useState(false);
172
+ const [hoveredElement, setHoveredElement] = useState(null);
144
173
  const isLockedRef = useRef(false);
174
+ if (hoveredElement !== null && hoveredElement !== sidebarElement) setHoveredElement(null);
175
+ const isHovered = hoveredElement !== null;
145
176
  useEffect(() => {
146
177
  if (!sidebarElement) return;
147
- const handleMouseEnter = () => setIsHovered(true);
178
+ const handleMouseEnter = () => setHoveredElement(sidebarElement);
148
179
  const handleMouseLeave = () => {
149
180
  if (isLockedRef.current) return;
150
- setIsHovered(false);
181
+ setHoveredElement(null);
151
182
  };
152
183
  sidebarElement.addEventListener("mouseenter", handleMouseEnter);
153
184
  sidebarElement.addEventListener("mouseleave", handleMouseLeave);
@@ -164,7 +195,7 @@ const useHoverTracking = (sidebarElement) => {
164
195
  isLockedRef.current = hasOpenPortal;
165
196
  if (hasOpenPortal) return;
166
197
  animationFrameId = requestAnimationFrame(() => {
167
- setIsHovered(sidebarElement.matches(":hover"));
198
+ setHoveredElement(sidebarElement.matches(":hover") ? sidebarElement : null);
168
199
  });
169
200
  });
170
201
  isLockedRef.current = sidebarElement.querySelector(PORTAL_OPEN_SELECTORS_STRING) !== null;
@@ -221,14 +252,31 @@ const useSidebarState = ({ defaultMode, mode: modeProp, onModeChange }) => {
221
252
  const DEFAULT_SIDEBAR_VARIANT = "none";
222
253
  const DEFAULT_SIDEBAR_MODE = "expanded";
223
254
  const DEFAULT_SIDEBAR_COLLAPSIBLE = "off-canvas";
224
- const SidebarProvider = ({ children, defaultLeftMode = DEFAULT_SIDEBAR_MODE, leftMode, onLeftModeChange, defaultRightMode = DEFAULT_SIDEBAR_MODE, rightMode, onRightModeChange, leftCollapsible = DEFAULT_SIDEBAR_COLLAPSIBLE, leftVariant = DEFAULT_SIDEBAR_VARIANT, leftWidth, rightCollapsible = DEFAULT_SIDEBAR_COLLAPSIBLE, rightVariant = DEFAULT_SIDEBAR_VARIANT, rightWidth, onLeftWidthChange, onRightWidthChange, defaultFilledSide = null }) => {
255
+ /**
256
+ * What `setMode` becomes for a rail that is currently a sheet.
257
+ *
258
+ * - The collapse axis has nothing to act on there, and the call site's own `mode` prop is a
259
+ * stored desktop preference — `Sidebar.SearchInput` expands the rail on focus, which would
260
+ * otherwise overwrite a stored `collapsed` the first time someone searches on a phone.
261
+ */
262
+ const ignoreModeChange = () => {};
263
+ /** The width a side watches: its own when it named one, the default when it just opted in. */
264
+ const mobileBreakpointOf = (mobileSheet) => typeof mobileSheet === "number" ? mobileSheet : 768;
265
+ const SidebarProvider = ({ children, defaultLeftMode = DEFAULT_SIDEBAR_MODE, leftMode, onLeftModeChange, defaultRightMode = DEFAULT_SIDEBAR_MODE, rightMode, onRightModeChange, leftMobileSheet = false, rightMobileSheet = false, leftCollapsible = DEFAULT_SIDEBAR_COLLAPSIBLE, leftVariant = DEFAULT_SIDEBAR_VARIANT, leftWidth, rightCollapsible = DEFAULT_SIDEBAR_COLLAPSIBLE, rightVariant = DEFAULT_SIDEBAR_VARIANT, rightWidth, onLeftWidthChange, onRightWidthChange, defaultFilledSide = null }) => {
266
+ const isLeftNarrow = useMediaQuery(sidebarMobileMediaQuery(mobileBreakpointOf(leftMobileSheet)));
267
+ const isRightNarrow = useMediaQuery(sidebarMobileMediaQuery(mobileBreakpointOf(rightMobileSheet)));
268
+ const isLeftMobile = isLeftNarrow && leftMobileSheet !== false && leftVariant !== "none";
269
+ const isRightMobile = isRightNarrow && rightMobileSheet !== false && rightVariant !== "none";
225
270
  const [filledSide, setFilledSide] = useState(defaultFilledSide);
271
+ const [openMobileSide, setOpenMobileSide] = useState(null);
226
272
  const [isLeftDragging, setIsLeftDragging] = useState(false);
227
273
  const [isRightDragging, setIsRightDragging] = useState(false);
228
274
  const [leftDragWidth, setLeftDragWidth] = useState(null);
229
275
  const [rightDragWidth, setRightDragWidth] = useState(null);
230
276
  if (leftDragWidth !== null && leftWidth === leftDragWidth) setLeftDragWidth(null);
231
277
  if (rightDragWidth !== null && rightWidth === rightDragWidth) setRightDragWidth(null);
278
+ if (openMobileSide === "left" && !isLeftMobile) setOpenMobileSide(null);
279
+ if (openMobileSide === "right" && !isRightMobile) setOpenMobileSide(null);
232
280
  const leftState = useSidebarState({
233
281
  defaultMode: defaultLeftMode,
234
282
  mode: leftMode,
@@ -239,6 +287,10 @@ const SidebarProvider = ({ children, defaultLeftMode = DEFAULT_SIDEBAR_MODE, lef
239
287
  mode: rightMode,
240
288
  onModeChange: onRightModeChange
241
289
  });
290
+ const toggleLeftMobile = useCallback(() => setOpenMobileSide((prev) => prev === "left" ? null : "left"), []);
291
+ const toggleRightMobile = useCallback(() => setOpenMobileSide((prev) => prev === "right" ? null : "right"), []);
292
+ const setLeftMobileOpen = useCallback((open) => setOpenMobileSide((prev) => open ? "left" : prev === "left" ? null : prev), []);
293
+ const setRightMobileOpen = useCallback((open) => setOpenMobileSide((prev) => open ? "right" : prev === "right" ? null : prev), []);
242
294
  const toggleLeftFill = useCallback(() => setFilledSide((prev) => prev === "left" ? null : "left"), []);
243
295
  const toggleRightFill = useCallback(() => setFilledSide((prev) => prev === "right" ? null : "right"), []);
244
296
  const setLeftFill = useCallback((fill) => setFilledSide((prev) => fill ? "left" : prev === "left" ? null : prev), []);
@@ -246,6 +298,15 @@ const SidebarProvider = ({ children, defaultLeftMode = DEFAULT_SIDEBAR_MODE, lef
246
298
  const value = useMemo(() => ({
247
299
  left: {
248
300
  ...leftState,
301
+ ...isLeftMobile ? {
302
+ mode: "expanded",
303
+ state: "expanded",
304
+ toggle: toggleLeftMobile,
305
+ setMode: ignoreModeChange
306
+ } : null,
307
+ isMobile: isLeftMobile,
308
+ isMobileOpen: openMobileSide === "left",
309
+ setMobileOpen: setLeftMobileOpen,
249
310
  isFill: filledSide === "left",
250
311
  toggleFill: toggleLeftFill,
251
312
  setFill: setLeftFill,
@@ -254,7 +315,8 @@ const SidebarProvider = ({ children, defaultLeftMode = DEFAULT_SIDEBAR_MODE, lef
254
315
  width: leftDragWidth ?? leftWidth,
255
316
  collapsible: leftCollapsible,
256
317
  state: leftState.state,
257
- mode: leftState.mode
318
+ mode: leftState.mode,
319
+ isMobile: isLeftMobile
258
320
  }),
259
321
  collapsible: leftCollapsible,
260
322
  variant: leftVariant,
@@ -266,6 +328,15 @@ const SidebarProvider = ({ children, defaultLeftMode = DEFAULT_SIDEBAR_MODE, lef
266
328
  },
267
329
  right: {
268
330
  ...rightState,
331
+ ...isRightMobile ? {
332
+ mode: "expanded",
333
+ state: "expanded",
334
+ toggle: toggleRightMobile,
335
+ setMode: ignoreModeChange
336
+ } : null,
337
+ isMobile: isRightMobile,
338
+ isMobileOpen: openMobileSide === "right",
339
+ setMobileOpen: setRightMobileOpen,
269
340
  isFill: filledSide === "right",
270
341
  toggleFill: toggleRightFill,
271
342
  setFill: setRightFill,
@@ -274,7 +345,8 @@ const SidebarProvider = ({ children, defaultLeftMode = DEFAULT_SIDEBAR_MODE, lef
274
345
  width: rightDragWidth ?? rightWidth,
275
346
  collapsible: rightCollapsible,
276
347
  state: rightState.state,
277
- mode: rightState.mode
348
+ mode: rightState.mode,
349
+ isMobile: isRightMobile
278
350
  }),
279
351
  collapsible: rightCollapsible,
280
352
  variant: rightVariant,
@@ -285,6 +357,13 @@ const SidebarProvider = ({ children, defaultLeftMode = DEFAULT_SIDEBAR_MODE, lef
285
357
  setIsDragging: setIsRightDragging
286
358
  }
287
359
  }), [
360
+ isLeftMobile,
361
+ isRightMobile,
362
+ openMobileSide,
363
+ toggleLeftMobile,
364
+ setLeftMobileOpen,
365
+ toggleRightMobile,
366
+ setRightMobileOpen,
288
367
  leftState,
289
368
  filledSide,
290
369
  toggleLeftFill,
@@ -407,12 +486,39 @@ const SidebarMenuIcon = ({ ref, className, children, ...rest }) => /* @__PURE__
407
486
  children
408
487
  });
409
488
  //#endregion
489
+ //#region src/components/Sidebar/SidebarMenu/useDestinationDismiss.ts
490
+ /**
491
+ * The click handler a sidebar menu item runs: the caller's own, then the sheet's dismissal.
492
+ *
493
+ * - On a phone the rail is a sheet over the page, so a chosen destination has to dismiss it —
494
+ * otherwise the page it navigated to sits behind the overlay.
495
+ * - Two kinds of click are not a destination:
496
+ * - Opening a popup. `DropdownMenu.Trigger` and `Sidebar.SubMenu` both hand their child an
497
+ * `aria-haspopup` / `aria-expanded`, and closing the sheet under their popup would take
498
+ * the popup with it.
499
+ * - Acting on the rail itself. `Sidebar.Trigger` marks its child `data-sidebar-trigger`; its
500
+ * own `toggle` runs after this handler, so dismissing here would hand `toggle` a closed
501
+ * sheet and it would open it straight back up.
502
+ * - Above the breakpoint the caller's `onClick` is all that runs.
503
+ */
504
+ const useDestinationDismiss = (props, onClick) => {
505
+ const { side } = useSidebarInstance();
506
+ const { isMobile, setMobileOpen } = useSidebar(side);
507
+ const isDestination = props["aria-haspopup"] === void 0 && props["aria-expanded"] === void 0 && props["data-sidebar-trigger"] === void 0;
508
+ return (event) => {
509
+ onClick?.(event);
510
+ if (isMobile && isDestination) setMobileOpen(false);
511
+ };
512
+ };
513
+ //#endregion
410
514
  //#region src/components/Sidebar/SidebarMenu/SidebarMenuButton.tsx
411
- const SidebarMenuButton = ({ ref, "aria-selected": selected, className, children, asChild = false, icon, tooltip, ...props }) => {
515
+ const SidebarMenuButton = ({ ref, "aria-selected": selected, className, children, asChild = false, icon, tooltip, onClick, ...props }) => {
412
516
  const Component = asChild ? Root : "button";
413
517
  const { state, mode, side } = useSidebarInstance();
518
+ const handleClick = useDestinationDismiss(props, onClick);
414
519
  const button = /* @__PURE__ */ jsxs(Component, {
415
520
  ...props,
521
+ onClick: handleClick,
416
522
  ref,
417
523
  "data-slot": "sidebar-menu-button",
418
524
  ...asChild ? {} : { type: "button" },
@@ -605,8 +711,9 @@ const SidebarMenuSub = ({ children, icon, isActive = false, label, defaultOpen =
605
711
  };
606
712
  //#endregion
607
713
  //#region src/components/Sidebar/SidebarMenu/SidebarMenuSubItem.tsx
608
- const SidebarMenuSubItem = ({ ref, className, asChild = false, children, disabled, "aria-current": ariaCurrent, ...props }) => {
714
+ const SidebarMenuSubItem = ({ ref, className, asChild = false, children, disabled, onClick, "aria-current": ariaCurrent, ...props }) => {
609
715
  const { mode } = useSidebarInstance();
716
+ const handleClick = useDestinationDismiss(props, onClick);
610
717
  if (mode === "collapsed" || mode === "expand-on-hover") return /* @__PURE__ */ jsx(DropdownMenu.Item, {
611
718
  "aria-current": ariaCurrent,
612
719
  asChild,
@@ -618,6 +725,7 @@ const SidebarMenuSubItem = ({ ref, className, asChild = false, children, disable
618
725
  className: "tw:group/sidebar-menu-sub-item tw:relative",
619
726
  children: /* @__PURE__ */ jsx(asChild ? Root : "button", {
620
727
  ...props,
728
+ onClick: handleClick,
621
729
  ref,
622
730
  "aria-current": ariaCurrent,
623
731
  "data-slot": "sidebar-menu-sub-button",
@@ -725,22 +833,26 @@ const SidebarSeparator = ({ className, ...props }) => /* @__PURE__ */ jsx(Separa
725
833
  //#endregion
726
834
  //#region src/components/Sidebar/SidebarTrigger.tsx
727
835
  const SidebarTrigger = ({ side = "left", onClick, hideWhenCollapsed = false, className, ...rest }) => {
728
- const { toggle } = useSidebar(side);
836
+ const { toggle, state, isMobile, isMobileOpen } = useSidebar(side);
729
837
  const handleOnClick = (event) => {
730
838
  toggle();
731
839
  onClick?.(event);
732
840
  };
733
841
  return /* @__PURE__ */ jsx(Slot, {
734
842
  ...rest,
843
+ "aria-expanded": isMobile ? isMobileOpen : state === "expanded",
844
+ ...isMobile ? { "aria-haspopup": "dialog" } : null,
845
+ "data-sidebar-trigger": "",
735
846
  onClick: handleOnClick,
736
847
  className: cn({ "tw:group-data-[state=collapsed]/sidebar:hidden": hideWhenCollapsed }, className)
737
848
  });
738
849
  };
739
850
  //#endregion
740
851
  //#region src/components/Sidebar/Sidebar.tsx
741
- const Sidebar = ({ children, className, id, side = "left", style, container = false, keepMounted, mountAfterEnter, resizable = false, ...rest }) => {
852
+ const Sidebar = ({ children, className, id, side = "left", style, container = false, keepMounted, mountAfterEnter, resizable = false, mobileTitle, ...rest }) => {
742
853
  const oppositeSide = side === "left" ? "right" : "left";
743
- const { setSidebarElement, state, mode, isFill, widths, collapsible, variant, isDragging } = useSidebar(side);
854
+ const { setSidebarElement, state, mode, isFill, widths, collapsible, variant, isDragging, isMobile, isMobileOpen, setMobileOpen } = useSidebar(side);
855
+ const themeScopeContainer = useThemeScopeContainer();
744
856
  const { isMounted, completeUnmount } = useTransitionPresence({
745
857
  mounted: collapsible !== "off-canvas" || mode !== "collapsed",
746
858
  keepMounted,
@@ -756,6 +868,23 @@ const Sidebar = ({ children, className, id, side = "left", style, container = fa
756
868
  mode,
757
869
  side
758
870
  ]);
871
+ const focusOriginRef = useRef(null);
872
+ useEffect(() => {
873
+ if (!isMobile || isMobileOpen) return;
874
+ const remember = (event) => {
875
+ if (event.target instanceof HTMLElement) focusOriginRef.current = event.target;
876
+ };
877
+ document.addEventListener("focusin", remember);
878
+ return () => document.removeEventListener("focusin", remember);
879
+ }, [isMobile, isMobileOpen]);
880
+ const wasSheetUpRef = useRef(false);
881
+ useEffect(() => {
882
+ const wasSheetUp = wasSheetUpRef.current;
883
+ wasSheetUpRef.current = isMobile && isMobileOpen;
884
+ if (!wasSheetUp || isMobile) return;
885
+ const origin = focusOriginRef.current;
886
+ if (origin?.isConnected) origin.focus();
887
+ }, [isMobile, isMobileOpen]);
759
888
  const handleTransitionEnd = (event) => {
760
889
  if (event.target !== event.currentTarget) return;
761
890
  completeUnmount();
@@ -768,18 +897,54 @@ const Sidebar = ({ children, className, id, side = "left", style, container = fa
768
897
  "--opposite-sidebar-width": `${oppositeWidths.fill}px`
769
898
  };
770
899
  if (variant === "none") return null;
900
+ const railAttributes = {
901
+ "data-state": state,
902
+ "data-side": side,
903
+ "data-mode": mode,
904
+ "data-collapsible": collapsible,
905
+ "data-variant": variant,
906
+ "data-fill": isFill
907
+ };
908
+ if (isMobile) return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(SidebarInstanceContext, {
909
+ value: sidebarInstanceContextValue,
910
+ children: /* @__PURE__ */ jsx(Sheet, {
911
+ open: isMobileOpen,
912
+ onOpenChange: setMobileOpen,
913
+ children: /* @__PURE__ */ jsxs(Sheet.Content, {
914
+ side,
915
+ container: themeScopeContainer ?? void 0,
916
+ className: "tw:w-[min(20rem,85vw)] tw:bg-sidebar tw:text-sidebar-foreground tw:p-0",
917
+ onCloseAutoFocus: (event) => {
918
+ const origin = focusOriginRef.current;
919
+ if (!origin?.isConnected) return;
920
+ event.preventDefault();
921
+ origin.focus();
922
+ },
923
+ children: [/* @__PURE__ */ jsx(Sheet.Title, {
924
+ visuallyHidden: true,
925
+ children: mobileTitle ?? (side === "left" ? "Navigation" : "Side panel")
926
+ }), /* @__PURE__ */ jsx("div", {
927
+ ...rest,
928
+ ...railAttributes,
929
+ id,
930
+ style,
931
+ className: cn("tw:flex tw:min-h-0 tw:flex-1 tw:flex-col", { "tw:group/sidebar tw:peer/sidebar": !container }, className),
932
+ children: /* @__PURE__ */ jsx("div", {
933
+ "data-slot": "sidebar",
934
+ className: cn("tw:bg-sidebar", "tw:relative", "tw:flex", "tw:flex-col", "tw:size-full", "tw:overflow-hidden", "tw:border-sidebar-border", "tw:group-[]/sidebar:pt-2"),
935
+ children
936
+ })
937
+ })]
938
+ })
939
+ })
940
+ }) });
771
941
  return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(SidebarInstanceContext, {
772
942
  value: sidebarInstanceContextValue,
773
943
  children: /* @__PURE__ */ jsxs("div", {
774
944
  ...rest,
945
+ ...railAttributes,
775
946
  id,
776
947
  ref: setSidebarElement,
777
- "data-state": state,
778
- "data-side": side,
779
- "data-mode": mode,
780
- "data-collapsible": collapsible,
781
- "data-variant": variant,
782
- "data-fill": isFill,
783
948
  style: styles,
784
949
  className: cn("tailwindcss-preflight", "tw:flex", "tw:relative", mode === "expand-on-hover" ? "tw:z-[51]" : "tw:z-50", { "tw:group/sidebar tw:peer/sidebar": !container }, "tw:[&>[data-slot=gap]]:w-(--sidebar-width-gap)", "tw:[&[data-side=right]>[data-slot=gap]]:rotate-180", "tw:[&>[data-slot=sidebar-wrapper]]:w-(--sidebar-width)", "tw:[&[data-side=left]>[data-slot=sidebar-wrapper]]:left-0", "tw:[&[data-side=right]>[data-slot=sidebar-wrapper]]:right-0", "tw:[&[data-state=collapsed][data-collapsible=off-canvas][data-side=left]>[data-slot=sidebar-wrapper]]:-translate-x-full", "tw:[&[data-state=collapsed][data-collapsible=off-canvas][data-side=right]>[data-slot=sidebar-wrapper]]:translate-x-full", "tw:[&[data-variant=sided-floating]>[data-slot=sidebar-wrapper]]:pt-(--sidebar-floating-padding)", "tw:[&[data-variant=sided-floating][data-side=left]>[data-slot=sidebar-wrapper]]:pr-(--sidebar-floating-padding)", "tw:[&[data-variant=sided-floating][data-side=right]>[data-slot=sidebar-wrapper]]:pl-(--sidebar-floating-padding)", "tw:[&[data-variant=floating]>[data-slot=sidebar-wrapper]]:p-(--sidebar-floating-padding)", "tw:[&[data-fill=true]>[data-slot=sidebar-wrapper]]:!w-[calc(100svw-var(--opposite-sidebar-width))]", "tw:[&[data-fill=true][data-variant=floating]>[data-slot=sidebar-wrapper]]:!p-(--sidebar-floating-padding)", "tw:[&[data-fill=true][data-variant=sided-floating][data-side=left]>[data-slot=sidebar-wrapper]>[data-slot=sidebar]]:!rounded-tr-xl", "tw:[&[data-fill=true][data-variant=sided-floating][data-side=right]>[data-slot=sidebar-wrapper]>[data-slot=sidebar]]:!rounded-tl-xl", "tw:[&[data-variant=inset][data-side=left]>[data-slot=sidebar-wrapper]>[data-slot=sidebar]]:border-r", "tw:[&[data-variant=inset][data-side=right]>[data-slot=sidebar-wrapper]>[data-slot=sidebar]]:border-l", "tw:[&[data-variant=floating]>[data-slot=sidebar-wrapper]>[data-slot=sidebar]]:shadow", "tw:[&[data-variant=floating]>[data-slot=sidebar-wrapper]>[data-slot=sidebar]]:rounded-xl", "tw:[&[data-variant=sided-floating]>[data-slot=sidebar-wrapper]>[data-slot=sidebar]]:shadow", "tw:[&[data-variant=sided-floating][data-side=left]>[data-slot=sidebar-wrapper]>[data-slot=sidebar]]:rounded-tr-xl", "tw:[&[data-variant=sided-floating][data-side=right]>[data-slot=sidebar-wrapper]>[data-slot=sidebar]]:rounded-tl-xl", "tw:[&[data-variant=sided-floating][data-side=left]>[data-slot=sidebar-wrapper]>[data-slot=sidebar]]:border-r", "tw:[&[data-variant=sided-floating][data-side=right]>[data-slot=sidebar-wrapper]>[data-slot=sidebar]]:border-l", isDragging ? "tw:transition-none" : "tw:transition-[width,translate,transform] tw:duration-(--sidebar-motion-duration) tw:ease-(--sidebar-motion-easing) tw:motion-reduce:transition-none"),
785
950
  children: [/* @__PURE__ */ jsx("div", {
@@ -822,4 +987,4 @@ Sidebar.SubItem = SidebarMenuSubItem;
822
987
  //#endregion
823
988
  export { Sidebar, SidebarProvider, useOptionalSidebar, useSidebar };
824
989
 
825
- //# sourceMappingURL=Sidebar-D3cY1kha.js.map
990
+ //# sourceMappingURL=Sidebar-CLEbBtNY.js.map