@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
package/dist/command.d.ts
CHANGED
|
@@ -3,1119 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see https://mantle.ngrok.com/components/navigation/command
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { Command as Command$1, useCommandState } from "cmdk";
|
|
11
|
-
/**
|
|
12
|
-
* The props for `Command.SearchTrigger`.
|
|
13
|
-
*
|
|
14
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandsearchtrigger
|
|
15
|
-
*/
|
|
16
|
-
type CommandSearchTriggerProps = Omit<ComponentProps<typeof Slot>, "children"> & {
|
|
17
|
-
/**
|
|
18
|
-
* The control that opens the palette — the row or button a user sees.
|
|
19
|
-
*
|
|
20
|
-
* A single element, required: this part renders no DOM of its own and
|
|
21
|
-
* clones what it is given, so text renders nothing to click and no children
|
|
22
|
-
* renders no trigger at all. In a sidebar this is a
|
|
23
|
-
* [`Sidebar.SearchTrigger`](https://mantle.ngrok.com/components/navigation/sidebar#sidebarsearchtrigger);
|
|
24
|
-
* anywhere else it is whatever your design calls for.
|
|
25
|
-
*/
|
|
26
|
-
children: ReactElement;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Makes any control behave like a search field that opens the command palette.
|
|
30
|
-
* It renders no DOM of its own — it clones its child and gives it the wiring,
|
|
31
|
-
* so **presentation belongs entirely to the child** and this part never has an
|
|
32
|
-
* opinion about how the trigger looks or how it behaves in a collapsed sidebar
|
|
33
|
-
* rail.
|
|
34
|
-
*
|
|
35
|
-
* The child stays a `<button>`, not a text field, even when it looks like one:
|
|
36
|
-
* it opens a modal palette, so a screen reader hears "has popup dialog,
|
|
37
|
-
* collapsed" while a sighted user sees a field. A real `<input>` with results
|
|
38
|
-
* in a popover is a combobox, and
|
|
39
|
-
* [Combobox](https://mantle.ngrok.com/components/forms/combobox) is the
|
|
40
|
-
* component for that intent.
|
|
41
|
-
*
|
|
42
|
-
* Because a search-shaped control invites typing, the wiring makes typing work:
|
|
43
|
-
* a printable keystroke or a paste while the trigger has focus opens the
|
|
44
|
-
* palette with that text already in `Command.Input`, so no character is lost
|
|
45
|
-
* between the trigger and the field. `Enter`, `Space`, and a click open it
|
|
46
|
-
* empty. See
|
|
47
|
-
* [`searchActionFromKeyDown`](https://mantle.ngrok.com/components/navigation/command#searchactionfromkeydown)
|
|
48
|
-
* for the exact policy, including IME composition.
|
|
49
|
-
*
|
|
50
|
-
* What it contributes to the child:
|
|
51
|
-
*
|
|
52
|
-
* - `aria-haspopup="dialog"`, `aria-expanded`, `aria-controls`, and focus
|
|
53
|
-
* restoration on close, from the `Dialog.Trigger` it composes. Inside a
|
|
54
|
-
* `Sheet` (a `Sidebar.Nav` below its `mobileBreakpoint`) the trigger still
|
|
55
|
-
* binds to `Command.DialogRoot`, because `Sheet` parts read a dialog scope
|
|
56
|
-
* of their own.
|
|
57
|
-
* - `data-state="open" | "closed"`, stamped from the palette's own state so it
|
|
58
|
-
* survives being wrapped in another cloning trigger — a `Sidebar.Tooltip`
|
|
59
|
-
* passes its own `data-state` down, and Radix's prop merge would otherwise
|
|
60
|
-
* let it win.
|
|
61
|
-
* - `aria-keyshortcuts`, so the `⌘K` binding is announced rather than only
|
|
62
|
-
* drawn — present only when `Command.DialogRoot` owns the shortcut, so it can
|
|
63
|
-
* never advertise a binding that is not bound. Pass your own value to
|
|
64
|
-
* announce a chord you bound yourself.
|
|
65
|
-
* - `onKeyDown` and `onPaste`, composed with the child's own handlers.
|
|
66
|
-
* - `data-slot="command-search-trigger"`, joined ahead of the child's own slot.
|
|
67
|
-
*
|
|
68
|
-
* Every other prop it receives passes through to the child, so composing it
|
|
69
|
-
* inside another cloning trigger works: `Sidebar.Tooltip` → `Command.SearchTrigger`
|
|
70
|
-
* → `Sidebar.SearchTrigger` routes the tooltip's handlers all the way down.
|
|
71
|
-
*
|
|
72
|
-
* It adds no accessible name: the child's visible label is the name, so the two
|
|
73
|
-
* cannot drift apart. A visible `⌘K` hint belongs to the child and should be
|
|
74
|
-
* `aria-hidden` there, since `aria-keyshortcuts` already announces the chord —
|
|
75
|
-
* `Sidebar.SearchTrigger`'s `shortcut` prop does that for you.
|
|
76
|
-
*
|
|
77
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandsearchtrigger
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* ```tsx
|
|
81
|
-
* <Command.DialogRoot>
|
|
82
|
-
* <Command.SearchTrigger>
|
|
83
|
-
* <button type="button">
|
|
84
|
-
* <MagnifyingGlassIcon />
|
|
85
|
-
* <span>Search…</span>
|
|
86
|
-
* </button>
|
|
87
|
-
* </Command.SearchTrigger>
|
|
88
|
-
* <Command.DialogContent>
|
|
89
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
90
|
-
* <Command.List>
|
|
91
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
92
|
-
* <Command.Group heading="Suggestions">
|
|
93
|
-
* <Command.Item>
|
|
94
|
-
* <span>Calendar</span>
|
|
95
|
-
* </Command.Item>
|
|
96
|
-
* </Command.Group>
|
|
97
|
-
* <Command.Separator />
|
|
98
|
-
* <Command.Group heading="Settings">
|
|
99
|
-
* <Command.Item>
|
|
100
|
-
* <span>Profile</span>
|
|
101
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
102
|
-
* </Command.Item>
|
|
103
|
-
* </Command.Group>
|
|
104
|
-
* </Command.List>
|
|
105
|
-
* </Command.DialogContent>
|
|
106
|
-
* </Command.DialogRoot>
|
|
107
|
-
* ```
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* In a sidebar, where `Sidebar.SearchTrigger` owns the row's appearance in both
|
|
111
|
-
* panel states — including its hover-revealed shortcut hint — and
|
|
112
|
-
* `Sidebar.Tooltip` labels it in the collapsed rail. `Command.DialogRoot` sits
|
|
113
|
-
* above `Sidebar.Nav`: below `mobileBreakpoint` the nav is a sheet that
|
|
114
|
-
* unmounts its subtree when it closes, and a root inside it takes the `⌘K`
|
|
115
|
-
* binding with it.
|
|
116
|
-
* ```tsx
|
|
117
|
-
* <Sidebar.Root>
|
|
118
|
-
* <Command.DialogRoot>
|
|
119
|
-
* <Sidebar.Nav aria-label="Main">
|
|
120
|
-
* <Sidebar.Body>
|
|
121
|
-
* <Sidebar.Tooltip label="Search">
|
|
122
|
-
* <Command.SearchTrigger>
|
|
123
|
-
* <Sidebar.SearchTrigger
|
|
124
|
-
* shortcut={
|
|
125
|
-
* <>
|
|
126
|
-
* <MetaKey />
|
|
127
|
-
* <Kbd>K</Kbd>
|
|
128
|
-
* </>
|
|
129
|
-
* }
|
|
130
|
-
* >
|
|
131
|
-
* <MagnifyingGlassIcon />
|
|
132
|
-
* <span className="min-w-0 flex-1 truncate">Search</span>
|
|
133
|
-
* </Sidebar.SearchTrigger>
|
|
134
|
-
* </Command.SearchTrigger>
|
|
135
|
-
* </Sidebar.Tooltip>
|
|
136
|
-
* </Sidebar.Body>
|
|
137
|
-
* </Sidebar.Nav>
|
|
138
|
-
* <Command.DialogContent>
|
|
139
|
-
* <Command.Input placeholder="Search endpoints, agents, and settings..." />
|
|
140
|
-
* <Command.List>
|
|
141
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
142
|
-
* </Command.List>
|
|
143
|
-
* </Command.DialogContent>
|
|
144
|
-
* </Command.DialogRoot>
|
|
145
|
-
* <Sidebar.Trigger />
|
|
146
|
-
* </Sidebar.Root>
|
|
147
|
-
* ```
|
|
148
|
-
*/
|
|
149
|
-
declare const CommandSearchTrigger: ({ "aria-keyshortcuts": ariaKeyshortcuts, children, "data-slot": dataSlot, onKeyDown, onPaste, ...props }: CommandSearchTriggerProps) => import("react").JSX.Element;
|
|
150
|
-
type CommandRootProps = ComponentProps<typeof Command$1> & WithDataSlot;
|
|
151
|
-
/**
|
|
152
|
-
* The inline palette, wrapping `Command.Input` and `Command.List`. It owns the
|
|
153
|
-
* filtering and the active item for every part below it — `Command.DialogContent`
|
|
154
|
-
* renders one itself, so a modal palette does not add it.
|
|
155
|
-
*
|
|
156
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandroot
|
|
157
|
-
*
|
|
158
|
-
* @example
|
|
159
|
-
* ```tsx
|
|
160
|
-
* <Command.DialogRoot>
|
|
161
|
-
* <Command.SearchTrigger>
|
|
162
|
-
* <button type="button">Search…</button>
|
|
163
|
-
* </Command.SearchTrigger>
|
|
164
|
-
* <Command.DialogContent>
|
|
165
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
166
|
-
* <Command.List>
|
|
167
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
168
|
-
* <Command.Group heading="Suggestions">
|
|
169
|
-
* <Command.Item>
|
|
170
|
-
* <span>Calendar</span>
|
|
171
|
-
* </Command.Item>
|
|
172
|
-
* </Command.Group>
|
|
173
|
-
* <Command.Separator />
|
|
174
|
-
* <Command.Group heading="Settings">
|
|
175
|
-
* <Command.Item>
|
|
176
|
-
* <span>Profile</span>
|
|
177
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
178
|
-
* </Command.Item>
|
|
179
|
-
* </Command.Group>
|
|
180
|
-
* </Command.List>
|
|
181
|
-
* </Command.DialogContent>
|
|
182
|
-
* </Command.DialogRoot>
|
|
183
|
-
* ```
|
|
184
|
-
*/
|
|
185
|
-
declare const CommandRoot: ({ "data-slot": dataSlot, className, ...props }: CommandRootProps) => import("react").JSX.Element;
|
|
186
|
-
/**
|
|
187
|
-
* The props for `Command.DialogRoot`. `Dialog.Root`'s props — so `modal` still
|
|
188
|
-
* reaches the underlying dialog — with the open state and the keyboard shortcut
|
|
189
|
-
* redeclared here, because this part owns them.
|
|
190
|
-
*
|
|
191
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commanddialogroot
|
|
192
|
-
*/
|
|
193
|
-
type CommandDialogRootProps = Omit<ComponentProps<typeof Dialog.Root>, "children" | "defaultOpen" | "onOpenChange" | "open"> & {
|
|
194
|
-
/**
|
|
195
|
-
* The palette's parts — a `Command.DialogContent`, and any trigger or
|
|
196
|
-
* consumer of `useCommandDialog()`. `DialogRoot` renders no DOM of its own.
|
|
197
|
-
*/
|
|
198
|
-
children?: ReactNode;
|
|
199
|
-
/**
|
|
200
|
-
* The initial open state for the uncontrolled case.
|
|
201
|
-
*
|
|
202
|
-
* @default false
|
|
203
|
-
*/
|
|
204
|
-
defaultOpen?: boolean;
|
|
205
|
-
/**
|
|
206
|
-
* Bind `⌘K` (macOS) / `Ctrl+K` (Windows/Linux) to toggle the palette. The
|
|
207
|
-
* shortcut requires exactly the platform modifier + `k`, resolved per host —
|
|
208
|
-
* the two never substitute for each other, so macOS's native `Ctrl+K` ("kill
|
|
209
|
-
* to end of line") is left alone. `Shift`/`Alt` combinations pass through.
|
|
210
|
-
*
|
|
211
|
-
* It lives here rather than on `Command.SearchTrigger` because the trigger
|
|
212
|
-
* may be unmounted while the shortcut must still work — a sidebar rendered
|
|
213
|
-
* as a mobile sheet unmounts its whole tree when the sheet is closed.
|
|
214
|
-
*
|
|
215
|
-
* The shortcut is ignored while focus is in a rich-text or code editor
|
|
216
|
-
* (`contenteditable`, or a `<textarea>`, which is what Monaco attaches to),
|
|
217
|
-
* where `⌘K` is already bound to "insert link" or a chord prefix. It
|
|
218
|
-
* deliberately still fires from a plain `<input>`, including the palette's
|
|
219
|
-
* own `Command.Input` — so the chord closes what it opened.
|
|
220
|
-
*
|
|
221
|
-
* An earlier `keydown` listener that calls `preventDefault()` (on `document`,
|
|
222
|
-
* or on an element) stops the shortcut. Do not bind `⌘K` in your app as
|
|
223
|
-
* well: delete the local binding, or set `false`.
|
|
224
|
-
*
|
|
225
|
-
* Exactly one root per window owns the shortcut: the first mounted root that
|
|
226
|
-
* wants it. Additional roots queue and take over when the owner unmounts, so
|
|
227
|
-
* a second palette never opens alongside the first.
|
|
228
|
-
*
|
|
229
|
-
* Set `false` to bind the chord yourself with `useCommandDialog()`.
|
|
230
|
-
* `Command.SearchTrigger` then adds no `aria-keyshortcuts` of its own — pass
|
|
231
|
-
* one to announce the chord you bound — and `useCommandDialog().keyboardShortcut`
|
|
232
|
-
* reports the same flag. The *visible* hint always belongs to the trigger's
|
|
233
|
-
* child, so gating that on the flag is the child's job.
|
|
234
|
-
*
|
|
235
|
-
* @default true
|
|
236
|
-
*/
|
|
237
|
-
keyboardShortcut?: boolean;
|
|
238
|
-
/**
|
|
239
|
-
* Called with the next open state whenever it changes.
|
|
240
|
-
*/
|
|
241
|
-
onOpenChange?: (open: boolean) => void;
|
|
242
|
-
/**
|
|
243
|
-
* Controlled open state. Pair with `onOpenChange`.
|
|
244
|
-
*/
|
|
245
|
-
open?: boolean;
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* The state owner for a command palette. Renders no DOM of its own; it owns
|
|
249
|
-
* the open state, the query text, and the `⌘K` shortcut, and carries them to
|
|
250
|
-
* every part below through `useCommandDialog()`.
|
|
251
|
-
*
|
|
252
|
-
* Owning the query is what makes typing into `Command.SearchTrigger` work: the
|
|
253
|
-
* seed and the open state land in one state update, so `Command.Input` mounts
|
|
254
|
-
* with the character already in it and no keystroke races the dialog's mount.
|
|
255
|
-
*
|
|
256
|
-
* **Opening always starts from a known query** — the seed, or empty. That
|
|
257
|
-
* happens at open time rather than by clearing on close, because
|
|
258
|
-
* `Dialog.Content` animates out and clearing on close would swap the visible
|
|
259
|
-
* list mid-animation. So dismissing and reopening never resurrects the previous
|
|
260
|
-
* search.
|
|
261
|
-
*
|
|
262
|
-
* Pass `open`/`onOpenChange` to control the open state; the query stays
|
|
263
|
-
* internal either way. To own the query too, pass `value`/`onValueChange` to
|
|
264
|
-
* `Command.Input` — see that part for the trade-off.
|
|
265
|
-
*
|
|
266
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commanddialogroot
|
|
267
|
-
*
|
|
268
|
-
* @example
|
|
269
|
-
* ```tsx
|
|
270
|
-
* <Command.DialogRoot>
|
|
271
|
-
* <Command.SearchTrigger>
|
|
272
|
-
* <button type="button">Search…</button>
|
|
273
|
-
* </Command.SearchTrigger>
|
|
274
|
-
* <Command.DialogContent>
|
|
275
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
276
|
-
* <Command.List>
|
|
277
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
278
|
-
* <Command.Group heading="Suggestions">
|
|
279
|
-
* <Command.Item>
|
|
280
|
-
* <span>Calendar</span>
|
|
281
|
-
* </Command.Item>
|
|
282
|
-
* </Command.Group>
|
|
283
|
-
* <Command.Separator />
|
|
284
|
-
* <Command.Group heading="Settings">
|
|
285
|
-
* <Command.Item>
|
|
286
|
-
* <span>Profile</span>
|
|
287
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
288
|
-
* </Command.Item>
|
|
289
|
-
* </Command.Group>
|
|
290
|
-
* </Command.List>
|
|
291
|
-
* </Command.DialogContent>
|
|
292
|
-
* </Command.DialogRoot>
|
|
293
|
-
* ```
|
|
294
|
-
*/
|
|
295
|
-
declare const CommandDialogRoot: ({ children, defaultOpen, keyboardShortcut, onOpenChange, open: openProp, ...props }: CommandDialogRootProps) => import("react").JSX.Element;
|
|
296
|
-
/**
|
|
297
|
-
* The props for the CommandDialog.Content component.
|
|
298
|
-
*
|
|
299
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commanddialogcontent
|
|
300
|
-
*/
|
|
301
|
-
type CommandDialogContentProps = {
|
|
302
|
-
/**
|
|
303
|
-
* The content of the command dialog (inputs, lists, etc.).
|
|
304
|
-
*/
|
|
305
|
-
children?: ReactNode;
|
|
306
|
-
/**
|
|
307
|
-
* Class name(s) to apply to the command dialog content.
|
|
308
|
-
*/
|
|
309
|
-
className?: string;
|
|
310
|
-
/**
|
|
311
|
-
* The accessible title of the command dialog. Visually hidden.
|
|
312
|
-
*
|
|
313
|
-
* @default "Command Palette"
|
|
314
|
-
*/
|
|
315
|
-
title?: string;
|
|
316
|
-
/**
|
|
317
|
-
* The accessible description of the command dialog. Visually hidden.
|
|
318
|
-
*
|
|
319
|
-
* @default "Search for a command to run..."
|
|
320
|
-
*/
|
|
321
|
-
description?: string;
|
|
322
|
-
/**
|
|
323
|
-
* Whether to show the close button.
|
|
324
|
-
*
|
|
325
|
-
* @default true
|
|
326
|
-
*/
|
|
327
|
-
showCloseButton?: boolean;
|
|
328
|
-
/**
|
|
329
|
-
* Custom filter function for the command list.
|
|
330
|
-
*
|
|
331
|
-
* @see https://github.com/pacocoursey/cmdk?tab=readme-ov-file#filtering
|
|
332
|
-
*/
|
|
333
|
-
filter?: CommandRootProps["filter"];
|
|
334
|
-
/**
|
|
335
|
-
* Whether to enable filtering of command items. When false, disables built-in filtering.
|
|
336
|
-
*
|
|
337
|
-
* @see https://github.com/pacocoursey/cmdk?tab=readme-ov-file#filtering
|
|
338
|
-
*/
|
|
339
|
-
shouldFilter?: CommandRootProps["shouldFilter"];
|
|
340
|
-
};
|
|
341
|
-
/**
|
|
342
|
-
* The content of the CommandDialog. Renders the accessible title/description,
|
|
343
|
-
* the command palette UI, and an optional close button.
|
|
344
|
-
*
|
|
345
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commanddialogcontent
|
|
346
|
-
*
|
|
347
|
-
* @example
|
|
348
|
-
* ```tsx
|
|
349
|
-
* <Command.DialogRoot>
|
|
350
|
-
* <Command.SearchTrigger>
|
|
351
|
-
* <button type="button">Search…</button>
|
|
352
|
-
* </Command.SearchTrigger>
|
|
353
|
-
* <Command.DialogContent>
|
|
354
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
355
|
-
* <Command.List>
|
|
356
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
357
|
-
* <Command.Group heading="Suggestions">
|
|
358
|
-
* <Command.Item>
|
|
359
|
-
* <span>Calendar</span>
|
|
360
|
-
* </Command.Item>
|
|
361
|
-
* </Command.Group>
|
|
362
|
-
* <Command.Separator />
|
|
363
|
-
* <Command.Group heading="Settings">
|
|
364
|
-
* <Command.Item>
|
|
365
|
-
* <span>Profile</span>
|
|
366
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
367
|
-
* </Command.Item>
|
|
368
|
-
* </Command.Group>
|
|
369
|
-
* </Command.List>
|
|
370
|
-
* </Command.DialogContent>
|
|
371
|
-
* </Command.DialogRoot>
|
|
372
|
-
* ```
|
|
373
|
-
*/
|
|
374
|
-
declare const CommandDialogContent: ({ children, className, description, filter, shouldFilter, showCloseButton, title }: CommandDialogContentProps) => import("react").JSX.Element;
|
|
375
|
-
/**
|
|
376
|
-
* The palette's query field.
|
|
377
|
-
*
|
|
378
|
-
* Inside a `Command.DialogRoot` the palette owns the query by default, which is
|
|
379
|
-
* what lets `Command.SearchTrigger` open with a seeded value and what
|
|
380
|
-
* `useCommandDialog().query` reads. Under a bare `Command.Root` (an inline
|
|
381
|
-
* palette, no dialog) it stays uncontrolled and cmdk owns the text.
|
|
382
|
-
*
|
|
383
|
-
* Passing `value` takes the query over completely: your value wins, this stops
|
|
384
|
-
* reporting to `useCommandDialog()`, and **seeding becomes yours to apply** —
|
|
385
|
-
* read `useCommandDialog().query` and mirror it, or drop
|
|
386
|
-
* `Command.SearchTrigger` for a plain `Command.DialogTrigger`. Prefer leaving
|
|
387
|
-
* it uncontrolled and reading the query from the hook.
|
|
388
|
-
*
|
|
389
|
-
* `className`, `ref`, and rest props land on the parts they belong to: `ref` on
|
|
390
|
-
* the wrapper, everything else on the `<input>`.
|
|
391
|
-
*
|
|
392
|
-
* **Data attributes:**
|
|
393
|
-
*
|
|
394
|
-
* | Data Attribute | Value | Description |
|
|
395
|
-
* | --- | --- | --- |
|
|
396
|
-
* | `data-slot` | `"command-input-wrapper"` | The row holding the magnifier and the field. |
|
|
397
|
-
* | `data-slot` | `"command-input"` | The `<input>` itself, joined after any `data-slot` you forward. Load-bearing beyond styling: `Command.DialogContent` finds the field by this slot when the palette opens, to place the caret after a seeded query instead of over it, so this part of the chain is never replaced. |
|
|
398
|
-
*
|
|
399
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandinput
|
|
400
|
-
*
|
|
401
|
-
* @example
|
|
402
|
-
* ```tsx
|
|
403
|
-
* <Command.DialogRoot>
|
|
404
|
-
* <Command.SearchTrigger>
|
|
405
|
-
* <button type="button">Search…</button>
|
|
406
|
-
* </Command.SearchTrigger>
|
|
407
|
-
* <Command.DialogContent>
|
|
408
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
409
|
-
* <Command.List>
|
|
410
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
411
|
-
* <Command.Group heading="Suggestions">
|
|
412
|
-
* <Command.Item>
|
|
413
|
-
* <span>Calendar</span>
|
|
414
|
-
* </Command.Item>
|
|
415
|
-
* </Command.Group>
|
|
416
|
-
* <Command.Separator />
|
|
417
|
-
* <Command.Group heading="Settings">
|
|
418
|
-
* <Command.Item>
|
|
419
|
-
* <span>Profile</span>
|
|
420
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
421
|
-
* </Command.Item>
|
|
422
|
-
* </Command.Group>
|
|
423
|
-
* </Command.List>
|
|
424
|
-
* </Command.DialogContent>
|
|
425
|
-
* </Command.DialogRoot>
|
|
426
|
-
* ```
|
|
427
|
-
*/
|
|
428
|
-
declare const CommandInput: ({ className, "data-slot": dataSlot, onValueChange, ref, value, ...props }: ComponentPropsWithoutRef<typeof Command$1.Input> & WithDataSlot & {
|
|
429
|
-
ref?: Ref<HTMLDivElement>;
|
|
430
|
-
}) => import("react").JSX.Element;
|
|
431
|
-
/**
|
|
432
|
-
* The scrolling container for the palette's groups and items.
|
|
433
|
-
*
|
|
434
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandlist
|
|
435
|
-
*
|
|
436
|
-
* @example
|
|
437
|
-
* ```tsx
|
|
438
|
-
* <Command.DialogRoot>
|
|
439
|
-
* <Command.SearchTrigger>
|
|
440
|
-
* <button type="button">Search…</button>
|
|
441
|
-
* </Command.SearchTrigger>
|
|
442
|
-
* <Command.DialogContent>
|
|
443
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
444
|
-
* <Command.List>
|
|
445
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
446
|
-
* <Command.Group heading="Suggestions">
|
|
447
|
-
* <Command.Item>
|
|
448
|
-
* <span>Calendar</span>
|
|
449
|
-
* </Command.Item>
|
|
450
|
-
* </Command.Group>
|
|
451
|
-
* <Command.Separator />
|
|
452
|
-
* <Command.Group heading="Settings">
|
|
453
|
-
* <Command.Item>
|
|
454
|
-
* <span>Profile</span>
|
|
455
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
456
|
-
* </Command.Item>
|
|
457
|
-
* </Command.Group>
|
|
458
|
-
* </Command.List>
|
|
459
|
-
* </Command.DialogContent>
|
|
460
|
-
* </Command.DialogRoot>
|
|
461
|
-
* ```
|
|
462
|
-
*/
|
|
463
|
-
declare const CommandList: ({ "data-slot": dataSlot, className, ...props }: ComponentProps<typeof Command$1.List> & WithDataSlot) => import("react").JSX.Element;
|
|
464
|
-
/**
|
|
465
|
-
* The empty-state message; it renders only when no item matches the query.
|
|
466
|
-
*
|
|
467
|
-
* It renders nothing in the server HTML and in the hydration pass. Items
|
|
468
|
-
* register with cmdk in a layout effect, which never runs on the server, so the
|
|
469
|
-
* server counts zero matches for every list. A palette with no items shows its
|
|
470
|
-
* empty state one render after hydration.
|
|
471
|
-
*
|
|
472
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandempty
|
|
473
|
-
*
|
|
474
|
-
* @example
|
|
475
|
-
* ```tsx
|
|
476
|
-
* <Command.DialogRoot>
|
|
477
|
-
* <Command.SearchTrigger>
|
|
478
|
-
* <button type="button">Search…</button>
|
|
479
|
-
* </Command.SearchTrigger>
|
|
480
|
-
* <Command.DialogContent>
|
|
481
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
482
|
-
* <Command.List>
|
|
483
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
484
|
-
* <Command.Group heading="Suggestions">
|
|
485
|
-
* <Command.Item>
|
|
486
|
-
* <span>Calendar</span>
|
|
487
|
-
* </Command.Item>
|
|
488
|
-
* </Command.Group>
|
|
489
|
-
* <Command.Separator />
|
|
490
|
-
* <Command.Group heading="Settings">
|
|
491
|
-
* <Command.Item>
|
|
492
|
-
* <span>Profile</span>
|
|
493
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
494
|
-
* </Command.Item>
|
|
495
|
-
* </Command.Group>
|
|
496
|
-
* </Command.List>
|
|
497
|
-
* </Command.DialogContent>
|
|
498
|
-
* </Command.DialogRoot>
|
|
499
|
-
* ```
|
|
500
|
-
*/
|
|
501
|
-
declare const CommandEmpty: ({ "data-slot": dataSlot, className, ...props }: ComponentProps<typeof Command$1.Empty> & WithDataSlot) => import("react").JSX.Element | null;
|
|
502
|
-
/**
|
|
503
|
-
* A labeled section of items; the `heading` prop names it.
|
|
504
|
-
*
|
|
505
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandgroup
|
|
506
|
-
*
|
|
507
|
-
* @example
|
|
508
|
-
* ```tsx
|
|
509
|
-
* <Command.DialogRoot>
|
|
510
|
-
* <Command.SearchTrigger>
|
|
511
|
-
* <button type="button">Search…</button>
|
|
512
|
-
* </Command.SearchTrigger>
|
|
513
|
-
* <Command.DialogContent>
|
|
514
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
515
|
-
* <Command.List>
|
|
516
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
517
|
-
* <Command.Group heading="Suggestions">
|
|
518
|
-
* <Command.Item>
|
|
519
|
-
* <span>Calendar</span>
|
|
520
|
-
* </Command.Item>
|
|
521
|
-
* </Command.Group>
|
|
522
|
-
* <Command.Separator />
|
|
523
|
-
* <Command.Group heading="Settings">
|
|
524
|
-
* <Command.Item>
|
|
525
|
-
* <span>Profile</span>
|
|
526
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
527
|
-
* </Command.Item>
|
|
528
|
-
* </Command.Group>
|
|
529
|
-
* </Command.List>
|
|
530
|
-
* </Command.DialogContent>
|
|
531
|
-
* </Command.DialogRoot>
|
|
532
|
-
* ```
|
|
533
|
-
*/
|
|
534
|
-
declare const CommandGroup: ({ "data-slot": dataSlot, className, ...props }: ComponentProps<typeof Command$1.Group> & WithDataSlot) => import("react").JSX.Element;
|
|
535
|
-
/**
|
|
536
|
-
* A horizontal rule between two groups of items.
|
|
537
|
-
*
|
|
538
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandseparator
|
|
539
|
-
*
|
|
540
|
-
* @example
|
|
541
|
-
* ```tsx
|
|
542
|
-
* <Command.DialogRoot>
|
|
543
|
-
* <Command.SearchTrigger>
|
|
544
|
-
* <button type="button">Search…</button>
|
|
545
|
-
* </Command.SearchTrigger>
|
|
546
|
-
* <Command.DialogContent>
|
|
547
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
548
|
-
* <Command.List>
|
|
549
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
550
|
-
* <Command.Group heading="Suggestions">
|
|
551
|
-
* <Command.Item>
|
|
552
|
-
* <span>Calendar</span>
|
|
553
|
-
* </Command.Item>
|
|
554
|
-
* </Command.Group>
|
|
555
|
-
* <Command.Separator />
|
|
556
|
-
* <Command.Group heading="Settings">
|
|
557
|
-
* <Command.Item>
|
|
558
|
-
* <span>Profile</span>
|
|
559
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
560
|
-
* </Command.Item>
|
|
561
|
-
* </Command.Group>
|
|
562
|
-
* </Command.List>
|
|
563
|
-
* </Command.DialogContent>
|
|
564
|
-
* </Command.DialogRoot>
|
|
565
|
-
* ```
|
|
566
|
-
*/
|
|
567
|
-
declare const CommandSeparator: ({ "data-slot": dataSlot, className, ...props }: ComponentProps<typeof Command$1.Separator> & WithDataSlot) => import("react").JSX.Element;
|
|
568
|
-
/**
|
|
569
|
-
* One selectable row in the palette's list.
|
|
570
|
-
*
|
|
571
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commanditem
|
|
572
|
-
*
|
|
573
|
-
* @example
|
|
574
|
-
* ```tsx
|
|
575
|
-
* <Command.DialogRoot>
|
|
576
|
-
* <Command.SearchTrigger>
|
|
577
|
-
* <button type="button">Search…</button>
|
|
578
|
-
* </Command.SearchTrigger>
|
|
579
|
-
* <Command.DialogContent>
|
|
580
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
581
|
-
* <Command.List>
|
|
582
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
583
|
-
* <Command.Group heading="Suggestions">
|
|
584
|
-
* <Command.Item>
|
|
585
|
-
* <span>Calendar</span>
|
|
586
|
-
* </Command.Item>
|
|
587
|
-
* </Command.Group>
|
|
588
|
-
* <Command.Separator />
|
|
589
|
-
* <Command.Group heading="Settings">
|
|
590
|
-
* <Command.Item>
|
|
591
|
-
* <span>Profile</span>
|
|
592
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
593
|
-
* </Command.Item>
|
|
594
|
-
* </Command.Group>
|
|
595
|
-
* </Command.List>
|
|
596
|
-
* </Command.DialogContent>
|
|
597
|
-
* </Command.DialogRoot>
|
|
598
|
-
* ```
|
|
599
|
-
*/
|
|
600
|
-
declare const CommandItem: ({ "data-slot": dataSlot, className, ...props }: ComponentProps<typeof Command$1.Item> & WithDataSlot) => import("react").JSX.Element;
|
|
601
|
-
/**
|
|
602
|
-
* The keyboard hint for a `Command.Item`, aligned to the end of the row. It
|
|
603
|
-
* locks `translate="no"`: a translated shortcut key names the wrong key.
|
|
604
|
-
*
|
|
605
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandshortcut
|
|
606
|
-
*
|
|
607
|
-
* @example
|
|
608
|
-
* ```tsx
|
|
609
|
-
* <Command.DialogRoot>
|
|
610
|
-
* <Command.SearchTrigger>
|
|
611
|
-
* <button type="button">Search…</button>
|
|
612
|
-
* </Command.SearchTrigger>
|
|
613
|
-
* <Command.DialogContent>
|
|
614
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
615
|
-
* <Command.List>
|
|
616
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
617
|
-
* <Command.Group heading="Suggestions">
|
|
618
|
-
* <Command.Item>
|
|
619
|
-
* <span>Calendar</span>
|
|
620
|
-
* </Command.Item>
|
|
621
|
-
* </Command.Group>
|
|
622
|
-
* <Command.Separator />
|
|
623
|
-
* <Command.Group heading="Settings">
|
|
624
|
-
* <Command.Item>
|
|
625
|
-
* <span>Profile</span>
|
|
626
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
627
|
-
* </Command.Item>
|
|
628
|
-
* </Command.Group>
|
|
629
|
-
* </Command.List>
|
|
630
|
-
* </Command.DialogContent>
|
|
631
|
-
* </Command.DialogRoot>
|
|
632
|
-
* ```
|
|
633
|
-
*/
|
|
634
|
-
declare const CommandShortcut: ({ "data-slot": dataSlot, className, ...props }: Omit<ComponentProps<"span">, "translate"> & WithDataSlot) => import("react").JSX.Element;
|
|
635
|
-
/**
|
|
636
|
-
* A command palette: a modal search field over a filtered, keyboard-navigable
|
|
637
|
-
* list of items. `Command.SearchTrigger` is the field-shaped button that opens
|
|
638
|
-
* it, `Command.DialogRoot` owns the open state, the query, and the `⌘K`
|
|
639
|
-
* shortcut, and `Command.DialogTrigger` is the escape hatch for a trigger of
|
|
640
|
-
* your own.
|
|
641
|
-
*
|
|
642
|
-
* Use `Command.Root` instead of `Command.DialogRoot` for an inline palette that
|
|
643
|
-
* is always visible. For a text field that filters options in place rather than
|
|
644
|
-
* opening a modal, the component is
|
|
645
|
-
* [Combobox](https://mantle.ngrok.com/components/forms/combobox).
|
|
646
|
-
*
|
|
647
|
-
* @useWhen Search for an action or a page and run it from a keyboard-first palette, such as a `⌘K`
|
|
648
|
-
* menu.
|
|
649
|
-
*
|
|
650
|
-
* @siblings
|
|
651
|
-
* - `Combobox`: the text field filters options in place and sets a form value.
|
|
652
|
-
* - `DropdownMenu`: a short list of actions opens from one button.
|
|
653
|
-
*
|
|
654
|
-
* @see https://mantle.ngrok.com/components/navigation/command
|
|
655
|
-
*
|
|
656
|
-
* @example
|
|
657
|
-
* Composition:
|
|
658
|
-
* ```
|
|
659
|
-
* Command.DialogRoot
|
|
660
|
-
* ├── Command.SearchTrigger
|
|
661
|
-
* ├── Command.DialogTrigger
|
|
662
|
-
* └── Command.DialogContent
|
|
663
|
-
* ├── Command.Input
|
|
664
|
-
* └── Command.List
|
|
665
|
-
* ├── Command.Empty
|
|
666
|
-
* ├── Command.Group
|
|
667
|
-
* │ └── Command.Item
|
|
668
|
-
* │ └── Command.Shortcut
|
|
669
|
-
* └── Command.Separator
|
|
670
|
-
* ```
|
|
671
|
-
*
|
|
672
|
-
* @example
|
|
673
|
-
* ```tsx
|
|
674
|
-
* <Command.DialogRoot>
|
|
675
|
-
* <Command.SearchTrigger>
|
|
676
|
-
* <button type="button">Search…</button>
|
|
677
|
-
* </Command.SearchTrigger>
|
|
678
|
-
* <Command.DialogContent>
|
|
679
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
680
|
-
* <Command.List>
|
|
681
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
682
|
-
* <Command.Group heading="Suggestions">
|
|
683
|
-
* <Command.Item>
|
|
684
|
-
* <span>Calendar</span>
|
|
685
|
-
* </Command.Item>
|
|
686
|
-
* </Command.Group>
|
|
687
|
-
* <Command.Separator />
|
|
688
|
-
* <Command.Group heading="Settings">
|
|
689
|
-
* <Command.Item>
|
|
690
|
-
* <span>Profile</span>
|
|
691
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
692
|
-
* </Command.Item>
|
|
693
|
-
* </Command.Group>
|
|
694
|
-
* </Command.List>
|
|
695
|
-
* </Command.DialogContent>
|
|
696
|
-
* </Command.DialogRoot>
|
|
697
|
-
* ```
|
|
698
|
-
*/
|
|
699
|
-
declare const Command: {
|
|
700
|
-
/**
|
|
701
|
-
* The inline palette, wrapping `Command.Input` and `Command.List`. It owns the
|
|
702
|
-
* filtering and the active item for every part below it — `Command.DialogContent`
|
|
703
|
-
* renders one itself, so a modal palette does not add it.
|
|
704
|
-
*
|
|
705
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandroot
|
|
706
|
-
*
|
|
707
|
-
* @example
|
|
708
|
-
* ```tsx
|
|
709
|
-
* <Command.DialogRoot>
|
|
710
|
-
* <Command.SearchTrigger>
|
|
711
|
-
* <button type="button">Search…</button>
|
|
712
|
-
* </Command.SearchTrigger>
|
|
713
|
-
* <Command.DialogContent>
|
|
714
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
715
|
-
* <Command.List>
|
|
716
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
717
|
-
* <Command.Group heading="Suggestions">
|
|
718
|
-
* <Command.Item>
|
|
719
|
-
* <span>Calendar</span>
|
|
720
|
-
* </Command.Item>
|
|
721
|
-
* </Command.Group>
|
|
722
|
-
* <Command.Separator />
|
|
723
|
-
* <Command.Group heading="Settings">
|
|
724
|
-
* <Command.Item>
|
|
725
|
-
* <span>Profile</span>
|
|
726
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
727
|
-
* </Command.Item>
|
|
728
|
-
* </Command.Group>
|
|
729
|
-
* </Command.List>
|
|
730
|
-
* </Command.DialogContent>
|
|
731
|
-
* </Command.DialogRoot>
|
|
732
|
-
* ```
|
|
733
|
-
*/
|
|
734
|
-
readonly Root: typeof CommandRoot;
|
|
735
|
-
/**
|
|
736
|
-
* The state owner for a command palette. Renders no DOM of its own; it owns
|
|
737
|
-
* the open state, the query text, and the `⌘K` shortcut, and carries them to
|
|
738
|
-
* every part below through `useCommandDialog()`.
|
|
739
|
-
*
|
|
740
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commanddialogroot
|
|
741
|
-
*
|
|
742
|
-
* @example
|
|
743
|
-
* ```tsx
|
|
744
|
-
* <Command.DialogRoot>
|
|
745
|
-
* <Command.SearchTrigger>
|
|
746
|
-
* <button type="button">Search…</button>
|
|
747
|
-
* </Command.SearchTrigger>
|
|
748
|
-
* <Command.DialogContent>
|
|
749
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
750
|
-
* <Command.List>
|
|
751
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
752
|
-
* <Command.Group heading="Suggestions">
|
|
753
|
-
* <Command.Item>
|
|
754
|
-
* <span>Calendar</span>
|
|
755
|
-
* </Command.Item>
|
|
756
|
-
* </Command.Group>
|
|
757
|
-
* <Command.Separator />
|
|
758
|
-
* <Command.Group heading="Settings">
|
|
759
|
-
* <Command.Item>
|
|
760
|
-
* <span>Profile</span>
|
|
761
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
762
|
-
* </Command.Item>
|
|
763
|
-
* </Command.Group>
|
|
764
|
-
* </Command.List>
|
|
765
|
-
* </Command.DialogContent>
|
|
766
|
-
* </Command.DialogRoot>
|
|
767
|
-
* ```
|
|
768
|
-
*/
|
|
769
|
-
readonly DialogRoot: typeof CommandDialogRoot;
|
|
770
|
-
/**
|
|
771
|
-
* Makes any control behave like a search field that opens the command palette.
|
|
772
|
-
* It renders no DOM of its own; it clones its child and gives it the wiring,
|
|
773
|
-
* so **presentation belongs entirely to the child** and this part never has an
|
|
774
|
-
* opinion about how the trigger looks or how it behaves in a collapsed sidebar
|
|
775
|
-
* rail.
|
|
776
|
-
*
|
|
777
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandsearchtrigger
|
|
778
|
-
*
|
|
779
|
-
* @example
|
|
780
|
-
* ```tsx
|
|
781
|
-
* <Command.DialogRoot>
|
|
782
|
-
* <Command.SearchTrigger>
|
|
783
|
-
* <button type="button">Search…</button>
|
|
784
|
-
* </Command.SearchTrigger>
|
|
785
|
-
* <Command.DialogContent>
|
|
786
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
787
|
-
* <Command.List>
|
|
788
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
789
|
-
* <Command.Group heading="Suggestions">
|
|
790
|
-
* <Command.Item>
|
|
791
|
-
* <span>Calendar</span>
|
|
792
|
-
* </Command.Item>
|
|
793
|
-
* </Command.Group>
|
|
794
|
-
* <Command.Separator />
|
|
795
|
-
* <Command.Group heading="Settings">
|
|
796
|
-
* <Command.Item>
|
|
797
|
-
* <span>Profile</span>
|
|
798
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
799
|
-
* </Command.Item>
|
|
800
|
-
* </Command.Group>
|
|
801
|
-
* </Command.List>
|
|
802
|
-
* </Command.DialogContent>
|
|
803
|
-
* </Command.DialogRoot>
|
|
804
|
-
* ```
|
|
805
|
-
*/
|
|
806
|
-
readonly SearchTrigger: typeof CommandSearchTrigger;
|
|
807
|
-
/**
|
|
808
|
-
* A bare button that opens the Command dialog when clicked — the escape hatch
|
|
809
|
-
* for a trigger that should not look like a search field. Wrap your own
|
|
810
|
-
* element with `asChild`.
|
|
811
|
-
*
|
|
812
|
-
* It carries none of `Command.SearchTrigger`'s behavior: no `⌘K` hint, no
|
|
813
|
-
* `aria-keyshortcuts`, and typing or pasting into it does nothing. Rebuild
|
|
814
|
-
* that with `useCommandDialog()` and `searchActionFromKeyDown` /
|
|
815
|
-
* `searchActionFromPaste` if you need it.
|
|
816
|
-
*
|
|
817
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commanddialogtrigger
|
|
818
|
-
*
|
|
819
|
-
* @example
|
|
820
|
-
* ```tsx
|
|
821
|
-
* <Command.DialogRoot>
|
|
822
|
-
* <Command.DialogTrigger asChild>
|
|
823
|
-
* <Button type="button" appearance="outlined" intent="neutral">Open Command Palette</Button>
|
|
824
|
-
* </Command.DialogTrigger>
|
|
825
|
-
* <Command.DialogContent>
|
|
826
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
827
|
-
* <Command.List>
|
|
828
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
829
|
-
* <Command.Group heading="Suggestions">
|
|
830
|
-
* <Command.Item>
|
|
831
|
-
* <span>Calendar</span>
|
|
832
|
-
* </Command.Item>
|
|
833
|
-
* </Command.Group>
|
|
834
|
-
* <Command.Separator />
|
|
835
|
-
* <Command.Group heading="Settings">
|
|
836
|
-
* <Command.Item>
|
|
837
|
-
* <span>Profile</span>
|
|
838
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
839
|
-
* </Command.Item>
|
|
840
|
-
* </Command.Group>
|
|
841
|
-
* </Command.List>
|
|
842
|
-
* </Command.DialogContent>
|
|
843
|
-
* </Command.DialogRoot>
|
|
844
|
-
* ```
|
|
845
|
-
*/
|
|
846
|
-
readonly DialogTrigger: ({ "data-slot": dataSlot, ...props }: ComponentProps<import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>> & WithDataSlot) => import("react").JSX.Element;
|
|
847
|
-
/**
|
|
848
|
-
* The content of the CommandDialog. Renders the accessible title/description,
|
|
849
|
-
* the command palette UI, and an optional close button.
|
|
850
|
-
*
|
|
851
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commanddialogcontent
|
|
852
|
-
*
|
|
853
|
-
* @example
|
|
854
|
-
* ```tsx
|
|
855
|
-
* <Command.DialogRoot>
|
|
856
|
-
* <Command.SearchTrigger>
|
|
857
|
-
* <button type="button">Search…</button>
|
|
858
|
-
* </Command.SearchTrigger>
|
|
859
|
-
* <Command.DialogContent>
|
|
860
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
861
|
-
* <Command.List>
|
|
862
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
863
|
-
* <Command.Group heading="Suggestions">
|
|
864
|
-
* <Command.Item>
|
|
865
|
-
* <span>Calendar</span>
|
|
866
|
-
* </Command.Item>
|
|
867
|
-
* </Command.Group>
|
|
868
|
-
* <Command.Separator />
|
|
869
|
-
* <Command.Group heading="Settings">
|
|
870
|
-
* <Command.Item>
|
|
871
|
-
* <span>Profile</span>
|
|
872
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
873
|
-
* </Command.Item>
|
|
874
|
-
* </Command.Group>
|
|
875
|
-
* </Command.List>
|
|
876
|
-
* </Command.DialogContent>
|
|
877
|
-
* </Command.DialogRoot>
|
|
878
|
-
* ```
|
|
879
|
-
*/
|
|
880
|
-
readonly DialogContent: typeof CommandDialogContent;
|
|
881
|
-
/**
|
|
882
|
-
* The palette's query field.
|
|
883
|
-
*
|
|
884
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandinput
|
|
885
|
-
*
|
|
886
|
-
* @example
|
|
887
|
-
* ```tsx
|
|
888
|
-
* <Command.DialogRoot>
|
|
889
|
-
* <Command.SearchTrigger>
|
|
890
|
-
* <button type="button">Search…</button>
|
|
891
|
-
* </Command.SearchTrigger>
|
|
892
|
-
* <Command.DialogContent>
|
|
893
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
894
|
-
* <Command.List>
|
|
895
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
896
|
-
* <Command.Group heading="Suggestions">
|
|
897
|
-
* <Command.Item>
|
|
898
|
-
* <span>Calendar</span>
|
|
899
|
-
* </Command.Item>
|
|
900
|
-
* </Command.Group>
|
|
901
|
-
* <Command.Separator />
|
|
902
|
-
* <Command.Group heading="Settings">
|
|
903
|
-
* <Command.Item>
|
|
904
|
-
* <span>Profile</span>
|
|
905
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
906
|
-
* </Command.Item>
|
|
907
|
-
* </Command.Group>
|
|
908
|
-
* </Command.List>
|
|
909
|
-
* </Command.DialogContent>
|
|
910
|
-
* </Command.DialogRoot>
|
|
911
|
-
* ```
|
|
912
|
-
*/
|
|
913
|
-
readonly Input: typeof CommandInput;
|
|
914
|
-
/**
|
|
915
|
-
* The scrolling container for the palette's groups and items.
|
|
916
|
-
*
|
|
917
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandlist
|
|
918
|
-
*
|
|
919
|
-
* @example
|
|
920
|
-
* ```tsx
|
|
921
|
-
* <Command.DialogRoot>
|
|
922
|
-
* <Command.SearchTrigger>
|
|
923
|
-
* <button type="button">Search…</button>
|
|
924
|
-
* </Command.SearchTrigger>
|
|
925
|
-
* <Command.DialogContent>
|
|
926
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
927
|
-
* <Command.List>
|
|
928
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
929
|
-
* <Command.Group heading="Suggestions">
|
|
930
|
-
* <Command.Item>
|
|
931
|
-
* <span>Calendar</span>
|
|
932
|
-
* </Command.Item>
|
|
933
|
-
* </Command.Group>
|
|
934
|
-
* <Command.Separator />
|
|
935
|
-
* <Command.Group heading="Settings">
|
|
936
|
-
* <Command.Item>
|
|
937
|
-
* <span>Profile</span>
|
|
938
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
939
|
-
* </Command.Item>
|
|
940
|
-
* </Command.Group>
|
|
941
|
-
* </Command.List>
|
|
942
|
-
* </Command.DialogContent>
|
|
943
|
-
* </Command.DialogRoot>
|
|
944
|
-
* ```
|
|
945
|
-
*/
|
|
946
|
-
readonly List: typeof CommandList;
|
|
947
|
-
/**
|
|
948
|
-
* The empty-state message; it renders only when no item matches the query.
|
|
949
|
-
*
|
|
950
|
-
* It renders nothing in the server HTML and in the hydration pass. Items
|
|
951
|
-
* register with cmdk in a layout effect, which never runs on the server, so the
|
|
952
|
-
* server counts zero matches for every list. A palette with no items shows its
|
|
953
|
-
* empty state one render after hydration.
|
|
954
|
-
*
|
|
955
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandempty
|
|
956
|
-
*
|
|
957
|
-
* @example
|
|
958
|
-
* ```tsx
|
|
959
|
-
* <Command.DialogRoot>
|
|
960
|
-
* <Command.SearchTrigger>
|
|
961
|
-
* <button type="button">Search…</button>
|
|
962
|
-
* </Command.SearchTrigger>
|
|
963
|
-
* <Command.DialogContent>
|
|
964
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
965
|
-
* <Command.List>
|
|
966
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
967
|
-
* <Command.Group heading="Suggestions">
|
|
968
|
-
* <Command.Item>
|
|
969
|
-
* <span>Calendar</span>
|
|
970
|
-
* </Command.Item>
|
|
971
|
-
* </Command.Group>
|
|
972
|
-
* <Command.Separator />
|
|
973
|
-
* <Command.Group heading="Settings">
|
|
974
|
-
* <Command.Item>
|
|
975
|
-
* <span>Profile</span>
|
|
976
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
977
|
-
* </Command.Item>
|
|
978
|
-
* </Command.Group>
|
|
979
|
-
* </Command.List>
|
|
980
|
-
* </Command.DialogContent>
|
|
981
|
-
* </Command.DialogRoot>
|
|
982
|
-
* ```
|
|
983
|
-
*/
|
|
984
|
-
readonly Empty: typeof CommandEmpty;
|
|
985
|
-
/**
|
|
986
|
-
* A labeled section of items; the `heading` prop names it.
|
|
987
|
-
*
|
|
988
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandgroup
|
|
989
|
-
*
|
|
990
|
-
* @example
|
|
991
|
-
* ```tsx
|
|
992
|
-
* <Command.DialogRoot>
|
|
993
|
-
* <Command.SearchTrigger>
|
|
994
|
-
* <button type="button">Search…</button>
|
|
995
|
-
* </Command.SearchTrigger>
|
|
996
|
-
* <Command.DialogContent>
|
|
997
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
998
|
-
* <Command.List>
|
|
999
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
1000
|
-
* <Command.Group heading="Suggestions">
|
|
1001
|
-
* <Command.Item>
|
|
1002
|
-
* <span>Calendar</span>
|
|
1003
|
-
* </Command.Item>
|
|
1004
|
-
* </Command.Group>
|
|
1005
|
-
* <Command.Separator />
|
|
1006
|
-
* <Command.Group heading="Settings">
|
|
1007
|
-
* <Command.Item>
|
|
1008
|
-
* <span>Profile</span>
|
|
1009
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
1010
|
-
* </Command.Item>
|
|
1011
|
-
* </Command.Group>
|
|
1012
|
-
* </Command.List>
|
|
1013
|
-
* </Command.DialogContent>
|
|
1014
|
-
* </Command.DialogRoot>
|
|
1015
|
-
* ```
|
|
1016
|
-
*/
|
|
1017
|
-
readonly Group: typeof CommandGroup;
|
|
1018
|
-
/**
|
|
1019
|
-
* One selectable row in the palette's list.
|
|
1020
|
-
*
|
|
1021
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commanditem
|
|
1022
|
-
*
|
|
1023
|
-
* @example
|
|
1024
|
-
* ```tsx
|
|
1025
|
-
* <Command.DialogRoot>
|
|
1026
|
-
* <Command.SearchTrigger>
|
|
1027
|
-
* <button type="button">Search…</button>
|
|
1028
|
-
* </Command.SearchTrigger>
|
|
1029
|
-
* <Command.DialogContent>
|
|
1030
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
1031
|
-
* <Command.List>
|
|
1032
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
1033
|
-
* <Command.Group heading="Suggestions">
|
|
1034
|
-
* <Command.Item>
|
|
1035
|
-
* <span>Calendar</span>
|
|
1036
|
-
* </Command.Item>
|
|
1037
|
-
* </Command.Group>
|
|
1038
|
-
* <Command.Separator />
|
|
1039
|
-
* <Command.Group heading="Settings">
|
|
1040
|
-
* <Command.Item>
|
|
1041
|
-
* <span>Profile</span>
|
|
1042
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
1043
|
-
* </Command.Item>
|
|
1044
|
-
* </Command.Group>
|
|
1045
|
-
* </Command.List>
|
|
1046
|
-
* </Command.DialogContent>
|
|
1047
|
-
* </Command.DialogRoot>
|
|
1048
|
-
* ```
|
|
1049
|
-
*/
|
|
1050
|
-
readonly Item: typeof CommandItem;
|
|
1051
|
-
/**
|
|
1052
|
-
* The keyboard hint for a `Command.Item`, aligned to the end of the row. It
|
|
1053
|
-
* locks `translate="no"`: a translated shortcut key names the wrong key.
|
|
1054
|
-
*
|
|
1055
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandshortcut
|
|
1056
|
-
*
|
|
1057
|
-
* @example
|
|
1058
|
-
* ```tsx
|
|
1059
|
-
* <Command.DialogRoot>
|
|
1060
|
-
* <Command.SearchTrigger>
|
|
1061
|
-
* <button type="button">Search…</button>
|
|
1062
|
-
* </Command.SearchTrigger>
|
|
1063
|
-
* <Command.DialogContent>
|
|
1064
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
1065
|
-
* <Command.List>
|
|
1066
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
1067
|
-
* <Command.Group heading="Suggestions">
|
|
1068
|
-
* <Command.Item>
|
|
1069
|
-
* <span>Calendar</span>
|
|
1070
|
-
* </Command.Item>
|
|
1071
|
-
* </Command.Group>
|
|
1072
|
-
* <Command.Separator />
|
|
1073
|
-
* <Command.Group heading="Settings">
|
|
1074
|
-
* <Command.Item>
|
|
1075
|
-
* <span>Profile</span>
|
|
1076
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
1077
|
-
* </Command.Item>
|
|
1078
|
-
* </Command.Group>
|
|
1079
|
-
* </Command.List>
|
|
1080
|
-
* </Command.DialogContent>
|
|
1081
|
-
* </Command.DialogRoot>
|
|
1082
|
-
* ```
|
|
1083
|
-
*/
|
|
1084
|
-
readonly Shortcut: typeof CommandShortcut;
|
|
1085
|
-
/**
|
|
1086
|
-
* A horizontal rule between two groups of items.
|
|
1087
|
-
*
|
|
1088
|
-
* @see https://mantle.ngrok.com/components/navigation/command#commandseparator
|
|
1089
|
-
*
|
|
1090
|
-
* @example
|
|
1091
|
-
* ```tsx
|
|
1092
|
-
* <Command.DialogRoot>
|
|
1093
|
-
* <Command.SearchTrigger>
|
|
1094
|
-
* <button type="button">Search…</button>
|
|
1095
|
-
* </Command.SearchTrigger>
|
|
1096
|
-
* <Command.DialogContent>
|
|
1097
|
-
* <Command.Input placeholder="Type a command or search..." />
|
|
1098
|
-
* <Command.List>
|
|
1099
|
-
* <Command.Empty>No results found.</Command.Empty>
|
|
1100
|
-
* <Command.Group heading="Suggestions">
|
|
1101
|
-
* <Command.Item>
|
|
1102
|
-
* <span>Calendar</span>
|
|
1103
|
-
* </Command.Item>
|
|
1104
|
-
* </Command.Group>
|
|
1105
|
-
* <Command.Separator />
|
|
1106
|
-
* <Command.Group heading="Settings">
|
|
1107
|
-
* <Command.Item>
|
|
1108
|
-
* <span>Profile</span>
|
|
1109
|
-
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
1110
|
-
* </Command.Item>
|
|
1111
|
-
* </Command.Group>
|
|
1112
|
-
* </Command.List>
|
|
1113
|
-
* </Command.DialogContent>
|
|
1114
|
-
* </Command.DialogRoot>
|
|
1115
|
-
* ```
|
|
1116
|
-
*/
|
|
1117
|
-
readonly Separator: typeof CommandSeparator;
|
|
1118
|
-
};
|
|
6
|
+
import * as CommandParts from "./command-parts.js";
|
|
7
|
+
import { h as CommandSearchTriggerProps, p as useCommandState, r as CommandDialogRootProps } from "./command-VKj84zAX.js";
|
|
8
|
+
import { ComponentProps } from "react";
|
|
9
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
1119
10
|
/**
|
|
1120
11
|
* The state and actions every part under a `Command.DialogRoot` shares,
|
|
1121
12
|
* returned by {@link useCommandDialog}. Use it to open the palette from
|
|
@@ -1138,13 +29,13 @@ declare const Command: {
|
|
|
1138
29
|
*/
|
|
1139
30
|
type CommandDialogState = {
|
|
1140
31
|
/**
|
|
1141
|
-
* Whether the palette is open. Mirrored as `
|
|
1142
|
-
* `Command.SearchTrigger
|
|
32
|
+
* Whether the palette is open. Mirrored as `aria-expanded` on
|
|
33
|
+
* `Command.SearchTrigger`.
|
|
1143
34
|
*/
|
|
1144
35
|
open: boolean;
|
|
1145
36
|
/**
|
|
1146
|
-
* Set the open state. **Opening through this resets the query to empty
|
|
1147
|
-
*
|
|
37
|
+
* Set the open state. **Opening through this resets the query to empty**.
|
|
38
|
+
* Use {@link CommandDialogState.openWithQuery} to open with text in the
|
|
1148
39
|
* field. Calls `onOpenChange` and, when uncontrolled, updates the internal
|
|
1149
40
|
* state.
|
|
1150
41
|
*/
|
|
@@ -1165,7 +56,7 @@ type CommandDialogState = {
|
|
|
1165
56
|
* The current text of `Command.Input`. Read it to drive your own filtering
|
|
1166
57
|
* or a server-side search when the palette runs with `shouldFilter={false}`.
|
|
1167
58
|
*
|
|
1168
|
-
* Only meaningful while `Command.Input` is uncontrolled
|
|
59
|
+
* Only meaningful while `Command.Input` is uncontrolled. Passing it a
|
|
1169
60
|
* `value` takes ownership of the query, and this stops tracking the field.
|
|
1170
61
|
*/
|
|
1171
62
|
query: string;
|
|
@@ -1186,8 +77,8 @@ type CommandDialogState = {
|
|
|
1186
77
|
* Read the nearest `Command.DialogRoot` state. Throws when called outside one
|
|
1187
78
|
* so misuse fails loudly rather than rendering a trigger that opens nothing.
|
|
1188
79
|
*
|
|
1189
|
-
* Reach for it to open the palette from somewhere other than its trigger
|
|
1190
|
-
* sidebar row, an empty state, a "no results, search everything" link
|
|
80
|
+
* Reach for it to open the palette from somewhere other than its trigger (a
|
|
81
|
+
* sidebar row, an empty state, a "no results, search everything" link), or to
|
|
1191
82
|
* build a custom trigger, pairing it with
|
|
1192
83
|
* [`searchActionFromKeyDown`](https://mantle.ngrok.com/components/navigation/command#searchactionfromkeydown)
|
|
1193
84
|
* so typing into your trigger behaves like typing into `Command.SearchTrigger`.
|
|
@@ -1228,18 +119,18 @@ type Props = Omit<ComponentProps<"kbd">, "children"> & WithDataSlot;
|
|
|
1228
119
|
declare function MetaKey({ "data-slot": dataSlot, className, ...props }: Props): import("react").JSX.Element;
|
|
1229
120
|
/**
|
|
1230
121
|
* What a keystroke or paste on a search trigger should do to the command
|
|
1231
|
-
* palette. A search trigger looks like a text field but is a `<button>`
|
|
1232
|
-
* has no editable value
|
|
122
|
+
* palette. A search trigger looks like a text field but is a `<button>` (it
|
|
123
|
+
* has no editable value), so every input event it receives has to be
|
|
1233
124
|
* classified before it can mean anything.
|
|
1234
125
|
*
|
|
1235
126
|
* Three outcomes, because "type into the trigger" has three honest answers:
|
|
1236
127
|
*
|
|
1237
|
-
* - `"seed"
|
|
128
|
+
* - `"seed"`: the event carried text. Open the palette with `query` already
|
|
1238
129
|
* in `Command.Input`.
|
|
1239
|
-
* - `"open"
|
|
130
|
+
* - `"open"`: the event was text *intent* that cannot be replayed (an IME
|
|
1240
131
|
* composition belongs to the element that started it). Open the palette with
|
|
1241
132
|
* an empty query so the next keystroke has a real text field to land in.
|
|
1242
|
-
* - `"ignore"
|
|
133
|
+
* - `"ignore"`: the event was navigation, a modifier chord, or the button's
|
|
1243
134
|
* own activation keys. Leave the palette alone.
|
|
1244
135
|
*
|
|
1245
136
|
* @see https://mantle.ngrok.com/components/navigation/command#searchactionfromkeydown
|
|
@@ -1276,7 +167,7 @@ type SearchAction = {
|
|
|
1276
167
|
};
|
|
1277
168
|
/**
|
|
1278
169
|
* The properties {@link searchActionFromKeyDown} reads. Satisfied by a native
|
|
1279
|
-
* `KeyboardEvent
|
|
170
|
+
* `KeyboardEvent`. Pass `event.nativeEvent` from a React handler, since
|
|
1280
171
|
* React's synthetic keyboard event does not carry `isComposing`.
|
|
1281
172
|
*/
|
|
1282
173
|
type SearchKeyDownEvent = {
|
|
@@ -1290,7 +181,7 @@ type SearchKeyDownEvent = {
|
|
|
1290
181
|
* Why a deprecated property: `229` is the only reliable marker for the
|
|
1291
182
|
* keydown that *starts* an IME composition, where `isComposing` is still
|
|
1292
183
|
* `false` and `key` varies by engine. There is no non-deprecated
|
|
1293
|
-
* replacement
|
|
184
|
+
* replacement; `Command.Root` reads it for the same reason.
|
|
1294
185
|
*/
|
|
1295
186
|
keyCode?: number;
|
|
1296
187
|
metaKey: boolean;
|
|
@@ -1313,7 +204,7 @@ type SearchPasteEvent = {
|
|
|
1313
204
|
* element that started it and cannot be forwarded, so seeding is impossible;
|
|
1314
205
|
* opening empty at least lands the user in a real text field instead of
|
|
1315
206
|
* swallowing the keystroke. This is the case the blog's original trigger got
|
|
1316
|
-
* wrong
|
|
207
|
+
* wrong: it silently did nothing for CJK input. Engines that route dead keys
|
|
1317
208
|
* through the IME path report them the same way (Chrome on macOS sends
|
|
1318
209
|
* `key: "Dead"` with `keyCode: 229` for `⌥e`), so those open empty too rather
|
|
1319
210
|
* than falling through to the named-key case below.
|
|
@@ -1321,16 +212,16 @@ type SearchPasteEvent = {
|
|
|
1321
212
|
* text: the palette's own `⌘K`, `⌘V` (the paste path handles it), and the
|
|
1322
213
|
* browser/OS accelerators. `Alt` is excluded even though macOS `⌥` produces
|
|
1323
214
|
* real characters, because seeding one means calling `preventDefault()` on
|
|
1324
|
-
* Windows `Alt` accelerators (`Alt+D`, `Alt+Home`)
|
|
215
|
+
* Windows `Alt` accelerators (`Alt+D`, `Alt+Home`), the worse trade.
|
|
1325
216
|
* `Shift` is not a modifier here; it is already reflected in `key`.
|
|
1326
217
|
* - **`Enter` / `Space` → `"ignore"`.** The button's own activation keys.
|
|
1327
218
|
* - **A single grapheme → `"seed"`.** Counted as the characters a user sees,
|
|
1328
219
|
* not as `.length` or code points, so an astral character (emoji, less
|
|
1329
220
|
* common CJK), a skin-tone emoji, or a decomposed accent counts as one and
|
|
1330
221
|
* is not dropped. Every named key (`"Tab"`,
|
|
1331
|
-
* `"ArrowDown"`, `"Dead"`, `"Unidentified"`) is longer and falls through
|
|
1332
|
-
*
|
|
1333
|
-
*
|
|
222
|
+
* `"ArrowDown"`, `"Dead"`, `"Unidentified"`) is longer and falls through,
|
|
223
|
+
* unless the engine also flags it as IME processing (the case above claims
|
|
224
|
+
* it first).
|
|
1334
225
|
*
|
|
1335
226
|
* @see https://mantle.ngrok.com/components/navigation/command#searchactionfromkeydown
|
|
1336
227
|
*
|
|
@@ -1355,9 +246,9 @@ type SearchPasteEvent = {
|
|
|
1355
246
|
declare function searchActionFromKeyDown(event: SearchKeyDownEvent): SearchAction;
|
|
1356
247
|
/**
|
|
1357
248
|
* Classifies a `paste` on a search trigger. A paste is unambiguous search
|
|
1358
|
-
* intent
|
|
1359
|
-
* always opens the palette, and seeds it whenever the clipboard holds text.
|
|
1360
|
-
*
|
|
249
|
+
* intent (the user pasted into a control that looks like a text field), so it
|
|
250
|
+
* always opens the palette, and seeds it whenever the clipboard holds text. It
|
|
251
|
+
* never returns `"ignore"`.
|
|
1361
252
|
*
|
|
1362
253
|
* The text is collapsed to a single space-separated line because the palette's
|
|
1363
254
|
* query is a one-line field: pasting a multi-line selection should search for
|
|
@@ -1379,4 +270,69 @@ declare function searchActionFromKeyDown(event: SearchKeyDownEvent): SearchActio
|
|
|
1379
270
|
* ```
|
|
1380
271
|
*/
|
|
1381
272
|
declare function searchActionFromPaste(event: SearchPasteEvent): SearchAction;
|
|
273
|
+
/**
|
|
274
|
+
* A command palette: a modal search field over a filtered, keyboard-navigable
|
|
275
|
+
* list of items. `Command.SearchTrigger` is the field-shaped button that opens
|
|
276
|
+
* it, `Command.DialogRoot` owns the open state, the query, and the `⌘K`
|
|
277
|
+
* shortcut, and `Command.DialogTrigger` is the escape hatch for a trigger of
|
|
278
|
+
* your own.
|
|
279
|
+
*
|
|
280
|
+
* Use `Command.Root` instead of `Command.DialogRoot` for an inline palette that
|
|
281
|
+
* is always visible. For a text field that filters options in place rather than
|
|
282
|
+
* opening a modal, the component is
|
|
283
|
+
* [Combobox](https://mantle.ngrok.com/components/forms/combobox).
|
|
284
|
+
*
|
|
285
|
+
* @useWhen Search for an action or a page and run it from a keyboard-first palette, such as a `⌘K`
|
|
286
|
+
* menu.
|
|
287
|
+
*
|
|
288
|
+
* @siblings
|
|
289
|
+
* - `Combobox`: the text field filters options in place and sets a form value.
|
|
290
|
+
* - `DropdownMenu`: a short list of actions opens from one button.
|
|
291
|
+
*
|
|
292
|
+
* @see https://mantle.ngrok.com/components/navigation/command
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* Composition:
|
|
296
|
+
* ```
|
|
297
|
+
* Command.DialogRoot
|
|
298
|
+
* ├── Command.SearchTrigger
|
|
299
|
+
* ├── Command.DialogTrigger
|
|
300
|
+
* └── Command.DialogContent
|
|
301
|
+
* ├── Command.Input
|
|
302
|
+
* └── Command.List
|
|
303
|
+
* ├── Command.Empty
|
|
304
|
+
* ├── Command.Group
|
|
305
|
+
* │ └── Command.Item
|
|
306
|
+
* │ └── Command.Shortcut
|
|
307
|
+
* └── Command.Separator
|
|
308
|
+
* ```
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* ```tsx
|
|
312
|
+
* <Command.DialogRoot>
|
|
313
|
+
* <Command.SearchTrigger>
|
|
314
|
+
* <button type="button">Search…</button>
|
|
315
|
+
* </Command.SearchTrigger>
|
|
316
|
+
* <Command.DialogContent>
|
|
317
|
+
* <Command.Input placeholder="Type a command or search..." />
|
|
318
|
+
* <Command.List>
|
|
319
|
+
* <Command.Empty>No results found.</Command.Empty>
|
|
320
|
+
* <Command.Group heading="Suggestions">
|
|
321
|
+
* <Command.Item>
|
|
322
|
+
* <span>Calendar</span>
|
|
323
|
+
* </Command.Item>
|
|
324
|
+
* </Command.Group>
|
|
325
|
+
* <Command.Separator />
|
|
326
|
+
* <Command.Group heading="Settings">
|
|
327
|
+
* <Command.Item>
|
|
328
|
+
* <span>Profile</span>
|
|
329
|
+
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
330
|
+
* </Command.Item>
|
|
331
|
+
* </Command.Group>
|
|
332
|
+
* </Command.List>
|
|
333
|
+
* </Command.DialogContent>
|
|
334
|
+
* </Command.DialogRoot>
|
|
335
|
+
* ```
|
|
336
|
+
*/
|
|
337
|
+
declare const Command: typeof CommandParts;
|
|
1382
338
|
export { Command, type CommandDialogRootProps, type CommandDialogState, type CommandSearchTriggerProps, MetaKey, type SearchAction, type SearchKeyDownEvent, type SearchPasteEvent, searchActionFromKeyDown, searchActionFromPaste, useCommandDialog, useCommandState };
|