@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/query.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./use-isomorphic-layout-effect-CLSmHzo4.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{_ as i,o as a,t as o}from"./suggestions-Ciz2vaJO.js";import{t as s}from"./button-BWGUuWnu.js";import{t as c}from"./code-DUJzSl4K.js";import{t as l}from"./field-Bihblt8U.js";import{n as u,t as d}from"./input-DHovzBjS.js";import{t as f}from"./kbd-CLHsJ99p.js";import{t as p}from"./popover-DxOqLKxy.js";import{t as m}from"./slot-DdYN1L1C.js";import{n as h,t as g}from"./tooltip-b6oiTaWq.js";import{c as _}from"react/compiler-runtime";import{cloneElement as v,createContext as y,isValidElement as b,useContext as x,useEffect as S,useId as C,useRef as w,useState as T}from"react";import E from"tiny-invariant";import{Fragment as D,jsx as O,jsxs as k}from"react/jsx-runtime";import{XIcon as A}from"@phosphor-icons/react/X";import{MagnifyingGlassIcon as j}from"@phosphor-icons/react/MagnifyingGlass";const M={filters:`Filter by`,exclusions:`Exclude`,values:`Values`},N={key:`text-(--query-key-color,var(--shiki-token-attribute))`,value:`text-(--query-value-color,var(--shiki-token-string))`,invalid:`text-danger-600 underline decoration-wavy underline-offset-4`,text:`text-strong`,operator:`text-(--query-operator-color,var(--shiki-token-operator))`,syntax:`text-muted`,plain:``},P=y(null),F=y(null),I=y(null);function ee(e){let t=x(I);return E(t,`${e} must be rendered inside Query.Root.`),t}function L(e){let t=x(P);return E(t,`${e} must be rendered inside Query.Root.`),t}const te={id:void 0,name:void 0,"aria-describedby":void 0,"aria-errormessage":void 0,"aria-invalid":void 0};function ne(e,t){return`${e}-option-${t}`}function re(e){let t=_(73),s,c,u,d,f,h,g,v,y;t[0]===e?(s=t[1],c=t[2],u=t[3],d=t[4],f=t[5],h=t[6],g=t[7],v=t[8],y=t[9]):({"data-slot":u,asChild:v,children:s,className:c,grammar:d,items:f,onValueChange:h,value:y,...g}=e,t[0]=e,t[1]=s,t[2]=c,t[3]=u,t[4]=d,t[5]=f,t[6]=h,t[7]=g,t[8]=v,t[9]=y);let b=v!==void 0&&v,S=w(null),E=w(null),D=w(null),k=w(null),[A,j]=T(0),[M,N]=T(!1),[F,ee]=T(null),[L,ne]=T(null),[re,ie]=T(!1),[ae,oe]=T(!1),se=x(l),[ce,R]=T(y);y!==ce&&(R(y),ee(null),j(y.length));let[le,ue]=T(f);f!==le&&(ue(f),ee(null),ne(null));let de=C(),z;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(z={anchorRef:S,contentRef:E,inputRef:D},t[10]=z):z=t[10];let fe=z,pe;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(pe=e=>{N(e),e||(ee(null),ne(null))},t[11]=pe):pe=t[11];let me=pe,he;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(he=()=>(ie(!0),()=>ie(!1)),t[12]=he):he=t[12];let ge=he,_e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(_e=()=>(oe(!0),()=>oe(!1)),t[13]=_e):_e=t[13];let ve=_e,ye;t[14]!==A||t[15]!==d||t[16]!==f||t[17]!==y?(ye=o({grammar:d,query:y,caretIndex:A,items:f}),t[14]=A,t[15]=d,t[16]=f,t[17]=y,t[18]=ye):ye=t[18];let B=ye,V;t[19]===A?V=t[20]:(V=function(e){let t=e.selectionStart??e.value.length;t!==A&&ee(null),j(t)},t[19]=A,t[20]=V);let H=V,be;t[21]!==h||t[22]!==H?(be=function(e){k.current=null,e.dispatchEvent(new Event(`input`,{bubbles:!0})),k.current!==e.value&&(R(e.value),h(e.value)),H(e),ee(null)},t[21]=h,t[22]=H,t[23]=be):be=t[23];let xe=be,U;t[24]===d?U=t[25]:(U=i(d),t[24]=d,t[25]=U);let Se=d.keys,W;t[26]!==d||t[27]!==y?(W=a(d,y),t[26]=d,t[27]=y,t[28]=W):W=t[28];let G=M&&re,Ce=`${de}-footer`,we=`${de}-empty`,K;t[29]!==h||t[30]!==H?(K=e=>{k.current=e.value,R(e.value),h(e.value),H(e),ee(null),ne(null),N(!0)},t[29]=h,t[30]=H,t[31]=K):K=t[31];let q;t[32]!==xe||t[33]!==B?(q=e=>{let t=D.current;if(t==null)return;t.setRangeText(e.insertText,B.replaceStart,B.replaceEnd,`end`);let n=B.replaceStart+e.insertText.length;t.setSelectionRange(n,n);let r=t.value.charAt(n);e.completes&&r!==` `&&r!==`,`&&(t.setRangeText(` `,n,n,`end`),t.setSelectionRange(n+1,n+1)),xe(t),t.focus()},t[32]=xe,t[33]=B,t[34]=q):q=t[34];let J;t[35]===h?J=t[36]:(J=()=>{h(``),D.current?.focus()},t[35]=h,t[36]=J);let Te;t[37]!==F||t[38]!==d.keys||t[39]!==ae||t[40]!==L||t[41]!==de||t[42]!==B||t[43]!==H||t[44]!==W||t[45]!==G||t[46]!==Ce||t[47]!==we||t[48]!==K||t[49]!==q||t[50]!==J||t[51]!==U||t[52]!==y?(Te={value:y,syntax:U,keys:Se,suggestions:B,segments:W,isListboxOpen:G,setIsOpen:me,activeIndex:F,setActiveIndex:ee,hoveredIndex:L,setHoveredIndex:ne,listboxId:de,footerId:Ce,emptyStateId:we,syncCaret:H,reportTypedValue:K,acceptSuggestion:q,clearValue:J,registerContent:ge,hasList:ae,registerList:ve},t[37]=F,t[38]=d.keys,t[39]=ae,t[40]=L,t[41]=de,t[42]=B,t[43]=H,t[44]=W,t[45]=G,t[46]=Ce,t[47]=we,t[48]=K,t[49]=q,t[50]=J,t[51]=U,t[52]=y,t[53]=Te):Te=t[53];let Ee=Te,De=b?m:`div`,Oe=Ee.isListboxOpen,ke;t[54]===u?ke=t[55]:(ke=r(u,`query`),t[54]=u,t[55]=ke);let Y;t[56]===c?Y=t[57]:(Y=n(`flex w-full items-center gap-2`,c),t[56]=c,t[57]=Y);let X;t[58]===se?X=t[59]:(X=se==null?{}:te,t[58]=se,t[59]=X);let Z;t[60]!==De||t[61]!==s||t[62]!==g||t[63]!==ke||t[64]!==Y||t[65]!==X?(Z=/* @__PURE__ */ O(De,{"data-slot":ke,className:Y,...g,...X,children:s}),t[60]=De,t[61]=s,t[62]=g,t[63]=ke,t[64]=Y,t[65]=X,t[66]=Z):Z=t[66];let Q;t[67]!==Ee.isListboxOpen||t[68]!==Z?(Q=/* @__PURE__ */ O(p.Root,{open:Oe,onOpenChange:me,children:Z}),t[67]=Ee.isListboxOpen,t[68]=Z,t[69]=Q):Q=t[69];let $;return t[70]!==Ee||t[71]!==Q?($=/* @__PURE__ */ O(I.Provider,{value:fe,children:/* @__PURE__ */ O(P.Provider,{value:Ee,children:Q})}),t[70]=Ee,t[71]=Q,t[72]=$):$=t[72],$}function ie(e){let i=_(112),a,o,s,c,f,m,h,g,v,y,b,C,T,E,D,A,M,N,P,F,I,te,re;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],f=i[5],m=i[6],h=i[7],g=i[8],v=i[9],y=i[10],b=i[11],C=i[12],T=i[13],E=i[14],D=i[15],A=i[16],M=i[17],N=i[18],P=i[19],F=i[20],I=i[21],te=i[22],re=i[23]):({"aria-describedby":c,"aria-errormessage":m,"aria-invalid":g,"data-slot":s,children:a,className:o,clearLabel:te,disabled:f,id:h,name:v,onBlur:y,onClear:b,onClick:C,onFocus:T,onKeyDown:E,onScroll:D,onSelect:A,placeholder:M,readOnly:P,ref:F,style:I,suggestOnFocus:re,...N}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=f,i[6]=m,i[7]=h,i[8]=g,i[9]=v,i[10]=y,i[11]=b,i[12]=C,i[13]=T,i[14]=E,i[15]=D,i[16]=A,i[17]=M,i[18]=N,i[19]=P,i[20]=F,i[21]=I,i[22]=te,i[23]=re);let ie=te===void 0?`Clear filter`:te,ce=re===void 0||re,R=L(`Query.Input`),{anchorRef:le,contentRef:ue,inputRef:de}=ee(`Query.Input`),z=x(l),fe=w(null),pe=t(F,de),me=z?z[`aria-describedby`]:c,he=R.suggestions.items.length===0,ge=R.isListboxOpen&&he?R.emptyStateId:void 0,_e=R.isListboxOpen?R.footerId:void 0,ve;i[24]!==me||i[25]!==ge||i[26]!==_e?(ve=[me,ge,_e].filter(oe),i[24]=me,i[25]=ge,i[26]=_e,i[27]=ve):ve=i[27];let ye=ve.join(` `),B=!f&&!P,V=B&&R.value!==``,{setIsOpen:H}=R,be,xe;i[28]!==B||i[29]!==H?(be=()=>{B||H(!1)},xe=[B,H],i[28]=B,i[29]=H,i[30]=be,i[31]=xe):(be=i[30],xe=i[31]),S(be,xe);let U;i[32]!==B||i[33]!==R||i[34]!==E?(U=function(e){if(E?.(e),e.defaultPrevented||!B||e.nativeEvent.isComposing)return;if(e.key===`Escape`){R.setIsOpen(!1);return}let t=R.suggestions.items.length;if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(t===0){R.setIsOpen(!0);return}e.preventDefault(),R.setIsOpen(!0),R.setHoveredIndex(null);let n=t-1;e.key===`ArrowDown`?R.setActiveIndex(e=>e==null||e===n?0:e+1):R.setActiveIndex(e=>e==null||e===0?n:e-1)}else if(e.key===`Enter`&&R.isListboxOpen){let t=!R.hasList||R.activeIndex==null?void 0:R.suggestions.items[R.activeIndex];if(t!=null){e.preventDefault(),R.acceptSuggestion(t);return}R.setIsOpen(!1)}},i[32]=B,i[33]=R,i[34]=E,i[35]=U):U=i[35];let Se=U,W;i[36]===s?W=i[37]:(W=r(s,`query-input`),i[36]=s,i[37]=W);let G;i[38]===o?G=i[39]:(G=n(`min-w-0 flex-1`,o),i[38]=o,i[39]=G);let Ce=z?z[`aria-invalid`]:g,we=z?z.name:v,K;i[40]===Symbol.for(`react.memo_cache_sentinel`)?(K=/* @__PURE__ */ O(j,{"aria-hidden":!0}),i[40]=K):K=i[40];let q;i[41]===R.segments?q=i[42]:(q=R.segments.map(ae),i[41]=R.segments,i[42]=q);let J;i[43]===q?J=i[44]:(J=/* @__PURE__ */ O(`div`,{"aria-hidden":!0,translate:`no`,ref:fe,className:`pointer-events-none absolute inset-x-0 -inset-y-2 flex items-center overflow-hidden`,children:/* @__PURE__ */ O(`span`,{className:`whitespace-pre`,children:q})}),i[43]=q,i[44]=J);let Te=z?z.id:h,Ee=R.hasList?R.listboxId:void 0,De;i[45]!==R.activeIndex||i[46]!==R.hasList||i[47]!==R.isListboxOpen||i[48]!==R.listboxId?(De=R.isListboxOpen&&R.hasList&&R.activeIndex!=null?ne(R.listboxId,R.activeIndex):void 0,i[45]=R.activeIndex,i[46]=R.hasList,i[47]=R.isListboxOpen,i[48]=R.listboxId,i[49]=De):De=i[49];let Oe=ye===``?void 0:ye,ke=z?z[`aria-errormessage`]:m,Y;i[50]===R?Y=i[51]:(Y=e=>R.reportTypedValue(e.target),i[50]=R,i[51]=Y);let X;i[52]!==R||i[53]!==A?(X=e=>{A?.(e),R.syncCaret(e.currentTarget)},i[52]=R,i[53]=A,i[54]=X):X=i[54];let Z;i[55]!==B||i[56]!==R||i[57]!==T||i[58]!==ce?(Z=e=>{T?.(e),R.setIsOpen(ce&&B)},i[55]=B,i[56]=R,i[57]=T,i[58]=ce,i[59]=Z):Z=i[59];let Q;i[60]!==B||i[61]!==R||i[62]!==C?(Q=e=>{C?.(e),R.setIsOpen(B)},i[60]=B,i[61]=R,i[62]=C,i[63]=Q):Q=i[63];let $;i[64]!==ue||i[65]!==R||i[66]!==y?($=e=>{y?.(e);let t=e.relatedTarget;e.defaultPrevented||ue.current?.contains(t)===!0||R.setIsOpen(!1)},i[64]=ue,i[65]=R,i[66]=y,i[67]=$):$=i[67];let Ae;i[68]===D?Ae=i[69]:(Ae=e=>{D?.(e);let t=fe.current;t!=null&&(t.scrollLeft=e.currentTarget.scrollLeft)},i[68]=D,i[69]=Ae);let je;i[70]!==pe||i[71]!==R.isListboxOpen||i[72]!==R.value||i[73]!==Se||i[74]!==Te||i[75]!==Ee||i[76]!==De||i[77]!==Oe||i[78]!==ke||i[79]!==Y||i[80]!==X||i[81]!==Z||i[82]!==Q||i[83]!==$||i[84]!==Ae?(je=/* @__PURE__ */ O(u,{ref:pe,id:Te,role:`combobox`,"aria-autocomplete":`list`,"aria-controls":Ee,"aria-expanded":R.isListboxOpen,"aria-activedescendant":De,"aria-describedby":Oe,"aria-errormessage":ke,className:`caret-(--text-color-strong) text-transparent`,value:R.value,onChange:Y,onSelect:X,onFocus:Z,onClick:Q,onBlur:$,onKeyDown:Se,onScroll:Ae}),i[70]=pe,i[71]=R.isListboxOpen,i[72]=R.value,i[73]=Se,i[74]=Te,i[75]=Ee,i[76]=De,i[77]=Oe,i[78]=ke,i[79]=Y,i[80]=X,i[81]=Z,i[82]=Q,i[83]=$,i[84]=Ae,i[85]=je):je=i[85];let Me;i[86]!==J||i[87]!==je?(Me=/* @__PURE__ */ k(`div`,{className:`relative flex min-w-0 flex-1 self-stretch`,children:[J,je]}),i[86]=J,i[87]=je,i[88]=Me):Me=i[88];let Ne;i[89]===a?Ne=i[90]:(Ne=a!=null&&/* @__PURE__ */ O(`span`,{"data-slot":`query-input-actions`,className:`contents`,children:a}),i[89]=a,i[90]=Ne);let Pe;i[91]!==V||i[92]!==ie||i[93]!==R||i[94]!==b?(Pe=V&&/* @__PURE__ */ O(se,{label:ie,onClear:()=>{R.clearValue(),b?.()}}),i[91]=V,i[92]=ie,i[93]=R,i[94]=b,i[95]=Pe):Pe=i[95];let Fe;i[96]!==f||i[97]!==M||i[98]!==N||i[99]!==P||i[100]!==Ce||i[101]!==we||i[102]!==Me||i[103]!==Ne||i[104]!==Pe?(Fe=/* @__PURE__ */ k(d,{autoCapitalize:`off`,...N,"aria-invalid":Ce,autoComplete:`off`,disabled:f,name:we,placeholder:M,readOnly:P,className:`has-[>button:last-child]:pe-1.25 has-[>[data-slot=query-input-actions]:last-child>button:last-child]:pe-1.25`,children:[K,Me,Ne,Pe]}),i[96]=f,i[97]=M,i[98]=N,i[99]=P,i[100]=Ce,i[101]=we,i[102]=Me,i[103]=Ne,i[104]=Pe,i[105]=Fe):Fe=i[105];let Ie;return i[106]!==le||i[107]!==I||i[108]!==G||i[109]!==Fe||i[110]!==W?(Ie=/* @__PURE__ */ O(p.Anchor,{ref:le,"data-slot":W,className:G,style:I,children:Fe}),i[106]=le,i[107]=I,i[108]=G,i[109]=Fe,i[110]=W,i[111]=Ie):Ie=i[111],Ie}function ae(e){return/* @__PURE__ */ O(`span`,{className:N[e.kind],children:e.text},e.start)}function oe(e){return e!=null&&e!==``}function se(e){let t=_(9),{label:n,onClear:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=/* @__PURE__ */ O(A,{}),t[0]=i):i=t[0];let a;t[1]!==n||t[2]!==r?(a=/* @__PURE__ */ O(g.Trigger,{asChild:!0,children:/* @__PURE__ */ O(s,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`xs`,label:n,icon:i,onMouseDown:ce,onClick:r})}),t[1]=n,t[2]=r,t[3]=a):a=t[3];let o;t[4]===n?o=t[5]:(o=/* @__PURE__ */ O(g.Content,{children:n}),t[4]=n,t[5]=o);let c;return t[6]!==a||t[7]!==o?(c=/* @__PURE__ */ O(h,{children:/* @__PURE__ */ k(g.Root,{children:[a,o]})}),t[6]=a,t[7]=o,t[8]=c):c=t[8],c}function ce(e){return e.preventDefault()}function R(i){let a=_(21),o,s,c,l,u;a[0]===i?(o=a[1],s=a[2],c=a[3],l=a[4],u=a[5]):({"data-slot":c,children:o,className:s,ref:u,...l}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=l,a[5]=u);let d=L(`Query.Content`),{anchorRef:f,contentRef:m}=ee(`Query.Content`),h=t(u,m),{registerContent:g}=d,v;a[6]===g?v=a[7]:(v=[g],a[6]=g,a[7]=v),e(g,v);let y;a[8]===c?y=a[9]:(y=r(c,`query-content`),a[8]=c,a[9]=y);let b;a[10]===s?b=a[11]:(b=n(`w-(--radix-popover-trigger-width) p-1`,s),a[10]=s,a[11]=b);let x;a[12]===f?x=a[13]:(x=e=>{let t=e.detail.originalEvent.target;t instanceof Node&&(!t.isConnected||f.current?.contains(t)===!0)&&e.preventDefault()},a[12]=f,a[13]=x);let S;return a[14]!==o||a[15]!==h||a[16]!==l||a[17]!==y||a[18]!==b||a[19]!==x?(S=/* @__PURE__ */ O(p.Content,{...l,ref:h,"data-slot":y,align:`start`,className:b,preferredWidth:`max-w-none`,role:`presentation`,onOpenAutoFocus:ue,onCloseAutoFocus:le,onInteractOutside:x,children:o}),a[14]=o,a[15]=h,a[16]=l,a[17]=y,a[18]=b,a[19]=x,a[20]=S):S=a[20],S}function le(e){return e.preventDefault()}function ue(e){return e.preventDefault()}function de(t){let i=_(18),a,o,s,c;i[0]===t?(a=i[1],o=i[2],s=i[3],c=i[4]):({"data-slot":s,children:a,className:o,...c}=t,i[0]=t,i[1]=a,i[2]=o,i[3]=s,i[4]=c);let l=L(`Query.List`),{registerList:u}=l,d;i[5]===u?d=i[6]:(d=[u],i[5]=u,i[6]=d),e(u,d);let f;if(i[7]!==a||i[8]!==o||i[9]!==l.listboxId||i[10]!==l.suggestions.items||i[11]!==s||i[12]!==c){let e=/* @__PURE__ */ new Map;for(let[t,n]of l.suggestions.items.entries()){let r=e.get(n.section)??[];r.push({suggestion:n,index:t}),e.set(n.section,r)}let t=l.listboxId,u;i[14]===s?u=i[15]:(u=r(s,`query-list`),i[14]=s,i[15]=u);let d;i[16]===o?d=i[17]:(d=n(`max-h-72 overflow-y-auto`,o),i[16]=o,i[17]=d),f=/* @__PURE__ */ O(`div`,{role:`listbox`,"aria-label":`Filter suggestions`,...c,id:t,"data-slot":u,className:d,children:[...e].map(e=>{let[t,n]=e;return/* @__PURE__ */ k(`div`,{role:`group`,"aria-label":M[t],children:[/* @__PURE__ */ O(`span`,{"aria-hidden":!0,className:`text-muted block px-2 pt-2 pb-1 text-xs font-medium`,children:M[t]}),n.map(e=>{let{suggestion:t,index:n}=e;return/* @__PURE__ */ O(F.Provider,{value:n,children:a(t)},t.label)})]},t)})}),i[7]=a,i[8]=o,i[9]=l.listboxId,i[10]=l.suggestions.items,i[11]=s,i[12]=c,i[13]=f}else f=i[13];return f}function z(e){e?.scrollIntoView({block:`nearest`})}function fe(e){let i=_(47),a,o,s,c,l,u,d,f,p,m;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],d=i[7],f=i[8],p=i[9],m=i[10]):({"data-slot":s,children:a,className:o,onClick:c,onMouseDown:l,onMouseLeave:u,onMouseMove:d,ref:p,suggestion:m,...f}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u,i[7]=d,i[8]=f,i[9]=p,i[10]=m);let h=L(`Query.Item`),g=x(F);E(g!=null&&h.suggestions.items[g]===m,`Query.Item takes a suggestion from the Query.List render function.`);let v=g===h.activeIndex,y=t(p,v?z:null),b=v||h.activeIndex==null&&g===h.hoveredIndex,S;i[11]!==h.listboxId||i[12]!==g?(S=ne(h.listboxId,g),i[11]=h.listboxId,i[12]=g,i[13]=S):S=i[13];let C=b?``:void 0,w;i[14]===s?w=i[15]:(w=r(s,`query-item`),i[14]=s,i[15]=w);let T;i[16]===o?T=i[17]:(T=n(`data-highlighted:bg-accent-500/10 flex cursor-pointer flex-wrap items-baseline gap-x-2 gap-y-0.5 rounded px-2 py-1.5 text-sm`,o),i[16]=o,i[17]=T);let A;i[18]===l?A=i[19]:(A=e=>{l?.(e),e.preventDefault()},i[18]=l,i[19]=A);let j;i[20]!==h||i[21]!==g||i[22]!==d?(j=e=>{d?.(e),e.defaultPrevented||h.setHoveredIndex(g)},i[20]=h,i[21]=g,i[22]=d,i[23]=j):j=i[23];let M;i[24]!==h||i[25]!==u?(M=e=>{u?.(e),e.defaultPrevented||h.setHoveredIndex(null)},i[24]=h,i[25]=u,i[26]=M):M=i[26];let N;i[27]!==h||i[28]!==c||i[29]!==m?(N=e=>{c?.(e),e.defaultPrevented||h.acceptSuggestion(m)},i[27]=h,i[28]=c,i[29]=m,i[30]=N):N=i[30];let P;i[31]!==a||i[32]!==m?(P=a??/* @__PURE__ */ k(D,{children:[/* @__PURE__ */ O(`span`,{translate:`no`,className:`text-strong font-mono`,children:m.label}),m.description!=null&&/* @__PURE__ */ O(`span`,{className:`text-muted text-xs`,children:m.description}),m.matchCount!=null&&/* @__PURE__ */ O(`span`,{className:`text-muted ml-auto text-xs tabular-nums`,children:m.matchCount})]}),i[31]=a,i[32]=m,i[33]=P):P=i[33];let I;return i[34]!==y||i[35]!==v||i[36]!==f||i[37]!==S||i[38]!==C||i[39]!==w||i[40]!==T||i[41]!==A||i[42]!==j||i[43]!==M||i[44]!==N||i[45]!==P?(I=/* @__PURE__ */ O(`div`,{...f,ref:y,role:`option`,id:S,tabIndex:-1,"aria-selected":v,"data-highlighted":C,"data-slot":w,className:T,onMouseDown:A,onMouseMove:j,onMouseLeave:M,onClick:N,children:P}),i[34]=y,i[35]=v,i[36]=f,i[37]=S,i[38]=C,i[39]=w,i[40]=T,i[41]=A,i[42]=j,i[43]=M,i[44]=N,i[45]=P,i[46]=I):I=i[46],I}function pe(e){let t=_(20),i,a,o,s;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4]):({"data-slot":o,children:i,className:a,...s}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s);let c=L(`Query.Empty`);if(c.suggestions.items.length>0)return null;let l=c.emptyStateId,u;t[5]===o?u=t[6]:(u=r(o,`query-empty`),t[5]=o,t[6]=u);let d;t[7]===a?d=t[8]:(d=n(`text-body px-2 py-3 text-sm`,a),t[7]=a,t[8]=d);let f;t[9]!==i||t[10]!==c.keys||t[11]!==c.suggestions.key||t[12]!==c.syntax?(f=i??/* @__PURE__ */ O(me,{keys:c.keys,syntax:c.syntax,valueKey:c.suggestions.key}),t[9]=i,t[10]=c.keys,t[11]=c.suggestions.key,t[12]=c.syntax,t[13]=f):f=t[13];let p;return t[14]!==c.emptyStateId||t[15]!==s||t[16]!==u||t[17]!==d||t[18]!==f?(p=/* @__PURE__ */ O(`div`,{...s,id:l,"data-slot":u,className:d,children:f}),t[14]=c.emptyStateId,t[15]=s,t[16]=u,t[17]=d,t[18]=f,t[19]=p):p=t[19],p}function me(e){let t=_(16),{keys:n,syntax:r,valueKey:i}=e,a;if(t[0]!==n||t[1]!==i){let e;t[3]===i?e=t[4]:(e=e=>e.key===i,t[3]=i,t[4]=e),a=n.find(e),t[0]=n,t[1]=i,t[2]=a}else a=t[2];let o=a;if(o==null&&r===`conjunction`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=/* @__PURE__ */ O(`p`,{children:`No filter matches. This search reads only key:value filters.`},`qualifiers-only`),t[5]=e):e=t[5],e}if(o==null){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=/* @__PURE__ */ O(`p`,{children:`No filter matches. The words search as text.`},`text`),t[6]=e):e=t[6],e}if(o.values==null){let e=`${o.key}:`,n=o.description==null?`Any text matches.`:`${o.description}. Any text matches.`,r;return t[7]!==e||t[8]!==n?(r=/* @__PURE__ */ O(`p`,{children:/* @__PURE__ */ O(V,{token:e,children:n})},`free-value`),t[7]=e,t[8]=n,t[9]=r):r=t[9],r}let s;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(s=/* @__PURE__ */ O(`span`,{children:`No value matches. Delete the value after`}),t[10]=s):s=t[10];let l;t[11]===o.key?l=t[12]:(l=/* @__PURE__ */ k(c,{className:`text-xs`,children:[o.key,`:`]}),t[11]=o.key,t[12]=l);let u;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(u=/* @__PURE__ */ O(`span`,{children:`to see all values.`}),t[13]=u):u=t[13];let d;return t[14]===l?d=t[15]:(d=/* @__PURE__ */ k(`p`,{children:[s,` `,l,` `,u]},`listed-value`),t[14]=l,t[15]=d),d}function he(e){let t=_(21),i,a,o,s,c;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4],c=t[5]):({"data-slot":o,asChild:c,children:i,className:a,...s}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=c);let l=c!==void 0&&c,u=L(`Query.Footer`),d=l?m:`div`,f=u.footerId,p;t[6]===o?p=t[7]:(p=r(o,`query-footer`),t[6]=o,t[7]=p);let h;t[8]===a?h=t[9]:(h=n(`text-muted border-popover -mx-1 -mb-1 mt-1 flex flex-col gap-2 border-t px-3 py-2 text-xs`,a),t[8]=a,t[9]=h);let g;t[10]!==l||t[11]!==i||t[12]!==u.footerId?(g=l&&b(i)?v(i,{id:u.footerId}):i,t[10]=l,t[11]=i,t[12]=u.footerId,t[13]=g):g=t[13];let y;return t[14]!==d||t[15]!==u.footerId||t[16]!==s||t[17]!==p||t[18]!==h||t[19]!==g?(y=/* @__PURE__ */ O(d,{...s,id:f,"data-slot":p,className:h,children:g}),t[14]=d,t[15]=u.footerId,t[16]=s,t[17]=p,t[18]=h,t[19]=g,t[20]=y):y=t[20],y}function ge(e){let t=_(32),i,a,o;t[0]===e?(i=t[1],a=t[2],o=t[3]):({"data-slot":a,className:i,...o}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o);let{keys:s,syntax:c}=L(`Query.Legend`),l;t[4]===i?l=t[5]:(l=n(`flex flex-wrap items-center gap-x-4 gap-y-1.5`,i),t[4]=i,t[5]=l);let u=l,d;t[6]===a?d=t[7]:(d=r(a,`query-legend`),t[6]=a,t[7]=d);let f=d;if(c===`qualifiers`){let e;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=/* @__PURE__ */ O(V,{token:`key:value`,children:`narrows the search`}),t[8]=e):e=t[8];let n;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(n=/* @__PURE__ */ O(`span`,{children:`Other words search as text.`}),t[9]=n):n=t[9];let r;return t[10]!==o||t[11]!==u||t[12]!==f?(r=/* @__PURE__ */ k(`p`,{...o,"data-slot":f,className:u,children:[e,` `,n]}),t[10]=o,t[11]=u,t[12]=f,t[13]=r):r=t[13],r}let p;t[14]===s?p=t[15]:(p=s.some(ye),t[14]=s,t[15]=p);let m=p,h;t[16]===m?h=t[17]:(h=m&&{token:`-key:value`,text:`excludes`},t[16]=m,t[17]=h);let g;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(g={token:`key:a,b`,text:`matches either`},t[18]=g):g=t[18];let v;t[19]===c?v=t[20]:(v=c===`full`&&{token:`OR`,text:`joins filters`},t[19]=c,t[20]=v);let y;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(y={token:`"quotes"`,text:`keep spaces`},t[21]=y):y=t[21];let b;t[22]!==h||t[23]!==v?(b=[h,g,v,y].filter(ve),t[22]=h,t[23]=v,t[24]=b):b=t[24];let x=b,S;t[25]===x?S=t[26]:(S=x.map(_e),t[25]=x,t[26]=S);let C;return t[27]!==o||t[28]!==u||t[29]!==f||t[30]!==S?(C=/* @__PURE__ */ O(`p`,{...o,"data-slot":f,className:u,children:S}),t[27]=o,t[28]=u,t[29]=f,t[30]=S,t[31]=C):C=t[31],C}function _e(e){return/* @__PURE__ */ k(`span`,{className:`contents`,children:[/* @__PURE__ */ O(V,{token:e.token,children:e.text}),` `]},e.token)}function ve(e){return e!==!1}function ye(e){return e.negatable!==!1}function B(e){let t=_(22),i,a,o,s;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4]):({"data-slot":a,className:i,enterHint:s,...o}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s);let c=s===void 0?`select`:s;L(`Query.KeyboardHints`);let l;t[5]===a?l=t[6]:(l=r(a,`query-keyboard-hints`),t[5]=a,t[6]=l);let u;t[7]===i?u=t[8]:(u=n(`flex flex-wrap items-center gap-x-4 gap-y-1.5`,i),t[7]=i,t[8]=u);let d;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=/* @__PURE__ */ k(f,{children:[/* @__PURE__ */ O(`span`,{className:`sr-only`,children:`Up arrow`}),/* @__PURE__ */ O(`span`,{"aria-hidden":!0,children:`↑`})]}),t[9]=d):d=t[9];let p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=/* @__PURE__ */ k(f,{children:[/* @__PURE__ */ O(`span`,{className:`sr-only`,children:`Down arrow`}),/* @__PURE__ */ O(`span`,{"aria-hidden":!0,children:`↓`})]}),t[10]=p):p=t[10];let m;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(m=/* @__PURE__ */ k(`span`,{className:`inline-flex items-center gap-1`,children:[d,p,` `,/* @__PURE__ */ O(`span`,{children:`pick a suggestion`})]}),t[11]=m):m=t[11];let h;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(h=/* @__PURE__ */ k(f,{children:[/* @__PURE__ */ O(`span`,{className:`sr-only`,children:`Enter`}),/* @__PURE__ */ O(`span`,{"aria-hidden":!0,children:`↵`})]}),t[12]=h):h=t[12];let g;t[13]===c?g=t[14]:(g=/* @__PURE__ */ k(`span`,{className:`inline-flex items-center gap-1`,children:[h,` `,/* @__PURE__ */ O(`span`,{children:c})]}),t[13]=c,t[14]=g);let v;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(v=/* @__PURE__ */ O(f,{className:`w-auto px-1`,children:`esc`}),t[15]=v):v=t[15];let y;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(y=/* @__PURE__ */ k(`span`,{className:`inline-flex items-center gap-1`,children:[v,` `,/* @__PURE__ */ O(`span`,{children:`close`})]}),t[16]=y):y=t[16];let b;return t[17]!==o||t[18]!==l||t[19]!==u||t[20]!==g?(b=/* @__PURE__ */ k(`p`,{...o,"data-slot":l,className:u,children:[m,` `,g,` `,y]}),t[17]=o,t[18]=l,t[19]=u,t[20]=g,t[21]=b):b=t[21],b}function V(e){let t=_(7),{token:n,children:r}=e,i;t[0]===n?i=t[1]:(i=/* @__PURE__ */ O(c,{className:`text-xs`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=/* @__PURE__ */ O(`span`,{children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=/* @__PURE__ */ k(`span`,{className:`inline-flex items-center gap-1.5`,children:[i,` `,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}const H={Root:re,Input:ie,Content:R,List:de,Item:fe,Empty:pe,Footer:he,Legend:ge,KeyboardHints:B};export{H as Query};
|
|
1
|
+
export*as Query from"./query-parts.js";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode, Ref } from "react";
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the radio group root that `RadioGroup` and `SegmentedControl`
|
|
5
|
+
* share.
|
|
6
|
+
*/
|
|
7
|
+
type RootProps = Omit<ComponentProps<"div">, "defaultValue" | "ref"> & {
|
|
8
|
+
/** The checked value. Pair it with `onValueChange`. */
|
|
9
|
+
value?: string;
|
|
10
|
+
/** The checked value on first render, for an uncontrolled group. A form reset returns to it. */
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
/** The event handler called with the value of the item that the user checks. */
|
|
13
|
+
onValueChange?: (value: string) => void;
|
|
14
|
+
/** Whether every item is disabled. */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** The form field name. With a name, a form submits the checked value. */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** The `id` of the form the radios belong to, when the group sits outside it. Needs a `name`. */
|
|
19
|
+
form?: string;
|
|
20
|
+
/** Whether a form submits only when an item is checked. Needs a `name`. */
|
|
21
|
+
required?: boolean;
|
|
22
|
+
ref?: Ref<HTMLElement>;
|
|
23
|
+
} & WithDataSlot;
|
|
24
|
+
/**
|
|
25
|
+
* The props of a radio item that `RadioGroup` and `SegmentedControl` share.
|
|
26
|
+
* `id`, `autoFocus`, `aria-label`, `aria-labelledby`, `aria-describedby`,
|
|
27
|
+
* `aria-invalid`, and `aria-errormessage` go to the native radio. The rest go
|
|
28
|
+
* to the item's `<div>`.
|
|
29
|
+
*/
|
|
30
|
+
type ItemProps = Omit<ComponentProps<"div">, "children"> & {
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
/** Whether this item is disabled. */
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
/** The value the group takes when the user checks this item. */
|
|
35
|
+
value: string;
|
|
36
|
+
/** Focus this item's radio on mount. */
|
|
37
|
+
autoFocus?: boolean;
|
|
38
|
+
} & WithDataSlot;
|
|
39
|
+
export { RootProps as n, ItemProps as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{createContext as e}from"react";const t=e(null);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{createContext as e,useContext as t,useEffect as n,useId as r,useMemo as i,useRef as a}from"react";import o from"tiny-invariant";import{t as s}from"./behaviors-DkCIgQ8w.js";import{t as c}from"./hooks-C9b-2wGy.js";import{t as l}from"./compose-refs-Ce1vWUz0.js";import{n as u}from"./cx-CfAFHj5_.js";import{t as d}from"./utils-EM6s2WEU.js";import{n as f}from"./utils-CPSttKPD.js";import{t as p}from"./field-BwCq1b9R.js";import{t as m}from"./radio-group-BliblUqe.js";import{jsx as h,jsxs as g}from"react/jsx-runtime";const _=e(null);function v(){return t(_)?.radio.value}const y=({children:e,defaultValue:t,disabled:o,form:u,name:d,onKeyDown:f,onValueChange:p,ref:m,required:g=!1,value:v,...y})=>{let x=s({name:d,value:v,defaultValue:t,onValueChange:p,disabled:o}),S=r(),C=a(null),w=l(m,C),T=e=>{for(let t of C.current?.querySelectorAll(`input`)??[])t.type===`radio`&&t.name===x.name&&e(t)},E=c(()=>T(e=>{e.defaultChecked=e.checked})),D=c(()=>{x.setValue(t);let e=v===void 0?t:v;T(t=>{t.checked=t.value===e})});n(()=>{let e=C.current,t=u==null?e?.closest(`form`):e?.ownerDocument.getElementById(u),n,r=e=>{E(),n=window.setTimeout(()=>{e.defaultPrevented||D()})};return t?.addEventListener(`reset`,r),()=>{t?.removeEventListener(`reset`,r),window.clearTimeout(n)}},[D,u,E]);let O=i(()=>({radio:x,form:d?u:`${S}-no-form`,required:g}),[x,d,u,S,g]);return/* @__PURE__ */ h(_.Provider,{value:O,children:/* @__PURE__ */ h(`div`,{role:`radiogroup`,...y,onKeyDown:e=>{f?.(e);let t=e.target;if(e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey||!(t instanceof HTMLInputElement)||t.type!==`radio`)return;let n=b({radio:t,key:e.key,group:e.currentTarget});n!=null&&(e.preventDefault(),n.focus(),n.click())},ref:w,children:e})})};function b({radio:e,key:t,group:n}){let r=getComputedStyle(e).direction===`rtl`,i=t===`ArrowDown`||t===(r?`ArrowLeft`:`ArrowRight`);if(!i&&t!==`ArrowUp`&&t!==(r?`ArrowRight`:`ArrowLeft`))return null;let a=Array.from(n.querySelectorAll(`input[type=radio]:enabled`)).filter(t=>t.name===e.name),o=a.indexOf(e);return o===-1?null:a.at((o+(i?1:-1))%a.length)??null}function x(e){let t=e.filter(e=>e!=null&&e!==``);return t.length>0?t.join(` `):void 0}const S=({"aria-describedby":e,"aria-errormessage":n,"aria-invalid":s,"aria-label":c,"aria-labelledby":l,autoFocus:v,children:y,className:b,"data-slot":S,disabled:C=!1,id:w,onClick:T,part:E,value:D,...O})=>{let k=t(_);o(k,`A radio item must be rendered inside a radio group root.`);let A=t(p),j=r(),M=w??j,N=`${j}-title`,P=`${j}-description`,F=`${j}-content`,I=a(null),L=a(!1),{checked:R,disabled:z,onChange:B,...V}=k.radio.getRadioProps({value:D,disabled:C}),H=i(()=>({titleId:N,descriptionId:P,radioId:M,contentId:F,checked:R,disabled:z}),[N,P,M,F,R,z]);return/* @__PURE__ */ h(m.Provider,{value:H,children:/* @__PURE__ */ g(`div`,{"data-slot":d(S,E),className:u(`relative isolate`,b),...O,onClick:e=>{if(L.current)return;T?.(e);let t=I.current;t!=null&&(e.target===t?e.detail>0&&!e.defaultPrevented&&t.focus({preventScroll:!0}):e.defaultPrevented||f(e.target,e.currentTarget)||(t.focus({preventScroll:!0}),L.current=!0,t.click(),L.current=!1))},children:[/* @__PURE__ */ h(`input`,{"aria-describedby":x([A?.[`aria-describedby`],e,P]),"aria-errormessage":A?.[`aria-errormessage`]??n,"aria-invalid":A?.[`aria-invalid`]??s,"aria-label":c,"aria-labelledby":l??(c==null?F:void 0),autoFocus:v,...V,checked:R,onChange:B,className:`absolute inset-0 z-1 m-0 size-full cursor-inherit opacity-0 disabled:pointer-events-none`,disabled:z,form:k.form,id:M,ref:e=>{if(I.current=e,e==null)return;e.checked&&!R&&B(),e.getAttribute(`aria-labelledby`)===F&&Array.from(e.parentElement?.getElementsByTagName(`label`)??[]).some(e=>e.htmlFor===M)&&e.removeAttribute(`aria-labelledby`);let t=e.nextElementSibling;Array.from(t?.querySelectorAll(`a[href], button, details, input, select, textarea, label, [role="button"], [role="link"], [role="menuitem"], [tabindex]:not([tabindex="-1"]), [contenteditable="true"]`)??[]).some(e=>!(e instanceof HTMLLabelElement&&e.htmlFor===M))?t?.removeAttribute(`aria-hidden`):t?.setAttribute(`aria-hidden`,`true`)},required:k.required}),/* @__PURE__ */ h(`div`,{id:F,"data-slot":`${E}-label`,className:`covered-item-content contents`,children:y})]})})};export{y as n,v as r,S as t};
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parts of the `RadioGroup` 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 { n as WithAsChild } from "./as-child-DFxX3U2i.js";
|
|
7
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
8
|
+
import { n as RootProps, t as ItemProps } from "./radio-group-B9jtIbV1.js";
|
|
9
|
+
type RadioGroupProps = RootProps;
|
|
10
|
+
/**
|
|
11
|
+
* A group of radio items. It manages the state of the children radios. Unstyled and simple.
|
|
12
|
+
* Used as the root component for grouping related radio items where only one can be selected.
|
|
13
|
+
* Each item holds a native `<input type="radio">`, so the browser owns the one Tab
|
|
14
|
+
* stop, Space, and the form contract: `name`, `required`, `form`, and reset. The root moves the
|
|
15
|
+
* arrow keys, so they wrap at either end in every browser.
|
|
16
|
+
*
|
|
17
|
+
* The recommended Field composition is `Field.Set` + `Field.Legend` + `RadioGroup.Root`,
|
|
18
|
+
* which uses fieldset semantics so all radios share a single accessible name from the
|
|
19
|
+
* legend. As an alternative, when individual items render inside a `Field.Control`,
|
|
20
|
+
* each item picks up `aria-invalid`, `aria-errormessage`, and `aria-describedby` from
|
|
21
|
+
* `FieldControlContext`. Inside any item, a `Choice.Title` names the option through
|
|
22
|
+
* `aria-labelledby` and a `Choice.Description` describes it through `aria-describedby`.
|
|
23
|
+
*
|
|
24
|
+
* @see https://mantle.ngrok.com/components/forms/radio-group#radiogrouproot
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <RadioGroup.Root value={value} onValueChange={setValue}>
|
|
29
|
+
* <RadioGroup.Item value="option1">
|
|
30
|
+
* <RadioGroup.Indicator />
|
|
31
|
+
* <span>Option 1</span>
|
|
32
|
+
* </RadioGroup.Item>
|
|
33
|
+
* <RadioGroup.Item value="option2">
|
|
34
|
+
* <RadioGroup.Indicator />
|
|
35
|
+
* <span>Option 2</span>
|
|
36
|
+
* </RadioGroup.Item>
|
|
37
|
+
* </RadioGroup.Root>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
declare const Root: ({ "data-slot": dataSlot, ref, ...props }: RadioGroupProps) => import("react").JSX.Element;
|
|
41
|
+
type RadioItemProps = ItemProps;
|
|
42
|
+
/**
|
|
43
|
+
* A simple radio item that can be used inside a radio group. The "conventional" use-case.
|
|
44
|
+
* Must be a child of `RadioGroup`.
|
|
45
|
+
*
|
|
46
|
+
* It renders a `<div>` with a native radio that covers it. Style its state with
|
|
47
|
+
* `has-[>input:checked]:`, `has-[>input:disabled]:`, and
|
|
48
|
+
* `has-[>input:focus-visible]:`.
|
|
49
|
+
*
|
|
50
|
+
* When rendered inside `Field.Control` (an alternative to the recommended
|
|
51
|
+
* `Field.Set` / `Field.Legend` composition), picks up `aria-invalid`,
|
|
52
|
+
* `aria-errormessage`, and `aria-describedby` from `FieldControlContext`. A
|
|
53
|
+
* `Choice.Title` inside the item names it through `aria-labelledby`, and a
|
|
54
|
+
* `Choice.Description` describes it through `aria-describedby`. The option's
|
|
55
|
+
* accessible name is then the title alone.
|
|
56
|
+
*
|
|
57
|
+
* @see https://mantle.ngrok.com/components/forms/radio-group#radiogroupitem
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```tsx
|
|
61
|
+
* <RadioGroup.Root value={value} onValueChange={setValue}>
|
|
62
|
+
* <RadioGroup.Item value="option1">
|
|
63
|
+
* <RadioGroup.Indicator />
|
|
64
|
+
* <span>Option 1</span>
|
|
65
|
+
* </RadioGroup.Item>
|
|
66
|
+
* </RadioGroup.Root>
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
declare const Item: ({ className, ...props }: RadioItemProps) => import("react").JSX.Element;
|
|
70
|
+
/** The state of the radio item that a render-props `RadioGroup.Indicator` receives. */
|
|
71
|
+
type RadioIndicatorState = {
|
|
72
|
+
checked: boolean;
|
|
73
|
+
disabled: boolean;
|
|
74
|
+
};
|
|
75
|
+
type RadioIndicatorProps = Omit<ComponentProps<"span">, "children"> & {
|
|
76
|
+
children?: ReactNode | ((state: RadioIndicatorState) => ReactNode);
|
|
77
|
+
/**
|
|
78
|
+
* Never rendered. `Choice.Indicator` injects the field's `name` for a
|
|
79
|
+
* control, and a `<span>` has no `name` attribute.
|
|
80
|
+
*/
|
|
81
|
+
name?: string;
|
|
82
|
+
} & WithDataSlot;
|
|
83
|
+
/**
|
|
84
|
+
* The selection indicator for any radio item.
|
|
85
|
+
* Use it as a child of `RadioGroup.Item`, `RadioGroup.ListItem`, or `RadioGroup.Card`.
|
|
86
|
+
* By default, it's a circle that changes color when checked.
|
|
87
|
+
* You can customize the indicator by passing children:
|
|
88
|
+
* - a different component
|
|
89
|
+
* - a render-props function that receives `{ checked, disabled }` and returns a component.
|
|
90
|
+
* For hover and keyboard focus, style with `group-hover/radio:` and
|
|
91
|
+
* `group-has-[>input:focus-visible]/radio:`.
|
|
92
|
+
*
|
|
93
|
+
* @see https://mantle.ngrok.com/components/forms/radio-group#radiogroupindicator
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```tsx
|
|
97
|
+
* <RadioGroup.Item value="option1">
|
|
98
|
+
* <RadioGroup.Indicator />
|
|
99
|
+
* <span>Option 1</span>
|
|
100
|
+
* </RadioGroup.Item>
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
declare const Indicator: ({ "data-slot": dataSlot, children, className, name: _name, ...props }: RadioIndicatorProps) => import("react").JSX.Element;
|
|
104
|
+
/**
|
|
105
|
+
* A group of radio list items. Use RadioGroup.ListItem as direct children.
|
|
106
|
+
*
|
|
107
|
+
* @see https://mantle.ngrok.com/components/forms/radio-group#radiogrouplist
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```tsx
|
|
111
|
+
* <RadioGroup.Root defaultValue="option1">
|
|
112
|
+
* <RadioGroup.List>
|
|
113
|
+
* <RadioGroup.ListItem value="option1">
|
|
114
|
+
* <RadioGroup.ItemContent>
|
|
115
|
+
* <Text>Option 1</Text>
|
|
116
|
+
* </RadioGroup.ItemContent>
|
|
117
|
+
* </RadioGroup.ListItem>
|
|
118
|
+
* <RadioGroup.ListItem value="option2">
|
|
119
|
+
* <RadioGroup.ItemContent>
|
|
120
|
+
* <Text>Option 2</Text>
|
|
121
|
+
* </RadioGroup.ItemContent>
|
|
122
|
+
* </RadioGroup.ListItem>
|
|
123
|
+
* </RadioGroup.List>
|
|
124
|
+
* </RadioGroup.Root>
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
declare const List: ({ "data-slot": dataSlot, className, ref, ...props }: RadioGroupProps) => import("react").JSX.Element;
|
|
128
|
+
type RadioListItemProps = RadioItemProps & WithDataSlot;
|
|
129
|
+
/**
|
|
130
|
+
* A radio list item that is used inside a `RadioGroup.List`.
|
|
131
|
+
*
|
|
132
|
+
* It renders a `<div>` with a native radio that covers it. Style its state with
|
|
133
|
+
* `has-[>input:checked]:`, `has-[>input:disabled]:`, and
|
|
134
|
+
* `has-[>input:focus-visible]:`.
|
|
135
|
+
*
|
|
136
|
+
* When rendered inside `Field.Control` (an alternative to the recommended
|
|
137
|
+
* `Field.Set` / `Field.Legend` composition), picks up `aria-invalid`,
|
|
138
|
+
* `aria-errormessage`, and `aria-describedby` from `FieldControlContext`. A
|
|
139
|
+
* `Choice.Title` inside the item names it through `aria-labelledby`, and a
|
|
140
|
+
* `Choice.Description` describes it through `aria-describedby`. The option's
|
|
141
|
+
* accessible name is then the title alone.
|
|
142
|
+
*
|
|
143
|
+
* @see https://mantle.ngrok.com/components/forms/radio-group#radiogrouplistitem
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```tsx
|
|
147
|
+
* <RadioGroup.Root defaultValue="item1">
|
|
148
|
+
* <RadioGroup.List>
|
|
149
|
+
* <RadioGroup.ListItem value="item1">
|
|
150
|
+
* <RadioGroup.ItemContent>
|
|
151
|
+
* <Text>List Item 1</Text>
|
|
152
|
+
* <Text size="sm" className="text-muted">First option</Text>
|
|
153
|
+
* </RadioGroup.ItemContent>
|
|
154
|
+
* </RadioGroup.ListItem>
|
|
155
|
+
* <RadioGroup.ListItem value="item2">
|
|
156
|
+
* <RadioGroup.ItemContent>
|
|
157
|
+
* <Text>List Item 2</Text>
|
|
158
|
+
* <Text size="sm" className="text-muted">Second option</Text>
|
|
159
|
+
* </RadioGroup.ItemContent>
|
|
160
|
+
* </RadioGroup.ListItem>
|
|
161
|
+
* </RadioGroup.List>
|
|
162
|
+
* </RadioGroup.Root>
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
declare const ListItem: ({ className, ...props }: RadioListItemProps) => import("react").JSX.Element;
|
|
166
|
+
type RadioItemContentProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
167
|
+
type RadioCardProps = RadioItemProps & WithDataSlot;
|
|
168
|
+
/**
|
|
169
|
+
* A radio card item. Use it as a child of `RadioGroup`
|
|
170
|
+
*
|
|
171
|
+
* It renders a `<div>` with a native radio that covers it. Style its state with
|
|
172
|
+
* `has-[>input:checked]:`, `has-[>input:disabled]:`, and
|
|
173
|
+
* `has-[>input:focus-visible]:`.
|
|
174
|
+
*
|
|
175
|
+
* When rendered inside `Field.Control` (an alternative to the recommended
|
|
176
|
+
* `Field.Set` / `Field.Legend` composition), picks up `aria-invalid`,
|
|
177
|
+
* `aria-errormessage`, and `aria-describedby` from `FieldControlContext`. A
|
|
178
|
+
* `Choice.Title` inside the item names it through `aria-labelledby`, and a
|
|
179
|
+
* `Choice.Description` describes it through `aria-describedby`. The option's
|
|
180
|
+
* accessible name is then the title alone.
|
|
181
|
+
*
|
|
182
|
+
* @see https://mantle.ngrok.com/components/forms/radio-group#radiogroupcard
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```tsx
|
|
186
|
+
* <RadioGroup.Root defaultValue="basic">
|
|
187
|
+
* <div className="space-y-3">
|
|
188
|
+
* <RadioGroup.Card value="basic">
|
|
189
|
+
* <RadioGroup.ItemContent>
|
|
190
|
+
* <Text weight="strong">Basic Plan</Text>
|
|
191
|
+
* <Text>$10/month</Text>
|
|
192
|
+
* </RadioGroup.ItemContent>
|
|
193
|
+
* </RadioGroup.Card>
|
|
194
|
+
* <RadioGroup.Card value="pro">
|
|
195
|
+
* <RadioGroup.ItemContent>
|
|
196
|
+
* <Text weight="strong">Pro Plan</Text>
|
|
197
|
+
* <Text>$25/month</Text>
|
|
198
|
+
* </RadioGroup.ItemContent>
|
|
199
|
+
* </RadioGroup.Card>
|
|
200
|
+
* </div>
|
|
201
|
+
* </RadioGroup.Root>
|
|
202
|
+
* ```
|
|
203
|
+
*/
|
|
204
|
+
declare const Card: ({ className, ...props }: RadioCardProps) => import("react").JSX.Element;
|
|
205
|
+
/**
|
|
206
|
+
* The content of any radio item. Use it to wrap any labels, descriptions, or content of a radio item.
|
|
207
|
+
* Use it as a child of `RadioGroup.Item`, `RadioGroup.ListItem`, or `RadioGroup.Card`.
|
|
208
|
+
*
|
|
209
|
+
* @see https://mantle.ngrok.com/components/forms/radio-group#radiogroupitemcontent
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* ```tsx
|
|
213
|
+
* <RadioGroup.Root defaultValue="option1">
|
|
214
|
+
* <RadioGroup.Item value="option1">
|
|
215
|
+
* <RadioGroup.Indicator />
|
|
216
|
+
* <RadioGroup.ItemContent>
|
|
217
|
+
* <Text weight="strong">Option 1</Text>
|
|
218
|
+
* <Text size="sm">Description for option 1</Text>
|
|
219
|
+
* </RadioGroup.ItemContent>
|
|
220
|
+
* </RadioGroup.Item>
|
|
221
|
+
* </RadioGroup.Root>
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
declare const ItemContent: ({ "data-slot": dataSlot, asChild, children, className, ...props }: RadioItemContentProps) => import("react").JSX.Element;
|
|
225
|
+
type RadioInputSandboxProps = ComponentProps<"div"> & WithDataSlot;
|
|
226
|
+
/**
|
|
227
|
+
* A sandbox container for input elements composed within radio group items.
|
|
228
|
+
* A click on the input checks the radio and leaves focus on the input. When
|
|
229
|
+
* the item is disabled or unchecked, the input leaves the tab order.
|
|
230
|
+
*
|
|
231
|
+
* @see https://mantle.ngrok.com/components/forms/radio-group#radiogroupinputsandbox
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```tsx
|
|
235
|
+
* <RadioGroup.Root defaultValue="custom">
|
|
236
|
+
* <RadioGroup.Item value="custom">
|
|
237
|
+
* <RadioGroup.Indicator />
|
|
238
|
+
* <RadioGroup.ItemContent>
|
|
239
|
+
* <Text>Custom amount</Text>
|
|
240
|
+
* <RadioGroup.InputSandbox>
|
|
241
|
+
* <Input type="number" placeholder="Enter amount" />
|
|
242
|
+
* </RadioGroup.InputSandbox>
|
|
243
|
+
* </RadioGroup.ItemContent>
|
|
244
|
+
* </RadioGroup.Item>
|
|
245
|
+
* </RadioGroup.Root>
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
248
|
+
declare const InputSandbox: ({ "data-slot": dataSlot, children, onClick, ...props }: RadioInputSandboxProps) => import("react").JSX.Element;
|
|
249
|
+
export { Card, Indicator, InputSandbox, Item, ItemContent, List, ListItem, Root };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{t as Card,n as Indicator,r as InputSandbox,i as Item,a as ItemContent,o as List,s as ListItem,c as Root}from"./radio-group-zA5DjlLg.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Children as e,cloneElement as t,isValidElement as n,useContext as r}from"react";import{t as i}from"./cx-DhYnQ07J.js";import{n as a}from"./cx-CfAFHj5_.js";import{t as o}from"./utils-EM6s2WEU.js";import{n as s}from"./utils-CPSttKPD.js";import{t as c}from"./slot-CBcGhRdV.js";import{n as l,t as u}from"./radio-group-f3ThXQCx.js";import{t as d}from"./radio-group-BliblUqe.js";import{jsx as f}from"react/jsx-runtime";const p=({"data-slot":e,ref:t,...n})=>/* @__PURE__ */ f(l,{"data-slot":o(e,`radio-group`),...n,ref:t}),m=({className:e,...t})=>/* @__PURE__ */ f(u,{part:`radio-group-item`,className:a(`group/radio cursor-pointer has-[>input:disabled]:cursor-default [&_label]:cursor-inherit flex gap-2 py-1 text-sm not-has-data-radio-default-indicator:has-[>input:focus-visible]:focus-ring not-has-data-radio-default-indicator:has-[>input:focus-visible]:rounded-md`,e),...t}),h=/* @__PURE__ */ f(`span`,{"data-radio-default-indicator":``,className:`flex size-4 items-center justify-center rounded-full border shrink-0 bg-form border-form group-has-[>input:checked]/radio:bg-filled-accent group-has-[>input:checked]/radio:border-transparent group-hover/radio:group-has-[>input:enabled:not(:checked)]/radio:border-neutral-400 group-hover/radio:group-has-[>input:enabled:checked]/radio:bg-filled-accent-hover group-has-[>input:disabled]/radio:cursor-default group-has-[>input:disabled]/radio:opacity-50 group-has-[>input:focus-visible]/radio:focus-ring`,children:/* @__PURE__ */ f(`span`,{className:`hidden group-has-[>input:checked]/radio:block size-2 rounded-full bg-white shrink-0 forced-colors:forced-color-adjust-none forced-colors:bg-[CanvasText]`})}),g=({"data-slot":e,children:t,className:n,name:i,...s})=>{let c=r(d),l=typeof t==`function`?t({checked:c?.checked??!1,disabled:c?.disabled??!1}):t;return/* @__PURE__ */ f(`span`,{"data-slot":o(e,`radio-group-indicator`),className:a(`radio-indicator inline-flex size-5 select-none items-center justify-center shrink-0`,n),...s,children:t==null?h:l})},_=({"data-slot":e,className:t,ref:n,...r})=>/* @__PURE__ */ f(p,{"data-slot":o(e,`radio-group-list`),className:i(`border-form flex flex-col gap-px rounded-[0.6875rem] border p-1`,t),...r,ref:n}),v=({className:e,...t})=>/* @__PURE__ */ f(u,{part:`radio-group-list-item`,className:a(`group/radio [&_label]:cursor-inherit relative flex select-none gap-2 rounded-md px-3 py-2 text-sm cursor-pointer has-[>input:disabled]:cursor-default has-[>input:focus-visible]:focus-ring has-[>input:focus-visible]:z-1 not-has-[>input:disabled]:hover:bg-active-menu-item has-[>input:checked]:bg-selected-menu-item not-has-[>input:disabled]:hover:has-[>input:checked]:bg-active-selected-menu-item has-[.radio-indicator:first-child]:pl-2 has-[.radio-indicator:last-child]:pr-2`,e),...t}),y=({className:e,...t})=>/* @__PURE__ */ f(u,{part:`radio-group-card`,className:i(`group/radio border-card bg-card [&_label]:cursor-inherit relative block rounded-md border p-4 text-sm`,`cursor-pointer has-[>input:disabled]:cursor-default`,`has-[>input:focus-visible]:focus-ring`,`first-of-type:rounded-tl-md first-of-type:rounded-tr-md last-of-type:rounded-bl-md last-of-type:rounded-br-md`,`has-[>input:disabled]:border-form/50 not-has-[>input:disabled]:hover:bg-card-hover`,`has-[>input:checked]:border-accent-500/50 has-[>input:checked]:bg-selected-menu-item not-has-[>input:disabled]:hover:has-[>input:checked]:bg-active-selected-menu-item`,e),...t}),b=({"data-slot":e,asChild:t=!1,children:n,className:r,...a})=>/* @__PURE__ */ f(t?c:`div`,{"data-slot":o(e,`radio-group-item-content`),className:i(`min-w-0 flex-1 group-has-[>input:disabled]/radio:opacity-50`,r),...a,children:n}),x=({"data-slot":i,children:a,onClick:c,...l})=>{let u=r(d),p=u?.checked??!1,m=u?.disabled??!1,h=e.only(a),g=m||!p;return/* @__PURE__ */ f(`div`,{role:`none`,"data-slot":o(i,`radio-group-input-sandbox`),onClick:e=>{m?(e.stopPropagation(),e.preventDefault()):(c?.(e),e.defaultPrevented||u&&(p||e.currentTarget.ownerDocument.getElementById(u.radioId)?.click(),s(e.target,e.currentTarget)||(e.preventDefault(),e.currentTarget.querySelector(`input, select, textarea, button, [contenteditable]`)?.focus())))},...l,children:n(h)&&t(h,{disabled:m||h.props.disabled,tabIndex:g?-1:h.props.tabIndex})})};export{b as a,p as c,m as i,g as n,_ as o,x as r,v as s,y as t};
|