@ngrok/mantle 0.94.1 → 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 +2 -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 +4 -395
- package/dist/accordion.js +1 -1
- package/dist/agent.json +409 -42
- package/dist/alert-DCGSrVTa.js +1 -0
- package/dist/{alert-D0zRRUHV.d.ts → alert-Dz541Ve9.d.ts} +7 -193
- 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 +6 -587
- 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 +2 -1065
- 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 +1 -1
- 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 +4 -579
- 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 +3 -275
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +3 -2
- 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 +53 -543
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only-CokCtIvB.js +1 -0
- package/dist/browser-only.js +1 -1
- package/dist/button-Bqm7U0OC.js +1 -0
- package/dist/{button-5Pc7Mby_.d.ts → button-C6-6TecO.d.ts} +4 -4
- package/dist/{button-DnYv7IOT.d.ts → button-CL17Dxza.d.ts} +7 -5
- package/dist/button-CRCiBPEF.js +1 -0
- package/dist/{button-Ddj6yr10.d.ts → button-CRMoQyum.d.ts} +2 -3
- 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 +2 -299
- 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-Dl8gFo_D.d.ts → chart-XvStK-oM.d.ts} +3 -79
- 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 +59 -8
- package/dist/checkbox.js +1 -1
- package/dist/{choice-CNiOSzqV.d.ts → choice-BekuLm-b.d.ts} +16 -204
- 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-CKzsAMzj.js → code-block-B-xD4_RW.js} +3 -3
- 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-BDw6MEwH.d.ts → code-block-Cs1Lcmdr.d.ts} +81 -252
- 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 -691
- 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 +1 -1
- 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 +2 -465
- 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 +71 -1115
- package/dist/command.js +1 -1
- 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 +20 -14
- package/dist/cx.js +1 -1
- 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 +12 -1208
- 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 +1 -1
- 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-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 +96 -7
- 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 +8 -280
- package/dist/hover-card.js +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-QCm1ui29.d.ts → icon-Dqn_LLrR.d.ts} +1 -1
- package/dist/{icon-DuIYoyft.d.ts → icon-KTcDR4--.d.ts} +1 -1
- package/dist/icon.d.ts +2 -2
- 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.js +1 -1
- 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-DC4nW0Sr.d.ts → input-Bvpu3ruQ.d.ts} +1 -1
- package/dist/input.d.ts +2 -2
- package/dist/input.js +1 -1
- package/dist/kbd-Bz_Rbpv8.js +1 -0
- package/dist/kbd.d.ts +1 -1
- package/dist/kbd.js +1 -1
- package/dist/{label-epgtywRz.d.ts → label-DZpKu3Pu.d.ts} +1 -1
- 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 +9 -1
- 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 +4 -568
- 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 +3 -400
- package/dist/list.js +1 -1
- package/dist/live-region-78gbKwlB.js +1 -0
- package/dist/live-region.d.ts +1 -1
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +33 -10
- package/dist/main-9d96oUPG.js +1 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +1287 -893
- package/dist/media-object-parts.d.ts +65 -0
- package/dist/media-object-parts.js +1 -0
- package/dist/media-object.d.ts +2 -118
- 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 +38 -303
- 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.js +1 -1
- package/dist/query-parts.d.ts +6 -0
- package/dist/query-parts.js +1 -0
- package/dist/query.d.ts +3 -637
- package/dist/query.js +1 -1
- package/dist/radio-group-B9jtIbV1.d.ts +39 -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 +3 -438
- 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 +4 -573
- 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 +3 -643
- package/dist/selectable-list.js +1 -1
- package/dist/separator-BB1ohsjn.js +1 -0
- package/dist/{separator-Ck4sPrdN.d.ts → separator-BzHNVyyv.d.ts} +1 -1
- 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 -1224
- package/dist/sheet.js +1 -1
- package/dist/sidebar-CsC9fyPL.js +1 -0
- package/dist/sidebar-HDVxTNPi.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 +1 -1
- 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 +149 -15
- 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-BEMQMbk3.d.ts → slot-tuk2J6bY.d.ts} +6 -23
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -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 +4 -493
- package/dist/strata.js +1 -1
- package/dist/switch-DajWYrq3.js +1 -0
- package/dist/switch.d.ts +36 -4
- package/dist/switch.js +1 -1
- package/dist/{table-Ii9hHUWN.d.ts → table-C2KnE83u.d.ts} +5 -444
- 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 +1 -1
- 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 +23 -19
- package/dist/theme-switcher.js +1 -1
- package/dist/theme-xoFnLba6.js +1 -0
- package/dist/theme.d.ts +70 -65
- 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 +31 -266
- package/dist/tokens.json +139 -205
- 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 +3 -5
- 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/utils.js +1 -1
- package/dist/visually-hidden.d.ts +1 -1
- 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 +15 -18
- package/dist/alert-BkJHDx9X.js +0 -1
- package/dist/anchor-Dc6IgvXV.js +0 -1
- package/dist/browser-only-CZfkNw5A.js +0 -1
- package/dist/button-B9bChDgl.js +0 -1
- package/dist/button-BQZ6eoD3.js +0 -1
- package/dist/button-D8jixIbH.js +0 -1
- package/dist/button-DNLTJ32M.js +0 -1
- package/dist/chart-BLCqzt56.js +0 -1
- package/dist/chart-CChZiCrt.js +0 -1
- package/dist/chart-CUmSu9d7.js +0 -1
- package/dist/chart-DtgZBAas.js +0 -2
- package/dist/checkbox-Cu5cgZmk.js +0 -1
- package/dist/choice-CCVG2hb9.js +0 -1
- package/dist/clsx-DUGZgXfJ.js +0 -1
- package/dist/clsx-Dj3RWZ2l.js +0 -1
- package/dist/code-BPKNY1_w.js +0 -1
- package/dist/cx-CK7o_rVv.js +0 -1
- package/dist/dialog-CIEuwNys.d.ts +0 -958
- package/dist/dialog-CbEEA0fl.d.ts +0 -32
- package/dist/dialog-DmzoDfY3.js +0 -1
- package/dist/dropdown-menu-CeY498yk.d.ts +0 -775
- package/dist/dropdown-menu-uheL0prz.js +0 -1
- package/dist/field-Bpvn4tQp.js +0 -1
- package/dist/field-Cai_4c1l.js +0 -1
- package/dist/icon-BudQMD2S.js +0 -1
- package/dist/icon-xb7d9M7X.js +0 -1
- package/dist/icons-DEDCLZ8B.js +0 -1
- package/dist/icons-DXadFwpo.js +0 -1
- package/dist/icons-DcesO4Ng.js +0 -1
- package/dist/input-DQyN6gN0.js +0 -1
- package/dist/input-fW8QSZEO.js +0 -1
- package/dist/interactive-target-BXScNeOr.js +0 -1
- package/dist/kbd-P1nQshWo.js +0 -1
- package/dist/label-DO1RlMKl.js +0 -1
- package/dist/layer-container-DL4yclOu.js +0 -1
- package/dist/list-cQZPSjfz.js +0 -1
- package/dist/live-region-Dhapu8a5.js +0 -1
- package/dist/main-CHyWYDak.js +0 -1
- package/dist/popover-Bei0jyfH.d.ts +0 -357
- package/dist/popover-DhgunktK.js +0 -1
- package/dist/popover-T2EyaqGK.d.ts +0 -1
- package/dist/primitive-D8CzV_Ft.js +0 -1
- package/dist/radio-group-BJQ6EOqh.d.ts +0 -27
- package/dist/radio-group-ggEkCi0V.js +0 -1
- package/dist/sandboxed-on-click-D4PL5_GR.js +0 -1
- package/dist/select-1xuUx_os.js +0 -1
- package/dist/select-BpaXHxJm.d.ts +0 -890
- package/dist/separator-DnvhwY2J.js +0 -1
- package/dist/shake-CAUpKBHe.js +0 -1
- package/dist/sheet-DHy_vlme.js +0 -1
- package/dist/skeleton-DHfyjuQi.js +0 -1
- package/dist/slot-B7rwscwd.js +0 -1
- package/dist/table-BnLdXUai.js +0 -1
- package/dist/theme-BNdZl352.js +0 -1
- package/dist/tooltip-CstGDKwy.d.ts +0 -283
- package/dist/tooltip-DQO40Mrq.js +0 -1
- package/dist/use-breakpoint-B4Kh0xE6.js +0 -1
- package/dist/use-callback-ref-DiOXFQzM.js +0 -1
- package/dist/use-composed-refs-DPYmLDSe.js +0 -1
- package/dist/use-copy-to-clipboard-hBL6_65i.js +0 -1
- package/dist/use-inert-siblings-C4RHXrZc.js +0 -1
- package/dist/use-is-apple-platform-Bq6_KbVX.js +0 -1
- package/dist/use-is-hydrated-after-paint-CrHt3OHw.js +0 -1
- package/dist/use-isomorphic-layout-effect-CL6iq0Bj.js +0 -1
- package/dist/use-matches-media-query-FfvtNKQe.js +0 -1
- package/dist/use-prefers-reduced-motion-Ck6dnOM9.js +0 -1
- package/dist/use-swipe-to-dismiss-BYdlca8r.js +0 -1
- /package/dist/{use-is-hydrated-BeLOGKwE.js → hooks-BeLOGKwE.js} +0 -0
- /package/dist/{suggestions-Ciz2vaJO.js → query-filter-Ciz2vaJO.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/{copy-to-clipboard-Dd83caRw.js → utils-Dd83caRw.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/sidebar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{t as e}from"./use-callback-ref-DiOXFQzM.js";import{r as t}from"./use-breakpoint-B4Kh0xE6.js";import{n,t as r}from"./use-is-apple-platform-Bq6_KbVX.js";import{t as i}from"./use-is-hydrated-after-paint-CrHt3OHw.js";import{t as a}from"./cx-CK7o_rVv.js";import{t as o}from"./data-slot-EM6s2WEU.js";import{t as s}from"./button-B9bChDgl.js";import{n as c}from"./separator-DnvhwY2J.js";import{t as l}from"./sheet-DHy_vlme.js";import{t as u}from"./slot-B7rwscwd.js";import{t as d}from"./tooltip-DQO40Mrq.js";import{n as f}from"./cookie-ca4g5CKp.js";import{c as p}from"react/compiler-runtime";import{createContext as m,useContext as h,useEffect as g,useId as _,useLayoutEffect as v,useRef as y,useState as b}from"react";import x from"tiny-invariant";import{Fragment as S,jsx as C,jsxs as w}from"react/jsx-runtime";import{SidebarSimpleIcon as T}from"@phosphor-icons/react/SidebarSimple";const E={sm:`max-sm:not-data-hydrated:hidden`,md:`max-md:not-data-hydrated:hidden`,lg:`max-lg:not-data-hydrated:hidden`},D=`duration-200 ease-out-strong motion-reduce:transition-none group-not-data-hydrated/sidebar-nav:transition-none`,O=m(null);function k(){let e=h(O);return x(e,`useSidebar must be used within Sidebar.Root.`),e}function A(e){let t=h(O);return x(t,`Sidebar.${e} must be rendered inside Sidebar.Root.`),t}const j=[];function M(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.tagName===`SELECT`:!1}function N(){let e=Symbol(`sidebar-keyboard-shortcut`);return j.push(e),{isOwner:()=>j[0]===e,release:()=>{let t=j.indexOf(e);t!==-1&&j.splice(t,1)}}}const P=r=>{let i=p(35),{children:a,defaultOpen:o,keyboardShortcut:s,mobileBreakpoint:c,onOpenChange:l,onOpenMobileChange:u,open:d,openMobile:f}=r,m=o===void 0||o,h=s===void 0||s,x=c===void 0?`lg`:c,S=t(x),w=_(),T=y(l),E=y(u),D;i[0]!==l||i[1]!==u?(D=()=>{T.current=l,E.current=u},i[0]=l,i[1]=u,i[2]=D):D=i[2],v(D);let k=d!=null,[A,j]=b(m),P=k?d:A,F;i[3]===k?F=i[4]:(F=e=>{k||j(e),T.current?.(e)},i[3]=k,i[4]=F);let I=F,L=f!=null,[R,z]=b(!1),B=L?f:R,V;i[5]===L?V=i[6]:(V=e=>{L||z(e),E.current?.(e)},i[5]=L,i[6]=V);let H=V,U=y(S),W,G;i[7]!==S||i[8]!==B||i[9]!==H?(W=()=>{let e=U.current&&!S;U.current=S,e&&B&&H(!1)},G=[S,B,H],i[7]=S,i[8]=B,i[9]=H,i[10]=W,i[11]=G):(W=i[10],G=i[11]),g(W,G);let K;i[12]!==S||i[13]!==P||i[14]!==B||i[15]!==I||i[16]!==H?(K=()=>{S?H(!B):I(!P)},i[12]=S,i[13]=P,i[14]=B,i[15]=I,i[16]=H,i[17]=K):K=i[17];let q=K,J=e(q),Y,X;i[18]!==h||i[19]!==J?(Y=()=>{if(!h)return;let e=N(),t=n(),r=n=>{if(!e.isOwner()||n.defaultPrevented||M(n.target))return;let r=t?n.metaKey:n.ctrlKey,i=t?n.ctrlKey:n.metaKey;n.key?.toLowerCase()===`b`&&r&&!i&&!n.altKey&&!n.shiftKey&&(n.preventDefault(),J())};return window.addEventListener(`keydown`,r),()=>{window.removeEventListener(`keydown`,r),e.release()}},X=[h,J],i[18]=h,i[19]=J,i[20]=Y,i[21]=X):(Y=i[20],X=i[21]),g(Y,X);let Z;i[22]!==S||i[23]!==h||i[24]!==x||i[25]!==w||i[26]!==P||i[27]!==B||i[28]!==I||i[29]!==H||i[30]!==q?(Z={isMobile:S,keyboardShortcut:h,mobileBreakpoint:x,navId:w,open:P,openMobile:B,setOpen:I,setOpenMobile:H,toggle:q},i[22]=S,i[23]=h,i[24]=x,i[25]=w,i[26]=P,i[27]=B,i[28]=I,i[29]=H,i[30]=q,i[31]=Z):Z=i[31];let Q=Z,$;return i[32]!==a||i[33]!==Q?($=/* @__PURE__ */ C(O.Provider,{value:Q,children:a}),i[32]=a,i[33]=Q,i[34]=$):$=i[34],$},F=e=>{let t=p(48),n,r,s,c,u,d;t[0]===e?(n=t[1],r=t[2],s=t[3],c=t[4],u=t[5],d=t[6]):({"aria-label":n,"aria-labelledby":r,children:s,className:c,"data-slot":u,...d}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=s,t[4]=c,t[5]=u,t[6]=d);let{isMobile:f,mobileBreakpoint:m,navId:h,open:g,openMobile:_,setOpenMobile:v}=A(`Nav`),y=i(),b=n??(r==null?`Main`:void 0);if(f){let e;t[7]===u?e=t[8]:(e=o(u,`sidebar-nav`),t[7]=u,t[8]=e);let n;t[9]===r?n=t[10]:(n=r==null?null:{"aria-labelledby":r},t[9]=r,t[10]=n);let i;t[11]===c?i=t[12]:(i=a(`bg-base w-(--sidebar-width-mobile,18rem) max-w-full p-0`,c),t[11]=c,t[12]=i);let f=b??`Sidebar`,p;t[13]===f?p=t[14]:(p=/* @__PURE__ */ C(l.Title,{className:`sr-only`,children:f}),t[13]=f,t[14]=p);let m;t[15]!==b||t[16]!==r||t[17]!==s||t[18]!==h?(m=/* @__PURE__ */ C(`nav`,{id:h,"aria-label":b,"aria-labelledby":r,className:`flex h-full w-full min-w-0 flex-col text-sm`,children:s}),t[15]=b,t[16]=r,t[17]=s,t[18]=h,t[19]=m):m=t[19];let g;t[20]!==d||t[21]!==e||t[22]!==n||t[23]!==i||t[24]!==p||t[25]!==m?(g=/* @__PURE__ */ w(l.Content,{side:`left`,preferredWidth:`sm:max-w-(--sidebar-width-mobile,18rem)`,"data-slot":e,"data-mobile":``,...n,className:i,...d,children:[p,m]}),t[20]=d,t[21]=e,t[22]=n,t[23]=i,t[24]=p,t[25]=m,t[26]=g):g=t[26];let y;return t[27]!==_||t[28]!==v||t[29]!==g?(y=/* @__PURE__ */ C(l.Root,{open:_,onOpenChange:v,children:g}),t[27]=_,t[28]=v,t[29]=g,t[30]=y):y=t[30],y}let x;t[31]===u?x=t[32]:(x=o(u,`sidebar-nav`),t[31]=u,t[32]=x);let S=E[m],T;t[33]!==c||t[34]!==S?(T=a(`group/sidebar-nav bg-base relative h-full w-(--sidebar-width,13rem) shrink-0 overflow-hidden`,`data-[state=collapsed]:w-(--sidebar-width-icon,3.25rem)`,S,`transition-[width] duration-200 ease-out-strong motion-reduce:transition-none not-data-hydrated:transition-none`,c),t[33]=c,t[34]=S,t[35]=T):T=t[35];let D=g?`expanded`:`collapsed`,O=y?``:void 0,k;t[36]!==b||t[37]!==r||t[38]!==s||t[39]!==h?(k=/* @__PURE__ */ C(`nav`,{id:h,"aria-label":b,"aria-labelledby":r,className:`absolute inset-y-0 left-0 flex w-full min-w-0 flex-col text-sm`,children:s}),t[36]=b,t[37]=r,t[38]=s,t[39]=h,t[40]=k):k=t[40];let j;return t[41]!==d||t[42]!==x||t[43]!==T||t[44]!==D||t[45]!==O||t[46]!==k?(j=/* @__PURE__ */ C(`div`,{"data-slot":x,className:T,...d,"data-state":D,"data-hydrated":O,children:k}),t[41]=d,t[42]=x,t[43]=T,t[44]=D,t[45]=O,t[46]=k,t[47]=j):j=t[47],j},I=/* @__PURE__ */ C(T,{}),L=e=>{let t=p(7),{label:n,shortcut:r}=e,i;t[0]===n?i=t[1]:(i=/* @__PURE__ */ C(`span`,{"data-slot":`sidebar-tooltip-label`,className:`contents`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r!=null&&/* @__PURE__ */ C(`span`,{"aria-hidden":!0,"data-slot":`sidebar-tooltip-shortcut`,className:`inline-flex shrink-0 items-center gap-0.5 [&_kbd]:h-4 [&_kbd]:min-w-4 [&_kbd]:bg-neutral-500/25 [&_kbd]:px-0.5 [&_kbd]:text-xs`,translate:`no`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=/* @__PURE__ */ w(`span`,{"data-slot":`sidebar-tooltip-row`,className:`flex items-center gap-1.5`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o},R=e=>{let t=p(34),n,i,a,c,l,u,f,m,h;t[0]===e?(n=t[1],i=t[2],a=t[3],c=t[4],l=t[5],u=t[6],f=t[7],m=t[8],h=t[9]):({appearance:l,"data-slot":n,icon:u,intent:f,label:m,onClick:i,shortcut:c,size:h,...a}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=c,t[5]=l,t[6]=u,t[7]=f,t[8]=m,t[9]=h);let g=l===void 0?`ghost`:l,_=u===void 0?I:u,v=f===void 0?`neutral`:f,y=m===void 0?`Toggle Sidebar`:m,b=h===void 0?`sm`:h,{isMobile:x,keyboardShortcut:S,navId:T,open:E,openMobile:D,toggle:O}=A(`Trigger`),k=r(),j=x?D:E,M=!x||D,N=S?c:void 0,P=k?`Meta+B`:`Control+B`,F=M?T:void 0,R=S?P:void 0,z;t[10]===n?z=t[11]:(z=o(n,`sidebar-trigger`),t[10]=n,t[11]=z);let B=j?`expanded`:`collapsed`,V;t[12]!==i||t[13]!==O?(V=e=>{i?.(e),e.defaultPrevented||O()},t[12]=i,t[13]=O,t[14]=V):V=t[14];let H;t[15]!==g||t[16]!==j||t[17]!==_||t[18]!==v||t[19]!==y||t[20]!==a||t[21]!==b||t[22]!==V||t[23]!==F||t[24]!==R||t[25]!==z||t[26]!==B?(H=/* @__PURE__ */ C(d.Trigger,{asChild:!0,children:/* @__PURE__ */ C(s,{appearance:g,"aria-controls":F,"aria-expanded":j,"aria-keyshortcuts":R,"data-slot":z,"data-state":B,icon:_,intent:v,label:y,onClick:V,size:b,...a})}),t[15]=g,t[16]=j,t[17]=_,t[18]=v,t[19]=y,t[20]=a,t[21]=b,t[22]=V,t[23]=F,t[24]=R,t[25]=z,t[26]=B,t[27]=H):H=t[27];let U;t[28]!==N||t[29]!==y?(U=/* @__PURE__ */ C(d.Content,{"data-slot":`sidebar-trigger-tooltip`,children:/* @__PURE__ */ C(L,{label:y,shortcut:N})}),t[28]=N,t[29]=y,t[30]=U):U=t[30];let W;return t[31]!==H||t[32]!==U?(W=/* @__PURE__ */ w(d.Root,{children:[H,U]}),t[31]=H,t[32]=U,t[33]=W):W=t[33],W},z=e=>{let t=p(16),n,r,i,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5]):({asChild:n,children:r,className:i,"data-slot":s,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c);let l=n?u:`div`,d;t[6]===s?d=t[7]:(d=o(s,`sidebar-header`),t[6]=s,t[7]=d);let f;t[8]===i?f=t[9]:(f=a(`grid grid-cols-1 grid-rows-(--sidebar-header-height,4.5rem) shrink-0 items-center px-3`,`group-data-[state=expanded]/sidebar-nav:pr-1`,i),t[8]=i,t[9]=f);let m;return t[10]!==l||t[11]!==r||t[12]!==c||t[13]!==d||t[14]!==f?(m=/* @__PURE__ */ C(l,{"data-slot":d,className:f,...c,children:r}),t[10]=l,t[11]=r,t[12]=c,t[13]=d,t[14]=f,t[15]=m):m=t[15],m},B=e=>{let t=p(16),n,r,i,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5]):({asChild:n,children:r,className:i,"data-slot":s,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c);let l=n?u:`div`,d;t[6]===s?d=t[7]:(d=o(s,`sidebar-body`),t[6]=s,t[7]=d);let f;t[8]===i?f=t[9]:(f=a(`scrollbar scrollbar-gutter-stable scroll-fade-y flex-1 scroll-py-6 space-y-2 overflow-y-auto overflow-x-hidden px-3 pt-1.5 pb-4`,`group-data-[state=expanded]/sidebar-nav:pr-1`,`transition-[padding]`,D,`group-data-[state=collapsed]/sidebar-nav:scrollbar-none`,`group-data-[state=collapsed]/sidebar-nav:scrollbar-gutter-auto`,`group-data-[state=collapsed]/sidebar-nav:[&::-webkit-scrollbar]:hidden`,i),t[8]=i,t[9]=f);let m;return t[10]!==l||t[11]!==r||t[12]!==c||t[13]!==d||t[14]!==f?(m=/* @__PURE__ */ C(l,{"data-slot":d,className:f,...c,children:r}),t[10]=l,t[11]=r,t[12]=c,t[13]=d,t[14]=f,t[15]=m):m=t[15],m},V=e=>{let t=p(16),n,r,i,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5]):({asChild:n,children:r,className:i,"data-slot":s,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c);let l=n?u:`div`,d;t[6]===s?d=t[7]:(d=o(s,`sidebar-footer`),t[6]=s,t[7]=d);let f;t[8]===i?f=t[9]:(f=a(`shrink-0 px-3 pt-3 pb-3.5`,`group-data-[state=expanded]/sidebar-nav:pr-1`,i),t[8]=i,t[9]=f);let m;return t[10]!==l||t[11]!==r||t[12]!==c||t[13]!==d||t[14]!==f?(m=/* @__PURE__ */ C(l,{"data-slot":d,className:f,...c,children:r}),t[10]=l,t[11]=r,t[12]=c,t[13]=d,t[14]=f,t[15]=m):m=t[15],m},H=m(null),U=e=>{let t=p(21),n,r,i,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5]):({asChild:n,children:r,className:i,"data-slot":s,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c);let[l,d]=b(null),f;t[6]===l?f=t[7]:(f={mountedLabelId:l,setMountedLabelId:d},t[6]=l,t[7]=f);let m=f,h=n?u:`div`,g;t[8]===s?g=t[9]:(g=o(s,`sidebar-group`),t[8]=s,t[9]=g);let _;t[10]===i?_=t[11]:(_=a(`pt-0.5`,i),t[10]=i,t[11]=_);let v;t[12]!==h||t[13]!==r||t[14]!==c||t[15]!==g||t[16]!==_?(v=/* @__PURE__ */ C(h,{"data-slot":g,className:_,...c,children:r}),t[12]=h,t[13]=r,t[14]=c,t[15]=g,t[16]=_,t[17]=v):v=t[17];let y;return t[18]!==m||t[19]!==v?(y=/* @__PURE__ */ C(H.Provider,{value:m,children:v}),t[18]=m,t[19]=v,t[20]=y):y=t[20],y},W=e=>{let t=p(22),n,r,i,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5],l=t[6]):({asChild:n,children:r,className:i,"data-slot":s,id:c,...l}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l);let d=h(H),f=_(),m=c??(d==null?void 0:f),v=d?.setMountedLabelId,y,b;t[7]!==m||t[8]!==v?(y=()=>{if(v!=null&&m!=null)return v(m),()=>{v(null)}},b=[v,m],t[7]=m,t[8]=v,t[9]=y,t[10]=b):(y=t[9],b=t[10]),g(y,b);let x=n?u:`div`,S;t[11]===s?S=t[12]:(S=o(s,`sidebar-group-label`),t[11]=s,t[12]=S);let w;t[13]===i?w=t[14]:(w=a(`text-muted flex min-w-0 items-center gap-2 truncate px-2 py-1 text-xs font-medium`,`group-data-[state=collapsed]/sidebar-nav:opacity-0`,`group-data-[state=collapsed]/sidebar-nav:pointer-events-none`,`transition-opacity`,D,i),t[13]=i,t[14]=w);let T;return t[15]!==x||t[16]!==r||t[17]!==m||t[18]!==l||t[19]!==S||t[20]!==w?(T=/* @__PURE__ */ C(x,{id:m,"data-slot":S,className:w,...l,children:r}),t[15]=x,t[16]=r,t[17]=m,t[18]=l,t[19]=S,t[20]=w,t[21]=T):T=t[21],T},G=e=>{let t=p(18),n,r,i,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5],l=t[6]):({"aria-labelledby":n,asChild:r,children:i,className:s,"data-slot":c,...l}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l);let d=h(H),f=r?u:`ul`,m=n??d?.mountedLabelId??void 0,g;t[7]===c?g=t[8]:(g=o(c,`sidebar-list`),t[7]=c,t[8]=g);let _;t[9]===s?_=t[10]:(_=a(`mb-2 space-y-px`,s),t[9]=s,t[10]=_);let v;return t[11]!==f||t[12]!==i||t[13]!==l||t[14]!==m||t[15]!==g||t[16]!==_?(v=/* @__PURE__ */ C(f,{"aria-labelledby":m,"data-slot":g,className:_,...l,children:i}),t[11]=f,t[12]=i,t[13]=l,t[14]=m,t[15]=g,t[16]=_,t[17]=v):v=t[17],v},K=e=>{let t=p(16),n,r,i,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5]):({asChild:n,children:r,className:i,"data-slot":s,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c);let l=n?u:`li`,d;t[6]===s?d=t[7]:(d=o(s,`sidebar-item`),t[6]=s,t[7]=d);let f;t[8]===i?f=t[9]:(f=a(`list-none`,i),t[8]=i,t[9]=f);let m;return t[10]!==l||t[11]!==r||t[12]!==c||t[13]!==d||t[14]!==f?(m=/* @__PURE__ */ C(l,{"data-slot":d,className:f,...c,children:r}),t[10]=l,t[11]=r,t[12]=c,t[13]=d,t[14]=f,t[15]=m):m=t[15],m},q=[`ring-focus-accent flex w-full min-w-0 items-center gap-2 truncate rounded-md px-2 py-1 text-left font-normal focus:outline-hidden focus-visible:ring-4`,`text-body hover:text-strong hover:bg-neutral-500/10`,`data-state-open:bg-neutral-500/15 data-state-open:text-strong`,`aria-expanded:bg-neutral-500/15 aria-expanded:text-strong`,`group-data-[state=collapsed]/sidebar-nav:ml-1`,`group-data-[state=collapsed]/sidebar-nav:w-7`,`group-data-[state=collapsed]/sidebar-nav:p-1`,`group-data-[state=collapsed]/sidebar-nav:text-clip`,`transition-[width,padding,margin] ${D}`].join(` `),J={Root:P,Nav:F,Trigger:R,Header:z,Body:B,Footer:V,Group:U,GroupLabel:W,List:G,Item:K,ItemButton:e=>{let t=p(21),n,r,i,s,c,l,d;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5],l=t[6],d=t[7]):({asChild:n,children:r,className:i,current:s,"data-slot":c,type:d,...l}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l,t[7]=d);let f=n?u:`button`,m;t[8]===c?m=t[9]:(m=o(c,`sidebar-item-button`),t[8]=c,t[9]=m);let h=s?``:void 0,g=s?`page`:void 0,_=n?d:d??`button`,v;t[10]===i?v=t[11]:(v=a(q,`data-current:bg-neutral-500/15 data-current:text-strong`,`aria-[current=page]:bg-neutral-500/15 aria-[current=page]:text-strong`,`[&>svg]:text-muted hover:[&>svg]:text-strong data-current:[&>svg]:text-strong aria-[current=page]:[&>svg]:text-strong [&>svg:first-child]:size-5 [&>svg]:shrink-0`,i),t[10]=i,t[11]=v);let y;return t[12]!==f||t[13]!==r||t[14]!==l||t[15]!==m||t[16]!==h||t[17]!==g||t[18]!==_||t[19]!==v?(y=/* @__PURE__ */ C(f,{"data-slot":m,"data-current":h,"aria-current":g,type:_,className:v,...l,children:r}),t[12]=f,t[13]=r,t[14]=l,t[15]=m,t[16]=h,t[17]=g,t[18]=_,t[19]=v,t[20]=y):y=t[20],y},SearchTrigger:e=>{let t=p(23),n,r,i,s,c,l,d;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5],l=t[6],d=t[7]):({asChild:n,children:r,className:i,"data-slot":s,shortcut:l,type:d,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l,t[7]=d);let f=n?u:`button`,m;t[8]!==n||t[9]!==r||t[10]!==l?(m=n?r:/* @__PURE__ */ w(S,{children:[/* @__PURE__ */ C(`span`,{"data-slot":`sidebar-search-trigger-label`,className:`contents`,children:r}),/* @__PURE__ */ C(`span`,{"aria-hidden":!0,"data-slot":`sidebar-search-trigger-shortcut`,translate:`no`,className:a(`pointer-events-none -mr-1 ml-auto inline-flex shrink-0 items-center gap-0.5 opacity-0 select-none`,`group-hover:opacity-100 group-focus-visible:opacity-100`,`group-data-[state=collapsed]/sidebar-nav:hidden`,`[&_kbd]:text-body [&_kbd]:h-5 [&_kbd]:min-w-5 [&_kbd]:bg-neutral-500/20 [&_kbd]:px-1 [&_kbd]:text-xs [&_kbd]:font-normal`,`empty:hidden`),children:l})]}),t[8]=n,t[9]=r,t[10]=l,t[11]=m):m=t[11];let h=m,g;t[12]===s?g=t[13]:(g=o(s,`sidebar-search-trigger`),t[12]=s,t[13]=g);let _=n?d:d??`button`,v;t[14]===i?v=t[15]:(v=a(`group`,q,`[&>svg:first-child]:text-muted hover:[&>svg:first-child]:text-strong`,`[&>svg:first-child]:size-5`,`[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:text-muted`,`hover:[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:text-strong`,`[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:size-5`,`[&_svg]:shrink-0`,i),t[14]=i,t[15]=v);let y;return t[16]!==f||t[17]!==h||t[18]!==c||t[19]!==g||t[20]!==_||t[21]!==v?(y=/* @__PURE__ */ C(f,{"data-slot":g,type:_,className:v,...c,children:h}),t[16]=f,t[17]=h,t[18]=c,t[19]=g,t[20]=_,t[21]=v,t[22]=y):y=t[22],y},SwitcherTrigger:e=>{let t=p(18),n,r,i,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5],l=t[6]):({asChild:n,children:r,className:i,"data-slot":s,type:l,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l);let d=n?u:`button`,f;t[7]===s?f=t[8]:(f=o(s,`sidebar-switcher-trigger`),t[7]=s,t[8]=f);let m=n?l:l??`button`,h;t[9]===i?h=t[10]:(h=a(`text-body hover:text-strong hover:bg-neutral-500/10 flex w-full min-w-0 items-center gap-2 rounded-[0.625rem] py-1 pr-1.5 pl-1 text-left font-medium`,`data-state-open:bg-neutral-500/15 data-state-open:text-strong`,`aria-expanded:bg-neutral-500/15 aria-expanded:text-strong`,`ring-focus-accent focus:outline-hidden focus-visible:ring-4`,`*:first:size-7`,`group-data-[state=collapsed]/sidebar-nav:w-9`,`group-data-[state=collapsed]/sidebar-nav:p-1`,`group-data-[state=collapsed]/sidebar-nav:[&>:not(:first-child)]:sr-only`,`transition-[width,padding]`,D,i),t[9]=i,t[10]=h);let g;return t[11]!==d||t[12]!==r||t[13]!==c||t[14]!==f||t[15]!==m||t[16]!==h?(g=/* @__PURE__ */ C(d,{"data-slot":f,type:m,className:h,...c,children:r}),t[11]=d,t[12]=r,t[13]=c,t[14]=f,t[15]=m,t[16]=h,t[17]=g):g=t[17],g},Tooltip:e=>{let t=p(26),n,r,i,a,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],s=t[5],c=t[6]):({children:n,"data-slot":r,label:i,shortcut:s,side:c,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=s,t[6]=c);let l=c===void 0?`right`:c,{isMobile:u,open:f}=A(`Tooltip`),m=!u&&!f,[h,g]=b(!1),[_,v]=b(m);_!==m&&(v(m),g(!1));let y;t[7]===m?y=t[8]:(y=e=>{g(e&&m)},t[7]=m,t[8]=y);let x=y,S=m&&h,T;t[9]===n?T=t[10]:(T=/* @__PURE__ */ C(d.Trigger,{asChild:!0,children:n}),t[9]=n,t[10]=T);let E;t[11]===r?E=t[12]:(E=o(r,`sidebar-tooltip`),t[11]=r,t[12]=E);let D;t[13]!==i||t[14]!==s?(D=/* @__PURE__ */ C(L,{label:i,shortcut:s}),t[13]=i,t[14]=s,t[15]=D):D=t[15];let O;t[16]!==a||t[17]!==l||t[18]!==E||t[19]!==D?(O=/* @__PURE__ */ C(d.Content,{"data-slot":E,side:l,...a,children:D}),t[16]=a,t[17]=l,t[18]=E,t[19]=D,t[20]=O):O=t[20];let k;return t[21]!==x||t[22]!==S||t[23]!==T||t[24]!==O?(k=/* @__PURE__ */ w(d.Root,{disableHoverableContent:!0,onOpenChange:x,open:S,children:[T,O]}),t[21]=x,t[22]=S,t[23]=T,t[24]=O,t[25]=k):k=t[25],k},Separator:e=>{let t=p(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,"data-slot":r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let s;t[4]===r?s=t[5]:(s=o(r,`sidebar-separator`),t[4]=r,t[5]=s);let l;t[6]===n?l=t[7]:(l=a(`my-3`,`group-data-[state=collapsed]/sidebar-nav:w-9`,`transition-[width]`,D,n),t[6]=n,t[7]=l);let u;return t[8]!==i||t[9]!==s||t[10]!==l?(u=/* @__PURE__ */ C(c,{"data-slot":s,className:l,...i}),t[8]=i,t[9]=s,t[10]=l,t[11]=u):u=t[11],u}},Y=`mantle-sidebar-state`,X={collapsed:`collapsed`,expanded:`expanded`};function Z(e){let t=f(e,Y);if(t===X.expanded)return!0;if(t===X.collapsed)return!1}function Q(e,t={}){let{domain:n,maxAge:r=31536e3,path:i=`/`,sameSite:a=`Lax`,secure:o=!1}=t,s=e?X.expanded:X.collapsed,c=[`${Y}=${s}`,`Max-Age=${r}`,`Path=${i}`];return n!=null&&c.push(`Domain=${n}`),c.push(`SameSite=${a}`),o&&c.push(`Secure`),c.join(`; `)}export{Y as SIDEBAR_STATE_COOKIE_NAME,J as Sidebar,Z as extractSidebarStateCookie,Q as serializeSidebarStateCookie,k as useSidebar};
|
|
1
|
+
import*as e from"./sidebar-parts.js";import{g as t}from"./sidebar-CsC9fyPL.js";import{n}from"./utils-ca4g5CKp.js";const r=`mantle-sidebar-state`,i={collapsed:`collapsed`,expanded:`expanded`};function a(e){let t=n(e,r);if(t===i.expanded)return!0;if(t===i.collapsed)return!1}function o(e,t={}){let{domain:n,maxAge:a=31536e3,path:o=`/`,sameSite:s=`Lax`,secure:c=!1}=t,l=e?i.expanded:i.collapsed,u=[`${r}=${l}`,`Max-Age=${a}`,`Path=${o}`];return n!=null&&u.push(`Domain=${n}`),u.push(`SameSite=${s}`),c&&u.push(`Secure`),u.join(`; `)}export{r as SIDEBAR_STATE_COOKIE_NAME,e as Sidebar,a as extractSidebarStateCookie,o as serializeSidebarStateCookie,t as useSidebar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./cx-CfAFHj5_.js";import{t}from"./utils-EM6s2WEU.js";import{t as n}from"./slot-CBcGhRdV.js";import{jsx as r}from"react/jsx-runtime";const i=({"data-slot":i,asChild:a=!1,className:o,ref:s,...c})=>/* @__PURE__ */ r(a?n:`div`,{"data-slot":t(i,`skeleton`),"aria-hidden":!0,className:e(`h-4 animate-pulse rounded-md bg-gray-300/25 dark:bg-gray-950/10`,o),ref:s,...c});export{i as t};
|
package/dist/skeleton.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see https://mantle.ngrok.com/components/feedback/skeleton
|
|
5
5
|
*/
|
|
6
|
+
import { ComponentProps } from "react";
|
|
6
7
|
import { t as SelfClosingWithAsChild } from "./as-child-DFxX3U2i.js";
|
|
7
8
|
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
8
|
-
import { ComponentProps } from "react";
|
|
9
9
|
type Props = Omit<ComponentProps<"div">, "children"> & SelfClosingWithAsChild & WithDataSlot;
|
|
10
10
|
/**
|
|
11
11
|
* A skeleton is a placeholder for content that is loading. By rendering a
|
package/dist/skeleton.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as Skeleton}from"./skeleton-
|
|
1
|
+
export{t as Skeleton}from"./skeleton-DB0oQyAx.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./anchor-DW5_Gb-1.js";import{n as t}from"./cx-CfAFHj5_.js";import{t as n}from"./utils-EM6s2WEU.js";import{jsx as r}from"react/jsx-runtime";const i=({children:i=`Skip to main content`,className:a,"data-slot":o,onClick:s,targetId:c=`main`,...l})=>/* @__PURE__ */ r(e,{...l,"data-slot":n(o,`skip-to-main-link`),href:`#${c}`,onClick:e=>{e.preventDefault(),window.history.replaceState(null,``,`#${c}`),document.getElementById(c)?.focus(),s?.(e)},className:t(`not-focus:sr-only bg-card fixed top-2 left-2 z-max px-4 py-2 shadow-lg`,a),children:i});export{i as t};
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see https://mantle.ngrok.com/components/primitives/skip-to-main-link
|
|
5
5
|
*/
|
|
6
|
-
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
7
6
|
import { ComponentProps } from "react";
|
|
7
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
8
8
|
type SkipToMainLinkProps = Omit<ComponentProps<"a">, "href"> & WithDataSlot & {
|
|
9
9
|
/**
|
|
10
10
|
* The id of the target element to focus when the link is activated.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{t as SkipToMainLink}from"./skip-to-main-link-BGhAWSqB.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{createContext as e,use as t,useState as n}from"react";import r from"tiny-invariant";import{t as i}from"./behaviors-CnarRd47.js";import{i as a,n as o,r as s,t as c}from"./behaviors-CcjvGa0d.js";import{t as l}from"./compose-refs-Ce1vWUz0.js";import{t as u}from"./types-D85fCNV3.js";import{t as d}from"./cx-DhYnQ07J.js";import{n as f,t as p}from"./cx-CfAFHj5_.js";import{t as m}from"./utils-EM6s2WEU.js";import{jsx as h,jsxs as g}from"react/jsx-runtime";function _({"data-slot":e,"aria-describedby":t,"aria-errormessage":r,"aria-invalid":p,"aria-label":_,"aria-labelledby":y,children:b,className:w,color:ee=`bg-accent-600`,defaultValue:T,formatValue:E,dir:D,disabled:O=!1,form:k,id:A,inverted:j=!1,max:M=100,min:N=0,minStepsBetweenThumbs:te=1,name:P,onKeyDown:ne,onPointerDown:re,onLostPointerCapture:F,onPointerMove:I,onValueChange:L,onValueCommit:R,orientation:z=`horizontal`,preserveThumbOrder:B=!1,ref:V,step:H=1,showTicks:U=!1,style:W,value:G,...K}){let q=G!==void 0,[J]=n(()=>x(T)??[N]),Y=x(G)??J,[ie]=n(()=>E&&J.map(E)),ae=q?E&&Y.map(E):ie,X=b!=null&&b!==!1,oe=l(V,s),{rootProps:Z,inputProps:se}=o({controlled:q,min:N,max:M,step:H,minStepsBetweenThumbs:te,preserveThumbOrder:B,orientation:z,inverted:j,dir:D,onValueChange:L,onValueCommit:R,formatValue:E}),Q=a(Y,N),$=S({showTicks:U,min:N,max:M,step:H}),ce=P!=null&&Y.length>1?`${P}[]`:P;return/* @__PURE__ */ g(`span`,{"data-slot":m(e,`slider`),"data-orientation":z,"data-disabled":O?``:void 0,dir:D,className:f($>0?X?`group/slider [--slider-thumb-size:--spacing(4.5)] relative flex w-full touch-none items-center select-none data-disabled:opacity-50 before:absolute before:top-1/2 before:left-1/2 before:-translate-1/2 before:size-[max(100%,--spacing(6))] pointer-coarse:before:size-[max(100%,--spacing(11))] data-disabled:before:pointer-events-none data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col mb-3 data-[orientation=horizontal]:@container`:`group/slider [--slider-thumb-size:--spacing(4.5)] relative flex w-full touch-none items-center select-none data-disabled:opacity-50 before:absolute before:top-1/2 before:left-1/2 before:-translate-1/2 before:size-[max(100%,--spacing(6))] pointer-coarse:before:size-[max(100%,--spacing(11))] data-disabled:before:pointer-events-none data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col mb-3`:X?`group/slider [--slider-thumb-size:--spacing(4.5)] relative flex w-full touch-none items-center select-none data-disabled:opacity-50 before:absolute before:top-1/2 before:left-1/2 before:-translate-1/2 before:size-[max(100%,--spacing(6))] pointer-coarse:before:size-[max(100%,--spacing(11))] data-disabled:before:pointer-events-none data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[orientation=horizontal]:@container`:`group/slider [--slider-thumb-size:--spacing(4.5)] relative flex w-full touch-none items-center select-none data-disabled:opacity-50 before:absolute before:top-1/2 before:left-1/2 before:-translate-1/2 before:size-[max(100%,--spacing(6))] pointer-coarse:before:size-[max(100%,--spacing(11))] data-disabled:before:pointer-events-none data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col`,w),style:u({"--_min":N,"--_max":M,"--_inv":+!!j,...W}),...K,ref:oe,onKeyDown:i(ne,Z.onKeyDown),onPointerDown:i(re,Z.onPointerDown),onPointerMove:i(I,Z.onPointerMove),onLostPointerCapture:i(F,Z.onLostPointerCapture),children:[/* @__PURE__ */ h(`span`,{"data-slot":`slider-track`,className:`bg-neutral-300 rounded-full relative grow overflow-hidden h-1.5 w-full group-data-[orientation=vertical]/slider:h-full group-data-[orientation=vertical]/slider:w-1.5`,children:/* @__PURE__ */ h(`span`,{"data-slot":`slider-range`,className:d(`absolute h-full select-none group-data-[orientation=vertical]/slider:h-auto group-data-[orientation=vertical]/slider:w-full`,`[--_a:clamp(0,(var(--_start)_-_var(--_min))/(var(--_max)_-_var(--_min)),1)] [--_b:clamp(0,(var(--_end)_-_var(--_min))/(var(--_max)_-_var(--_min)),1)]`,`[--_s:calc(var(--_inv)_*_(1_-_var(--_b))_+_(1_-_var(--_inv))_*_var(--_a))] [--_e:calc(var(--_inv)_*_var(--_a)_+_(1_-_var(--_inv))_*_(1_-_var(--_b)))]`,`group-data-[orientation=horizontal]/slider:inset-s-[calc(var(--_s)*100%)] group-data-[orientation=horizontal]/slider:inset-e-[calc(var(--_e)*100%)]`,`group-data-[orientation=vertical]/slider:bottom-[calc(var(--_s)*100%)] group-data-[orientation=vertical]/slider:top-[calc(var(--_e)*100%)]`,`group-data-track-press/slider:motion-safe:transition-[inset-inline-start,inset-inline-end,top,bottom] group-data-track-press/slider:motion-safe:duration-200 group-data-track-press/slider:motion-safe:ease-out-strong`,ee),style:u(Q.range)})}),Y.map((e,n)=>/* @__PURE__ */ g(`span`,{"data-slot":`slider-thumb`,className:Y.length>1?`bg-static-white border-card size-(--slider-thumb-size) rounded-full border shadow-md hit-area absolute block shrink-0 cursor-pointer transition-[color,box-shadow] select-none [--_f:calc(var(--_inv)_+_(1_-_var(--_inv)_*_2)_*_clamp(0,(var(--_value)_-_var(--_min))/(var(--_max)_-_var(--_min)),1))] group-data-[orientation=horizontal]/slider:inset-s-[calc(var(--_f)*(100%-var(--slider-thumb-size)))] group-data-[orientation=vertical]/slider:bottom-[calc(var(--_f)*(100%-var(--slider-thumb-size)))] group-data-[orientation=horizontal]/slider:after:w-full group-data-[orientation=vertical]/slider:after:h-full has-focus-visible:ring-3 has-focus-visible:ring-accent-500/20 has-focus-visible:outline-hidden group-data-track-press/slider:motion-safe:transition-[color,box-shadow,inset-inline-start,bottom] group-data-track-press/slider:motion-safe:duration-200 group-data-track-press/slider:motion-safe:ease-out-strong group-data-disabled/slider:pointer-events-none group-data-disabled/slider:cursor-default`:`bg-static-white border-card size-(--slider-thumb-size) rounded-full border shadow-md hit-area absolute block shrink-0 cursor-pointer transition-[color,box-shadow] select-none [--_f:calc(var(--_inv)_+_(1_-_var(--_inv)_*_2)_*_clamp(0,(var(--_value)_-_var(--_min))/(var(--_max)_-_var(--_min)),1))] group-data-[orientation=horizontal]/slider:inset-s-[calc(var(--_f)*(100%-var(--slider-thumb-size)))] group-data-[orientation=vertical]/slider:bottom-[calc(var(--_f)*(100%-var(--slider-thumb-size)))] has-focus-visible:ring-3 has-focus-visible:ring-accent-500/20 has-focus-visible:outline-hidden group-data-track-press/slider:motion-safe:transition-[color,box-shadow,inset-inline-start,bottom] group-data-track-press/slider:motion-safe:duration-200 group-data-track-press/slider:motion-safe:ease-out-strong group-data-disabled/slider:pointer-events-none group-data-disabled/slider:cursor-default`,style:u(Q.thumbs[n]??{}),children:[/* @__PURE__ */ h(`input`,{type:`range`,"data-slot":`slider-input`,className:`absolute inset-0 z-1 m-0 size-full cursor-inherit appearance-none opacity-0 group-data-[orientation=vertical]/slider:[writing-mode:vertical-lr]`,"aria-describedby":t,"aria-errormessage":r,"aria-invalid":p,"aria-label":C({ariaLabel:_,index:n,thumbCount:Y.length}),"aria-labelledby":y,"aria-orientation":z,disabled:O,form:k,id:n===0?A:void 0,max:M,min:N,name:ce,step:c(Y[n]??N,{min:N,step:H})?H:`any`,...q?{value:Y[n]}:{defaultValue:Y[n]},"aria-valuetext":ae?.[n],onChange:se.onChange}),X&&/* @__PURE__ */ h(v,{value:n,children:b})]},n)),$>0&&/* @__PURE__ */ h(`div`,{"data-slot":`slider-ticks`,className:`absolute top-full mt-1.5 flex w-full justify-between px-[calc(var(--slider-thumb-size)/2)]`,"aria-hidden":`true`,children:Array.from({length:$},(e,t)=>/* @__PURE__ */ h(`span`,{"data-slot":`slider-tick`,className:`bg-card-border h-1.5 w-px`},t))}),X&&/* @__PURE__ */ h(v,{value:null,children:b})]})}const v=e(void 0);function y({"data-slot":e,className:n,placement:i=`thumb`,ref:a,...o}){let s=t(v),c=l(a,b);return r(s!==void 0,`SliderValue must be rendered inside a Slider.`),i===`thumb`==(s!=null)?/* @__PURE__ */ h(`span`,{"data-slot":m(e,`slider-value`),"data-placement":i,"aria-hidden":`true`,translate:`no`,className:p(`bg-tooltip text-tooltip pointer-events-none absolute z-2 w-max rounded-md px-2 py-1 text-xs font-sans whitespace-nowrap tabular-nums shadow select-none`,`[--_dir:1] rtl:[--_dir:-1]`,`scale-95 opacity-0 motion-safe:transition-[opacity,scale] motion-safe:duration-150 motion-safe:ease-out-strong`,`group-data-dragging/slider:scale-100 group-data-dragging/slider:opacity-100 group-data-dragging/slider:motion-safe:duration-200`,`group-data-track-press/slider:scale-100 group-data-track-press/slider:opacity-100 group-data-track-press/slider:motion-safe:duration-200`,i===`thumb`?[`group-data-[orientation=horizontal]/slider:inset-s-1/2 group-data-[orientation=horizontal]/slider:bottom-full group-data-[orientation=horizontal]/slider:mb-2 group-data-[orientation=horizontal]/slider:origin-bottom`,`group-data-[orientation=horizontal]/slider:[--_c:calc(var(--_f)*(100cqw-var(--slider-thumb-size))+var(--slider-thumb-size)/2)]`,`group-data-[orientation=horizontal]/slider:translate-x-[calc(var(--_dir)_*_clamp(-1_*_var(--_c),-50%,100cqw_-_var(--_c)_-_100%))]`,`group-data-[orientation=vertical]/slider:inset-e-full group-data-[orientation=vertical]/slider:top-1/2 group-data-[orientation=vertical]/slider:me-2 group-data-[orientation=vertical]/slider:-translate-y-1/2 group-data-[orientation=vertical]/slider:origin-right rtl:group-data-[orientation=vertical]/slider:origin-left`]:[`inset-s-1/2 origin-bottom translate-x-[calc(var(--_dir)*-50%)]`,`group-data-[orientation=horizontal]/slider:bottom-[calc(50%+var(--slider-thumb-size)/2+(--spacing(2)))]`,`group-data-[orientation=vertical]/slider:bottom-full group-data-[orientation=vertical]/slider:mb-2`],n),...o,ref:c}):null}function b(e){let t=e?.closest(`[data-slot~='slider']`),n=e?.dataset.placement===`track`?t:e?.closest(`[data-slot='slider-thumb']`);if(e==null||t==null||n==null)return;let r=()=>{let r=[...n===t?t.querySelectorAll(`:scope > [data-slot='slider-thumb']`):[n]].map(e=>e.querySelector(`input`)?.getAttribute(`aria-valuetext`)??e.style.getPropertyValue(`--_value`)).join(` – `);e.textContent!==r&&(e.textContent=r)};r();let i=new MutationObserver(r);return i.observe(n,{attributes:!0,attributeFilter:[`style`,`aria-valuetext`],subtree:!0}),()=>i.disconnect()}function x(e){if(e!=null)return Array.isArray(e)?e:[e]}function S({showTicks:e,min:t,max:n,step:r}){let i=n-t;return!e||!Number.isFinite(i)||!Number.isFinite(r)||r<=0||i<=0?0:Math.floor(i/r)+1}function C({ariaLabel:e,index:t,thumbCount:n}){if(e)return n===1?e:n===2?`${t===0?`Minimum`:`Maximum`} ${e}`:`${e} ${t+1} of ${n}`}export{y as n,_ as t};
|
package/dist/slider.d.ts
CHANGED
|
@@ -3,16 +3,82 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see https://mantle.ngrok.com/components/forms/slider
|
|
5
5
|
*/
|
|
6
|
+
import { ComponentProps, ReactNode } from "react";
|
|
6
7
|
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
type SliderBaseProps = Omit<ComponentProps<"span">, "defaultValue" | "dir" | "value"> & {
|
|
9
|
+
/**
|
|
10
|
+
* The text direction of the slider. When omitted, the slider follows the
|
|
11
|
+
* `direction` it inherits from the page.
|
|
12
|
+
*/
|
|
13
|
+
dir?: "ltr" | "rtl";
|
|
14
|
+
/**
|
|
15
|
+
* When `true`, prevents the user from interacting with the slider. A disabled
|
|
16
|
+
* slider submits no value with its form.
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The `id` of the form the slider's inputs belong to, when the slider sits
|
|
22
|
+
* outside that form.
|
|
23
|
+
*/
|
|
24
|
+
form?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the slider is visually inverted: `max` sits at the start of a
|
|
27
|
+
* horizontal track, or at the top of a vertical track.
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
inverted?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The maximum value.
|
|
33
|
+
* @default 100
|
|
34
|
+
*/
|
|
35
|
+
max?: number;
|
|
36
|
+
/**
|
|
37
|
+
* The minimum value.
|
|
38
|
+
* @default 0
|
|
39
|
+
*/
|
|
40
|
+
min?: number;
|
|
41
|
+
/**
|
|
42
|
+
* The fewest steps that must stay between two thumbs.
|
|
43
|
+
* @default 1
|
|
44
|
+
*/
|
|
45
|
+
minStepsBetweenThumbs?: number;
|
|
46
|
+
/**
|
|
47
|
+
* The name that the slider's value submits under with its form. A slider with
|
|
48
|
+
* more than one thumb submits one value for each thumb under `name[]`.
|
|
49
|
+
*/
|
|
50
|
+
name?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Event handler called when the value changes.
|
|
53
|
+
*/
|
|
54
|
+
onValueChange?: (value: number[]) => void;
|
|
55
|
+
/**
|
|
56
|
+
* Event handler called when the value changes at the end of an interaction:
|
|
57
|
+
* once for each key press, and when a drag that changed the value ends.
|
|
58
|
+
*/
|
|
59
|
+
onValueCommit?: (value: number[]) => void;
|
|
60
|
+
/**
|
|
61
|
+
* The direction of the track.
|
|
62
|
+
* @default "horizontal"
|
|
63
|
+
*/
|
|
64
|
+
orientation?: "horizontal" | "vertical";
|
|
65
|
+
/**
|
|
66
|
+
* Whether a thumb stops at its neighbor instead of passing it.
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
preserveThumbOrder?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* The stepping interval.
|
|
72
|
+
* @default 1
|
|
73
|
+
*/
|
|
74
|
+
step?: number;
|
|
75
|
+
};
|
|
10
76
|
/**
|
|
11
77
|
* Value props for the {@link Slider} component. Either both `defaultValue` and
|
|
12
78
|
* `value` must be the same type (both `number` or both `number[]`), or only one
|
|
13
79
|
* may be set.
|
|
14
80
|
*/
|
|
15
|
-
type
|
|
81
|
+
type SliderStateProps = {
|
|
16
82
|
/**
|
|
17
83
|
* The value of the slider when initially rendered. Use when you do not need
|
|
18
84
|
* to control the state of the slider.
|
|
@@ -38,7 +104,7 @@ type SliderValueProps = {
|
|
|
38
104
|
/**
|
|
39
105
|
* Props for the {@link Slider} component.
|
|
40
106
|
*/
|
|
41
|
-
type SliderProps = SliderBaseProps &
|
|
107
|
+
type SliderProps = SliderBaseProps & SliderStateProps & {
|
|
42
108
|
/**
|
|
43
109
|
* The color of the slider range. Accepts any Tailwind `bg-*` class.
|
|
44
110
|
* @default "bg-accent-600"
|
|
@@ -51,18 +117,46 @@ type SliderProps = SliderBaseProps & SliderValueProps & {
|
|
|
51
117
|
* @default false
|
|
52
118
|
*/
|
|
53
119
|
showTicks?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* The text of a value. It sets `aria-valuetext` on each thumb, and the text
|
|
122
|
+
* of each {@link SliderValue}. When omitted, a value reads as its number.
|
|
123
|
+
* An uncontrolled slider takes a new `formatValue` at its next change.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```tsx
|
|
127
|
+
* <Slider aria-label="Price" defaultValue={40} formatValue={(value) => `$${value}`} />
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
formatValue?: (value: number) => string;
|
|
131
|
+
/**
|
|
132
|
+
* Optional {@link SliderValue} parts, which show the value while a pointer
|
|
133
|
+
* drags a thumb. Pass nothing else.
|
|
134
|
+
*/
|
|
135
|
+
children?: ReactNode;
|
|
54
136
|
} & WithDataSlot;
|
|
55
137
|
/**
|
|
56
138
|
* An input where the user selects a value from within a given range.
|
|
57
139
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* thumb
|
|
65
|
-
*
|
|
140
|
+
* Each thumb is a native `<input type="range">`, so the server HTML already
|
|
141
|
+
* holds each thumb at its value, and assistive technology reads and sets it
|
|
142
|
+
* with no JavaScript. An uncontrolled slider keeps its values in the DOM and
|
|
143
|
+
* renders nothing while the user drags.
|
|
144
|
+
*
|
|
145
|
+
* `aria-invalid`, `aria-describedby`, and `aria-errormessage` go onto each
|
|
146
|
+
* thumb, and `id` onto the first thumb, so a `<label htmlFor>` focuses it.
|
|
147
|
+
* When composing with `Field.Item`, wrap `Slider` in `Field.Control`, which
|
|
148
|
+
* passes those props. Pass `aria-label` or `aria-labelledby` to `Slider`;
|
|
149
|
+
* Mantle forwards those labels to the rendered thumb(s). `aria-label` derives a
|
|
150
|
+
* distinct name per thumb ("Minimum Price", "Maximum Price"). `aria-labelledby`
|
|
151
|
+
* names every thumb with the same text, so prefer `aria-label` for a range
|
|
152
|
+
* slider.
|
|
153
|
+
*
|
|
154
|
+
* | Data Attribute | Value | Description |
|
|
155
|
+
* | ------------------ | ------------------------------ | ---------------------------------------------- |
|
|
156
|
+
* | `data-orientation` | `"horizontal"` \| `"vertical"` | On the root. Mirrors `orientation`. |
|
|
157
|
+
* | `data-disabled` | present when disabled | On the root. Presence-only. Style with `data-disabled:`. |
|
|
158
|
+
* | `data-track-press` | present during a glide | On the root while a thumb glides after a press on the track. Presence-only. |
|
|
159
|
+
* | `data-dragging` | present during a drag | On the root while a pointer drags a thumb. Presence-only. |
|
|
66
160
|
*
|
|
67
161
|
* @useWhen Pick a number, or a range between two numbers, with a thumb that moves along a track.
|
|
68
162
|
*
|
|
@@ -104,5 +198,45 @@ type SliderProps = SliderBaseProps & SliderValueProps & {
|
|
|
104
198
|
* />
|
|
105
199
|
* ```
|
|
106
200
|
*/
|
|
107
|
-
declare function Slider({ "data-slot": dataSlot, "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className, color, defaultValue, id, max, min, minStepsBetweenThumbs, name, step, showTicks, value, ...props }: SliderProps): import("react").JSX.Element;
|
|
108
|
-
|
|
201
|
+
declare function Slider({ "data-slot": dataSlot, "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, className, color, defaultValue, formatValue, dir, disabled, form, id, inverted, max, min, minStepsBetweenThumbs, name, onKeyDown, onPointerDown, onLostPointerCapture, onPointerMove, onValueChange, onValueCommit, orientation, preserveThumbOrder, ref, step, showTicks, style, value, ...props }: SliderProps): import("react").JSX.Element;
|
|
202
|
+
/**
|
|
203
|
+
* Props for the {@link SliderValue} component.
|
|
204
|
+
*/
|
|
205
|
+
type SliderValueProps = Omit<ComponentProps<"span">, "children"> & {
|
|
206
|
+
/**
|
|
207
|
+
* Where the value shows: above each thumb, which it follows, or once above
|
|
208
|
+
* the center of the track, with every value of a range.
|
|
209
|
+
* @default "thumb"
|
|
210
|
+
*/
|
|
211
|
+
placement?: "thumb" | "track";
|
|
212
|
+
} & WithDataSlot;
|
|
213
|
+
/**
|
|
214
|
+
* The value of a {@link Slider}, in a small label that shows while a pointer or
|
|
215
|
+
* a finger drags a thumb, and while a thumb glides to a press on the track. It
|
|
216
|
+
* hides at rest and under keyboard focus. Place it as a child of `Slider`.
|
|
217
|
+
*
|
|
218
|
+
* Why not on keyboard focus: a sighted keyboard user sees the thumb move and the
|
|
219
|
+
* focus ring, and a label on each focus covers content as the user tabs through
|
|
220
|
+
* a form. A screen reader reads the value from the thumb, with `formatValue` as
|
|
221
|
+
* `aria-valuetext`, so the label stays out of the accessibility tree.
|
|
222
|
+
*
|
|
223
|
+
* CSS places the label from the thumb's value. With `placement="thumb"`, it
|
|
224
|
+
* stays inside the slider's width at each end. A vertical slider shows it beside
|
|
225
|
+
* each thumb, toward the start of the line, so leave room there.
|
|
226
|
+
*
|
|
227
|
+
* `Slider` renders its children once in each thumb and once above the track, so
|
|
228
|
+
* a `ref` on `SliderValue` reaches the last label that renders.
|
|
229
|
+
*
|
|
230
|
+
* | Data Attribute | Value | Description |
|
|
231
|
+
* | ----------------- | ------------------- | --------------------------------------------------------- |
|
|
232
|
+
* | `data-placement` | `"thumb"` \| `"track"` | Mirrors `placement`. |
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* ```tsx
|
|
236
|
+
* <Slider aria-label="Volume" defaultValue={40} formatValue={(value) => `${value}%`}>
|
|
237
|
+
* <SliderValue />
|
|
238
|
+
* </Slider>
|
|
239
|
+
* ```
|
|
240
|
+
*/
|
|
241
|
+
declare function SliderValue({ "data-slot": dataSlot, className, placement, ref, ...props }: SliderValueProps): import("react").JSX.Element | null;
|
|
242
|
+
export { Slider, type SliderProps, SliderValue, type SliderValueProps };
|
package/dist/slider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{t as Slider,n as SliderValue}from"./slider-YlBozcPQ.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactElement, ReactNode, RefCallback } from "react";
|
|
2
|
+
import "./use-listbox-D4uIonSN.js";
|
|
3
|
+
/** The props a function child spreads on its element: the option's final props and a callback ref. */
|
|
4
|
+
type OptionRenderProps = HTMLAttributes<HTMLElement> & {
|
|
5
|
+
ref: RefCallback<HTMLElement>;
|
|
6
|
+
};
|
|
7
|
+
/** The state a listbox option reports to its function child. */
|
|
8
|
+
type OptionState = {
|
|
9
|
+
/** Whether the option has virtual focus: the pointer or the arrow keys are on it. */
|
|
10
|
+
highlighted: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A function child of a listbox option. It gets the option's props and state
|
|
14
|
+
* and returns the one element the option renders as. Spread `props` on it.
|
|
15
|
+
*/
|
|
16
|
+
type OptionRender = (props: OptionRenderProps, state: OptionState) => ReactElement<{
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}>;
|
|
19
|
+
export { OptionRender as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{s as e}from"./behaviors-Mkc_HjTB.js";import{t}from"./compose-refs-Ce1vWUz0.js";import{n}from"./slot-CBcGhRdV.js";const r=({listbox:r,ref:i,render:a,renderContent:o,...s})=>{let c=e(r.getStore(),e=>e.activeId===s.id),l=t(i,void 0),u=a({...s,ref:l},{highlighted:c});return o==null?u:n(u,o)};export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Children as e,Fragment as t,cloneElement as n,isValidElement as r}from"react";import{t as i}from"./cx-CfAFHj5_.js";import{t as a}from"./utils-EM6s2WEU.js";const o=(e,t)=>/^on[A-Z]/.test(e)&&typeof t==`function`,s=(e,t)=>{let n=new Set(`${e??``} ${t??``}`.split(/\s+/).filter(Boolean));return n.size>0?[...n].join(` `):void 0},c=(e,t)=>{if(typeof e==`function`){let n=e(t);return typeof n==`function`?n:void 0}e!=null&&(e.current=t)},l=/* @__PURE__ */ new WeakMap,u=(e,t)=>{if(e==null||t==null)return e??t;let n=l.get(e);n??(n=/* @__PURE__ */ new WeakMap,l.set(e,n));let r=n.get(t);if(r!=null)return r;let i=n=>{let r=[c(e,n),c(t,n)];return()=>{for(let[n,i]of r.entries())i==null?c(n===0?e:t,null):i()}};return n.set(t,i),i},d=(e,t)=>(...n)=>{let r=e(...n);return t(...n),r};function f(e,t){return typeof t==`function`?(...n)=>i(e,t(...n)):i(e,t)}function p(e,t){return typeof t==`function`?(...n)=>({...e,...t(...n)}):e==null?t:t==null?e:{...e,...t}}const m=({children:i,className:c,"data-slot":l,ref:m,style:h,...g})=>{let _=r(i)?i:null;if(_==null)return e.only(i);let v={...g};for(let[e,t]of Object.entries(_.props)){let n=v[e];o(e,t)&&o(e,n)?v[e]=d(t,n):/^on[A-Z]/.test(e)&&t==null||(v[e]=t)}let y={className:f(c,_.props.className),style:p(h,_.props.style),"aria-describedby":s(_.props[`aria-describedby`],g[`aria-describedby`]),"data-slot":a(l,_.props[`data-slot`]),ref:_.type===t?void 0:u(m,_.props.ref)};for(let[e,t]of Object.entries(y))t===void 0||t===``?delete v[e]:v[e]=t;return n(_,v)},h=(e,t)=>r(e)?n(e,void 0,t(e.props.children)):e;export{h as n,m as t};
|
|
@@ -1,32 +1,15 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode, Ref } from "react";
|
|
1
2
|
import { t as WithStyleProps } from "./with-style-props-CuT30s0W.js";
|
|
2
3
|
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
3
|
-
import { CSSProperties, ComponentProps, HTMLAttributes } from "react";
|
|
4
|
-
/**
|
|
5
|
-
* A `className` or `style` the child resolves itself, from state only the child
|
|
6
|
-
* knows: react-router's `NavLink` calls it with
|
|
7
|
-
* `{ isActive, isPending, isTransitioning }`, another component with something else
|
|
8
|
-
* entirely. `Slot` never invents arguments for one and never inspects them; it
|
|
9
|
-
* forwards the ones the child supplied, so they are typed `unknown`.
|
|
10
|
-
*/
|
|
11
|
-
type RenderProp<TValue> = (...args: unknown[]) => TValue | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Radix's `Slot`, retyped to carry a composed render prop. `createSlot`'s props
|
|
14
|
-
* generic is Radix's own way to type a slot whose child is not a DOM element; it
|
|
15
|
-
* replaces the default `HTMLAttributes` rather than extending it, so the DOM
|
|
16
|
-
* attributes are re-added here minus the two props composed above.
|
|
17
|
-
*/
|
|
18
|
-
declare const SlotPrimitive: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "className" | "style"> & WithDataSlot & {
|
|
19
|
-
className?: string | RenderProp<string>;
|
|
20
|
-
style?: CSSProperties | RenderProp<CSSProperties>;
|
|
21
|
-
} & {
|
|
22
|
-
children?: import("react").ReactNode | undefined;
|
|
23
|
-
} & import("react").RefAttributes<HTMLElement>>;
|
|
24
4
|
/**
|
|
25
5
|
* `Slot`'s own `className` and `style` stay plain values. A render prop is only
|
|
26
6
|
* meaningful on the child that knows how to call it, so accepting one here would
|
|
27
7
|
* admit a value nothing ever resolves.
|
|
28
8
|
*/
|
|
29
|
-
type Props = Omit<
|
|
9
|
+
type Props = Omit<HTMLAttributes<HTMLElement>, "className" | "style"> & WithDataSlot & WithStyleProps & {
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
ref?: Ref<HTMLElement>;
|
|
12
|
+
};
|
|
30
13
|
/**
|
|
31
14
|
* Merges its props onto its immediate child. This is useful for creating
|
|
32
15
|
* components that can be rendered as different elements. Automatically merges
|
|
@@ -63,5 +46,5 @@ type Props = Omit<ComponentProps<typeof SlotPrimitive>, "className" | "style"> &
|
|
|
63
46
|
* </Slot>
|
|
64
47
|
* ```
|
|
65
48
|
*/
|
|
66
|
-
declare const Slot: ({ children, className, "data-slot": dataSlot, ref, style, ...props }: Props) =>
|
|
49
|
+
declare const Slot: ({ children, className, "data-slot": dataSlot, ref, style, ...props }: Props) => ReactNode;
|
|
67
50
|
export { Slot as t };
|
package/dist/slot.d.ts
CHANGED
package/dist/slot.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as Slot}from"./slot-
|
|
1
|
+
export{t as Slot}from"./slot-CBcGhRdV.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./CaretDown-MgTrjdYK.js";import{createContext as t,useContext as n,useMemo as r}from"react";import{n as i}from"./cx-CfAFHj5_.js";import{t as a}from"./utils-EM6s2WEU.js";import{t as o}from"./button-DhoE-BbZ.js";import{t as s}from"./button-Bqm7U0OC.js";import{a as c,l,m as u,n as d}from"./dropdown-menu-BuluRn0Z.js";import{t as f}from"./icon-BSGMvJ0W.js";import{jsx as p}from"react/jsx-runtime";const m=t({size:`md`}),h=({"data-slot":e,className:t,children:n,dir:o,open:s,defaultOpen:c,onOpenChange:u,modal:d,size:f=`md`,ref:h,...g})=>{let _=r(()=>({size:f}),[f]);return/* @__PURE__ */ p(l,{dir:o,open:s,defaultOpen:c,onOpenChange:u,modal:d,children:/* @__PURE__ */ p(m.Provider,{value:_,children:/* @__PURE__ */ p(`div`,{"data-slot":a(e,`split-button`),"data-size":f,className:i(`flex flex-row [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-ml-px [&>*:focus]:relative [&>*:focus]:z-10 [&>*:hover]:relative [&>*:hover]:z-10 [&>:active]:scale-100!`,t),ref:h,...g,children:n})})})},g=({"data-slot":e,...t})=>{let{size:r}=n(m);return/* @__PURE__ */ p(o,{appearance:`outlined`,intent:`neutral`,size:r,"data-slot":a(e,`split-button-primary-action`),...t})},_=({"data-slot":t,icon:r,...i})=>{let{size:o}=n(m);return/* @__PURE__ */ p(u,{asChild:!0,className:`group`,"data-slot":a(t,`split-button-menu-trigger`),children:/* @__PURE__ */ p(s,{icon:r??/* @__PURE__ */ p(f,{svg:/* @__PURE__ */ p(e,{weight:`bold`,className:`size-4 group-aria-expanded:-rotate-180 transition-transform duration-200 ease-out-strong motion-reduce:transition-none`})}),appearance:`outlined`,intent:`neutral`,size:o,...i})})},v=({align:e=`end`,"data-slot":t,...n})=>/* @__PURE__ */ p(d,{align:e,"data-slot":a(t,`split-button-menu-content`),...n}),y=({className:e,"data-slot":t,...n})=>/* @__PURE__ */ p(c,{className:i(`gap-2`,e),"data-slot":a(t,`split-button-menu-item`),...n});export{h as a,g as i,y as n,_ as r,v as t};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parts of the `SplitButton` namespace. `index.ts` imports them as one module
|
|
3
|
+
* namespace, so a bundler keeps only the parts a consumer reads.
|
|
4
|
+
*/
|
|
5
|
+
import { ComponentProps, ReactNode } from "react";
|
|
6
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
7
|
+
import { t as Button } from "./button-CRMoQyum.js";
|
|
8
|
+
import { t as IconButton } from "./button-CL17Dxza.js";
|
|
9
|
+
import { t as ButtonSize } from "./button-L4exxu_L.js";
|
|
10
|
+
import { a as Item, l as Root$1, n as Content } from "./dropdown-menu-CDXlp0QT.js";
|
|
11
|
+
type RootProps = ComponentProps<typeof Root$1> & ComponentProps<"div"> & {
|
|
12
|
+
/**
|
|
13
|
+
* The size of the SplitButton, default `"md"`. Applied to both the
|
|
14
|
+
* primary action and the menu trigger so the two halves always share
|
|
15
|
+
* one height. The parts do not accept `size`, so mixed-size
|
|
16
|
+
* composites cannot be expressed in the type system.
|
|
17
|
+
*/
|
|
18
|
+
size?: ButtonSize;
|
|
19
|
+
} & WithDataSlot;
|
|
20
|
+
/**
|
|
21
|
+
* A button group that pairs a one-click default action with a dropdown menu
|
|
22
|
+
* of related alternatives. Best for when users typically want one action but
|
|
23
|
+
* occasionally need variants.
|
|
24
|
+
*
|
|
25
|
+
* | Data Attribute | Value | Description |
|
|
26
|
+
* | -------------- | ------------------------------------------- | -------------------------------------------------- |
|
|
27
|
+
* | `data-slot` | `"split-button"` | On the wrapping `<div>`. |
|
|
28
|
+
* | `data-size` | `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` | The `size` prop, which both halves render at. |
|
|
29
|
+
*
|
|
30
|
+
* @see https://mantle.ngrok.com/components/actions/split-button#splitbuttonroot
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <SplitButton.Root>
|
|
35
|
+
* <SplitButton.PrimaryAction icon={<CopyIcon />} onClick={copyMarkdownPage}>
|
|
36
|
+
* Copy page
|
|
37
|
+
* </SplitButton.PrimaryAction>
|
|
38
|
+
* <SplitButton.MenuTrigger label="Open doc actions menu" />
|
|
39
|
+
* <SplitButton.MenuContent>
|
|
40
|
+
* <SplitButton.MenuItem onClick={copyMarkdownPage}>
|
|
41
|
+
* Copy page
|
|
42
|
+
* <Icon svg={<CopyIcon />} />
|
|
43
|
+
* </SplitButton.MenuItem>
|
|
44
|
+
* <SplitButton.MenuItem asChild onClick={copyMarkdownPage}>
|
|
45
|
+
* <a href={markdownUrl} target="_blank" rel="noopener noreferrer">
|
|
46
|
+
* View as Markdown
|
|
47
|
+
* <Icon svg={<FileTextIcon />} />
|
|
48
|
+
* </a>
|
|
49
|
+
* </SplitButton.MenuItem>
|
|
50
|
+
* </SplitButton.MenuContent>
|
|
51
|
+
* </SplitButton.Root>
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
declare const Root: ({ "data-slot": dataSlot, className, children, dir, open, defaultOpen, onOpenChange, modal, size, ref, ...props }: RootProps) => import("react").JSX.Element;
|
|
55
|
+
type PrimaryActionProps = Omit<ComponentProps<typeof Button>, "appearance" | "intent" | "size">;
|
|
56
|
+
/**
|
|
57
|
+
* The most common action users can trigger with a single click.
|
|
58
|
+
*
|
|
59
|
+
* @see https://mantle.ngrok.com/components/actions/split-button#splitbuttonprimaryaction
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```tsx
|
|
63
|
+
* <SplitButton.Root>
|
|
64
|
+
* <SplitButton.PrimaryAction icon={<CopyIcon />} onClick={copyMarkdownPage}>
|
|
65
|
+
* Copy page
|
|
66
|
+
* </SplitButton.PrimaryAction>
|
|
67
|
+
* <SplitButton.MenuTrigger label="Open doc actions menu" />
|
|
68
|
+
* <SplitButton.MenuContent>
|
|
69
|
+
* <SplitButton.MenuItem onClick={copyMarkdownPage}>
|
|
70
|
+
* Copy page
|
|
71
|
+
* <Icon svg={<CopyIcon />} />
|
|
72
|
+
* </SplitButton.MenuItem>
|
|
73
|
+
* <SplitButton.MenuItem asChild onClick={copyMarkdownPage}>
|
|
74
|
+
* <a href={markdownUrl} target="_blank" rel="noopener noreferrer">
|
|
75
|
+
* View as Markdown
|
|
76
|
+
* <Icon svg={<FileTextIcon />} />
|
|
77
|
+
* </a>
|
|
78
|
+
* </SplitButton.MenuItem>
|
|
79
|
+
* </SplitButton.MenuContent>
|
|
80
|
+
* </SplitButton.Root>
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
declare const PrimaryAction: ({ "data-slot": dataSlot, ...props }: PrimaryActionProps) => import("react").JSX.Element;
|
|
84
|
+
type MenuTriggerProps = Omit<ComponentProps<typeof IconButton>, "appearance" | "intent" | "size" | "asChild" | "children" | "icon"> & {
|
|
85
|
+
/**
|
|
86
|
+
* Not part of the API: the trigger renders its icon alone. Typed `undefined`
|
|
87
|
+
* so that a props spread with `children` is a type error too.
|
|
88
|
+
*/
|
|
89
|
+
children?: undefined;
|
|
90
|
+
icon?: ReactNode;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* The button that opens the split button dropdown menu.
|
|
94
|
+
*
|
|
95
|
+
* @see https://mantle.ngrok.com/components/actions/split-button#splitbuttonmenutrigger
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```tsx
|
|
99
|
+
* <SplitButton.Root>
|
|
100
|
+
* <SplitButton.PrimaryAction icon={<CopyIcon />} onClick={copyMarkdownPage}>
|
|
101
|
+
* Copy page
|
|
102
|
+
* </SplitButton.PrimaryAction>
|
|
103
|
+
* <SplitButton.MenuTrigger label="Open doc actions menu" />
|
|
104
|
+
* <SplitButton.MenuContent>
|
|
105
|
+
* <SplitButton.MenuItem onClick={copyMarkdownPage}>
|
|
106
|
+
* Copy page
|
|
107
|
+
* <Icon svg={<CopyIcon />} />
|
|
108
|
+
* </SplitButton.MenuItem>
|
|
109
|
+
* <SplitButton.MenuItem asChild onClick={copyMarkdownPage}>
|
|
110
|
+
* <a href={markdownUrl} target="_blank" rel="noopener noreferrer">
|
|
111
|
+
* View as Markdown
|
|
112
|
+
* <Icon svg={<FileTextIcon />} />
|
|
113
|
+
* </a>
|
|
114
|
+
* </SplitButton.MenuItem>
|
|
115
|
+
* </SplitButton.MenuContent>
|
|
116
|
+
* </SplitButton.Root>
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
declare const MenuTrigger: ({ "data-slot": dataSlot, icon, ...props }: MenuTriggerProps) => import("react").JSX.Element;
|
|
120
|
+
/**
|
|
121
|
+
* The container for the split button dropdown menu content. Appears in a
|
|
122
|
+
* portal with scrolling and animations.
|
|
123
|
+
*
|
|
124
|
+
* @see https://mantle.ngrok.com/components/actions/split-button#splitbuttonmenucontent
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```tsx
|
|
128
|
+
* <SplitButton.Root>
|
|
129
|
+
* <SplitButton.PrimaryAction icon={<CopyIcon />} onClick={copyMarkdownPage}>
|
|
130
|
+
* Copy page
|
|
131
|
+
* </SplitButton.PrimaryAction>
|
|
132
|
+
* <SplitButton.MenuTrigger label="Open doc actions menu" />
|
|
133
|
+
* <SplitButton.MenuContent>
|
|
134
|
+
* <SplitButton.MenuItem onClick={copyMarkdownPage}>
|
|
135
|
+
* Copy page
|
|
136
|
+
* <Icon svg={<CopyIcon />} />
|
|
137
|
+
* </SplitButton.MenuItem>
|
|
138
|
+
* <SplitButton.MenuItem asChild onClick={copyMarkdownPage}>
|
|
139
|
+
* <a href={markdownUrl} target="_blank" rel="noopener noreferrer">
|
|
140
|
+
* View as Markdown
|
|
141
|
+
* <Icon svg={<FileTextIcon />} />
|
|
142
|
+
* </a>
|
|
143
|
+
* </SplitButton.MenuItem>
|
|
144
|
+
* </SplitButton.MenuContent>
|
|
145
|
+
* </SplitButton.Root>
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
declare const MenuContent: ({ align, "data-slot": dataSlot, ...props }: ComponentProps<typeof Content>) => import("react").JSX.Element;
|
|
149
|
+
/**
|
|
150
|
+
* A standard item in the split button dropdown menu that can be selected or
|
|
151
|
+
* activated.
|
|
152
|
+
*
|
|
153
|
+
* @see https://mantle.ngrok.com/components/actions/split-button#splitbuttonmenuitem
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```tsx
|
|
157
|
+
* <SplitButton.Root>
|
|
158
|
+
* <SplitButton.PrimaryAction icon={<CopyIcon />} onClick={copyMarkdownPage}>
|
|
159
|
+
* Copy page
|
|
160
|
+
* </SplitButton.PrimaryAction>
|
|
161
|
+
* <SplitButton.MenuTrigger label="Open doc actions menu" />
|
|
162
|
+
* <SplitButton.MenuContent>
|
|
163
|
+
* <SplitButton.MenuItem onClick={copyMarkdownPage}>
|
|
164
|
+
* Copy page
|
|
165
|
+
* <Icon svg={<CopyIcon />} />
|
|
166
|
+
* </SplitButton.MenuItem>
|
|
167
|
+
* <SplitButton.MenuItem asChild onClick={copyMarkdownPage}>
|
|
168
|
+
* <a href={markdownUrl} target="_blank" rel="noopener noreferrer">
|
|
169
|
+
* View as Markdown
|
|
170
|
+
* <Icon svg={<FileTextIcon />} />
|
|
171
|
+
* </a>
|
|
172
|
+
* </SplitButton.MenuItem>
|
|
173
|
+
* </SplitButton.MenuContent>
|
|
174
|
+
* </SplitButton.Root>
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
declare const MenuItem: ({ className, "data-slot": dataSlot, ...props }: ComponentProps<typeof Item>) => import("react").JSX.Element;
|
|
178
|
+
export { MenuContent, MenuItem, MenuTrigger, PrimaryAction, Root };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{t as MenuContent,n as MenuItem,r as MenuTrigger,i as PrimaryAction,a as Root}from"./split-button-DvJHD7cZ.js";
|