@womp/kookie-ui 0.29.2 → 0.31.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/components.css +127 -0
- package/dist/cjs/components/_internal/navigator-host.d.ts +21 -0
- package/dist/cjs/components/_internal/navigator-host.d.ts.map +1 -0
- package/dist/cjs/components/_internal/navigator-host.js +3 -0
- package/dist/cjs/components/_internal/navigator-host.js.map +7 -0
- package/dist/cjs/components/_internal/page-scope.d.ts +48 -0
- package/dist/cjs/components/_internal/page-scope.d.ts.map +1 -0
- package/dist/cjs/components/_internal/page-scope.js +3 -0
- package/dist/cjs/components/_internal/page-scope.js.map +7 -0
- package/dist/cjs/components/_internal/portal-theme.d.ts +2 -1
- package/dist/cjs/components/_internal/portal-theme.d.ts.map +1 -1
- package/dist/cjs/components/_internal/portal-theme.js +1 -1
- package/dist/cjs/components/_internal/portal-theme.js.map +4 -4
- package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js.map +4 -4
- package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js.map +4 -4
- package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
- package/dist/cjs/components/alert-dialog.js +1 -1
- package/dist/cjs/components/alert-dialog.js.map +4 -4
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +4 -4
- package/dist/cjs/components/chatbar.js +1 -1
- package/dist/cjs/components/chatbar.js.map +4 -4
- package/dist/cjs/components/chip.js +1 -1
- package/dist/cjs/components/chip.js.map +4 -4
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +4 -4
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +4 -4
- package/dist/cjs/components/dialog.d.ts.map +1 -1
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +4 -4
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +4 -4
- package/dist/cjs/components/index.d.ts +2 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +2 -2
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/message-scroller.js +1 -1
- package/dist/cjs/components/message-scroller.js.map +4 -4
- package/dist/cjs/components/navigator.d.ts +103 -0
- package/dist/cjs/components/navigator.d.ts.map +1 -0
- package/dist/cjs/components/navigator.js +3 -0
- package/dist/cjs/components/navigator.js.map +7 -0
- package/dist/cjs/components/notice.js +1 -1
- package/dist/cjs/components/notice.js.map +4 -4
- package/dist/cjs/components/page.d.ts +31 -0
- package/dist/cjs/components/page.d.ts.map +1 -0
- package/dist/cjs/components/page.js +3 -0
- package/dist/cjs/components/page.js.map +7 -0
- package/dist/cjs/components/popover.d.ts.map +1 -1
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +4 -4
- package/dist/cjs/components/select.js +1 -1
- package/dist/cjs/components/select.js.map +4 -4
- package/dist/cjs/components/sheet.d.ts.map +1 -1
- package/dist/cjs/components/sheet.js +1 -1
- package/dist/cjs/components/sheet.js.map +4 -4
- package/dist/cjs/components/shell.d.ts.map +1 -1
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +4 -4
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +4 -4
- package/dist/cjs/components/toggle.js +1 -1
- package/dist/cjs/components/toggle.js.map +4 -4
- package/dist/cjs/components/toolbar.d.ts +5 -1
- package/dist/cjs/components/toolbar.d.ts.map +1 -1
- package/dist/cjs/components/toolbar.js +1 -1
- package/dist/cjs/components/toolbar.js.map +4 -4
- package/dist/cjs/components/tooltip.js +1 -1
- package/dist/cjs/components/tooltip.js.map +4 -4
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/{chunk-HBO7W7SS.js → chunk-26O4RBOJ.js} +2 -2
- package/dist/esm/{chunk-FYTLUDL3.js → chunk-3M5ZM67R.js} +2 -2
- package/dist/esm/chunk-4B3S2DM7.js +3 -0
- package/dist/esm/chunk-4B3S2DM7.js.map +7 -0
- package/dist/esm/chunk-4KBKS3ZE.js +3 -0
- package/dist/esm/chunk-4KBKS3ZE.js.map +7 -0
- package/dist/esm/{chunk-2FYUM6TA.js → chunk-4ZHBNYXM.js} +2 -2
- package/dist/esm/{chunk-TSS4K2U5.js → chunk-5VYQDA5S.js} +2 -2
- package/dist/esm/chunk-65URNXF2.js +3 -0
- package/dist/esm/chunk-65URNXF2.js.map +7 -0
- package/dist/esm/chunk-6SGJWML7.js +3 -0
- package/dist/esm/chunk-6SGJWML7.js.map +7 -0
- package/dist/esm/{chunk-WAXRIARV.js → chunk-6WHKGVWY.js} +2 -2
- package/dist/esm/{chunk-7V6M3MIR.js → chunk-7YXHLU4C.js} +2 -2
- package/dist/esm/chunk-AKMRPGNP.js +3 -0
- package/dist/esm/chunk-AKMRPGNP.js.map +7 -0
- package/dist/esm/{chunk-ENQV6SEA.js → chunk-AKSAKP35.js} +2 -2
- package/dist/esm/{chunk-C67MM24U.js → chunk-B7STVZPU.js} +2 -2
- package/dist/esm/{chunk-2E57H3NH.js → chunk-BQOFHLDP.js} +2 -2
- package/dist/esm/{chunk-324VC67W.js → chunk-COLJWVN7.js} +2 -2
- package/dist/esm/{chunk-K3GDM26A.js → chunk-D42VCLKH.js} +2 -2
- package/dist/esm/{chunk-MGWGD6KI.js → chunk-DFQIIYLD.js} +2 -2
- package/dist/esm/{chunk-NWXODCTD.js → chunk-EERKYRYI.js} +2 -2
- package/dist/esm/{chunk-4MNRLB57.js → chunk-FICBVI4M.js} +2 -2
- package/dist/esm/chunk-HGF4CKRY.js +3 -0
- package/dist/esm/chunk-HGF4CKRY.js.map +7 -0
- package/dist/esm/{chunk-JD4KR6VZ.js → chunk-HVMRB3AH.js} +2 -2
- package/dist/esm/{chunk-HLIOHDEX.js → chunk-IFHBMTFX.js} +2 -2
- package/dist/esm/{chunk-J54GYD7A.js → chunk-JFJV4HL3.js} +2 -2
- package/dist/esm/{chunk-KJZSXLIX.js → chunk-JQMWNI62.js} +2 -2
- package/dist/esm/chunk-K35JUIUT.js +3 -0
- package/dist/esm/chunk-K35JUIUT.js.map +7 -0
- package/dist/esm/{chunk-67UEMB4K.js → chunk-KBSH6CBD.js} +2 -2
- package/dist/esm/{chunk-SUQJ7DD4.js → chunk-L7PRLW6A.js} +2 -2
- package/dist/esm/{chunk-D2C2A2ZK.js → chunk-LFAUMDU5.js} +2 -2
- package/dist/esm/{chunk-LABMK6Q7.js → chunk-LG5DPQ46.js} +2 -2
- package/dist/esm/{chunk-MJROOEPE.js → chunk-NFSW36RG.js} +2 -2
- package/dist/esm/{chunk-6YWHNLSC.js → chunk-NJ7RQYLX.js} +2 -2
- package/dist/esm/{chunk-WD66RYF6.js → chunk-NYIYRILR.js} +2 -2
- package/dist/esm/{chunk-JP36JSNP.js → chunk-OBSZOD5M.js} +2 -2
- package/dist/esm/{chunk-DP7MPGR7.js → chunk-OMPLFDS6.js} +2 -2
- package/dist/esm/{chunk-H2J25HXP.js → chunk-OPYTQ34H.js} +2 -2
- package/dist/esm/{chunk-REORAMUH.js → chunk-QBONJMSE.js} +2 -2
- package/dist/esm/chunk-QDAM2I6O.js +3 -0
- package/dist/esm/chunk-QDAM2I6O.js.map +7 -0
- package/dist/esm/chunk-RSG4XWHU.js +2 -0
- package/dist/esm/{chunk-2ZKEQS76.js → chunk-SGKLJDA3.js} +2 -2
- package/dist/esm/{chunk-676Y7ZUT.js → chunk-TMINGBSQ.js} +2 -2
- package/dist/esm/{chunk-2S7HPQVX.js → chunk-TRJAVWCK.js} +2 -2
- package/dist/esm/chunk-TUZ665BA.js +3 -0
- package/dist/esm/chunk-TUZ665BA.js.map +7 -0
- package/dist/esm/{chunk-JKQN6QCP.js → chunk-VBF3XALY.js} +2 -2
- package/dist/esm/chunk-VWRPVM5K.js +3 -0
- package/dist/esm/chunk-VWRPVM5K.js.map +7 -0
- package/dist/esm/{chunk-B6OFKABP.js → chunk-VYF6KKYM.js} +2 -2
- package/dist/esm/chunk-W35ZKQMQ.js +3 -0
- package/dist/esm/chunk-W35ZKQMQ.js.map +7 -0
- package/dist/esm/{chunk-EPGIYTFK.js → chunk-X7DGYRAY.js} +2 -2
- package/dist/esm/{chunk-X7JHZ3HA.js → chunk-XF6Z5NKE.js} +2 -2
- package/dist/esm/{chunk-K5V53KTJ.js → chunk-Y44DYJA5.js} +2 -2
- package/dist/esm/{chunk-MMDZBPSX.js → chunk-YOTTLPJ3.js} +2 -2
- package/dist/esm/chunk-ZBSGH74F.js +3 -0
- package/dist/esm/chunk-ZBSGH74F.js.map +7 -0
- package/dist/esm/chunk-ZHXEEOGI.js +3 -0
- package/dist/esm/chunk-ZHXEEOGI.js.map +7 -0
- package/dist/esm/{chunk-FMVOB367.js → chunk-ZLGOZKB3.js} +2 -2
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-menu.utils.js +1 -1
- package/dist/esm/components/_internal/menu-context.js +1 -1
- package/dist/esm/components/_internal/navigator-host.d.ts +21 -0
- package/dist/esm/components/_internal/navigator-host.d.ts.map +1 -0
- package/dist/esm/components/_internal/navigator-host.js +3 -0
- package/dist/esm/components/_internal/navigator-host.js.map +7 -0
- package/dist/esm/components/_internal/page-scope.d.ts +48 -0
- package/dist/esm/components/_internal/page-scope.d.ts.map +1 -0
- package/dist/esm/components/_internal/page-scope.js +3 -0
- package/dist/esm/components/_internal/page-scope.js.map +7 -0
- package/dist/esm/components/_internal/pane-chrome.js +1 -1
- package/dist/esm/components/_internal/portal-theme.d.ts +2 -1
- package/dist/esm/components/_internal/portal-theme.d.ts.map +1 -1
- package/dist/esm/components/_internal/portal-theme.js +1 -1
- package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-bottom.js +1 -1
- package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-inspector.js +1 -1
- package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/accordion.js +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/blockquote.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/chip.js +1 -1
- package/dist/esm/components/code.js +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/dialog.d.ts.map +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/image.js +1 -1
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/message-scroller.js +1 -1
- package/dist/esm/components/navbar.js +1 -1
- package/dist/esm/components/navigator.d.ts +103 -0
- package/dist/esm/components/navigator.d.ts.map +1 -0
- package/dist/esm/components/navigator.js +3 -0
- package/dist/esm/components/navigator.js.map +7 -0
- package/dist/esm/components/notice.js +1 -1
- package/dist/esm/components/page.d.ts +31 -0
- package/dist/esm/components/page.d.ts.map +1 -0
- package/dist/esm/components/page.js +3 -0
- package/dist/esm/components/page.js.map +7 -0
- package/dist/esm/components/popover.d.ts.map +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/progress.js +1 -1
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/schemas/index.js +1 -1
- package/dist/esm/components/scroll-area.js +1 -1
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/separator.js +1 -1
- package/dist/esm/components/sheet.d.ts.map +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.d.ts.map +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/table.js +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/toggle.js +1 -1
- package/dist/esm/components/toolbar.d.ts +5 -1
- package/dist/esm/components/toolbar.d.ts.map +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/virtual-menu.js +1 -1
- package/dist/esm/hooks/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/src/components/_internal/navigator-host.ts +17 -0
- package/src/components/_internal/page-scope.tsx +119 -0
- package/src/components/_internal/portal-theme.tsx +6 -2
- package/src/components/_internal/shell-bottom.tsx +4 -1
- package/src/components/_internal/shell-inspector.tsx +4 -1
- package/src/components/_internal/shell-sidebar.tsx +4 -1
- package/src/components/dialog.tsx +8 -0
- package/src/components/index.css +2 -0
- package/src/components/index.tsx +15 -0
- package/src/components/navigator.css +85 -0
- package/src/components/navigator.tsx +415 -0
- package/src/components/page.css +38 -0
- package/src/components/page.tsx +93 -0
- package/src/components/popover.tsx +18 -1
- package/src/components/sheet.tsx +8 -0
- package/src/components/shell.tsx +8 -2
- package/src/components/toolbar.css +11 -0
- package/src/components/toolbar.tsx +17 -5
- package/styles.css +127 -0
- package/dist/esm/chunk-4LV37PHM.js +0 -3
- package/dist/esm/chunk-4LV37PHM.js.map +0 -7
- package/dist/esm/chunk-5BX2YZV6.js +0 -3
- package/dist/esm/chunk-5BX2YZV6.js.map +0 -7
- package/dist/esm/chunk-AQKSO3SW.js +0 -3
- package/dist/esm/chunk-AQKSO3SW.js.map +0 -7
- package/dist/esm/chunk-AS2STDGA.js +0 -3
- package/dist/esm/chunk-AS2STDGA.js.map +0 -7
- package/dist/esm/chunk-HR2VHGJ5.js +0 -3
- package/dist/esm/chunk-HR2VHGJ5.js.map +0 -7
- package/dist/esm/chunk-JTMLFTNZ.js +0 -3
- package/dist/esm/chunk-JTMLFTNZ.js.map +0 -7
- package/dist/esm/chunk-MJKVVGGV.js +0 -3
- package/dist/esm/chunk-MJKVVGGV.js.map +0 -7
- package/dist/esm/chunk-NG54K6FL.js +0 -2
- package/dist/esm/chunk-QRV32INS.js +0 -3
- package/dist/esm/chunk-QRV32INS.js.map +0 -7
- package/dist/esm/chunk-YMUERC2J.js +0 -3
- package/dist/esm/chunk-YMUERC2J.js.map +0 -7
- /package/dist/esm/{chunk-HBO7W7SS.js.map → chunk-26O4RBOJ.js.map} +0 -0
- /package/dist/esm/{chunk-FYTLUDL3.js.map → chunk-3M5ZM67R.js.map} +0 -0
- /package/dist/esm/{chunk-2FYUM6TA.js.map → chunk-4ZHBNYXM.js.map} +0 -0
- /package/dist/esm/{chunk-TSS4K2U5.js.map → chunk-5VYQDA5S.js.map} +0 -0
- /package/dist/esm/{chunk-WAXRIARV.js.map → chunk-6WHKGVWY.js.map} +0 -0
- /package/dist/esm/{chunk-7V6M3MIR.js.map → chunk-7YXHLU4C.js.map} +0 -0
- /package/dist/esm/{chunk-ENQV6SEA.js.map → chunk-AKSAKP35.js.map} +0 -0
- /package/dist/esm/{chunk-C67MM24U.js.map → chunk-B7STVZPU.js.map} +0 -0
- /package/dist/esm/{chunk-2E57H3NH.js.map → chunk-BQOFHLDP.js.map} +0 -0
- /package/dist/esm/{chunk-324VC67W.js.map → chunk-COLJWVN7.js.map} +0 -0
- /package/dist/esm/{chunk-K3GDM26A.js.map → chunk-D42VCLKH.js.map} +0 -0
- /package/dist/esm/{chunk-MGWGD6KI.js.map → chunk-DFQIIYLD.js.map} +0 -0
- /package/dist/esm/{chunk-NWXODCTD.js.map → chunk-EERKYRYI.js.map} +0 -0
- /package/dist/esm/{chunk-4MNRLB57.js.map → chunk-FICBVI4M.js.map} +0 -0
- /package/dist/esm/{chunk-JD4KR6VZ.js.map → chunk-HVMRB3AH.js.map} +0 -0
- /package/dist/esm/{chunk-HLIOHDEX.js.map → chunk-IFHBMTFX.js.map} +0 -0
- /package/dist/esm/{chunk-J54GYD7A.js.map → chunk-JFJV4HL3.js.map} +0 -0
- /package/dist/esm/{chunk-KJZSXLIX.js.map → chunk-JQMWNI62.js.map} +0 -0
- /package/dist/esm/{chunk-67UEMB4K.js.map → chunk-KBSH6CBD.js.map} +0 -0
- /package/dist/esm/{chunk-SUQJ7DD4.js.map → chunk-L7PRLW6A.js.map} +0 -0
- /package/dist/esm/{chunk-D2C2A2ZK.js.map → chunk-LFAUMDU5.js.map} +0 -0
- /package/dist/esm/{chunk-LABMK6Q7.js.map → chunk-LG5DPQ46.js.map} +0 -0
- /package/dist/esm/{chunk-MJROOEPE.js.map → chunk-NFSW36RG.js.map} +0 -0
- /package/dist/esm/{chunk-6YWHNLSC.js.map → chunk-NJ7RQYLX.js.map} +0 -0
- /package/dist/esm/{chunk-WD66RYF6.js.map → chunk-NYIYRILR.js.map} +0 -0
- /package/dist/esm/{chunk-JP36JSNP.js.map → chunk-OBSZOD5M.js.map} +0 -0
- /package/dist/esm/{chunk-DP7MPGR7.js.map → chunk-OMPLFDS6.js.map} +0 -0
- /package/dist/esm/{chunk-H2J25HXP.js.map → chunk-OPYTQ34H.js.map} +0 -0
- /package/dist/esm/{chunk-REORAMUH.js.map → chunk-QBONJMSE.js.map} +0 -0
- /package/dist/esm/{chunk-NG54K6FL.js.map → chunk-RSG4XWHU.js.map} +0 -0
- /package/dist/esm/{chunk-2ZKEQS76.js.map → chunk-SGKLJDA3.js.map} +0 -0
- /package/dist/esm/{chunk-676Y7ZUT.js.map → chunk-TMINGBSQ.js.map} +0 -0
- /package/dist/esm/{chunk-2S7HPQVX.js.map → chunk-TRJAVWCK.js.map} +0 -0
- /package/dist/esm/{chunk-JKQN6QCP.js.map → chunk-VBF3XALY.js.map} +0 -0
- /package/dist/esm/{chunk-B6OFKABP.js.map → chunk-VYF6KKYM.js.map} +0 -0
- /package/dist/esm/{chunk-EPGIYTFK.js.map → chunk-X7DGYRAY.js.map} +0 -0
- /package/dist/esm/{chunk-X7JHZ3HA.js.map → chunk-XF6Z5NKE.js.map} +0 -0
- /package/dist/esm/{chunk-K5V53KTJ.js.map → chunk-Y44DYJA5.js.map} +0 -0
- /package/dist/esm/{chunk-MMDZBPSX.js.map → chunk-YOTTLPJ3.js.map} +0 -0
- /package/dist/esm/{chunk-FMVOB367.js.map → chunk-ZLGOZKB3.js.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/toolbar.tsx", "../../src/components/toolbar.props.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport classNames from 'classnames';\nimport { Toolbar as ToolbarPrimitive } from 'radix-ui';\n\nimport { toolbarRootPropDefs } from './toolbar.props.js';\nimport { Button } from './button.js';\nimport * as DropdownMenu from './dropdown-menu.js';\nimport { Text } from './text.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSize } from '../hooks/theme-size.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { usePaneBandSize } from './_internal/pane-chrome.js';\n\nimport type { ButtonProps } from './button.js';\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { TextProps } from './text.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ButtonRankProps } from './button.js';\n\n/*\n * Toolbar takes Kookie UI v2's contract (v2: components/toolbar), built on Radix instead of\n * Base UI. A toolbar is a row of controls with ONE tab stop: `role=\"toolbar\"`, and the arrow\n * keys move focus between its controls. That keyboard is the reason it is a component.\n *\n * Its `size` reaches every control inside it that does not state its own. The row itself paints\n * nothing; a `ToolbarGroup` draws a quiet well around controls that belong together, and a\n * `ToolbarSeparator` draws a gray hairline between clusters. Use a `Flex` to cluster controls\n * without a well: the row spaces the clusters with `space-between`.\n */\n\ntype ToolbarSize = NonNullable<GetPropDefTypes<typeof toolbarRootPropDefs>['size']>;\ntype ToolbarOrientation = NonNullable<GetPropDefTypes<typeof toolbarRootPropDefs>['orientation']>;\n\ninterface ToolbarContextValue {\n size: ToolbarSize;\n orientation: ToolbarOrientation;\n backdrop: boolean;\n}\n\nconst ToolbarContext = React.createContext<ToolbarContextValue | null>(null);\n\n/** Set by a `ToolbarGroup`: its children rest quiet, and `disabled` turns them all off. */\nconst ToolbarGroupContext = React.createContext<{ disabled: boolean } | null>(null);\n\n/**\n * True while a subtree is drawn into a `ToolbarOverflow`'s menu instead of into the row (v2\n * `InOverflow`). The parts answer it themselves: a `ToolbarButton` renders a menu item, a\n * `ToolbarGroup` a menu group, a `ToolbarSeparator` a menu separator.\n */\nconst InOverflowContext = React.createContext(false);\n\n/**\n * True while this subtree is drawn into a `ToolbarOverflow`'s \"More\" menu instead of the row.\n *\n * The toolbar's own parts handle this already. Use it in your own component inside a\n * `ToolbarOverflow` to render a different form in the menu.\n */\nfunction useToolbarOverflow(): boolean {\n return React.useContext(InOverflowContext);\n}\n\n// ============================================================================\n// Toolbar (root)\n// ============================================================================\n\ntype ToolbarOwnProps = GetPropDefTypes<typeof toolbarRootPropDefs>;\n\ninterface ToolbarProps\n extends ComponentPropsWithout<typeof ToolbarPrimitive.Root, RemovedProps | 'orientation'>,\n ToolbarOwnProps,\n LayoutProps {\n /**\n * Gives every control a surface of its own, for a row that content passes behind, such as\n * `Shell.PaneHeader float`. Buttons rest `raised` instead of `soft`, and a group's well is\n * solid and raised.\n */\n backdrop?: boolean;\n}\n\n/**\n * A row of controls with one keyboard tab stop. The arrow keys move focus between the controls.\n *\n * Give it an `aria-label` (or `aria-labelledby`) that says what the controls act on.\n *\n * @example\n * ```tsx\n * <Toolbar aria-label=\"Formatting\">\n * <ToolbarGroup>\n * <ToolbarButton iconOnly aria-label=\"Bold\" aria-pressed={bold} onClick={toggleBold}>\n * <HugeiconsIcon icon={TextBoldIcon} strokeWidth={1.75} />\n * </ToolbarButton>\n * </ToolbarGroup>\n * <ToolbarSeparator />\n * <ToolbarButton>Share</ToolbarButton>\n * </Toolbar>\n * ```\n */\nconst ToolbarRoot = React.forwardRef<HTMLDivElement, ToolbarProps>((props, forwardedRef) => {\n // Inside a Shell (a pane's header or footer, or the content area), a toolbar with no size\n // rests one step above the Shell's. A pane's scrolling list has no band.\n const band = usePaneBandSize();\n // Elsewhere it takes the nearest Theme's size.\n const size: ToolbarSize = useThemeSize(props.size ?? band ?? undefined, toolbarRootPropDefs.size);\n const orientation: ToolbarOrientation = props.orientation ?? toolbarRootPropDefs.orientation.default;\n const { className, orientation: _orientation, backdrop = false, children, ...rootProps } = extractProps(\n { ...props, size },\n toolbarRootPropDefs,\n layoutPropDefs,\n );\n\n const context = React.useMemo(() => ({ size, orientation, backdrop }), [size, orientation, backdrop]);\n\n return (\n <ToolbarPrimitive.Root\n {...rootProps}\n ref={forwardedRef}\n orientation={orientation}\n data-backdrop={backdrop || undefined}\n className={classNames('kui-Toolbar', className)}\n >\n <ToolbarContext.Provider value={context}>{children}</ToolbarContext.Provider>\n </ToolbarPrimitive.Root>\n );\n});\nToolbarRoot.displayName = 'Toolbar';\n\n// ============================================================================\n// ToolbarGroup\n// ============================================================================\n\ninterface ToolbarGroupProps extends ComponentPropsWithout<'div', RemovedProps> {\n /** Turns every control in the group off at once. */\n disabled?: boolean;\n}\n\n/**\n * Controls that belong together, drawn as one quiet well that stands level with a button\n * beside it. Buttons inside it rest as `ghost` unless they state a `variant`.\n * To cluster controls without a well, use a `Flex`.\n *\n * In a `ToolbarOverflow`'s menu it is a menu group. Outside a `Toolbar` (rendered through a\n * portal, for example) it still draws its well, as a horizontal group.\n */\nconst ToolbarGroup = React.forwardRef<HTMLDivElement, ToolbarGroupProps>(\n ({ className, disabled = false, children, ...props }, forwardedRef) => {\n const toolbar = React.useContext(ToolbarContext);\n const overflow = React.useContext(InOverflowContext);\n const group = React.useMemo(() => ({ disabled }), [disabled]);\n\n if (overflow) {\n return (\n <DropdownMenu.Group {...props} ref={forwardedRef} className={className}>\n <ToolbarGroupContext.Provider value={group}>{children}</ToolbarGroupContext.Provider>\n </DropdownMenu.Group>\n );\n }\n\n return (\n <div\n role=\"group\"\n data-orientation={toolbar?.orientation ?? 'horizontal'}\n data-disabled={disabled || undefined}\n {...props}\n ref={forwardedRef}\n className={classNames('kui-ToolbarGroup', className)}\n >\n <ToolbarGroupContext.Provider value={group}>{children}</ToolbarGroupContext.Provider>\n </div>\n );\n },\n);\nToolbarGroup.displayName = 'Toolbar.Group';\n\n// ============================================================================\n// ToolbarButton\n// ============================================================================\n\ntype ToolbarButtonBaseProps = Omit<ButtonProps, 'as' | 'variant' | 'emphasis'>;\n\n/** A labelled button: takes every `Button` prop. */\ntype ToolbarTextButtonProps = ToolbarButtonBaseProps &\n ButtonRankProps & {\n iconOnly?: false;\n};\n\n/** An icon-only button: renders `Button iconOnly`, and the type requires an `aria-label`. */\ntype ToolbarIconButtonProps = Omit<ToolbarButtonBaseProps, 'aria-label' | 'aria-labelledby' | 'fullWidth'> &\n ButtonRankProps & {\n iconOnly: true;\n /** The control's accessible name. An icon has no words of its own, so this is required. */\n 'aria-label': string;\n};\n\ntype ToolbarButtonProps = ToolbarTextButtonProps | ToolbarIconButtonProps;\n\n/** The plain DOM props, besides handlers, ARIA and data attributes, a menu row takes from a ToolbarButton. */\nconst OVERFLOW_ITEM_KEYS = new Set(['id', 'className', 'style', 'title']);\n\nfunction isPressed(value: React.AriaAttributes['aria-pressed']) {\n return value === true || value === 'true';\n}\n\n/** Does an `asChild` child render a native `<button>`? Only then is it a Radix Toolbar.Button. */\nfunction isButtonElement(children: React.ReactNode) {\n return React.isValidElement(children) && children.type === 'button';\n}\n\n/**\n * A `Button` that joins the toolbar's keyboard navigation, so a row of them is one tab stop.\n *\n * Set `iconOnly` (with an `aria-label`) for a symbol-only control. Set `aria-pressed` for a\n * control that toggles; a pressed button wears Button's pressed look. Set `asChild` to render\n * your own element, such as a link: `<ToolbarButton asChild><a href=\"/docs\">Docs</a></ToolbarButton>`.\n * A link stays in the arrow-key row and gets no `type` attribute.\n *\n * It takes the toolbar's `size`, and rests as a gray `soft` button (`raised` in a toolbar with\n * `backdrop`, gray `ghost` inside a `ToolbarGroup`). A stated `size`, `variant` or `color` wins; a\n * stated `variant` without a `color` takes Button's own default colour.\n *\n * In a `ToolbarOverflow`'s menu it renders a menu item; an icon-only button uses its\n * `aria-label` as the item's text. Outside a `Toolbar` (rendered through a React portal, for\n * example) it renders a plain Button with the same rest look, as its own tab stop. Use\n * `ToolbarSlot` and `ToolbarFill` for a control that should join the row's arrow keys.\n */\nconst ToolbarButton = React.forwardRef<HTMLButtonElement, ToolbarButtonProps>((props, forwardedRef) => {\n const toolbar = React.useContext(ToolbarContext);\n const group = React.useContext(ToolbarGroupContext);\n const overflow = React.useContext(InOverflowContext);\n const { iconOnly, size, variant, emphasis, color, disabled, asChild, onKeyDown, ...rest } = props;\n const off = disabled || group?.disabled || undefined;\n\n if (overflow) {\n // Only what a menu row means comes across: handlers, ARIA, data attributes, id, class and\n // style. Button's box props (size, loading, tooltip, fullWidth and the rest) would land on the\n // DOM as unknown attributes. A wrapping menu trigger hands its open handlers (onPointerDown,\n // onKeyDown), aria-expanded/haspopup/controls and data-state in through these, so it still\n // opens from the row.\n const passed: Record<string, unknown> = {};\n for (const key of Object.keys(rest)) {\n if (/^on[A-Z]/.test(key) || key.startsWith('aria-') || key.startsWith('data-') || OVERFLOW_ITEM_KEYS.has(key)) {\n passed[key] = (rest as Record<string, unknown>)[key];\n }\n }\n if (onKeyDown) passed.onKeyDown = onKeyDown;\n return (\n <ToolbarOverflowItem\n {...(passed as React.ComponentPropsWithoutRef<'div'>)}\n ref={forwardedRef as unknown as React.Ref<HTMLDivElement>}\n asChild={asChild}\n iconOnly={iconOnly}\n disabled={off}\n color={color}\n pressed={props['aria-pressed'] === undefined ? undefined : isPressed(props['aria-pressed'])}\n >\n {rest.children}\n </ToolbarOverflowItem>\n );\n }\n\n // In a vertical toolbar, Up and Down belong to the toolbar. A menu trigger rendering this\n // hands its open-on-arrow handler in through `onKeyDown`; those two keys skip it (v2).\n const handleKeyDown =\n toolbar?.orientation === 'vertical' && onKeyDown\n ? (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') return;\n onKeyDown(event);\n }\n : onKeyDown;\n\n const pressed = isPressed(props['aria-pressed']);\n const stateProps =\n 'data-state' in props || props['aria-pressed'] === undefined ? {} : { 'data-state': pressed ? 'on' : 'off' };\n\n const shared = {\n size: size ?? toolbar?.size,\n // A caller states the look by `variant` or the rank by `emphasis`, never both.\n ...(emphasis !== undefined\n ? { emphasis }\n : { variant: variant ?? (group ? 'ghost' : toolbar?.backdrop ? 'raised' : 'soft') }),\n // The gray rest is a pair with the default variant: a caller who states a variant or an\n // emphasis gets Button's own colour for it unless they state a colour too.\n color: color ?? (variant || emphasis ? undefined : 'gray'),\n ...stateProps,\n } as const;\n\n // The text and icon-only branches share every prop but the name; one Button renders both.\n const buttonProps = {\n ...rest,\n ...(iconOnly ? { iconOnly: true } : {}),\n ...(asChild ? { asChild: true } : {}),\n ...(handleKeyDown ? { onKeyDown: handleKeyDown } : {}),\n ...shared,\n } as ButtonProps;\n\n // Outside a toolbar there is no row to join: a plain Button, not a throw.\n if (!toolbar) {\n return <Button {...buttonProps} ref={forwardedRef} disabled={off} />;\n }\n\n // A link (or any non-button child) joins the row as a Radix Toolbar.Link, which sets no\n // `type`. Toolbar.Button would stamp `type=\"button\"` on it.\n if (asChild && !isButtonElement(rest.children)) {\n return (\n <ToolbarPrimitive.Link asChild ref={forwardedRef as unknown as React.Ref<HTMLAnchorElement>}>\n <Button {...buttonProps} disabled={off} />\n </ToolbarPrimitive.Link>\n );\n }\n\n return (\n <ToolbarPrimitive.Button asChild ref={forwardedRef} disabled={off}>\n <Button {...buttonProps} />\n </ToolbarPrimitive.Button>\n );\n});\nToolbarButton.displayName = 'Toolbar.Button';\n\ninterface ToolbarOverflowItemProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'onSelect' | 'color'> {\n asChild?: boolean;\n iconOnly?: boolean;\n disabled?: boolean;\n color?: ButtonProps['color'];\n /** A toggle's pressed state. A toggle becomes a checkbox item, so the menu still says whether it is on. */\n pressed?: boolean;\n}\n\n/**\n * A ToolbarButton drawn into the overflow menu: the same element, as a menu item. An icon-only\n * button's `aria-label` becomes the item's text beside its icon, since a menu row has room for\n * words. What prices a box (size, variant, emphasis, iconOnly) does not come across.\n */\nconst ToolbarOverflowItem = React.forwardRef<HTMLDivElement, ToolbarOverflowItemProps>(\n ({ asChild, iconOnly, disabled, color, pressed, children, 'aria-label': label, ...props }, forwardedRef) => {\n const words = iconOnly ? label : undefined;\n const itemProps = {\n ...props,\n ...(iconOnly ? {} : label ? { 'aria-label': label } : {}),\n disabled,\n ...(color ? { color: color as DropdownMenu.ItemProps['color'] } : {}),\n };\n if (asChild && React.isValidElement<{ children?: React.ReactNode }>(children)) {\n const child = words\n ? React.cloneElement(children, undefined, children.props.children, <span>{words}</span>)\n : children;\n return (\n <DropdownMenu.Item {...itemProps} ref={forwardedRef} asChild>\n {child}\n </DropdownMenu.Item>\n );\n }\n if (pressed !== undefined) {\n return (\n <DropdownMenu.CheckboxItem {...itemProps} ref={forwardedRef} checked={pressed}>\n {children}\n {words}\n </DropdownMenu.CheckboxItem>\n );\n }\n return (\n <DropdownMenu.Item {...itemProps} ref={forwardedRef}>\n {children}\n {words}\n </DropdownMenu.Item>\n );\n },\n);\nToolbarOverflowItem.displayName = 'Toolbar.OverflowItem';\n\n// ============================================================================\n// ToolbarOverflow\n// ============================================================================\n\ninterface ToolbarOverflowProps extends ComponentPropsWithout<'div', RemovedProps> {\n /** The accessible name of the \"More\" button. Defaults to `More`. */\n label?: string;\n /** The controls in the cluster, in order. The ones that don't fit move into the \"More\" menu. */\n children?: React.ReactNode;\n}\n\n/** Three filled dots for the \"More\" button. Internal, so the library carries no icon set. */\nfunction MoreIcon() {\n return (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"currentcolor\" aria-hidden xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"3.25\" cy=\"8\" r=\"1.25\" />\n <circle cx=\"8\" cy=\"8\" r=\"1.25\" />\n <circle cx=\"12.75\" cy=\"8\" r=\"1.25\" />\n </svg>\n );\n}\n\n/**\n * A cluster of controls that collapses into a \"More\" menu when the row runs out of room.\n *\n * It takes the room the row leaves, and when its controls don't fit, they move into the menu\n * from the end of the cluster. A `ToolbarButton` shows as a menu item there, and a\n * `ToolbarGroup` as a menu group. Use `useToolbarOverflow()` in your own components to render a\n * different form in the menu.\n *\n * It measures on mount and on resize (v2 ToolbarOverflow): each control's width is cached while\n * it is in the row, since a hidden control has no width to measure.\n */\nconst ToolbarOverflow = React.forwardRef<HTMLDivElement, ToolbarOverflowProps>(\n ({ label = 'More', className, children, ...props }, forwardedRef) => {\n const items = React.Children.toArray(children);\n const count = items.length;\n\n const rootRef = React.useRef<HTMLDivElement | null>(null);\n const widths = React.useRef<number[]>([]);\n const triggerWidth = React.useRef(0);\n const [shown, setShown] = React.useState(count);\n const [tick, setTick] = React.useState(0);\n\n // A different set of children is a different set of widths: show them all and measure again.\n const [measuredCount, setMeasuredCount] = React.useState(count);\n if (measuredCount !== count) {\n setMeasuredCount(count);\n setShown(count);\n }\n useLayoutEffect(() => {\n widths.current = [];\n }, [count]);\n\n useLayoutEffect(() => {\n const root = rootRef.current;\n if (!root) return;\n\n // The root's children are one seat per visible child, then the trigger.\n const kids = Array.from(root.children) as HTMLElement[];\n const visible = Math.min(shown, count);\n for (let i = 0; i < visible; i++) {\n const el = kids[i];\n if (el) widths.current[i] = el.offsetWidth;\n }\n const trigger = kids[visible];\n if (trigger) triggerWidth.current = trigger.offsetWidth;\n\n const gap = Number.parseFloat(getComputedStyle(root).columnGap) || 0;\n const available = root.clientWidth;\n\n let total = 0;\n let counted = 0;\n for (let i = 0; i < count; i++) {\n const width = widths.current[i];\n // Never seen in the row, so there is nothing to decide with yet.\n if (width === undefined) return;\n // An empty seat leaves the layout, so it spends no gap.\n if (width === 0) continue;\n total += width + (counted > 0 ? gap : 0);\n counted += 1;\n }\n\n let next = count;\n if (total > available) {\n // Before the trigger exists, the row's height stands in for its width: an icon-only\n // button is square. The next pass, before paint, corrects it.\n const budget = available - (triggerWidth.current || root.clientHeight) - gap;\n let used = 0;\n let drawn = 0;\n next = 0;\n for (let i = 0; i < count; i++) {\n const own = widths.current[i]!;\n if (own > 0) {\n const width = own + (drawn > 0 ? gap : 0);\n if (used + width > budget) break;\n used += width;\n drawn += 1;\n }\n next += 1;\n }\n }\n if (next !== shown) setShown(next);\n }, [shown, count, tick]);\n\n // Watch the row and every seat in it: a control whose content changes (a page's actions\n // arriving after navigation) changes its width without the row's width changing.\n React.useEffect(() => {\n const root = rootRef.current;\n if (!root || typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(() => setTick((n) => n + 1));\n observer.observe(root);\n for (const seat of Array.from(root.children)) observer.observe(seat);\n return () => observer.disconnect();\n }, [shown, count]);\n\n const attach = React.useCallback(\n (node: HTMLDivElement | null) => {\n rootRef.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef) forwardedRef.current = node;\n },\n [forwardedRef],\n );\n\n return (\n <div {...props} ref={attach} className={classNames('kui-ToolbarOverflow', className)}>\n {items.slice(0, shown).map((item, i) => (\n // The seat is a position in the row, so its key is the index.\n <div key={i} className=\"kui-ToolbarOverflowSeat\">\n {item}\n </div>\n ))}\n {shown < count ? (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger>\n <ToolbarButton iconOnly aria-label={label}>\n <MoreIcon />\n </ToolbarButton>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\">\n <InOverflowContext.Provider value>{items.slice(shown)}</InOverflowContext.Provider>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n ) : null}\n </div>\n );\n },\n);\nToolbarOverflow.displayName = 'Toolbar.Overflow';\n\n// ============================================================================\n// ToolbarSlot and ToolbarFill\n// ============================================================================\n\ntype SlotEntry = { id: string; node: React.ReactNode };\n\nconst EMPTY_ENTRIES: readonly SlotEntry[] = [];\nconst slotEntries = new Map<string, readonly SlotEntry[]>();\nconst slotListeners = new Set<() => void>();\n/** How many ToolbarSlots of each name are mounted, to warn when one Fill would render twice. */\nconst mountedSlots = new Map<string, number>();\n\nfunction subscribeSlots(listener: () => void) {\n slotListeners.add(listener);\n return () => {\n slotListeners.delete(listener);\n };\n}\n\nfunction setSlotEntry(name: string, id: string, node: React.ReactNode) {\n const list = slotEntries.get(name) ?? EMPTY_ENTRIES;\n const index = list.findIndex((entry) => entry.id === id);\n const next = index === -1 ? [...list, { id, node }] : list.map((entry) => (entry.id === id ? { id, node } : entry));\n slotEntries.set(name, next);\n slotListeners.forEach((listener) => listener());\n}\n\nfunction removeSlotEntry(name: string, id: string) {\n const list = slotEntries.get(name);\n if (!list) return;\n const next = list.filter((entry) => entry.id !== id);\n if (next.length === 0) slotEntries.delete(name);\n else slotEntries.set(name, next);\n slotListeners.forEach((listener) => listener());\n}\n\ninterface ToolbarSlotProps {\n /**\n * Which `ToolbarFill` renders here. Defaults to `default`. Names are global to the page: mount one\n * slot per name, or the fill renders in each of them (development builds warn).\n */\n name?: string;\n}\n\n/**\n * A place in a toolbar that content elsewhere in the app fills, such as a page adding its own\n * actions to a header toolbar the layout owns.\n *\n * It renders whatever the `ToolbarFill` with the same `name` holds, as if it were written here:\n * the controls take the toolbar's size and join its arrow-key row. It adds no element.\n */\nfunction ToolbarSlot({ name = 'default' }: ToolbarSlotProps) {\n useLayoutEffect(() => {\n const count = (mountedSlots.get(name) ?? 0) + 1;\n mountedSlots.set(name, count);\n if (count > 1 && process.env.NODE_ENV !== 'production') {\n console.warn(`[kookie-ui] ToolbarSlot: ${count} slots named \"${name}\" are mounted. Each renders the ToolbarFill's controls, so they appear more than once. Give each slot its own name.`);\n }\n return () => {\n const left = (mountedSlots.get(name) ?? 1) - 1;\n if (left > 0) mountedSlots.set(name, left);\n else mountedSlots.delete(name);\n };\n }, [name]);\n const entries = React.useSyncExternalStore(\n subscribeSlots,\n () => slotEntries.get(name) ?? EMPTY_ENTRIES,\n () => EMPTY_ENTRIES,\n );\n return (\n <>\n {entries.map((entry) => (\n <React.Fragment key={entry.id}>{entry.node}</React.Fragment>\n ))}\n </>\n );\n}\nToolbarSlot.displayName = 'Toolbar.Slot';\n\ninterface ToolbarFillProps {\n /** The `ToolbarSlot` to render into. Defaults to `default`. */\n name?: string;\n /** The controls to show in the slot, such as `ToolbarButton`s. */\n children?: React.ReactNode;\n}\n\n/**\n * Sends its children to the `ToolbarSlot` with the same `name`, and renders nothing where it\n * is written. Use it instead of a React portal: a portal keeps the page's React tree, so a\n * ToolbarButton in it can't join the toolbar's arrow keys.\n *\n * The children render inside the toolbar, so they read the toolbar's context, not the page's.\n * They appear after the page mounts on the client, not in server-rendered HTML.\n */\nfunction ToolbarFill({ name = 'default', children }: ToolbarFillProps) {\n const id = React.useId();\n useLayoutEffect(() => {\n setSlotEntry(name, id, children);\n }, [name, id, children]);\n useLayoutEffect(() => () => removeSlotEntry(name, id), [name, id]);\n return null;\n}\nToolbarFill.displayName = 'Toolbar.Fill';\n\n// ============================================================================\n// ToolbarSeparator\n// ============================================================================\n\ntype ToolbarSeparatorProps = ComponentPropsWithout<typeof ToolbarPrimitive.Separator, RemovedProps | 'orientation'>;\n\n/**\n * A gray hairline between two clusters, announced as a separator. Its direction is always\n * opposite to the toolbar's. In a `ToolbarOverflow`'s menu it is a menu separator.\n */\nconst ToolbarSeparator = React.forwardRef<HTMLDivElement, ToolbarSeparatorProps>(\n ({ className, ...props }, forwardedRef) => {\n const toolbar = React.useContext(ToolbarContext);\n const overflow = React.useContext(InOverflowContext);\n if (overflow) return <DropdownMenu.Separator {...props} ref={forwardedRef} className={className} />;\n if (!toolbar) {\n return (\n <div\n role=\"separator\"\n aria-orientation=\"vertical\"\n data-orientation=\"vertical\"\n {...props}\n ref={forwardedRef}\n className={classNames('kui-ToolbarSeparator', className)}\n />\n );\n }\n return (\n <ToolbarPrimitive.Separator\n {...props}\n ref={forwardedRef}\n className={classNames('kui-ToolbarSeparator', className)}\n />\n );\n },\n);\nToolbarSeparator.displayName = 'Toolbar.Separator';\n\n// ============================================================================\n// ToolbarTitle\n// ============================================================================\n\n/** The title's text step: one step above the label of a button at the same size. */\nconst TITLE_SIZE = { '1': '2', '2': '3', '3': '4', '4': '5' } as const satisfies Record<ToolbarSize, TextProps['size']>;\n\ninterface ToolbarTitleProps {\n /** The title text. With none, the title renders nothing. */\n children?: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n /** The id of the title, so that the toolbar's `aria-labelledby` can point at it. */\n id?: string;\n}\n\n/**\n * What the row is about, at its leading edge. One line: it truncates rather than wrapping.\n * Its text step follows the toolbar's `size`, and it takes more air from the controls beside it\n * than they take from each other.\n */\nconst ToolbarTitle = React.forwardRef<HTMLSpanElement, ToolbarTitleProps>(\n ({ className, children, style, id }, forwardedRef) => {\n const toolbar = React.useContext(ToolbarContext);\n const themeSize = useThemeSize<ToolbarSize>(undefined, toolbarRootPropDefs.size);\n const size = toolbar?.size ?? themeSize;\n if (children === undefined || children === null || children === false) return null;\n return (\n <Text\n ref={forwardedRef}\n as=\"span\"\n size={TITLE_SIZE[size]}\n weight=\"medium\"\n truncate\n id={id}\n style={style}\n className={classNames('kui-ToolbarTitle', className)}\n >\n {children}\n </Text>\n );\n },\n);\nToolbarTitle.displayName = 'Toolbar.Title';\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nconst Toolbar = Object.assign(ToolbarRoot, {\n Root: ToolbarRoot,\n Group: ToolbarGroup,\n Button: ToolbarButton,\n Separator: ToolbarSeparator,\n Title: ToolbarTitle,\n Overflow: ToolbarOverflow,\n Slot: ToolbarSlot,\n Fill: ToolbarFill,\n});\n\nexport {\n Toolbar,\n ToolbarGroup,\n ToolbarButton,\n ToolbarSeparator,\n ToolbarTitle,\n ToolbarOverflow,\n ToolbarSlot,\n ToolbarFill,\n useToolbarOverflow,\n ToolbarRoot as Root,\n ToolbarGroup as Group,\n ToolbarButton as Button,\n ToolbarSeparator as Separator,\n ToolbarTitle as Title,\n ToolbarOverflow as Overflow,\n ToolbarSlot as Slot,\n ToolbarFill as Fill,\n};\nexport type {\n ToolbarProps,\n ToolbarGroupProps,\n ToolbarButtonProps,\n ToolbarSeparatorProps,\n ToolbarTitleProps,\n ToolbarOverflowProps,\n ToolbarSlotProps,\n ToolbarFillProps,\n ToolbarProps as RootProps,\n ToolbarGroupProps as GroupProps,\n ToolbarButtonProps as ButtonProps,\n ToolbarSeparatorProps as SeparatorProps,\n ToolbarTitleProps as TitleProps,\n ToolbarOverflowProps as OverflowProps,\n ToolbarSlotProps as SlotProps,\n ToolbarFillProps as FillProps,\n};\n", "import type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst orientations = ['horizontal', 'vertical'] as const;\n\n/**\n * Toolbar prop definitions.\n *\n * `size` is one value for the whole row (not responsive): the row hands it to every control\n * inside it that does not state its own, through context, so it has to be a single index.\n */\nconst toolbarRootPropDefs = {\n /**\n * Size step of the row and of every control in it that doesn't set its own `size`.\n * Matches Button's sizes: 1 (28px) to 4 (48px). Unset inside a Shell, it rests one step above\n * the Shell's `size`, except in a pane's `Shell.Scroll` list and in a Popover, Dialog, Sheet or\n * menu. Elsewhere it takes Theme size, else 2.\n */\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2' },\n /**\n * Direction of the row and of the arrow keys. Use `vertical` for a strip of tools along an edge.\n */\n orientation: { type: 'enum', values: orientations, default: 'horizontal' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n orientation: PropDef<(typeof orientations)[number]>;\n};\n\nexport { toolbarRootPropDefs };\n"],
|
|
5
|
-
"mappings": ";uUAEA,UAAYA,MAAW,QACvB,OAAS,mBAAAC,MAAuB,oBAChC,OAAOC,MAAgB,aACvB,OAAS,WAAWC,MAAwB,WCH5C,IAAMC,GAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,GAAe,CAAC,aAAc,UAAU,EAQxCC,EAAsB,CAO1B,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQF,GAAO,QAAS,GAAI,EAI3E,YAAa,CAAE,KAAM,OAAQ,OAAQC,GAAc,QAAS,YAAa,CAC3E,EDoBA,IAAME,EAAuB,gBAA0C,IAAI,EAGrEC,EAA4B,gBAA4C,IAAI,EAO5EC,EAA0B,gBAAc,EAAK,EAQnD,SAASC,IAA8B,CACrC,OAAa,aAAWD,CAAiB,CAC3C,CAsCA,IAAME,EAAoB,aAAyC,CAACC,EAAOC,IAAiB,CAG1F,IAAMC,EAAOC,EAAgB,EAEvBC,EAAoBC,EAAaL,EAAM,MAAQE,GAAQ,OAAWI,EAAoB,IAAI,EAC1FC,EAAkCP,EAAM,aAAeM,EAAoB,YAAY,QACvF,CAAE,UAAAE,EAAW,YAAaC,EAAc,SAAAC,EAAW,GAAO,SAAAC,EAAU,GAAGC,CAAU,EAAIC,EACzF,CAAE,GAAGb,EAAO,KAAAI,CAAK,EACjBE,EACAQ,CACF,EAEMC,EAAgB,UAAQ,KAAO,CAAE,KAAAX,EAAM,YAAAG,EAAa,SAAAG,CAAS,GAAI,CAACN,EAA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AAc,EAE/C,OADuB,aAAWE,CAAiB,EAC9B,gBAAcgH,GAAb,CAAwB,GAAG7G,EAAO,IAAKC,EAAc,UAAWO,EAAW,EAC5FY,EAaH,gBAACJ,EAAiB,UAAjB,CACE,GAAGhB,EACJ,IAAKC,EACL,UAAWgB,EAAW,uBAAwBT,CAAS,EACzD,EAfE,gBAAC,OACC,KAAK,YACL,mBAAiB,WACjB,mBAAiB,WAChB,GAAGR,EACJ,IAAKC,EACL,UAAWgB,EAAW,uBAAwBT,CAAS,EACzD,CAUN,CACF,EACAoG,GAAiB,YAAc,oBAO/B,IAAME,GAAa,CAAE,EAAK,IAAK,EAAK,IAAK,EAAK,IAAK,EAAK,GAAI,EAgBtDC,GAAqB,aACzB,CAAC,CAAE,UAAAvG,EAAW,SAAAG,EAAU,MAAAqG,EAAO,GAAAZ,CAAG,EAAGnG,IAAiB,CACpD,IAAMmB,EAAgB,aAAWzB,CAAc,EACzCsH,EAAY5G,EAA0B,OAAWC,EAAoB,IAAI,EACzEF,EAAOgB,GAAS,MAAQ6F,EAC9B,OAA8BtG,GAAa,MAAQA,IAAa,GAAc,KAE5E,gBAACuG,EAAA,CACC,IAAKjH,EACL,GAAG,OACH,KAAM6G,GAAW1G,CAAI,EACrB,OAAO,SACP,SAAQ,GACR,GAAIgG,EACJ,MAAOY,EACP,UAAW/F,EAAW,mBAAoBT,CAAS,GAElDG,CACH,CAEJ,CACF,EACAoG,GAAa,YAAc,gBAM3B,IAAMI,GAAU,OAAO,OAAOpH,EAAa,CACzC,KAAMA,EACN,MAAOmB,GACP,OAAQU,EACR,UAAWgF,GACX,MAAOG,GACP,SAAUzD,GACV,KAAMkD,GACN,KAAMG,EACR,CAAC",
|
|
6
|
-
"names": ["React", "useLayoutEffect", "classNames", "ToolbarPrimitive", "sizes", "orientations", "toolbarRootPropDefs", "ToolbarContext", "ToolbarGroupContext", "InOverflowContext", "useToolbarOverflow", "ToolbarRoot", "props", "forwardedRef", "band", "usePaneBandSize", "size", "useThemeSize", "toolbarRootPropDefs", "orientation", "className", "_orientation", "backdrop", "children", "rootProps", "extractProps", "layoutPropDefs", "context", "ToolbarPrimitive", "classNames", "ToolbarGroup", "disabled", "toolbar", "overflow", "group", "DropdownMenuGroup", "OVERFLOW_ITEM_KEYS", "isPressed", "value", "isButtonElement", "ToolbarButton", "iconOnly", "variant", "emphasis", "color", "asChild", "onKeyDown", "rest", "off", "passed", "key", "ToolbarOverflowItem", "handleKeyDown", "event", "pressed", "stateProps", "shared", "buttonProps", "Button", "label", "words", "itemProps", "child", "DropdownMenuItem", "DropdownMenuCheckboxItem", "MoreIcon", "ToolbarOverflow", "items", "count", "rootRef", "widths", "triggerWidth", "shown", "setShown", "tick", "setTick", "measuredCount", "setMeasuredCount", "useLayoutEffect", "root", "kids", "visible", "i", "el", "trigger", "gap", "available", "total", "counted", "width", "next", "budget", "used", "drawn", "own", "observer", "n", "seat", "attach", "node", "item", "DropdownMenuRoot", "DropdownMenuTrigger", "DropdownMenuContent", "EMPTY_ENTRIES", "slotEntries", "slotListeners", "mountedSlots", "subscribeSlots", "listener", "setSlotEntry", "name", "id", "list", "entry", "removeSlotEntry", "ToolbarSlot", "left", "entries", "ToolbarFill", "ToolbarSeparator", "DropdownMenuSeparator", "TITLE_SIZE", "ToolbarTitle", "style", "themeSize", "Text", "Toolbar"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as v}from"./chunk-TGRHRMQI.js";import{a as d}from"./chunk-LPLW7OWA.js";import{a as P}from"./chunk-L54FWKJE.js";import{c as m}from"./chunk-OKQAVYW4.js";import{a as C}from"./chunk-AQKSO3SW.js";import{c as T}from"./chunk-5ON3XLRD.js";import{a as f}from"./chunk-CLJ6SEGP.js";import{a as k}from"./chunk-VQPANPMI.js";var I={};k(I,{Anchor:()=>x,Close:()=>g,Content:()=>y,Root:()=>u,Toolbar:()=>z,Trigger:()=>h});import*as o from"react";import i from"classnames";import{Popover as n}from"radix-ui";var M=["1","2","3","4"],c={...f,size:{type:"enum",className:"kui-r-size",values:M,default:"2",responsive:!0},width:P.width,minWidth:P.minWidth,maxWidth:{...P.maxWidth,default:"480px"},...d};var R=o.createContext(null),b=e=>{let r=o.useContext(R);return r},u=e=>o.createElement(n.Root,{...e});u.displayName="Popover.Root";var h=o.forwardRef(({children:e,...r},t)=>o.createElement(n.Trigger,{...r,ref:t,asChild:!0},v(e)));h.displayName="Popover.Trigger";var y=o.forwardRef((e,r)=>{let t=T(e,c.size),{className:s,forceMount:a,container:l,...p}=m(t,c),[L,A]=o.useState(void 0),S=o.useMemo(()=>({setLabelId:A}),[]);return o.createElement(n.Portal,{container:l,forceMount:a},o.createElement(C,{asChild:!0},o.createElement(n.Content,{align:"start",sideOffset:8,collisionPadding:10,...p,ref:r,"aria-labelledby":L??p["aria-labelledby"],className:i("kui-PopperContent","kui-PopoverContent",s)},o.createElement(R.Provider,{value:S},t.children))))});y.displayName="Popover.Content";var g=o.forwardRef(({children:e,...r},t)=>o.createElement(n.Close,{...r,ref:t,asChild:!0},v(e)));g.displayName="Popover.Close";var x=o.forwardRef((e,r)=>o.createElement(n.Anchor,{...e,ref:r}));x.displayName="Popover.Anchor";var E=o.forwardRef(({className:e,children:r,...t},s)=>(b("Popover.Toolbar"),o.createElement("div",{...t,ref:s,className:i("kui-PopoverToolbar",e)},r)));E.displayName="Popover.Toolbar";var w=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarLeft",e)}));w.displayName="Popover.Toolbar.Left";var D=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarCenter",e)}));D.displayName="Popover.Toolbar.Center";var N=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarRight",e)}));N.displayName="Popover.Toolbar.Right";var W=o.forwardRef(({className:e,id:r,...t},s)=>{let a=b("Popover.Toolbar.Title"),l=o.useId(),p=r??`kui-popover-toolbar-title-${l}`;return o.useEffect(()=>(a?.setLabelId(p),()=>a?.setLabelId(void 0)),[a,p]),o.createElement("span",{...t,id:p,ref:s,className:i("kui-PopoverToolbarTitle",e)})});W.displayName="Popover.Toolbar.Title";var z=Object.assign(E,{Left:w,Center:D,Right:N,Title:W});export{u as a,h as b,y as c,g as d,x as e,z as f,I as g};
|
|
3
|
-
//# sourceMappingURL=chunk-MJKVVGGV.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/popover.tsx", "../../src/components/popover.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { PortalTheme } from './_internal/portal-theme.js';\n\nimport type { PopoverContentOwnProps } from './popover.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n// ---------------------------------------------\n// Popover Content Context\n// ---------------------------------------------\ntype PopoverContentContextValue = {\n /** Wire up aria-labelledby for toolbar title */\n setLabelId: (id: string | undefined) => void;\n};\n\nconst PopoverContentContext = React.createContext<PopoverContentContextValue | null>(null);\nconst usePopoverContentContext = (caller: string) => {\n const ctx = React.useContext(PopoverContentContext);\n if (!ctx) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`${caller} must be used within Popover.Content`);\n }\n }\n return ctx;\n};\n\ninterface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}\nconst PopoverRoot: React.FC<PopoverRootProps> = (props: PopoverRootProps) => (\n <PopoverPrimitive.Root {...props} />\n);\nPopoverRoot.displayName = 'Popover.Root';\n\ntype PopoverTriggerElement = React.ElementRef<typeof PopoverPrimitive.Trigger>;\ninterface PopoverTriggerProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Trigger, RemovedProps> {}\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Trigger>\n ),\n);\nPopoverTrigger.displayName = 'Popover.Trigger';\n\ntype PopoverContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ninterface PopoverContentProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>,\n PopoverContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n}\nconst PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentProps>(\n (ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, popoverContentPropDefs.size);\n const {\n className,\n forceMount,\n container,\n ...contentProps\n } = extractProps(props, popoverContentPropDefs);\n\n const [labelId, setLabelId] = React.useState<string | undefined>(undefined);\n const contextValue = React.useMemo(() => ({ setLabelId }), []);\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <PortalTheme asChild>\n <PopoverPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={forwardedRef}\n // A Toolbar.Title names the panel; without one, the caller's own value stands.\n aria-labelledby={labelId ?? contentProps['aria-labelledby']}\n className={classNames('kui-PopperContent', 'kui-PopoverContent', className)}\n >\n <PopoverContentContext.Provider value={contextValue}>\n {props.children}\n </PopoverContentContext.Provider>\n </PopoverPrimitive.Content>\n </PortalTheme>\n </PopoverPrimitive.Portal>\n );\n },\n);\nPopoverContent.displayName = 'Popover.Content';\n\ntype PopoverCloseElement = React.ElementRef<typeof PopoverPrimitive.Close>;\ninterface PopoverCloseProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Close, RemovedProps> {}\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Close>\n ),\n);\nPopoverClose.displayName = 'Popover.Close';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopoverPrimitive.Anchor>;\ninterface PopoverAnchorProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {}\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n (props, forwardedRef) => <PopoverPrimitive.Anchor {...props} ref={forwardedRef} />,\n);\n\nPopoverAnchor.displayName = 'Popover.Anchor';\n\n// ---------------------------------------------\n// Toolbar (Popover-only)\n// ---------------------------------------------\n\ntype PopoverToolbarElement = HTMLDivElement;\ntype PopoverToolbarProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarBase = React.forwardRef<PopoverToolbarElement, PopoverToolbarProps>(\n ({ className, children, ...props }, forwardedRef) => {\n // The toolbar is sticky in the content's own CSS, so it needs no measuring; this only warns\n // when it is used outside Popover.Content.\n usePopoverContentContext('Popover.Toolbar');\n\n return (\n <div {...props} ref={forwardedRef} className={classNames('kui-PopoverToolbar', className)}>\n {children}\n </div>\n );\n },\n);\nPopoverToolbarBase.displayName = 'Popover.Toolbar';\n\ntype PopoverToolbarSectionProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarLeft = React.forwardRef<HTMLDivElement, PopoverToolbarSectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('kui-PopoverToolbarSection', 'kui-PopoverToolbarLeft', className)}\n />\n ),\n);\nPopoverToolbarLeft.displayName = 'Popover.Toolbar.Left';\n\nconst PopoverToolbarCenter = React.forwardRef<HTMLDivElement, PopoverToolbarSectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('kui-PopoverToolbarSection', 'kui-PopoverToolbarCenter', className)}\n />\n ),\n);\nPopoverToolbarCenter.displayName = 'Popover.Toolbar.Center';\n\nconst PopoverToolbarRight = React.forwardRef<HTMLDivElement, PopoverToolbarSectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('kui-PopoverToolbarSection', 'kui-PopoverToolbarRight', className)}\n />\n ),\n);\nPopoverToolbarRight.displayName = 'Popover.Toolbar.Right';\n\ntype PopoverToolbarTitleProps = React.ComponentPropsWithoutRef<'span'>;\nconst PopoverToolbarTitle = React.forwardRef<HTMLSpanElement, PopoverToolbarTitleProps>(\n ({ className, id: idProp, ...props }, ref) => {\n const ctx = usePopoverContentContext('Popover.Toolbar.Title');\n const reactId = React.useId();\n const id = idProp ?? `kui-popover-toolbar-title-${reactId}`;\n React.useEffect(() => {\n ctx?.setLabelId(id);\n return () => ctx?.setLabelId(undefined);\n }, [ctx, id]);\n return (\n <span\n {...props}\n id={id}\n ref={ref}\n className={classNames('kui-PopoverToolbarTitle', className)}\n />\n );\n },\n);\nPopoverToolbarTitle.displayName = 'Popover.Toolbar.Title';\n\ntype PopoverToolbarComponent = React.ForwardRefExoticComponent<\n React.PropsWithoutRef<PopoverToolbarProps> & React.RefAttributes<HTMLDivElement>\n> & {\n Left: typeof PopoverToolbarLeft;\n Center: typeof PopoverToolbarCenter;\n Right: typeof PopoverToolbarRight;\n Title: typeof PopoverToolbarTitle;\n};\n\nconst PopoverToolbar = Object.assign(PopoverToolbarBase, {\n Left: PopoverToolbarLeft,\n Center: PopoverToolbarCenter,\n Right: PopoverToolbarRight,\n Title: PopoverToolbarTitle,\n}) as PopoverToolbarComponent;\n\nexport {\n PopoverRoot as Root,\n PopoverContent as Content,\n PopoverTrigger as Trigger,\n PopoverClose as Close,\n PopoverAnchor as Anchor,\n PopoverToolbar as Toolbar,\n};\nexport type {\n PopoverRootProps as RootProps,\n PopoverContentProps as ContentProps,\n PopoverTriggerProps as TriggerProps,\n PopoverCloseProps as CloseProps,\n PopoverAnchorProps as AnchorProps,\n PopoverToolbarProps as ToolbarProps,\n PopoverToolbarSectionProps as ToolbarSectionProps,\n PopoverToolbarTitleProps as ToolbarTitleProps,\n};\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3', '4'] as const;\n\nconst popoverContentPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n size: PropDef<(typeof contentSizes)[number]>;\n};\n\ntype PopoverContentOwnProps = GetPropDefTypes<\n typeof popoverContentPropDefs &\n typeof asChildPropDef &\n typeof widthPropDefs &\n typeof heightPropDefs\n>;\n\nexport { popoverContentPropDefs };\nexport type { PopoverContentOwnProps };\n"],
|
|
5
|
-
"mappings": ";gUAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,UAAAC,EAAA,YAAAC,EAAA,SAAAC,EAAA,YAAAC,EAAA,YAAAC,IAAA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,WAAWC,MAAwB,WCI5C,IAAMC,EAAe,CAAC,IAAK,IAAK,IAAK,GAAG,EAElCC,EAAyB,CAC7B,GAAGC,EACH,KAAM,CACJ,KAAM,OACN,UAAW,aACX,OAAQF,EACR,QAAS,IACT,WAAY,EACd,EACA,MAAOG,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,EAAc,SAAU,QAAS,OAAQ,EACxD,GAAGC,CACL,EDAA,IAAM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AAW,MAAS,GACrC,CAACA,EAAKgC,CAAE,CAAC,EAEV,gBAAC,QACE,GAAG9B,EACJ,GAAI8B,EACJ,IAAKN,EACL,UAAWL,EAAW,0BAA2BT,CAAS,EAC5D,CAEJ,CACF,EACAiB,EAAoB,YAAc,wBAWlC,IAAMI,EAAiB,OAAO,OAAOT,EAAoB,CACvD,KAAMC,EACN,OAAQE,EACR,MAAOC,EACP,MAAOC,CACT,CAAC",
|
|
6
|
-
"names": ["popover_exports", "__export", "PopoverAnchor", "PopoverClose", "PopoverContent", "PopoverRoot", "PopoverToolbar", "PopoverTrigger", "React", "classNames", "PopoverPrimitive", "contentSizes", "popoverContentPropDefs", "asChildPropDef", "widthPropDefs", "heightPropDefs", "PopoverContentContext", "usePopoverContentContext", "caller", "ctx", "PopoverRoot", "props", "PopoverPrimitive", "PopoverTrigger", "children", "forwardedRef", "requireReactElement", "PopoverContent", "ownProps", "useThemeSizeProps", "popoverContentPropDefs", "className", "forceMount", "container", "contentProps", "extractProps", "labelId", "setLabelId", "contextValue", "PortalTheme", "classNames", "PopoverClose", "PopoverAnchor", "PopoverToolbarBase", "PopoverToolbarLeft", "ref", "PopoverToolbarCenter", "PopoverToolbarRight", "PopoverToolbarTitle", "idProp", "reactId", "id", "PopoverToolbar"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as v,e as p}from"./chunk-3QWGSRYC.js";import{a as R,b as y,c as x}from"./chunk-LTUW36HM.js";import{a as O,b as M,c as T}from"./chunk-QKCNGEX4.js";import{a as C}from"./chunk-WEBNIUEX.js";import{a as d,c as w,f as E,g as H}from"./chunk-XUCR7L4G.js";import{a as B}from"./chunk-G66WDIIV.js";import{o as S}from"./chunk-GHWEXMF6.js";import*as e from"react";import le from"classnames";import{useComposedRefs as re}from"radix-ui/internal";var pe={controlled:"open",default:"defaultOpen"},N=e.forwardRef((I,U)=>{let{className:k,presentation:V="fixed",defaultOpen:A,open:L,onOpenChange:$,expandedSize:t=200,minSize:n=100,maxSize:a=400,resizable:m=!1,collapsible:q=!0,onExpand:D,onCollapse:W,onResize:_,onResizeStart:j,onResizeEnd:F,snapPoints:s,snapTolerance:G,collapseThreshold:i,paneId:l,persistence:r,children:K,style:J,size:c,defaultSize:u,onSizeChange:Q,sizeUpdate:X,sizeUpdateMs:Y=50,inset:f,id:Z,...z}=I,{table:P,attributes:ee}=x(V,"fixed"),o=R({name:"bottom",label:"Bottom",propNames:pe,id:Z,controlled:d(L),defaultValue:d(A),presentationTable:P,builtIn:w,onChange:(se,ie)=>$?.(se!=="closed",{reason:ie}),onExpand:D,onCollapse:W,size:t});S("bottom",f),e.useEffect(()=>{(s!==void 0||i!==void 0||l!==void 0||r!==void 0)&&void 0},[s,i,l,r]);let b=e.useRef(null),oe=re(U,o.setElement,b),te=M({name:"bottom",elementId:o.id,elementRef:b,cssVarName:"--bottom-size",orientation:"horizontal",edge:"start",growth:E,expandedSize:t,minSize:n,maxSize:a,resizable:m,collapsible:q,size:c,defaultSize:u,onSizeChange:Q,sizeUpdate:X,sizeUpdateMs:Y,onResize:_,onResizeStart:j,onResizeEnd:F,snapPoints:s,snapTolerance:G,collapseThreshold:i,paneId:l,persistence:r,overlaying:o.overlaying,overlayingNow:()=>P[B()]==="overlay",requestCollapse:()=>o.setValue("closed","toggle"),requestToggle:()=>o.toggle("toggle")}),h=O(c,u,n,a),{handles:g,content:ne}=T(K,p),ae=m&&o.shown!==!1&&!o.overlaying?e.createElement(C.Provider,{value:te},g.length>0?g:e.createElement(v,null)):null;return e.createElement("div",{...H(z),id:o.id,ref:oe,className:le("kui-ShellPane","kui-ShellBottom",k),...y(o,ee),"data-inset":f||void 0,tabIndex:o.overlaying?-1:z.tabIndex,style:{...J,"--bottom-expanded-size":`${t}px`,...h?{"--bottom-size":h}:{},"--bottom-min-size":`${n}px`,"--bottom-max-size":`${a}px`}},e.createElement("div",{className:"kui-ShellBottomContent"},ne),ae)});N.displayName="Shell.Bottom";N.Handle=p;export{N as a};
|
|
3
|
-
//# sourceMappingURL=chunk-QRV32INS.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/_internal/shell-bottom.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { PaneResizeContext } from './shell-resize.js';\nimport { BottomHandle, PaneHandle } from './shell-handles.js';\nimport { usePane, paneAttributes, usePresentationTable } from './shell-pane.js';\nimport { splitHandles, useInitialPaneSize, useResizablePane, type SizeChangeMeta } from './shell-resizable.js';\nimport { useInsetRegistration, warnOnce } from './shell-store.js';\nimport { bottomAnchoredGrowth, detailRest, toPaneValue, withoutRemovedPaneProps } from './shell-rest.js';\nimport { readBreakpoint } from '../../hooks/use-breakpoint.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps } from '../shell.types.js';\n\ntype BottomOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' | 'dismiss' };\ntype BottomControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; defaultOpen?: never };\n/** Since 0.8.0 `defaultOpen` takes a responsive object here too, as the docs already said it did. */\ntype BottomUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; open?: never };\ntype BottomSizeControlledProps = { size: number | string; defaultSize?: never };\ntype BottomSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\ntype BottomPublicProps = PaneBaseProps &\n (BottomControlledProps | BottomUncontrolledProps) &\n (BottomSizeControlledProps | BottomSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: SizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n };\n\ntype BottomComponent = React.ForwardRefExoticComponent<BottomPublicProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof BottomHandle };\n\nconst BOTTOM_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\nexport const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>((props, ref) => {\n const {\n className,\n presentation = 'fixed',\n defaultOpen,\n open,\n onOpenChange,\n expandedSize = 200,\n minSize = 100,\n maxSize = 400,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n inset,\n id,\n ...domProps\n } = props;\n\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'bottom',\n label: 'Bottom',\n propNames: BOTTOM_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable: table,\n builtIn: detailRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('bottom', inset);\n\n React.useEffect(() => {\n if (snapPoints !== undefined || collapseThreshold !== undefined || paneId !== undefined || persistence !== undefined) {\n warnOnce('Shell.Bottom: `snapPoints`, `collapseThreshold`, `paneId` and `persistence` are deprecated and are removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');\n }\n }, [snapPoints, collapseThreshold, paneId, persistence]);\n\n const elementRef = React.useRef<HTMLElement | null>(null);\n const composedRef = useComposedRefs(ref, pane.setElement, elementRef);\n\n const resize = useResizablePane({\n name: 'bottom',\n elementId: pane.id,\n elementRef,\n cssVarName: '--bottom-size',\n orientation: 'horizontal',\n edge: 'start',\n growth: bottomAnchoredGrowth,\n expandedSize,\n minSize,\n maxSize,\n resizable,\n collapsible,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n overlaying: pane.overlaying,\n overlayingNow: () => table[readBreakpoint()] === 'overlay',\n requestCollapse: () => pane.setValue('closed', 'toggle'),\n requestToggle: () => pane.toggle('toggle'),\n });\n\n // The starting size is in the server HTML, so the pane does not jump on hydration.\n const initialSize = useInitialPaneSize(size, defaultSize, minSize, maxSize);\n const { handles, content } = splitHandles(children, BottomHandle);\n const handle = resizable && pane.shown !== false && !pane.overlaying ? <PaneResizeContext.Provider value={resize}>{handles.length > 0 ? handles : <PaneHandle />}</PaneResizeContext.Provider> : null;\n\n return (\n <div\n {...withoutRemovedPaneProps(domProps)}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellBottom', className)}\n {...paneAttributes(pane, attributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--bottom-expanded-size': `${expandedSize}px`,\n ...(initialSize ? { '--bottom-size': initialSize } : {}),\n '--bottom-min-size': `${minSize}px`,\n '--bottom-max-size': `${maxSize}px`,\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"kui-ShellBottomContent\">{content}</div>\n {handle}\n </div>\n );\n}) as BottomComponent;\n\nBottom.displayName = 'Shell.Bottom';\nBottom.Handle = BottomHandle;\n\nexport type { BottomPublicProps };\n"],
|
|
5
|
-
"mappings": ";gVAEA,UAAYA,MAAW,QACvB,OAAOC,OAAgB,aACvB,OAAS,mBAAAC,OAAuB,oBA4BhC,IAAMC,GAAoB,CAAE,WAAY,OAAQ,QAAS,aAAc,EAE1DC,EAAe,aAA8C,CAACC,EAAOC,IAAQ,CACxF,GAAM,CACJ,UAAAC,EACA,aAAAC,EAAe,QACf,YAAAC,EACA,KAAAC,EACA,aAAAC,EACA,aAAAC,EAAe,IACf,QAAAC,EAAU,IACV,QAAA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AC,EACA,YAAAC,EACA,WAAYc,EAAK,WACjB,cAAe,IAAMH,EAAMgB,EAAe,CAAC,IAAM,UACjD,gBAAiB,IAAMb,EAAK,SAAS,SAAU,QAAQ,EACvD,cAAe,IAAMA,EAAK,OAAO,QAAQ,CAC3C,CAAC,EAGKc,EAAcC,EAAmB1B,EAAMC,EAAajB,EAASC,CAAO,EACpE,CAAE,QAAA0C,EAAS,QAAAC,EAAQ,EAAIC,EAAa/B,EAAUgC,CAAY,EAC1DC,GAAS7C,GAAayB,EAAK,QAAU,IAAS,CAACA,EAAK,WAAa,gBAACqB,EAAkB,SAAlB,CAA2B,MAAOX,IAASM,EAAQ,OAAS,EAAIA,EAAU,gBAACM,EAAA,IAAW,CAAG,EAAgC,KAEjM,OACE,gBAAC,OACE,GAAGC,EAAwB3B,CAAQ,EACpC,GAAII,EAAK,GACT,IAAKQ,GACL,UAAWgB,GAAW,gBAAiB,kBAAmBzD,CAAS,EAClE,GAAG0D,EAAezB,EAAMF,EAAU,EACnC,aAAYJ,GAAS,OACrB,SAAUM,EAAK,WAAa,GAAKJ,EAAS,SAC1C,MACE,CACE,GAAGR,EACH,yBAA0B,GAAGhB,CAAY,KACzC,GAAI0C,EAAc,CAAE,gBAAiBA,CAAY,EAAI,CAAC,EACtD,oBAAqB,GAAGzC,CAAO,KAC/B,oBAAqB,GAAGC,CAAO,IACjC,GAGF,gBAAC,OAAI,UAAU,0BAA0B2C,EAAQ,EAChDG,EACH,CAEJ,CAAC,EAEDxD,EAAO,YAAc,eACrBA,EAAO,OAASuD",
|
|
6
|
-
"names": ["React", "classNames", "useComposedRefs", "BOTTOM_PROP_NAMES", "Bottom", "props", "ref", "className", "presentation", "defaultOpen", "open", "onOpenChange", "expandedSize", "minSize", "maxSize", "resizable", "collapsible", "onExpand", "onCollapse", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "children", "style", "size", "defaultSize", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "inset", "id", "domProps", "table", "attributes", "usePresentationTable", "pane", "usePane", "toPaneValue", "detailRest", "value", "reason", "useInsetRegistration", "elementRef", "composedRef", "useComposedRefs", "resize", "useResizablePane", "bottomAnchoredGrowth", "readBreakpoint", "initialSize", "useInitialPaneSize", "handles", "content", "splitHandles", "BottomHandle", "handle", "PaneResizeContext", "PaneHandle", "withoutRemovedPaneProps", "classNames", "paneAttributes"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as R,d}from"./chunk-3QWGSRYC.js";import{a as v,b as y,c as x}from"./chunk-LTUW36HM.js";import{a as O,b as E,c as T}from"./chunk-QKCNGEX4.js";import{a as C}from"./chunk-WEBNIUEX.js";import{a as c,c as N,e as M,g as w}from"./chunk-XUCR7L4G.js";import{a as S}from"./chunk-G66WDIIV.js";import{o as b}from"./chunk-GHWEXMF6.js";import*as e from"react";import ie from"classnames";import{useComposedRefs as le}from"radix-ui/internal";var pe={controlled:"open",default:"defaultOpen"},de={initial:"overlay",sm:"fixed"},H=e.forwardRef((U,k)=>{let{className:A,presentation:B=de,defaultOpen:V,open:L,onOpenChange:_,expandedSize:o=320,minSize:t=200,maxSize:s=500,resizable:m=!1,collapsible:D=!0,onExpand:$,onCollapse:q,onResize:F,onResizeStart:W,onResizeEnd:j,snapPoints:r,snapTolerance:G,collapseThreshold:a,paneId:i,persistence:l,children:K,style:J,onSizeChange:Q,sizeUpdate:X,sizeUpdateMs:Y=50,size:u,defaultSize:P,inset:f,id:Z,...p}=U,{table:z,attributes:ee}=x(B,"fixed"),n=v({name:"inspector",label:"Inspector",propNames:pe,id:Z,controlled:c(L),defaultValue:c(V),presentationTable:z,builtIn:N,onChange:(re,ae)=>_?.(re!=="closed",{reason:ae}),onExpand:$,onCollapse:q,size:o});b("inspector",f),e.useEffect(()=>{(r!==void 0||a!==void 0||i!==void 0||l!==void 0)&&void 0},[r,a,i,l]);let h=e.useRef(null),ne=le(k,n.setElement,h),oe=E({name:"inspector",elementId:n.id,elementRef:h,cssVarName:"--inspector-size",orientation:"vertical",edge:"start",growth:M,expandedSize:o,minSize:t,maxSize:s,resizable:m,collapsible:D,size:u,defaultSize:P,onSizeChange:Q,sizeUpdate:X,sizeUpdateMs:Y,onResize:F,onResizeStart:W,onResizeEnd:j,snapPoints:r,snapTolerance:G,collapseThreshold:a,paneId:i,persistence:l,overlaying:n.overlaying,overlayingNow:()=>z[S()]==="overlay",requestCollapse:()=>n.setValue("closed","toggle"),requestToggle:()=>n.toggle("toggle")}),{handles:I,content:te}=T(K,d),se=m&&n.shown!==!1&&!n.overlaying?e.createElement(C.Provider,{value:oe},I.length>0?I:e.createElement(R,null)):null,g=O(u,P,t,s);return e.createElement("div",{...w(p),role:p.role??"complementary",id:n.id,ref:ne,className:ie("kui-ShellPane","kui-ShellInspector",A),...y(n,ee),"data-inset":f||void 0,tabIndex:n.overlaying?-1:p.tabIndex,style:{...J,"--inspector-expanded-size":`${o}px`,...g?{"--inspector-size":g}:{},"--inspector-min-size":`${t}px`,"--inspector-max-size":`${s}px`}},e.createElement("div",{className:"kui-ShellInspectorContent"},te),se)});H.displayName="Shell.Inspector";H.Handle=d;export{H as a};
|
|
3
|
-
//# sourceMappingURL=chunk-YMUERC2J.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/_internal/shell-inspector.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { PaneResizeContext } from './shell-resize.js';\nimport { InspectorHandle, PaneHandle } from './shell-handles.js';\nimport { usePane, paneAttributes, usePresentationTable } from './shell-pane.js';\nimport { splitHandles, useInitialPaneSize, useResizablePane, type SizeChangeMeta } from './shell-resizable.js';\nimport { useInsetRegistration, warnOnce } from './shell-store.js';\nimport { detailRest, endAnchoredGrowth, toPaneValue, withoutRemovedPaneProps } from './shell-rest.js';\nimport { readBreakpoint } from '../../hooks/use-breakpoint.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps } from '../shell.types.js';\n\ntype InspectorOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' | 'dismiss' };\ntype InspectorControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: InspectorOpenChangeMeta) => void; defaultOpen?: never };\ntype InspectorUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: InspectorOpenChangeMeta) => void; open?: never };\ntype InspectorSizeControlledProps = { size: number | string; defaultSize?: never };\ntype InspectorSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\ntype InspectorPublicProps = PaneBaseProps &\n (InspectorControlledProps | InspectorUncontrolledProps) &\n (InspectorSizeControlledProps | InspectorSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: SizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n };\n\ntype InspectorComponent = React.ForwardRefExoticComponent<InspectorPublicProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof InspectorHandle };\n\nconst INSPECTOR_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\n/** Since 0.8.0 the Inspector is in the frame from 768px up, the boundary kookie-ui-v2 uses everywhere. It was 1280px. */\nconst INSPECTOR_DEFAULT_PRESENTATION = { initial: 'overlay', sm: 'fixed' } as const;\n\nexport const Inspector = React.forwardRef<HTMLDivElement, InspectorPublicProps>((props, ref) => {\n const {\n className,\n presentation = INSPECTOR_DEFAULT_PRESENTATION,\n defaultOpen,\n open,\n onOpenChange,\n expandedSize = 320,\n minSize = 200,\n maxSize = 500,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n size,\n defaultSize,\n inset,\n id,\n ...domProps\n } = props;\n\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'inspector',\n label: 'Inspector',\n propNames: INSPECTOR_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable: table,\n builtIn: detailRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('inspector', inset);\n\n React.useEffect(() => {\n if (snapPoints !== undefined || collapseThreshold !== undefined || paneId !== undefined || persistence !== undefined) {\n warnOnce('Shell.Inspector: `snapPoints`, `collapseThreshold`, `paneId` and `persistence` are deprecated and are removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');\n }\n }, [snapPoints, collapseThreshold, paneId, persistence]);\n\n const elementRef = React.useRef<HTMLElement | null>(null);\n const composedRef = useComposedRefs(ref, pane.setElement, elementRef);\n\n const resize = useResizablePane({\n name: 'inspector',\n elementId: pane.id,\n elementRef,\n cssVarName: '--inspector-size',\n orientation: 'vertical',\n edge: 'start',\n growth: endAnchoredGrowth,\n expandedSize,\n minSize,\n maxSize,\n resizable,\n collapsible,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n overlaying: pane.overlaying,\n overlayingNow: () => table[readBreakpoint()] === 'overlay',\n requestCollapse: () => pane.setValue('closed', 'toggle'),\n requestToggle: () => pane.toggle('toggle'),\n });\n\n const { handles, content } = splitHandles(children, InspectorHandle);\n const handle = resizable && pane.shown !== false && !pane.overlaying ? <PaneResizeContext.Provider value={resize}>{handles.length > 0 ? handles : <PaneHandle />}</PaneResizeContext.Provider> : null;\n\n const initialSize = useInitialPaneSize(size, defaultSize, minSize, maxSize);\n return (\n <div\n {...withoutRemovedPaneProps(domProps)}\n role={domProps.role ?? 'complementary'}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellInspector', className)}\n {...paneAttributes(pane, attributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--inspector-expanded-size': `${expandedSize}px`,\n ...(initialSize ? { '--inspector-size': initialSize } : {}),\n '--inspector-min-size': `${minSize}px`,\n '--inspector-max-size': `${maxSize}px`,\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"kui-ShellInspectorContent\">{content}</div>\n {handle}\n </div>\n );\n}) as InspectorComponent;\n\nInspector.displayName = 'Shell.Inspector';\nInspector.Handle = InspectorHandle;\n\nexport type { InspectorPublicProps };\n"],
|
|
5
|
-
"mappings": ";2UAEA,UAAYA,MAAW,QACvB,OAAOC,OAAgB,aACvB,OAAS,mBAAAC,OAAuB,oBA2BhC,IAAMC,GAAuB,CAAE,WAAY,OAAQ,QAAS,aAAc,EAGpEC,GAAiC,CAAE,QAAS,UAAW,GAAI,OAAQ,EAE5DC,EAAkB,aAAiD,CAACC,EAAOC,IAAQ,CAC9F,GAAM,CACJ,UAAAC,EACA,aAAAC,EAAeL,GACf,YAAAM,EACA,KAAAC,EACA,aAAAC,EACA,aAAAC,EAAe,IACf,QAAAC,EAAU,IACV,QAAAC,EAAU,IACV,UAAAC,EAAY,GACZ,YAAAC,EAAc,GACd,SAAAC,EACA,WAAAC,EACA,SAAAC,EACA,cAAAC,EACA,YAAAC,EACA,WAAAC,EACA,cAAAC,EACA,kBAAAC,EACA,OAAAC,EACA,YAAAC,EACA,SAAAC,EACA,MAAAC,EACA,aAAAC,EACA,WAAAC,EACA,aAAAC,EAAe,GACf,KAAAC,EACA,YAAAC,EACA,MAAAC,EACA,GAAAC,EACA,GAAGC,CACL,EAAI/B,EAEE,CAAE,MAAAgC,E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AAlB,CAA2B,MAAOT,IAASI,EAAQ,OAAS,EAAIA,EAAU,gBAACM,EAAA,IAAW,CAAG,EAAgC,KAE3LC,EAAcC,EAAmB9B,EAAMC,EAAapB,EAASC,CAAO,EAC1E,OACE,gBAAC,OACE,GAAGiD,EAAwB3B,CAAQ,EACpC,KAAMA,EAAS,MAAQ,gBACvB,GAAII,EAAK,GACT,IAAKQ,GACL,UAAWgB,GAAW,gBAAiB,qBAAsBzD,CAAS,EACrE,GAAG0D,EAAezB,EAAMF,EAAU,EACnC,aAAYJ,GAAS,OACrB,SAAUM,EAAK,WAAa,GAAKJ,EAAS,SAC1C,MACE,CACE,GAAGR,EACH,4BAA6B,GAAGhB,CAAY,KAC5C,GAAIiD,EAAc,CAAE,mBAAoBA,CAAY,EAAI,CAAC,EACzD,uBAAwB,GAAGhD,CAAO,KAClC,uBAAwB,GAAGC,CAAO,IACpC,GAGF,gBAAC,OAAI,UAAU,6BAA6ByC,EAAQ,EACnDG,EACH,CAEJ,CAAC,EAEDtD,EAAU,YAAc,kBACxBA,EAAU,OAASqD",
|
|
6
|
-
"names": ["React", "classNames", "useComposedRefs", "INSPECTOR_PROP_NAMES", "INSPECTOR_DEFAULT_PRESENTATION", "Inspector", "props", "ref", "className", "presentation", "defaultOpen", "open", "onOpenChange", "expandedSize", "minSize", "maxSize", "resizable", "collapsible", "onExpand", "onCollapse", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "children", "style", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "size", "defaultSize", "inset", "id", "domProps", "table", "attributes", "usePresentationTable", "pane", "usePane", "toPaneValue", "detailRest", "value", "reason", "useInsetRegistration", "elementRef", "composedRef", "useComposedRefs", "resize", "useResizablePane", "endAnchoredGrowth", "readBreakpoint", "handles", "content", "splitHandles", "InspectorHandle", "handle", "PaneResizeContext", "PaneHandle", "initialSize", "useInitialPaneSize", "withoutRemovedPaneProps", "classNames", "paneAttributes"]
|
|
7
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|