@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/field.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./use-isomorphic-layout-effect-CLSmHzo4.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./button-BWGUuWnu.js";import{t as i}from"./label-DmDwzPD8.js";import{t as a}from"./popover-DxOqLKxy.js";import{t as o}from"./slot-DdYN1L1C.js";import{n as s,r as c,t as l}from"./field-Bihblt8U.js";import{i as u,n as d,r as f,t as p}from"./field-CPvjazWN.js";import{c as m}from"react/compiler-runtime";import{Children as h,Fragment as g,cloneElement as _,isValidElement as v,useContext as y,useId as b,useState as x}from"react";import S from"tiny-invariant";import{jsx as C}from"react/jsx-runtime";import{QuestionIcon as w}from"@phosphor-icons/react/Question";const T=e=>{let t=[],n=/* @__PURE__ */ new Set;for(let r of e??[]){if(typeof r!=`string`)continue;let e=r.trim();e.length===0||n.has(e)||(n.add(e),t.push(e))}return t},E=e=>!(e==null||typeof e==`boolean`||typeof e==`string`&&e.trim().length===0),D=({children:e,errorItemType:t})=>{let n=!1;return h.forEach(e,e=>{n||e==null||typeof e==`boolean`||(typeof e==`string`?e.trim().length>0&&(n=!0):n=v(e)?e.type===t?E(e.props.children):e.type!==g||D({children:e.props.children,errorItemType:t}):!0)}),n},O=e=>{let r=m(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=n(a,`field-set`),r[5]=a,r[6]=c);let l;r[7]===i?l=r[8]:(l=t(`flex w-full min-w-0 flex-col gap-4 border-0 p-0`,i),r[7]=i,r[8]=l);let u;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l?(u=/* @__PURE__ */ C(`fieldset`,{ref:s,"data-slot":c,className:l,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=u):u=r[13],u},k=e=>{let n=m(10),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:r,ref:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=t(`text-strong mb-1.5 text-sm font-medium font-sans`,r),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==a||n[8]!==o?(s=/* @__PURE__ */ C(`legend`,{ref:a,"data-slot":`field-legend`,className:o,...i}),n[6]=i,n[7]=a,n[8]=o,n[9]=s):s=n[9],s},A=e=>{let t=m(7),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let a=y(s)?.controlId,o;return t[3]!==n||t[4]!==r||t[5]!==a?(o=/* @__PURE__ */ C(i,{ref:r,...n,htmlFor:a}),t[3]=n,t[4]=r,t[5]=a,t[6]=o):o=t[6],o},j=e=>{let r=m(16),i,a,s,c,l;r[0]===e?(i=r[1],a=r[2],s=r[3],c=r[4],l=r[5]):({"data-slot":s,asChild:i,className:a,ref:l,...c}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=s,r[4]=c,r[5]=l);let u=i?o:`p`,d;r[6]===s?d=r[7]:(d=n(s,`field-label-text`),r[6]=s,r[7]=d);let f;r[8]===a?f=r[9]:(f=t(`text-strong text-sm font-medium font-sans`,a),r[8]=a,r[9]=f);let p;return r[10]!==u||r[11]!==c||r[12]!==l||r[13]!==d||r[14]!==f?(p=/* @__PURE__ */ C(u,{ref:l,"data-slot":d,className:f,...c}),r[10]=u,r[11]=c,r[12]=l,r[13]=d,r[14]=f,r[15]=p):p=r[15],p},M=e=>{let r=m(16),i,a,s,c,l;r[0]===e?(i=r[1],a=r[2],s=r[3],c=r[4],l=r[5]):({"data-slot":s,asChild:i,className:a,ref:l,...c}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=s,r[4]=c,r[5]=l);let u=i?o:`div`,d;r[6]===s?d=r[7]:(d=n(s,`field-label-row`),r[6]=s,r[7]=d);let f;r[8]===a?f=r[9]:(f=t(`flex items-center gap-1`,a),r[8]=a,r[9]=f);let p;return r[10]!==u||r[11]!==c||r[12]!==l||r[13]!==d||r[14]!==f?(p=/* @__PURE__ */ C(u,{ref:l,"data-slot":d,className:f,...c}),r[10]=u,r[11]=c,r[12]=l,r[13]=d,r[14]=f,r[15]=p):p=r[15],p},N=a.Root,P=/* @__PURE__ */ C(w,{}),F=e=>{let n=m(22),i,o,s,c,l,u,d,f,p;n[0]===e?(i=n[1],o=n[2],s=n[3],c=n[4],l=n[5],u=n[6],d=n[7],f=n[8],p=n[9]):({appearance:l,className:i,icon:u,intent:d,label:o,ref:c,size:f,type:p,...s}=e,n[0]=e,n[1]=i,n[2]=o,n[3]=s,n[4]=c,n[5]=l,n[6]=u,n[7]=d,n[8]=f,n[9]=p);let h=l===void 0?`ghost`:l,g=u===void 0?P:u,_=d===void 0?`neutral`:d,v=f===void 0?`xs`:f,y=p===void 0?`button`:p,b;n[10]===i?b=n[11]:(b=t(`text-body -my-0.5`,i),n[10]=i,n[11]=b);let x;return n[12]!==h||n[13]!==g||n[14]!==_||n[15]!==o||n[16]!==s||n[17]!==c||n[18]!==v||n[19]!==b||n[20]!==y?(x=/* @__PURE__ */ C(a.Trigger,{asChild:!0,children:/* @__PURE__ */ C(r,{ref:c,appearance:h,className:b,icon:g,intent:_,label:o,size:v,type:y,...s})}),n[12]=h,n[13]=g,n[14]=_,n[15]=o,n[16]=s,n[17]=c,n[18]=v,n[19]=b,n[20]=y,n[21]=x):x=n[21],x},I=e=>{let t=m(10),r,i,o;t[0]===e?(r=t[1],i=t[2],o=t[3]):({"data-slot":r,ref:o,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=o);let s;t[4]===r?s=t[5]:(s=n(r,`field-help-content`),t[4]=r,t[5]=s);let c;return t[6]!==i||t[7]!==o||t[8]!==s?(c=/* @__PURE__ */ C(a.Content,{ref:o,"data-slot":s,...i}),t[6]=i,t[7]=o,t[8]=s,t[9]=c):c=t[9],c},L=e=>{let r=m(18),i,a,s,c,l,u;r[0]===e?(i=r[1],a=r[2],s=r[3],c=r[4],l=r[5],u=r[6]):({"data-slot":c,asChild:i,children:a,className:s,ref:u,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=s,r[4]=c,r[5]=l,r[6]=u);let d=i?o:`span`,f;r[7]===c?f=r[8]:(f=n(c,`field-optional`),r[7]=c,r[8]=f);let p;r[9]===s?p=r[10]:(p=t(`text-muted text-sm font-normal font-sans`,s),r[9]=s,r[10]=p);let h=a??`(Optional)`,g;return r[11]!==d||r[12]!==l||r[13]!==u||r[14]!==f||r[15]!==p||r[16]!==h?(g=/* @__PURE__ */ C(d,{ref:u,"data-slot":f,className:p,...l,children:h}),r[11]=d,r[12]=l,r[13]=u,r[14]=f,r[15]=p,r[16]=h,r[17]=g):g=r[17],g},R=e=>{let r=m(16),i,a,s,c,l;r[0]===e?(i=r[1],a=r[2],s=r[3],c=r[4],l=r[5]):({"data-slot":s,asChild:i,className:a,ref:l,...c}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=s,r[4]=c,r[5]=l);let u=i?o:`div`,d;r[6]===s?d=r[7]:(d=n(s,`field-group`),r[6]=s,r[7]=d);let f;r[8]===a?f=r[9]:(f=t(`flex w-full flex-col gap-4`,a),r[8]=a,r[9]=f);let p;return r[10]!==u||r[11]!==c||r[12]!==l||r[13]!==d||r[14]!==f?(p=/* @__PURE__ */ C(u,{ref:l,"data-slot":d,className:f,...c}),r[10]=u,r[11]=c,r[12]=l,r[13]=d,r[14]=f,r[15]=p):p=r[15],p},z=e=>{let r=m(37),i,a,c,l,d,f,h,g,_;r[0]===e?(i=r[1],a=r[2],c=r[3],l=r[4],d=r[5],f=r[6],h=r[7],g=r[8],_=r[9]):({"data-slot":l,asChild:i,children:a,className:c,id:d,name:f,ref:g,validation:_,...h}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=c,r[4]=l,r[5]=d,r[6]=f,r[7]=h,r[8]=g,r[9]=_);let v=i?o:`div`,y=b(),S=d??y,w=b(),T=b(),[E,D]=x(!1),O=_??(E?`error`:void 0),k;r[10]===O?k=r[11]:(k=u(O),r[10]=O,r[11]=k);let A=k,j;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>(D(!0),()=>{D(!1)}),r[12]=j):j=r[12];let M=j,N;r[13]!==S||r[14]!==w||r[15]!==T||r[16]!==f||r[17]!==A?(N={controlId:S,descriptionId:w,errorId:T,name:f,registerError:M,validation:A},r[13]=S,r[14]=w,r[15]=T,r[16]=f,r[17]=A,r[18]=N):N=r[18];let P=N,F;r[19]===l?F=r[20]:(F=n(l,`field-item`),r[19]=l,r[20]=F);let I;r[21]===c?I=r[22]:(I=t(`flex w-full flex-col gap-1.5`,c),r[21]=c,r[22]=I);let L;r[23]!==v||r[24]!==a||r[25]!==h||r[26]!==g||r[27]!==F||r[28]!==I||r[29]!==A?(L=/* @__PURE__ */ C(v,{ref:g,"data-slot":F,"data-validation":A,className:I,...h,children:a}),r[23]=v,r[24]=a,r[25]=h,r[26]=g,r[27]=F,r[28]=I,r[29]=A,r[30]=L):L=r[30];let R;r[31]!==L||r[32]!==A?(R=/* @__PURE__ */ C(p,{validation:A,children:L}),r[31]=L,r[32]=A,r[33]=R):R=r[33];let z;return r[34]!==P||r[35]!==R?(z=/* @__PURE__ */ C(s.Provider,{value:P,children:R}),r[34]=P,r[35]=R,r[36]=z):z=r[36],z},B=e=>{let t=m(30),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,ref:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=y(s),u,d,f,h,g,b,x,w,T;if(t[4]!==n||t[5]!==a||t[6]!==r||t[7]!==i){T=Symbol.for(`react.early_return_sentinel`);bb0:{let e=c({context:a});if(typeof n==`function`){T=/* @__PURE__ */ C(p,{validation:e.validation,children:/* @__PURE__ */ C(l.Provider,{value:a?e.ariaProps:null,children:n(e.ariaProps)})});break bb0}S(v(n),`Field.Control expects a single React element child (or a render-prop function). Got a non-element value (string, array, fragment, null, or undefined). Wrap the control in a single element, or use the function child form: <Field.Control>{(props) => <YourControl {...props} />}</Field.Control>.`),f=p,w=e.validation,d=l.Provider,x=a?e.ariaProps:null,u=o,h=i,g=r,b=_(n,e.ariaProps)}t[4]=n,t[5]=a,t[6]=r,t[7]=i,t[8]=u,t[9]=d,t[10]=f,t[11]=h,t[12]=g,t[13]=b,t[14]=x,t[15]=w,t[16]=T}else u=t[8],d=t[9],f=t[10],h=t[11],g=t[12],b=t[13],x=t[14],w=t[15],T=t[16];if(T!==Symbol.for(`react.early_return_sentinel`))return T;let E;t[17]!==u||t[18]!==h||t[19]!==g||t[20]!==b?(E=/* @__PURE__ */ C(u,{ref:h,...g,children:b}),t[17]=u,t[18]=h,t[19]=g,t[20]=b,t[21]=E):E=t[21];let D;t[22]!==d||t[23]!==x||t[24]!==E?(D=/* @__PURE__ */ C(d,{value:x,children:E}),t[22]=d,t[23]=x,t[24]=E,t[25]=D):D=t[25];let O;return t[26]!==f||t[27]!==w||t[28]!==D?(O=/* @__PURE__ */ C(f,{validation:w,children:D}),t[26]=f,t[27]=w,t[28]=D,t[29]=O):O=t[29],O},V=e=>{let r=m(17),i,a,c,l,u;r[0]===e?(i=r[1],a=r[2],c=r[3],l=r[4],u=r[5]):({"data-slot":c,asChild:i,className:a,ref:u,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=c,r[4]=l,r[5]=u);let d=i?o:`p`,f=y(s),p;r[6]===c?p=r[7]:(p=n(c,`field-description`),r[6]=c,r[7]=p);let h=f?.descriptionId,g;r[8]===a?g=r[9]:(g=t(`text-body text-sm leading-4`,`[:where([data-slot=field-error-list]+&)]:-mt-1.5`,a),r[8]=a,r[9]=g);let _;return r[10]!==d||r[11]!==l||r[12]!==u||r[13]!==p||r[14]!==h||r[15]!==g?(_=/* @__PURE__ */ C(d,{ref:u,"data-slot":p,id:h,className:g,...l}),r[10]=d,r[11]=l,r[12]=u,r[13]=p,r[14]=h,r[15]=g,r[16]=_):_=r[16],_},H=e=>{let r=m(16),i,a,o,s,c;if(r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c),!E(i))return null;let l;r[6]===o?l=r[7]:(l=n(o,`field-error`),r[6]=o,r[7]=l);let u;r[8]===a?u=r[9]:(u=t(`text-danger-600 text-sm leading-4`,a),r[8]=a,r[9]=u);let d;return r[10]!==i||r[11]!==s||r[12]!==c||r[13]!==l||r[14]!==u?(d=/* @__PURE__ */ C(`li`,{ref:c,"data-slot":l,className:u,...s,children:i}),r[10]=i,r[11]=s,r[12]=c,r[13]=l,r[14]=u,r[15]=d):d=r[15],d},U=e=>{let t=m(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({messages:n,ref:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=T(n).map(K),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=/* @__PURE__ */ C(W,{ref:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o},W=r=>{let i=m(25),a,c,l,u,d,f;i[0]===r?(a=i[1],c=i[2],l=i[3],u=i[4],d=i[5],f=i[6]):({"data-slot":u,asChild:a,children:c,className:l,ref:f,...d}=r,i[0]=r,i[1]=a,i[2]=c,i[3]=l,i[4]=u,i[5]=d,i[6]=f);let p;i[7]===c?p=i[8]:(p=D({children:c,errorItemType:H}),i[7]=c,i[8]=p);let h=p,g=y(s),_=g?.registerError,v,b;if(i[9]!==h||i[10]!==_?(v=()=>{if(h&&_!=null)return _()},b=[h,_],i[9]=h,i[10]=_,i[11]=v,i[12]=b):(v=i[11],b=i[12]),e(v,b),!h)return null;let x=a?o:`ul`,S;i[13]===u?S=i[14]:(S=n(u,`field-error-list`),i[13]=u,i[14]=S);let w=g?.errorId,T;i[15]===l?T=i[16]:(T=t(`m-0 flex w-full flex-col list-none p-0`,l),i[15]=l,i[16]=T);let E;return i[17]!==x||i[18]!==c||i[19]!==d||i[20]!==f||i[21]!==S||i[22]!==w||i[23]!==T?(E=/* @__PURE__ */ C(x,{ref:f,"data-slot":S,id:w,role:`list`,className:T,...d,children:c}),i[17]=x,i[18]=c,i[19]=d,i[20]=f,i[21]=S,i[22]=w,i[23]=T,i[24]=E):E=i[24],E},G={Item:z,Control:B,Group:R,Set:O,Legend:k,Label:A,LabelText:j,LabelRow:M,Help:N,HelpTrigger:F,HelpContent:I,Optional:L,Description:V,Errors:U,ErrorList:W,ErrorItem:H};function K(e){return/* @__PURE__ */ C(H,{children:e},e)}const q=e=>T(e?.map(e=>typeof e==`string`||!e?e:e.message));export{G as Field,d as isAriaInvalid,f as parseValidation,u as resolveValidation,q as toErrorMessages};
|
|
1
|
+
import*as e from"./field-parts.js";import{r as t}from"./field-DRHAcM1s.js";import{n,r,t as i}from"./field-BRYypbjO.js";const a=e=>t(e?.map(e=>typeof e==`string`||!e?e:e.message));export{e as Field,i as isAriaInvalid,n as parseValidation,r as resolveValidation,a as toErrorMessages};
|
package/dist/flag.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see https://mantle.ngrok.com/components/data-display/flag
|
|
5
5
|
*/
|
|
6
|
-
import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
|
|
7
6
|
import { ComponentProps } from "react";
|
|
7
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
8
8
|
/** All valid values for a flag
|
|
9
9
|
* @see https://www.flagpack.xyz/docs/flag-index
|
|
10
10
|
*/
|
|
@@ -52,8 +52,8 @@ type Props = Omit<ComponentProps<"div">, "children"> & {
|
|
|
52
52
|
* - Inside a select option, list row, or status pill that needs a quick visual cue.
|
|
53
53
|
*
|
|
54
54
|
* **When not to use**
|
|
55
|
-
* - As a stand-in for language. Flags
|
|
56
|
-
* not "Portugal", Spanish is not just "Spain". Use a language label instead.
|
|
55
|
+
* - As a stand-in for language. Flags are not languages: Brazilian Portuguese is
|
|
56
|
+
* not "Portugal", and Spanish is not just "Spain". Use a language label instead.
|
|
57
57
|
* - As decoration where the country isn't meaningful to the user.
|
|
58
58
|
*
|
|
59
59
|
* **Sizing.** `"s"` (16×12), `"m"` (20×15), and `"l"` (32×24, default) match
|
package/dist/flag.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cva as e}from"class-variance-authority";import{n as t,t as n}from"./cx-CfAFHj5_.js";import{t as r}from"./utils-EM6s2WEU.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=e(``,{variants:{size:{s:`rounded-[0.0625rem]`,m:`rounded-[0.09375rem]`,l:`rounded-xs`}}}),s=e(``,{variants:{size:{s:`w-4 h-3`,m:`w-5 h-3.75`,l:`w-8 h-6`}}});function c({"data-slot":e,className:c,code:l,size:u=`l`,loading:d=`lazy`,...f}){let p=o({size:u}),m=s({size:u});return/* @__PURE__ */ a(`div`,{"data-slot":r(e,`flag`),className:n(`flag relative overflow-hidden`,p,m,c),...f,children:[/* @__PURE__ */ i(`div`,{"aria-hidden":!0,className:t(`absolute inset-0 border border-[#000]/10`,p)}),/* @__PURE__ */ i(`img`,{className:`h-full w-full block object-cover`,src:`https://assets.ngrok.com/flags/${u}/${l}.svg`,alt:`flag for ${l}`,loading:d})]})}const l=/* @__PURE__ */ `004.008.010.016.020.024.028.031.032.040.044.048.050.051.052.056.060.064.068.070.072.074.076.084.086.090.092.096.100.104.108.112.116.120.124.132.136.140.144.148.152.156.158.162.166.170.174.178.180.184.188.191.192.196.203.204.208.212.214.218.222.226.231.232.233.234.238.239.242.246.248.250.254.258.260.262.266.268.270.275.276.288.292.296.300.304.308.312.316.320.324.328.332.334.336.340.344.348.352.356.360.364.368.372.376.380.384.388.392.398.400.404.408.410.414.417.418.422.426.428.430.434.438.440.442.446.450.454.458.462.466.470.474.478.480.484.492.496.498.499.500.504.508.512.516.520.524.528.531.533.534.540.548.554.558.562.566.570.574.578.580.581.583.584.585.586.591.598.600.604.608.612.616.620.624.626.630.634.638.642.643.646.652.654.659.660.662.663.666.670.674.678.682.686.688.690.694.702.703.704.705.706.710.716.724.728.729.732.740.744.748.752.756.760.762.764.768.772.776.780.784.788.792.795.796.798.800.804.807.818.831.832.833.834.836.840.850.854.858.860.862.876.882.887.894.ABW.AD.AE.AF.AFG.AFRUN.AG.AGO.AI.AIA.AL.ALA.ALB.AM.AMS.AND.AO.AQ.AR.ARE.ARG.ARM.AS.ASM.AT.ATA.ATF.ATG.AU.AUS.AUT.AW.AX.AZ.AZE.BA.BB.BD.BDI.BE.BEL.BEN.BF.BFA.BG.BGD.BGR.BH.BHR.BHS.BI.BIH.BJ.BL.BLM.BLR.BLZ.BM.BMU.BN.BO.BOL.BQ-BO.BQ-SA.BQ-SE.BR.BRA.BRB.BRN.BS.BT.BTN.BV.BVT.BW.BWA.BY.BZ.CA.CAF.CAN.CC.CCK.CD.CF.CG.CH.CHE.CHL.CHN.CI.CIV.CK.CL.CM.CMR.CN.CO.COD.COG.COK.COL.COM.CPV.CR.CRI.CU.CUB.CUW.CV.CW.CX.CXR.CY.CYM.CYP.CZ.CZE.DE.DEU.DJ.DJI.DK.DM.DMA.DNK.DO.DOM.EC.ECU.EE.EG.EGY.EH.ER.ERI.ES.ESH.ESP.EST.ET.ETH.EU.FI.FIN.FJ.FJI.FK.FLK.FM.FO.FR.FRA.FRO.FSM.GA.GAB.GB-ENG.GB-NIR.GB-SCT.GB-UKM.GB-WLS.GB.GBR.GD.GE.GEO.GF.GG.GGY.GH.GHA.GI.GIB.GIN.GL.GLP.GM.GMB.GN.GNB.GNQ.GP.GQ.GR.GRC.GRD.GRL.GS.GT.GTM.GU.GUF.GUM.GUY.GW.GY.HK.HKG.HM.HMD.HN.HND.HR.HRV.HT.HTI.HU.HUN.ID.IDN.IE.IL.IM.IMN.IN.IND.IO.IOT.IQ.IR.IRL.IRN.IRQ.IS.ISL.ISR.IT.ITA.JAM.JE.JEY.JM.JO.JOR.JP.JPN.KAZ.KE.KEN.KG.KGZ.KH.KHM.KI.KIR.KM.KN-SK.KNA.KOR.KP.KR.KW.KWT.KY.KZ.LA.LAO.LB.LBN.LBR.LBY.LC.LCA.LI.LIE.LK.LKA.LR.LS.LSO.LT.LTU.LU.LUX.LV.LVA.LY.MA.MAC.MAF.MAR.MC.MCO.MD.MDA.MDG.MDV.ME.MEX.MF.MG.MH.MHL.MK.MKD.ML.MLI.MLT.MM.MMR.MN.MNE.MNG.MNP.MO.MOZ.MP.MQ.MR.MRT.MS.MSR.MT.MTQ.MU.MUS.MV.MW.MWI.MX.MY.MYS.MZ.NA.NAM.NC.NCL.NE.NER.NF.NFK.NG.NGA.NI.NIC.NIU.NL.NLD.NO.NOR.NP.NPL.NR.NRU.NU.NZ.NZL.OM.OMN.PA.PAK.PAN.PCN.PE.PER.PF.PG.PH.PHL.PK.PL.PLW.PM.PN.PNG.POL.PR.PRI.PRK.PRT.PRY.PS.PSE.PT.PW.PY.PYF.QA.QAT.RAINBOW.RE.REU.RO.ROU.RS.RU.RUS.RW.RWA.SA.SAU.SB.SC.SD.SDN.SE.SEN.SG.SGP.SGS.SH.SHN.SI.SJ.SJM.SK.SL.SLB.SLE.SLV.SM.SMR.SN.SO.SOM.SPM.SR.SRB.SS.SSD.ST.STP.SUR.SV.SVK.SVN.SWE.SWZ.SX.SXM.SY.SYC.SYR.SZ.TC.TCA.TCD.TD.TF.TG.TGO.TH.THA.TJ.TJK.TK.TKL.TKM.TL.TLS.TM.TN.TO.TON.TR.TT.TTO.TUN.TUR.TUV.TV.TW.TWN.TZ.TZA.UA.UG.UGA.UKR.UM.UMI.UNASUR.URY.US.USA.UY.UZ.UZB.VA.VAT.VC.VCT.VE.VEN.VG.VGB.VI.VIR.VN.VNM.VU.VUT.WF.WLF.WS.WSM.YE.YEM.ZA.ZAF.ZM.ZMB.ZW.ZWE`.split(`.`),u=new Set(l);function d(e){return typeof e==`string`&&u.has(e)}export{c as Flag,l as countryCodes,d as isCountryCode};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={top:`bottom`,right:`left`,bottom:`top`,left:`right`};function t(e,t,n){return{top:e.top,bottom:n.height-e.bottom,left:e.left,right:n.width-e.right}[t]}function n({anchor:e,side:t,sideOffset:n,size:r,viewport:i}){switch(t){case`top`:return e.top-n-r.height>=8;case`bottom`:return e.bottom+n+r.height<=i.height-8;case`left`:return e.left-n-r.width>=8;case`right`:return e.right+n+r.width<=i.width-8}}function r({align:e,end:t,length:n,start:r,viewportLength:i}){let a={start:r,center:r+(t-r-n)/2,end:t-n}[e],o=i-8-n;return Math.max(8,Math.min(a,o))}function i({align:i,anchor:a,side:o,sideOffset:s,size:c,viewport:l}){let u=e[o],d=!n({anchor:a,side:o,sideOffset:s,size:c,viewport:l})&&(n({anchor:a,side:u,sideOffset:s,size:c,viewport:l})||t(a,u,l)>t(a,o,l))?u:o;return d===`top`||d===`bottom`?{side:d,x:r({align:i,start:a.left,end:a.right,length:c.width,viewportLength:l.width}),y:d===`top`?a.top-s-c.height:a.bottom+s}:{side:d,x:d===`left`?a.left-s-c.width:a.right+s,y:r({align:i,start:a.top,end:a.bottom,length:c.height,viewportLength:l.height})}}const a={top:{edge:`bottom`,origin:``,transform:`translateY(100%)`},right:{edge:`left`,origin:`0 0`,transform:`translateY(50%) rotate(90deg) translateX(-50%)`},bottom:{edge:`top`,origin:`center 0`,transform:`rotate(180deg)`},left:{edge:`right`,origin:`100% 0`,transform:`translateY(50%) rotate(-90deg) translateX(50%)`}},o={start:`end`,end:`start`},s=[`transform`,`scale`,`translate`,`rotate`,`filter`,`perspective`,`backdrop-filter`,`-webkit-backdrop-filter`];function c(e){for(let t=e.parentElement;t!=null;t=t.parentElement){let e=getComputedStyle(t);if(s.some(t=>![``,`none`].includes(e.getPropertyValue(t)))||/paint|layout|strict|content/.test(e.getPropertyValue(`contain`))||/transform|filter|perspective/.test(e.getPropertyValue(`will-change`)))return t}return null}function l(e,t,n){let r=e.getBoundingClientRect(),i=e.offsetWidth===0?1:r.width/e.offsetWidth,a=e.offsetHeight===0?1:r.height/e.offsetHeight;return{x:(t-r.left)/i-e.clientLeft+e.scrollLeft,y:(n-r.top)/a-e.clientTop+e.scrollTop}}function u(e){if(typeof e.currentCSSZoom==`number`)return e.currentCSSZoom;let t=1;for(let n=e;n!=null;n=n.parentElement)t*=Number.parseFloat(getComputedStyle(n).zoom)||1;return t}const d=e=>`${e.left} ${e.top} ${e.width} ${e.height} ${document.documentElement.clientWidth} ${document.documentElement.clientHeight}`;function f(e,t){if(typeof IntersectionObserver>`u`||typeof ResizeObserver>`u`)return()=>{};let n,r=!1,i=(a=1)=>{n?.disconnect();let{left:o,top:s,width:c,height:l}=e.getBoundingClientRect();if(c===0||l===0)return;let u=document.documentElement,d=[s,u.clientWidth-o-c,u.clientHeight-s-l,o].map(e=>`${-Math.floor(e)}px`),f=!0;n=new IntersectionObserver(([e])=>{if(r)return;let n=e?.intersectionRatio??a;f?(f=!1,n!==a&&(t(),i(n))):(t(),i())},{rootMargin:d.join(` `),threshold:a}),n.observe(e)},a=new ResizeObserver(()=>{r||(t(),i())});return a.observe(e),()=>{r=!0,a.disconnect(),n?.disconnect()}}function p({align:e,anchor:t,dir:n,floating:r,side:s,sideOffset:p}){let m=(s===`top`||s===`bottom`)&&e!==`center`&&(n??getComputedStyle(t).direction)===`rtl`?o[e]:e,h=r.querySelector(`:scope > [data-float-arrow]`);r.style.inset=`auto`;let g=`togglePopover`in HTMLElement.prototype,_=(s===`top`||s===`bottom`)&&getComputedStyle(r).overflowY!==`visible`,v=``,y=!1,b=()=>{y=!1;let e=p+(h?.offsetHeight??0),n=t.getBoundingClientRect();v=d(n);let o=u(r),f={top:n.top/o,right:n.right/o,bottom:n.bottom/o,left:n.left/o,width:n.width/o,height:n.height/o};r.style.setProperty(`--anchor-width`,`${f.width}px`),r.style.setProperty(`--anchor-height`,`${f.height}px`);let b=r.offsetWidth,x=r.offsetHeight,S=_?r.scrollHeight+x-r.clientHeight:x,C={width:document.documentElement.clientWidth/o,height:document.documentElement.clientHeight/o},w=i({align:m,anchor:f,side:s,sideOffset:e,size:{width:b,height:S},viewport:C}),T={top:f.top-e,bottom:C.height-f.bottom-e,left:C.height,right:C.height}[w.side];r.style.setProperty(`--available-height`,`${Math.max(T-8,0)}px`),w.side===`top`&&(w={...w,y:f.top-e-r.offsetHeight});let E=g?null:c(r),D=E==null?{x:w.x,y:w.y}:l(E,w.x*o,w.y*o);r.style.left=`${D.x}px`,r.style.top=`${D.y}px`;let O=f.left+f.width/2-w.x,k=f.top+f.height/2-w.y;if(r.dataset.side=w.side,r.style.transformOrigin={top:`${O}px 100%`,bottom:`${O}px 0`,left:`100% ${k}px`,right:`0 ${k}px`}[w.side],h!=null){let e=a[w.side],t=w.side===`top`||w.side===`bottom`,n=t?b:x,r=Math.max(0,Math.min((t?O:k)-h.offsetWidth/2,n-h.offsetWidth));h.style.position=`absolute`,h.style.inset=`auto`,h.style.setProperty(e.edge,`0`),h.style.setProperty(t?`left`:`top`,`${r}px`),h.style.transformOrigin=e.origin,h.style.transform=e.transform}};b();let x=0,S=()=>{cancelAnimationFrame(x),x=requestAnimationFrame(()=>{(y||d(t.getBoundingClientRect())!==v)&&b()})},C=typeof ResizeObserver>`u`?void 0:new ResizeObserver(()=>{y=!0,S()});C?.observe(r),h!=null&&C?.observe(h),window.addEventListener(`scroll`,S,{capture:!0,passive:!0}),window.addEventListener(`resize`,S,{passive:!0});let w=f(t,S);return()=>{cancelAnimationFrame(x),C?.disconnect(),w(),window.removeEventListener(`scroll`,S,{capture:!0}),window.removeEventListener(`resize`,S)}}export{p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./alert-DO00UiQe.js";import{t}from"./cx-CfAFHj5_.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i(t){for(let n of e(t))if(n.focus({preventScroll:!0}),t.ownerDocument.activeElement===n)return;t.focus({preventScroll:!0})}function a({className:e,height:i=7,width:a=14,...o}){return/* @__PURE__ */ n(`span`,{"data-float-arrow":``,className:`block`,children:/* @__PURE__ */ r(`svg`,{"aria-hidden":`true`,className:t(`block`,`fill-(--background-color-popover)`,`[clip-path:inset(0_-200%_-200%_-200%)]`,`filter-[drop-shadow(0_0_4px_color-mix(in_oklab,var(--shadow-color)_var(--shadow-first-opacity),transparent))]`,e),height:i,preserveAspectRatio:`none`,viewBox:`0 0 30 10`,width:a,...o,children:[/* @__PURE__ */ n(`polygon`,{points:`0,0 30,0 15,10`}),/* @__PURE__ */ n(`polyline`,{className:`stroke-(--border-color-popover)`,fill:`none`,points:`0,0 15,10 30,0`,strokeWidth:1.5,vectorEffect:`non-scaling-stroke`})]})})}export{i as n,a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useCallback as e,useEffect as t,useInsertionEffect as n,useRef as r,useState as i}from"react";import{t as a}from"./browser-only-ymFoM3Ya.js";import{t as o}from"./hooks-C9b-2wGy.js";import{t as s}from"./hooks-BeLOGKwE.js";import{t as c}from"./hooks-DejuqCNF.js";import{a as l,o as u}from"./layer-container-DDOZJ0fn.js";import{t as d}from"./float-C_vwTtzU.js";const f=`pointer-events-auto fixed z-50 m-0 inset-auto overflow-visible overscroll-none starting:opacity-0 starting:scale-95 not-data-open:opacity-0 not-data-open:scale-95 transition-[opacity,scale,display,overlay] transition-discrete duration-200 ease-out-strong not-data-open:duration-150 motion-reduce:transition-none`,p=a()&&`togglePopover`in HTMLElement.prototype,m=[];function h(e,t){if(!(t instanceof Element)||!e.contains(t))return!1;let n=t.closest(`[data-radix-popper-content-wrapper], [data-mantle-modal-content], [aria-expanded='true'][aria-controls]:is([role='combobox'], [aria-haspopup]:not([aria-haspopup='false']))`);return n!=null&&n!==e&&e.contains(n)}function g(e){let t=m.at(-1);e.key!==`Escape`||t==null||h(t.element,e.target)||t.escape(e)}function _(e){return m.length===0&&window.addEventListener(`keydown`,g,{capture:!0}),m.push(e),()=>{m.splice(m.indexOf(e),1),m.length===0&&window.removeEventListener(`keydown`,g,{capture:!0})}}function v(e){return e==null?document.body:e instanceof Element?e.querySelector(`:scope > [data-mantle-modal-content]`)??e:e}const y=/* @__PURE__ */ new WeakMap;function b(e){return e.querySelector(`:scope > [data-float-arrow]`)}function x(e){return Array.from(e.ownerDocument.querySelectorAll(`dialog[open]`)).some(t=>!t.contains(e)&&t.matches(`:modal`))}function S({align:a,dir:f,dismissOnOutside:m,dismissWhenCovered:h,getAnchor:g,getInsideElements:S,onDismiss:C,onEscapeKeyDown:w,onFocusOutside:T,onHide:E,onInteractOutside:D,onPointerDownOutside:O,onShow:k,open:A,side:j,sideOffset:M}){let N=u(),P=s(),F=r(null),I=l(N,F),[L,R]=i(A);A&&!L&&R(!0);let z=o(C),B=o(w),V=o(O),H=o(T),U=o(D),W=r(k),G=r(E);n(()=>{W.current=k,G.current=E});let K=o(g),q=o(S);t(()=>{if(A||!L)return;let e=setTimeout(()=>R(!1),150);return()=>clearTimeout(e)},[A,L]),t(()=>{A&&I&&h&&z(`covered`)},[I,z,h,A]);let J=A&&!I,Y=r(null),X=r(null),Z=()=>{let e=K();if(e==null)return;let t=Y.current;t==null?X.current?.():(e!==t.anchor||b(t.floating)!==t.arrow||t.rtl!=null&&getComputedStyle(e).direction===`rtl`!==t.rtl)&&t.retrack(e)};c(Z);let Q=o(Z);t(Z);let $=e((e,t)=>{if(p&&x(e)){h&&z(`covered`);return}let n=f==null&&a!==`center`&&(j===`top`||j===`bottom`),r=!0,i=!1,o=(e,t)=>{i||(i=!0,z(e,t))},s=e=>{r&&Reflect.get(e,`newState`)===`closed`&&(r=!1,o(`browser`))},c=e=>{B(e),e.defaultPrevented||(e.preventDefault(),o(`escape`))},l=y.get(e),u=l!=null,g;if(l==null){let t={element:e,escape:c};g={entry:t,popEscape:_(t)}}else l.entry.escape=c,g={entry:l.entry,popEscape:l.popEscape};y.set(e,g),e.addEventListener(`beforetoggle`,s),!u&&p&&e.showPopover();let v=t=>d({align:a,anchor:t,dir:f,floating:e,side:j,sideOffset:M}),S=v(t),C={floating:e,anchor:t,arrow:b(e),rtl:n?getComputedStyle(t).direction===`rtl`:null,retrack:t=>{S(),S=v(t),C.anchor=t,C.arrow=b(e),C.rtl=n?getComputedStyle(t).direction===`rtl`:null}};Y.current=C;let w=t=>t instanceof Node&&(e.contains(t)||(q()?.some(e=>e?.contains(t)===!0)??!1)),T=(e,t)=>{let n=e.target;if(n==null||w(n))return null;let r=new CustomEvent(`mantle.float.outside`,{cancelable:!0,detail:{originalEvent:e}});return n.addEventListener(r.type,()=>{t(r),U(r)},{once:!0}),n.dispatchEvent(r),r.defaultPrevented?null:r},E=null,D=!1,O=0,k=e=>{E=null,i=!1;let t=T(e,V);t!=null&&(e.button===0&&!e.ctrlKey?(E={pointerId:e.pointerId,event:t},D=!0,clearTimeout(O),O=window.setTimeout(()=>{D=!1})):o(`outside`,t))},A=e=>{if(E==null||E.pointerId!==e.pointerId)return;let t=E.event;E=null,w(e.target)||o(`outside`,t)},N=e=>{E?.pointerId===e.pointerId&&(E=null)},P=e=>{if(E!=null&&D)return;let t=T(e,H);t!=null&&o(`outside`,t)},I=e.ownerDocument;return m&&(I.addEventListener(`pointerdown`,k),I.addEventListener(`pointerup`,A,{capture:!0}),I.addEventListener(`pointercancel`,N,{capture:!0}),I.addEventListener(`focusin`,P)),u||W.current?.(e),()=>{Y.current=null,I.removeEventListener(`pointerdown`,k),I.removeEventListener(`pointerup`,A,{capture:!0}),I.removeEventListener(`pointercancel`,N,{capture:!0}),clearTimeout(O),I.removeEventListener(`focusin`,P),S(),e.removeEventListener(`beforetoggle`,s);let t=e.contains(I.activeElement);queueMicrotask(()=>{if(y.get(e)!==g)return;y.delete(e),g.popEscape();let n=F.current;n!=null&&n!==e&&y.has(n)?t&&!n.contains(I.activeElement)&&n.focus({preventScroll:!0}):G.current?.(e,t),r&&p&&(r=!1,e.hidePopover())})}},[a,f,z,m,h,B,H,q,U,V,j,M]),ee=e(e=>{if(F.current=e,!J||e==null)return;let t=K();if(t!=null&&e.isConnected)return $(e,t);let n,r=0,i=()=>{let t=K();return X.current!==i||t==null||!e.isConnected?!1:(X.current=null,n=$(e,t),!0)};X.current=i;let a=()=>{X.current===i&&!e.isConnected&&(r=requestAnimationFrame(()=>{i(),a()}))};return a(),()=>{cancelAnimationFrame(r),X.current===i&&(X.current=null),n?.()}},[K,$,J]);return{present:L,portalTarget:L&&P?v(N):null,floatingRef:ee,reconcile:Q}}function C(){let t=r(null),n=r(null);return{triggerRef:t,setTrigger:e(e=>{t.current=e,e!=null&&n.current?.()},[]),onTriggerChangeRef:n}}function w(e,n){t(()=>(e.current=n,()=>{e.current=null}),[e,n])}export{w as a,S as i,p as n,C as o,v as r,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./alert-DO00UiQe.js";import{useEffect as t,useLayoutEffect as n}from"react";function r({tabStops:e,current:t,backwards:n}){let r=e[0],i=e[e.length-1];if(r==null||i==null)return null;let a=e.findIndex(e=>e===t);if(a!==-1)return n?a===0?i:null:a===e.length-1?r:null;if(t==null)return n?i:r;if(n){let n=e.filter(e=>(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)!==0);return n[n.length-1]??i}return e.find(e=>(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)!==0)??r}function i(n,{active:i=!0}={}){t(()=>{let t=n.current;if(!i||t==null)return;let a=!t.hasAttribute(`tabindex`);a&&(t.tabIndex=-1);let o=0,s=60,c=()=>{if(t.contains(document.activeElement))return;let[n]=e(t);(n??t).focus(),--s,!t.contains(document.activeElement)&&s>0&&(o=requestAnimationFrame(c))};c();let l=n=>{if(n.key!==`Tab`||n.defaultPrevented||!(n.target instanceof Node)||!t.contains(n.target))return;let i=e(t);if(i.length===0){n.preventDefault();return}let a=r({tabStops:i,current:document.activeElement,backwards:n.shiftKey});a!=null&&(n.preventDefault(),a.focus())};return document.addEventListener(`keydown`,l),()=>{cancelAnimationFrame(o),document.removeEventListener(`keydown`,l),a&&t.removeAttribute(`tabindex`)}},[i,n])}function a(e,{active:t=!0}={}){n(()=>{let n=e.current;if(t&&n!=null)return o(n)},[t,e])}function o(e){let t=e.parentElement;if(t==null)return;let n=/* @__PURE__ */ new Set,r=()=>{for(let r of t.children)r!==e&&r instanceof HTMLElement&&!r.inert&&(r.inert=!0,n.add(r))};r();let i=new MutationObserver(r);return i.observe(t,{childList:!0}),()=>{i.disconnect();for(let e of n)e.inert=!1}}export{i as n,a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./hooks-C9b-2wGy.js";import{n as t}from"./hooks-CMmpICCH.js";import{t as n}from"./utils-Dxv_GrUU.js";import{useCallback as r,useEffect as i,useMemo as a,useRef as o,useState as s,useSyncExternalStore as c}from"react";function l(e,t){let[n,r]=s(e);return i(()=>{let n=window.setTimeout(()=>{r(e)},t.waitMs);return()=>{window.clearTimeout(n)}},[e,t.waitMs]),n}function u(t,n){let a=e(t),s=o(0);return i(()=>()=>window.clearTimeout(s.current),[]),r((...e)=>{window.clearTimeout(s.current),s.current=window.setTimeout(()=>a(...e),n.waitMs)},[a,n.waitMs])}const d=/* @__PURE__ */ new Map;function f(e){e.key==null?d.clear():d.has(e.key)&&(e.newValue==null?d.delete(e.key):d.set(e.key,e.newValue))}function p(){try{return window.localStorage}catch{return null}}function m(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===p(),i=n.key==null||n.key===e;r&&i&&(f(n),t())}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function h(){return null}function g(e){let t=d.get(e);if(t!=null)return t;try{return window.localStorage.getItem(e)}catch{return null}}function _(e,t){try{window.localStorage.setItem(e,t),d.delete(e)}catch{d.set(e,t)}}function v(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function y(e,t){let n=a(()=>m(e),[e]),i=c(n,()=>g(e),h);return[i==null?t:v(i,t),r(t=>{let n=JSON.stringify(t);_(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:p()}))},[e])]}const b=/* @__PURE__ */ new Map;function x(e){e.key==null?b.clear():b.has(e.key)&&(e.newValue==null?b.delete(e.key):b.set(e.key,e.newValue))}function S(){try{return window.sessionStorage}catch{return null}}function C(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===S(),i=n.key==null||n.key===e;r&&i&&(x(n),t())}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function w(){return null}function T(e){let t=b.get(e);if(t!=null)return t;try{return window.sessionStorage.getItem(e)}catch{return null}}function E(e,t){try{window.sessionStorage.setItem(e,t),b.delete(e)}catch{b.set(e,t)}}function D(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function O(e,t){let n=a(()=>C(e),[e]),i=c(n,()=>T(e),w);return[i==null?t:D(i,t),r(t=>{let n=JSON.stringify(t);E(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:S()}))},[e])]}function k({anchorRef:e,key:t}){return r(n=>{if(n==null)return;let r=e.current,i=r!=null&&r.key===t?j(n,r):()=>!1;return()=>{e.current={...i()&&r!=null?r:R(n),key:t}}},[e,t])}const A=[`wheel`,`touchstart`,`pointerdown`,`keydown`];function j(e,t){let n=z(e,t);if(typeof ResizeObserver>`u`)return()=>!1;let r=0,i=!0,a=e.getBoundingClientRect(),o=()=>Math.abs(n.scrollTop-r)>1,s=()=>n===document.scrollingElement?window:n,c=()=>{o()&&f()},l,u=e=>{s().removeEventListener(`scroll`,c),l?.(),n=e;let t=e.style.overflowAnchor;e.style.overflowAnchor=`none`,l=()=>{e.style.overflowAnchor=t},r=e.scrollTop,s().addEventListener(`scroll`,c,{passive:!0})},d=new ResizeObserver(()=>{let n=e.getBoundingClientRect();o()?f():n.width===a.width?n.height!==a.height&&f():u(z(e,t)),a=n}),f=()=>{let e=i&&!o();i=!1,d.disconnect(),s().removeEventListener(`scroll`,c),l?.();for(let e of A)window.removeEventListener(e,f,!0);return e};u(n),d.observe(e);for(let e of A)window.addEventListener(e,f,{capture:!0,passive:!0});return f}function M(e){let t=e;for(;t!=null;){let{overflowY:e}=getComputedStyle(t);if((e===`auto`||e===`scroll`)&&(t.scrollHeight>t.clientHeight||N(t)))return t;t=t.parentElement}return document.scrollingElement instanceof HTMLElement?document.scrollingElement:document.documentElement}function N(e){let t=getComputedStyle(e),n=e.getBoundingClientRect().bottom-Number.parseFloat(t.borderBottomWidth)-Number.parseFloat(t.paddingBottom),r=e.getBoundingClientRect().top+Number.parseFloat(t.borderTopWidth);for(let t of e.childNodes)if(t.nodeType===Node.TEXT_NODE&&t.textContent?.trim()){let e=document.createRange();e.selectNodeContents(t),r=Math.max(r,e.getBoundingClientRect().bottom)}let i=Array.from(e.children).findLast(I);for(;i!=null;)r=Math.max(r,i.getBoundingClientRect().bottom+Number.parseFloat(getComputedStyle(i).marginBottom)),i=Array.from(i.children).findLast(I);return n-r>1}function P(e){return e===document.scrollingElement?0:e.getBoundingClientRect().top}function F(e,t){if(e===t)return{top:P(t)-t.scrollTop,height:t.scrollHeight};let{top:n,height:r}=e.getBoundingClientRect();return{top:n,height:r}}function I(e){let{position:t}=getComputedStyle(e);return t!==`absolute`&&t!==`fixed`&&t!==`sticky`}function L(e){return Array.from(e.childNodes).some(e=>e.nodeType===Node.TEXT_NODE&&e.textContent?.trim())}function R(e){let t=M(e),n=P(t),r=[],i=e;for(;;){let e=Array.from(i.children),t=e.filter(I),a=t.findIndex(e=>e.getBoundingClientRect().bottom>n),o=t[a];if(o==null)break;let{top:s}=o.getBoundingClientRect();if(s>n&&(a===0||L(i)))break;if(r.push(e.indexOf(o)),i=o,s>n)return{path:r,fraction:0,offset:n-s}}let{top:a,height:o}=F(i,t);return{path:r,fraction:o>0?(n-a)/o:0,offset:0}}function z(e,t){let n=M(e),r=e,{fraction:i,offset:a}=t;for(let e of t.path){let t=r.children[e];if(t==null){i=0,a=0;break}r=t}let{top:o,height:s}=F(r,n);return n.scrollTo({top:n.scrollTop+o+i*s+a-P(n),behavior:`instant`}),n}function B(){let e=t();return a(()=>e?`auto`:`smooth`,[e])}function V(e,{root:t,margin:r,amount:a,once:c=!1,initial:l=!1}={}){let[u,d]=s(l),f=o(l);return i(()=>{let i=e.current;if(i==null||c&&f.current)return;function o(){if(f.current=!0,d(!0),!c)return()=>{f.current=!1,d(!1)}}let s={root:t?.current??void 0,margin:r,amount:a};return n(i,o,s)},[t,e,r,c,a]),u}function H(){let e=o([]),t=o([]),[n,i]=s({undo:0,redo:0}),c=r(n=>{e.current.push(n),t.current=[],i({undo:e.current.length,redo:0})},[]),l=r(n=>{let r=e.current[e.current.length-1];if(r!==void 0)return e.current.pop(),t.current.push(n),i({undo:e.current.length,redo:t.current.length}),r},[]),u=r(n=>{let r=t.current[t.current.length-1];if(r!==void 0)return t.current.pop(),e.current.push(n),i({undo:e.current.length,redo:t.current.length}),r},[]),d=n.undo>0,f=n.redo>0;return a(()=>({canUndo:d,canRedo:f,push:c,undo:l,redo:u}),[d,f,c,l,u])}export{O as a,l as c,k as i,V as n,y as o,B as r,u as s,H as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useSyncExternalStore as e}from"react";function t(){return()=>{}}function n(){return!0}function r(){return!1}function i(){return e(t,n,r)}export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useSyncExternalStore as e}from"react";import{n as t}from"./hooks-CUYIUcp6.js";function n(){return e(g,_,()=>`default`)}function r(t){return e(y(t),x(t),()=>!1)}const i={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},a={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let o=null,s=null;function c(){return o||={"2xl":window.matchMedia(i[`2xl`]),xl:window.matchMedia(i.xl),lg:window.matchMedia(i.lg),md:window.matchMedia(i.md),sm:window.matchMedia(i.sm),xs:window.matchMedia(i.xs),"2xs":window.matchMedia(i[`2xs`])},o}function l(e){return s||={"2xl":window.matchMedia(a[`2xl`]),xl:window.matchMedia(a.xl),lg:window.matchMedia(a.lg),md:window.matchMedia(a.md),sm:window.matchMedia(a.sm),xs:window.matchMedia(a.xs),"2xs":window.matchMedia(a[`2xs`])},s[e]}let u=`default`;const d=/* @__PURE__ */ new Set;let f=!1;function p(){let e=c();for(let n of t)if(e[n].matches)return n;return`default`}let m=!1;function h(){m||(m=!0,requestAnimationFrame(()=>{m=!1;let e=p();if(e!==u){u=e;for(let e of d)e()}}))}function g(e){if(d.add(e),!f){f=!0;let e=c();u=p();for(let t of Object.values(e))t.addEventListener(`change`,h)}return e(),()=>{if(d.delete(e),d.size===0&&f){f=!1;let e=c();for(let t of Object.values(e))t.removeEventListener(`change`,h)}}}function _(){return f||(u=p()),u}const v=/* @__PURE__ */ new Map;function y(e){let t=v.get(e);return t||(t=t=>{let n=l(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},v.set(e,t),t)}const b=/* @__PURE__ */ new Map;function x(e){let t=b.get(e);return t||(t=()=>l(e).matches,b.set(e,t),t)}export{r as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./utils-Dd83caRw.js";function t(){return e}export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useInsertionEffect as e,useMemo as t,useRef as n}from"react";function r(r){let i=n(r);return e(()=>{i.current=r}),t(()=>((...e)=>i.current?.(...e)),[])}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./browser-only-ymFoM3Ya.js";import{t}from"./hooks-lDz_S9UG.js";const n=`(prefers-reduced-motion: no-preference)`;function r(){return!e()||!window.matchMedia?.(n).matches}function i(){return!t(n)}export{i as n,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],t=[`default`,...e];export{e as n,t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useSyncExternalStore as e}from"react";import{t}from"./utils-BlLYcYik.js";function n(){return()=>{}}function r(){return!1}function i(){return e(n,t,r)}export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useEffect as e,useLayoutEffect as t}from"react";import{t as n}from"./browser-only-ymFoM3Ya.js";const r=n()?t:e;export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useEffect as e,useState as t}from"react";function n(){let[n,r]=t(!1);return e(()=>{let e=requestAnimationFrame(()=>{r(!0)});return()=>{cancelAnimationFrame(e)}},[]),n}export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useEffect as e,useLayoutEffect as t,useRef as n}from"react";function r({offset:e,size:t,velocity:n,threshold:r,flickVelocity:i}){return e>0&&(e>=t*r||n>=i)}function i(e,t){return t<=0?0:(1-1/(.55*e/t+1))*t}function a(e,t){switch(t){case`right`:return e.clientX;case`left`:return-e.clientX;case`down`:return e.clientY;case`up`:return-e.clientY}}function o(e,t){return t===`left`||t===`right`?e.clientY:e.clientX}function s(e,t){switch(t){case`right`:return`${e}px`;case`left`:return`${-e}px`;case`down`:return`0 ${e}px`;case`up`:return`0 ${-e}px`}}function c(e,t,n){e.property===`flex-basis`?e.target.style.flexBasis=`${e.size-t}px`:e.target.style.translate=s(t,n)}function l(e){e.target.style.removeProperty(`transition`),e.target.style.removeProperty(e.property===`flex-basis`?`flex-basis`:`translate`)}function u(s,u){let d=n(u);t(()=>{d.current=u}),e(()=>{let e=s.current;if(e==null)return;let t=null,n=!1,u=()=>{document.removeEventListener(`pointermove`,f),document.removeEventListener(`pointerup`,p),document.removeEventListener(`pointercancel`,p),t=null},f=e=>{let{direction:n=`right`}=d.current;if(t==null||e.pointerId!==t.pointerId)return;let r=a(e,n),s=r-t.start;if(!t.dragging){let r=Math.abs(o(e,n)-t.crossStart);if(r>=8&&r>Math.abs(s)){u();return}if(Math.abs(s)<8)return;t.dragging=!0,t.target.style.transition=`none`}let l=e.timeStamp-t.lastTime;l>0&&(t.velocity=(r-t.last)/l),t.last=r,t.lastTime=e.timeStamp,t.offset=Math.max(0,s);let f=s>=0?s:-i(-s,t.size);c(t,f,n)},p=e=>{let{onDismiss:i,threshold:a=.25,flickVelocity:o=.4}=d.current;if(t==null||e.pointerId!==t.pointerId)return;let s=t;if(u(),!s.dragging||(n=!0,window.setTimeout(()=>{n=!1},0),l(s),e.type===`pointercancel`))return;let c=e.timeStamp-s.lastTime>100?0:s.velocity;r({...s,velocity:c,threshold:a,flickVelocity:o})&&i()},m=n=>{let{active:r=!0,direction:i=`right`,property:s=`translate`,target:c}=d.current;if(!(typeof r==`function`?r():r)||!n.isPrimary||n.button!==0||t!=null)return;let l=c?.current??e,u=l.getBoundingClientRect(),m=a(n,i);t={target:l,property:typeof s==`function`?s():s,pointerId:n.pointerId,start:m,crossStart:o(n,i),size:i===`left`||i===`right`?u.width:u.height,dragging:!1,last:m,lastTime:n.timeStamp,velocity:0,offset:0},document.addEventListener(`pointermove`,f),document.addEventListener(`pointerup`,p),document.addEventListener(`pointercancel`,p)},h=e=>{n&&(n=!1,e.preventDefault(),e.stopPropagation())};return e.addEventListener(`pointerdown`,m),e.addEventListener(`click`,h,!0),()=>{t?.dragging&&l(t),u(),e.removeEventListener(`pointerdown`,m),e.removeEventListener(`click`,h,!0)}},[s])}export{u as n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useCallback as e,useRef as t,useSyncExternalStore as n}from"react";function r(r){let i=t(null),a=e(()=>((i.current==null||i.current.query!==r)&&(i.current={query:r,list:window.matchMedia?.(r)}),i.current.list),[r]),o=e(e=>{let t=a();return t?.addEventListener(`change`,e),()=>{t?.removeEventListener(`change`,e)}},[a]),s=e(()=>a()?.matches??!1,[a]);return n(o,s,()=>!1)}export{r as t};
|
package/dist/hooks.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see https://mantle.ngrok.com/hooks
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { RefObject, useLayoutEffect } from "react";
|
|
6
|
+
import { a as PossibleRef, n as MarginType, s as copyToClipboard } from "./in-view-C_daNafg.js";
|
|
7
|
+
import { RefCallback, RefObject, useLayoutEffect } from "react";
|
|
8
8
|
/**
|
|
9
9
|
* Tailwind CSS breakpoints in descending order (largest → smallest).
|
|
10
10
|
*
|
|
@@ -150,7 +150,7 @@ declare function useCallbackRef<T extends (...args: never[]) => unknown>(callbac
|
|
|
150
150
|
* The returned function uses the Clipboard API when available and falls back
|
|
151
151
|
* to a `document.execCommand("copy")` polyfill for older browsers. `await`
|
|
152
152
|
* the call (or attach a `.then()` / `.catch()`) to observe whether the copy
|
|
153
|
-
* succeeded
|
|
153
|
+
* succeeded: the function throws when both the Clipboard API and the
|
|
154
154
|
* polyfill fail, or when called outside of a DOM environment.
|
|
155
155
|
*
|
|
156
156
|
* Inspired by: https://usehooks.com/usecopytoclipboard
|
|
@@ -345,7 +345,7 @@ type UseInertSiblingsOptions = {
|
|
|
345
345
|
*
|
|
346
346
|
* It reaches siblings only, not the rest of the document, so it fits a
|
|
347
347
|
* surface that covers one row of a layout in place: a panel that covers the
|
|
348
|
-
* card and the
|
|
348
|
+
* card and the sidebar beside it, with a notice above the row still usable.
|
|
349
349
|
* Pair it with `useFocusTrap` to keep keyboard focus inside the element.
|
|
350
350
|
*
|
|
351
351
|
* The element must be mounted when `active` turns on; the hook reads the ref
|
|
@@ -372,7 +372,7 @@ type UseInertSiblingsOptions = {
|
|
|
372
372
|
declare function useInertSiblings(ref: RefObject<HTMLElement | null>, { active }?: UseInertSiblingsOptions): void;
|
|
373
373
|
/**
|
|
374
374
|
* Returns `false` during server rendering and the initial hydration render,
|
|
375
|
-
* then `true` on the client
|
|
375
|
+
* then `true` on the client, without hydration mismatches, because React
|
|
376
376
|
* uses the server snapshot for the hydration pass and re-renders once with
|
|
377
377
|
* the client snapshot afterwards.
|
|
378
378
|
*
|
|
@@ -415,9 +415,9 @@ declare function useIsHydrated(): boolean;
|
|
|
415
415
|
* // A persisted-collapsed `open` snaps on load and animates on every later toggle.
|
|
416
416
|
* return (
|
|
417
417
|
* <div
|
|
418
|
-
* data-
|
|
418
|
+
* data-expanded={open ? "" : undefined}
|
|
419
419
|
* data-hydrated={isHydrated ? "" : undefined}
|
|
420
|
-
* className="w-52 transition-[width] data-
|
|
420
|
+
* className="w-52 transition-[width] not-data-expanded:w-13 not-data-hydrated:transition-none"
|
|
421
421
|
* />
|
|
422
422
|
* );
|
|
423
423
|
* }
|
|
@@ -438,7 +438,7 @@ declare function useIsHydratedAfterPaint(): boolean;
|
|
|
438
438
|
* by other Mantle hooks and components.
|
|
439
439
|
*
|
|
440
440
|
* @param effect - The imperative function that may return a cleanup
|
|
441
|
-
* function
|
|
441
|
+
* function, with the same signature as React's `useLayoutEffect` / `useEffect`.
|
|
442
442
|
* @param deps - Optional dependency list, same semantics as
|
|
443
443
|
* `useLayoutEffect`.
|
|
444
444
|
* @returns Nothing.
|
|
@@ -515,7 +515,7 @@ declare function useLocalStorage(key: string, defaultValue: string): readonly [v
|
|
|
515
515
|
* // Detect if the user prefers a dark color scheme
|
|
516
516
|
* const prefersDark = useMatchesMediaQuery("(prefers-color-scheme: dark)");
|
|
517
517
|
*
|
|
518
|
-
* return <div className={prefersDark ? "dark" : "light"}>Hello</div>;
|
|
518
|
+
* return <div className={cx(prefersDark ? "dark" : "light")}>Hello</div>;
|
|
519
519
|
*
|
|
520
520
|
* @example
|
|
521
521
|
* // Show a different layout on portrait orientation
|
|
@@ -564,7 +564,7 @@ declare function useSessionStorage(key: string, defaultValue: string): readonly
|
|
|
564
564
|
*
|
|
565
565
|
* Useful in event handlers, animation entrypoints, or plain functions where
|
|
566
566
|
* a React hook cannot be called. Prefer {@link usePrefersReducedMotion}
|
|
567
|
-
* inside components
|
|
567
|
+
* inside components: it subscribes to live changes.
|
|
568
568
|
*
|
|
569
569
|
* @returns `true` when the user has opted out of animations or when called
|
|
570
570
|
* outside a browser environment (SSR), `false` when motion is allowed.
|
|
@@ -614,11 +614,100 @@ export declare function getPrefersReducedMotion(): boolean;
|
|
|
614
614
|
* return <Carousel autoplay={!prefersReducedMotion} />;
|
|
615
615
|
*/
|
|
616
616
|
export declare function usePrefersReducedMotion(): boolean;
|
|
617
|
+
/**
|
|
618
|
+
* Where a reader is in some content: the child indexes from the content's
|
|
619
|
+
* element down to the deepest element at the top edge of the region that
|
|
620
|
+
* scrolls it, and how far that edge is into the element, as a fraction of its
|
|
621
|
+
* height. A path and a fraction, not a `scrollTop`: the same content laid out
|
|
622
|
+
* at another width wraps differently, so the same text sits at another offset.
|
|
623
|
+
*
|
|
624
|
+
* Treat it as opaque. Hold it in a ref that outlives the content, and pass the
|
|
625
|
+
* ref to {@link useScrollAnchor}.
|
|
626
|
+
*
|
|
627
|
+
* @see https://mantle.ngrok.com/hooks#usescrollanchor
|
|
628
|
+
*/
|
|
629
|
+
type ScrollAnchor = {
|
|
630
|
+
/** The `key` the content had when the anchor was read. */
|
|
631
|
+
key: string | number | undefined;
|
|
632
|
+
path: Array<number>;
|
|
633
|
+
fraction: number;
|
|
634
|
+
/** Pixels from the element's top edge, for an edge in a gap above it. */
|
|
635
|
+
offset: number;
|
|
636
|
+
};
|
|
637
|
+
/**
|
|
638
|
+
* The options for {@link useScrollAnchor}.
|
|
639
|
+
*
|
|
640
|
+
* @see https://mantle.ngrok.com/hooks#usescrollanchor
|
|
641
|
+
*
|
|
642
|
+
* @example
|
|
643
|
+
* ```tsx
|
|
644
|
+
* const anchorContent = useScrollAnchor({ anchorRef: scrollAnchorRef, key: messages.at(-1)?.id });
|
|
645
|
+
* ```
|
|
646
|
+
*/
|
|
647
|
+
type UseScrollAnchorOptions = {
|
|
648
|
+
/**
|
|
649
|
+
* Holds the reader's place between two mounts. Create it above every place
|
|
650
|
+
* that shows the same content, such as in the provider that holds a
|
|
651
|
+
* conversation, so it outlives each of them.
|
|
652
|
+
*/
|
|
653
|
+
anchorRef: RefObject<ScrollAnchor | null>;
|
|
654
|
+
/**
|
|
655
|
+
* Names the content the anchor belongs to. The region scrolls back to the
|
|
656
|
+
* anchor only when the key is the same as when the anchor was read, so a
|
|
657
|
+
* new message or a new conversation scrolls the way the content decides.
|
|
658
|
+
* Pass the id of the last item. Omit it to restore every anchor.
|
|
659
|
+
*/
|
|
660
|
+
key?: string | number;
|
|
661
|
+
};
|
|
662
|
+
/**
|
|
663
|
+
* Keeps the reader's place in some content across a remount, at the same
|
|
664
|
+
* width or another. Returns a ref for the content's element. When the element
|
|
665
|
+
* detaches, the hook writes the reader's place to `anchorRef`; when an element
|
|
666
|
+
* attaches, it scrolls back to that place before the first paint.
|
|
667
|
+
*
|
|
668
|
+
* The region it scrolls is the element itself or its nearest ancestor that
|
|
669
|
+
* can scroll up and down, such as `AppLayout.Body` or `AppLayout.SidePanelBody`,
|
|
670
|
+
* else the document. Fixed and sticky children do not count as the place,
|
|
671
|
+
* and the restore is instant even under `scroll-behavior: smooth`.
|
|
672
|
+
* Until the reader scrolls, a later change of the content's width, such as a
|
|
673
|
+
* sidebar that expands again, restores the place again.
|
|
674
|
+
* Put the ref on an element whose subtree is the same in every place the
|
|
675
|
+
* content shows, such as a transcript's list, so the place reads the same in
|
|
676
|
+
* each.
|
|
677
|
+
*
|
|
678
|
+
* Use it when one piece of content has two homes that a navigation swaps,
|
|
679
|
+
* such as a conversation that is a page on one route and a side panel on the
|
|
680
|
+
* others. The reader finds the same text at the top edge in the new home, and
|
|
681
|
+
* a view transition between the two snapshots the new home already there.
|
|
682
|
+
*
|
|
683
|
+
* Content that scrolls on its own when it changes, such as to the newest
|
|
684
|
+
* message, skips that scroll on mount, or the scroll overrides the anchor.
|
|
685
|
+
* Attach one element for each anchor at a time.
|
|
686
|
+
*
|
|
687
|
+
* @see https://mantle.ngrok.com/hooks#usescrollanchor
|
|
688
|
+
*
|
|
689
|
+
* @example
|
|
690
|
+
* ```tsx
|
|
691
|
+
* function Transcript() {
|
|
692
|
+
* const { messages, scrollAnchorRef } = useConversation();
|
|
693
|
+
* const anchorContent = useScrollAnchor({ anchorRef: scrollAnchorRef, key: messages.at(-1)?.id });
|
|
694
|
+
*
|
|
695
|
+
* return (
|
|
696
|
+
* <ol ref={anchorContent}>
|
|
697
|
+
* {messages.map((message) => (
|
|
698
|
+
* <li key={message.id}>{message.text}</li>
|
|
699
|
+
* ))}
|
|
700
|
+
* </ol>
|
|
701
|
+
* );
|
|
702
|
+
* }
|
|
703
|
+
* ```
|
|
704
|
+
*/
|
|
705
|
+
declare function useScrollAnchor({ anchorRef, key }: UseScrollAnchorOptions): RefCallback<HTMLElement>;
|
|
617
706
|
/**
|
|
618
707
|
* `scroll-behavior` values:
|
|
619
708
|
*
|
|
620
|
-
* - `"auto"
|
|
621
|
-
* - `"smooth"
|
|
709
|
+
* - `"auto"`: scrolling happens instantly (no animation).
|
|
710
|
+
* - `"smooth"`: scrolling animates smoothly using a user-agent–defined easing and duration.
|
|
622
711
|
*
|
|
623
712
|
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior#values
|
|
624
713
|
*/
|
|
@@ -781,8 +870,8 @@ type UseSwipeToDismissOptions = {
|
|
|
781
870
|
* <aside
|
|
782
871
|
* ref={panelRef}
|
|
783
872
|
* aria-label="Assistant"
|
|
784
|
-
* data-
|
|
785
|
-
* className="transition-[translate] duration-200 ease-out-strong motion-reduce:transition-none data-
|
|
873
|
+
* data-open={open ? "" : undefined}
|
|
874
|
+
* className="transition-[translate] duration-200 ease-out-strong motion-reduce:transition-none not-data-open:translate-x-full"
|
|
786
875
|
* >
|
|
787
876
|
* <div ref={headerRef} className="touch-pan-y">
|
|
788
877
|
* Assistant
|
|
@@ -794,6 +883,26 @@ type UseSwipeToDismissOptions = {
|
|
|
794
883
|
* ```
|
|
795
884
|
*/
|
|
796
885
|
declare function useSwipeToDismiss(handle: RefObject<HTMLElement | null>, options: UseSwipeToDismissOptions): void;
|
|
886
|
+
/**
|
|
887
|
+
* A custom hook that composes up to three refs into a single callback ref.
|
|
888
|
+
* Accepts callback refs and RefObject(s). The callback keeps one identity
|
|
889
|
+
* while the refs it composes keep theirs, so React attaches it once per
|
|
890
|
+
* mount. If you pass a new ref on a later render, React detaches the old
|
|
891
|
+
* callback and attaches the new one, so the new ref receives the node at
|
|
892
|
+
* once. A consumer callback ref fires once per mount when the consumer
|
|
893
|
+
* passes the same function each render, and on every render when the
|
|
894
|
+
* consumer passes a new function, as it does on a plain element. Any
|
|
895
|
+
* cleanup the composed ref returns targets the refs it composed (see
|
|
896
|
+
* {@link composeRefs} for the cleanup propagation contract).
|
|
897
|
+
*
|
|
898
|
+
* @example
|
|
899
|
+
* function MyInput({ ref, ...props }: ComponentProps<"input">) {
|
|
900
|
+
* const internalRef = useRef<HTMLInputElement>(null);
|
|
901
|
+
* const composedRef = useComposedRefs(internalRef, ref);
|
|
902
|
+
* return <input ref={composedRef} {...props} />;
|
|
903
|
+
* }
|
|
904
|
+
*/
|
|
905
|
+
declare function useComposedRefs<T>(firstRef: PossibleRef<T>, secondRef: PossibleRef<T>, thirdRef?: PossibleRef<T>): RefCallback<T>;
|
|
797
906
|
/**
|
|
798
907
|
* Options for the `useInView` hook.
|
|
799
908
|
*/
|
|
@@ -882,7 +991,7 @@ type UseUndoRedoReturn<T> = {
|
|
|
882
991
|
/**
|
|
883
992
|
* Generic undo/redo hook that maintains two history stacks (undo and redo).
|
|
884
993
|
*
|
|
885
|
-
* The hook does not own your application state
|
|
994
|
+
* The hook does not own your application state; instead it helps you
|
|
886
995
|
* snapshot it. Call `push(snapshot)` *before* mutating state to capture
|
|
887
996
|
* the current value, then call `undo(current)` or `redo(current)` to swap
|
|
888
997
|
* `current` with the previous/next snapshot. Both `undo` and `redo` return
|
|
@@ -890,7 +999,7 @@ type UseUndoRedoReturn<T> = {
|
|
|
890
999
|
* new snapshot clears the redo stack, matching standard editor semantics.
|
|
891
1000
|
*
|
|
892
1001
|
* `push`, `undo`, and `redo` operate on the live history, so calling them
|
|
893
|
-
* multiple times within a single event handler works as expected
|
|
1002
|
+
* multiple times within a single event handler works as expected: each
|
|
894
1003
|
* call sees the result of the previous one.
|
|
895
1004
|
*
|
|
896
1005
|
* @typeParam T - The type of the value being snapshotted (e.g. a list of
|
|
@@ -948,4 +1057,4 @@ type UseUndoRedoReturn<T> = {
|
|
|
948
1057
|
* );
|
|
949
1058
|
*/
|
|
950
1059
|
declare function useUndoRedo<T extends {}>(): UseUndoRedoReturn<T>;
|
|
951
|
-
export { type Breakpoint, type SwipeDirection, type SwipeProperty, type TailwindBreakpoint, type UseFocusTrapOptions, type UseInViewOptions, type UseInertSiblingsOptions, type UseSwipeToDismissOptions, type UseUndoRedoReturn, breakpoints, useBreakpoint, useCallbackRef, useComposedRefs, useCopyToClipboard, useDebounce, useDebouncedCallback, useFocusTrap, useInView, useInertSiblings, useIsBelowBreakpoint, useIsHydrated, useIsHydratedAfterPaint, useLocalStorage, useSessionStorage, useSwipeToDismiss, useUndoRedo };
|
|
1060
|
+
export { type Breakpoint, type ScrollAnchor, type SwipeDirection, type SwipeProperty, type TailwindBreakpoint, type UseFocusTrapOptions, type UseInViewOptions, type UseInertSiblingsOptions, type UseScrollAnchorOptions, type UseSwipeToDismissOptions, type UseUndoRedoReturn, breakpoints, useBreakpoint, useCallbackRef, useComposedRefs, useCopyToClipboard, useDebounce, useDebouncedCallback, useFocusTrap, useInView, useInertSiblings, useIsBelowBreakpoint, useIsHydrated, useIsHydratedAfterPaint, useLocalStorage, useScrollAnchor, useSessionStorage, useSwipeToDismiss, useUndoRedo };
|
package/dist/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"./hooks-CUYIUcp6.js";import{n as t,t as n}from"./hooks-BsOjpTgs.js";import{t as r}from"./hooks-C9b-2wGy.js";import{t as i}from"./hooks-BybaGF7O.js";import{a,c as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./hooks-BP_uqBsI.js";import{n as p,t as m}from"./hooks-B-Cd15iL.js";import{t as h}from"./hooks-BeLOGKwE.js";import{t as g}from"./hooks-GsDfo7Zl.js";import{t as _}from"./hooks-DejuqCNF.js";import{t as v}from"./hooks-lDz_S9UG.js";import{n as y,t as b}from"./hooks-CMmpICCH.js";import{n as x}from"./hooks-PsYFJkz2.js";import{t as S}from"./compose-refs-Ce1vWUz0.js";export{e as breakpoints,b as getPrefersReducedMotion,n as useBreakpoint,r as useCallbackRef,S as useComposedRefs,i as useCopyToClipboard,o as useDebounce,d as useDebouncedCallback,p as useFocusTrap,c as useInView,m as useInertSiblings,t as useIsBelowBreakpoint,h as useIsHydrated,g as useIsHydratedAfterPaint,_ as useIsomorphicLayoutEffect,l as useLocalStorage,v as useMatchesMediaQuery,y as usePrefersReducedMotion,s as useScrollAnchor,u as useScrollBehavior,a as useSessionStorage,x as useSwipeToDismiss,f as useUndoRedo};
|
|
@@ -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,useState as o}from"react";import{createPortal as s}from"react-dom";import c from"tiny-invariant";import{t as l}from"./compose-refs-Ce1vWUz0.js";import{t as u}from"./cx-CfAFHj5_.js";import{t as d}from"./utils-EM6s2WEU.js";import{t as f}from"./float-JmSzKDHd.js";import{a as p,i as m,n as h,o as g}from"./float-OhVY3cf4.js";import{t as _}from"./layer-container-DDOZJ0fn.js";import{t as v}from"./slot-CBcGhRdV.js";import{jsx as y}from"react/jsx-runtime";const b=e(null);function x(e){let n=t(b);return c(n!=null,`\`HoverCard.${e}\` must be rendered inside \`HoverCard.Root\`.`),n}function S({children:e,closeDelay:t=300,defaultOpen:s=!1,onOpenChange:c,open:l,openDelay:u=100}){let[d,f]=o(s),p=l??d,m=a(void 0),{triggerRef:h,setTrigger:_,onTriggerChangeRef:v}=g(),x=a(null);n(()=>()=>clearTimeout(m.current),[]);let S=r(),C=i(()=>{let e=e=>{clearTimeout(m.current),e!==p&&(l===void 0&&f(e),c?.(e))};return{open:p,setOpen:e,openSoon:()=>{clearTimeout(m.current),m.current=setTimeout(()=>e(!0),u)},closeSoon:()=>{clearTimeout(m.current),m.current=setTimeout(()=>{let t=x.current,n=t?.ownerDocument.getSelection();(t==null||n==null||n.isCollapsed||!t.contains(n.anchorNode))&&e(!1)},t)},cancelPending:()=>clearTimeout(m.current),contentId:S,triggerRef:h,setTrigger:_,onTriggerChangeRef:v,contentRef:x}},[t,S,c,v,p,u,l,_,h]);return/* @__PURE__ */ y(b.Provider,{value:C,children:e})}const C=({asChild:e=!1,"data-slot":t,onBlur:n,onFocus:r,onPointerEnter:i,onPointerLeave:a,onTouchStart:o,ref:s,...c})=>{let u=x(`Trigger`),f=l(s,u.setTrigger);return/* @__PURE__ */ y(e?v:`a`,{"data-slot":d(t,`hover-card-trigger`),ref:f,...c,onPointerEnter:e=>{i?.(e),e.defaultPrevented||e.pointerType!==`touch`&&u.openSoon()},onPointerLeave:e=>{a?.(e),e.defaultPrevented||e.pointerType!==`touch`&&u.closeSoon()},onFocus:e=>{r?.(e),e.defaultPrevented||u.openSoon()},onBlur:e=>{n?.(e),e.defaultPrevented||u.closeSoon()},onTouchStart:e=>{o?.(e),e.defaultPrevented||e.preventDefault()}})},w=({align:e=`center`,className:t,"data-slot":n,onClick:r,onEscapeKeyDown:i,onPointerEnter:a,onPointerLeave:o,ref:c,side:f=`bottom`,sideOffset:g=4,...v})=>{let b=x(`Content`),{portalTarget:S,floatingRef:C,reconcile:w}=m({open:b.open,onDismiss:()=>b.setOpen(!1),getAnchor:()=>b.triggerRef.current,getInsideElements:()=>[b.triggerRef.current],dismissOnOutside:!0,dismissWhenCovered:!0,side:f,align:e,sideOffset:g,onEscapeKeyDown:i});p(b.onTriggerChangeRef,w);let T=l(c,C,b.contentRef);return S!=null&&s(/* @__PURE__ */ y(_,{modal:!1,id:b.contentId,popover:h?`hint`:void 0,"data-slot":d(n,`hover-card-content`),"data-open":b.open?``:void 0,inert:!b.open,className:u(`pointer-events-auto fixed z-50 m-0 inset-auto overflow-visible overscroll-none starting:opacity-0 starting:scale-95 not-data-open:opacity-0 not-data-open:scale-95 transition-[opacity,scale,display,overlay] transition-discrete duration-200 ease-out-strong not-data-open:duration-150 motion-reduce:transition-none`,`bg-popover border-popover w-64 rounded-md border p-4 shadow-md outline-hidden`,t),ref:T,...v,onClick:e=>{e.stopPropagation(),r?.(e)},onPointerEnter:e=>{a?.(e),e.defaultPrevented||b.cancelPending()},onPointerLeave:e=>{o?.(e),e.defaultPrevented||e.pointerType!==`touch`&&b.closeSoon()}}),S)},T=({"data-slot":e,...t})=>/* @__PURE__ */ y(f,{"data-slot":d(e,`hover-card-arrow`),...t});export{C as i,w as n,S as r,T as t};
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parts of the `HoverCard` 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 Side, t as Align } from "./position-Cv3XpSur.js";
|
|
9
|
+
type HoverCardRootProps = {
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
/** The open state, for a controlled hover card. Pair it with `onOpenChange`. */
|
|
12
|
+
open?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The open state on the first render, for an uncontrolled hover card.
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
defaultOpen?: boolean;
|
|
18
|
+
/** Runs when the hover card opens or closes. */
|
|
19
|
+
onOpenChange?: (open: boolean) => void;
|
|
20
|
+
/**
|
|
21
|
+
* How long the pointer or focus rests on the trigger before the card opens, in milliseconds.
|
|
22
|
+
* @default 100
|
|
23
|
+
*/
|
|
24
|
+
openDelay?: number;
|
|
25
|
+
/**
|
|
26
|
+
* How long the card stays open after the pointer or focus leaves, in milliseconds.
|
|
27
|
+
* @default 300
|
|
28
|
+
*/
|
|
29
|
+
closeDelay?: number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* A card that previews the content behind a link when a pointer rests on the
|
|
33
|
+
* link or the link takes focus. This is the root, stateful part that owns the
|
|
34
|
+
* open state and the delays. It renders no element.
|
|
35
|
+
*
|
|
36
|
+
* Use it for sighted pointer users only: a touch never opens it, and a screen
|
|
37
|
+
* reader does not announce it. Keep everything it shows reachable from the link.
|
|
38
|
+
*
|
|
39
|
+
* `HoverCard.Content` is a native `popover="hint"` in the browser's top layer,
|
|
40
|
+
* so it paints above the page and every overlay, and no `overflow` or `z-index`
|
|
41
|
+
* clips it. It closes when an overlay that does not hold it opens.
|
|
42
|
+
*
|
|
43
|
+
* @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardroot
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <HoverCard.Root>
|
|
48
|
+
* <HoverCard.Trigger asChild>
|
|
49
|
+
* <a href="https://ngrok.com">ngrok</a>
|
|
50
|
+
* </HoverCard.Trigger>
|
|
51
|
+
* <HoverCard.Content>
|
|
52
|
+
* <p>Unified ingress for developers.</p>
|
|
53
|
+
* </HoverCard.Content>
|
|
54
|
+
* </HoverCard.Root>
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
declare function Root({ children, closeDelay, defaultOpen, onOpenChange, open: openProp, openDelay }: HoverCardRootProps): import("react").JSX.Element;
|
|
58
|
+
/**
|
|
59
|
+
* The link that opens the hover card when a pointer rests on it or it takes focus.
|
|
60
|
+
*
|
|
61
|
+
* @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardtrigger
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```tsx
|
|
65
|
+
* <HoverCard.Root>
|
|
66
|
+
* <HoverCard.Trigger asChild>
|
|
67
|
+
* <a href="https://ngrok.com">ngrok</a>
|
|
68
|
+
* </HoverCard.Trigger>
|
|
69
|
+
* <HoverCard.Content>
|
|
70
|
+
* <p>Unified ingress for developers.</p>
|
|
71
|
+
* </HoverCard.Content>
|
|
72
|
+
* </HoverCard.Root>
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
declare const Trigger: ({ asChild, "data-slot": dataSlot, onBlur, onFocus, onPointerEnter, onPointerLeave, onTouchStart, ref, ...props }: ComponentProps<"a"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
76
|
+
type HoverCardContentProps = ComponentProps<"div"> & WithDataSlot & {
|
|
77
|
+
/**
|
|
78
|
+
* The side of the trigger the card prefers. It flips to the opposite side
|
|
79
|
+
* when only that side has room.
|
|
80
|
+
* @default "bottom"
|
|
81
|
+
*/
|
|
82
|
+
side?: Side;
|
|
83
|
+
/**
|
|
84
|
+
* How the card lines up with the trigger along `side`.
|
|
85
|
+
* @default "center"
|
|
86
|
+
*/
|
|
87
|
+
align?: Align;
|
|
88
|
+
/**
|
|
89
|
+
* The gap between the trigger and the card, in pixels.
|
|
90
|
+
* @default 4
|
|
91
|
+
*/
|
|
92
|
+
sideOffset?: number;
|
|
93
|
+
/** Runs on Escape while the card is the top float. Call `event.preventDefault()` to keep it open. */
|
|
94
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* The card. It mounts while the hover card is open, as a `popover="hint"`
|
|
98
|
+
* element in the top layer next to `HoverCard.Trigger`. A pointer that moves
|
|
99
|
+
* from the trigger onto the card keeps it open. It closes on Escape and on a
|
|
100
|
+
* press outside it. It portals into the overlay or float that holds it, else
|
|
101
|
+
* into `document.body`.
|
|
102
|
+
*
|
|
103
|
+
* **Data attributes:**
|
|
104
|
+
*
|
|
105
|
+
* | Data Attribute | Value | Description |
|
|
106
|
+
* | -------------- | ---------------------------------------------- | ----------------------------------------------- |
|
|
107
|
+
* | `data-slot` | `"hover-card-content"` | On the card, with any composing part's chain ahead of it. |
|
|
108
|
+
* | `data-open` | present while open | Presence-only. Absent while the exit transition plays. |
|
|
109
|
+
* | `data-side` | `"top"` \| `"right"` \| `"bottom"` \| `"left"` | The side of the trigger the card resolved to. |
|
|
110
|
+
*
|
|
111
|
+
* @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardcontent
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```tsx
|
|
115
|
+
* <HoverCard.Root>
|
|
116
|
+
* <HoverCard.Trigger asChild>
|
|
117
|
+
* <a href="https://ngrok.com">ngrok</a>
|
|
118
|
+
* </HoverCard.Trigger>
|
|
119
|
+
* <HoverCard.Content>
|
|
120
|
+
* <p>Unified ingress for developers.</p>
|
|
121
|
+
* </HoverCard.Content>
|
|
122
|
+
* </HoverCard.Root>
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
declare const Content: ({ align, className, "data-slot": dataSlot, onClick, onEscapeKeyDown, onPointerEnter, onPointerLeave, ref, side, sideOffset, ...props }: HoverCardContentProps) => false | import("react").ReactPortal;
|
|
126
|
+
type HoverCardArrowProps = Omit<ComponentProps<"svg">, "children" | "width" | "height"> & WithDataSlot & {
|
|
127
|
+
/**
|
|
128
|
+
* The width of the arrow, in pixels.
|
|
129
|
+
* @default 14
|
|
130
|
+
*/
|
|
131
|
+
width?: number;
|
|
132
|
+
/**
|
|
133
|
+
* The height of the arrow, in pixels.
|
|
134
|
+
* @default 7
|
|
135
|
+
*/
|
|
136
|
+
height?: number;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* An optional tip that points from `HoverCard.Content` at its trigger. Render
|
|
140
|
+
* it as a direct child of `HoverCard.Content`. It moves to the edge of the card
|
|
141
|
+
* that faces the trigger and centers on the trigger, also after the card flips
|
|
142
|
+
* or shifts.
|
|
143
|
+
*
|
|
144
|
+
* @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardarrow
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```tsx
|
|
148
|
+
* <HoverCard.Root>
|
|
149
|
+
* <HoverCard.Trigger asChild>
|
|
150
|
+
* <a href="https://ngrok.com">ngrok</a>
|
|
151
|
+
* </HoverCard.Trigger>
|
|
152
|
+
* <HoverCard.Content>
|
|
153
|
+
* <HoverCard.Arrow />
|
|
154
|
+
* <p>Unified ingress for developers.</p>
|
|
155
|
+
* </HoverCard.Content>
|
|
156
|
+
* </HoverCard.Root>
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
declare const Arrow: ({ "data-slot": dataSlot, ...props }: HoverCardArrowProps) => import("react").JSX.Element;
|
|
160
|
+
export { Arrow, Content, Root, Trigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{t as Arrow,n as Content,r as Root,i as Trigger}from"./hover-card-BEC5EQiH.js";
|