@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,487 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parts of the `MultiSelect` namespace. `index.ts` imports them as one module
|
|
3
|
+
* namespace, so a bundler keeps only the parts a consumer reads.
|
|
4
|
+
*/
|
|
5
|
+
import { ComponentProps, ReactNode } from "react";
|
|
6
|
+
import { t as UseComboboxProps } from "./use-combobox-OhIEVioc.js";
|
|
7
|
+
import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
|
|
8
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
9
|
+
import { o as WithValidation } from "./field-BshcNVe_.js";
|
|
10
|
+
import { n as Separator } from "./separator-BzHNVyyv.js";
|
|
11
|
+
import { t as OptionRender } from "./slot-5ZSmrISx.js";
|
|
12
|
+
type UseMultiSelectProps = Omit<UseComboboxProps, "value" | "defaultValue" | "onValueChange"> & {
|
|
13
|
+
/** The controlled picked values. Pair with `onValueChange`. */
|
|
14
|
+
value?: readonly string[];
|
|
15
|
+
/** The picked values on first render. */
|
|
16
|
+
defaultValue?: readonly string[];
|
|
17
|
+
/** Called when the user picks or removes a value. */
|
|
18
|
+
onValueChange?: (value: string[]) => void;
|
|
19
|
+
};
|
|
20
|
+
type MultiSelectProps = UseMultiSelectProps & {
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Root component for a multi-select combobox. Owns the selected values and the
|
|
25
|
+
* typeahead query.
|
|
26
|
+
*
|
|
27
|
+
* Use MultiSelect when the user can choose multiple values from a list, with selected
|
|
28
|
+
* items rendered as removable tags/chips. For single selection, use Combobox (with search)
|
|
29
|
+
* or Select (without).
|
|
30
|
+
*
|
|
31
|
+
* When composing with `Field.Item`, wrap `MultiSelect.Root` in `Field.Control`.
|
|
32
|
+
* `Field.Control` flows the generated `id`, `aria-describedby`,
|
|
33
|
+
* `aria-errormessage`, and `aria-invalid` through to the focusable
|
|
34
|
+
* `MultiSelect.Input` via `FieldControlContext`. The field `name` flows through
|
|
35
|
+
* too, but lands on one hidden input per selected value rather than on the
|
|
36
|
+
* combobox input, so a native form submit sends the selected values, not the
|
|
37
|
+
* typeahead filter text.
|
|
38
|
+
*
|
|
39
|
+
* `MultiSelect.Content` is a `popover="manual"` element in the top layer, so it paints
|
|
40
|
+
* above the page and every overlay. It portals into the overlay or float that
|
|
41
|
+
* holds it, such as an open `Dialog` or `Popover.Content`, else into
|
|
42
|
+
* `document.body`. In a browser with no popover API, it is a fixed box at
|
|
43
|
+
* Tailwind `z-50`.
|
|
44
|
+
*
|
|
45
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselectroot
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <MultiSelect.Root>
|
|
50
|
+
* <MultiSelect.Trigger>
|
|
51
|
+
* <MultiSelect.TagValues />
|
|
52
|
+
* <MultiSelect.Input placeholder="Select items..." />
|
|
53
|
+
* </MultiSelect.Trigger>
|
|
54
|
+
* <MultiSelect.Content>
|
|
55
|
+
* <MultiSelect.Item value="apple">Apple</MultiSelect.Item>
|
|
56
|
+
* <MultiSelect.Item value="banana">Banana</MultiSelect.Item>
|
|
57
|
+
* </MultiSelect.Content>
|
|
58
|
+
* </MultiSelect.Root>
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
declare const Root: ({ children, ...props }: MultiSelectProps) => import("react").JSX.Element;
|
|
62
|
+
type MultiSelectTriggerProps = ComponentProps<"div"> & WithValidation & WithDataSlot;
|
|
63
|
+
/**
|
|
64
|
+
* The trigger container for the multi-select. Wraps the input and selected
|
|
65
|
+
* value tags in a styled container that looks like a form input. It is
|
|
66
|
+
* `role="presentation"`: the `MultiSelect.Input` combobox and the
|
|
67
|
+
* `MultiSelect.TagValues` list carry the semantics, and the input's label
|
|
68
|
+
* (`Field.Label` or `aria-label`) names the whole control.
|
|
69
|
+
*
|
|
70
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselecttrigger
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```tsx
|
|
74
|
+
* <MultiSelect.Root>
|
|
75
|
+
* <MultiSelect.Trigger>
|
|
76
|
+
* <MultiSelect.TagValues />
|
|
77
|
+
* <MultiSelect.Input placeholder="Select items..." />
|
|
78
|
+
* </MultiSelect.Trigger>
|
|
79
|
+
* <MultiSelect.Content>
|
|
80
|
+
* <MultiSelect.Item value="apple">Apple</MultiSelect.Item>
|
|
81
|
+
* </MultiSelect.Content>
|
|
82
|
+
* </MultiSelect.Root>
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
declare const Trigger: ({ "data-slot": dataSlot, "aria-invalid": _ariaInvalid, className, children, onBlur, onKeyDown, onMouseDown, ref, validation: _validation, ...props }: MultiSelectTriggerProps) => import("react").JSX.Element;
|
|
86
|
+
type TagProps = Omit<ComponentProps<"span">, "children"> & {
|
|
87
|
+
/**
|
|
88
|
+
* The value to display in the tag label.
|
|
89
|
+
*/
|
|
90
|
+
value: string;
|
|
91
|
+
/**
|
|
92
|
+
* Called when the remove button is clicked. `MultiSelect.TagValues` passes
|
|
93
|
+
* one through its render props that removes the value from the selection.
|
|
94
|
+
*/
|
|
95
|
+
onRemove?: () => void;
|
|
96
|
+
/**
|
|
97
|
+
* When true, the tag cannot be removed. The remove button is disabled and
|
|
98
|
+
* Delete/Backspace key presses are ignored while the tag is focused.
|
|
99
|
+
*/
|
|
100
|
+
locked?: boolean;
|
|
101
|
+
} & WithDataSlot;
|
|
102
|
+
/**
|
|
103
|
+
* The default tag rendered inside `MultiSelect.TagValues` for each selected value.
|
|
104
|
+
* Displays the value label with a remove button. Renders a `role="listitem"`
|
|
105
|
+
* inside the `role="list"` that `MultiSelect.TagValues` renders. The tag that
|
|
106
|
+
* keyboard navigation is on has DOM focus; style it with `focus-visible:`.
|
|
107
|
+
*
|
|
108
|
+
* Arrow-key navigation and Backspace/Delete removal come from the
|
|
109
|
+
* `MultiSelect.TagValues` render props; spread them onto the tag to get them.
|
|
110
|
+
* On its own, `Tag` only blocks Backspace and Delete on a locked tag.
|
|
111
|
+
*
|
|
112
|
+
* Use this when building a custom `TagValues`-like component and you want the
|
|
113
|
+
* default tag chrome with consistent styling.
|
|
114
|
+
*
|
|
115
|
+
* | Data Attribute | Value | Description |
|
|
116
|
+
* | --- | --- | --- |
|
|
117
|
+
* | `data-locked` | present when `locked` | The tag cannot be removed. |
|
|
118
|
+
*
|
|
119
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselecttag
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```tsx
|
|
123
|
+
* <MultiSelect.Root>
|
|
124
|
+
* <MultiSelect.Trigger>
|
|
125
|
+
* <MultiSelect.TagValues>
|
|
126
|
+
* {(props) => <MultiSelect.Tag key={props.value} {...props} />}
|
|
127
|
+
* </MultiSelect.TagValues>
|
|
128
|
+
* <MultiSelect.Input placeholder="Select items..." />
|
|
129
|
+
* </MultiSelect.Trigger>
|
|
130
|
+
* <MultiSelect.Content>
|
|
131
|
+
* <MultiSelect.Item value="apple">Apple</MultiSelect.Item>
|
|
132
|
+
* </MultiSelect.Content>
|
|
133
|
+
* </MultiSelect.Root>
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
declare const Tag: ({ "data-slot": dataSlot, className, value, onRemove, locked, onKeyDown, ref, ...props }: TagProps) => import("react").JSX.Element;
|
|
137
|
+
/**
|
|
138
|
+
* Props passed to the children render function of `MultiSelect.TagValues`.
|
|
139
|
+
* Spread these onto `MultiSelect.Tag` (or your own tag component) to
|
|
140
|
+
* get the value, remove handler, locked state, and ref-based keyboard-nav
|
|
141
|
+
* registration all wired up automatically.
|
|
142
|
+
*
|
|
143
|
+
* Pre-wired handlers included:
|
|
144
|
+
* - `onKeyDown`: arrow-key nav between tags, Backspace/Delete to remove
|
|
145
|
+
* - `onClick`: focuses the tag and opens the popover, or keeps it open
|
|
146
|
+
*/
|
|
147
|
+
type TagRenderProps = TagProps & {
|
|
148
|
+
/** Ref callback. Forward it to the tag element to register it for keyboard navigation between tags. */
|
|
149
|
+
ref: (node: HTMLSpanElement | null) => void;
|
|
150
|
+
};
|
|
151
|
+
type MultiSelectTagValuesProps = {
|
|
152
|
+
/**
|
|
153
|
+
* The accessible name of the tag list.
|
|
154
|
+
*
|
|
155
|
+
* @default "Selected values"
|
|
156
|
+
*/
|
|
157
|
+
"aria-label"?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Values that cannot be removed. Locked tags have their remove button disabled,
|
|
160
|
+
* respond to Backspace/Delete key presses with a shake animation, and shake when
|
|
161
|
+
* Backspace is pressed on an empty input.
|
|
162
|
+
*
|
|
163
|
+
* The `locked` state is also forwarded to the render function via `props.locked`
|
|
164
|
+
* so custom tag components receive it automatically.
|
|
165
|
+
*/
|
|
166
|
+
lockedValues?: readonly string[];
|
|
167
|
+
/**
|
|
168
|
+
* Optional render function for each tag. Receives `{ value, onRemove, locked, ref, onKeyDown, onClick }`.
|
|
169
|
+
* Spread these onto `MultiSelect.Tag` (or your own element) for full keyboard-nav support.
|
|
170
|
+
* When omitted, the default `MultiSelect.Tag` is rendered for each selected value.
|
|
171
|
+
* A custom tag must be a `role="listitem"`: the tags render inside a `role="list"`.
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```tsx
|
|
175
|
+
* <MultiSelect.TagValues lockedValues={["global"]}>
|
|
176
|
+
* {(props) => (
|
|
177
|
+
* <MultiSelect.Tag key={props.value} {...props} />
|
|
178
|
+
* )}
|
|
179
|
+
* </MultiSelect.TagValues>
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
children?: (props: TagRenderProps) => ReactNode;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Renders the selected values as removable tags. Place this inside
|
|
186
|
+
* `MultiSelect.Trigger`, followed by `MultiSelect.Input`.
|
|
187
|
+
*
|
|
188
|
+
* The tags render inside a `role="list"` named "Selected values" (override it
|
|
189
|
+
* with `aria-label`), and each default tag is a `role="listitem"`. The list
|
|
190
|
+
* uses `display: contents`, so the tags keep the trigger's flex layout.
|
|
191
|
+
*
|
|
192
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselecttagvalues
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* ```tsx
|
|
196
|
+
* <MultiSelect.Root>
|
|
197
|
+
* <MultiSelect.Trigger>
|
|
198
|
+
* <MultiSelect.TagValues />
|
|
199
|
+
* <MultiSelect.Input placeholder="Select items..." />
|
|
200
|
+
* </MultiSelect.Trigger>
|
|
201
|
+
* <MultiSelect.Content>
|
|
202
|
+
* <MultiSelect.Item value="apple">Apple</MultiSelect.Item>
|
|
203
|
+
* </MultiSelect.Content>
|
|
204
|
+
* </MultiSelect.Root>
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
declare const TagValues: ({ "aria-label": ariaLabel, children, lockedValues }: MultiSelectTagValuesProps) => import("react").JSX.Element | null;
|
|
208
|
+
type MultiSelectInputProps = Omit<ComponentProps<"input">, "value" | "defaultValue" | "autoComplete"> & WithDataSlot;
|
|
209
|
+
/**
|
|
210
|
+
* The combobox input for filtering items. Place this inside `MultiSelect.Trigger`,
|
|
211
|
+
* after `MultiSelect.TagValues`.
|
|
212
|
+
*
|
|
213
|
+
* `MultiSelect.Input` is the focusable element of the multi-select. When the
|
|
214
|
+
* surrounding `MultiSelect.Root` is wrapped in `Field.Control`, the generated
|
|
215
|
+
* `id`, `aria-invalid`, `aria-describedby`, and `aria-errormessage` flow onto
|
|
216
|
+
* the input here via `FieldControlContext`.
|
|
217
|
+
*
|
|
218
|
+
* A `name` (passed directly or flowed from `Field.Control`) is not set on this
|
|
219
|
+
* input. Its value is the typeahead filter text, so naming it would submit what
|
|
220
|
+
* the user typed. The name is applied to one hidden input per selected value
|
|
221
|
+
* instead, which is what a native form submit sends.
|
|
222
|
+
*
|
|
223
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselectinput
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* ```tsx
|
|
227
|
+
* <MultiSelect.Root>
|
|
228
|
+
* <MultiSelect.Trigger>
|
|
229
|
+
* <MultiSelect.TagValues />
|
|
230
|
+
* <MultiSelect.Input placeholder="Select items..." />
|
|
231
|
+
* </MultiSelect.Trigger>
|
|
232
|
+
* <MultiSelect.Content>
|
|
233
|
+
* <MultiSelect.Item value="apple">Apple</MultiSelect.Item>
|
|
234
|
+
* </MultiSelect.Content>
|
|
235
|
+
* </MultiSelect.Root>
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
declare const Input: ({ "data-slot": dataSlot, className, name: nameProp, onBlur, onChange, onClick, onFocus, onKeyDown, placeholder, ref, ...props }: MultiSelectInputProps) => import("react").JSX.Element;
|
|
239
|
+
type MultiSelectContentProps = ComponentProps<"div"> & WithAsChild & WithDataSlot & {
|
|
240
|
+
/**
|
|
241
|
+
* Whether the list is as wide as the trigger. When `false`, it takes the
|
|
242
|
+
* width of its widest item.
|
|
243
|
+
* @default true
|
|
244
|
+
*/
|
|
245
|
+
sameWidth?: boolean;
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Renders a popover that contains multi-select content, such as items, groups,
|
|
249
|
+
* and separators. Opens below the trigger.
|
|
250
|
+
*
|
|
251
|
+
* `MultiSelect.Content` is a `popover="manual"` element in the top layer, so it paints
|
|
252
|
+
* above the page and every overlay. It portals into the overlay or float that
|
|
253
|
+
* holds it, such as an open `Dialog` or `Popover.Content`, else into
|
|
254
|
+
* `document.body`. In a browser with no popover API, it is a fixed box at
|
|
255
|
+
* Tailwind `z-50`.
|
|
256
|
+
*
|
|
257
|
+
* As with a native select, the page stays live while the list is open: it
|
|
258
|
+
* scrolls, and assistive technology can reach it. A press outside the trigger
|
|
259
|
+
* and the list closes the list, and its click does not reach the page.
|
|
260
|
+
*
|
|
261
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselectcontent
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* ```tsx
|
|
265
|
+
* <MultiSelect.Root>
|
|
266
|
+
* <MultiSelect.Trigger>
|
|
267
|
+
* <MultiSelect.TagValues />
|
|
268
|
+
* <MultiSelect.Input placeholder="Select items..." />
|
|
269
|
+
* </MultiSelect.Trigger>
|
|
270
|
+
* <MultiSelect.Content>
|
|
271
|
+
* <MultiSelect.Item value="apple">Apple</MultiSelect.Item>
|
|
272
|
+
* <MultiSelect.Item value="banana">Banana</MultiSelect.Item>
|
|
273
|
+
* </MultiSelect.Content>
|
|
274
|
+
* </MultiSelect.Root>
|
|
275
|
+
* ```
|
|
276
|
+
*/
|
|
277
|
+
declare const Content: (props: MultiSelectContentProps) => false | import("react").JSX.Element;
|
|
278
|
+
/**
|
|
279
|
+
* Props for `MultiSelect.Item`.
|
|
280
|
+
*/
|
|
281
|
+
type MultiSelectItemProps = Omit<ComponentProps<"div">, "children" | "value"> & WithAsChild & WithDataSlot & {
|
|
282
|
+
/**
|
|
283
|
+
* The item's label. A function renders the item as the element it returns,
|
|
284
|
+
* with the item's props and `{ highlighted }`: spread `props` on that
|
|
285
|
+
* element and write the label inside it.
|
|
286
|
+
*/
|
|
287
|
+
children?: ReactNode | OptionRender;
|
|
288
|
+
/**
|
|
289
|
+
* Whether the item is inert.
|
|
290
|
+
*/
|
|
291
|
+
disabled?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* The value that the item adds to or removes from the selection.
|
|
294
|
+
*/
|
|
295
|
+
value: string;
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
298
|
+
* Renders a selectable item inside a `MultiSelect.Content` component.
|
|
299
|
+
* Items display a checkbox indicator when selected.
|
|
300
|
+
*
|
|
301
|
+
* **Structure.** `children` render inside a
|
|
302
|
+
* `<div data-slot="multi-select-item-label">`. The selected-state check is a
|
|
303
|
+
* permanent element sibling, so without the wrapper a bare text label is never a
|
|
304
|
+
* lone child: a browser translation engine reparents that text node, and the
|
|
305
|
+
* removal React runs when the label changes shape or goes away throws. The
|
|
306
|
+
* wrapper is a `<div>` because a custom option layout is often a `MediaObject`,
|
|
307
|
+
* whose root is a `<div>` that a `<span>` may not contain. It is
|
|
308
|
+
* `display: contents`, so a child of your own stays a flex item of the option
|
|
309
|
+
* and any `flex-1` on it still resolves.
|
|
310
|
+
*
|
|
311
|
+
* **`asChild`.** Your single child becomes the option element. The label div
|
|
312
|
+
* and the check move inside it, so the guarantee above holds on both paths.
|
|
313
|
+
*
|
|
314
|
+
* **Function child.** `(props, { highlighted }) => element` renders the option as
|
|
315
|
+
* the element it returns. Spread `props` on it and write the label inside it.
|
|
316
|
+
*
|
|
317
|
+
* **Data attributes:**
|
|
318
|
+
*
|
|
319
|
+
* | Data Attribute | Value | Description |
|
|
320
|
+
* | --- | --- | --- |
|
|
321
|
+
* | `data-slot` | `"multi-select-item"` | On the option element. |
|
|
322
|
+
* | `data-slot` | `"multi-select-item-label"` | On the `<div>` wrapping `children`. |
|
|
323
|
+
*
|
|
324
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselectitem
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* ```tsx
|
|
328
|
+
* <MultiSelect.Root>
|
|
329
|
+
* <MultiSelect.Trigger>
|
|
330
|
+
* <MultiSelect.TagValues />
|
|
331
|
+
* <MultiSelect.Input placeholder="Select items..." />
|
|
332
|
+
* </MultiSelect.Trigger>
|
|
333
|
+
* <MultiSelect.Content>
|
|
334
|
+
* <MultiSelect.Item value="apple">Apple</MultiSelect.Item>
|
|
335
|
+
* <MultiSelect.Item value="banana">Banana</MultiSelect.Item>
|
|
336
|
+
* </MultiSelect.Content>
|
|
337
|
+
* </MultiSelect.Root>
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
340
|
+
declare const Item: ({ "data-slot": dataSlot, asChild, children, className, disabled, onClick, onPointerMove, value, ref, ...props }: MultiSelectItemProps) => import("react").JSX.Element;
|
|
341
|
+
type MultiSelectGroupProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
342
|
+
/**
|
|
343
|
+
* Renders a group for MultiSelect.Item elements.
|
|
344
|
+
*
|
|
345
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselectgroup
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* ```tsx
|
|
349
|
+
* <MultiSelect.Root>
|
|
350
|
+
* <MultiSelect.Trigger>
|
|
351
|
+
* <MultiSelect.TagValues />
|
|
352
|
+
* <MultiSelect.Input placeholder="Select items..." />
|
|
353
|
+
* </MultiSelect.Trigger>
|
|
354
|
+
* <MultiSelect.Content>
|
|
355
|
+
* <MultiSelect.Group>
|
|
356
|
+
* <MultiSelect.GroupLabel>Fruits</MultiSelect.GroupLabel>
|
|
357
|
+
* <MultiSelect.Item value="apple">Apple</MultiSelect.Item>
|
|
358
|
+
* <MultiSelect.Item value="banana">Banana</MultiSelect.Item>
|
|
359
|
+
* </MultiSelect.Group>
|
|
360
|
+
* </MultiSelect.Content>
|
|
361
|
+
* </MultiSelect.Root>
|
|
362
|
+
* ```
|
|
363
|
+
*/
|
|
364
|
+
declare const Group: ({ "data-slot": dataSlot, asChild, children, className, ref, ...props }: MultiSelectGroupProps) => import("react").JSX.Element;
|
|
365
|
+
type MultiSelectGroupLabelProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
366
|
+
/**
|
|
367
|
+
* Renders a label in a multi-select group.
|
|
368
|
+
*
|
|
369
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselectgrouplabel
|
|
370
|
+
*
|
|
371
|
+
* @example
|
|
372
|
+
* ```tsx
|
|
373
|
+
* <MultiSelect.Root>
|
|
374
|
+
* <MultiSelect.Trigger>
|
|
375
|
+
* <MultiSelect.TagValues />
|
|
376
|
+
* <MultiSelect.Input placeholder="Select items..." />
|
|
377
|
+
* </MultiSelect.Trigger>
|
|
378
|
+
* <MultiSelect.Content>
|
|
379
|
+
* <MultiSelect.Group>
|
|
380
|
+
* <MultiSelect.GroupLabel>Fruits</MultiSelect.GroupLabel>
|
|
381
|
+
* <MultiSelect.Item value="apple">Apple</MultiSelect.Item>
|
|
382
|
+
* </MultiSelect.Group>
|
|
383
|
+
* </MultiSelect.Content>
|
|
384
|
+
* </MultiSelect.Root>
|
|
385
|
+
* ```
|
|
386
|
+
*/
|
|
387
|
+
declare const GroupLabel: ({ "data-slot": dataSlot, asChild, children, className, ref, ...props }: MultiSelectGroupLabelProps) => import("react").JSX.Element;
|
|
388
|
+
type MultiSelectGroupDescriptionProps = ComponentProps<"p"> & WithDataSlot;
|
|
389
|
+
/**
|
|
390
|
+
* Renders a description below a `MultiSelect.GroupLabel` inside a `MultiSelect.Group`.
|
|
391
|
+
* States the group's purpose or constraints.
|
|
392
|
+
*
|
|
393
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselectgroupdescription
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
* ```tsx
|
|
397
|
+
* <MultiSelect.Root>
|
|
398
|
+
* <MultiSelect.Trigger>
|
|
399
|
+
* <MultiSelect.TagValues />
|
|
400
|
+
* <MultiSelect.Input placeholder="Select regions..." />
|
|
401
|
+
* </MultiSelect.Trigger>
|
|
402
|
+
* <MultiSelect.Content>
|
|
403
|
+
* <MultiSelect.Group>
|
|
404
|
+
* <MultiSelect.GroupLabel>Regional Aliases</MultiSelect.GroupLabel>
|
|
405
|
+
* <MultiSelect.GroupDescription>
|
|
406
|
+
* Include all points of presence that are geographically within the region.
|
|
407
|
+
* </MultiSelect.GroupDescription>
|
|
408
|
+
* <MultiSelect.Item value="global">global</MultiSelect.Item>
|
|
409
|
+
* </MultiSelect.Group>
|
|
410
|
+
* </MultiSelect.Content>
|
|
411
|
+
* </MultiSelect.Root>
|
|
412
|
+
* ```
|
|
413
|
+
*/
|
|
414
|
+
declare const GroupDescription: ({ "data-slot": dataSlot, className, children, ref, ...props }: MultiSelectGroupDescriptionProps) => import("react").JSX.Element;
|
|
415
|
+
/**
|
|
416
|
+
* Renders a separator between MultiSelect.Items or MultiSelect.Groups.
|
|
417
|
+
*
|
|
418
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselectseparator
|
|
419
|
+
*
|
|
420
|
+
* @example
|
|
421
|
+
* ```tsx
|
|
422
|
+
* <MultiSelect.Root>
|
|
423
|
+
* <MultiSelect.Trigger>
|
|
424
|
+
* <MultiSelect.TagValues />
|
|
425
|
+
* <MultiSelect.Input placeholder="Select items..." />
|
|
426
|
+
* </MultiSelect.Trigger>
|
|
427
|
+
* <MultiSelect.Content>
|
|
428
|
+
* <MultiSelect.Group>
|
|
429
|
+
* <MultiSelect.Item value="apple">Apple</MultiSelect.Item>
|
|
430
|
+
* </MultiSelect.Group>
|
|
431
|
+
* <MultiSelect.Separator />
|
|
432
|
+
* <MultiSelect.Group>
|
|
433
|
+
* <MultiSelect.Item value="carrot">Carrot</MultiSelect.Item>
|
|
434
|
+
* </MultiSelect.Group>
|
|
435
|
+
* </MultiSelect.Content>
|
|
436
|
+
* </MultiSelect.Root>
|
|
437
|
+
* ```
|
|
438
|
+
*/
|
|
439
|
+
declare const MultiSelectSeparatorComponent: ({ "data-slot": dataSlot, className, ref, ...props }: ComponentProps<typeof Separator> & WithDataSlot) => import("react").JSX.Element;
|
|
440
|
+
type MultiSelectEmptyProps = ComponentProps<"div"> & WithDataSlot;
|
|
441
|
+
/**
|
|
442
|
+
* Renders a message when no items match the current filter.
|
|
443
|
+
*
|
|
444
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselectempty
|
|
445
|
+
*
|
|
446
|
+
* @example
|
|
447
|
+
* ```tsx
|
|
448
|
+
* <MultiSelect.Root>
|
|
449
|
+
* <MultiSelect.Trigger>
|
|
450
|
+
* <MultiSelect.TagValues />
|
|
451
|
+
* <MultiSelect.Input placeholder="Select items..." />
|
|
452
|
+
* </MultiSelect.Trigger>
|
|
453
|
+
* <MultiSelect.Content>
|
|
454
|
+
* {matches.length === 0 && (
|
|
455
|
+
* <MultiSelect.Empty>No results found</MultiSelect.Empty>
|
|
456
|
+
* )}
|
|
457
|
+
* </MultiSelect.Content>
|
|
458
|
+
* </MultiSelect.Root>
|
|
459
|
+
* ```
|
|
460
|
+
*/
|
|
461
|
+
declare const Empty: ({ "data-slot": dataSlot, className, children, ref, ...props }: MultiSelectEmptyProps) => import("react").JSX.Element;
|
|
462
|
+
type MultiSelectContentFooterProps = ComponentProps<"div"> & WithDataSlot;
|
|
463
|
+
/**
|
|
464
|
+
* Renders a sticky footer pinned to the bottom inside `MultiSelect.Content`,
|
|
465
|
+
* with a separator border at the top.
|
|
466
|
+
*
|
|
467
|
+
* @see https://mantle.ngrok.com/components/forms/multi-select#multiselectcontentfooter
|
|
468
|
+
*
|
|
469
|
+
* @example
|
|
470
|
+
* ```tsx
|
|
471
|
+
* <MultiSelect.Root>
|
|
472
|
+
* <MultiSelect.Trigger>
|
|
473
|
+
* <MultiSelect.TagValues />
|
|
474
|
+
* <MultiSelect.Input placeholder="Select items..." />
|
|
475
|
+
* </MultiSelect.Trigger>
|
|
476
|
+
* <MultiSelect.Content>
|
|
477
|
+
* <MultiSelect.Item value="apple">Apple</MultiSelect.Item>
|
|
478
|
+
* <MultiSelect.ContentFooter>
|
|
479
|
+
* <p>Upgrade to unlock more options.</p>
|
|
480
|
+
* <Button appearance="filled" intent="accent">Upgrade</Button>
|
|
481
|
+
* </MultiSelect.ContentFooter>
|
|
482
|
+
* </MultiSelect.Content>
|
|
483
|
+
* </MultiSelect.Root>
|
|
484
|
+
* ```
|
|
485
|
+
*/
|
|
486
|
+
declare const ContentFooter: ({ "data-slot": dataSlot, className, children, ref, ...props }: MultiSelectContentFooterProps) => import("react").JSX.Element;
|
|
487
|
+
export { Content, ContentFooter, Empty, Group, GroupDescription, GroupLabel, Input, Item, Root, MultiSelectSeparatorComponent as Separator, Tag, TagValues, Trigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{t as Content,n as ContentFooter,r as Empty,i as Group,a as GroupDescription,o as GroupLabel,s as Input,c as Item,u as Root,l as Separator,d as Tag,f as TagValues,p as Trigger}from"./multi-select-qC0BuYKD.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{cloneElement as e,createContext as t,isValidElement as n,use as r,useId as i,useRef as a}from"react";import{createPortal as o,flushSync as s}from"react-dom";import{t as c}from"./behaviors-CnarRd47.js";import{n as l}from"./behaviors-CoNi6Rd-.js";import{a as u,t as d}from"./behaviors-Mkc_HjTB.js";import{t as f}from"./behaviors-D9VIyDk1.js";import{t as p}from"./behaviors-C7R7ZIoN.js";import{t as m}from"./compose-refs-Ce1vWUz0.js";import{n as h}from"./cx-CfAFHj5_.js";import{t as g}from"./utils-BN3rwHzz.js";import{t as _}from"./utils-EM6s2WEU.js";import{n as v}from"./float-OhVY3cf4.js";import{t as y}from"./utils-C4astHJG.js";import{t as b}from"./field-BwCq1b9R.js";import{t as x}from"./live-region-78gbKwlB.js";import{n as S}from"./field-BRYypbjO.js";import{n as C}from"./field-CYAaNexp.js";import{n as w}from"./separator-BB1ohsjn.js";import{t as T}from"./slot-CBcGhRdV.js";import{t as E}from"./slot-BxngGBJ2.js";import D from"tiny-invariant";import{Fragment as O,jsx as k,jsxs as A}from"react/jsx-runtime";const j=[],M=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),N=t(null),P=()=>{let e=r(N);if(e==null)throw Error(`MultiSelect parts must be rendered inside MultiSelect.Root.`);return e},F=t(void 0),I=t(void 0),L=`a[href], button:not(:disabled), input:not([type="hidden"]):not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])`,R=(e,t)=>{let n=e.get(t);n!=null&&y(n)},z=({children:e,...t})=>{let n=f(t);return/* @__PURE__ */ k(N,{value:n,children:e})},B=({"data-slot":e,"aria-invalid":t,className:n,children:r,onBlur:i,onKeyDown:a,onMouseDown:o,ref:s,validation:l,...u})=>{let{inputRef:d,open:f,setOpen:p,tags:g,triggerRef:v}=P(),y=m(v,s),b=e=>e instanceof Node&&[...g.values()].some(t=>t.contains(e)),x=C(),{ariaInvalid:w,validation:T}=S({"aria-invalid":t,validation:l??x});return/* @__PURE__ */ k(F,{value:w,children:/* @__PURE__ */ k(`div`,{role:`presentation`,"data-slot":_(e,`multi-select-trigger`),className:h(`cursor-text select-none font-sans text-sm border-form bg-form text-strong flex min-h-9 w-full flex-wrap items-center gap-1 rounded-md border px-3 py-1 has-data-[slot=multi-select-tag]:px-1 has-focus-within:focus-ring has-aria-expanded:focus-ring has-focus-within:border-accent-600 has-aria-expanded:border-accent-600 data-[validation=success]:border-success-600 data-[validation=success]:has-focus-within:border-success-600 data-[validation=success]:has-focus-within:ring-focus-success data-[validation=success]:has-aria-expanded:border-success-600 data-[validation=success]:has-aria-expanded:ring-focus-success data-[validation=warning]:border-warning-600 data-[validation=warning]:has-focus-within:border-warning-600 data-[validation=warning]:has-focus-within:ring-focus-warning data-[validation=warning]:has-aria-expanded:border-warning-600 data-[validation=warning]:has-aria-expanded:ring-focus-warning data-[validation=error]:border-danger-600 data-[validation=error]:has-focus-within:border-danger-600 data-[validation=error]:has-focus-within:ring-focus-danger data-[validation=error]:has-aria-expanded:border-danger-600 data-[validation=error]:has-aria-expanded:ring-focus-danger motion-safe:data-[validation=error]:animate-shake`,n),"data-validation":T||void 0,onMouseDown:e=>{e.target instanceof HTMLElement&&!e.target.closest(`button, input, [data-slot='multi-select-tag']`)&&(e.preventDefault(),d.current?.focus()),o?.(e)},onKeyDown:c(a,e=>{e.key===`Escape`&&f&&b(e.target)&&(e.preventDefault(),p(!1))}),onBlur:c(i,e=>{let{relatedTarget:t}=e;b(e.target)&&!(t instanceof Node&&e.currentTarget.contains(t))&&p(!1)}),ref:y,...u,children:r})})},V=({"data-slot":e,className:t,value:n,onRemove:r,locked:i=!1,onKeyDown:o,ref:s,...c})=>{let l=a(null),u=m(l,s);return/* @__PURE__ */ A(`span`,{ref:u,role:`listitem`,tabIndex:-1,"data-slot":_(e,`multi-select-tag`),"data-locked":i||void 0,className:h(`cursor-default bg-neutral-500/10 border border-neutral-500/20 rounded-xs text-strong inline-flex items-center gap-1 pl-2 pr-0.5 py-0.5 text-sm font-normal motion-safe:data-shake:animate-shake focus-visible:border-accent-600/50 focus-visible:ring-3 focus-visible:focus-ring`,t),onKeyDown:e=>{i&&(e.key===`Backspace`||e.key===`Delete`)?(e.preventDefault(),y(e.currentTarget)):o?.(e)},...c,children:[n,/* @__PURE__ */ k(`button`,{type:`button`,"aria-label":`Remove ${n}`,tabIndex:-1,"aria-disabled":i||void 0,className:`cursor-pointer text-strong/40 hover:bg-neutral-500/15 hover:text-strong rounded-xs p-0.5 aria-disabled:cursor-default aria-disabled:hover:bg-transparent aria-disabled:hover:text-strong/40`,onClick:e=>{if(e.stopPropagation(),i){let e=l.current;e&&y(e)}else r?.()},onMouseDown:e=>{e.preventDefault()},children:/* @__PURE__ */ k(`svg`,{"aria-hidden":!0,"data-slot":`icon svg-only`,viewBox:`0 0 256 256`,fill:`currentColor`,className:`size-4 shrink-0`,children:/* @__PURE__ */ k(`path`,{d:i?`M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z`:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`})})})]})},H=({render:e,...t})=>e(t),U=({"aria-label":e=`Selected values`,children:t,lockedValues:n=j})=>{let{inputRef:r,listbox:i,locked:a,remove:o,selected:c,setOpen:l,tags:u}=P(),d=e=>{let t=c[e],n=t==null?null:u.get(t);n!=null&&(n.focus(),l(!0))},f=()=>{r.current?.focus()},p=(e,t)=>{let n=c[e];if(n==null)return;let r=!1;if(s(()=>{r=o(n)}),!r){R(u,n);return}let i=t(c.length-1),a=c.filter(e=>e!==n)[i],d=a==null?null:u.get(a);d==null?f():(d.focus(),l(!0))},m=(e,t)=>{switch(e.key){case`ArrowLeft`:e.preventDefault(),t>0&&d(t-1);break;case`ArrowRight`:e.preventDefault(),t<c.length-1?d(t+1):f();break;case`Backspace`:e.preventDefault(),p(t,()=>Math.max(t-1,0));break;case`Delete`:e.preventDefault(),p(t,()=>t);break;case`ArrowUp`:case`ArrowDown`:e.preventDefault(),f(),s(()=>{l(!0)}),i.move(e.key===`ArrowDown`?`next`:`previous`);break;default:e.key.length===1&&!e.ctrlKey&&!e.metaKey&&f()}};return c.length===0?null:/* @__PURE__ */ k(`span`,{role:`list`,"aria-label":e,"data-slot":`multi-select-tag-list`,className:`contents`,ref:()=>(M(a.get().values,n)||a.set({values:n}),()=>{a.set({values:j})}),children:c.map((e,r)=>{let i=n.includes(e),a={value:e,locked:i,onRemove:()=>{i?R(u,e):o(e)},ref:t=>{if(t!=null)return u.set(e,t),()=>{u.delete(e)}},onKeyDown:e=>m(e,r),onClick:()=>d(r)};return t?/* @__PURE__ */ k(H,{render:t,...a},e):/* @__PURE__ */ k(V,{...a},e)})})},W=({"data-slot":e,className:t,name:n,onBlur:i,onChange:a,onClick:o,onFocus:s,onKeyDown:u,placeholder:d,ref:f,...p})=>{let g=P(),{locked:v,remove:y,selected:S,setOpen:C,tags:w}=g,T=l(g,{autoSelect:!0}),E=m(f,T.ref),D=r(b),j=r(F),M=D?.name??n;return/* @__PURE__ */ A(O,{children:[/* @__PURE__ */ k(`input`,{"aria-invalid":j,...p,...T,ref:E,"data-slot":_(e,`multi-select-input`),className:h(`pointer-coarse:text-base min-w-20 flex-1 select-text border-0 bg-transparent text-sm outline-hidden placeholder:select-none placeholder:text-placeholder`,t),placeholder:S.length>0?void 0:d,onChange:c(a,T.onChange),onClick:c(o,T.onClick),onFocus:c(s,e=>{let t=e.currentTarget.closest(`[data-slot~="multi-select-trigger"]`);e.relatedTarget instanceof Node&&t?.contains(e.relatedTarget)&&C(!0)}),onBlur:c(i,e=>{let t=e.currentTarget.closest(`[data-slot~="multi-select-trigger"]`),{relatedTarget:n}=e;n instanceof Node&&(t?.contains(n)||g.listbox.ref.current?.contains(n))||T.onBlur()}),onKeyDown:c(u,e=>{if(e.nativeEvent.isComposing)return;if(e.key===`Tab`&&g.open){e.preventDefault(),e.shiftKey||g.listbox.ref.current?.querySelector(L)?.focus();return}let t=e.currentTarget,n=S.at(-1);e.key===`ArrowLeft`&&t.selectionStart===0&&t.selectionEnd===0&&n!=null&&w.has(n)?(e.preventDefault(),w.get(n)?.focus(),C(!0)):e.key===`Backspace`&&t.value===``&&n!=null&&w.has(n)?(v.get().values.includes(n)||!y(n))&&R(w,n):T.onKeyDown(e)}),...D?{"aria-describedby":D[`aria-describedby`],"aria-errormessage":D[`aria-errormessage`],"aria-invalid":D[`aria-invalid`],id:D.id}:void 0}),M!=null&&S.map(e=>/* @__PURE__ */ k(`input`,{type:`hidden`,name:M,value:e,form:p.form,disabled:p.disabled},e)),/* @__PURE__ */ k(x,{children:g.removal})]})},G=e=>P().open&&/* @__PURE__ */ k(K,{...e}),K=({"data-slot":e,asChild:t=!1,children:n,className:r,ref:i,sameWidth:a=!0,...s})=>{let{inputRef:l,listbox:u,setOpen:d,triggerRef:f}=P(),{portalTarget:y,popupRef:b}=p({anchorRef:f,ownerRef:l,onOutsidePress:()=>d(!1)}),x=m(u.listboxProps.ref,g),S=m(i,b,x);return y!=null&&o(/* @__PURE__ */ A(O,{children:[/* @__PURE__ */ k(`button`,{type:`button`,tabIndex:-1,className:`sr-only`,onClick:()=>d(!1),children:`Dismiss popup`}),/* @__PURE__ */ k(t?T:`div`,{...s,...u.listboxProps,onMouseDown:c(s.onMouseDown,u.listboxProps.onMouseDown),"aria-multiselectable":!0,popover:v?`manual`:void 0,ref:S,"data-slot":_(e,`multi-select-content`),"data-open":``,className:h(a?`border-popover bg-popover pointer-events-auto fixed inset-auto z-50 m-0 text-inherit max-h-(--available-height) min-w-32 overflow-y-auto overflow-x-hidden scrollbar-none [&::-webkit-scrollbar]:hidden overscroll-y-none scroll-cue-y before:-top-1 after:-bottom-1 scroll-py-6 has-data-content-footer:after:hidden rounded-md border shadow-md pt-1 pb-1 has-data-content-footer:pb-0 font-sans flex flex-col between:mbe-px outline-hidden w-(--anchor-width)`:`border-popover bg-popover pointer-events-auto fixed inset-auto z-50 m-0 text-inherit max-h-(--available-height) min-w-32 overflow-y-auto overflow-x-hidden scrollbar-none [&::-webkit-scrollbar]:hidden overscroll-y-none scroll-cue-y before:-top-1 after:-bottom-1 scroll-py-6 has-data-content-footer:after:hidden rounded-md border shadow-md pt-1 pb-1 has-data-content-footer:pb-0 font-sans flex flex-col between:mbe-px outline-hidden`,r),onKeyDown:c(s.onKeyDown,e=>{if(e.key===`Escape`&&d(!1),e.key===`Tab`&&e.shiftKey&&e.target===e.currentTarget.querySelector(L)){let t=e.currentTarget.getRootNode(),n=t instanceof Document||t instanceof ShadowRoot?t.querySelector(`[aria-controls="${e.currentTarget.id}"]`):null;n!=null&&(e.preventDefault(),n.focus())}}),onBlur:c(s.onBlur,e=>{let{relatedTarget:t}=e;t instanceof Element&&(e.currentTarget.contains(t)||t.closest(`[data-slot~="multi-select-trigger"]`)!=null)||d(!1)}),children:n})]}),y)},q=e=>/* @__PURE__ */ k(`div`,{"data-slot":`multi-select-item-label`,className:`contents`,children:e}),J=({"data-slot":t,asChild:r=!1,children:i,className:a,disabled:o,onClick:s,onPointerMove:l,value:f,ref:p,...m})=>{let{listbox:g}=P(),{selected:v,optionProps:y}=u(g,{value:f,disabled:o,id:d({asChild:r,children:i,id:m.id})}),b=v&&/* @__PURE__ */ k(`span`,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:/* @__PURE__ */ k(`svg`,{"aria-hidden":!0,"data-slot":`icon svg-only`,viewBox:`0 0 256 256`,fill:`currentColor`,className:`size-4 shrink-0 text-accent-600`,children:/* @__PURE__ */ k(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`})})}),x=e=>/* @__PURE__ */ A(O,{children:[q(e),b]}),S={...m,...y,onClick:c(s,y.onClick),onPointerMove:c(l,y.onPointerMove),"data-slot":_(t,`multi-select-item`),className:h(`relative mx-1 cursor-pointer rounded-md pl-2 pr-8 py-1.5 text-strong text-sm font-normal flex min-w-0 items-center gap-2 [[role=option]+&]:mt-px data-highlighted:bg-active-menu-item aria-disabled:opacity-50 aria-selected:bg-selected-menu-item aria-selected:data-highlighted:bg-active-selected-menu-item`,a),ref:p};return typeof i==`function`?/* @__PURE__ */ k(E,{...S,listbox:g,render:i,renderContent:x}):r?(D(n(i),"When using `asChild`, MultiSelect.Item must be passed a single child as a JSX tag."),/* @__PURE__ */ k(T,{...S,children:e(i,{},x(i.props.children))})):/* @__PURE__ */ k(`div`,{...S,children:x(i)})},Y=({"data-slot":e,asChild:t=!1,children:n,className:r,ref:a,...o})=>{let s=i();return/* @__PURE__ */ k(I,{value:s,children:/* @__PURE__ */ k(t?T:`div`,{role:`group`,"aria-labelledby":s,"data-slot":_(e,`multi-select-group`),className:h(`mx-1`,r),ref:a,...o,children:n})})},X=({"data-slot":e,asChild:t=!1,children:n,className:i,ref:a,...o})=>/* @__PURE__ */ k(t?T:`div`,{id:r(I),"data-slot":_(e,`multi-select-group-label`),className:h(`text-muted px-2 py-1 text-xs font-medium`,i),ref:a,...o,children:n}),Z=({"data-slot":e,className:t,children:n,ref:r,...i})=>/* @__PURE__ */ k(`p`,{"data-slot":_(e,`multi-select-group-description`),className:h(`text-muted px-2 pb-1 text-xs`,t),ref:r,...i,children:n}),Q=({"data-slot":e,className:t,ref:n,...r})=>/* @__PURE__ */ k(w,{"data-slot":_(e,`multi-select-separator`),ref:n,className:h(`my-1 w-auto`,t),...r}),$=({"data-slot":e,className:t,children:n,ref:r,...i})=>/* @__PURE__ */ k(`div`,{"data-slot":_(e,`multi-select-empty`),className:h(`mx-1 text-muted px-2 py-6 text-center text-sm`,t),ref:r,role:`presentation`,...i,children:n}),ee=({"data-slot":e,className:t,children:n,ref:r,...i})=>/* @__PURE__ */ k(`div`,{ref:r,"data-slot":_(e,`multi-select-content-footer`),"data-content-footer":!0,className:h(`bg-popover sticky bottom-0 border-t border-popover`,t),...i,children:n});export{Z as a,J as c,V as d,U as f,Y as i,Q as l,ee as n,X as o,B as p,$ as r,W as s,G as t,z as u};
|