@ngrok/mantle 0.94.0 → 0.95.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.
- package/README.md +11 -2
- package/dist/CaretDown-MgTrjdYK.js +1 -0
- package/dist/CaretLeft-CZIqCyEF.js +1 -0
- package/dist/CaretRight-BKz4JHCI.js +1 -0
- package/dist/Check-C5a1hX4x.js +1 -0
- package/dist/CheckCircle-Bi4tSau6.js +1 -0
- package/dist/CircleNotch-BKE0NAIr.js +1 -0
- package/dist/Copy-BYWMO6PW.js +1 -0
- package/dist/Desktop-BaSlSeg2.js +1 -0
- package/dist/Eye-C38LQkZ_.js +1 -0
- package/dist/EyeClosed-BvOq-W8o.js +1 -0
- package/dist/FileText-CqAezJDn.js +1 -0
- package/dist/Info-weHV1B4q.js +1 -0
- package/dist/MagnifyingGlass-DCAoDH5_.js +1 -0
- package/dist/Megaphone-Cir2KHXa.js +1 -0
- package/dist/Minus-KBzmC4_K.js +1 -0
- package/dist/Moon-hn_oivM6.js +1 -0
- package/dist/Plus-D90-H9Ei.js +1 -0
- package/dist/Question-BhvEyO0K.js +1 -0
- package/dist/SidebarSimple-BXKgNz4l.js +1 -0
- package/dist/SortAscending-CEk4rgu_.js +1 -0
- package/dist/SortDescending-C0cE7hpU.js +1 -0
- package/dist/Sun-C3SaXdLl.js +1 -0
- package/dist/Terminal-aKZ6Y9Lk.js +1 -0
- package/dist/Warning-DTwF27_O.js +1 -0
- package/dist/WarningDiamond-BwpdVJ34.js +1 -0
- package/dist/X-BPGjP4b6.js +1 -0
- package/dist/accordion-BmDXs1-q.js +1 -0
- package/dist/accordion-NpJz3Uer.js +1 -0
- package/dist/accordion-parts.d.ts +268 -0
- package/dist/accordion-parts.js +1 -0
- package/dist/accordion.d.ts +8 -359
- package/dist/accordion.js +1 -1
- package/dist/agent.json +464 -92
- package/dist/alert-DCGSrVTa.js +1 -0
- package/dist/{alert-HffaioZM.d.ts → alert-Dz541Ve9.d.ts} +10 -196
- package/dist/alert-center-Bb39SBqJ.js +1 -0
- package/dist/alert-center-CGBbqO-y.d.ts +391 -0
- package/dist/alert-center-parts.d.ts +6 -0
- package/dist/alert-center-parts.js +1 -0
- package/dist/alert-center.d.ts +9 -590
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog-CtKnvX5N.js +1 -0
- package/dist/alert-dialog-parts.d.ts +569 -0
- package/dist/alert-dialog-parts.js +1 -0
- package/dist/alert-dialog.d.ts +3 -1054
- package/dist/alert-dialog.js +1 -1
- package/dist/alert-parts.d.ts +6 -0
- package/dist/alert-parts.js +1 -0
- package/dist/alert.d.ts +43 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-DW5_Gb-1.js +1 -0
- package/dist/anchor.d.ts +6 -6
- package/dist/anchor.js +1 -1
- package/dist/app-layout-D7kwv9su.js +1 -0
- package/dist/app-layout-k6UjK30v.d.ts +1167 -0
- package/dist/app-layout-parts.d.ts +6 -0
- package/dist/app-layout-parts.js +1 -0
- package/dist/app-layout.d.ts +98 -1883
- package/dist/app-layout.js +1 -1
- package/dist/area-chart-C6lKu7Un.d.ts +390 -0
- package/dist/area-chart-SAaGaZFD.js +1 -0
- package/dist/area-chart-parts.d.ts +6 -0
- package/dist/area-chart-parts.js +1 -0
- package/dist/area-chart.d.ts +6 -581
- package/dist/area-chart.js +1 -1
- package/dist/avatar-BMZ81f_5.js +1 -0
- package/dist/avatar-Ti8GKSnS.d.ts +201 -0
- package/dist/avatar-parts.d.ts +6 -0
- package/dist/avatar-parts.js +1 -0
- package/dist/avatar.d.ts +5 -277
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +10 -9
- package/dist/badge.js +1 -1
- package/dist/bar-chart-C0Ra1ZpG.js +1 -0
- package/dist/bar-chart-Cb5fA8V7.d.ts +386 -0
- package/dist/bar-chart-parts.d.ts +6 -0
- package/dist/bar-chart-parts.js +1 -0
- package/dist/bar-chart.d.ts +4 -583
- package/dist/bar-chart.js +1 -1
- package/dist/behaviors-BW8RjkkS.js +1 -0
- package/dist/behaviors-BbOq5SFv.js +1 -0
- package/dist/behaviors-C7R7ZIoN.js +1 -0
- package/dist/behaviors-CHF5PT3C.js +1 -0
- package/dist/behaviors-CSZQSSfL.js +1 -0
- package/dist/behaviors-CcjvGa0d.js +1 -0
- package/dist/behaviors-CnarRd47.js +1 -0
- package/dist/behaviors-CoNi6Rd-.js +1 -0
- package/dist/behaviors-D9VIyDk1.js +1 -0
- package/dist/behaviors-DHVC34f9.js +1 -0
- package/dist/behaviors-DkCIgQ8w.js +1 -0
- package/dist/behaviors-Mkc_HjTB.js +1 -0
- package/dist/breadcrumb-CAzq3SlR.js +1 -0
- package/dist/breadcrumb-parts.d.ts +287 -0
- package/dist/breadcrumb-parts.js +1 -0
- package/dist/breadcrumb.d.ts +65 -555
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only-CokCtIvB.js +1 -0
- package/dist/browser-only-ymFoM3Ya.js +1 -0
- package/dist/browser-only.js +1 -1
- package/dist/button-Bqm7U0OC.js +1 -0
- package/dist/{button-K0pKc3GN.d.ts → button-C6-6TecO.d.ts} +5 -5
- package/dist/{button-BGwOPjGV.d.ts → button-CL17Dxza.d.ts} +28 -25
- package/dist/button-CRCiBPEF.js +1 -0
- package/dist/{button-Cgf2IcEC.d.ts → button-CRMoQyum.d.ts} +27 -28
- package/dist/button-Cr2iY2cI.js +1 -0
- package/dist/button-DhoE-BbZ.js +1 -0
- package/dist/button.d.ts +3 -3
- package/dist/button.js +1 -1
- package/dist/calendar-DQtapcSC.js +1 -0
- package/dist/calendar.d.ts +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card-DbtGVKyo.d.ts +129 -0
- package/dist/card-parts.d.ts +6 -0
- package/dist/card-parts.js +1 -0
- package/dist/card.d.ts +3 -228
- package/dist/card.js +1 -1
- package/dist/centered-layout-parts.d.ts +169 -0
- package/dist/centered-layout-parts.js +1 -0
- package/dist/centered-layout.d.ts +3 -300
- package/dist/centered-layout.js +1 -1
- package/dist/chart-B0n2xyYi.js +1 -0
- package/dist/chart-BPsMxs1f.js +1 -0
- package/dist/chart-BmZoTjRu.js +1 -0
- package/dist/chart-Bybyh2Dc.js +1 -0
- package/dist/chart-CACfdGlp.d.ts +86 -0
- package/dist/chart-CBQJUTIX.js +1 -0
- package/dist/chart-Cb0MBaZx.js +1 -0
- package/dist/chart-CmMcfDmv.js +1 -0
- package/dist/chart-Dlp9FidW.js +2 -0
- package/dist/{chart-jitNqimS.d.ts → chart-XvStK-oM.d.ts} +23 -99
- package/dist/chart-wTwYzUMJ.js +1 -0
- package/dist/checkbox-DH7WFfuR.js +1 -0
- package/dist/checkbox-DsVXD96X.js +1 -0
- package/dist/checkbox-TX74-Iep.js +1 -0
- package/dist/checkbox-group-parts.d.ts +197 -0
- package/dist/checkbox-group-parts.js +1 -0
- package/dist/checkbox.d.ts +60 -9
- package/dist/checkbox.js +1 -1
- package/dist/choice-BekuLm-b.d.ts +217 -0
- package/dist/choice-DGI8VNR9.d.ts +1 -0
- package/dist/choice-PDT386cc.js +1 -0
- package/dist/choice-parts.d.ts +7 -0
- package/dist/choice-parts.js +1 -0
- package/dist/choice.d.ts +63 -1
- package/dist/choice.js +1 -1
- package/dist/code-UKPv6LVP.js +1 -0
- package/dist/{code-block-W3kWPxCJ.js → code-block-B-xD4_RW.js} +1 -1
- package/dist/code-block-B7XPzZnp.js +1 -0
- package/dist/code-block-BXXceNVo.js +1 -0
- package/dist/code-block-C7uzLs8t.js +1 -0
- package/dist/{code-block-BGdV4Yty.d.ts → code-block-Cs1Lcmdr.d.ts} +82 -253
- package/dist/code-block-Erv7wuWW.d.ts +173 -0
- package/dist/code-block-parts.d.ts +380 -0
- package/dist/code-block-parts.js +1 -0
- package/dist/code-block.d.ts +66 -693
- package/dist/code-block.js +6 -6
- package/dist/code-block_highlight-utils.d.ts +2 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +4 -4
- package/dist/code.js +1 -1
- package/dist/combobox-6LXe1cLx.js +1 -0
- package/dist/combobox-parts.d.ts +303 -0
- package/dist/combobox-parts.js +1 -0
- package/dist/combobox.d.ts +5 -468
- package/dist/combobox.js +1 -1
- package/dist/command-B8L-zjGt.js +1 -0
- package/dist/command-CCMWCjAK.js +1 -0
- package/dist/command-VKj84zAX.d.ts +859 -0
- package/dist/command-cbgO9CiG.js +1 -0
- package/dist/command-parts.d.ts +6 -0
- package/dist/command-parts.js +1 -0
- package/dist/command.d.ts +91 -1135
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdRUneoc.js +1 -0
- package/dist/compose-refs-Ce1vWUz0.js +1 -0
- package/dist/cx-CfAFHj5_.js +73 -0
- package/dist/cx-DhYnQ07J.js +1 -0
- package/dist/cx.d.ts +23 -17
- package/dist/cx.js +1 -1
- package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
- package/dist/data-table-C-FgaN3_.js +1 -0
- package/dist/data-table-Cw9dUo1w.js +1 -0
- package/dist/data-table-CwqrMtp0.js +1 -0
- package/dist/data-table-GUbt8mzo.d.ts +38 -0
- package/dist/data-table-parts.d.ts +763 -0
- package/dist/data-table-parts.js +1 -0
- package/dist/data-table.d.ts +21 -1217
- package/dist/data-table.js +1 -1
- package/dist/description-list-CjcKOOnr.d.ts +110 -0
- package/dist/description-list-parts.d.ts +6 -0
- package/dist/description-list-parts.js +1 -0
- package/dist/description-list.d.ts +3 -183
- package/dist/description-list.js +1 -1
- package/dist/dialog-4Ed3U7hz.js +1 -0
- package/dist/dialog-BDb_obii.d.ts +166 -0
- package/dist/dialog-BaR9D58J.js +1 -0
- package/dist/dialog-BkNxAcol.d.ts +467 -0
- package/dist/dialog-DSYuhFD5.js +1 -0
- package/dist/dialog-fXMCxM9W.js +1 -0
- package/dist/dialog-parts.d.ts +6 -0
- package/dist/dialog-parts.js +1 -0
- package/dist/dialog.d.ts +88 -2
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-BuluRn0Z.js +1 -0
- package/dist/dropdown-menu-CDXlp0QT.d.ts +507 -0
- package/dist/dropdown-menu-parts.d.ts +6 -0
- package/dist/dropdown-menu-parts.js +1 -0
- package/dist/dropdown-menu.d.ts +57 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty-parts.d.ts +120 -0
- package/dist/empty-parts.js +1 -0
- package/dist/empty.d.ts +2 -216
- package/dist/empty.js +1 -1
- package/dist/field-BRYypbjO.js +1 -0
- package/dist/field-BVMx7HoG.js +1 -0
- package/dist/field-BwCq1b9R.js +1 -0
- package/dist/field-CYAaNexp.js +1 -0
- package/dist/field-DRHAcM1s.js +1 -0
- package/dist/field-parts.d.ts +767 -0
- package/dist/field-parts.js +1 -0
- package/dist/field.d.ts +21 -1201
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +3 -3
- package/dist/flag.js +1 -1
- package/dist/float-C_vwTtzU.js +1 -0
- package/dist/float-JmSzKDHd.js +1 -0
- package/dist/float-OhVY3cf4.js +1 -0
- package/dist/hooks-B-Cd15iL.js +1 -0
- package/dist/hooks-BP_uqBsI.js +1 -0
- package/dist/hooks-BeLOGKwE.js +1 -0
- package/dist/hooks-BsOjpTgs.js +1 -0
- package/dist/hooks-BybaGF7O.js +1 -0
- package/dist/hooks-C9b-2wGy.js +1 -0
- package/dist/hooks-CMmpICCH.js +1 -0
- package/dist/hooks-CUYIUcp6.js +1 -0
- package/dist/hooks-DKbOd_pQ.js +1 -0
- package/dist/hooks-DejuqCNF.js +1 -0
- package/dist/hooks-GsDfo7Zl.js +1 -0
- package/dist/hooks-PsYFJkz2.js +1 -0
- package/dist/hooks-lDz_S9UG.js +1 -0
- package/dist/hooks.d.ts +126 -17
- package/dist/hooks.js +1 -1
- package/dist/hover-card-BEC5EQiH.js +1 -0
- package/dist/hover-card-parts.d.ts +160 -0
- package/dist/hover-card-parts.js +1 -0
- package/dist/hover-card.d.ts +9 -281
- package/dist/hover-card.js +1 -1
- package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
- package/dist/icon-0RoVrpGj.js +1 -0
- package/dist/icon-BSGMvJ0W.js +1 -0
- package/dist/icon-DIiKxRTh.js +1 -0
- package/dist/{icon-DXDyhy2N.d.ts → icon-Dqn_LLrR.d.ts} +2 -2
- package/dist/{icon-NYvyyRMG.d.ts → icon-KTcDR4--.d.ts} +2 -2
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/icons-CVgj9Whd.js +1 -0
- package/dist/icons-D_4cZaL1.js +1 -0
- package/dist/icons-DucrvIOa.js +1 -0
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +1 -1
- package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
- package/dist/{index-KJ06KK6t.d.ts → index-CCkilmv8.d.ts} +1 -1
- package/dist/input-83xaPZWK.js +1 -0
- package/dist/input-B78ah4AB.js +1 -0
- package/dist/{input-q8o5uMhW.d.ts → input-Bvpu3ruQ.d.ts} +2 -2
- package/dist/input.d.ts +5 -5
- package/dist/input.js +1 -1
- package/dist/kbd-Bz_Rbpv8.js +1 -0
- package/dist/kbd.d.ts +5 -5
- package/dist/kbd.js +1 -1
- package/dist/{label-r2sJcSQ4.d.ts → label-DZpKu3Pu.d.ts} +8 -8
- package/dist/label-DmkAp9xI.js +1 -0
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/layer-container-DDOZJ0fn.js +1 -0
- package/dist/layer-container.d.ts +11 -3
- package/dist/layer-container.js +1 -1
- package/dist/line-chart-CBL7eCqF.js +1 -0
- package/dist/line-chart-CIDFDkyb.d.ts +380 -0
- package/dist/line-chart-parts.d.ts +6 -0
- package/dist/line-chart-parts.js +1 -0
- package/dist/line-chart.d.ts +5 -569
- package/dist/line-chart.js +1 -1
- package/dist/list-CC3Pi__V.js +1 -0
- package/dist/list-Cx4KNfgC.d.ts +286 -0
- package/dist/list-FiFQJ0BU.js +1 -0
- package/dist/list-parts.d.ts +6 -0
- package/dist/list-parts.js +1 -0
- package/dist/list.d.ts +9 -406
- package/dist/list.js +1 -1
- package/dist/live-region-78gbKwlB.js +1 -0
- package/dist/live-region.d.ts +2 -2
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +50 -26
- package/dist/main-9d96oUPG.js +1 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +1304 -910
- package/dist/media-object-parts.d.ts +65 -0
- package/dist/media-object-parts.js +1 -0
- package/dist/media-object.d.ts +5 -121
- package/dist/media-object.js +1 -1
- package/dist/migrations/0017-select-owned-behavior.yml +117 -0
- package/dist/migrations/0018-combobox-owned-behavior.yml +1661 -0
- package/dist/migrations/0019-multi-select-owned-behavior.yml +1414 -0
- package/dist/migrations/0020-native-floats.yml +823 -0
- package/dist/migrations/0021-native-radio-group.yml +397 -0
- package/dist/migrations/0024-command-owned-behavior.yml +66 -0
- package/dist/migrations/0026-native-dropdown-menu.yml +351 -0
- package/dist/migrations/0029-data-attribute-contract.yml +1707 -0
- package/dist/migrations/0030-between-variant.yml +1954 -0
- package/dist/multi-select-parts.d.ts +487 -0
- package/dist/multi-select-parts.js +1 -0
- package/dist/multi-select-qC0BuYKD.js +1 -0
- package/dist/multi-select.d.ts +6 -803
- package/dist/multi-select.js +1 -1
- package/dist/otp-input-LPdkb_Fg.js +1 -0
- package/dist/otp-input-parts.d.ts +211 -0
- package/dist/otp-input-parts.js +1 -0
- package/dist/otp-input-zl6MVio6.js +1 -0
- package/dist/otp-input.d.ts +11 -252
- package/dist/otp-input.js +1 -1
- package/dist/overlay-prompt-BIzMQvx7.js +1 -0
- package/dist/overlay-prompt-CDnhSoPJ.js +1 -0
- package/dist/overlay-prompt.d.ts +57 -0
- package/dist/overlay-prompt.js +1 -0
- package/dist/pagination-B2ESEbMI.d.ts +171 -0
- package/dist/pagination-CxaLKZcE.js +1 -0
- package/dist/pagination-Df1gTCN-.js +1 -0
- package/dist/pagination-cursor-pagination-parts.d.ts +6 -0
- package/dist/pagination-cursor-pagination-parts.js +1 -0
- package/dist/pagination.d.ts +39 -304
- package/dist/pagination.js +1 -1
- package/dist/popover-DOd6zLvE.d.ts +226 -0
- package/dist/popover-DWvHbepV.js +1 -0
- package/dist/popover-parts.d.ts +6 -0
- package/dist/popover-parts.js +1 -0
- package/dist/popover.d.ts +60 -2
- package/dist/popover.js +1 -1
- package/dist/position-Cv3XpSur.d.ts +5 -0
- package/dist/progress-BE0c8GW8.js +1 -0
- package/dist/progress-ZhFJhv9u.js +1 -0
- package/dist/progress-bar-parts.d.ts +86 -0
- package/dist/progress-bar-parts.js +1 -0
- package/dist/progress-donut-parts.d.ts +94 -0
- package/dist/progress-donut-parts.js +1 -0
- package/dist/progress-mJQMhxMX.js +1 -0
- package/dist/progress-zDpT3TY4.d.ts +2 -0
- package/dist/progress.d.ts +4 -268
- package/dist/progress.js +1 -1
- package/dist/qr-code-0zh10iIE.d.ts +148 -0
- package/dist/qr-code-BOOubA9x.js +1 -0
- package/dist/qr-code-D8tBKtjP.js +1 -0
- package/dist/qr-code-DzJjumoc.d.ts +46 -0
- package/dist/qr-code-encoder.browser.d.ts +15 -0
- package/dist/qr-code-encoder.browser.js +1 -0
- package/dist/qr-code-encoder.d.ts +15 -0
- package/dist/qr-code-encoder.js +1 -0
- package/dist/qr-code-parts.d.ts +6 -0
- package/dist/qr-code-parts.js +1 -0
- package/dist/qr-code.d.ts +4 -227
- package/dist/qr-code.js +1 -1
- package/dist/query-C0e5VYNp.d.ts +440 -0
- package/dist/query-V5NifJGs.js +1 -0
- package/dist/query-filter.d.ts +6 -6
- package/dist/query-filter.js +1 -1
- package/dist/query-parts.d.ts +6 -0
- package/dist/query-parts.js +1 -0
- package/dist/query.d.ts +5 -634
- package/dist/query.js +1 -1
- package/dist/radio-group-B9jtIbV1.d.ts +39 -0
- package/dist/radio-group-BliblUqe.js +1 -0
- package/dist/radio-group-f3ThXQCx.js +1 -0
- package/dist/radio-group-parts.d.ts +249 -0
- package/dist/radio-group-parts.js +1 -0
- package/dist/radio-group-zA5DjlLg.js +1 -0
- package/dist/radio-group.d.ts +7 -399
- package/dist/radio-group.js +1 -1
- package/dist/sandbar-Cm2yMjEZ.js +1 -0
- package/dist/sandbar-DU4wpKRc.d.ts +345 -0
- package/dist/sandbar-parts.d.ts +6 -0
- package/dist/sandbar-parts.js +1 -0
- package/dist/sandbar.d.ts +6 -441
- package/dist/sandbar.js +1 -1
- package/dist/sandboxed-on-click-Cg3lewoG.js +1 -0
- package/dist/sandboxed-on-click-DOw_Jkhk.js +1 -0
- package/dist/sandboxed-on-click.d.ts +1 -1
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot-1vFxkpjT.js +1 -0
- package/dist/scatter-plot-D25jLIVw.d.ts +388 -0
- package/dist/scatter-plot-parts.d.ts +6 -0
- package/dist/scatter-plot-parts.js +1 -0
- package/dist/scatter-plot.d.ts +5 -575
- package/dist/scatter-plot.js +1 -1
- package/dist/segmented-control-DuiDPKDZ.js +1 -0
- package/dist/segmented-control-parts.d.ts +72 -0
- package/dist/segmented-control-parts.js +1 -0
- package/dist/segmented-control.d.ts +4 -100
- package/dist/segmented-control.js +1 -1
- package/dist/select-08IEtypH.js +1 -0
- package/dist/select-DM2wWfOO.d.ts +478 -0
- package/dist/select-parts.d.ts +6 -0
- package/dist/select-parts.js +1 -0
- package/dist/select.d.ts +63 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list-Ax5F2Gz1.js +1 -0
- package/dist/selectable-list-CyLc3EEt.d.ts +407 -0
- package/dist/selectable-list-GcpbbRM1.js +1 -0
- package/dist/selectable-list-parts.d.ts +6 -0
- package/dist/selectable-list-parts.js +1 -0
- package/dist/selectable-list.d.ts +7 -647
- package/dist/selectable-list.js +1 -1
- package/dist/separator-BB1ohsjn.js +1 -0
- package/dist/{separator-QfH0ot5K.d.ts → separator-BzHNVyyv.d.ts} +2 -2
- package/dist/separator.d.ts +1 -1
- package/dist/separator.js +1 -1
- package/dist/sheet-5JgxVaWC.js +1 -0
- package/dist/sheet-parts.d.ts +732 -0
- package/dist/sheet-parts.js +1 -0
- package/dist/sheet-qYPi5MP8.js +1 -0
- package/dist/sheet.d.ts +11 -1208
- package/dist/sheet.js +1 -1
- package/dist/sidebar-CsC9fyPL.js +1 -0
- package/dist/sidebar-OBA7L42d.d.ts +1480 -0
- package/dist/sidebar-parts.d.ts +6 -0
- package/dist/sidebar-parts.js +1 -0
- package/dist/sidebar.d.ts +108 -2518
- package/dist/sidebar.js +1 -1
- package/dist/skeleton-DB0oQyAx.js +1 -0
- package/dist/skeleton.d.ts +5 -5
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link-BGhAWSqB.js +1 -0
- package/dist/skip-to-main-link.d.ts +1 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider-YlBozcPQ.js +1 -0
- package/dist/slider.d.ts +150 -16
- package/dist/slider.js +1 -1
- package/dist/slot-5ZSmrISx.d.ts +19 -0
- package/dist/slot-BxngGBJ2.js +1 -0
- package/dist/slot-CBcGhRdV.js +1 -0
- package/dist/slot-tuk2J6bY.d.ts +50 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/source-all.css +5 -1
- package/dist/split-button-DvJHD7cZ.js +1 -0
- package/dist/split-button-parts.d.ts +178 -0
- package/dist/split-button-parts.js +1 -0
- package/dist/split-button.d.ts +2 -314
- package/dist/split-button.js +1 -1
- package/dist/strata-parts.d.ts +256 -0
- package/dist/strata-parts.js +1 -0
- package/dist/strata.d.ts +6 -495
- package/dist/strata.js +1 -1
- package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
- package/dist/switch-DajWYrq3.js +1 -0
- package/dist/switch.d.ts +37 -5
- package/dist/switch.js +1 -1
- package/dist/{table-rWiVWEgB.d.ts → table-C2KnE83u.d.ts} +6 -445
- package/dist/table-DJHK48-8.js +1 -0
- package/dist/table-parts.d.ts +6 -0
- package/dist/table-parts.js +1 -0
- package/dist/table.d.ts +81 -1
- package/dist/table.js +1 -1
- package/dist/tabs-36-4SlRo.js +1 -0
- package/dist/tabs-CC_HAqr4.d.ts +193 -0
- package/dist/tabs-DayeszXP.js +1 -0
- package/dist/tabs-headless-tabs-parts.d.ts +6 -0
- package/dist/tabs-headless-tabs-parts.js +1 -0
- package/dist/tabs-parts.d.ts +237 -0
- package/dist/tabs-parts.js +1 -0
- package/dist/tabs.d.ts +43 -420
- package/dist/tabs.js +1 -1
- package/dist/text-area-D29JTaZg.js +1 -0
- package/dist/text-area.d.ts +2 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-D6rP5Fy8.js +1 -0
- package/dist/theme-switcher-PKMCyJxT.js +1 -0
- package/dist/theme-switcher.d.ts +26 -22
- package/dist/theme-switcher.js +1 -1
- package/dist/theme-xoFnLba6.js +1 -0
- package/dist/theme.d.ts +84 -77
- package/dist/theme.js +1 -1
- package/dist/time-zone-CpWYKHdp.js +1 -0
- package/dist/time-zone-DZ4hUJ8K.js +1 -0
- package/dist/time-zone.d.ts +190 -0
- package/dist/time-zone.js +1 -0
- package/dist/toast-BJZ__22c.js +1 -0
- package/dist/toast-Cb9IN-6e.d.ts +185 -0
- package/dist/toast-DM_oq-3E.js +1 -0
- package/dist/toast-parts.d.ts +6 -0
- package/dist/toast-parts.js +1 -0
- package/dist/toast.d.ts +7 -256
- package/dist/toast.js +1 -1
- package/dist/tokens.dark.json +3026 -0
- package/dist/tokens.json +4867 -0
- package/dist/tokens.resolver.json +37 -0
- package/dist/tooltip-D4HZn19B.js +1 -0
- package/dist/tooltip-DP6Lz6jv.d.ts +180 -0
- package/dist/tooltip-Uy-kz0rK.d.ts +1 -0
- package/dist/tooltip-parts.d.ts +7 -0
- package/dist/tooltip-parts.js +1 -0
- package/dist/tooltip.d.ts +57 -1
- package/dist/tooltip.js +1 -1
- package/dist/truncated-text-B5u2AlNg.js +1 -0
- package/dist/truncated-text-BoXHP-cD.js +1 -0
- package/dist/truncated-text.d.ts +4 -6
- package/dist/truncated-text.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/typography-C2BmSH12.d.ts +148 -0
- package/dist/typography-parts.d.ts +6 -0
- package/dist/typography-parts.js +1 -0
- package/dist/typography.d.ts +52 -0
- package/dist/typography.js +1 -0
- package/dist/use-combobox-OhIEVioc.d.ts +23 -0
- package/dist/use-float-WEqqhXBE.d.ts +18 -0
- package/dist/use-listbox-D4uIonSN.d.ts +1 -0
- package/dist/utils-BN3rwHzz.js +1 -0
- package/dist/utils-BlLYcYik.js +1 -0
- package/dist/utils-C4astHJG.js +1 -0
- package/dist/utils-CPSttKPD.js +1 -0
- package/dist/{copy-to-clipboard-DInu78k_.js → utils-Dd83caRw.js} +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.d.ts +2 -2
- package/dist/visually-hidden.js +1 -1
- package/dist/well.d.ts +2 -2
- package/dist/well.js +1 -1
- package/dist/world-map-BDd3N_Ap.d.ts +424 -0
- package/dist/world-map-D3c8Pq-h.js +1 -0
- package/dist/world-map-parts.d.ts +6 -0
- package/dist/world-map-parts.js +1 -0
- package/dist/world-map-t9U-IMKS.js +1 -0
- package/dist/world-map.d.ts +80 -0
- package/dist/world-map.js +1 -0
- package/package.json +30 -19
- package/dist/alert-CH99Rw-R.js +0 -1
- package/dist/anchor-CgcbWEUs.js +0 -1
- package/dist/browser-only-BTSrYWLj.js +0 -1
- package/dist/button-69InNC_m.js +0 -1
- package/dist/button-BQZ6eoD3.js +0 -1
- package/dist/button-BWGUuWnu.js +0 -1
- package/dist/button-Cu9e3SM7.js +0 -1
- package/dist/chart-BO9EwQ60.js +0 -1
- package/dist/chart-CE5Uaqz9.js +0 -1
- package/dist/chart-DCTGGlWL.js +0 -1
- package/dist/chart-DudCw24t.js +0 -2
- package/dist/checkbox-CS504fKk.js +0 -1
- package/dist/choice-BwfmbepO.d.ts +0 -405
- package/dist/choice-uyYccm0A.js +0 -1
- package/dist/clsx-DUGZgXfJ.js +0 -1
- package/dist/clsx-Dj3RWZ2l.js +0 -1
- package/dist/code-DUJzSl4K.js +0 -1
- package/dist/compose-refs-sFdxsL7k.js +0 -1
- package/dist/cx-CK7o_rVv.js +0 -1
- package/dist/dialog-B9JAGy_x.d.ts +0 -28
- package/dist/dialog-CsugEt2A.js +0 -1
- package/dist/dialog-DD5H3EH1.d.ts +0 -942
- package/dist/dropdown-menu-DHdgaw4P.js +0 -1
- package/dist/dropdown-menu-DmDxYPde.d.ts +0 -775
- package/dist/field-Bihblt8U.js +0 -1
- package/dist/field-CPvjazWN.js +0 -1
- package/dist/icon-BudQMD2S.js +0 -1
- package/dist/icon-kK0c-POG.js +0 -1
- package/dist/icons-4JA-SGfv.js +0 -1
- package/dist/icons-CDLz5lpI.js +0 -1
- package/dist/icons-CSwTVV2m.js +0 -1
- package/dist/input-DHovzBjS.js +0 -1
- package/dist/input-DQyN6gN0.js +0 -1
- package/dist/interactive-target-BXScNeOr.js +0 -1
- package/dist/kbd-CLHsJ99p.js +0 -1
- package/dist/label-DmDwzPD8.js +0 -1
- package/dist/layer-container-kEQiE4zV.js +0 -1
- package/dist/list-CO_yLdln.js +0 -1
- package/dist/live-region-DQ1QLv3L.js +0 -1
- package/dist/main-CC1L9IsH.js +0 -1
- package/dist/popover-BhTFutCz.d.ts +0 -1
- package/dist/popover-DxOqLKxy.js +0 -1
- package/dist/popover-lwkwWcRW.d.ts +0 -291
- package/dist/primitive-Dz9Al-us.js +0 -1
- package/dist/radio-group-jj2abc0t.js +0 -1
- package/dist/radio-group-sLz5AA9I.d.ts +0 -27
- package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
- package/dist/select-BqmpVJJT.d.ts +0 -890
- package/dist/select-C6Su0dU0.js +0 -1
- package/dist/separator-DfzxVutO.js +0 -1
- package/dist/shake-DL6WhMXM.js +0 -1
- package/dist/sheet-Bd2LIhzF.js +0 -1
- package/dist/skeleton-DBpI-ko5.js +0 -1
- package/dist/slot-D12N_fZJ.d.ts +0 -67
- package/dist/slot-DdYN1L1C.js +0 -1
- package/dist/table-CFHiDBW8.js +0 -1
- package/dist/theme-DdZgLvKH.js +0 -1
- package/dist/tooltip-CpK3XTor.d.ts +0 -283
- package/dist/tooltip-b6oiTaWq.js +0 -1
- package/dist/use-breakpoint--mo7kr9d.js +0 -1
- package/dist/use-callback-ref-BvVyI5K1.js +0 -1
- package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
- package/dist/use-inert-siblings-CNmNuS2h.js +0 -1
- package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
- package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
- package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
- package/dist/use-matches-media-query-m860lols.js +0 -1
- package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
- package/dist/use-swipe-to-dismiss-i__cTF2v.js +0 -1
- /package/dist/{suggestions-Ciz2vaJO.js → query-filter-Ciz2vaJO.js} +0 -0
- /package/dist/{radio-group-HDVxTNPi.js → sidebar-HDVxTNPi.js} +0 -0
- /package/dist/{direction-CvDpql3O.js → sorting-CvDpql3O.js} +0 -0
- /package/dist/{booleanish-BfvnW6vy.js → types-BfvnW6vy.js} +0 -0
- /package/dist/{css-properties-D85fCNV3.js → types-D85fCNV3.js} +0 -0
- /package/dist/{alternate-announcement-BkH4bOKp.js → utils-BkH4bOKp.js} +0 -0
- /package/dist/{in-view-Dxv_GrUU.js → utils-Dxv_GrUU.js} +0 -0
- /package/dist/{data-slot-EM6s2WEU.js → utils-EM6s2WEU.js} +0 -0
- /package/dist/{cookie-ca4g5CKp.js → utils-ca4g5CKp.js} +0 -0
|
@@ -0,0 +1,1480 @@
|
|
|
1
|
+
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { n as WithAsChild, t as SelfClosingWithAsChild } from "./as-child-DFxX3U2i.js";
|
|
3
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
4
|
+
import { n as IconButtonProps } from "./button-CL17Dxza.js";
|
|
5
|
+
import { n as Separator } from "./separator-BzHNVyyv.js";
|
|
6
|
+
import { t as Content } from "./tooltip-DP6Lz6jv.js";
|
|
7
|
+
import "./tooltip-Uy-kz0rK.js";
|
|
8
|
+
/**
|
|
9
|
+
* The breakpoints below which `Sidebar.Nav` swaps from the inline desktop
|
|
10
|
+
* panel to the mobile sheet presentation. Kept to a closed set because the
|
|
11
|
+
* pre-hydration visibility classes are static strings (Tailwind cannot see
|
|
12
|
+
* interpolated class names).
|
|
13
|
+
*
|
|
14
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Sidebar.Root mobileBreakpoint="md">…</Sidebar.Root>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
type SidebarMobileBreakpoint = "sm" | "md" | "lg";
|
|
22
|
+
/**
|
|
23
|
+
* The state and actions shared by every part under a `Sidebar.Root`, returned
|
|
24
|
+
* by {@link useSidebar}. Use it to build custom triggers, keyboard shortcuts,
|
|
25
|
+
* or close-on-navigate behavior.
|
|
26
|
+
*
|
|
27
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* function CollapseSidebarButton() {
|
|
32
|
+
* const { open, toggle } = useSidebar();
|
|
33
|
+
* return (
|
|
34
|
+
* <button type="button" onClick={toggle}>
|
|
35
|
+
* {open ? "Collapse" : "Expand"} sidebar
|
|
36
|
+
* </button>
|
|
37
|
+
* );
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
type SidebarState = {
|
|
42
|
+
/**
|
|
43
|
+
* Whether the desktop sidebar is expanded. Mirrored as presence-only
|
|
44
|
+
* `data-expanded` on `Sidebar.Nav`. `false` while the
|
|
45
|
+
* sidebar yields its width to an open `AppLayout.SidePanel`.
|
|
46
|
+
*/
|
|
47
|
+
open: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Set the desktop expanded state. Calls `onOpenChange` and, when
|
|
50
|
+
* uncontrolled, updates the internal state. Keeps one identity across
|
|
51
|
+
* renders, so it is safe in an effect dependency list.
|
|
52
|
+
*/
|
|
53
|
+
setOpen: (open: boolean) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the mobile sheet is open. Only meaningful when `isMobile`.
|
|
56
|
+
*/
|
|
57
|
+
openMobile: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Set the mobile sheet open state. Calls `onOpenMobileChange` and, when
|
|
60
|
+
* uncontrolled, updates the internal state. Use it to close the sheet on
|
|
61
|
+
* navigation. Keeps one identity across renders, so it is safe in an effect
|
|
62
|
+
* dependency list.
|
|
63
|
+
*/
|
|
64
|
+
setOpenMobile: (open: boolean) => void;
|
|
65
|
+
/**
|
|
66
|
+
* `true` when the viewport is below `mobileBreakpoint`. `false` during SSR
|
|
67
|
+
* and the hydration render (desktop-first).
|
|
68
|
+
*/
|
|
69
|
+
isMobile: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* The breakpoint below which the sidebar renders as a mobile sheet.
|
|
72
|
+
*/
|
|
73
|
+
mobileBreakpoint: SidebarMobileBreakpoint;
|
|
74
|
+
/**
|
|
75
|
+
* Toggle the sidebar: the mobile sheet when `isMobile`, the desktop
|
|
76
|
+
* expanded state otherwise. This is what `Sidebar.Trigger` calls.
|
|
77
|
+
*/
|
|
78
|
+
toggle: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* The generated id of the sidebar's `<nav>` landmark. `Sidebar.Trigger`
|
|
81
|
+
* references it via `aria-controls`; reuse it when building custom
|
|
82
|
+
* triggers.
|
|
83
|
+
*/
|
|
84
|
+
navId: string;
|
|
85
|
+
/**
|
|
86
|
+
* Whether this root owns the `⌘B` / `Ctrl+B` shortcut. `Sidebar.Trigger`
|
|
87
|
+
* reads it to decide whether its tooltip advertises the chord, so the hint
|
|
88
|
+
* can never name a binding that is not bound.
|
|
89
|
+
*/
|
|
90
|
+
keyboardShortcut: boolean;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Read the nearest `Sidebar.Root` state. Throws when called outside a
|
|
94
|
+
* `Sidebar.Root` so misuse fails loudly. Use it to build custom triggers,
|
|
95
|
+
* a keyboard shortcut, or close-on-navigate behavior.
|
|
96
|
+
*
|
|
97
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#usesidebar
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```tsx
|
|
101
|
+
* function CloseSidebarOnNavigate() {
|
|
102
|
+
* const { setOpenMobile } = useSidebar();
|
|
103
|
+
* const location = useLocation();
|
|
104
|
+
* useEffect(() => {
|
|
105
|
+
* setOpenMobile(false);
|
|
106
|
+
* }, [location.pathname, setOpenMobile]);
|
|
107
|
+
* return null;
|
|
108
|
+
* }
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
declare function useSidebar(): SidebarState;
|
|
112
|
+
type SidebarRootProps = {
|
|
113
|
+
/**
|
|
114
|
+
* The sidebar's parts: a `Sidebar.Nav` and anything that reads the state,
|
|
115
|
+
* including a `Sidebar.Trigger` rendered anywhere below (an
|
|
116
|
+
* `AppLayout.Header`, for example). `Root` renders no DOM of its own.
|
|
117
|
+
*/
|
|
118
|
+
children?: ReactNode;
|
|
119
|
+
/**
|
|
120
|
+
* The initial desktop expanded state for the uncontrolled case.
|
|
121
|
+
*
|
|
122
|
+
* @default true
|
|
123
|
+
*/
|
|
124
|
+
defaultOpen?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Controlled desktop expanded state. Pair with `onOpenChange`.
|
|
127
|
+
*/
|
|
128
|
+
open?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Called with the next desktop expanded state when the reader or `setOpen`
|
|
131
|
+
* changes it. A collapse or an expand that an `AppLayout.SidePanel` causes
|
|
132
|
+
* does not call it, so a cookie written here keeps the reader's preference.
|
|
133
|
+
*/
|
|
134
|
+
onOpenChange?: (open: boolean) => void;
|
|
135
|
+
/**
|
|
136
|
+
* Controlled mobile sheet open state. Pair with `onOpenMobileChange`.
|
|
137
|
+
*/
|
|
138
|
+
openMobile?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Called with the next mobile sheet open state whenever it changes. An
|
|
141
|
+
* uncontrolled sheet calls it only when it opens or closes, not when
|
|
142
|
+
* `setOpenMobile` asks for the state it already has.
|
|
143
|
+
*/
|
|
144
|
+
onOpenMobileChange?: (open: boolean) => void;
|
|
145
|
+
/**
|
|
146
|
+
* The breakpoint below which `Sidebar.Nav` renders as a mobile `Sheet`
|
|
147
|
+
* instead of the inline desktop panel.
|
|
148
|
+
*
|
|
149
|
+
* @default "lg"
|
|
150
|
+
*/
|
|
151
|
+
mobileBreakpoint?: SidebarMobileBreakpoint;
|
|
152
|
+
/**
|
|
153
|
+
* Toggle the sidebar with `⌘B` (macOS) / `Ctrl+B` (Windows/Linux). The
|
|
154
|
+
* shortcut requires exactly the platform modifier + `b`: `⌘` on Apple
|
|
155
|
+
* platforms and `Ctrl` everywhere else, resolved per host. The two never
|
|
156
|
+
* substitute for each other, so macOS's native `Ctrl+B` ("move the caret
|
|
157
|
+
* back one character") is left alone. Combinations with `Shift`/`Alt` (e.g.
|
|
158
|
+
* the browser's own `⌘⇧B`) pass through too.
|
|
159
|
+
*
|
|
160
|
+
* The shortcut is also ignored while focus is in a text-editing or form
|
|
161
|
+
* control (an `<input>`, `<textarea>`, `<select>`, or any `contenteditable`
|
|
162
|
+
* host), because the chord is usually already bound there (`⌘B` is "bold")
|
|
163
|
+
* and this is a `window` listener that calls `preventDefault()`. That covers
|
|
164
|
+
* embedded editors like Monaco and CodeMirror, which attach to exactly those
|
|
165
|
+
* elements. Set `false` to opt out entirely.
|
|
166
|
+
*
|
|
167
|
+
* An earlier `keydown` listener that calls `preventDefault()` (on `document`,
|
|
168
|
+
* or on an element) stops the shortcut. Do not bind `⌘B` in your app as
|
|
169
|
+
* well: delete the local binding, or set `false`.
|
|
170
|
+
*
|
|
171
|
+
* The shortcut has exactly one owner per window: the first mounted root
|
|
172
|
+
* with the shortcut enabled. Additional roots (nested or siblings) queue
|
|
173
|
+
* and take ownership only when the owner unmounts, so composing a second
|
|
174
|
+
* sidebar never makes one keypress toggle both.
|
|
175
|
+
*
|
|
176
|
+
* @default true
|
|
177
|
+
*/
|
|
178
|
+
keyboardShortcut?: boolean;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* The state owner for a sidebar. Renders no DOM of its own (like
|
|
182
|
+
* `Tooltip.Root`). It carries the expanded/collapsed and mobile-sheet state
|
|
183
|
+
* to every part below it, so `Sidebar.Trigger` can live anywhere in the tree
|
|
184
|
+
* (for example inside an `AppLayout.Header`) without coupling the app shell
|
|
185
|
+
* to the sidebar.
|
|
186
|
+
*
|
|
187
|
+
* Render exactly one `Sidebar.Nav` per `Sidebar.Root`. Nested roots shadow
|
|
188
|
+
* the outer sidebar for everything below them.
|
|
189
|
+
*
|
|
190
|
+
* Beside an `AppLayout.SidePanel`, an expanded sidebar collapses while the open
|
|
191
|
+
* panel needs the width, and expands again when the panel gives the width
|
|
192
|
+
* back. A toggle by the reader in between stands, and neither change calls
|
|
193
|
+
* `onOpenChange`: `open` and `defaultOpen` stay the reader's preference.
|
|
194
|
+
*
|
|
195
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarroot
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```tsx
|
|
199
|
+
* <Sidebar.Root>
|
|
200
|
+
* <Sidebar.Nav aria-label="Main">
|
|
201
|
+
* <Sidebar.Header>
|
|
202
|
+
* <DropdownMenu.Root>
|
|
203
|
+
* <DropdownMenu.Trigger asChild>
|
|
204
|
+
* <Sidebar.SwitcherTrigger>
|
|
205
|
+
* <GlobeIcon />
|
|
206
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
207
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
208
|
+
* </Sidebar.SwitcherTrigger>
|
|
209
|
+
* </DropdownMenu.Trigger>
|
|
210
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
211
|
+
* </DropdownMenu.Root>
|
|
212
|
+
* </Sidebar.Header>
|
|
213
|
+
* <Sidebar.Body>
|
|
214
|
+
* <Sidebar.Group>
|
|
215
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
216
|
+
* <Sidebar.List>
|
|
217
|
+
* <Sidebar.Item>
|
|
218
|
+
* <Sidebar.ItemButton asChild current>
|
|
219
|
+
* <a href="/endpoints">
|
|
220
|
+
* <GraphIcon />
|
|
221
|
+
* Endpoints
|
|
222
|
+
* </a>
|
|
223
|
+
* </Sidebar.ItemButton>
|
|
224
|
+
* </Sidebar.Item>
|
|
225
|
+
* </Sidebar.List>
|
|
226
|
+
* </Sidebar.Group>
|
|
227
|
+
* </Sidebar.Body>
|
|
228
|
+
* <Sidebar.Footer>
|
|
229
|
+
* <Sidebar.Separator />
|
|
230
|
+
* <DropdownMenu.Root>
|
|
231
|
+
* <DropdownMenu.Trigger asChild>
|
|
232
|
+
* <Sidebar.SwitcherTrigger>
|
|
233
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
234
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
235
|
+
* </Avatar.Root>
|
|
236
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
237
|
+
* </Sidebar.SwitcherTrigger>
|
|
238
|
+
* </DropdownMenu.Trigger>
|
|
239
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
240
|
+
* </DropdownMenu.Root>
|
|
241
|
+
* </Sidebar.Footer>
|
|
242
|
+
* </Sidebar.Nav>
|
|
243
|
+
* <Sidebar.Trigger />
|
|
244
|
+
* </Sidebar.Root>
|
|
245
|
+
* ```
|
|
246
|
+
*/
|
|
247
|
+
declare const Root: ({ children, defaultOpen, keyboardShortcut, mobileBreakpoint, onOpenChange, onOpenMobileChange, open: openProp, openMobile: openMobileProp }: SidebarRootProps) => import("react").JSX.Element;
|
|
248
|
+
type SidebarNavProps = ComponentProps<"div"> & WithDataSlot;
|
|
249
|
+
/**
|
|
250
|
+
* The sidebar panel. On viewports at or above the root's `mobileBreakpoint`
|
|
251
|
+
* it renders inline (in normal flow, so it composes under an
|
|
252
|
+
* `AppLayout.Notice` banner) and collapses by animating its width down to a
|
|
253
|
+
* narrow column (`--sidebar-width-icon`): group labels fade out in place
|
|
254
|
+
* and each row becomes a square chip around its leading icon, but everything
|
|
255
|
+
* keeps its expanded position and stays in the tab order and the
|
|
256
|
+
* accessibility tree. Below the breakpoint the same tree is a modal sheet on
|
|
257
|
+
* the left, on the browser's `<dialog>`: the browser makes the page inert,
|
|
258
|
+
* closes it on Escape, and returns focus to the trigger, and CSS
|
|
259
|
+
* locks page scroll. The nav mounts once and never moves between the two.
|
|
260
|
+
*
|
|
261
|
+
* `className`, `style`, `ref`, and rest props land on the panel surface in
|
|
262
|
+
* both presentations (the desktop width animator / the sheet panel), so
|
|
263
|
+
* the width variables work anywhere:
|
|
264
|
+
* `className="[--sidebar-width:20rem] [--sidebar-width-mobile:20rem]"`.
|
|
265
|
+
* The panel forwards `aria-label` (default `"Main"`) to the inner `<nav>` landmark.
|
|
266
|
+
*
|
|
267
|
+
* **CSS variables (public API):**
|
|
268
|
+
*
|
|
269
|
+
* | CSS Variable | Default | Description |
|
|
270
|
+
* | --- | --- | --- |
|
|
271
|
+
* | `--sidebar-width` | `13rem` | Expanded desktop panel width (208px). |
|
|
272
|
+
* | `--sidebar-width-mobile` | `18rem` | Mobile sheet width (288px). |
|
|
273
|
+
* | `--sidebar-width-icon` | `3.25rem` | Collapsed sidebar width (52px). |
|
|
274
|
+
* | `--sidebar-row-width` | `12rem` | Derived, not set: one row's width in the expanded panel (192px), for sizing surfaces that render *outside* it. See below and `Sidebar.SwitcherTrigger`. |
|
|
275
|
+
*
|
|
276
|
+
* `--sidebar-row-width` is `calc(var(--sidebar-width,13rem) - 1rem)`, declared
|
|
277
|
+
* at `:root` by `mantle.css`: the panel width minus the row gutter this
|
|
278
|
+
* component's regions apply.
|
|
279
|
+
*
|
|
280
|
+
* The panel reads each of the three widths with its default as the fallback,
|
|
281
|
+
* and custom properties inherit, so set one on `Sidebar.Nav` to resize a single
|
|
282
|
+
* sidebar or on any ancestor (`:root` in your global stylesheet) to resize
|
|
283
|
+
* every sidebar in the app. `--sidebar-row-width` resolves at `:root`, so a
|
|
284
|
+
* `--sidebar-width` override scoped to one `Sidebar.Nav` does not reach it in
|
|
285
|
+
* either direction (a narrower panel leaves the floor *wider* than the row it
|
|
286
|
+
* opens from). Override `--sidebar-width` at `:root` to move both together, or
|
|
287
|
+
* set `--sidebar-row-width` on the outside surface itself.
|
|
288
|
+
*
|
|
289
|
+
* **Data attributes:**
|
|
290
|
+
*
|
|
291
|
+
* | Data Attribute | Value | Description |
|
|
292
|
+
* | --- | --- | --- |
|
|
293
|
+
* | `data-expanded` | present while expanded | Presence-only. On the desktop panel it mirrors the root's expanded state, and its absence drives the width collapse to its icons. The mobile sheet always has it. Descendant parts style off it with `group-data-expanded/sidebar-nav:` and `group-not-data-expanded/sidebar-nav:`. |
|
|
294
|
+
* | `data-hydrated` | present one frame after hydration | Presence-only, desktop panel surface. The panel's pre-hydration visibility gate, its width transition, and descendant collapse transitions all key off its absence in CSS (`not-data-hydrated:`, `group-not-data-hydrated/sidebar-nav:`). The stamp waits one frame, so an SSR state correction paints first and snaps instead of animating on page load. |
|
|
295
|
+
* | `data-mobile` | present in the mobile sheet | Presence-only. Marks the sheet presentation used below the root's `mobileBreakpoint`. |
|
|
296
|
+
* | `data-open` | present while the sheet is open | Presence-only, in the mobile sheet only: the sheet's open state, not the desktop expanded state. |
|
|
297
|
+
* | `data-closing` | present while the sheet's exit plays | Presence-only, in the mobile sheet only. Drives the slide-out. |
|
|
298
|
+
*
|
|
299
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarnav
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* ```tsx
|
|
303
|
+
* <Sidebar.Root>
|
|
304
|
+
* <Sidebar.Nav aria-label="Main">
|
|
305
|
+
* <Sidebar.Header>
|
|
306
|
+
* <DropdownMenu.Root>
|
|
307
|
+
* <DropdownMenu.Trigger asChild>
|
|
308
|
+
* <Sidebar.SwitcherTrigger>
|
|
309
|
+
* <GlobeIcon />
|
|
310
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
311
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
312
|
+
* </Sidebar.SwitcherTrigger>
|
|
313
|
+
* </DropdownMenu.Trigger>
|
|
314
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
315
|
+
* </DropdownMenu.Root>
|
|
316
|
+
* </Sidebar.Header>
|
|
317
|
+
* <Sidebar.Body>
|
|
318
|
+
* <Sidebar.Group>
|
|
319
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
320
|
+
* <Sidebar.List>
|
|
321
|
+
* <Sidebar.Item>
|
|
322
|
+
* <Sidebar.ItemButton asChild current>
|
|
323
|
+
* <a href="/endpoints">
|
|
324
|
+
* <GraphIcon />
|
|
325
|
+
* Endpoints
|
|
326
|
+
* </a>
|
|
327
|
+
* </Sidebar.ItemButton>
|
|
328
|
+
* </Sidebar.Item>
|
|
329
|
+
* </Sidebar.List>
|
|
330
|
+
* </Sidebar.Group>
|
|
331
|
+
* </Sidebar.Body>
|
|
332
|
+
* <Sidebar.Footer>
|
|
333
|
+
* <Sidebar.Separator />
|
|
334
|
+
* <DropdownMenu.Root>
|
|
335
|
+
* <DropdownMenu.Trigger asChild>
|
|
336
|
+
* <Sidebar.SwitcherTrigger>
|
|
337
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
338
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
339
|
+
* </Avatar.Root>
|
|
340
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
341
|
+
* </Sidebar.SwitcherTrigger>
|
|
342
|
+
* </DropdownMenu.Trigger>
|
|
343
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
344
|
+
* </DropdownMenu.Root>
|
|
345
|
+
* </Sidebar.Footer>
|
|
346
|
+
* </Sidebar.Nav>
|
|
347
|
+
* <Sidebar.Trigger />
|
|
348
|
+
* </Sidebar.Root>
|
|
349
|
+
* ```
|
|
350
|
+
*/
|
|
351
|
+
declare const Nav: ({ "aria-label": ariaLabelProp, "aria-labelledby": ariaLabelledBy, children, className, "data-slot": dataSlot, ...props }: SidebarNavProps) => import("react").JSX.Element;
|
|
352
|
+
/**
|
|
353
|
+
* The props for `Sidebar.Trigger`. `IconButton`'s props, except the parts the
|
|
354
|
+
* trigger owns: `asChild` and `children` are removed (the trigger renders
|
|
355
|
+
* only its icon and `aria-label`; build custom triggers with `useSidebar`
|
|
356
|
+
* instead), and `appearance`, `icon`, `intent`, `label`, and `size` become
|
|
357
|
+
* optional with sidebar defaults.
|
|
358
|
+
*/
|
|
359
|
+
type SidebarTriggerProps = Omit<IconButtonProps, "appearance" | "asChild" | "children" | "icon" | "intent" | "label" | "size"> & WithDataSlot & {
|
|
360
|
+
/**
|
|
361
|
+
* The visual style of the trigger `IconButton`.
|
|
362
|
+
*
|
|
363
|
+
* @default "ghost"
|
|
364
|
+
*/
|
|
365
|
+
appearance?: IconButtonProps["appearance"];
|
|
366
|
+
/**
|
|
367
|
+
* The icon rendered inside the trigger.
|
|
368
|
+
*
|
|
369
|
+
* @default <SidebarSimpleIcon />
|
|
370
|
+
*/
|
|
371
|
+
icon?: ReactNode;
|
|
372
|
+
/**
|
|
373
|
+
* The color intent of the trigger `IconButton`.
|
|
374
|
+
*
|
|
375
|
+
* @default "neutral"
|
|
376
|
+
*/
|
|
377
|
+
intent?: IconButtonProps["intent"];
|
|
378
|
+
/**
|
|
379
|
+
* The accessible name for the trigger, and what its tooltip says. Renders
|
|
380
|
+
* as the button's `aria-label`. Override it for localization.
|
|
381
|
+
*
|
|
382
|
+
* @default "Toggle Sidebar"
|
|
383
|
+
*/
|
|
384
|
+
label?: string;
|
|
385
|
+
/**
|
|
386
|
+
* The keyboard chord that also toggles the sidebar, rendered after the label
|
|
387
|
+
* in the tooltip, usually `<><MetaKey /><Kbd>B</Kbd></>`.
|
|
388
|
+
*
|
|
389
|
+
* Ignored under `Sidebar.Root keyboardShortcut={false}`, so the tooltip can
|
|
390
|
+
* never name a binding that is not bound. Passed rather than built in so the
|
|
391
|
+
* sidebar does not have to reach into another component for the platform
|
|
392
|
+
* modifier glyph. `aria-keyshortcuts` is stamped either way, which is also
|
|
393
|
+
* why the chips render `aria-hidden`.
|
|
394
|
+
*/
|
|
395
|
+
shortcut?: ReactNode;
|
|
396
|
+
/**
|
|
397
|
+
* The size of the trigger `IconButton`. Small, so it sits level with the
|
|
398
|
+
* other `size="sm"` controls in an `AppLayout.Header` row.
|
|
399
|
+
*
|
|
400
|
+
* @default "sm"
|
|
401
|
+
*/
|
|
402
|
+
size?: IconButtonProps["size"];
|
|
403
|
+
};
|
|
404
|
+
/**
|
|
405
|
+
* The button that toggles the sidebar: the mobile sheet below the root's
|
|
406
|
+
* `mobileBreakpoint`, the desktop expanded state otherwise. Renders a small
|
|
407
|
+
* ghost neutral `IconButton` with `aria-expanded` and `aria-controls` wired to
|
|
408
|
+
* the sidebar's `<nav>`. Place it in your app shell's header (for example
|
|
409
|
+
* `AppLayout.Header`). It must stay visible at every breakpoint where the
|
|
410
|
+
* sidebar can collapse, or users have no way to reopen it.
|
|
411
|
+
*
|
|
412
|
+
* The button is icon-only at every breakpoint, so it always renders a tooltip
|
|
413
|
+
* showing `label` (plus the optional `shortcut` chips). A `TooltipProvider`
|
|
414
|
+
* ancestor, when there is one, sets its delay.
|
|
415
|
+
*
|
|
416
|
+
* It also stamps `aria-keyshortcuts` for the `⌘B` / `Ctrl+B` chord the root
|
|
417
|
+
* binds. The server cannot know the host, so the server HTML and the hydration
|
|
418
|
+
* render carry `Control+B`. React corrects it once after hydration. A trigger
|
|
419
|
+
* that mounts after hydration reads the platform in its first render. Both the
|
|
420
|
+
* attribute and the chips are omitted under `Sidebar.Root keyboardShortcut={false}`.
|
|
421
|
+
*
|
|
422
|
+
* **Data attributes:**
|
|
423
|
+
*
|
|
424
|
+
* | Data Attribute | Value | Description |
|
|
425
|
+
* | --- | --- | --- |
|
|
426
|
+
* | `data-slot` | `"sidebar-trigger icon-button"` | On the button: the part's slot, joined ahead of `IconButton`'s own. |
|
|
427
|
+
* | `data-slot` | `"sidebar-trigger-tooltip tooltip-content"` | On the tooltip surface, not the button: the styling hook for the label-and-chord popup this part renders, joined ahead of `Tooltip.Content`'s own slot. |
|
|
428
|
+
* | `data-open` | present while open | Read, not stamped: on the tooltip surface, from `Tooltip.Content`. |
|
|
429
|
+
* | `data-side` | `"top"` \| `"right"` \| `"bottom"` \| `"left"` | Read, not stamped: on the tooltip surface, from `Tooltip.Content`. |
|
|
430
|
+
* | `data-slot` | `"sidebar-tooltip-row"` | Inside that surface, on the flex row holding the label and the optional chord chips. Nested inside `Tooltip.Content`'s own `tooltip-label` div. Always present. |
|
|
431
|
+
* | `data-slot` | `"sidebar-tooltip-label"` | On the `<span>` wrapping `label` inside that row. Always present, and `display: contents`, so the label stays a flex item of the row. |
|
|
432
|
+
* | `data-slot` | `"sidebar-tooltip-shortcut"` | On the chord chips. Present only while `shortcut` holds something. Carries `translate="no"`: a chord is a key name, not prose. |
|
|
433
|
+
* | `data-appearance` | `"filled"` \| `"ghost"` \| `"outlined"` | Read, not stamped: the underlying `IconButton` reflects its `appearance`, which this part defaults to `"ghost"`. |
|
|
434
|
+
* | `data-intent` | `"neutral"` | Read, not stamped: the underlying `IconButton` reflects its `intent`, and it draws the neutral tone only. |
|
|
435
|
+
* | `data-size` | `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` | Read, not stamped: the underlying `IconButton` reflects its `size`, which this part defaults to `"sm"`. |
|
|
436
|
+
*
|
|
437
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebartrigger
|
|
438
|
+
*
|
|
439
|
+
* @example
|
|
440
|
+
* ```tsx
|
|
441
|
+
* <Sidebar.Root>
|
|
442
|
+
* <Sidebar.Nav aria-label="Main">
|
|
443
|
+
* <Sidebar.Header>
|
|
444
|
+
* <DropdownMenu.Root>
|
|
445
|
+
* <DropdownMenu.Trigger asChild>
|
|
446
|
+
* <Sidebar.SwitcherTrigger>
|
|
447
|
+
* <GlobeIcon />
|
|
448
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
449
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
450
|
+
* </Sidebar.SwitcherTrigger>
|
|
451
|
+
* </DropdownMenu.Trigger>
|
|
452
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
453
|
+
* </DropdownMenu.Root>
|
|
454
|
+
* </Sidebar.Header>
|
|
455
|
+
* <Sidebar.Body>
|
|
456
|
+
* <Sidebar.Group>
|
|
457
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
458
|
+
* <Sidebar.List>
|
|
459
|
+
* <Sidebar.Item>
|
|
460
|
+
* <Sidebar.ItemButton asChild current>
|
|
461
|
+
* <a href="/endpoints">
|
|
462
|
+
* <GraphIcon />
|
|
463
|
+
* Endpoints
|
|
464
|
+
* </a>
|
|
465
|
+
* </Sidebar.ItemButton>
|
|
466
|
+
* </Sidebar.Item>
|
|
467
|
+
* </Sidebar.List>
|
|
468
|
+
* </Sidebar.Group>
|
|
469
|
+
* </Sidebar.Body>
|
|
470
|
+
* <Sidebar.Footer>
|
|
471
|
+
* <Sidebar.Separator />
|
|
472
|
+
* <DropdownMenu.Root>
|
|
473
|
+
* <DropdownMenu.Trigger asChild>
|
|
474
|
+
* <Sidebar.SwitcherTrigger>
|
|
475
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
476
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
477
|
+
* </Avatar.Root>
|
|
478
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
479
|
+
* </Sidebar.SwitcherTrigger>
|
|
480
|
+
* </DropdownMenu.Trigger>
|
|
481
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
482
|
+
* </DropdownMenu.Root>
|
|
483
|
+
* </Sidebar.Footer>
|
|
484
|
+
* </Sidebar.Nav>
|
|
485
|
+
* <Sidebar.Trigger />
|
|
486
|
+
* </Sidebar.Root>
|
|
487
|
+
* ```
|
|
488
|
+
*
|
|
489
|
+
* @example
|
|
490
|
+
* Placement within an `AppLayout` shell:
|
|
491
|
+
* ```tsx
|
|
492
|
+
* <Sidebar.Root>
|
|
493
|
+
* <AppLayout.Workspace>
|
|
494
|
+
* <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
|
|
495
|
+
* <AppLayout.Content>
|
|
496
|
+
* <AppLayout.Header>
|
|
497
|
+
* <Sidebar.Trigger />
|
|
498
|
+
* </AppLayout.Header>
|
|
499
|
+
* <AppLayout.Body>…</AppLayout.Body>
|
|
500
|
+
* </AppLayout.Content>
|
|
501
|
+
* </AppLayout.Workspace>
|
|
502
|
+
* </Sidebar.Root>
|
|
503
|
+
* ```
|
|
504
|
+
*/
|
|
505
|
+
declare const Trigger: ({ appearance, "data-slot": dataSlot, icon, intent, label, onClick, shortcut, size, ...props }: SidebarTriggerProps) => import("react").JSX.Element;
|
|
506
|
+
type SidebarHeaderProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
507
|
+
/**
|
|
508
|
+
* The top container of a `Sidebar.Nav`, pinned above the scrollable
|
|
509
|
+
* `Sidebar.Body`. Typically holds an app/product switcher built from
|
|
510
|
+
* `Sidebar.SwitcherTrigger` composed with a `DropdownMenu` or `Dialog`.
|
|
511
|
+
*
|
|
512
|
+
* Its **first child** owns a band exactly `--sidebar-header-height` tall
|
|
513
|
+
* (default `4.5rem`) and centers inside it. When a sidebar header is composed
|
|
514
|
+
* inside an `AppLayout`, the toolbar derives its own height from the same
|
|
515
|
+
* variable, so overriding it at a shared ancestor (e.g. `AppLayout.Root`) moves
|
|
516
|
+
* the switcher row and the toolbar together and the alignment holds by
|
|
517
|
+
* construction.
|
|
518
|
+
*
|
|
519
|
+
* Every child after the first stacks flush below the band in its own row, the
|
|
520
|
+
* way rows stack in `Sidebar.Footer`: the band's own lower half is the space
|
|
521
|
+
* between them. The header grows to fit them. The band, and with it the toolbar,
|
|
522
|
+
* stays the height of the switcher row alone, so a search row pinned under the
|
|
523
|
+
* switcher (`Sidebar.SearchTrigger`) needs no override and no hand-copied
|
|
524
|
+
* padding.
|
|
525
|
+
*
|
|
526
|
+
* The alignment is positional: keep the aligned row as the header's first direct
|
|
527
|
+
* child. A wrapper around both rows takes the band itself. A first row taller
|
|
528
|
+
* than the band overflows it. Raise the variable instead.
|
|
529
|
+
*
|
|
530
|
+
* **CSS variables (public API):**
|
|
531
|
+
*
|
|
532
|
+
* | CSS Variable | Default | Description |
|
|
533
|
+
* | --- | --- | --- |
|
|
534
|
+
* | `--sidebar-header-height` | `4.5rem` | The first child's band (72px): the height an `AppLayout.Header` toolbar matches, not a cap on the header, which grows for every row after the first. Set it on a common ancestor of the sidebar and `AppLayout.Header`, not on `Sidebar.Nav`, so both rows read one value. |
|
|
535
|
+
*
|
|
536
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarheader
|
|
537
|
+
*
|
|
538
|
+
* @example
|
|
539
|
+
* ```tsx
|
|
540
|
+
* <Sidebar.Root>
|
|
541
|
+
* <Sidebar.Nav aria-label="Main">
|
|
542
|
+
* <Sidebar.Header>
|
|
543
|
+
* <DropdownMenu.Root>
|
|
544
|
+
* <DropdownMenu.Trigger asChild>
|
|
545
|
+
* <Sidebar.SwitcherTrigger>
|
|
546
|
+
* <GlobeIcon />
|
|
547
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
548
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
549
|
+
* </Sidebar.SwitcherTrigger>
|
|
550
|
+
* </DropdownMenu.Trigger>
|
|
551
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
552
|
+
* </DropdownMenu.Root>
|
|
553
|
+
* </Sidebar.Header>
|
|
554
|
+
* <Sidebar.Body>
|
|
555
|
+
* <Sidebar.Group>
|
|
556
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
557
|
+
* <Sidebar.List>
|
|
558
|
+
* <Sidebar.Item>
|
|
559
|
+
* <Sidebar.ItemButton asChild current>
|
|
560
|
+
* <a href="/endpoints">
|
|
561
|
+
* <GraphIcon />
|
|
562
|
+
* Endpoints
|
|
563
|
+
* </a>
|
|
564
|
+
* </Sidebar.ItemButton>
|
|
565
|
+
* </Sidebar.Item>
|
|
566
|
+
* </Sidebar.List>
|
|
567
|
+
* </Sidebar.Group>
|
|
568
|
+
* </Sidebar.Body>
|
|
569
|
+
* <Sidebar.Footer>
|
|
570
|
+
* <Sidebar.Separator />
|
|
571
|
+
* <DropdownMenu.Root>
|
|
572
|
+
* <DropdownMenu.Trigger asChild>
|
|
573
|
+
* <Sidebar.SwitcherTrigger>
|
|
574
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
575
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
576
|
+
* </Avatar.Root>
|
|
577
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
578
|
+
* </Sidebar.SwitcherTrigger>
|
|
579
|
+
* </DropdownMenu.Trigger>
|
|
580
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
581
|
+
* </DropdownMenu.Root>
|
|
582
|
+
* </Sidebar.Footer>
|
|
583
|
+
* </Sidebar.Nav>
|
|
584
|
+
* <Sidebar.Trigger />
|
|
585
|
+
* </Sidebar.Root>
|
|
586
|
+
* ```
|
|
587
|
+
*/
|
|
588
|
+
declare const Header: ({ asChild, children, className, "data-slot": dataSlot, ...props }: SidebarHeaderProps) => import("react").JSX.Element;
|
|
589
|
+
type SidebarBodyProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
590
|
+
/**
|
|
591
|
+
* The scrollable middle region of a `Sidebar.Nav`, growing to fill the space
|
|
592
|
+
* between `Sidebar.Header` and `Sidebar.Footer`. Holds the navigation
|
|
593
|
+
* `Sidebar.Group` children. Overflowing edges fade out via the
|
|
594
|
+
* `scroll-fade-y` mask; inside the collapsed sidebar it hides the scrollbar
|
|
595
|
+
* and its reserved gutter, so the fade is the only overflow signal.
|
|
596
|
+
*
|
|
597
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarbody
|
|
598
|
+
*
|
|
599
|
+
* @example
|
|
600
|
+
* ```tsx
|
|
601
|
+
* <Sidebar.Root>
|
|
602
|
+
* <Sidebar.Nav aria-label="Main">
|
|
603
|
+
* <Sidebar.Header>
|
|
604
|
+
* <DropdownMenu.Root>
|
|
605
|
+
* <DropdownMenu.Trigger asChild>
|
|
606
|
+
* <Sidebar.SwitcherTrigger>
|
|
607
|
+
* <GlobeIcon />
|
|
608
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
609
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
610
|
+
* </Sidebar.SwitcherTrigger>
|
|
611
|
+
* </DropdownMenu.Trigger>
|
|
612
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
613
|
+
* </DropdownMenu.Root>
|
|
614
|
+
* </Sidebar.Header>
|
|
615
|
+
* <Sidebar.Body>
|
|
616
|
+
* <Sidebar.Group>
|
|
617
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
618
|
+
* <Sidebar.List>
|
|
619
|
+
* <Sidebar.Item>
|
|
620
|
+
* <Sidebar.ItemButton asChild current>
|
|
621
|
+
* <a href="/endpoints">
|
|
622
|
+
* <GraphIcon />
|
|
623
|
+
* Endpoints
|
|
624
|
+
* </a>
|
|
625
|
+
* </Sidebar.ItemButton>
|
|
626
|
+
* </Sidebar.Item>
|
|
627
|
+
* </Sidebar.List>
|
|
628
|
+
* </Sidebar.Group>
|
|
629
|
+
* </Sidebar.Body>
|
|
630
|
+
* <Sidebar.Footer>
|
|
631
|
+
* <Sidebar.Separator />
|
|
632
|
+
* <DropdownMenu.Root>
|
|
633
|
+
* <DropdownMenu.Trigger asChild>
|
|
634
|
+
* <Sidebar.SwitcherTrigger>
|
|
635
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
636
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
637
|
+
* </Avatar.Root>
|
|
638
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
639
|
+
* </Sidebar.SwitcherTrigger>
|
|
640
|
+
* </DropdownMenu.Trigger>
|
|
641
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
642
|
+
* </DropdownMenu.Root>
|
|
643
|
+
* </Sidebar.Footer>
|
|
644
|
+
* </Sidebar.Nav>
|
|
645
|
+
* <Sidebar.Trigger />
|
|
646
|
+
* </Sidebar.Root>
|
|
647
|
+
* ```
|
|
648
|
+
*/
|
|
649
|
+
declare const Body: ({ asChild, children, className, "data-slot": dataSlot, ...props }: SidebarBodyProps) => import("react").JSX.Element;
|
|
650
|
+
type SidebarFooterProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
651
|
+
/**
|
|
652
|
+
* The bottom container of a `Sidebar.Nav`, pinned below the scrollable
|
|
653
|
+
* `Sidebar.Body`. Typically holds cross-product items and the account/user
|
|
654
|
+
* switcher row (`Sidebar.SwitcherTrigger` with an
|
|
655
|
+
* [Avatar](https://mantle.ngrok.com/components/data-display/avatar)).
|
|
656
|
+
*
|
|
657
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarfooter
|
|
658
|
+
*
|
|
659
|
+
* @example
|
|
660
|
+
* ```tsx
|
|
661
|
+
* <Sidebar.Root>
|
|
662
|
+
* <Sidebar.Nav aria-label="Main">
|
|
663
|
+
* <Sidebar.Header>
|
|
664
|
+
* <DropdownMenu.Root>
|
|
665
|
+
* <DropdownMenu.Trigger asChild>
|
|
666
|
+
* <Sidebar.SwitcherTrigger>
|
|
667
|
+
* <GlobeIcon />
|
|
668
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
669
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
670
|
+
* </Sidebar.SwitcherTrigger>
|
|
671
|
+
* </DropdownMenu.Trigger>
|
|
672
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
673
|
+
* </DropdownMenu.Root>
|
|
674
|
+
* </Sidebar.Header>
|
|
675
|
+
* <Sidebar.Body>
|
|
676
|
+
* <Sidebar.Group>
|
|
677
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
678
|
+
* <Sidebar.List>
|
|
679
|
+
* <Sidebar.Item>
|
|
680
|
+
* <Sidebar.ItemButton asChild current>
|
|
681
|
+
* <a href="/endpoints">
|
|
682
|
+
* <GraphIcon />
|
|
683
|
+
* Endpoints
|
|
684
|
+
* </a>
|
|
685
|
+
* </Sidebar.ItemButton>
|
|
686
|
+
* </Sidebar.Item>
|
|
687
|
+
* </Sidebar.List>
|
|
688
|
+
* </Sidebar.Group>
|
|
689
|
+
* </Sidebar.Body>
|
|
690
|
+
* <Sidebar.Footer>
|
|
691
|
+
* <Sidebar.Separator />
|
|
692
|
+
* <DropdownMenu.Root>
|
|
693
|
+
* <DropdownMenu.Trigger asChild>
|
|
694
|
+
* <Sidebar.SwitcherTrigger>
|
|
695
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
696
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
697
|
+
* </Avatar.Root>
|
|
698
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
699
|
+
* </Sidebar.SwitcherTrigger>
|
|
700
|
+
* </DropdownMenu.Trigger>
|
|
701
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
702
|
+
* </DropdownMenu.Root>
|
|
703
|
+
* </Sidebar.Footer>
|
|
704
|
+
* </Sidebar.Nav>
|
|
705
|
+
* <Sidebar.Trigger />
|
|
706
|
+
* </Sidebar.Root>
|
|
707
|
+
* ```
|
|
708
|
+
*/
|
|
709
|
+
declare const Footer: ({ asChild, children, className, "data-slot": dataSlot, ...props }: SidebarFooterProps) => import("react").JSX.Element;
|
|
710
|
+
type SidebarGroupProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
711
|
+
/**
|
|
712
|
+
* A grouping container inside `Sidebar.Body` pairing an optional
|
|
713
|
+
* `Sidebar.GroupLabel` with a `Sidebar.List`. When a label is present, the
|
|
714
|
+
* group wires it to the list via `aria-labelledby` so assistive technology
|
|
715
|
+
* announces the list with the group's name.
|
|
716
|
+
*
|
|
717
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebargroup
|
|
718
|
+
*
|
|
719
|
+
* @example
|
|
720
|
+
* ```tsx
|
|
721
|
+
* <Sidebar.Root>
|
|
722
|
+
* <Sidebar.Nav aria-label="Main">
|
|
723
|
+
* <Sidebar.Header>
|
|
724
|
+
* <DropdownMenu.Root>
|
|
725
|
+
* <DropdownMenu.Trigger asChild>
|
|
726
|
+
* <Sidebar.SwitcherTrigger>
|
|
727
|
+
* <GlobeIcon />
|
|
728
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
729
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
730
|
+
* </Sidebar.SwitcherTrigger>
|
|
731
|
+
* </DropdownMenu.Trigger>
|
|
732
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
733
|
+
* </DropdownMenu.Root>
|
|
734
|
+
* </Sidebar.Header>
|
|
735
|
+
* <Sidebar.Body>
|
|
736
|
+
* <Sidebar.Group>
|
|
737
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
738
|
+
* <Sidebar.List>
|
|
739
|
+
* <Sidebar.Item>
|
|
740
|
+
* <Sidebar.ItemButton asChild current>
|
|
741
|
+
* <a href="/endpoints">
|
|
742
|
+
* <GraphIcon />
|
|
743
|
+
* Endpoints
|
|
744
|
+
* </a>
|
|
745
|
+
* </Sidebar.ItemButton>
|
|
746
|
+
* </Sidebar.Item>
|
|
747
|
+
* </Sidebar.List>
|
|
748
|
+
* </Sidebar.Group>
|
|
749
|
+
* </Sidebar.Body>
|
|
750
|
+
* <Sidebar.Footer>
|
|
751
|
+
* <Sidebar.Separator />
|
|
752
|
+
* <DropdownMenu.Root>
|
|
753
|
+
* <DropdownMenu.Trigger asChild>
|
|
754
|
+
* <Sidebar.SwitcherTrigger>
|
|
755
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
756
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
757
|
+
* </Avatar.Root>
|
|
758
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
759
|
+
* </Sidebar.SwitcherTrigger>
|
|
760
|
+
* </DropdownMenu.Trigger>
|
|
761
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
762
|
+
* </DropdownMenu.Root>
|
|
763
|
+
* </Sidebar.Footer>
|
|
764
|
+
* </Sidebar.Nav>
|
|
765
|
+
* <Sidebar.Trigger />
|
|
766
|
+
* </Sidebar.Root>
|
|
767
|
+
* ```
|
|
768
|
+
*/
|
|
769
|
+
declare const Group: ({ asChild, children, className, "data-slot": dataSlot, ...props }: SidebarGroupProps) => import("react").JSX.Element;
|
|
770
|
+
type SidebarGroupLabelProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
771
|
+
/**
|
|
772
|
+
* The muted label of a `Sidebar.Group`, rendered above its `Sidebar.List`.
|
|
773
|
+
* Renders a `<div>` (not a heading, so the sidebar never dictates the page's
|
|
774
|
+
* heading outline); inside a `Sidebar.Group` the group links it to the
|
|
775
|
+
* sibling list via `aria-labelledby`. Pass `asChild` to render a heading at a
|
|
776
|
+
* level you control.
|
|
777
|
+
*
|
|
778
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebargrouplabel
|
|
779
|
+
*
|
|
780
|
+
* @example
|
|
781
|
+
* ```tsx
|
|
782
|
+
* <Sidebar.Root>
|
|
783
|
+
* <Sidebar.Nav aria-label="Main">
|
|
784
|
+
* <Sidebar.Header>
|
|
785
|
+
* <DropdownMenu.Root>
|
|
786
|
+
* <DropdownMenu.Trigger asChild>
|
|
787
|
+
* <Sidebar.SwitcherTrigger>
|
|
788
|
+
* <GlobeIcon />
|
|
789
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
790
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
791
|
+
* </Sidebar.SwitcherTrigger>
|
|
792
|
+
* </DropdownMenu.Trigger>
|
|
793
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
794
|
+
* </DropdownMenu.Root>
|
|
795
|
+
* </Sidebar.Header>
|
|
796
|
+
* <Sidebar.Body>
|
|
797
|
+
* <Sidebar.Group>
|
|
798
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
799
|
+
* <Sidebar.List>
|
|
800
|
+
* <Sidebar.Item>
|
|
801
|
+
* <Sidebar.ItemButton asChild current>
|
|
802
|
+
* <a href="/endpoints">
|
|
803
|
+
* <GraphIcon />
|
|
804
|
+
* Endpoints
|
|
805
|
+
* </a>
|
|
806
|
+
* </Sidebar.ItemButton>
|
|
807
|
+
* </Sidebar.Item>
|
|
808
|
+
* </Sidebar.List>
|
|
809
|
+
* </Sidebar.Group>
|
|
810
|
+
* </Sidebar.Body>
|
|
811
|
+
* <Sidebar.Footer>
|
|
812
|
+
* <Sidebar.Separator />
|
|
813
|
+
* <DropdownMenu.Root>
|
|
814
|
+
* <DropdownMenu.Trigger asChild>
|
|
815
|
+
* <Sidebar.SwitcherTrigger>
|
|
816
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
817
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
818
|
+
* </Avatar.Root>
|
|
819
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
820
|
+
* </Sidebar.SwitcherTrigger>
|
|
821
|
+
* </DropdownMenu.Trigger>
|
|
822
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
823
|
+
* </DropdownMenu.Root>
|
|
824
|
+
* </Sidebar.Footer>
|
|
825
|
+
* </Sidebar.Nav>
|
|
826
|
+
* <Sidebar.Trigger />
|
|
827
|
+
* </Sidebar.Root>
|
|
828
|
+
* ```
|
|
829
|
+
*/
|
|
830
|
+
declare const GroupLabel: ({ asChild, children, className, "data-slot": dataSlot, id: idProp, ...props }: SidebarGroupLabelProps) => import("react").JSX.Element;
|
|
831
|
+
type SidebarListProps = ComponentProps<"ul"> & WithAsChild & WithDataSlot;
|
|
832
|
+
/**
|
|
833
|
+
* The `<ul>` list of navigation rows inside a `Sidebar.Group`. When the group
|
|
834
|
+
* has a `Sidebar.GroupLabel`, the list is announced with the group's name via
|
|
835
|
+
* `aria-labelledby`.
|
|
836
|
+
*
|
|
837
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarlist
|
|
838
|
+
*
|
|
839
|
+
* @example
|
|
840
|
+
* ```tsx
|
|
841
|
+
* <Sidebar.Root>
|
|
842
|
+
* <Sidebar.Nav aria-label="Main">
|
|
843
|
+
* <Sidebar.Header>
|
|
844
|
+
* <DropdownMenu.Root>
|
|
845
|
+
* <DropdownMenu.Trigger asChild>
|
|
846
|
+
* <Sidebar.SwitcherTrigger>
|
|
847
|
+
* <GlobeIcon />
|
|
848
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
849
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
850
|
+
* </Sidebar.SwitcherTrigger>
|
|
851
|
+
* </DropdownMenu.Trigger>
|
|
852
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
853
|
+
* </DropdownMenu.Root>
|
|
854
|
+
* </Sidebar.Header>
|
|
855
|
+
* <Sidebar.Body>
|
|
856
|
+
* <Sidebar.Group>
|
|
857
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
858
|
+
* <Sidebar.List>
|
|
859
|
+
* <Sidebar.Item>
|
|
860
|
+
* <Sidebar.ItemButton asChild current>
|
|
861
|
+
* <a href="/endpoints">
|
|
862
|
+
* <GraphIcon />
|
|
863
|
+
* Endpoints
|
|
864
|
+
* </a>
|
|
865
|
+
* </Sidebar.ItemButton>
|
|
866
|
+
* </Sidebar.Item>
|
|
867
|
+
* </Sidebar.List>
|
|
868
|
+
* </Sidebar.Group>
|
|
869
|
+
* </Sidebar.Body>
|
|
870
|
+
* <Sidebar.Footer>
|
|
871
|
+
* <Sidebar.Separator />
|
|
872
|
+
* <DropdownMenu.Root>
|
|
873
|
+
* <DropdownMenu.Trigger asChild>
|
|
874
|
+
* <Sidebar.SwitcherTrigger>
|
|
875
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
876
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
877
|
+
* </Avatar.Root>
|
|
878
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
879
|
+
* </Sidebar.SwitcherTrigger>
|
|
880
|
+
* </DropdownMenu.Trigger>
|
|
881
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
882
|
+
* </DropdownMenu.Root>
|
|
883
|
+
* </Sidebar.Footer>
|
|
884
|
+
* </Sidebar.Nav>
|
|
885
|
+
* <Sidebar.Trigger />
|
|
886
|
+
* </Sidebar.Root>
|
|
887
|
+
* ```
|
|
888
|
+
*/
|
|
889
|
+
declare const List: ({ "aria-labelledby": ariaLabelledBy, asChild, children, className, "data-slot": dataSlot, ...props }: SidebarListProps) => import("react").JSX.Element;
|
|
890
|
+
type SidebarItemProps = ComponentProps<"li"> & WithAsChild & WithDataSlot;
|
|
891
|
+
/**
|
|
892
|
+
* A single `<li>` row of a `Sidebar.List`. A plain wrapper: the interactive
|
|
893
|
+
* element is the `Sidebar.ItemButton` child, so props, `ref`, and `className`
|
|
894
|
+
* all target the list item itself.
|
|
895
|
+
*
|
|
896
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebaritem
|
|
897
|
+
*
|
|
898
|
+
* @example
|
|
899
|
+
* ```tsx
|
|
900
|
+
* <Sidebar.Root>
|
|
901
|
+
* <Sidebar.Nav aria-label="Main">
|
|
902
|
+
* <Sidebar.Header>
|
|
903
|
+
* <DropdownMenu.Root>
|
|
904
|
+
* <DropdownMenu.Trigger asChild>
|
|
905
|
+
* <Sidebar.SwitcherTrigger>
|
|
906
|
+
* <GlobeIcon />
|
|
907
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
908
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
909
|
+
* </Sidebar.SwitcherTrigger>
|
|
910
|
+
* </DropdownMenu.Trigger>
|
|
911
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
912
|
+
* </DropdownMenu.Root>
|
|
913
|
+
* </Sidebar.Header>
|
|
914
|
+
* <Sidebar.Body>
|
|
915
|
+
* <Sidebar.Group>
|
|
916
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
917
|
+
* <Sidebar.List>
|
|
918
|
+
* <Sidebar.Item>
|
|
919
|
+
* <Sidebar.ItemButton asChild current>
|
|
920
|
+
* <a href="/endpoints">
|
|
921
|
+
* <GraphIcon />
|
|
922
|
+
* Endpoints
|
|
923
|
+
* </a>
|
|
924
|
+
* </Sidebar.ItemButton>
|
|
925
|
+
* </Sidebar.Item>
|
|
926
|
+
* </Sidebar.List>
|
|
927
|
+
* </Sidebar.Group>
|
|
928
|
+
* </Sidebar.Body>
|
|
929
|
+
* <Sidebar.Footer>
|
|
930
|
+
* <Sidebar.Separator />
|
|
931
|
+
* <DropdownMenu.Root>
|
|
932
|
+
* <DropdownMenu.Trigger asChild>
|
|
933
|
+
* <Sidebar.SwitcherTrigger>
|
|
934
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
935
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
936
|
+
* </Avatar.Root>
|
|
937
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
938
|
+
* </Sidebar.SwitcherTrigger>
|
|
939
|
+
* </DropdownMenu.Trigger>
|
|
940
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
941
|
+
* </DropdownMenu.Root>
|
|
942
|
+
* </Sidebar.Footer>
|
|
943
|
+
* </Sidebar.Nav>
|
|
944
|
+
* <Sidebar.Trigger />
|
|
945
|
+
* </Sidebar.Root>
|
|
946
|
+
* ```
|
|
947
|
+
*/
|
|
948
|
+
declare const Item: ({ asChild, children, className, "data-slot": dataSlot, ...props }: SidebarItemProps) => import("react").JSX.Element;
|
|
949
|
+
type SidebarItemButtonProps = ComponentProps<"button"> & WithAsChild & WithDataSlot & {
|
|
950
|
+
/**
|
|
951
|
+
* Marks this row as the current page: sets `aria-current="page"`, which
|
|
952
|
+
* also drives the current-row styling. Consumers control it from their router,
|
|
953
|
+
* e.g. `current={pathname === "/endpoints"}`.
|
|
954
|
+
*
|
|
955
|
+
* A composed child that sets `aria-current="page"` itself (react-router's
|
|
956
|
+
* `NavLink` does) already gets the current-row treatment, so it needs no
|
|
957
|
+
* `current`. This prop is for the rows whose parent knows.
|
|
958
|
+
*/
|
|
959
|
+
current?: boolean;
|
|
960
|
+
};
|
|
961
|
+
/**
|
|
962
|
+
* The interactive row of a `Sidebar.Item`: a leading icon slot and a
|
|
963
|
+
* truncating label. Renders a `<button>` by default; pass `asChild` to
|
|
964
|
+
* compose with a router link. `current` sets `aria-current="page"`, which
|
|
965
|
+
* drives the current-row styling.
|
|
966
|
+
*
|
|
967
|
+
* The current-row treatment follows `aria-current`, so a composed child that
|
|
968
|
+
* marks itself as the current page gets it without `current`: a react-router
|
|
969
|
+
* `NavLink` needs nothing but its `to`, since it already resolved the match the
|
|
970
|
+
* parent would otherwise re-derive:
|
|
971
|
+
*
|
|
972
|
+
* ```tsx
|
|
973
|
+
* <Sidebar.ItemButton asChild>
|
|
974
|
+
* <NavLink to="/endpoints">
|
|
975
|
+
* <GraphIcon />
|
|
976
|
+
* Endpoints
|
|
977
|
+
* </NavLink>
|
|
978
|
+
* </Sidebar.ItemButton>
|
|
979
|
+
* ```
|
|
980
|
+
*
|
|
981
|
+
* The row sizes its **leading** icon to 20px. Trailing visuals (a caret, a
|
|
982
|
+
* count, a status dot) size themselves, so a row composed with
|
|
983
|
+
* `DropdownMenu.Trigger asChild` can end in `<CaretDownIcon className="text-muted
|
|
984
|
+
* ml-auto size-4 shrink-0" />`. That row stays highlighted while its menu is
|
|
985
|
+
* open (`aria-expanded="true"`, supplied by the trigger). Give that menu the same
|
|
986
|
+
* width floor the switcher rows use, `className="min-w-(--sidebar-row-width)"`,
|
|
987
|
+
* so it keeps the expanded row's width instead of shrinking to this row's 28px
|
|
988
|
+
* collapsed chip (see `Sidebar.SwitcherTrigger` for the whole contract).
|
|
989
|
+
*
|
|
990
|
+
* **Data attributes:**
|
|
991
|
+
*
|
|
992
|
+
* | Data Attribute | Value | Description |
|
|
993
|
+
* | --- | --- | --- |
|
|
994
|
+
* | `aria-current` | `"page"` when `current` | Styles the current row with `aria-[current=page]:`, so a composed child that marks itself (react-router's `NavLink`) gets the treatment without the prop. |
|
|
995
|
+
* | `aria-expanded` | `"true"` \| `"false"` | **Read, not stamped**: supplied by a composing `DropdownMenu.Trigger` / `Dialog.Trigger`. The row styles against it so it stays highlighted while its menu is open. |
|
|
996
|
+
*
|
|
997
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebaritembutton
|
|
998
|
+
*
|
|
999
|
+
* @example
|
|
1000
|
+
* ```tsx
|
|
1001
|
+
* <Sidebar.Root>
|
|
1002
|
+
* <Sidebar.Nav aria-label="Main">
|
|
1003
|
+
* <Sidebar.Header>
|
|
1004
|
+
* <DropdownMenu.Root>
|
|
1005
|
+
* <DropdownMenu.Trigger asChild>
|
|
1006
|
+
* <Sidebar.SwitcherTrigger>
|
|
1007
|
+
* <GlobeIcon />
|
|
1008
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
1009
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
1010
|
+
* </Sidebar.SwitcherTrigger>
|
|
1011
|
+
* </DropdownMenu.Trigger>
|
|
1012
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
1013
|
+
* </DropdownMenu.Root>
|
|
1014
|
+
* </Sidebar.Header>
|
|
1015
|
+
* <Sidebar.Body>
|
|
1016
|
+
* <Sidebar.Group>
|
|
1017
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
1018
|
+
* <Sidebar.List>
|
|
1019
|
+
* <Sidebar.Item>
|
|
1020
|
+
* <Sidebar.ItemButton asChild current>
|
|
1021
|
+
* <a href="/endpoints">
|
|
1022
|
+
* <GraphIcon />
|
|
1023
|
+
* Endpoints
|
|
1024
|
+
* </a>
|
|
1025
|
+
* </Sidebar.ItemButton>
|
|
1026
|
+
* </Sidebar.Item>
|
|
1027
|
+
* </Sidebar.List>
|
|
1028
|
+
* </Sidebar.Group>
|
|
1029
|
+
* </Sidebar.Body>
|
|
1030
|
+
* <Sidebar.Footer>
|
|
1031
|
+
* <Sidebar.Separator />
|
|
1032
|
+
* <DropdownMenu.Root>
|
|
1033
|
+
* <DropdownMenu.Trigger asChild>
|
|
1034
|
+
* <Sidebar.SwitcherTrigger>
|
|
1035
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1036
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1037
|
+
* </Avatar.Root>
|
|
1038
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1039
|
+
* </Sidebar.SwitcherTrigger>
|
|
1040
|
+
* </DropdownMenu.Trigger>
|
|
1041
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
1042
|
+
* </DropdownMenu.Root>
|
|
1043
|
+
* </Sidebar.Footer>
|
|
1044
|
+
* </Sidebar.Nav>
|
|
1045
|
+
* <Sidebar.Trigger />
|
|
1046
|
+
* </Sidebar.Root>
|
|
1047
|
+
* ```
|
|
1048
|
+
*/
|
|
1049
|
+
declare const ItemButton: ({ asChild, children, className, current, "data-slot": dataSlot, type, ...props }: SidebarItemButtonProps) => import("react").JSX.Element;
|
|
1050
|
+
type SidebarSearchTriggerProps = ComponentProps<"button"> & WithDataSlot & ({
|
|
1051
|
+
/**
|
|
1052
|
+
* Compose the search row's styling onto your own element. Then the
|
|
1053
|
+
* row's entire content is yours, including any shortcut hint, which
|
|
1054
|
+
* `shortcut` cannot add to a cloned child.
|
|
1055
|
+
*/
|
|
1056
|
+
asChild: true;
|
|
1057
|
+
shortcut?: never;
|
|
1058
|
+
} | {
|
|
1059
|
+
/**
|
|
1060
|
+
* Compose the search row's styling onto your own element. Then the
|
|
1061
|
+
* row's entire content is yours, including any shortcut hint, which
|
|
1062
|
+
* `shortcut` cannot add to a cloned child.
|
|
1063
|
+
*/
|
|
1064
|
+
asChild?: false;
|
|
1065
|
+
/**
|
|
1066
|
+
* The keyboard hint for the chord that opens the same palette, usually
|
|
1067
|
+
* `<><MetaKey /><Kbd>K</Kbd></>`.
|
|
1068
|
+
*
|
|
1069
|
+
* Rendered pinned to the end of the row and **revealed only on hover or
|
|
1070
|
+
* keyboard focus**, so the row reads as a quiet navigation item at rest
|
|
1071
|
+
* and teaches the chord at the moment a user reaches for it. It is
|
|
1072
|
+
* `aria-hidden` and dropped outright in the collapsed sidebar: the chord is
|
|
1073
|
+
* announced by the `aria-keyshortcuts` that `Command.SearchTrigger`
|
|
1074
|
+
* adds, so repeating it here would announce it twice.
|
|
1075
|
+
*
|
|
1076
|
+
* Passed rather than built in, so the sidebar does not have to know
|
|
1077
|
+
* which chord your palette binds.
|
|
1078
|
+
*/
|
|
1079
|
+
shortcut?: ReactNode;
|
|
1080
|
+
});
|
|
1081
|
+
/**
|
|
1082
|
+
* The search row: the row that opens a search or command palette.
|
|
1083
|
+
*
|
|
1084
|
+
* Put it at the top of `Sidebar.Body`, above the first `Sidebar.Group`: it lands
|
|
1085
|
+
* in the same `px-3` gutter as the navigation rows, so it shares their column in
|
|
1086
|
+
* both panel states, and it scrolls with them.
|
|
1087
|
+
*
|
|
1088
|
+
* `Sidebar.Header`, under the switcher, also works, and pins the row above the
|
|
1089
|
+
* scrolling body instead. The switcher stays the header's first child, so it
|
|
1090
|
+
* keeps the `--sidebar-header-height` band an `AppLayout.Header` toolbar
|
|
1091
|
+
* matches, and this row takes the next row down. The header grows for it, so
|
|
1092
|
+
* nothing needs a token override. The header reserves no scrollbar gutter, so on
|
|
1093
|
+
* a platform whose scrollbars take space the row runs wider than the navigation
|
|
1094
|
+
* rows below it, which sit inside `Sidebar.Body`'s reserved gutter.
|
|
1095
|
+
*
|
|
1096
|
+
* It is deliberately a navigation row and not a text field. The row is the same
|
|
1097
|
+
* chrome as a `Sidebar.ItemButton` (same height, padding, radius, hover, and
|
|
1098
|
+
* the same 28px chip in the collapsed sidebar), because a search entry point
|
|
1099
|
+
* in a sidebar is one of the rows, not a form control wedged among them. The
|
|
1100
|
+
* `shortcut` hint appears on hover or focus and is otherwise invisible, which
|
|
1101
|
+
* keeps the resting panel quiet.
|
|
1102
|
+
*
|
|
1103
|
+
* A styled button only. It is not wired to any state. Compose it with
|
|
1104
|
+
* [`Command.SearchTrigger`](https://mantle.ngrok.com/components/navigation/command#commandsearchtrigger),
|
|
1105
|
+
* which supplies the dialog wiring, `aria-keyshortcuts`, and the behavior that
|
|
1106
|
+
* makes typing or pasting into the row open the palette with that text already
|
|
1107
|
+
* in the query. Wrap the pair in `Sidebar.Tooltip` so the row keeps a visible
|
|
1108
|
+
* label once the panel collapses.
|
|
1109
|
+
*
|
|
1110
|
+
* Like every row, the collapsed sidebar clips everything after the leading icon rather than
|
|
1111
|
+
* removing it, so the button keeps its accessible name as a chip.
|
|
1112
|
+
*
|
|
1113
|
+
* **Data attributes:**
|
|
1114
|
+
*
|
|
1115
|
+
* | Data Attribute | Value | Description |
|
|
1116
|
+
* | --- | --- | --- |
|
|
1117
|
+
* | `data-slot` | `"sidebar-search-trigger"` | On the row element. |
|
|
1118
|
+
* | `data-slot` | `"sidebar-search-trigger-label"` | On the `<span>` wrapping `children` on the default `button` path. Absent under `asChild`, which renders no sibling. Always `display: contents`, so your icon and label stay flex items of the row. |
|
|
1119
|
+
* | `data-slot` | `"sidebar-search-trigger-shortcut"` | On the chord chips. Always present on the default `button` path, and `display: none` while it is empty. Absent under `asChild`, where the props union forbids `shortcut`. Carries `translate="no"`: a chord is a key name, not prose. |
|
|
1120
|
+
* | `aria-expanded` | `"true"` \| `"false"` | **Read, not stamped**: supplied by the composing `Command.SearchTrigger` / `Dialog.Trigger`. The row stays highlighted while its palette is open. |
|
|
1121
|
+
*
|
|
1122
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarsearchtrigger
|
|
1123
|
+
*
|
|
1124
|
+
* @example
|
|
1125
|
+
* ```tsx
|
|
1126
|
+
* <Sidebar.Root>
|
|
1127
|
+
* <Command.DialogRoot>
|
|
1128
|
+
* <Sidebar.Nav aria-label="Main">
|
|
1129
|
+
* <Sidebar.Header>
|
|
1130
|
+
* <Sidebar.SwitcherTrigger>
|
|
1131
|
+
* <GlobeIcon />
|
|
1132
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
1133
|
+
* </Sidebar.SwitcherTrigger>
|
|
1134
|
+
* </Sidebar.Header>
|
|
1135
|
+
* <Sidebar.Body>
|
|
1136
|
+
* <Sidebar.Tooltip label="Search">
|
|
1137
|
+
* <Command.SearchTrigger>
|
|
1138
|
+
* <Sidebar.SearchTrigger
|
|
1139
|
+
* shortcut={
|
|
1140
|
+
* <>
|
|
1141
|
+
* <MetaKey />
|
|
1142
|
+
* <Kbd>K</Kbd>
|
|
1143
|
+
* </>
|
|
1144
|
+
* }
|
|
1145
|
+
* >
|
|
1146
|
+
* <MagnifyingGlassIcon />
|
|
1147
|
+
* <span className="min-w-0 flex-1 truncate">Search</span>
|
|
1148
|
+
* </Sidebar.SearchTrigger>
|
|
1149
|
+
* </Command.SearchTrigger>
|
|
1150
|
+
* </Sidebar.Tooltip>
|
|
1151
|
+
* <Sidebar.Group>
|
|
1152
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
1153
|
+
* <Sidebar.List>
|
|
1154
|
+
* <Sidebar.Item>
|
|
1155
|
+
* <Sidebar.ItemButton asChild current>
|
|
1156
|
+
* <a href="/endpoints">
|
|
1157
|
+
* <GraphIcon />
|
|
1158
|
+
* Endpoints
|
|
1159
|
+
* </a>
|
|
1160
|
+
* </Sidebar.ItemButton>
|
|
1161
|
+
* </Sidebar.Item>
|
|
1162
|
+
* </Sidebar.List>
|
|
1163
|
+
* </Sidebar.Group>
|
|
1164
|
+
* </Sidebar.Body>
|
|
1165
|
+
* </Sidebar.Nav>
|
|
1166
|
+
* <Command.DialogContent>
|
|
1167
|
+
* <Command.Input placeholder="Search endpoints, agents, and settings..." />
|
|
1168
|
+
* <Command.List>
|
|
1169
|
+
* <Command.Empty>No results found.</Command.Empty>
|
|
1170
|
+
* </Command.List>
|
|
1171
|
+
* </Command.DialogContent>
|
|
1172
|
+
* </Command.DialogRoot>
|
|
1173
|
+
* <Sidebar.Trigger />
|
|
1174
|
+
* </Sidebar.Root>
|
|
1175
|
+
* ```
|
|
1176
|
+
*/
|
|
1177
|
+
declare const SearchTrigger: ({ asChild, children, className, "data-slot": dataSlot, shortcut, type, ...props }: SidebarSearchTriggerProps) => import("react").JSX.Element;
|
|
1178
|
+
type SidebarSwitcherTriggerProps = ComponentProps<"button"> & WithAsChild & WithDataSlot;
|
|
1179
|
+
/**
|
|
1180
|
+
* The styled row for the sidebar's switchers: the app/product switcher in
|
|
1181
|
+
* `Sidebar.Header` and the account/user row in `Sidebar.Footer`. A styled
|
|
1182
|
+
* button only: it is not wired to any state. Compose it with
|
|
1183
|
+
* `DropdownMenu.Trigger asChild` or `Dialog.Trigger asChild`, which supply
|
|
1184
|
+
* the open state (`aria-expanded` styling comes for free from those
|
|
1185
|
+
* primitives).
|
|
1186
|
+
*
|
|
1187
|
+
* Inside the collapsed sidebar, the row collapses to its **first child
|
|
1188
|
+
* element**, the leading visual (product icon, account avatar), and the
|
|
1189
|
+
* remaining children become visually hidden while staying in the
|
|
1190
|
+
* accessibility tree, so the button's accessible name is unchanged. Wrap
|
|
1191
|
+
* loose text in an element (e.g. a `<span>`) so it participates.
|
|
1192
|
+
*
|
|
1193
|
+
* A menu opened from the row should be as wide as the row. `width="trigger"`
|
|
1194
|
+
* does that while the panel is expanded, but the row shrinks to a 36px chip in
|
|
1195
|
+
* the collapsed sidebar and would drag the menu down to it. Floor the menu at the
|
|
1196
|
+
* expanded row width with `className="min-w-(--sidebar-row-width)"`, the
|
|
1197
|
+
* token `mantle.css` declares at `:root` for exactly this, since the menu
|
|
1198
|
+
* renders in a portal and inherits nothing from the panel.
|
|
1199
|
+
*
|
|
1200
|
+
* - The floor is a no-op while the panel is expanded: the row already measures that wide.
|
|
1201
|
+
* - In the mobile sheet the floor is inert as long as the sheet's row is the wider of the two: `--sidebar-width-mobile` minus `1.5rem` and the sheet's 1px border, vs `--sidebar-width` minus `1rem` (263px vs 192px at the defaults).
|
|
1202
|
+
* - Widen `--sidebar-width-mobile` whenever you widen `--sidebar-width`, or the floor overhangs the sheet.
|
|
1203
|
+
*
|
|
1204
|
+
* **Data attributes:**
|
|
1205
|
+
*
|
|
1206
|
+
* | Data Attribute | Value | Description |
|
|
1207
|
+
* | --- | --- | --- |
|
|
1208
|
+
* | `aria-expanded` | `"true"` \| `"false"` | **Read, not stamped**: supplied by the composing `DropdownMenu.Trigger` / `Dialog.Trigger`. The row styles against it so it stays highlighted while its menu is open. |
|
|
1209
|
+
*
|
|
1210
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarswitchertrigger
|
|
1211
|
+
*
|
|
1212
|
+
* @example
|
|
1213
|
+
* ```tsx
|
|
1214
|
+
* <Sidebar.Root>
|
|
1215
|
+
* <Sidebar.Nav aria-label="Main">
|
|
1216
|
+
* <Sidebar.Header>
|
|
1217
|
+
* <DropdownMenu.Root>
|
|
1218
|
+
* <DropdownMenu.Trigger asChild>
|
|
1219
|
+
* <Sidebar.SwitcherTrigger>
|
|
1220
|
+
* <GlobeIcon />
|
|
1221
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
1222
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
1223
|
+
* </Sidebar.SwitcherTrigger>
|
|
1224
|
+
* </DropdownMenu.Trigger>
|
|
1225
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
1226
|
+
* </DropdownMenu.Root>
|
|
1227
|
+
* </Sidebar.Header>
|
|
1228
|
+
* <Sidebar.Body>
|
|
1229
|
+
* <Sidebar.Group>
|
|
1230
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
1231
|
+
* <Sidebar.List>
|
|
1232
|
+
* <Sidebar.Item>
|
|
1233
|
+
* <Sidebar.ItemButton asChild current>
|
|
1234
|
+
* <a href="/endpoints">
|
|
1235
|
+
* <GraphIcon />
|
|
1236
|
+
* Endpoints
|
|
1237
|
+
* </a>
|
|
1238
|
+
* </Sidebar.ItemButton>
|
|
1239
|
+
* </Sidebar.Item>
|
|
1240
|
+
* </Sidebar.List>
|
|
1241
|
+
* </Sidebar.Group>
|
|
1242
|
+
* </Sidebar.Body>
|
|
1243
|
+
* <Sidebar.Footer>
|
|
1244
|
+
* <Sidebar.Separator />
|
|
1245
|
+
* <DropdownMenu.Root>
|
|
1246
|
+
* <DropdownMenu.Trigger asChild>
|
|
1247
|
+
* <Sidebar.SwitcherTrigger>
|
|
1248
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1249
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1250
|
+
* </Avatar.Root>
|
|
1251
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1252
|
+
* </Sidebar.SwitcherTrigger>
|
|
1253
|
+
* </DropdownMenu.Trigger>
|
|
1254
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
1255
|
+
* </DropdownMenu.Root>
|
|
1256
|
+
* </Sidebar.Footer>
|
|
1257
|
+
* </Sidebar.Nav>
|
|
1258
|
+
* <Sidebar.Trigger />
|
|
1259
|
+
* </Sidebar.Root>
|
|
1260
|
+
* ```
|
|
1261
|
+
*/
|
|
1262
|
+
declare const SwitcherTrigger: ({ asChild, children, className, "data-slot": dataSlot, type, ...props }: SidebarSwitcherTriggerProps) => import("react").JSX.Element;
|
|
1263
|
+
/**
|
|
1264
|
+
* The props for `Sidebar.Tooltip`. `Tooltip.Content`'s props (so `className`,
|
|
1265
|
+
* `style`, `ref`, and any `data-*` reach the tooltip surface), except the parts
|
|
1266
|
+
* this row owns: `children` is the row being labeled (not the tooltip body,
|
|
1267
|
+
* which is `label`), and `side` becomes optional with a sidebar default.
|
|
1268
|
+
*/
|
|
1269
|
+
type SidebarTooltipProps = Omit<ComponentProps<typeof Content>, "children" | "side"> & WithDataSlot & {
|
|
1270
|
+
/**
|
|
1271
|
+
* The row this labels: a `Sidebar.ItemButton` or `Sidebar.SwitcherTrigger`,
|
|
1272
|
+
* optionally already wrapped in a `DropdownMenu.Trigger asChild`.
|
|
1273
|
+
*
|
|
1274
|
+
* A single element, required: `Tooltip.Trigger asChild` clones its child, so
|
|
1275
|
+
* text renders nothing a pointer can hover and no children renders no row at
|
|
1276
|
+
* all. Both fail silently.
|
|
1277
|
+
*/
|
|
1278
|
+
children: ReactElement;
|
|
1279
|
+
/**
|
|
1280
|
+
* What the tooltip says. Normally the row's own label text: the collapsed sidebar clips the
|
|
1281
|
+
* visible one, so this is what a sighted pointer user reads. Required: the
|
|
1282
|
+
* collapsed sidebar is the only state that shows a label, so there is no text to fall
|
|
1283
|
+
* back to.
|
|
1284
|
+
*/
|
|
1285
|
+
label: ReactNode;
|
|
1286
|
+
/**
|
|
1287
|
+
* The keyboard chord that reaches the same row, rendered after the label,
|
|
1288
|
+
* usually `<><MetaKey /><Kbd>K</Kbd></>`. The collapsed sidebar hides the row's own
|
|
1289
|
+
* shortcut hint along with its label, so the tooltip is where a pointer user
|
|
1290
|
+
* can still learn the chord. The chips are `aria-hidden`: a tooltip is wired
|
|
1291
|
+
* as its row's `aria-describedby`, and the chord is already announced by the
|
|
1292
|
+
* row's `aria-keyshortcuts`.
|
|
1293
|
+
*
|
|
1294
|
+
* Passed rather than built in, so the sidebar does not have to know which
|
|
1295
|
+
* chord the row's palette or action binds.
|
|
1296
|
+
*/
|
|
1297
|
+
shortcut?: ReactNode;
|
|
1298
|
+
/**
|
|
1299
|
+
* Which side of the row the tooltip opens on. The sidebar sits at the inline
|
|
1300
|
+
* start of the viewport, so the default points the tooltip away from it.
|
|
1301
|
+
*
|
|
1302
|
+
* @default "right"
|
|
1303
|
+
*/
|
|
1304
|
+
side?: ComponentProps<typeof Content>["side"];
|
|
1305
|
+
};
|
|
1306
|
+
/**
|
|
1307
|
+
* Labels a sidebar row only while the desktop panel is collapsed
|
|
1308
|
+
* to its icons. Wrap it around a `Sidebar.ItemButton` or
|
|
1309
|
+
* `Sidebar.SwitcherTrigger`.
|
|
1310
|
+
*
|
|
1311
|
+
* The collapsed sidebar keeps every row's label in the accessibility tree (clipped,
|
|
1312
|
+
* not removed), which serves screen-reader users but leaves a sighted pointer
|
|
1313
|
+
* user with an unlabeled icon column. This restores the label for them without
|
|
1314
|
+
* duplicating it for anyone else: expanded rows already read their own text, and
|
|
1315
|
+
* the mobile sheet shows full labels, so the collapsed desktop sidebar is the only
|
|
1316
|
+
* state that shows a label at all.
|
|
1317
|
+
*
|
|
1318
|
+
* It opens the way any tooltip does (the pointer entering the row, or focus
|
|
1319
|
+
* reaching it), and the sidebar state vetoes it: the expanded panel and the mobile
|
|
1320
|
+
* sheet keep the tooltip closed with no `aria-describedby` on the row, and
|
|
1321
|
+
* toggling the sidebar dismisses whatever was showing, so collapsing the panel
|
|
1322
|
+
* cannot pop a label under a pointer that has already moved on.
|
|
1323
|
+
*
|
|
1324
|
+
* This part does not mount its own `TooltipProvider`, so an app-wide provider
|
|
1325
|
+
* sets the delay for each row.
|
|
1326
|
+
* The one provider setting it does override is hoverable content: a row label
|
|
1327
|
+
* holds nothing to hover into, so the pointer leaving the row closes it.
|
|
1328
|
+
*
|
|
1329
|
+
* It composes with a menu trigger: nest `DropdownMenu.Root >
|
|
1330
|
+
* Sidebar.Tooltip > DropdownMenu.Trigger asChild > Sidebar.ItemButton` for a
|
|
1331
|
+
* row that opens a menu *and* labels itself in the collapsed sidebar. `DropdownMenu.Root` must
|
|
1332
|
+
* stay **outside** the tooltip: it is renderless, and `Tooltip.Trigger asChild`
|
|
1333
|
+
* needs a real element to clone.
|
|
1334
|
+
*
|
|
1335
|
+
* `children` is the row; `label` is what the tooltip says. Every other prop is
|
|
1336
|
+
* `Tooltip.Content`'s and lands on the tooltip surface: `className`, `style`,
|
|
1337
|
+
* `ref`, `data-*`, and positioning props such as `align` and `sideOffset`.
|
|
1338
|
+
* `side` defaults to `"right"`, so the tooltip opens away from the sidebar.
|
|
1339
|
+
*
|
|
1340
|
+
* **Data attributes:**
|
|
1341
|
+
*
|
|
1342
|
+
* | Data Attribute | Value | Description |
|
|
1343
|
+
* | --- | --- | --- |
|
|
1344
|
+
* | `data-slot` | `"sidebar-tooltip tooltip-content"` | On the tooltip surface, with any forwarded chain ahead of it and `Tooltip.Content`'s own slot after it. |
|
|
1345
|
+
* | `data-open` | present while open | Read, not stamped: on the tooltip surface, from `Tooltip.Content`. |
|
|
1346
|
+
* | `data-side` | `"top"` \| `"right"` \| `"bottom"` \| `"left"` | Read, not stamped: on the tooltip surface, from `Tooltip.Content`. The resolved side, `"right"` by default. |
|
|
1347
|
+
* | `data-slot` | `"sidebar-tooltip-row"` | Inside that surface, on the flex row holding the label and the optional chord chips. Nested inside `Tooltip.Content`'s own `tooltip-label` div. Always present, so a chord that arrives later appends instead of replacing the label. |
|
|
1348
|
+
* | `data-slot` | `"sidebar-tooltip-label"` | On the `<span>` wrapping `label` inside that row. Always present, and `display: contents`, so the label stays a flex item of the row. |
|
|
1349
|
+
* | `data-slot` | `"sidebar-tooltip-shortcut"` | On the chord chips. Present only while `shortcut` holds something. Carries `translate="no"`: a chord is a key name, not prose. |
|
|
1350
|
+
*
|
|
1351
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebartooltip
|
|
1352
|
+
*
|
|
1353
|
+
* @example
|
|
1354
|
+
* ```tsx
|
|
1355
|
+
* <TooltipProvider>
|
|
1356
|
+
* <Sidebar.Root>
|
|
1357
|
+
* <Sidebar.Nav aria-label="Main">
|
|
1358
|
+
* <Sidebar.Header>
|
|
1359
|
+
* <DropdownMenu.Root>
|
|
1360
|
+
* <DropdownMenu.Trigger asChild>
|
|
1361
|
+
* <Sidebar.SwitcherTrigger>
|
|
1362
|
+
* <GlobeIcon />
|
|
1363
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
1364
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
1365
|
+
* </Sidebar.SwitcherTrigger>
|
|
1366
|
+
* </DropdownMenu.Trigger>
|
|
1367
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
1368
|
+
* </DropdownMenu.Root>
|
|
1369
|
+
* </Sidebar.Header>
|
|
1370
|
+
* <Sidebar.Body>
|
|
1371
|
+
* <Sidebar.Group>
|
|
1372
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
1373
|
+
* <Sidebar.List>
|
|
1374
|
+
* <Sidebar.Item>
|
|
1375
|
+
* <Sidebar.Tooltip label="Endpoints">
|
|
1376
|
+
* <Sidebar.ItemButton asChild current>
|
|
1377
|
+
* <a href="/endpoints">
|
|
1378
|
+
* <GraphIcon />
|
|
1379
|
+
* Endpoints
|
|
1380
|
+
* </a>
|
|
1381
|
+
* </Sidebar.ItemButton>
|
|
1382
|
+
* </Sidebar.Tooltip>
|
|
1383
|
+
* </Sidebar.Item>
|
|
1384
|
+
* </Sidebar.List>
|
|
1385
|
+
* </Sidebar.Group>
|
|
1386
|
+
* </Sidebar.Body>
|
|
1387
|
+
* <Sidebar.Footer>
|
|
1388
|
+
* <Sidebar.Separator />
|
|
1389
|
+
* <DropdownMenu.Root>
|
|
1390
|
+
* <Sidebar.Tooltip label="Acme Corp">
|
|
1391
|
+
* <DropdownMenu.Trigger asChild>
|
|
1392
|
+
* <Sidebar.SwitcherTrigger>
|
|
1393
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1394
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1395
|
+
* </Avatar.Root>
|
|
1396
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1397
|
+
* </Sidebar.SwitcherTrigger>
|
|
1398
|
+
* </DropdownMenu.Trigger>
|
|
1399
|
+
* </Sidebar.Tooltip>
|
|
1400
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
1401
|
+
* </DropdownMenu.Root>
|
|
1402
|
+
* </Sidebar.Footer>
|
|
1403
|
+
* </Sidebar.Nav>
|
|
1404
|
+
* <Sidebar.Trigger />
|
|
1405
|
+
* </Sidebar.Root>
|
|
1406
|
+
* </TooltipProvider>
|
|
1407
|
+
* ```
|
|
1408
|
+
*/
|
|
1409
|
+
declare const SidebarTooltip: ({ children, "data-slot": dataSlot, label, shortcut, side, ...props }: SidebarTooltipProps) => import("react").JSX.Element;
|
|
1410
|
+
type SidebarSeparatorProps = Omit<ComponentProps<typeof Separator>, "asChild" | "children"> & SelfClosingWithAsChild & WithDataSlot;
|
|
1411
|
+
/**
|
|
1412
|
+
* An inset hairline between sidebar regions. Composes the mantle `Separator`,
|
|
1413
|
+
* staying aligned with the `px-3` content padding of `Sidebar.Body` and
|
|
1414
|
+
* `Sidebar.Footer` (it deliberately does not run edge to edge) with `my-3`
|
|
1415
|
+
* breathing room above and below. In the collapsed sidebar it narrows to the 36px chip
|
|
1416
|
+
* width of `Sidebar.SwitcherTrigger`, 8px wider than the collapsed sidebar's 28px row chips,
|
|
1417
|
+
* so it stays optically centered between the viewport edge and the content
|
|
1418
|
+
* card.
|
|
1419
|
+
*
|
|
1420
|
+
* **Data attributes:**
|
|
1421
|
+
*
|
|
1422
|
+
* | Data Attribute | Value | Description |
|
|
1423
|
+
* | --- | --- | --- |
|
|
1424
|
+
* | `data-orientation` | `"horizontal"` \| `"vertical"` | Read, not stamped: `Separator` reflects its `orientation` prop, `"horizontal"` by default, after a `HorizontalSeparatorGroup` ancestor wins. |
|
|
1425
|
+
* | `data-separator` | present | Read, not stamped: presence-only, from `Separator`. Lets a `HorizontalSeparatorGroup` exempt it from `shrink-0`. |
|
|
1426
|
+
*
|
|
1427
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarseparator
|
|
1428
|
+
*
|
|
1429
|
+
* @example
|
|
1430
|
+
* ```tsx
|
|
1431
|
+
* <Sidebar.Root>
|
|
1432
|
+
* <Sidebar.Nav aria-label="Main">
|
|
1433
|
+
* <Sidebar.Header>
|
|
1434
|
+
* <DropdownMenu.Root>
|
|
1435
|
+
* <DropdownMenu.Trigger asChild>
|
|
1436
|
+
* <Sidebar.SwitcherTrigger>
|
|
1437
|
+
* <GlobeIcon />
|
|
1438
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
1439
|
+
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
1440
|
+
* </Sidebar.SwitcherTrigger>
|
|
1441
|
+
* </DropdownMenu.Trigger>
|
|
1442
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
1443
|
+
* </DropdownMenu.Root>
|
|
1444
|
+
* </Sidebar.Header>
|
|
1445
|
+
* <Sidebar.Body>
|
|
1446
|
+
* <Sidebar.Group>
|
|
1447
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
1448
|
+
* <Sidebar.List>
|
|
1449
|
+
* <Sidebar.Item>
|
|
1450
|
+
* <Sidebar.ItemButton asChild current>
|
|
1451
|
+
* <a href="/endpoints">
|
|
1452
|
+
* <GraphIcon />
|
|
1453
|
+
* Endpoints
|
|
1454
|
+
* </a>
|
|
1455
|
+
* </Sidebar.ItemButton>
|
|
1456
|
+
* </Sidebar.Item>
|
|
1457
|
+
* </Sidebar.List>
|
|
1458
|
+
* </Sidebar.Group>
|
|
1459
|
+
* </Sidebar.Body>
|
|
1460
|
+
* <Sidebar.Footer>
|
|
1461
|
+
* <Sidebar.Separator />
|
|
1462
|
+
* <DropdownMenu.Root>
|
|
1463
|
+
* <DropdownMenu.Trigger asChild>
|
|
1464
|
+
* <Sidebar.SwitcherTrigger>
|
|
1465
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1466
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1467
|
+
* </Avatar.Root>
|
|
1468
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1469
|
+
* </Sidebar.SwitcherTrigger>
|
|
1470
|
+
* </DropdownMenu.Trigger>
|
|
1471
|
+
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
1472
|
+
* </DropdownMenu.Root>
|
|
1473
|
+
* </Sidebar.Footer>
|
|
1474
|
+
* </Sidebar.Nav>
|
|
1475
|
+
* <Sidebar.Trigger />
|
|
1476
|
+
* </Sidebar.Root>
|
|
1477
|
+
* ```
|
|
1478
|
+
*/
|
|
1479
|
+
declare const SidebarSeparator: ({ className, "data-slot": dataSlot, ...props }: SidebarSeparatorProps) => import("react").JSX.Element;
|
|
1480
|
+
export { Trigger as _, Header as a, List as c, SearchTrigger as d, SidebarMobileBreakpoint as f, SwitcherTrigger as g, SidebarTooltip as h, GroupLabel as i, Nav as l, SidebarState as m, Footer as n, Item as o, SidebarSeparator as p, Group as r, ItemButton as s, Body as t, Root as u, useSidebar as v };
|