@womp/kookie-ui 0.35.7 → 0.37.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 +12 -20
- package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
- package/dist/cjs/components/_internal/base-menu.utils.js.map +2 -2
- package/dist/cjs/components/_internal/menu-context.js +1 -1
- package/dist/cjs/components/_internal/menu-context.js.map +2 -2
- package/dist/cjs/components/_internal/pane-chrome.js +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js.map +2 -2
- package/dist/cjs/components/_internal/shell-bottom.d.ts +3 -3
- 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 +3 -3
- package/dist/cjs/components/_internal/shell-handles.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-handles.js +1 -1
- package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
- package/dist/cjs/components/_internal/shell-inspector.d.ts +3 -3
- 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 +3 -3
- package/dist/cjs/components/_internal/shell-pane.d.ts +2 -7
- package/dist/cjs/components/_internal/shell-pane.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-pane.js +1 -1
- package/dist/cjs/components/_internal/shell-pane.js.map +3 -3
- package/dist/cjs/components/_internal/shell-resizable.d.ts +3 -9
- package/dist/cjs/components/_internal/shell-resizable.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-resizable.js +1 -1
- package/dist/cjs/components/_internal/shell-resizable.js.map +3 -3
- package/dist/cjs/components/_internal/shell-resize.d.ts +0 -4
- package/dist/cjs/components/_internal/shell-resize.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-resize.js +1 -1
- package/dist/cjs/components/_internal/shell-resize.js.map +2 -2
- package/dist/cjs/components/_internal/shell-rest.d.ts +1 -6
- package/dist/cjs/components/_internal/shell-rest.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-rest.js +1 -1
- package/dist/cjs/components/_internal/shell-rest.js.map +3 -3
- package/dist/cjs/components/_internal/shell-sidebar.d.ts +3 -3
- 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 +3 -3
- package/dist/cjs/components/_internal/shell-store.d.ts +0 -10
- package/dist/cjs/components/_internal/shell-store.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-store.js +1 -1
- package/dist/cjs/components/_internal/shell-store.js.map +3 -3
- package/dist/cjs/components/_internal/use-close-warning.d.ts +12 -0
- package/dist/cjs/components/_internal/use-close-warning.d.ts.map +1 -0
- package/dist/cjs/components/_internal/use-close-warning.js +3 -0
- package/dist/cjs/components/_internal/use-close-warning.js.map +7 -0
- package/dist/cjs/components/checkbox-group.js +1 -1
- package/dist/cjs/components/checkbox-group.js.map +3 -3
- package/dist/cjs/components/checkbox-group.primitive.d.ts +0 -10
- package/dist/cjs/components/checkbox-group.primitive.d.ts.map +1 -1
- package/dist/cjs/components/checkbox-group.primitive.js +1 -1
- package/dist/cjs/components/checkbox-group.primitive.js.map +3 -3
- package/dist/cjs/components/context-menu.d.ts +1 -5
- package/dist/cjs/components/context-menu.d.ts.map +1 -1
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +3 -3
- 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 +2 -2
- package/dist/cjs/components/index.js +2 -2
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/navigator.js.map +2 -2
- package/dist/cjs/components/schemas/index.d.ts +1 -1
- package/dist/cjs/components/schemas/index.d.ts.map +1 -1
- package/dist/cjs/components/schemas/index.js +1 -1
- package/dist/cjs/components/schemas/index.js.map +3 -3
- package/dist/cjs/components/schemas/shell.schema.d.ts +6 -112
- package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/shell.schema.js +1 -1
- package/dist/cjs/components/schemas/shell.schema.js.map +3 -3
- package/dist/cjs/components/separator.js +1 -1
- package/dist/cjs/components/separator.js.map +2 -2
- package/dist/cjs/components/sheet.d.ts +7 -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.context.d.ts +1 -45
- package/dist/cjs/components/shell.context.d.ts.map +1 -1
- package/dist/cjs/components/shell.context.js +1 -1
- package/dist/cjs/components/shell.context.js.map +4 -4
- package/dist/cjs/components/shell.d.ts +7 -37
- 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/shell.types.d.ts +6 -27
- package/dist/cjs/components/shell.types.d.ts.map +1 -1
- package/dist/cjs/components/shell.types.js +1 -1
- package/dist/cjs/components/shell.types.js.map +2 -2
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +2 -2
- package/dist/cjs/components/toolbar.js +1 -1
- package/dist/cjs/components/toolbar.js.map +2 -2
- package/dist/cjs/hooks/use-breakpoint.js +1 -1
- package/dist/cjs/hooks/use-breakpoint.js.map +2 -2
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/{chunk-LR4X7SVV.js → chunk-2K46JPUL.js} +2 -2
- package/dist/esm/chunk-3K7E4XL3.js +3 -0
- package/dist/esm/chunk-3K7E4XL3.js.map +7 -0
- package/dist/esm/chunk-3LR7KMBE.js +3 -0
- package/dist/esm/chunk-3LR7KMBE.js.map +7 -0
- package/dist/esm/{chunk-HGF4CKRY.js → chunk-3ZBEWLSO.js} +2 -2
- package/dist/esm/{chunk-26O4RBOJ.js → chunk-5BABJBV3.js} +2 -2
- package/dist/esm/{chunk-5APRBJRR.js → chunk-5GTQXMS2.js} +2 -2
- package/dist/esm/chunk-5U2LEJLU.js +3 -0
- package/dist/esm/chunk-5U2LEJLU.js.map +7 -0
- package/dist/esm/{chunk-KBSH6CBD.js → chunk-5XO3PLDH.js} +2 -2
- package/dist/esm/{chunk-SGKLJDA3.js → chunk-74JANLVU.js} +2 -2
- package/dist/esm/{chunk-TUZ665BA.js → chunk-7E3ZOVRL.js} +2 -2
- package/dist/esm/{chunk-COLJWVN7.js → chunk-AQR42GKA.js} +2 -2
- package/dist/esm/{chunk-FTNZWAPB.js → chunk-ARPUPT4M.js} +2 -2
- package/dist/esm/{chunk-OMPLFDS6.js → chunk-ASBTPKH3.js} +2 -2
- package/dist/esm/{chunk-JFJV4HL3.js → chunk-CFXFWIRM.js} +2 -2
- package/dist/esm/{chunk-YLGIP3A5.js → chunk-CJZGEHVB.js} +2 -2
- package/dist/esm/{chunk-ISCZ57VL.js → chunk-DJGZ4K3V.js} +2 -2
- package/dist/esm/{chunk-PMXIQ5B4.js → chunk-FKCKELUB.js} +2 -2
- package/dist/esm/{chunk-Y5ITMKC6.js → chunk-G7S2BMS3.js} +2 -2
- package/dist/esm/{chunk-SR42NATX.js → chunk-GHIHF55B.js} +2 -2
- package/dist/esm/chunk-H7GH3DTF.js +3 -0
- package/dist/esm/chunk-H7GH3DTF.js.map +7 -0
- package/dist/esm/{chunk-C6VGCYFQ.js → chunk-HNOT2HS4.js} +2 -2
- package/dist/esm/chunk-HWT2K2XR.js +3 -0
- package/dist/esm/chunk-HWT2K2XR.js.map +7 -0
- package/dist/esm/{chunk-D42VCLKH.js → chunk-ICO5ULJL.js} +2 -2
- package/dist/esm/{chunk-FYZXC7AL.js → chunk-JJVAVLCN.js} +2 -2
- package/dist/esm/chunk-LBAC2X4U.js +3 -0
- package/dist/esm/{chunk-5BXCPANF.js.map → chunk-LBAC2X4U.js.map} +3 -3
- package/dist/esm/{chunk-R4DMVTM3.js → chunk-M6THDAMU.js} +2 -2
- package/dist/esm/{chunk-MAA6LEE2.js → chunk-MDQ7ZHOS.js} +1 -1
- package/dist/esm/chunk-MDQ7ZHOS.js.map +7 -0
- package/dist/esm/chunk-MQA3BKF4.js +3 -0
- package/dist/esm/chunk-MQA3BKF4.js.map +7 -0
- package/dist/esm/{chunk-VBF3XALY.js → chunk-MS2ONKJJ.js} +2 -2
- package/dist/esm/chunk-MXNPCJPV.js +3 -0
- package/dist/esm/chunk-MXNPCJPV.js.map +7 -0
- package/dist/esm/{chunk-XFMAA4MD.js → chunk-NJG42JDM.js} +2 -2
- package/dist/esm/{chunk-NJ7RQYLX.js → chunk-OIJQSUUM.js} +2 -2
- package/dist/esm/{chunk-VYF6KKYM.js → chunk-ONJYRJ66.js} +2 -2
- package/dist/esm/chunk-PIVHOUEA.js +3 -0
- package/dist/esm/chunk-PIVHOUEA.js.map +7 -0
- package/dist/esm/{chunk-UH6CJXHY.js → chunk-QPGW6RJG.js} +2 -2
- package/dist/esm/{chunk-EB4AG3OL.js → chunk-REELD6CT.js} +2 -2
- package/dist/esm/chunk-RYXIRZQW.js +3 -0
- package/dist/esm/chunk-RYXIRZQW.js.map +7 -0
- package/dist/esm/chunk-S66WR5R7.js +3 -0
- package/dist/esm/{chunk-MXEOE4LA.js.map → chunk-S66WR5R7.js.map} +2 -2
- package/dist/esm/chunk-SECVO3CW.js +3 -0
- package/dist/esm/chunk-SECVO3CW.js.map +7 -0
- package/dist/esm/chunk-SHDZYFUN.js +3 -0
- package/dist/esm/chunk-SHDZYFUN.js.map +7 -0
- package/dist/esm/{chunk-3M5ZM67R.js → chunk-TCFBNE6A.js} +2 -2
- package/dist/esm/chunk-U7P64MXD.js +3 -0
- package/dist/esm/chunk-U7P64MXD.js.map +7 -0
- package/dist/esm/chunk-UFYQC5XY.js +3 -0
- package/dist/esm/chunk-UFYQC5XY.js.map +7 -0
- package/dist/esm/{chunk-QBONJMSE.js → chunk-VRQK7U7J.js} +2 -2
- package/dist/esm/{chunk-TANYRHGP.js → chunk-W3X4N4JE.js} +2 -2
- package/dist/esm/{chunk-OPYTQ34H.js → chunk-W4CPV4PO.js} +2 -2
- package/dist/esm/{chunk-G66WDIIV.js → chunk-WJKCXGVN.js} +2 -2
- package/dist/esm/{chunk-YLPCYCYA.js → chunk-WT4IDG2W.js} +2 -2
- package/dist/esm/chunk-XBDAE77C.js +3 -0
- package/dist/esm/chunk-XBDAE77C.js.map +7 -0
- package/dist/esm/{chunk-X4PWBFOT.js → chunk-YM47BXKK.js} +2 -2
- package/dist/esm/chunk-YOESAYMJ.js +3 -0
- package/dist/esm/chunk-YOESAYMJ.js.map +7 -0
- package/dist/esm/{chunk-FVRVBB6O.js → chunk-YOZXIUZY.js} +2 -2
- package/dist/esm/{chunk-OGVKMDO7.js → chunk-YRCXTCIT.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/pane-chrome.js +1 -1
- package/dist/esm/components/_internal/portal-theme.js +1 -1
- package/dist/esm/components/_internal/shell-bottom.d.ts +3 -3
- 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-handles.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-handles.js +1 -1
- package/dist/esm/components/_internal/shell-inspector.d.ts +3 -3
- 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-pane.d.ts +2 -7
- package/dist/esm/components/_internal/shell-pane.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-pane.js +1 -1
- package/dist/esm/components/_internal/shell-resizable.d.ts +3 -9
- package/dist/esm/components/_internal/shell-resizable.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-resizable.js +1 -1
- package/dist/esm/components/_internal/shell-resize.d.ts +0 -4
- package/dist/esm/components/_internal/shell-resize.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-resize.js +1 -1
- package/dist/esm/components/_internal/shell-rest.d.ts +1 -6
- package/dist/esm/components/_internal/shell-rest.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-rest.js +1 -1
- package/dist/esm/components/_internal/shell-sidebar.d.ts +3 -3
- 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/_internal/shell-store.d.ts +0 -10
- package/dist/esm/components/_internal/shell-store.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-store.js +1 -1
- package/dist/esm/components/_internal/use-close-warning.d.ts +12 -0
- package/dist/esm/components/_internal/use-close-warning.d.ts.map +1 -0
- package/dist/esm/components/_internal/use-close-warning.js +3 -0
- 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/button.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-group.primitive.d.ts +0 -10
- package/dist/esm/components/checkbox-group.primitive.d.ts.map +1 -1
- package/dist/esm/components/checkbox-group.primitive.js +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/chip.js +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/command.js +1 -1
- package/dist/esm/components/context-menu.d.ts +1 -5
- package/dist/esm/components/context-menu.d.ts.map +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/index.js +1 -1
- package/dist/esm/components/message-scroller.js +1 -1
- package/dist/esm/components/navigator.js +1 -1
- package/dist/esm/components/notice.js +1 -1
- package/dist/esm/components/popover.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.d.ts +1 -1
- package/dist/esm/components/schemas/index.d.ts.map +1 -1
- package/dist/esm/components/schemas/index.js +1 -1
- package/dist/esm/components/schemas/index.js.map +2 -2
- package/dist/esm/components/schemas/shell.schema.d.ts +6 -112
- package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/shell.schema.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 +7 -4
- package/dist/esm/components/sheet.d.ts.map +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.context.d.ts +1 -45
- package/dist/esm/components/shell.context.d.ts.map +1 -1
- package/dist/esm/components/shell.context.js +1 -1
- package/dist/esm/components/shell.d.ts +7 -37
- package/dist/esm/components/shell.d.ts.map +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/shell.types.d.ts +6 -27
- package/dist/esm/components/shell.types.d.ts.map +1 -1
- package/dist/esm/components/shell.types.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/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/theme.js +1 -1
- package/dist/esm/components/toggle.js +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/use-breakpoint.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -5
- package/schemas/index.json +13 -335
- package/schemas/shell-bottom.json +2 -63
- package/schemas/shell-inspector.json +2 -63
- package/schemas/shell-panel.json +2 -63
- package/schemas/shell-rail.json +2 -38
- package/schemas/shell-sidebar.json +5 -102
- package/schemas/shell-trigger.json +0 -6
- package/src/components/_internal/base-dialog.css +15 -0
- package/src/components/_internal/shell-bottom.tsx +6 -26
- package/src/components/_internal/shell-handles.tsx +2 -32
- package/src/components/_internal/shell-inspector.tsx +6 -26
- package/src/components/_internal/shell-pane.tsx +7 -56
- package/src/components/_internal/shell-resizable.tsx +6 -81
- package/src/components/_internal/shell-resize.tsx +0 -4
- package/src/components/_internal/shell-rest.ts +2 -11
- package/src/components/_internal/shell-sidebar.tsx +8 -30
- package/src/components/_internal/shell-store.tsx +1 -34
- package/src/components/_internal/use-close-warning.ts +38 -0
- package/src/components/checkbox-group.primitive.tsx +0 -12
- package/src/components/context-menu.tsx +1 -6
- package/src/components/dialog.tsx +6 -1
- package/src/components/schemas/index.ts +0 -1
- package/src/components/schemas/shell.schema.ts +3 -20
- package/src/components/sheet.tsx +11 -5
- package/src/components/shell.context.tsx +5 -112
- package/src/components/shell.css +1 -29
- package/src/components/shell.tsx +12 -97
- package/src/components/shell.types.ts +6 -28
- package/styles.css +12 -20
- package/dist/cjs/components/shell.hooks.d.ts +0 -10
- package/dist/cjs/components/shell.hooks.d.ts.map +0 -1
- package/dist/cjs/components/shell.hooks.js +0 -3
- package/dist/cjs/components/shell.hooks.js.map +0 -7
- package/dist/esm/chunk-2VSRZ4IT.js +0 -3
- package/dist/esm/chunk-2VSRZ4IT.js.map +0 -7
- package/dist/esm/chunk-2WFN4D52.js +0 -3
- package/dist/esm/chunk-2WFN4D52.js.map +0 -7
- package/dist/esm/chunk-4OJRLS5N.js +0 -3
- package/dist/esm/chunk-4OJRLS5N.js.map +0 -7
- package/dist/esm/chunk-4TTRPCGG.js +0 -3
- package/dist/esm/chunk-4TTRPCGG.js.map +0 -7
- package/dist/esm/chunk-5BXCPANF.js +0 -3
- package/dist/esm/chunk-B447PNRD.js +0 -3
- package/dist/esm/chunk-B447PNRD.js.map +0 -7
- package/dist/esm/chunk-BJVXB3PN.js +0 -3
- package/dist/esm/chunk-BJVXB3PN.js.map +0 -7
- package/dist/esm/chunk-HQT32HQ6.js +0 -3
- package/dist/esm/chunk-HQT32HQ6.js.map +0 -7
- package/dist/esm/chunk-KGCGT4MJ.js +0 -3
- package/dist/esm/chunk-KGCGT4MJ.js.map +0 -7
- package/dist/esm/chunk-M26LLCQC.js +0 -3
- package/dist/esm/chunk-M26LLCQC.js.map +0 -7
- package/dist/esm/chunk-MAA6LEE2.js.map +0 -7
- package/dist/esm/chunk-MXEOE4LA.js +0 -3
- package/dist/esm/chunk-QV66TN2A.js +0 -3
- package/dist/esm/chunk-QV66TN2A.js.map +0 -7
- package/dist/esm/chunk-TRJAVWCK.js +0 -3
- package/dist/esm/chunk-TRJAVWCK.js.map +0 -7
- package/dist/esm/chunk-TS4QCDSI.js +0 -3
- package/dist/esm/chunk-TS4QCDSI.js.map +0 -7
- package/dist/esm/chunk-XOAOSRTH.js +0 -3
- package/dist/esm/chunk-XOAOSRTH.js.map +0 -7
- package/dist/esm/chunk-XUCR7L4G.js +0 -3
- package/dist/esm/chunk-XUCR7L4G.js.map +0 -7
- package/dist/esm/chunk-XVN43IZL.js +0 -3
- package/dist/esm/chunk-XVN43IZL.js.map +0 -7
- package/dist/esm/components/shell.hooks.d.ts +0 -10
- package/dist/esm/components/shell.hooks.d.ts.map +0 -1
- package/dist/esm/components/shell.hooks.js +0 -3
- package/src/components/shell.hooks.ts +0 -20
- /package/dist/esm/{chunk-LR4X7SVV.js.map → chunk-2K46JPUL.js.map} +0 -0
- /package/dist/esm/{chunk-HGF4CKRY.js.map → chunk-3ZBEWLSO.js.map} +0 -0
- /package/dist/esm/{chunk-26O4RBOJ.js.map → chunk-5BABJBV3.js.map} +0 -0
- /package/dist/esm/{chunk-5APRBJRR.js.map → chunk-5GTQXMS2.js.map} +0 -0
- /package/dist/esm/{chunk-KBSH6CBD.js.map → chunk-5XO3PLDH.js.map} +0 -0
- /package/dist/esm/{chunk-SGKLJDA3.js.map → chunk-74JANLVU.js.map} +0 -0
- /package/dist/esm/{chunk-TUZ665BA.js.map → chunk-7E3ZOVRL.js.map} +0 -0
- /package/dist/esm/{chunk-COLJWVN7.js.map → chunk-AQR42GKA.js.map} +0 -0
- /package/dist/esm/{chunk-FTNZWAPB.js.map → chunk-ARPUPT4M.js.map} +0 -0
- /package/dist/esm/{chunk-OMPLFDS6.js.map → chunk-ASBTPKH3.js.map} +0 -0
- /package/dist/esm/{chunk-JFJV4HL3.js.map → chunk-CFXFWIRM.js.map} +0 -0
- /package/dist/esm/{chunk-YLGIP3A5.js.map → chunk-CJZGEHVB.js.map} +0 -0
- /package/dist/esm/{chunk-ISCZ57VL.js.map → chunk-DJGZ4K3V.js.map} +0 -0
- /package/dist/esm/{chunk-PMXIQ5B4.js.map → chunk-FKCKELUB.js.map} +0 -0
- /package/dist/esm/{chunk-Y5ITMKC6.js.map → chunk-G7S2BMS3.js.map} +0 -0
- /package/dist/esm/{chunk-SR42NATX.js.map → chunk-GHIHF55B.js.map} +0 -0
- /package/dist/esm/{chunk-C6VGCYFQ.js.map → chunk-HNOT2HS4.js.map} +0 -0
- /package/dist/esm/{chunk-D42VCLKH.js.map → chunk-ICO5ULJL.js.map} +0 -0
- /package/dist/esm/{chunk-FYZXC7AL.js.map → chunk-JJVAVLCN.js.map} +0 -0
- /package/dist/esm/{chunk-R4DMVTM3.js.map → chunk-M6THDAMU.js.map} +0 -0
- /package/dist/esm/{chunk-VBF3XALY.js.map → chunk-MS2ONKJJ.js.map} +0 -0
- /package/dist/esm/{chunk-XFMAA4MD.js.map → chunk-NJG42JDM.js.map} +0 -0
- /package/dist/esm/{chunk-NJ7RQYLX.js.map → chunk-OIJQSUUM.js.map} +0 -0
- /package/dist/esm/{chunk-VYF6KKYM.js.map → chunk-ONJYRJ66.js.map} +0 -0
- /package/dist/esm/{chunk-UH6CJXHY.js.map → chunk-QPGW6RJG.js.map} +0 -0
- /package/dist/esm/{chunk-EB4AG3OL.js.map → chunk-REELD6CT.js.map} +0 -0
- /package/dist/esm/{chunk-3M5ZM67R.js.map → chunk-TCFBNE6A.js.map} +0 -0
- /package/dist/esm/{chunk-QBONJMSE.js.map → chunk-VRQK7U7J.js.map} +0 -0
- /package/dist/esm/{chunk-TANYRHGP.js.map → chunk-W3X4N4JE.js.map} +0 -0
- /package/dist/esm/{chunk-OPYTQ34H.js.map → chunk-W4CPV4PO.js.map} +0 -0
- /package/dist/esm/{chunk-G66WDIIV.js.map → chunk-WJKCXGVN.js.map} +0 -0
- /package/dist/esm/{chunk-YLPCYCYA.js.map → chunk-WT4IDG2W.js.map} +0 -0
- /package/dist/esm/{chunk-X4PWBFOT.js.map → chunk-YM47BXKK.js.map} +0 -0
- /package/dist/esm/{chunk-FVRVBB6O.js.map → chunk-YOZXIUZY.js.map} +0 -0
- /package/dist/esm/{chunk-OGVKMDO7.js.map → chunk-YRCXTCIT.js.map} +0 -0
- /package/dist/esm/components/{shell.hooks.js.map → _internal/use-close-warning.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as se,b as ie}from"./chunk-TUZ665BA.js";import{a as ne}from"./chunk-WUCBFB25.js";import{a as ae}from"./chunk-TGRHRMQI.js";import{a as re}from"./chunk-HGF4CKRY.js";import{b as te}from"./chunk-FVRVBB6O.js";import{a as Y}from"./chunk-BUXK5VGR.js";import{c as X}from"./chunk-5KMEUZWN.js";import{b as Z,c as ee}from"./chunk-GKDGNPBD.js";import{b as oe}from"./chunk-5ON3XLRD.js";import{c as W}from"./chunk-HBWBPBSA.js";import{a as Q}from"./chunk-LPLW7OWA.js";import{a as I}from"./chunk-L54FWKJE.js";import{b as J}from"./chunk-XU74PNM2.js";import{c as O}from"./chunk-OKQAVYW4.js";import{a as Le}from"./chunk-VQPANPMI.js";var je={};Le(je,{Content:()=>ye,Empty:()=>Se,Group:()=>Ve,Input:()=>Re,Item:()=>Te,Label:()=>Ee,List:()=>ve,Root:()=>Pe,Separator:()=>ke,Trigger:()=>ge,Value:()=>he});import*as e from"react";import d from"classnames";import{Popover as me}from"radix-ui";import{useCallbackRef as H,useComposedRefs as ue,useControllableState as A,useLayoutEffect as K}from"radix-ui/internal";import{Command as T,useCommandState as ce}from"cmdk";var Oe=["1","2","3","4"],G={size:{type:"enum",className:"kui-r-size",values:Oe,default:"2",responsive:!0}},ze=["raised","surface","soft","outline","ghost"],le={variant:{type:"enum",className:"kui-variant",values:ze,default:"raised"},error:{type:"boolean"},loading:{type:"boolean"},disabled:{type:"boolean"},readOnly:{type:"boolean"},...W,...J,width:I.width,placeholder:{type:"string"}},Me=["1","2","3","4"],z={size:{type:"enum",className:"kui-r-size",values:Me,default:"2",responsive:!0},...W,width:I.width,minWidth:I.minWidth,maxWidth:{...I.maxWidth,default:"480px"},...Q};var Fe={size:G.size},Be={size:z.size},be=new Set;function We(o){be.has(o)||(be.add(o),console.warn(o))}function Ge(o){let r=o,t=new Set;return{get:()=>r,set:a=>{Object.is(a,r)||(r=a,t.forEach(n=>n()))},subscribe:a=>(t.add(a),()=>{t.delete(a)})}}var pe=e.createContext(null),M=o=>{let r=e.useContext(pe);if(!r)throw new Error(`Combobox.${o} must be used within Combobox.Root`);return r},de=e.createContext(null),fe=e.createContext(null),Ce=e.createContext(null),xe=()=>e.useContext(Ce);function Ae(o){let r=o.getAttribute("aria-label")?.trim();if(r)return r;let t=o.getAttribute("aria-labelledby");if(t){let n=t.split(/\s+/).map(s=>o.ownerDocument.getElementById(s)?.textContent?.trim()).filter(Boolean).join(" ");if(n)return n}let a=o.labels;if(a&&a.length>0){let n=Array.from(a).map(s=>s.textContent?.trim()).filter(Boolean).join(" ");if(n)return n}}var Pe=o=>{let{children:r,size:t,value:a,defaultValue:n=null,onValueChange:s,open:m,defaultOpen:f=!1,onOpenChange:l,placeholder:c="Select an option",searchPlaceholder:P="Search...",searchValue:g,defaultSearchValue:h="",onSearchValueChange:y,filter:C,shouldFilter:i=!0,loop:b=!0,disabled:R,resetSearchOnSelect:x=!0,resetSearchOnClose:S=!0,color:V,displayValue:v,...k}=o,p=oe(t,G.size),[E,w]=A({prop:m,defaultProp:f,onChange:l}),[u,we]=A({prop:a,defaultProp:n,onChange:s}),[q,N]=A({prop:g,defaultProp:h,onChange:y}),$=typeof v=="function"?v(u):v,[D]=e.useState(()=>Ge(u));K(()=>{D.set(u)},[D,u]);let F=H(L=>{w(L),!L&&S&&N("")}),_=H(L=>{we(L),w(!1),x&&N("")}),B=e.useRef(null),U=e.useCallback(()=>B.current?Ae(B.current):void 0,[]),Ie=e.useMemo(()=>({value:u,displayValue:$,setOpen:F,size:p,placeholder:c,searchPlaceholder:P,disabled:R,color:V,loop:b,shouldFilter:i,filter:C,triggerRef:B,getTriggerLabel:U}),[u,$,F,p,c,P,R,V,b,i,C,U]),Ne=e.useMemo(()=>({value:q,setValue:N}),[q,N]),De=e.useMemo(()=>({store:D,onSelect:_,disabled:R}),[D,_,R]);return e.createElement(pe.Provider,{value:Ie},e.createElement(de.Provider,{value:Ne},e.createElement(fe.Provider,{value:De},e.createElement(se,{open:E,onOpenChange:F,...k},r))))};Pe.displayName="Combobox.Root";var ge=e.forwardRef((o,r)=>{let t=M("Trigger"),{children:a,className:n,placeholder:s,disabled:m,readOnly:f,error:l,loading:c,color:P,radius:g,onClick:h,onKeyDown:y,type:C,...i}=O({size:t.size,...o},Fe,le),b=m??t.disabled,R=P??t.color,x=!!(f||c),S=t.value==null&&t.displayValue==null,V=ue(r,t.triggerRef),{getTriggerLabel:v}=t;e.useEffect(()=>{},[v]);let k=u=>{h?.(u),x&&u.preventDefault()},p=u=>{y?.(u),!(u.defaultPrevented||x||b)&&(u.key==="ArrowDown"||u.key==="ArrowUp")&&(u.preventDefault(),t.setOpen(!0))},E=e.createElement("span",{className:"kui-SelectIcon kui-SelectLoadingIcon","aria-hidden":"true"},e.createElement(Y,null)),w=e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-SelectTriggerInner"},e.createElement("span",{className:"kui-ComboboxValue"},t.displayValue??t.value??s??t.placeholder)),c?E:e.createElement(ee,{className:"kui-SelectIcon"}));return e.createElement(ie,{disabled:b},e.createElement("button",{"data-accent-color":R,"data-radius":g,"data-error":l||void 0,"data-loading":c||void 0,"data-disabled":b||void 0,"data-read-only":f||void 0,"data-placeholder":S?"":void 0,...i,role:"combobox","aria-disabled":b||i["aria-disabled"],"aria-readonly":f||i["aria-readonly"],"aria-invalid":l||i["aria-invalid"],"aria-busy":c||i["aria-busy"],type:C??"button",disabled:b,onClick:k,onKeyDown:p,ref:V,className:d("kui-reset","kui-SelectTrigger","kui-ComboboxTrigger",n)},a?e.createElement(e.Fragment,null,ae(a),c?E:null):w))});ge.displayName="Combobox.Trigger";var he=e.forwardRef(({placeholder:o,children:r,className:t,...a},n)=>{let s=M("Value"),m=s.displayValue??s.value??void 0;return e.createElement("span",{...a,ref:n,className:d("kui-ComboboxValue",t)},m??r??o??s.placeholder)});he.displayName="Combobox.Value";function He(){let o=ce(n=>n.filtered.count),r=ce(n=>n.search),[t,a]=e.useState("");return e.useEffect(()=>{let n=r?o===0?"No results":`${o} result${o===1?"":"s"}`:"",s=window.setTimeout(()=>a(n),r?400:0);return()=>window.clearTimeout(s)},[o,r]),e.createElement(ne,{role:"status","aria-live":"polite","aria-atomic":"true"},t)}var ye=e.forwardRef((o,r)=>{let t=M("Content"),a=te(),n=o.size??t.size??z.size.default,{className:s,children:m,color:f,forceMount:l,container:c,onOpenAutoFocus:P,"aria-label":g,"aria-labelledby":h,...y}=O({...o,size:n},z),C=f||t.color||a.accentColor,{getTriggerLabel:i}=t,[b,R]=e.useState(i);K(()=>{if(b!==void 0)return;let p=i();p!==void 0&&R(p)},[i,b]);let x=o["aria-label"]??b,S=e.useMemo(()=>({sizeClassName:O({size:n},Be).className||void 0,color:C,label:x}),[n,C,x]),V=e.useRef(null),v=p=>{if(P?.(p),p.defaultPrevented)return;let E=V.current;if(!E||E.querySelector("[cmdk-input]"))return;p.preventDefault(),(E.querySelector("[cmdk-list]")??E).focus({preventScroll:!0})},k=t.value?.trim()||void 0;return e.createElement(me.Portal,{container:c,forceMount:l?!0:void 0},e.createElement(re,{asChild:!0},e.createElement(me.Content,{"data-accent-color":C,align:"start",sideOffset:4,collisionPadding:10,"aria-label":h?void 0:x,"aria-labelledby":h,...y,forceMount:l?!0:void 0,onOpenAutoFocus:v,ref:r,className:d("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-ComboboxContent",s)},e.createElement(Ce.Provider,{value:S},e.createElement(T,{ref:V,loop:t.loop,shouldFilter:t.shouldFilter,filter:t.filter,label:x,defaultValue:k,className:"kui-ComboboxCommand"},m,e.createElement(He,null))))))});ye.displayName="Combobox.Content";var Re=e.forwardRef(({className:o,startAdornment:r,endAdornment:t,placeholder:a,variant:n,value:s,onValueChange:m,...f},l)=>{let c=M("Input"),P=e.useContext(de),g=xe(),h=n??"soft",y=s??P?.value??"",C=m??P?.setValue,i=e.createElement("div",{className:d("kui-TextFieldRoot","kui-ComboboxInputRoot",g?.sizeClassName,`kui-variant-${h}`),"data-accent-color":g?.color},r?e.createElement("div",{className:"kui-TextFieldSlot"},r):null,e.createElement(T.Input,{...f,ref:l,value:y,onValueChange:C,placeholder:a??c.searchPlaceholder,className:d("kui-reset","kui-TextFieldInput",o)}),t?e.createElement("div",{className:"kui-TextFieldSlot","data-side":"right"},t):null);return g?e.createElement("div",{className:"kui-ComboboxSearch"},i):i});Re.displayName="Combobox.Input";var ve=e.forwardRef(({className:o,children:r,label:t,...a},n)=>{let s=xe();return e.createElement("div",{className:"kui-ComboboxScrollArea"},e.createElement("div",{className:d("kui-BaseMenuViewport","kui-ComboboxViewport")},e.createElement(T.List,{...a,label:t??s?.label,ref:n,className:d("kui-ComboboxList",o)},r)))});ve.displayName="Combobox.List";var Se=e.forwardRef(({className:o,...r},t)=>e.createElement(T.Empty,{...r,ref:t,className:d("kui-ComboboxEmpty",o)}));Se.displayName="Combobox.Empty";var Ve=e.forwardRef(({className:o,...r},t)=>e.createElement(T.Group,{...r,ref:t,className:d("kui-BaseMenuGroup","kui-ComboboxGroup",o)}));Ve.displayName="Combobox.Group";var Ee=e.forwardRef(({className:o,id:r,...t},a)=>{let n=e.useId(),s=r??n,m=e.useRef(null),f=ue(a,m);return K(()=>{let l=m.current?.closest("[cmdk-group-items]");if(!(!l||l.hasAttribute("aria-labelledby")))return l.setAttribute("aria-labelledby",s),()=>{l.getAttribute("aria-labelledby")===s&&l.removeAttribute("aria-labelledby")}},[s]),e.createElement("div",{...t,id:s,ref:f,className:d("kui-BaseMenuLabel","kui-ComboboxLabel",o)})});Ee.displayName="Combobox.Label";var ke=e.forwardRef(({className:o,...r},t)=>e.createElement(T.Separator,{...r,ref:t,className:d("kui-BaseMenuSeparator","kui-ComboboxSeparator",o)}));ke.displayName="Combobox.Separator";function j(o){return o==null||typeof o=="boolean"?"":typeof o=="string"||typeof o=="number"?String(o):Array.isArray(o)?o.map(j).join(""):e.isValidElement(o)?j(o.props.children):""}var Te=e.forwardRef(({className:o,children:r,label:t,value:a,disabled:n,onSelect:s,keywords:m,...f},l)=>{let c=e.useContext(fe);if(!c)throw new Error("Combobox.Item must be used within Combobox.Root");let{store:P,onSelect:g,disabled:h}=c,y=a??(typeof r=="string"?r.trim():void 0),C=()=>y!==void 0&&P.get()===y,i=e.useSyncExternalStore(P.subscribe,C,C),b=H(s),R=e.useCallback(k=>{let p=a??k;g(p),b(p)},[a,g,b]),x=(t??j(r)).replace(/\s+/g," ").trim(),S=x?m?[x,...m]:[x]:m,V=S?S.join("\0"):"",v=n??h??!1;return e.createElement(T.Item,{key:V,...f,value:a,keywords:S,"aria-checked":i,disabled:v||void 0,ref:l,onSelect:R,className:d("kui-reset","kui-BaseMenuItem","kui-ComboboxItem",o)},i?e.createElement("span",{className:d("kui-BaseMenuItemIndicator","kui-ComboboxItemIndicator")},e.createElement(Z,{className:d("kui-BaseMenuItemIndicatorIcon","kui-ComboboxItemIndicatorIcon")})):null,e.createElement(X,null,r))});Te.displayName="Combobox.Item";export{Pe as a,ge as b,he as c,ye as d,Re as e,ve as f,Se as g,Ve as h,Ee as i,ke as j,Te as k,je as l};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as se,b as ie}from"./chunk-7E3ZOVRL.js";import{a as ne}from"./chunk-WUCBFB25.js";import{a as ae}from"./chunk-TGRHRMQI.js";import{a as re}from"./chunk-3ZBEWLSO.js";import{b as te}from"./chunk-YOZXIUZY.js";import{a as Y}from"./chunk-BUXK5VGR.js";import{c as X}from"./chunk-5KMEUZWN.js";import{b as Z,c as ee}from"./chunk-GKDGNPBD.js";import{c as W}from"./chunk-HBWBPBSA.js";import{b as oe}from"./chunk-5ON3XLRD.js";import{a as Q}from"./chunk-LPLW7OWA.js";import{a as I}from"./chunk-L54FWKJE.js";import{b as J}from"./chunk-XU74PNM2.js";import{c as O}from"./chunk-OKQAVYW4.js";import{a as Le}from"./chunk-VQPANPMI.js";var je={};Le(je,{Content:()=>ye,Empty:()=>Se,Group:()=>Ve,Input:()=>Re,Item:()=>Te,Label:()=>Ee,List:()=>ve,Root:()=>Pe,Separator:()=>ke,Trigger:()=>ge,Value:()=>he});import*as e from"react";import d from"classnames";import{Popover as me}from"radix-ui";import{useCallbackRef as H,useComposedRefs as ue,useControllableState as A,useLayoutEffect as K}from"radix-ui/internal";import{Command as T,useCommandState as ce}from"cmdk";var Oe=["1","2","3","4"],G={size:{type:"enum",className:"kui-r-size",values:Oe,default:"2",responsive:!0}},ze=["raised","surface","soft","outline","ghost"],le={variant:{type:"enum",className:"kui-variant",values:ze,default:"raised"},error:{type:"boolean"},loading:{type:"boolean"},disabled:{type:"boolean"},readOnly:{type:"boolean"},...W,...J,width:I.width,placeholder:{type:"string"}},Me=["1","2","3","4"],z={size:{type:"enum",className:"kui-r-size",values:Me,default:"2",responsive:!0},...W,width:I.width,minWidth:I.minWidth,maxWidth:{...I.maxWidth,default:"480px"},...Q};var Fe={size:G.size},Be={size:z.size},be=new Set;function We(o){be.has(o)||(be.add(o),console.warn(o))}function Ge(o){let r=o,t=new Set;return{get:()=>r,set:a=>{Object.is(a,r)||(r=a,t.forEach(n=>n()))},subscribe:a=>(t.add(a),()=>{t.delete(a)})}}var pe=e.createContext(null),M=o=>{let r=e.useContext(pe);if(!r)throw new Error(`Combobox.${o} must be used within Combobox.Root`);return r},de=e.createContext(null),fe=e.createContext(null),Ce=e.createContext(null),xe=()=>e.useContext(Ce);function Ae(o){let r=o.getAttribute("aria-label")?.trim();if(r)return r;let t=o.getAttribute("aria-labelledby");if(t){let n=t.split(/\s+/).map(s=>o.ownerDocument.getElementById(s)?.textContent?.trim()).filter(Boolean).join(" ");if(n)return n}let a=o.labels;if(a&&a.length>0){let n=Array.from(a).map(s=>s.textContent?.trim()).filter(Boolean).join(" ");if(n)return n}}var Pe=o=>{let{children:r,size:t,value:a,defaultValue:n=null,onValueChange:s,open:m,defaultOpen:f=!1,onOpenChange:l,placeholder:c="Select an option",searchPlaceholder:P="Search...",searchValue:g,defaultSearchValue:h="",onSearchValueChange:y,filter:C,shouldFilter:i=!0,loop:b=!0,disabled:R,resetSearchOnSelect:x=!0,resetSearchOnClose:S=!0,color:V,displayValue:v,...k}=o,p=oe(t,G.size),[E,w]=A({prop:m,defaultProp:f,onChange:l}),[u,we]=A({prop:a,defaultProp:n,onChange:s}),[q,N]=A({prop:g,defaultProp:h,onChange:y}),$=typeof v=="function"?v(u):v,[D]=e.useState(()=>Ge(u));K(()=>{D.set(u)},[D,u]);let F=H(L=>{w(L),!L&&S&&N("")}),_=H(L=>{we(L),w(!1),x&&N("")}),B=e.useRef(null),U=e.useCallback(()=>B.current?Ae(B.current):void 0,[]),Ie=e.useMemo(()=>({value:u,displayValue:$,setOpen:F,size:p,placeholder:c,searchPlaceholder:P,disabled:R,color:V,loop:b,shouldFilter:i,filter:C,triggerRef:B,getTriggerLabel:U}),[u,$,F,p,c,P,R,V,b,i,C,U]),Ne=e.useMemo(()=>({value:q,setValue:N}),[q,N]),De=e.useMemo(()=>({store:D,onSelect:_,disabled:R}),[D,_,R]);return e.createElement(pe.Provider,{value:Ie},e.createElement(de.Provider,{value:Ne},e.createElement(fe.Provider,{value:De},e.createElement(se,{open:E,onOpenChange:F,...k},r))))};Pe.displayName="Combobox.Root";var ge=e.forwardRef((o,r)=>{let t=M("Trigger"),{children:a,className:n,placeholder:s,disabled:m,readOnly:f,error:l,loading:c,color:P,radius:g,onClick:h,onKeyDown:y,type:C,...i}=O({size:t.size,...o},Fe,le),b=m??t.disabled,R=P??t.color,x=!!(f||c),S=t.value==null&&t.displayValue==null,V=ue(r,t.triggerRef),{getTriggerLabel:v}=t;e.useEffect(()=>{},[v]);let k=u=>{h?.(u),x&&u.preventDefault()},p=u=>{y?.(u),!(u.defaultPrevented||x||b)&&(u.key==="ArrowDown"||u.key==="ArrowUp")&&(u.preventDefault(),t.setOpen(!0))},E=e.createElement("span",{className:"kui-SelectIcon kui-SelectLoadingIcon","aria-hidden":"true"},e.createElement(Y,null)),w=e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-SelectTriggerInner"},e.createElement("span",{className:"kui-ComboboxValue"},t.displayValue??t.value??s??t.placeholder)),c?E:e.createElement(ee,{className:"kui-SelectIcon"}));return e.createElement(ie,{disabled:b},e.createElement("button",{"data-accent-color":R,"data-radius":g,"data-error":l||void 0,"data-loading":c||void 0,"data-disabled":b||void 0,"data-read-only":f||void 0,"data-placeholder":S?"":void 0,...i,role:"combobox","aria-disabled":b||i["aria-disabled"],"aria-readonly":f||i["aria-readonly"],"aria-invalid":l||i["aria-invalid"],"aria-busy":c||i["aria-busy"],type:C??"button",disabled:b,onClick:k,onKeyDown:p,ref:V,className:d("kui-reset","kui-SelectTrigger","kui-ComboboxTrigger",n)},a?e.createElement(e.Fragment,null,ae(a),c?E:null):w))});ge.displayName="Combobox.Trigger";var he=e.forwardRef(({placeholder:o,children:r,className:t,...a},n)=>{let s=M("Value"),m=s.displayValue??s.value??void 0;return e.createElement("span",{...a,ref:n,className:d("kui-ComboboxValue",t)},m??r??o??s.placeholder)});he.displayName="Combobox.Value";function He(){let o=ce(n=>n.filtered.count),r=ce(n=>n.search),[t,a]=e.useState("");return e.useEffect(()=>{let n=r?o===0?"No results":`${o} result${o===1?"":"s"}`:"",s=window.setTimeout(()=>a(n),r?400:0);return()=>window.clearTimeout(s)},[o,r]),e.createElement(ne,{role:"status","aria-live":"polite","aria-atomic":"true"},t)}var ye=e.forwardRef((o,r)=>{let t=M("Content"),a=te(),n=o.size??t.size??z.size.default,{className:s,children:m,color:f,forceMount:l,container:c,onOpenAutoFocus:P,"aria-label":g,"aria-labelledby":h,...y}=O({...o,size:n},z),C=f||t.color||a.accentColor,{getTriggerLabel:i}=t,[b,R]=e.useState(i);K(()=>{if(b!==void 0)return;let p=i();p!==void 0&&R(p)},[i,b]);let x=o["aria-label"]??b,S=e.useMemo(()=>({sizeClassName:O({size:n},Be).className||void 0,color:C,label:x}),[n,C,x]),V=e.useRef(null),v=p=>{if(P?.(p),p.defaultPrevented)return;let E=V.current;if(!E||E.querySelector("[cmdk-input]"))return;p.preventDefault(),(E.querySelector("[cmdk-list]")??E).focus({preventScroll:!0})},k=t.value?.trim()||void 0;return e.createElement(me.Portal,{container:c,forceMount:l?!0:void 0},e.createElement(re,{asChild:!0},e.createElement(me.Content,{"data-accent-color":C,align:"start",sideOffset:4,collisionPadding:10,"aria-label":h?void 0:x,"aria-labelledby":h,...y,forceMount:l?!0:void 0,onOpenAutoFocus:v,ref:r,className:d("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-ComboboxContent",s)},e.createElement(Ce.Provider,{value:S},e.createElement(T,{ref:V,loop:t.loop,shouldFilter:t.shouldFilter,filter:t.filter,label:x,defaultValue:k,className:"kui-ComboboxCommand"},m,e.createElement(He,null))))))});ye.displayName="Combobox.Content";var Re=e.forwardRef(({className:o,startAdornment:r,endAdornment:t,placeholder:a,variant:n,value:s,onValueChange:m,...f},l)=>{let c=M("Input"),P=e.useContext(de),g=xe(),h=n??"soft",y=s??P?.value??"",C=m??P?.setValue,i=e.createElement("div",{className:d("kui-TextFieldRoot","kui-ComboboxInputRoot",g?.sizeClassName,`kui-variant-${h}`),"data-accent-color":g?.color},r?e.createElement("div",{className:"kui-TextFieldSlot"},r):null,e.createElement(T.Input,{...f,ref:l,value:y,onValueChange:C,placeholder:a??c.searchPlaceholder,className:d("kui-reset","kui-TextFieldInput",o)}),t?e.createElement("div",{className:"kui-TextFieldSlot","data-side":"right"},t):null);return g?e.createElement("div",{className:"kui-ComboboxSearch"},i):i});Re.displayName="Combobox.Input";var ve=e.forwardRef(({className:o,children:r,label:t,...a},n)=>{let s=xe();return e.createElement("div",{className:"kui-ComboboxScrollArea"},e.createElement("div",{className:d("kui-BaseMenuViewport","kui-ComboboxViewport")},e.createElement(T.List,{...a,label:t??s?.label,ref:n,className:d("kui-ComboboxList",o)},r)))});ve.displayName="Combobox.List";var Se=e.forwardRef(({className:o,...r},t)=>e.createElement(T.Empty,{...r,ref:t,className:d("kui-ComboboxEmpty",o)}));Se.displayName="Combobox.Empty";var Ve=e.forwardRef(({className:o,...r},t)=>e.createElement(T.Group,{...r,ref:t,className:d("kui-BaseMenuGroup","kui-ComboboxGroup",o)}));Ve.displayName="Combobox.Group";var Ee=e.forwardRef(({className:o,id:r,...t},a)=>{let n=e.useId(),s=r??n,m=e.useRef(null),f=ue(a,m);return K(()=>{let l=m.current?.closest("[cmdk-group-items]");if(!(!l||l.hasAttribute("aria-labelledby")))return l.setAttribute("aria-labelledby",s),()=>{l.getAttribute("aria-labelledby")===s&&l.removeAttribute("aria-labelledby")}},[s]),e.createElement("div",{...t,id:s,ref:f,className:d("kui-BaseMenuLabel","kui-ComboboxLabel",o)})});Ee.displayName="Combobox.Label";var ke=e.forwardRef(({className:o,...r},t)=>e.createElement(T.Separator,{...r,ref:t,className:d("kui-BaseMenuSeparator","kui-ComboboxSeparator",o)}));ke.displayName="Combobox.Separator";function j(o){return o==null||typeof o=="boolean"?"":typeof o=="string"||typeof o=="number"?String(o):Array.isArray(o)?o.map(j).join(""):e.isValidElement(o)?j(o.props.children):""}var Te=e.forwardRef(({className:o,children:r,label:t,value:a,disabled:n,onSelect:s,keywords:m,...f},l)=>{let c=e.useContext(fe);if(!c)throw new Error("Combobox.Item must be used within Combobox.Root");let{store:P,onSelect:g,disabled:h}=c,y=a??(typeof r=="string"?r.trim():void 0),C=()=>y!==void 0&&P.get()===y,i=e.useSyncExternalStore(P.subscribe,C,C),b=H(s),R=e.useCallback(k=>{let p=a??k;g(p),b(p)},[a,g,b]),x=(t??j(r)).replace(/\s+/g," ").trim(),S=x?m?[x,...m]:[x]:m,V=S?S.join("\0"):"",v=n??h??!1;return e.createElement(T.Item,{key:V,...f,value:a,keywords:S,"aria-checked":i,disabled:v||void 0,ref:l,onSelect:R,className:d("kui-reset","kui-BaseMenuItem","kui-ComboboxItem",o)},i?e.createElement("span",{className:d("kui-BaseMenuItemIndicator","kui-ComboboxItemIndicator")},e.createElement(Z,{className:d("kui-BaseMenuItemIndicatorIcon","kui-ComboboxItemIndicatorIcon")})):null,e.createElement(X,null,r))});Te.displayName="Combobox.Item";export{Pe as a,ge as b,he as c,ye as d,Re as e,ve as f,Se as g,Ve as h,Ee as i,ke as j,Te as k,je as l};
|
|
3
|
+
//# sourceMappingURL=chunk-NJG42JDM.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as P}from"./chunk-FICBVI4M.js";import{a as l}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as P}from"./chunk-FICBVI4M.js";import{a as l}from"./chunk-3ZBEWLSO.js";import{a as e}from"./chunk-L54FWKJE.js";import{c as s}from"./chunk-OKQAVYW4.js";import*as o from"react";import W from"classnames";import{Tooltip as t}from"radix-ui";var a={content:{type:"ReactNode",required:!0},width:e.width,minWidth:e.minWidth,maxWidth:{...e.maxWidth,default:"360px"}};var m=200,f=o.createContext(!1);function N({delayDuration:i=m,children:r,...p}){return o.createElement(f.Provider,{value:!0},o.createElement(t.Provider,{delayDuration:i,...p},r))}N.displayName="TooltipProvider";var g=o.forwardRef((i,r)=>{let{children:p,className:d,open:T,defaultOpen:c,onOpenChange:v,delayDuration:y,disableHoverableContent:h,content:u,container:R,forceMount:C,...D}=s(i,a),x={open:T,defaultOpen:c,onOpenChange:v,delayDuration:y,disableHoverableContent:h},w=o.useContext(f),n=o.createElement(t.Root,{...x},o.createElement(t.Trigger,{asChild:!0},p),o.createElement(t.Portal,{container:R,forceMount:C},o.createElement(l,{asChild:!0},o.createElement(t.Content,{sideOffset:4,collisionPadding:10,...D,asChild:!1,ref:r,className:W("kui-TooltipContent",d)},o.createElement(P,{as:"p",className:"kui-TooltipText",size:"1"},u),o.createElement(t.Arrow,{className:"kui-TooltipArrow"})))));return w?n:o.createElement(t.Provider,{delayDuration:m},n)});g.displayName="Tooltip";export{N as a,g as b};
|
|
3
|
+
//# sourceMappingURL=chunk-OIJQSUUM.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{c as
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{c as E}from"./chunk-HBWBPBSA.js";import{c as I}from"./chunk-5ON3XLRD.js";import{b as L}from"./chunk-XU74PNM2.js";import{c as j}from"./chunk-OKQAVYW4.js";import*as r from"react";import re from"classnames";import{Direction as ae,Slider as v}from"radix-ui";var te=["1","2","3","4"],g={size:{type:"enum",className:"kui-r-size",values:te,default:"2",responsive:!0},showTickLabels:{type:"boolean"},snapToTicks:{type:"boolean"},...E,...L};var ne=r.forwardRef((K,O)=>{let W=I(K,g.size),{className:B,color:G,radius:A,tabIndex:C,...H}=j(W,g),{ticks:c,unit:u,showTickLabels:U,snapToTicks:y,value:$,defaultValue:q,onValueChange:x,onValueCommit:p,"aria-label":F,"aria-labelledby":J,...i}=H,k=i.min??0,d=i.max??100,[Q,X]=r.useState(()=>q??[k]),P=$!==void 0,s=P?$:Q,D=r.useId(),Y=i.step,l=r.useMemo(()=>c?[...c].sort((e,t)=>e.value-t.value):[],[c]),m=r.useCallback(e=>{let t=l[0].value;for(let a of l)Math.abs(a.value-e)<Math.abs(t-e)&&(t=a.value);return t},[l]),R=r.useCallback((e,t)=>{let a=m(e);return e>t&&a<=t?l.find(n=>n.value>t)?.value??t:e<t&&a>=t?[...l].reverse().find(n=>n.value<t)?.value??t:a},[m,l]),f=r.useRef(!1),N=r.useCallback(e=>{let t=a=>u?`${a} ${u}`:a.toString();return e.length===1?`${t(e[0])} out of ${t(d)}`:e.length===2?`${t(e[0])} to ${t(e[1])} out of ${t(d)}`:`${e.map(t).join(", ")} out of ${t(d)}`},[u,d]),Z=ae.useDirection(i.dir),T=i.orientation??"horizontal",V=T==="vertical"?!i.inverted:Z==="rtl"!=!!i.inverted,S=r.useMemo(()=>c?c.map((e,t)=>{let a=(e.value-k)/(d-k)*100;return{...e,percentage:V?100-a:a,index:t}}):null,[c,k,d,V]),b=r.useRef(null),h=r.useRef(null),_=r.useCallback(e=>{b.current&&(b.current.textContent=N(e),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{b.current&&(b.current.textContent="")},1e3))},[N]),w=r.useCallback(e=>{let a=y&&l.length>0?e.map((n,o)=>f.current&&s[o]!==void 0?R(n,s[o]):m(n)):e;P||X(a),x?.(a)},[y,l,R,m,s,x,P]),ee=r.useCallback(e=>{if(!p)return;if(!y||l.length===0){p(e);return}let t=f.current,a=e.map((n,o)=>t&&s[o]!==void 0?R(n,s[o]):m(n));t&&a.every((n,o)=>n===s[o])||p(a)},[p,y,l,R,m,s]);return r.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),r.createElement("div",{className:"kui-SliderContainer","data-orientation":T,"data-has-ticks":S?"":void 0},r.createElement("div",{ref:b,"aria-live":"polite","aria-atomic":"true",className:"kui-sr-only"}),r.createElement(v.Root,{"data-accent-color":G,"data-radius":A,ref:O,...i,value:s,step:Y,onKeyDown:e=>{f.current=!0,i.onKeyDown?.(e)},onPointerDown:e=>{f.current=!1,i.onPointerDown?.(e)},onValueChange:w,onValueCommit:ee,asChild:!1,className:re("kui-SliderRoot",B)},r.createElement(v.Track,{className:"kui-SliderTrack"},r.createElement(v.Range,{className:"kui-SliderRange","data-inverted":i.inverted?"":void 0})),s.map((e,t)=>r.createElement(v.Thumb,{key:t,className:"kui-SliderThumb",...C!==void 0?{tabIndex:C}:void 0,"aria-label":F,"aria-labelledby":J,"aria-valuetext":u?`${e} ${u}`:void 0}))),S&&r.createElement("div",{className:"kui-SliderTicks","data-orientation":T,role:"group","aria-label":"Slider tick marks"},S.map(e=>r.createElement("button",{key:e.index,className:"kui-SliderTick",style:T==="vertical"?{top:`${e.percentage}%`}:{left:`${e.percentage}%`},disabled:i.disabled,onClick:()=>{let t=0;s.forEach((n,o)=>{let M=Math.abs(n-e.value),z=Math.abs(s[t]-e.value);(M<z||M===z&&e.value>n)&&(t=o)});let a=s.map((n,o)=>o===t?e.value:n).sort((n,o)=>n-o);f.current=!1,w(a),p?.(a),_(a)},"aria-label":`Set to ${e.label||(u?`${e.value} ${u}`:e.value)}`,"aria-describedby":e.label?void 0:`${D}-tick-${e.index}`,type:"button"},r.createElement("div",{className:"kui-SliderTickMark"}),e.label&&U!==!1&&r.createElement("div",{className:"kui-SliderTickLabel"},e.label),!e.label&&r.createElement("span",{id:`${D}-tick-${e.index}`,className:"kui-sr-only"},u?`${e.value} ${u}`:e.value)))))});ne.displayName="Slider";export{ne as a};
|
|
3
|
+
//# sourceMappingURL=chunk-ONJYRJ66.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as m}from"./chunk-YOESAYMJ.js";import{a as D}from"./chunk-FATCGZZE.js";import{a as P}from"./chunk-OBSZOD5M.js";import{a as f,b as C}from"./chunk-3RJVW6RK.js";import{a as l}from"./chunk-TGRHRMQI.js";import{a as c}from"./chunk-FICBVI4M.js";import{a as g}from"./chunk-3ZBEWLSO.js";import{c as n}from"./chunk-5ON3XLRD.js";import{a as p}from"./chunk-4KBKS3ZE.js";import{c as a}from"./chunk-OKQAVYW4.js";import{a as S}from"./chunk-VQPANPMI.js";var q={};S(q,{Close:()=>h,Content:()=>y,Description:()=>u,Root:()=>v,Title:()=>T,Trigger:()=>R});import*as o from"react";import z from"classnames";import{Dialog as i}from"radix-ui";import{useComposedRefs as A}from"radix-ui/internal";var v=e=>o.createElement(i.Root,{...e,modal:!0});v.displayName="Dialog.Root";var R=o.forwardRef(({children:e,...t},r)=>o.createElement(i.Trigger,{...t,ref:r,asChild:!0},l(e)));R.displayName="Dialog.Trigger";var{align:F,...d}=D,M={align:F},j={Title:({children:e})=>o.createElement(i.Title,{asChild:!0},e),Close:({children:e})=>o.createElement(i.Close,{asChild:!0},e)},y=o.forwardRef(({align:e,...t},r)=>{let N=n(t,d.size),{className:E}=a({align:e},M),{className:x,forceMount:H,container:W,onCloseAutoFocus:k,...s}=a(N,d),w=m("Dialog"),B=A(r,w);return C(),o.createElement(i.Portal,{container:W,forceMount:H},o.createElement(g,{asChild:!0},o.createElement(i.Overlay,{className:"kui-BaseDialogOverlay kui-DialogOverlay"},o.createElement("div",{className:"kui-BaseDialogScroll kui-DialogScroll"},o.createElement("div",{className:`kui-BaseDialogScrollPadding kui-DialogScrollPadding ${E}`},o.createElement(i.Content,{...s,ref:B,className:z("kui-BaseDialogContent","kui-DialogContent",x),children:o.createElement(p.Provider,{value:j},s.children),"aria-modal":"true",onCloseAutoFocus:O=>{k?.(O),f()}}))))))});y.displayName="Dialog.Content";var T=o.forwardRef((e,t)=>o.createElement(i.Title,{asChild:!0},o.createElement(P,{size:"5",trim:"start",...e,asChild:!1,ref:t})));T.displayName="Dialog.Title";var u=o.forwardRef((e,t)=>o.createElement(i.Description,{asChild:!0},o.createElement(c,{as:"p",size:"3",...e,asChild:!1,ref:t})));u.displayName="Dialog.Description";var h=o.forwardRef(({children:e,...t},r)=>o.createElement(i.Close,{...t,ref:r,asChild:!0},l(e)));h.displayName="Dialog.Close";export{v as a,R as b,y as c,T as d,u as e,h as f,q as g};
|
|
3
|
+
//# sourceMappingURL=chunk-PIVHOUEA.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/dialog.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { useComposedRefs } from 'radix-ui/internal';\n\nimport { dialogContentPropDefs } from './dialog.props.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { PortalTheme } from './_internal/portal-theme.js';\nimport { NavigatorHostContext, type NavigatorHost } from './_internal/navigator-host.js';\nimport { useCloseWarning } from './_internal/use-close-warning.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { releaseBodyPointerEvents, useBodyPointerEventsCleanup } from '../hooks/use-body-pointer-events-cleanup.js';\n\nimport type { DialogContentOwnProps } from './dialog.props.js';\nimport type { ComponentPropsWithout, RemovedProps, ComponentPropsAs } from '../helpers/component-props.js';\n\ninterface DialogRootProps extends ComponentPropsWithout<typeof DialogPrimitive.Root, 'modal'> {}\nconst DialogRoot: React.FC<DialogRootProps> = (props) => <DialogPrimitive.Root {...props} modal />;\nDialogRoot.displayName = 'Dialog.Root';\n\ntype DialogTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\ninterface DialogTriggerProps extends ComponentPropsWithout<typeof DialogPrimitive.Trigger, RemovedProps> {}\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(({ children, ...props }, forwardedRef) => (\n <DialogPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Trigger>\n));\nDialogTrigger.displayName = 'Dialog.Trigger';\n\n// Split once at module scope. `extractProps` memoises on the identity of the\n// prop def objects it is handed, so rebuilding these per render would recompile\n// them on every render.\nconst { align: alignPropDef, ...contentPropDefs } = dialogContentPropDefs;\nconst alignPropDefs = { align: alignPropDef };\n\ntype DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ninterface DialogContentProps extends ComponentPropsWithout<typeof DialogPrimitive.Content, RemovedProps>, DialogContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n}\n/** What a Navigator screen in this panel uses: its title names the panel, its close closes it. */\nconst dialogNavigatorHost: NavigatorHost = {\n Title: ({ children }) => <DialogPrimitive.Title asChild>{children}</DialogPrimitive.Title>,\n Close: ({ children }) => <DialogPrimitive.Close asChild>{children}</DialogPrimitive.Close>,\n};\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(({ align, ...ownProps }, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, contentPropDefs.size);\n const { className: alignClassName } = extractProps({ align }, alignPropDefs);\n\n const { className, forceMount, container, onCloseAutoFocus, ...contentProps } = extractProps(props, contentPropDefs);\n\n const closeWarningRef = useCloseWarning('Dialog');\n const ref = useComposedRefs(forwardedRef, closeWarningRef);\n\n // Cleanup stuck pointer-events on body\n useBodyPointerEventsCleanup();\n\n return (\n <DialogPrimitive.Portal container={container} forceMount={forceMount}>\n <PortalTheme asChild>\n <DialogPrimitive.Overlay className=\"kui-BaseDialogOverlay kui-DialogOverlay\">\n <div className=\"kui-BaseDialogScroll kui-DialogScroll\">\n <div className={`kui-BaseDialogScrollPadding kui-DialogScrollPadding ${alignClassName}`}>\n <DialogPrimitive.Content\n {...contentProps}\n ref={ref}\n className={classNames('kui-BaseDialogContent', 'kui-DialogContent', className)}\n children={<NavigatorHostContext.Provider value={dialogNavigatorHost}>{contentProps.children}</NavigatorHostContext.Provider>}\n aria-modal=\"true\"\n onCloseAutoFocus={(event) => {\n // Radix returns focus to the trigger unless the caller prevents it.\n onCloseAutoFocus?.(event);\n // Restore pointer-events to body (Radix UI fix for issue #1241)\n releaseBodyPointerEvents();\n }}\n />\n </div>\n </div>\n </DialogPrimitive.Overlay>\n </PortalTheme>\n </DialogPrimitive.Portal>\n );\n});\nDialogContent.displayName = 'Dialog.Content';\n\ntype DialogTitleElement = React.ElementRef<typeof Heading>;\ntype DialogTitleProps = ComponentPropsWithout<typeof Heading, 'asChild'>;\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>((props, forwardedRef) => (\n <DialogPrimitive.Title asChild>\n <Heading size=\"5\" trim=\"start\" {...props} asChild={false} ref={forwardedRef} />\n </DialogPrimitive.Title>\n));\nDialogTitle.displayName = 'Dialog.Title';\n\ntype DialogDescriptionElement = HTMLParagraphElement;\ntype DialogDescriptionProps = ComponentPropsAs<typeof Text, 'p'>;\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>((props, forwardedRef) => (\n <DialogPrimitive.Description asChild>\n <Text as=\"p\" size=\"3\" {...props} asChild={false} ref={forwardedRef} />\n </DialogPrimitive.Description>\n));\nDialogDescription.displayName = 'Dialog.Description';\n\ntype DialogCloseElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface DialogCloseProps extends ComponentPropsWithout<typeof DialogPrimitive.Close, RemovedProps> {}\nconst DialogClose = React.forwardRef<DialogCloseElement, DialogCloseProps>(({ children, ...props }, forwardedRef) => (\n <DialogPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Close>\n));\nDialogClose.displayName = 'Dialog.Close';\n\nexport { DialogRoot as Root, DialogTrigger as Trigger, DialogContent as Content, DialogTitle as Title, DialogDescription as Description, DialogClose as Close };\n\nexport type {\n DialogRootProps as RootProps,\n DialogTriggerProps as TriggerProps,\n DialogContentProps as ContentProps,\n DialogTitleProps as TitleProps,\n DialogDescriptionProps as DescriptionProps,\n DialogCloseProps as CloseProps,\n};\n"],
|
|
5
|
+
"mappings": ";+bAAA,IAAAA,EA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WkB,EAAW,WAAYD,GACxD,gBAACS,EAAA,CAAY,QAAO,IAClB,gBAAC1B,EAAgB,QAAhB,CAAwB,UAAU,2CACjC,gBAAC,OAAI,UAAU,yCACb,gBAAC,OAAI,UAAW,uDAAuDc,CAAc,IACnF,gBAACd,EAAgB,QAAhB,CACE,GAAGoB,EACJ,IAAKG,EACL,UAAWI,EAAW,wBAAyB,oBAAqBX,CAAS,EAC7E,SAAU,gBAACY,EAAqB,SAArB,CAA8B,MAAOnB,GAAsBW,EAAa,QAAS,EAC5F,aAAW,OACX,iBAAmBS,GAAU,CAE3BV,IAAmBU,CAAK,EAExBC,EAAyB,CAC3B,EACF,CACF,CACF,CACF,CACF,CACF,CAEJ,CAAC,EACDpB,EAAc,YAAc,iBAI5B,IAAMqB,EAAoB,aAAiD,CAAChC,EAAOI,IACjF,gBAACH,EAAgB,MAAhB,CAAsB,QAAO,IAC5B,gBAACgC,EAAA,CAAQ,KAAK,IAAI,KAAK,QAAS,GAAGjC,EAAO,QAAS,GAAO,IAAKI,EAAc,CAC/E,CACD,EACD4B,EAAY,YAAc,eAI1B,IAAME,EAA0B,aAA6D,CAAClC,EAAOI,IACnG,gBAACH,EAAgB,YAAhB,CAA4B,QAAO,IAClC,gBAACkC,EAAA,CAAK,GAAG,IAAI,KAAK,IAAK,GAAGnC,EAAO,QAAS,GAAO,IAAKI,EAAc,CACtE,CACD,EACD8B,EAAkB,YAAc,qBAIhC,IAAME,EAAoB,aAAiD,CAAC,CAAE,SAAAjC,EAAU,GAAGH,CAAM,EAAGI,IAClG,gBAACH,EAAgB,MAAhB,CAAuB,GAAGD,EAAO,IAAKI,EAAc,QAAO,IACzDC,EAAoBF,CAAQ,CAC/B,CACD,EACDiC,EAAY,YAAc",
|
|
6
|
+
"names": ["dialog_exports", "__export", "DialogClose", "DialogContent", "DialogDescription", "DialogRoot", "DialogTitle", "DialogTrigger", "React", "classNames", "DialogPrimitive", "useComposedRefs", "DialogRoot", "props", "DialogPrimitive", "DialogTrigger", "children", "forwardedRef", "requireReactElement", "alignPropDef", "contentPropDefs", "dialogContentPropDefs", "alignPropDefs", "dialogNavigatorHost", "DialogContent", "align", "ownProps", "useThemeSizeProps", "alignClassName", "extractProps", "className", "forceMount", "container", "onCloseAutoFocus", "contentProps", "closeWarningRef", "useCloseWarning", "ref", "useComposedRefs", "useBodyPointerEventsCleanup", "PortalTheme", "classNames", "NavigatorHostContext", "event", "releaseBodyPointerEvents", "DialogTitle", "Heading", "DialogDescription", "Text", "DialogClose"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as p}from"./chunk-FATCGZZE.js";import{a as g}from"./chunk-OBSZOD5M.js";import{a as m,b as c}from"./chunk-3RJVW6RK.js";import{a as l}from"./chunk-TGRHRMQI.js";import{a as D}from"./chunk-FICBVI4M.js";import{a as s}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as p}from"./chunk-FATCGZZE.js";import{a as g}from"./chunk-OBSZOD5M.js";import{a as m,b as c}from"./chunk-3RJVW6RK.js";import{a as l}from"./chunk-TGRHRMQI.js";import{a as D}from"./chunk-FICBVI4M.js";import{a as s}from"./chunk-3ZBEWLSO.js";import{c as n}from"./chunk-5ON3XLRD.js";import{c as a}from"./chunk-OKQAVYW4.js";import{a as O}from"./chunk-VQPANPMI.js";var H={};O(H,{Action:()=>v,Cancel:()=>T,Content:()=>d,Description:()=>R,Root:()=>f,Title:()=>y,Trigger:()=>C});import*as e from"react";import B from"classnames";import{AlertDialog as r}from"radix-ui";var P={...p};var f=t=>e.createElement(r.Root,{...t});f.displayName="AlertDialog.Root";var C=e.forwardRef(({children:t,...o},i)=>e.createElement(r.Trigger,{...o,ref:i,asChild:!0},l(t)));C.displayName="AlertDialog.Trigger";var{align:z,...A}=P,S={align:z},d=e.forwardRef(({align:t,...o},i)=>{let u=n(o,A.size),{className:h}=a({align:t},S),{className:E,forceMount:N,container:x,onCloseAutoFocus:w,...W}=a(u,A);return c(),e.createElement(r.Portal,{container:x,forceMount:N},e.createElement(s,{asChild:!0},e.createElement(r.Overlay,{className:"kui-BaseDialogOverlay kui-AlertDialogOverlay"},e.createElement("div",{className:"kui-BaseDialogScroll kui-AlertDialogScroll"},e.createElement("div",{className:`kui-BaseDialogScrollPadding kui-AlertDialogScrollPadding ${h}`},e.createElement(r.Content,{...W,ref:i,className:B("kui-BaseDialogContent","kui-AlertDialogContent",E),"aria-modal":"true",onCloseAutoFocus:k=>{w?.(k),m()}}))))))});d.displayName="AlertDialog.Content";var y=e.forwardRef((t,o)=>e.createElement(r.Title,{asChild:!0},e.createElement(g,{size:"5",trim:"start",...t,asChild:!1,ref:o})));y.displayName="AlertDialog.Title";var R=e.forwardRef((t,o)=>e.createElement(r.Description,{asChild:!0},e.createElement(D,{as:"p",size:"3",...t,asChild:!1,ref:o})));R.displayName="AlertDialog.Description";var v=e.forwardRef(({children:t,...o},i)=>e.createElement(r.Action,{...o,ref:i,asChild:!0},l(t)));v.displayName="AlertDialog.Action";var T=e.forwardRef(({children:t,...o},i)=>e.createElement(r.Cancel,{...o,ref:i,asChild:!0},l(t)));T.displayName="AlertDialog.Cancel";export{f as a,C as b,d as c,y as d,R as e,v as f,T as g,H as h};
|
|
3
|
+
//# sourceMappingURL=chunk-QPGW6RJG.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as c}from"./chunk-QPRUTOLI.js";import{b as p}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as c}from"./chunk-QPRUTOLI.js";import{b as p}from"./chunk-WJKCXGVN.js";import*as a from"react";import l from"classnames";var i=["xl","lg","md","sm","xs","initial"];function m(e,t,o){if(e==null)return o;if(typeof e!="object")return e;let s=e;for(let r=i.indexOf(t);r<i.length;r++){let n=s[i[r]];if(n!==void 0)return n}return o}function A(e,t){let o=typeof e=="object"&&e!==null,{breakpoint:s}=p(o);return m(e,s,t)}var d={1:8,2:12,3:16,4:24};function B(e){return-(d[e]??d[2])}var u={"\u2318":"Meta",cmd:"Meta",command:"Meta",meta:"Meta","\u2325":"Alt",option:"Alt",opt:"Alt",alt:"Alt","\u21E7":"Shift",shift:"Shift","\u2303":"Control",ctrl:"Control",control:"Control","\u232B":"Backspace","\u2326":"Delete","\u23CE":"Enter","\u21B5":"Enter","\u238B":"Escape",esc:"Escape","\u21E5":"Tab","\u2191":"ArrowUp","\u2193":"ArrowDown","\u2190":"ArrowLeft","\u2192":"ArrowRight"},f=new Map;function k(e){let t=f.get(e);if(t!==void 0)return t||void 0;let r=(e.match(/[⌘⌥⇧⌃]|[^\s+⌘⌥⇧⌃]+/gu)??[]).map(n=>u[n]??u[n.toLowerCase()]??(n.length===1?n.toUpperCase():n)).join("+");return f.set(e,r),r||void 0}function S({shortcut:e,className:t}){return a.createElement("div",{"aria-hidden":!0,className:l("kui-BaseMenuShortcut",t)},a.createElement(c,{size:"1"},e))}export{m as a,A as b,B as c,k as d,S as e};
|
|
3
|
+
//# sourceMappingURL=chunk-REELD6CT.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{b as $}from"./chunk-S66WR5R7.js";import*as t from"react";import{useLayoutEffect as oe}from"radix-ui/internal";import ae from"classnames";var C=t.forwardRef(({className:d,children:m,...h},w)=>{let{containerRef:f,controls:O,cssVarName:H,minSize:E,maxSize:R,defaultSize:M,startSize:G,orientation:v,edge:J,growth:P,onResize:k,onResizeStart:K,onResizeEnd:A,collapsible:W,target:U,requestToggle:D}=$(),g=t.useRef(null),Q=t.useCallback(e=>{g.current=e,typeof w=="function"?w(e):w&&(w.current=e)},[w]),y=t.useRef(null);t.useEffect(()=>()=>{y.current?.(),y.current=null},[]);let z=t.useCallback(()=>{let e=f.current;if(!e)return M;let r=Number.parseFloat(getComputedStyle(e).getPropertyValue(H));return Number.isFinite(r)?r:M},[f,H,M]),N=t.useCallback(()=>{let e=f.current,r=g.current,n=e?.closest(".kui-ShellRoot")?.getBoundingClientRect();if(!e||!n||!r)return R;let c=e.getBoundingClientRect(),p=r.getBoundingClientRect(),s=P(getComputedStyle(e).direction==="rtl"),i;v==="vertical"?i=s>0?n.right-c.left:c.right-n.left:i=s>0?n.bottom-c.top:c.bottom-n.top;let b=v==="vertical"?p.width:p.height;return!(n.width>0&&n.height>0)||!Number.isFinite(i)?R:Math.max(E,Math.min(R,Math.round(i-b)))},[f,P,R,E,v]),Z=()=>{g.current?.setAttribute("aria-valuemax",String(N()))};oe(()=>{g.current?.setAttribute("aria-valuenow",String(Math.round(z())))},[z]);let T=(e,r)=>{e.style.setProperty(H,`${r}px`),g.current?.setAttribute("aria-valuenow",String(Math.round(r)))},_=U.charAt(0).toUpperCase()+U.slice(1);return t.createElement("div",{ref:Q,className:ae("kui-ShellResizer",d),"data-orientation":v,"data-edge":J,role:"separator",tabIndex:0,"aria-label":`Resize ${_} pane`,"aria-controls":O,"aria-orientation":v,"aria-valuenow":Math.round(G),"aria-valuemin":E,"aria-valuemax":R,...h,onPointerDown:e=>{h.onPointerDown?.(e);let r=f.current;if(!r||e.defaultPrevented||e.button!==0)return;e.preventDefault();let n=e.currentTarget,c=e.pointerId;y.current?.();try{n.setPointerCapture(c)}catch{}let p=getComputedStyle(r),s=Number.parseFloat(p.getPropertyValue(H)),i=Number.isFinite(s)?s:M,b=v==="vertical"?e.clientX:e.clientY,ee=P(p.direction==="rtl"),V=N();n.setAttribute("aria-valuemax",String(V));let te=a=>Math.min(Math.max(a,E),V);r.setAttribute("data-resizing",""),n.setAttribute("data-dragging","");let L=document.body,ne=L.style.cursor,re=L.style.userSelect;L.style.cursor=v==="vertical"?"col-resize":"row-resize",L.style.userSelect="none",K?.(i);let x=i,l=0,S=null,j=()=>{if(l=0,S===null)return;let a=S;S=null,k?.(a)},q=null,X=!1,ie=(a,I)=>{if(a.type===I)X=!0;else if(X)return!1;return!0},u=a=>{if(!ie(a,"pointermove")||a===q)return;q=a;let I=v==="vertical"?a.clientX:a.clientY;x=te(i+(I-b)*ee),T(r,x),S=x,l||(l=requestAnimationFrame(j))},F=()=>{l&&cancelAnimationFrame(l),l=0;try{n.releasePointerCapture(c)}catch{}window.removeEventListener("pointermove",u),document.removeEventListener("pointermove",u),window.removeEventListener("mousemove",u),document.removeEventListener("mousemove",u),n.removeEventListener("pointermove",u),window.removeEventListener("pointerup",o),document.removeEventListener("pointerup",o),window.removeEventListener("mouseup",o),document.removeEventListener("mouseup",o),window.removeEventListener("pointercancel",o),document.removeEventListener("pointercancel",o),window.removeEventListener("keydown",Y),n.removeEventListener("lostpointercapture",o),r.removeAttribute("data-resizing"),n.removeAttribute("data-dragging"),L.style.cursor=ne,L.style.userSelect=re,y.current=null},B=!1,o=()=>{B||(B=!0,l&&cancelAnimationFrame(l),j(),A?.(x),F())},Y=a=>{a.key==="Escape"&&(l&&cancelAnimationFrame(l),l=0,S=null,T(r,i),k?.(i),B=!0,A?.(i),F())};window.addEventListener("pointermove",u),document.addEventListener("pointermove",u),window.addEventListener("mousemove",u),document.addEventListener("mousemove",u),n.addEventListener("pointermove",u),window.addEventListener("pointerup",o),document.addEventListener("pointerup",o),window.addEventListener("mouseup",o),document.addEventListener("mouseup",o),window.addEventListener("pointercancel",o),document.addEventListener("pointercancel",o),window.addEventListener("keydown",Y),n.addEventListener("lostpointercapture",o),y.current=F},onDoubleClick:e=>{h.onDoubleClick?.(e),!e.defaultPrevented&&W&&D?.()},onFocus:e=>{h.onFocus?.(e),Z()},onKeyDown:e=>{h.onKeyDown?.(e);let r=f.current;if(!r||e.defaultPrevented)return;if(e.key==="Enter"){W&&D&&(e.preventDefault(),D());return}let n=z(),c=N(),p=i=>Math.min(Math.max(i,E),c),s;if(e.key==="Home")s=p(E);else if(e.key==="End")s=p(c);else{let i=v==="vertical"?e.key==="ArrowRight"?1:e.key==="ArrowLeft"?-1:0:e.key==="ArrowDown"?1:e.key==="ArrowUp"?-1:0;if(i===0)return;let b=e.shiftKey?32:8;s=p(n+i*b*P(getComputedStyle(r).direction==="rtl"))}e.preventDefault(),K?.(n),T(r,s),k?.(s),A?.(s)}},m)});C.displayName="Shell.Handle";var se=t.forwardRef((d,m)=>t.createElement(C,{...d,ref:m}));se.displayName="Shell.Panel.Handle";var le=t.forwardRef((d,m)=>t.createElement(C,{...d,ref:m}));le.displayName="Shell.Sidebar.Handle";var ce=t.forwardRef((d,m)=>t.createElement(C,{...d,ref:m}));ce.displayName="Shell.Inspector.Handle";var ue=t.forwardRef((d,m)=>t.createElement(C,{...d,ref:m}));ue.displayName="Shell.Bottom.Handle";export{C as a,se as b,le as c,ce as d,ue as e};
|
|
3
|
+
//# sourceMappingURL=chunk-RYXIRZQW.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/_internal/shell-handles.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport classNames from 'classnames';\nimport { usePaneResize } from './shell-resize.js';\n\n/**\n * The resize handle: the WAI-ARIA window splitter. `role=\"separator\"` with a\n * value, focusable because it is operable, `aria-controls` naming its pane.\n *\n * A drag writes the size variable directly on the pane and sets no React\n * state, so nothing re-renders per move. `onResize` is called at most once per\n * animation frame, and once more with the final size when the drag ends. The\n * direction and the ceiling are read once, when the drag starts.\n */\nexport const PaneHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(({ className, children, ...props }, ref) => {\n const {\n containerRef,\n controls,\n cssVarName,\n minSize,\n maxSize,\n defaultSize,\n startSize,\n orientation,\n edge,\n growth,\n onResize,\n onResizeStart,\n onResizeEnd,\n collapsible,\n target,\n requestToggle,\n } = usePaneResize();\n\n const handleRef = React.useRef<HTMLDivElement | null>(null);\n const setRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n handleRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n\n const activeCleanupRef = React.useRef<(() => void) | null>(null);\n React.useEffect(\n () => () => {\n activeCleanupRef.current?.();\n activeCleanupRef.current = null;\n },\n [],\n );\n\n /** The pane's size as the stylesheet sees it. Read at the edges of a gesture, never during one. */\n const readSize = React.useCallback(() => {\n const container = containerRef.current;\n if (!container) return defaultSize;\n const parsed = Number.parseFloat(getComputedStyle(container).getPropertyValue(cssVarName));\n return Number.isFinite(parsed) ? parsed : defaultSize;\n }, [containerRef, cssVarName, defaultSize]);\n\n /**\n * The largest size a resize may reach: the stated maximum, and never so\n * large that the handle leaves the frame. The room is measured from the\n * pane's anchored edge, which does not move, to the far edge of the frame,\n * so a pane that starts after a Rail has less room than the frame's width.\n * Without the cap a pane with a generous `maxSize` could be resized until\n * its own handle was off screen.\n */\n const ceiling = React.useCallback(() => {\n const container = containerRef.current;\n const handle = handleRef.current;\n const frame = container?.closest('.kui-ShellRoot')?.getBoundingClientRect();\n if (!container || !frame || !handle) return maxSize;\n const pane = container.getBoundingClientRect();\n const hitBox = handle.getBoundingClientRect();\n const sign = growth(getComputedStyle(container).direction === 'rtl');\n let room: number;\n if (orientation === 'vertical') room = sign > 0 ? frame.right - pane.left : pane.right - frame.left;\n else room = sign > 0 ? frame.bottom - pane.top : pane.bottom - frame.top;\n const hit = orientation === 'vertical' ? hitBox.width : hitBox.height;\n if (!(frame.width > 0 && frame.height > 0) || !Number.isFinite(room)) return maxSize;\n return Math.max(minSize, Math.min(maxSize, Math.round(room - hit)));\n }, [containerRef, growth, maxSize, minSize, orientation]);\n\n // The announced maximum is what a resize can reach now, not only the prop.\n const announceCeiling = () => {\n handleRef.current?.setAttribute('aria-valuemax', String(ceiling()));\n };\n\n // The announced value is seeded from the real size once the pane has a box.\n useLayoutEffect(() => {\n handleRef.current?.setAttribute('aria-valuenow', String(Math.round(readSize())));\n }, [readSize]);\n\n const write = (container: HTMLElement, size: number) => {\n container.style.setProperty(cssVarName, `${size}px`);\n handleRef.current?.setAttribute('aria-valuenow', String(Math.round(size)));\n };\n\n const targetLabel = target.charAt(0).toUpperCase() + target.slice(1);\n\n return (\n // A focusable separator with a value is the WAI-ARIA window splitter, an\n // interactive widget; jsx-a11y classes every separator as static.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n <div\n ref={setRef}\n className={classNames('kui-ShellResizer', className)}\n data-orientation={orientation}\n data-edge={edge}\n role=\"separator\"\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n aria-label={`Resize ${targetLabel} pane`}\n aria-controls={controls}\n aria-orientation={orientation}\n // A focusable separator must state its value. The effects keep it current after mount.\n aria-valuenow={Math.round(startSize)}\n aria-valuemin={minSize}\n aria-valuemax={maxSize}\n {...props}\n onPointerDown={(e) => {\n props.onPointerDown?.(e);\n const container = containerRef.current;\n if (!container || e.defaultPrevented || e.button !== 0) return;\n e.preventDefault();\n const handleEl = e.currentTarget as HTMLElement;\n const pointerId = e.pointerId;\n activeCleanupRef.current?.();\n try {\n handleEl.setPointerCapture(pointerId);\n } catch {\n // Capture can fail for a pointer that is already gone; the window listeners below still carry the drag.\n }\n\n // Everything a move needs is read here, once.\n const startStyle = getComputedStyle(container);\n const parsedStart = Number.parseFloat(startStyle.getPropertyValue(cssVarName));\n const startSize = Number.isFinite(parsedStart) ? parsedStart : defaultSize;\n const startClient = orientation === 'vertical' ? e.clientX : e.clientY;\n const sign = growth(startStyle.direction === 'rtl');\n const cap = ceiling();\n handleEl.setAttribute('aria-valuemax', String(cap));\n const clamp = (v: number) => Math.min(Math.max(v, minSize), cap);\n\n container.setAttribute('data-resizing', '');\n handleEl.setAttribute('data-dragging', '');\n const body = document.body;\n const prevCursor = body.style.cursor;\n const prevUserSelect = body.style.userSelect;\n body.style.cursor = orientation === 'vertical' ? 'col-resize' : 'row-resize';\n body.style.userSelect = 'none';\n onResizeStart?.(startSize);\n\n let current = startSize;\n let frame = 0;\n let pending: number | null = null;\n const flush = () => {\n frame = 0;\n if (pending === null) return;\n const size = pending;\n pending = null;\n onResize?.(size);\n };\n\n // The move handler listens on the handle, the document and the window,\n // so a drag survives environments where pointer events do not reach\n // all three. One movement can therefore arrive several times: once per\n // node it propagates through, and again as the compatibility mouse\n // event. Only the first copy does any work.\n let lastHandledMove: Event | null = null;\n let seenPointerEvent = false;\n const shouldHandle = (ev: Event, pointerType: string) => {\n if (ev.type === pointerType) seenPointerEvent = true;\n else if (seenPointerEvent) return false;\n return true;\n };\n\n const handleMove = (ev: PointerEvent) => {\n if (!shouldHandle(ev, 'pointermove')) return;\n if (ev === lastHandledMove) return;\n lastHandledMove = ev;\n const client = orientation === 'vertical' ? ev.clientX : ev.clientY;\n current = clamp(startSize + (client - startClient) * sign);\n write(container, current);\n pending = current;\n if (!frame) frame = requestAnimationFrame(flush);\n };\n\n const cleanup = () => {\n if (frame) cancelAnimationFrame(frame);\n frame = 0;\n try {\n handleEl.releasePointerCapture(pointerId);\n } catch {\n // Already released.\n }\n window.removeEventListener('pointermove', handleMove as EventListener);\n document.removeEventListener('pointermove', handleMove as EventListener);\n window.removeEventListener('mousemove', handleMove as EventListener);\n document.removeEventListener('mousemove', handleMove as EventListener);\n handleEl.removeEventListener('pointermove', handleMove as EventListener);\n window.removeEventListener('pointerup', handleUp as EventListener);\n document.removeEventListener('pointerup', handleUp as EventListener);\n window.removeEventListener('mouseup', handleUp as EventListener);\n document.removeEventListener('mouseup', handleUp as EventListener);\n window.removeEventListener('pointercancel', handleUp as EventListener);\n document.removeEventListener('pointercancel', handleUp as EventListener);\n window.removeEventListener('keydown', handleKey as EventListener);\n handleEl.removeEventListener('lostpointercapture', handleUp as EventListener);\n container.removeAttribute('data-resizing');\n handleEl.removeAttribute('data-dragging');\n body.style.cursor = prevCursor;\n body.style.userSelect = prevUserSelect;\n activeCleanupRef.current = null;\n };\n\n let finished = false;\n const handleUp = () => {\n if (finished) return;\n finished = true;\n // The last move's size is delivered now rather than on the next frame.\n if (frame) cancelAnimationFrame(frame);\n flush();\n\n onResizeEnd?.(current);\n cleanup();\n };\n\n const handleKey = (kev: KeyboardEvent) => {\n if (kev.key !== 'Escape') return;\n if (frame) cancelAnimationFrame(frame);\n frame = 0;\n pending = null;\n write(container, startSize);\n onResize?.(startSize);\n finished = true;\n onResizeEnd?.(startSize);\n cleanup();\n };\n\n window.addEventListener('pointermove', handleMove as EventListener);\n document.addEventListener('pointermove', handleMove as EventListener);\n window.addEventListener('mousemove', handleMove as EventListener);\n document.addEventListener('mousemove', handleMove as EventListener);\n handleEl.addEventListener('pointermove', handleMove as EventListener);\n window.addEventListener('pointerup', handleUp as EventListener);\n document.addEventListener('pointerup', handleUp as EventListener);\n window.addEventListener('mouseup', handleUp as EventListener);\n document.addEventListener('mouseup', handleUp as EventListener);\n window.addEventListener('pointercancel', handleUp as EventListener);\n document.addEventListener('pointercancel', handleUp as EventListener);\n window.addEventListener('keydown', handleKey as EventListener);\n handleEl.addEventListener('lostpointercapture', handleUp as EventListener);\n activeCleanupRef.current = cleanup;\n }}\n onDoubleClick={(e) => {\n props.onDoubleClick?.(e);\n if (!e.defaultPrevented && collapsible) requestToggle?.();\n }}\n onFocus={(e) => {\n props.onFocus?.(e);\n announceCeiling();\n }}\n onKeyDown={(e) => {\n props.onKeyDown?.(e);\n const container = containerRef.current;\n if (!container || e.defaultPrevented) return;\n // Enter collapses and restores the pane, as a double-click does (WAI-ARIA window splitter).\n if (e.key === 'Enter') {\n if (collapsible && requestToggle) {\n e.preventDefault();\n requestToggle();\n }\n return;\n }\n const current = readSize();\n // The keys reach as far as a drag does: the frame caps both.\n const cap = ceiling();\n const clamp = (v: number) => Math.min(Math.max(v, minSize), cap);\n let next: number | undefined;\n if (e.key === 'Home') next = clamp(minSize);\n else if (e.key === 'End') next = clamp(cap);\n else {\n // The key moves the boundary along its axis; the pane grows or\n // shrinks the way a drag in that direction would, so Bottom's\n // ArrowUp grows it and an end-anchored pane mirrors in RTL.\n const along = orientation === 'vertical' ? (e.key === 'ArrowRight' ? 1 : e.key === 'ArrowLeft' ? -1 : 0) : e.key === 'ArrowDown' ? 1 : e.key === 'ArrowUp' ? -1 : 0;\n if (along === 0) return;\n const step = e.shiftKey ? 32 : 8;\n next = clamp(current + along * step * growth(getComputedStyle(container).direction === 'rtl'));\n }\n e.preventDefault();\n onResizeStart?.(current);\n write(container, next);\n onResize?.(next);\n onResizeEnd?.(next);\n }}\n >\n {children}\n </div>\n );\n});\nPaneHandle.displayName = 'Shell.Handle';\n\nexport const PanelHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nPanelHandle.displayName = 'Shell.Panel.Handle';\n\nexport const SidebarHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nSidebarHandle.displayName = 'Shell.Sidebar.Handle';\n\nexport const InspectorHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nInspectorHandle.displayName = 'Shell.Inspector.Handle';\n\nexport const BottomHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nBottomHandle.displayName = 'Shell.Bottom.Handle';\n"],
|
|
5
|
+
"mappings": ";wCAAA,UAAYA,MAAW,QACvB,OAAS,mBAAAC,OAAuB,oBAChC,OAAOC,OAAgB,aAYhB,IAAMC,EAAmB,aAAkE,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,CAAM,EAAGC,IAAQ,CAC5I,GAAM,CACJ,aAAAC,EACA,SAAAC,EACA,WAAAC,EACA,QAAAC,EACA,QAAAC,EACA,YAAAC,EACA,UAAAC,EACA,YAAAC,EACA,KAAAC,EACA,OAAAC,EACA,SAAAC,EACA,cAAAC,EACA,YAAAC,EACA,YAAAC,EACA,OAAAC,EACA,cAAAC,CACF,EAAIC,EAAc,EAEZC,EA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ACpB,GAECnE,CACH,CAEJ,CAAC,EACDF,EAAW,YAAc,eAElB,IAAMwE,GAAoB,aAAkE,CAACrE,EAAOC,IAAQ,gBAACJ,EAAA,CAAY,GAAGG,EAAO,IAAKC,EAAK,CAAE,EACtJoE,GAAY,YAAc,qBAEnB,IAAMC,GAAsB,aAAkE,CAACtE,EAAOC,IAAQ,gBAACJ,EAAA,CAAY,GAAGG,EAAO,IAAKC,EAAK,CAAE,EACxJqE,GAAc,YAAc,uBAErB,IAAMC,GAAwB,aAAkE,CAACvE,EAAOC,IAAQ,gBAACJ,EAAA,CAAY,GAAGG,EAAO,IAAKC,EAAK,CAAE,EAC1JsE,GAAgB,YAAc,yBAEvB,IAAMC,GAAqB,aAAkE,CAACxE,EAAOC,IAAQ,gBAACJ,EAAA,CAAY,GAAGG,EAAO,IAAKC,EAAK,CAAE,EACvJuE,GAAa,YAAc",
|
|
6
|
+
"names": ["React", "useLayoutEffect", "classNames", "PaneHandle", "className", "children", "props", "ref", "containerRef", "controls", "cssVarName", "minSize", "maxSize", "defaultSize", "startSize", "orientation", "edge", "growth", "onResize", "onResizeStart", "onResizeEnd", "collapsible", "target", "requestToggle", "usePaneResize", "handleRef", "setRef", "node", "activeCleanupRef", "readSize", "container", "parsed", "ceiling", "handle", "frame", "pane", "hitBox", "sign", "room", "hit", "announceCeiling", "useLayoutEffect", "write", "size", "targetLabel", "classNames", "handleEl", "pointerId", "startStyle", "parsedStart", "startClient", "cap", "clamp", "v", "body", "prevCursor", "prevUserSelect", "current", "pending", "flush", "lastHandledMove", "seenPointerEvent", "shouldHandle", "ev", "pointerType", "handleMove", "client", "cleanup", "handleUp", "handleKey", "finished", "kev", "next", "along", "step", "PanelHandle", "SidebarHandle", "InspectorHandle", "BottomHandle"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/_internal/shell-resize.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport type { PaneName } from '../shell.types.js';\n\nexport interface PaneResizeContextValue {\n containerRef: React.RefObject<HTMLElement | null>;\n /** The pane the handle resizes, for `aria-controls`. */\n controls: string;\n cssVarName: string;\n minSize: number;\n maxSize: number;\n defaultSize: number;\n /** The size the pane starts at, for the handle's first `aria-valuenow`. */\n startSize: number;\n orientation: 'vertical' | 'horizontal';\n edge: 'start' | 'end';\n /**\n * +1 when moving the pointer toward the end of its axis grows the pane, -1\n * when it shrinks it. Read once when a drag starts, with the pane's\n * resolved direction, so no move pays for a style read.\n */\n growth: (isRtl: boolean) => 1 | -1;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n target: PaneName;\n collapsible: boolean;\n
|
|
5
|
-
"mappings": ";AAAA,UAAYA,MAAW,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport type { PaneName } from '../shell.types.js';\n\nexport interface PaneResizeContextValue {\n containerRef: React.RefObject<HTMLElement | null>;\n /** The pane the handle resizes, for `aria-controls`. */\n controls: string;\n cssVarName: string;\n minSize: number;\n maxSize: number;\n defaultSize: number;\n /** The size the pane starts at, for the handle's first `aria-valuenow`. */\n startSize: number;\n orientation: 'vertical' | 'horizontal';\n edge: 'start' | 'end';\n /**\n * +1 when moving the pointer toward the end of its axis grows the pane, -1\n * when it shrinks it. Read once when a drag starts, with the pane's\n * resolved direction, so no move pays for a style read.\n */\n growth: (isRtl: boolean) => 1 | -1;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n target: PaneName;\n collapsible: boolean;\n requestToggle?: () => void;\n}\n\nexport const PaneResizeContext = React.createContext<PaneResizeContextValue | null>(null);\n\nexport function usePaneResize() {\n const ctx = React.useContext(PaneResizeContext);\n if (!ctx) throw new Error('Shell.Handle must be used within a resizable pane');\n return ctx;\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,UAAYA,MAAW,QA6BhB,IAAMC,EAA0B,gBAA6C,IAAI,EAEjF,SAASC,GAAgB,CAC9B,IAAMC,EAAY,aAAWF,CAAiB,EAC9C,GAAI,CAACE,EAAK,MAAM,IAAI,MAAM,mDAAmD,EAC7E,OAAOA,CACT",
|
|
6
6
|
"names": ["React", "PaneResizeContext", "usePaneResize", "ctx"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{h as a,j as r}from"./chunk-LBAC2X4U.js";import*as d from"react";var n=e=>e===void 0?void 0:e==="closed"?"collapsed":"expanded",l=e=>e==="collapsed"?"closed":"open";function c(){let e=r("useSidebarMode"),s=d.useCallback(o=>a(e,o),[e]),t=d.useSyncExternalStore(s,()=>e.entries.get("sidebar")?.value,()=>{}),i=d.useCallback(o=>{e.entries.get("sidebar")?.setValue(l(o),"toggle")},[e]);return{sidebarMode:n(t)??"expanded",setSidebarMode:i}}export{c as a};
|
|
3
|
+
//# sourceMappingURL=chunk-SECVO3CW.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/shell.context.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\n/**\n * The Shell has two contexts: the pane registry (the store) and the set of panes off the frame.\n * They live in `_internal/shell-store.tsx`. This module keeps the hook consumers can reach:\n * `useSidebarMode`.\n */\nimport * as React from 'react';\nimport type { SidebarMode } from './shell.types.js';\nimport { subscribeShellStore, useShellStore, type PaneValue } from './_internal/shell-store.js';\n\nconst toSidebarMode = (value: PaneValue | undefined): SidebarMode | undefined => (value === undefined ? undefined : value === 'closed' ? 'collapsed' : 'expanded');\n\nconst fromSidebarMode = (mode: SidebarMode): PaneValue => (mode === 'collapsed' ? 'closed' : 'open');\n\n/**\n * The Sidebar's mode, and a setter. The setter is a user action: it reports\n * through the Sidebar's `onStateChange` the way a Trigger does.\n */\nexport function useSidebarMode(): { sidebarMode: SidebarMode; setSidebarMode: (mode: SidebarMode) => void } {\n const store = useShellStore('useSidebarMode');\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n const value = React.useSyncExternalStore(\n subscribe,\n () => store.entries.get('sidebar')?.value,\n () => undefined,\n );\n const setSidebarMode = React.useCallback(\n (mode: SidebarMode) => {\n store.entries.get('sidebar')?.setValue(fromSidebarMode(mode), 'toggle');\n },\n [store],\n );\n return { sidebarMode: toSidebarMode(value) ?? 'expanded', setSidebarMode };\n}\n"],
|
|
5
|
+
"mappings": ";+CAOA,UAAYA,MAAW,QAIvB,IAAMC,EAAiBC,GAA2DA,IAAU,OAAY,OAAYA,IAAU,SAAW,YAAc,WAEjJC,EAAmBC,GAAkCA,IAAS,YAAc,SAAW,OAMtF,SAASC,GAA4F,CAC1G,IAAMC,EAAQC,EAAc,gBAAgB,EACtCC,EAAkB,cAAaC,GAAyBC,EAAoBJ,EAAOG,CAAQ,EAAG,CAACH,CAAK,CAAC,EACrGJ,EAAc,uBAClBM,EACA,IAAMF,EAAM,QAAQ,IAAI,SAAS,GAAG,MACpC,IAAG,EACL,EACMK,EAAuB,cAC1BP,GAAsB,CACrBE,EAAM,QAAQ,IAAI,SAAS,GAAG,SAASH,EAAgBC,CAAI,EAAG,QAAQ,CACxE,EACA,CAACE,CAAK,CACR,EACA,MAAO,CAAE,YAAaL,EAAcC,CAAK,GAAK,WAAY,eAAAS,CAAe,CAC3E",
|
|
6
|
+
"names": ["React", "toSidebarMode", "value", "fromSidebarMode", "mode", "useSidebarMode", "store", "useShellStore", "subscribe", "listener", "subscribeShellStore", "setSidebarMode"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function t(e){if(e===void 0)return;if(typeof e=="boolean")return e?"open":"closed";let o={};for(let[a,n]of Object.entries(e))typeof n=="boolean"&&(o[a]=n?"open":"closed");return o}var r=e=>e==="overlay"?"closed":"open",l=()=>"closed",i=e=>e?-1:1,d=e=>e?1:-1,p=()=>-1;export{t as a,r as b,l as c,i as d,d as e,p as f};
|
|
3
|
+
//# sourceMappingURL=chunk-SHDZYFUN.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/_internal/shell-rest.ts"],
|
|
4
|
+
"sourcesContent": ["import type { Breakpoint, PresentationValue } from '../shell.types.js';\nimport type { PaneValue } from './shell-store.js';\n\ntype ResponsiveBoolean = boolean | Partial<Record<Breakpoint, boolean>>;\n\n/** `open`/`defaultOpen` as the pane's own value type. */\nexport function toPaneValue(value: boolean | undefined): PaneValue | undefined;\nexport function toPaneValue(value: ResponsiveBoolean | undefined): PaneValue | Partial<Record<Breakpoint, PaneValue>> | undefined;\nexport function toPaneValue(value: ResponsiveBoolean | undefined): PaneValue | Partial<Record<Breakpoint, PaneValue>> | undefined {\n if (value === undefined) return undefined;\n if (typeof value === 'boolean') return value ? 'open' : 'closed';\n const map: Partial<Record<Breakpoint, PaneValue>> = {};\n for (const [bp, open] of Object.entries(value) as Array<[Breakpoint, boolean | undefined]>) {\n if (typeof open === 'boolean') map[bp] = open ? 'open' : 'closed';\n }\n return map;\n}\n\n/**\n * Where an untouched navigation column rests: open in the frame or stacked\n * over it, closed where it would be an overlay. An overlay is summoned,\n * never ambient.\n */\nexport const navigationRest = (presentation: PresentationValue): PaneValue => (presentation === 'overlay' ? 'closed' : 'open');\n\n/** Where an untouched detail pane rests: closed. Detail is asked for. */\nexport const detailRest = (): PaneValue => 'closed';\n\n/** A pane anchored at the inline start grows as its end edge moves toward the inline end. */\nexport const startAnchoredGrowth = (isRtl: boolean): 1 | -1 => (isRtl ? -1 : 1);\n\n/** A pane anchored at the inline end grows as its start edge moves toward the inline start. */\nexport const endAnchoredGrowth = (isRtl: boolean): 1 | -1 => (isRtl ? 1 : -1);\n\n/** A pane anchored at the block end grows as its top edge moves up. */\nexport const bottomAnchoredGrowth = (): 1 | -1 => -1;\n"],
|
|
5
|
+
"mappings": ";AAQO,SAASA,EAAYC,EAAsG,CAChI,GAAIA,IAAU,OAAW,OACzB,GAAI,OAAOA,GAAU,UAAW,OAAOA,EAAQ,OAAS,SACxD,IAAMC,EAA8C,CAAC,EACrD,OAAW,CAACC,EAAIC,CAAI,IAAK,OAAO,QAAQH,CAAK,EACvC,OAAOG,GAAS,YAAWF,EAAIC,CAAE,EAAIC,EAAO,OAAS,UAE3D,OAAOF,CACT,CAOO,IAAMG,EAAkBC,GAAgDA,IAAiB,UAAY,SAAW,OAG1GC,EAAa,IAAiB,SAG9BC,EAAuBC,GAA4BA,EAAQ,GAAK,EAGhEC,EAAqBD,GAA4BA,EAAQ,EAAI,GAG7DE,EAAuB,IAAc",
|
|
6
|
+
"names": ["toPaneValue", "value", "map", "bp", "open", "navigationRest", "presentation", "detailRest", "startAnchoredGrowth", "isRtl", "endAnchoredGrowth", "bottomAnchoredGrowth"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as h,e as P,f,g as l}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as h,e as P,f,g as l}from"./chunk-U7P64MXD.js";import{a as R}from"./chunk-4KIZRO52.js";import{a as G}from"./chunk-FICBVI4M.js";import{b as a}from"./chunk-GKDGNPBD.js";import{b as n}from"./chunk-5ON3XLRD.js";import{c as b}from"./chunk-OKQAVYW4.js";import{a as k}from"./chunk-CLJ6SEGP.js";import{a as S}from"./chunk-VQPANPMI.js";var T={};S(T,{Item:()=>N,Root:()=>v});import*as o from"react";import u from"classnames";import{Context as _}from"radix-ui/internal";var x={...k,...R};var I="CheckboxGroup",[z]=_.createContextScope(I,[h]),d=h(),[D,y]=z(I),v=o.forwardRef(({color:s=x.color.default,size:e,...t},r)=>{let p=n(e,x.size),{__scopeCheckboxGroup:c,className:m,...i}=t,E=d(c);return o.createElement(D,{scope:c,color:s,size:p},o.createElement(P,{...E,...i,ref:r,className:u("kui-CheckboxGroupRoot",m)}))});v.displayName="CheckboxGroup.Root";var N=o.forwardRef((s,e)=>{let{__scopeCheckboxGroup:t,children:r,className:p,style:c,...m}=s,{size:i}=y("CheckboxGroupItem",t);return r?o.createElement(G,{as:"label",size:i,className:u("kui-CheckboxGroupItem",p),style:c},o.createElement(C,{__scopeCheckboxGroup:t,...m,ref:e}),r&&o.createElement("span",{className:"kui-CheckboxGroupItemInner"},r)):o.createElement(C,{__scopeCheckboxGroup:t,...m,ref:e,className:p,style:c})});N.displayName="CheckboxGroup.Item";var C=o.forwardRef(({__scopeCheckboxGroup:s,...e},t)=>{let r=y("CheckboxGroupItemCheckbox",s),p=d(s),{color:c,className:m}=b({...e,...r},x);return o.createElement(f,{...p,"data-accent-color":c,...e,ref:t,className:u("kui-reset","kui-BaseCheckboxRoot","kui-CheckboxGroupItemCheckbox",m)},o.createElement(l,{...p,asChild:!0,className:"kui-BaseCheckboxIndicator"},o.createElement(a,null)))});C.displayName="CheckboxGroup.ItemCheckbox";export{v as a,N as b,T as c};
|
|
3
|
+
//# sourceMappingURL=chunk-TCFBNE6A.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import*as e from"react";import{Checkbox as s,Direction as E}from"radix-ui";import{Context as S,Primitive as _,useControllableState as V}from"radix-ui/internal";var{useDirection:q}=E,b="CheckboxGroup",[N,O]=S.createContextScope(b,[s.createCheckboxScope]),x=s.createCheckboxScope(),[D,U]=N(b),m=e.forwardRef((t,n)=>{let{__scopeCheckboxGroup:r,name:i,defaultValue:c,value:o,required:u=!1,disabled:p=!1,dir:C,onValueChange:d,...h}=t,G=q(C),[I=[],a]=V({prop:o,defaultProp:c??[],onChange:d}),R=e.useCallback(l=>a((k=[])=>[...k,l]),[a]),y=e.useCallback(l=>a((k=[])=>k.filter(g=>g!==l)),[a]);return e.createElement(D,{scope:r,name:i,required:u,disabled:p,value:I,onItemCheck:R,onItemUncheck:y},e.createElement(_.div,{role:"group","data-disabled":p?"":void 0,dir:G,...h,ref:n}))});m.displayName=b;var P="CheckboxGroupItem",f=e.forwardRef((t,n)=>{let{__scopeCheckboxGroup:r,disabled:i,...c}=t,o=U(P,r),u=o.disabled||i,p=x(r),C=o.value?.includes(c.value),d=o.required&&(o.value?.length??0)===0;return e.createElement(s.Root,{name:o.name,disabled:u,required:d,checked:C,...p,...c,ref:n,onCheckedChange:h=>{h?o.onItemCheck(t.value):o.onItemUncheck(t.value)}})});f.displayName=P;var W="CheckboxGroupIndicator",v=e.forwardRef((t,n)=>{let{__scopeCheckboxGroup:r,...i}=t,c=x(r);return e.createElement(s.Indicator,{...c,...i,ref:n})});v.displayName=W;var w=m,T=f,B=v;export{O as a,m as b,f as c,v as d,w as e,T as f,B as g};
|
|
3
|
+
//# sourceMappingURL=chunk-U7P64MXD.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/checkbox-group.primitive.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport { Checkbox as CheckboxPrimitive, Direction } from 'radix-ui';\nimport { Context, Primitive, useControllableState } from 'radix-ui/internal';\n\nconst { useDirection } = Direction;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroup\n * -----------------------------------------------------------------------------------------------*/\nconst CHECKBOX_GROUP_NAME = 'CheckboxGroup';\n\ntype ScopedProps<P> = P & { __scopeCheckboxGroup?: Context.Scope };\nconst [createCheckboxGroupContext, createCheckboxGroupScope] = Context.createContextScope(\n CHECKBOX_GROUP_NAME,\n [CheckboxPrimitive.createCheckboxScope],\n);\nconst useCheckboxScope = CheckboxPrimitive.createCheckboxScope();\n\ntype CheckboxGroupContextValue = {\n name?: string;\n required: boolean;\n disabled: boolean;\n value?: string[];\n onItemCheck(value: string): void;\n onItemUncheck(value: string): void;\n};\n\nconst [CheckboxGroupProvider, useCheckboxGroupContext] =\n createCheckboxGroupContext<CheckboxGroupContextValue>(CHECKBOX_GROUP_NAME);\n\ntype CheckboxGroupElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface CheckboxGroupProps extends PrimitiveDivProps {\n name?: CheckboxGroupContextValue['name'];\n required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];\n disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];\n dir?: 'ltr' | 'rtl';\n defaultValue?: string[];\n value?: CheckboxGroupContextValue['value'];\n onValueChange?: (value: string[]) => void;\n}\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n (props: ScopedProps<CheckboxGroupProps>, forwardedRef) => {\n const {\n __scopeCheckboxGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n dir,\n onValueChange,\n ...groupProps\n } = props;\n const direction = useDirection(dir);\n const [value = [], setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n });\n\n const handleItemCheck = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue],\n );\n\n const handleItemUncheck = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter((value) => value !== itemValue)),\n [setValue],\n );\n\n return (\n <CheckboxGroupProvider\n scope={__scopeCheckboxGroup}\n name={name}\n required={required}\n disabled={disabled}\n value={value}\n onItemCheck={handleItemCheck}\n onItemUncheck={handleItemUncheck}\n >\n <Primitive.div\n role=\"group\"\n data-disabled={disabled ? '' : undefined}\n dir={direction}\n {...groupProps}\n ref={forwardedRef}\n />\n </CheckboxGroupProvider>\n );\n },\n);\n\nCheckboxGroup.displayName = CHECKBOX_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'CheckboxGroupItem';\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\ninterface CheckboxGroupItemProps\n extends Omit<CheckboxProps, 'checked' | 'defaultChecked' | 'onCheckedChange' | 'name'> {\n value: string;\n}\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n (props: ScopedProps<CheckboxGroupItemProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, disabled, ...itemProps } = props;\n const context = useCheckboxGroupContext(ITEM_NAME, __scopeCheckboxGroup);\n const isDisabled = context.disabled || disabled;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n const checked = context.value?.includes(itemProps.value);\n // A required group needs at least one box checked, not every box: the items are\n // required only while none is checked.\n const isRequired = context.required && (context.value?.length ?? 0) === 0;\n\n return (\n <CheckboxPrimitive.Root\n name={context.name}\n disabled={isDisabled}\n required={isRequired}\n checked={checked}\n {...checkboxScope}\n {...itemProps}\n ref={forwardedRef}\n onCheckedChange={(checked) => {\n if (checked) {\n context.onItemCheck(props.value);\n } else {\n context.onItemUncheck(props.value);\n }\n }}\n />\n );\n },\n);\n\nCheckboxGroupItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'CheckboxGroupIndicator';\n\ntype CheckboxGroupIndicatorElement = React.ElementRef<typeof CheckboxPrimitive.Indicator>;\ntype CheckboxIndicatorProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Indicator>;\ninterface CheckboxGroupIndicatorProps extends CheckboxIndicatorProps {}\n\nconst CheckboxGroupIndicator = React.forwardRef<\n CheckboxGroupIndicatorElement,\n CheckboxGroupIndicatorProps\n>((props: ScopedProps<CheckboxGroupIndicatorProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, ...indicatorProps } = props;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n return <CheckboxPrimitive.Indicator {...checkboxScope} {...indicatorProps} ref={forwardedRef} />;\n});\n\nCheckboxGroupIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = CheckboxGroup;\nconst Item = CheckboxGroupItem;\nconst Indicator = CheckboxGroupIndicator;\n\nexport {\n createCheckboxGroupScope,\n //\n CheckboxGroup,\n CheckboxGroupItem,\n CheckboxGroupIndicator,\n //\n Root,\n Item,\n Indicator,\n};\nexport type { CheckboxGroupProps, CheckboxGroupItemProps, CheckboxGroupIndicatorProps };\n"],
|
|
5
|
+
"mappings": ";AAEA,UAAYA,MAAW,QACvB,OAAS,YAAYC,EAAmB,aAAAC,MAAiB,WACzD,OAAS,WAAAC,EAAS,aAAAC,EAAW,wBAAAC,MAA4B,oBAEzD,GAAM,CAAE,aAAAC,CAAa,EAAIJ,EAKnBK,EAAsB,gBAGtB,CAACC,EAA4BC,CAAwB,EAAIN,EAAQ,mBACrEI,EACA,CAACN,EAAkB,mBAAmB,CACxC,EACMS,EAAmBT,EAAkB,oBAAoB,EAWzD,CAACU,EAAuBC,CAAuB,EACnDJ,EAAsDD,CAAmB,EAcrEM,EAAsB,aAC1B,CAACC,EAAwCC,IAAiB,CACxD,GAAM,CACJ,qBAAAC,EACA,KAAAC,EACA,aAAAC,EACA,MAAOC,EACP,SAAAC,EAAW,GACX,SAAAC,EAAW,GACX,IAAAC,EACA,cAAAC,EACA,GAAGC,CACL,EAAIV,EACEW,EAAYnB,EAAagB,CAAG,EAC5B,CAACI,EAAQ,CAAC,EAAGC,CAAQ,EAAItB,EAAqB,CAClD,KAAMc,EACN,YAAaD,GAAgB,CAAC,EAC9B,SAAUK,CACZ,CAAC,EAEKK,EAAwB,cAC3BC,GAAsBF,EAAS,CAACG,EAAY,CAAC,IAAM,CAAC,GAAGA,EAAWD,CAAS,CAAC,EAC7E,CAACF,CAAQ,CACX,EAEMI,EAA0B,cAC7BF,GACCF,EAAS,CAACG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AAuB,YAAcD,EAIrC,IAAMG,EAAO9B,EACP+B,EAAOX,EACPY,EAAYJ",
|
|
6
|
+
"names": ["React", "CheckboxPrimitive", "Direction", "Context", "Primitive", "useControllableState", "useDirection", "CHECKBOX_GROUP_NAME", "createCheckboxGroupContext", "createCheckboxGroupScope", "useCheckboxScope", "CheckboxGroupProvider", "useCheckboxGroupContext", "CheckboxGroup", "props", "forwardedRef", "__scopeCheckboxGroup", "name", "defaultValue", "valueProp", "required", "disabled", "dir", "onValueChange", "groupProps", "direction", "value", "setValue", "handleItemCheck", "itemValue", "prevValue", "handleItemUncheck", "ITEM_NAME", "CheckboxGroupItem", "itemProps", "context", "isDisabled", "checkboxScope", "checked", "isRequired", "INDICATOR_NAME", "CheckboxGroupIndicator", "indicatorProps", "Root", "Item", "Indicator"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as N,b as D}from"./chunk-WJKCXGVN.js";import{a as v,b as P,c as T,d as k,g as x,j}from"./chunk-LBAC2X4U.js";import*as t from"react";import{useLayoutEffect as E}from"radix-ui/internal";var A=e=>typeof e=="object"&&e!==null;function Y(e){let{name:o,label:u,propNames:a,presentationTable:l,builtIn:O}=e,r=j(`Shell.${u}`),K=t.useId(),m=e.id??`shell-${o}${K}`,i=e.controlled!==void 0,S=A(e.defaultValue)?e.defaultValue:void 0,U=k(S),[_,q]=t.useState(()=>typeof e.defaultValue=="string"?e.defaultValue:"auto"),f=t.useMemo(()=>v(S,n=>O(l[n])),[U,l,O]),s=_;e.controlled!==void 0&&(s=e.controlled);let F=P(l)===void 0||s==="auto"&&P(f)===void 0,{breakpoint:w,ready:$}=D(F),B=n=>{let c=P(n);return c!==void 0?c:$?n[w]:void 0},d=s==="auto"?B(f):s,R=B(l),M=R==="overlay",I=d===void 0?void 0:d!=="closed",y=I===!0&&M,z=e.defaultValue,p=t.useRef({state:s,value:d,autoTable:f,defaultValue:z,controlled:i,onChange:e.onChange,toggleNext:e.toggleNext});E(()=>{p.current={state:s,value:d,autoTable:f,defaultValue:z,controlled:i,onChange:e.onChange,toggleNext:e.toggleNext}});let b=t.useCallback(()=>{let n=p.current;return n.value!==void 0?n.value:n.state==="auto"?n.autoTable[N()]:void 0},[]),h=t.useCallback(()=>{let n=p.current;return typeof n.defaultValue=="string"?n.defaultValue:A(n.defaultValue)?n.autoTable[N()]:void 0},[]),g=t.useCallback((n,c)=>{let V=p.current;b()!==n&&(V.onChange?.(n,c),V.controlled||q(n))},[b]),C=t.useCallback(n=>{let c=p.current,V=b()??"closed",J=c.toggleNext?c.toggleNext(V,h()):V==="closed"?"open":"closed";g(J,n)},[g,b,h]),H=t.useRef(null),G=t.useCallback(n=>{H.current=n},[]);E(()=>{let n={name:o,id:m,el:H.current,value:d,presentation:R,presentationTable:l,overlayLive:y,size:e.size,setValue:g,toggle:C};return r.entries.set(o,n),x(r),()=>{r.entries.get(o)===n&&(r.entries.delete(o),x(r))}},[r,o,m,d,R,l,y,e.size,g,C]),E(()=>{},[]);let L=t.useRef(i);return t.useEffect(()=>{},[i,u,a.controlled]),{store:r,id:m,state:s,value:d,shown:I,presentation:R,overlaying:M,overlayLive:y,ready:$,breakpoint:w,autoTable:f,setValue:g,toggle:C,defaultHereNow:h,setElement:G}}function Z(e,o){let{state:u,value:a,presentation:l}=e;return{...o,"data-state":u,...u==="auto"?T("auto",e.autoTable):{},"data-presentation":l,"data-mode":a===void 0?void 0:a==="closed"?"collapsed":"expanded"}}function ee(e,o){let u=k(e),a=t.useMemo(()=>v(e,()=>o),[u,o]),l=t.useMemo(()=>P(a)===void 0?T("presentation",a):{},[a]);return{table:a,attributes:l}}export{Y as a,Z as b,ee as c};
|
|
3
|
+
//# sourceMappingURL=chunk-UFYQC5XY.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/_internal/shell-pane.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport { readBreakpoint, useBreakpoint } from '../../hooks/use-breakpoint.js';\nimport type { Breakpoint, PaneName, PresentationValue } from '../shell.types.js';\nimport {\n constantOf,\n notifyShellStore,\n tableAttributes,\n tableOf,\n useShellStore,\n useStableKey,\n type OpenChangeReason,\n type PaneEntry,\n type PaneValue,\n type Table,\n} from './shell-store.js';\n\ntype ResponsiveValue = PaneValue | Partial<Record<Breakpoint, PaneValue>>;\n\nexport type UsePaneOptions = {\n name: PaneName;\n /** The component's display name, for warnings: `Inspector`, `Sidebar`, \u2026 */\n label: string;\n /** The prop names a warning should use: `open`/`defaultOpen`, or `state`/`defaultState`. */\n propNames: { controlled: string; default: string };\n id: string | undefined;\n /** The controlled value. */\n controlled: PaneValue | undefined;\n /**\n * The uncontrolled default. A single value fixes where the pane starts. A\n * responsive object leaves the pane untouched (`auto`), with that object as\n * what it shows at each breakpoint.\n */\n defaultValue: ResponsiveValue | undefined;\n /** The pane's presentation at every breakpoint. Pass a memoised table. */\n presentationTable: Table<PresentationValue>;\n /** What an untouched pane shows where no default says otherwise. Pass a module-level function. */\n builtIn: (presentation: PresentationValue) => PaneValue;\n /** Reports a change a user made. Never called on mount or on a resize. */\n onChange: ((value: PaneValue, reason: OpenChangeReason) => void) | undefined;\n /** The value a toggle moves to. Defaults to open and closed in turn. */\n toggleNext?: (current: PaneValue, defaultHere: PaneValue | undefined) => PaneValue;\n /** The pane's designed open width, published for the panes beside it. */\n size: number;\n};\n\nexport type PaneController = ReturnType<typeof usePane>;\n\nconst isMap = (value: ResponsiveValue | undefined): value is Partial<Record<Breakpoint, PaneValue>> => typeof value === 'object' && value !== null;\n\n/** Everything the togglable panes share: their state, their registry entry and their callbacks. */\nexport function usePane(options: UsePaneOptions) {\n const { name, label, propNames, presentationTable, builtIn } = options;\n const store = useShellStore(`Shell.${label}`);\n const generatedId = React.useId();\n const id = options.id ?? `shell-${name}${generatedId}`;\n\n const controlled = options.controlled !== undefined;\n const autoSource = isMap(options.defaultValue) ? options.defaultValue : undefined;\n const autoKey = useStableKey(autoSource);\n const [inner, setInner] = React.useState<'auto' | PaneValue>(() => (typeof options.defaultValue === 'string' ? options.defaultValue : 'auto'));\n\n // What an untouched pane shows at each breakpoint: a responsive default\n // where it states one, the pane's own default where it does not.\n const autoTable = React.useMemo(\n () => tableOf<PaneValue>(autoSource, (bp) => builtIn(presentationTable[bp])),\n // `autoKey` stands for the responsive object, which is usually a new literal each render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [autoKey, presentationTable, builtIn],\n );\n\n let state: 'auto' | PaneValue = inner;\n if (options.controlled !== undefined) state = options.controlled;\n\n // Only a pane whose answer depends on the window subscribes to it, so a\n // pane with one presentation and one default never re-renders on a resize.\n const needsBreakpoint = constantOf(presentationTable) === undefined || (state === 'auto' && constantOf(autoTable) === undefined);\n const { breakpoint, ready } = useBreakpoint(needsBreakpoint);\n\n /** A table's value now: known without the window when it holds one value, else once the breakpoint is known. */\n const now = <T,>(table: Table<T>): T | undefined => {\n const constant = constantOf(table);\n if (constant !== undefined) return constant;\n return ready ? table[breakpoint] : undefined;\n };\n\n const value: PaneValue | undefined = state === 'auto' ? now(autoTable) : state;\n const presentation = now(presentationTable);\n const overlaying = presentation === 'overlay';\n const shown = value === undefined ? undefined : value !== 'closed';\n const overlayLive = shown === true && overlaying;\n\n // Stable actions over the latest values, so the registry entry changes only\n // when a fact it carries changes.\n const defaultValue = options.defaultValue;\n const latest = React.useRef({ state, value, autoTable, defaultValue, controlled, onChange: options.onChange, toggleNext: options.toggleNext });\n useLayoutEffect(() => {\n latest.current = { state, value, autoTable, defaultValue, controlled, onChange: options.onChange, toggleNext: options.toggleNext };\n });\n\n /**\n * What the pane shows, and its default, at the window's breakpoint right\n * now. Asked at the moment of an action rather than taken from the last\n * render: a touched pane no longer follows the window, and a click can land\n * before the mirror has resolved after hydration.\n */\n const valueNow = React.useCallback((): PaneValue | undefined => {\n const current = latest.current;\n if (current.value !== undefined) return current.value;\n return current.state === 'auto' ? current.autoTable[readBreakpoint()] : undefined;\n }, []);\n const defaultHereNow = React.useCallback((): PaneValue | undefined => {\n const current = latest.current;\n if (typeof current.defaultValue === 'string') return current.defaultValue;\n return isMap(current.defaultValue) ? current.autoTable[readBreakpoint()] : undefined;\n }, []);\n\n const setValue = React.useCallback(\n (next: PaneValue, reason: OpenChangeReason) => {\n const current = latest.current;\n if (valueNow() === next) return;\n current.onChange?.(next, reason);\n if (!current.controlled) setInner(next);\n },\n [valueNow],\n );\n\n const toggle = React.useCallback(\n (reason: OpenChangeReason) => {\n const current = latest.current;\n const from = valueNow() ?? 'closed';\n const next = current.toggleNext ? current.toggleNext(from, defaultHereNow()) : from === 'closed' ? 'open' : 'closed';\n setValue(next, reason);\n },\n [setValue, valueNow, defaultHereNow],\n );\n\n // The pane's element, for the Root's containment and focus.\n const elementRef = React.useRef<HTMLElement | null>(null);\n const setElement = React.useCallback((node: HTMLElement | null) => {\n elementRef.current = node;\n }, []);\n\n // Registration. A layout effect so a Trigger's aria attributes and the\n // Root's containment are right before the browser paints.\n useLayoutEffect(() => {\n const entry: PaneEntry = {\n name,\n id,\n el: elementRef.current,\n value,\n presentation,\n presentationTable,\n overlayLive,\n size: options.size,\n setValue,\n toggle,\n };\n store.entries.set(name, entry);\n notifyShellStore(store);\n return () => {\n if (store.entries.get(name) === entry) {\n store.entries.delete(name);\n notifyShellStore(store);\n }\n };\n }, [store, name, id, value, presentation, presentationTable, overlayLive, options.size, setValue, toggle]);\n\n // Development guards. Once per mount, not once per render.\n useLayoutEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (options.controlled !== undefined && options.defaultValue !== undefined) {\n console.error(`Shell.${label}: Do not pass both \\`${propNames.controlled}\\` and \\`${propNames.default}\\`. Choose one.`);\n }\n // Mount only: this is the once-per-mount guard.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const wasControlled = React.useRef(controlled);\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (wasControlled.current !== controlled) {\n console.warn(`Shell.${label}: Switching between controlled and uncontrolled \\`${propNames.controlled}\\` is not supported.`);\n wasControlled.current = controlled;\n }\n }, [controlled, label, propNames.controlled]);\n\n return {\n store,\n id,\n state,\n value,\n shown,\n presentation,\n overlaying,\n overlayLive,\n ready,\n breakpoint,\n autoTable,\n setValue,\n toggle,\n defaultHereNow,\n setElement,\n };\n}\n\n/** The data attributes every togglable pane renders. */\nexport function paneAttributes(pane: PaneController, presentationAttributes: Record<string, string>) {\n const { state, value, presentation } = pane;\n return {\n ...presentationAttributes,\n 'data-state': state,\n ...(state === 'auto' ? tableAttributes('auto', pane.autoTable) : {}),\n 'data-presentation': presentation,\n 'data-mode': value === undefined ? undefined : value === 'closed' ? 'collapsed' : 'expanded',\n } as const;\n}\n\n/** A pane's own presentation, as a table and as the attributes the stylesheet reads. */\nexport function usePresentationTable(presentation: Parameters<typeof tableOf<PresentationValue>>[0], fallback: PresentationValue) {\n const key = useStableKey(presentation);\n const table = React.useMemo(\n () => tableOf<PresentationValue>(presentation, () => fallback),\n // `key` stands for `presentation`, which is usually a new literal each render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [key, fallback],\n );\n // One value is the plain `data-presentation` the pane renders anyway; several\n // are written per breakpoint, so the stylesheet can place the pane before\n // any script runs.\n const attributes = React.useMemo(() => (constantOf(table) === undefined ? tableAttributes('presentation', table) : ({} as Record<string, string>)), [table]);\n return { table, attributes };\n}\n"],
|
|
5
|
+
"mappings": ";qHAEA,UAAYA,MAAW,QACvB,OAAS,mBAAAC,MAAuB,oBA+ChC,IAAMC,EAASC,GAAwF,OAAOA,GAAU,UAAYA,IAAU,KAGvI,SAASC,EAAQC,EAAyB,CAC/C,GAAM,CAAE,KAAAC,EAAM,MAAAC,EAAO,UAAAC,EAAW,kBAAAC,EAAmB,QAAAC,CAAQ,EAAIL,EACzDM,EAAQC,EAAc,SAASL,CAAK,EAAE,EACtCM,EAAo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AM8C,IAC9BzC,EAAM,QAAQ,OAAOL,CAAI,EACzB+C,EAAiB1C,CAAK,EAE1B,CACF,EAAG,CAACA,EAAOL,EAAMQ,EAAIX,EAAO8B,EAAcxB,EAAmB2B,EAAa/B,EAAQ,KAAMuC,EAAUG,CAAM,CAAC,EAGzGR,EAAgB,IAAM,CAOtB,EAAG,CAAC,CAAC,EACL,IAAMe,EAAsB,SAAOvC,CAAU,EAC7C,OAAM,YAAU,IAAM,CAMtB,EAAG,CAACA,EAAYR,EAAOC,EAAU,UAAU,CAAC,EAErC,CACL,MAAAG,EACA,GAAAG,EACA,MAAAU,EACA,MAAArB,EACA,MAAAgC,EACA,aAAAF,EACA,WAAAC,EACA,YAAAE,EACA,MAAAR,EACA,WAAAD,EACA,UAAAN,EACA,SAAAuB,EACA,OAAAG,EACA,eAAAJ,EACA,WAAAO,CACF,CACF,CAGO,SAASK,EAAeC,EAAsBC,EAAgD,CACnG,GAAM,CAAE,MAAAjC,EAAO,MAAArB,EAAO,aAAA8B,CAAa,EAAIuB,EACvC,MAAO,CACL,GAAGC,EACH,aAAcjC,EACd,GAAIA,IAAU,OAASkC,EAAgB,OAAQF,EAAK,SAAS,EAAI,CAAC,EAClE,oBAAqBvB,EACrB,YAAa9B,IAAU,OAAY,OAAYA,IAAU,SAAW,YAAc,UACpF,CACF,CAGO,SAASwD,GAAqB1B,EAAgE2B,EAA6B,CAChI,IAAMC,EAAM3C,EAAae,CAAY,EAC/BF,EAAc,UAClB,IAAMT,EAA2BW,EAAc,IAAM2B,CAAQ,EAG7D,CAACC,EAAKD,CAAQ,CAChB,EAIME,EAAmB,UAAQ,IAAOpC,EAAWK,CAAK,IAAM,OAAY2B,EAAgB,eAAgB3B,CAAK,EAAK,CAAC,EAA+B,CAACA,CAAK,CAAC,EAC3J,MAAO,CAAE,MAAAA,EAAO,WAAA+B,CAAW,CAC7B",
|
|
6
|
+
"names": ["React", "useLayoutEffect", "isMap", "value", "usePane", "options", "name", "label", "propNames", "presentationTable", "builtIn", "store", "useShellStore", "generatedId", "id", "controlled", "autoSource", "autoKey", "useStableKey", "inner", "setInner", "autoTable", "tableOf", "bp", "state", "needsBreakpoint", "constantOf", "breakpoint", "ready", "useBreakpoint", "now", "table", "constant", "presentation", "overlaying", "shown", "overlayLive", "defaultValue", "latest", "useLayoutEffect", "valueNow", "current", "readBreakpoint", "defaultHereNow", "setValue", "next", "reason", "toggle", "from", "elementRef", "setElement", "node", "entry", "notifyShellStore", "wasControlled", "paneAttributes", "pane", "presentationAttributes", "tableAttributes", "usePresentationTable", "fallback", "key", "attributes"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{c}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{c as b}from"./chunk-HBWBPBSA.js";import{c}from"./chunk-5ON3XLRD.js";import{c as P}from"./chunk-OKQAVYW4.js";import{a as f}from"./chunk-CLJ6SEGP.js";import{a as R}from"./chunk-VQPANPMI.js";var v={};R(v,{Content:()=>g,List:()=>u,Root:()=>l,Trigger:()=>y});import*as e from"react";import p from"classnames";import{Tabs as i}from"radix-ui";var d=["1","2","3","4"],C=["nowrap","wrap","wrap-reverse"],L=["start","center","end"],a={size:{type:"enum",className:"kui-r-size",values:d,default:"2",responsive:!0},wrap:{type:"enum",className:"kui-r-fw",values:C,responsive:!0},justify:{type:"enum",className:"kui-r-jc",values:L,responsive:!0},...b};var k={...f},h={...f};var l=e.forwardRef((t,o)=>{let{className:r,...s}=t;return e.createElement(i.Root,{...s,ref:o,className:p("kui-TabsRoot",r)})});l.displayName="Tabs.Root";var u=e.forwardRef((t,o)=>{let r=c(t,a.size),{className:s,color:n,...m}=P(r,a);return e.createElement(i.List,{"data-accent-color":n,...m,asChild:!1,ref:o,className:p("kui-BaseTabList","kui-TabsList",s)})});u.displayName="Tabs.List";var y=e.forwardRef((t,o)=>{let{className:r,children:s,...n}=t,m=e.Children.toArray(s).every(T=>typeof T=="string"||typeof T=="number");return e.createElement(i.Trigger,{...n,asChild:!1,ref:o,className:p("kui-reset","kui-BaseTabListTrigger","kui-TabsTrigger",r)},e.createElement("span",{className:"kui-BaseTabListTriggerInner kui-TabsTriggerInner"},s),m?e.createElement("span",{className:"kui-BaseTabListTriggerInnerHidden kui-TabsTriggerInnerHidden","aria-hidden":!0},s):null)});y.displayName="Tabs.Trigger";var g=e.forwardRef((t,o)=>{let{className:r,...s}=t;return e.createElement(i.Content,{...s,ref:o,className:p("kui-TabsContent",r)})});g.displayName="Tabs.Content";export{l as a,u as b,y as c,g as d,v as e};
|
|
3
|
+
//# sourceMappingURL=chunk-VRQK7U7J.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as d}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as d}from"./chunk-WT4IDG2W.js";import{a as R}from"./chunk-FICBVI4M.js";import{a as u,b as f}from"./chunk-5ON3XLRD.js";import*as e from"react";import z from"classnames";var v=e.createContext(void 0),C={values:["1","2","3","4"]},N=e.forwardRef(({kind:r,size:o="2",color:t="gray",className:c,children:a,trailing:s,leading:i,...l},n)=>e.createElement("div",{role:"status","aria-live":"polite",...l,ref:n,className:z("kui-NoticeRoot",`kui-r-size-${o}`,c),"data-kind":r,"data-accent-color":t},i?e.createElement("span",{className:"kui-NoticeIcon","aria-hidden":!0},i):null,e.createElement(R,{as:"div",size:o,className:"kui-NoticeText"},a),s));N.displayName="Strip";var g=e.forwardRef(({icon:r,action:o,onDismiss:t,dismissLabel:c="Dismiss",size:a,...s},i)=>{let l=e.useContext(v),n=f(a??l,C),p=o||t?e.createElement("span",{className:"kui-NoticeActions"},o?e.createElement(u.Provider,{value:n},o):null,t?e.createElement(d,{iconOnly:!0,size:n,variant:"ghost",color:"gray","aria-label":c,className:"kui-NoticeDismiss",onClick:t},e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0},e.createElement("path",{d:"M4 4l7 7M11 4l-7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))):null):null;return e.createElement(N,{...s,size:n,ref:i,kind:"notice",leading:r,trailing:p})});g.displayName="Notice";var k=e.forwardRef(({confirmLabel:r,cancelLabel:o="Not now",onConfirm:t,onCancel:c,busy:a=!1,size:s,color:i="gray",...l},n)=>{let p=e.useContext(v),m=f(s??p,C);return e.createElement(N,{...l,size:m,color:i,ref:n,kind:"confirmation",trailing:e.createElement("span",{className:"kui-NoticeActions"},e.createElement(d,{size:m,variant:"ghost",color:"gray",disabled:a,onClick:c},o),e.createElement(d,{size:m,variant:"solid",color:i,loading:a,onClick:t},r))})});k.displayName="Confirmation";export{v as a,g as b,k as c};
|
|
3
|
+
//# sourceMappingURL=chunk-W3X4N4JE.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{c as
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{c as r}from"./chunk-HBWBPBSA.js";import{c as p}from"./chunk-5ON3XLRD.js";import{c as t}from"./chunk-OKQAVYW4.js";import*as e from"react";import R from"classnames";import{composeEventHandlers as P}from"radix-ui/internal";var c=["1","2","3","4"],o={size:{type:"enum",className:"kui-r-size",values:c,default:"2",responsive:!0},...r};var y=e.forwardRef((s,a)=>{let i=p(s,o.size),{className:n,color:m,onChange:f,onValueChange:u,...d}=t(i,o);return e.createElement("input",{type:"radio","data-accent-color":m,...d,onChange:P(f,l=>u?.(l.currentTarget.value)),ref:a,className:R("kui-reset","kui-BaseRadioRoot","kui-RadioRoot",n)})});y.displayName="Radio";export{y as a};
|
|
3
|
+
//# sourceMappingURL=chunk-W4CPV4PO.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as p}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as p}from"./chunk-MDQ7ZHOS.js";import*as o from"react";var l=Object.entries(p),u=null,i=new Set,n=null;function c(){return u??(u=l.map(([t,e])=>[t,window.matchMedia(e)])),u}function s(){let t="initial";for(let[e,r]of c())r.matches&&(t=e);return t}function a(){let t=s();t!==n&&(n=t,i.forEach(e=>e()))}function f(t){if(typeof window>"u")return()=>{};if(i.size===0){n=s();for(let[,e]of c())typeof e.addEventListener=="function"?e.addEventListener("change",a):e.addListener?.(a)}return i.add(t),()=>{if(i.delete(t),!(i.size>0)){for(let[,e]of c())try{typeof e.removeEventListener=="function"?e.removeEventListener("change",a):e.removeListener?.(a)}catch{}n=null}}}function y(){return typeof window>"u"?"initial":(n??(n=s()),n)}function k(){return"initial"}function L(){return typeof window>"u"?"initial":s()}var m=()=>!0,B=()=>!1,d=()=>()=>{},S=()=>"initial";function E(t=!0){let e=o.useSyncExternalStore(t?f:d,t?y:S,k),r=o.useSyncExternalStore(t?f:d,m,B);return o.useMemo(()=>({breakpoint:e,ready:r}),[e,r])}export{L as a,E as b};
|
|
3
|
+
//# sourceMappingURL=chunk-WJKCXGVN.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as p}from"./chunk-Y2DBXOLT.js";import{b as l}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as p}from"./chunk-Y2DBXOLT.js";import{b as l}from"./chunk-OIJQSUUM.js";import{a as i}from"./chunk-74JANLVU.js";import*as t from"react";import O from"classnames";var N={loud:"solid",medium:"raised",quiet:"ghost"};var C=t.forwardRef(({className:u,style:c,tooltip:n,tooltipSide:d="top",tooltipAlign:m="center",tooltipDelayDuration:B,tooltipDisableHoverableContent:b,iconOnly:a=!1,emphasis:o,variant:r,...e},y)=>{let{tooltipId:f,hasTooltip:P,accessibilityProps:R}=p(n);a&&(e.fullWidth=!1);let h=o!==void 0?N[o]:r,v=e["aria-describedby"],E=R["aria-describedby"],g=[v,E].filter(Boolean).join(" ")||void 0,s=t.createElement(i,{...e,variant:h,"aria-describedby":g,ref:y,"data-icon-only":a||void 0,className:O("kui-Button",u),style:c});return P?t.createElement(l,{content:n,side:d,align:m,delayDuration:B,disableHoverableContent:b,id:f},s):s});C.displayName="Button";export{C as a};
|
|
3
|
+
//# sourceMappingURL=chunk-WT4IDG2W.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as je}from"./chunk-SECVO3CW.js";import{a as Ke}from"./chunk-MQA3BKF4.js";import{a as qe}from"./chunk-5U2LEJLU.js";import{a as $e}from"./chunk-H7GH3DTF.js";import{a as G,b as We,c as _e,d as Ue}from"./chunk-SHDZYFUN.js";import{a as De,b as fe}from"./chunk-RYXIRZQW.js";import{a as me,b as Pe,c as he}from"./chunk-UFYQC5XY.js";import{a as Ie,b as Be,c as Ve}from"./chunk-MXNPCJPV.js";import{a as Ne}from"./chunk-S66WR5R7.js";import{b as Ee}from"./chunk-5ON3XLRD.js";import{a as ye}from"./chunk-WJKCXGVN.js";import{b as ae}from"./chunk-VWRPVM5K.js";import{c as ue,d as de,e as we,f as pe,i as Fe,j as Ae,k as Oe}from"./chunk-FKCKELUB.js";import{c as xe,d as ke}from"./chunk-QEDKL23P.js";import{e as se,f as ze,h as Te,i as Le,j as ie,k as ce,l as Me,m as ne}from"./chunk-LBAC2X4U.js";import{a as He}from"./chunk-ANQLWGFN.js";import{a as ot}from"./chunk-VQPANPMI.js";var dt={};ot(dt,{Bottom:()=>qe,Content:()=>tt,Header:()=>Ze,Inspector:()=>$e,PaneFooter:()=>Ae,PaneHeader:()=>Fe,Panel:()=>be,Rail:()=>et,Root:()=>Qe,Scroll:()=>Oe,Sidebar:()=>Ke,Trigger:()=>nt,useSidebarMode:()=>je});import*as e from"react";import W from"classnames";import{Slot as rt}from"radix-ui";import{useComposedRefs as ge,useLayoutEffect as lt}from"radix-ui/internal";var Se=0;function Ge(a){Se=Math.max(0,Se+a);let l=document.documentElement;Se>0?l.setAttribute("data-kui-shell-lock",""):l.removeAttribute("data-kui-shell-lock")}var Re="data-kui-shell-inert",at=30;function Y(a,l){return l===null||l===a||l===a.body||l===a.documentElement}function Ye(a,l,s){for(let p of a.querySelectorAll("[data-shell-trigger][aria-controls]"))if(!(p.getAttribute("aria-controls")!==l||p.closest("[inert]"))&&!(s&&!s.some(m=>m.contains(p))))return p;return null}var st={values:["1","2","3"]},Je=e.createContext(null),Xe=64;function ve(a){return a.querySelector(":scope > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaViewport")??a.querySelector(":scope > .kui-ShellContent")}var Qe=e.forwardRef(({className:a,children:l,height:s="full",contained:p,size:m,style:T,onKeyDown:S,onFocus:g,...v},b)=>{let L=Ee(m,st),[u]=e.useState(ze),C=e.useCallback(t=>Te(u,t),[u]);e.useSyncExternalStore(C,()=>u.version,()=>0);let d=e.useRef(null),_=ge(b,d),[U,E]=e.useState(()=>new Set),A=e.useCallback(t=>{E(n=>n.has(t)?n:new Set(n).add(t))},[]),O=e.useCallback(t=>{E(n=>{if(!n.has(t))return n;let r=new Set(n);return r.delete(t),r})},[]),q=e.useMemo(()=>({registerOffFrame:A,unregisterOffFrame:O}),[A,O]),N=e.useCallback(()=>{for(let t of u.entries.values())t.overlayLive&&t.setValue("closed","dismiss")},[u]),$=e.useCallback(()=>[...u.entries.values()].filter(t=>t.overlayLive&&t.el).map(t=>({name:t.name,id:t.id,el:t.el})),[u]),y=[...u.entries.values()].filter(t=>t.overlayLive&&t.el).length,D=p===!0||s!=="full"&&s!=="auto",M=!D&&s==="full",[K,oe]=e.useState(void 0);e.useEffect(()=>{if(!M)return;let t=d.current,n=t?.ownerDocument.defaultView;if(!t||!n||typeof n.matchMedia!="function")return;let r=xe(),i=r?n.scrollY:ve(t)?.scrollTop??0,h=0,R=0,x=()=>{R&&cancelAnimationFrame(R),R=requestAnimationFrame(()=>{R=0})},B=()=>{r&&!R&&(i=n.scrollY)},V=o=>{!r&&!R&&o.target instanceof HTMLElement&&o.target===ve(t)&&(i=o.target.scrollTop)};n.addEventListener("resize",x),n.addEventListener("scroll",B,{passive:!0}),t.addEventListener("scroll",V,{passive:!0,capture:!0});let le=ke(o=>{r=o;let c=i;h&&cancelAnimationFrame(h),h=requestAnimationFrame(()=>{if(h=0,o)n.scrollTo(0,c);else{let f=ve(t);f&&(f.scrollTop=c)}})});return()=>{h&&cancelAnimationFrame(h),R&&cancelAnimationFrame(R),n.removeEventListener("resize",x),n.removeEventListener("scroll",B),t.removeEventListener("scroll",V,{capture:!0}),le()}},[M]);let k=e.useCallback(()=>{let t=d.current;if(!t)return;let n=$().map(r=>r.el);for(let r of t.children){if(!(r instanceof HTMLElement)||r.classList.contains("kui-ShellScrim"))continue;let i=n.some(h=>r===h||r.contains(h));n.length===0||i?r.hasAttribute(Re)&&(r.removeAttribute(Re),r.inert=!1):r.inert||(r.setAttribute(Re,""),r.inert=!0)}},[$]),w=e.useRef(null),X=e.useRef([]),J=e.useRef(null),P=e.useRef(!1),H=e.useRef(0),I=e.useCallback(()=>{H.current&&cancelAnimationFrame(H.current),H.current=0},[]),Q=e.useCallback((t,n)=>{I();let r=0,i=()=>{if(H.current=0,!!t.isConnected){if(n(t.ownerDocument.activeElement)){t.focus({preventScroll:!0});return}r+=1,r<at&&(H.current=requestAnimationFrame(i))}};H.current=requestAnimationFrame(i)},[I]);e.useEffect(()=>()=>{I(),P.current&&(P.current=!1,Ge(-1))},[I]),e.useEffect(()=>{let t=d.current;if(!t)return;let n=t.ownerDocument,r=$(),i=r.map(o=>o.el),h=!D&&r.length>0;h!==P.current&&(P.current=h,Ge(h?1:-1));let R=X.current;X.current=r;let x=R.filter(o=>{if(i.includes(o.el))return!1;let c=u.entries.get(o.name);return!o.el.isConnected||!c||c.el!==o.el||c.value==="closed"}),B=o=>o!==null&&x.some(c=>c.el.contains(o));if(R.length===0&&r.length>0){let o=n.activeElement,c=o instanceof HTMLElement&&!Y(n,o)&&!i.some(f=>f.contains(o))?o:null;if(c&&!t.contains(c)){let f=J.current;f&&f.isConnected&&!i.some(te=>te.contains(f))&&(c=f)}w.current=c}if(k(),r.length===0){let o=w.current;if(w.current=null,x.length===0)return;let f=(z=>z!==null&&z.isConnected&&!z.closest("[inert]")&&!B(z))(o)?o:null;for(let z of x)f??(f=Ye(n,z.id));if(!f)return;let te=z=>Y(n,z)||B(z);te(n.activeElement)?f.focus({preventScroll:!0}):Q(f,te);return}if(x.length>0){let o=n.activeElement;if(Y(n,o)||B(o)){let c=null;for(let f of x)c??(c=Ye(n,f.id,i));(c??i[i.length-1]).focus({preventScroll:!0})}}let V=i.filter(o=>!R.some(c=>c.el===o)),le=n.activeElement;V.length>0&&!i.some(o=>o.contains(le))&&(V[0].focus({preventScroll:!0}),Q(V[0],o=>Y(n,o)||o instanceof Element&&o.closest("[inert]")!==null))}),e.useEffect(()=>{let t=d.current;if(!t||y===0||typeof MutationObserver>"u")return;let n=new MutationObserver(k);return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["inert"]}),()=>n.disconnect()},[y,k]);let Z=t=>{S?.(t),!(t.key!=="Escape"||t.defaultPrevented||y===0)&&(N(),t.stopPropagation())};e.useEffect(()=>{let t=d.current;if(!t||y===0)return;let n=t.ownerDocument,r=i=>{i.key!=="Escape"||i.defaultPrevented||!Y(n,i.target)||N()};return n.addEventListener("keydown",r),()=>n.removeEventListener("keydown",r)},[y,N]);let ee=t=>{g?.(t),t.target instanceof HTMLElement&&d.current?.contains(t.target)&&(J.current=t.target)},F=u.entries.get("rail"),j=F!==void 0&&F.value!==void 0&&F.value!=="closed"?U.has("rail")?`calc(${F.size}px + 2 * var(--shell-gap))`:`${F.size}px`:void 0,re=s==="full"?{}:s==="auto"?{height:"auto"}:typeof s=="number"?{height:`${s}px`}:{height:s};return e.createElement(Le.Provider,{value:u},e.createElement(ue.Provider,{value:L},e.createElement(de.Provider,{value:!1},e.createElement(we.Provider,{value:M},e.createElement(Je.Provider,{value:oe},e.createElement(Me.Provider,{value:q},e.createElement(He.Provider,{value:void 0},e.createElement("div",{...v,ref:_,className:W("kui-ShellRoot",a),"data-height":s==="auto"&&!D?"auto":void 0,"data-contained":D||void 0,"data-window":M||void 0,"data-overlay-live":y>0||void 0,onKeyDown:Z,onFocus:ee,style:{...re,...j?{"--shell-rail-offset":j}:{},...K!==void 0?{"--kui-shell-header-h":`${K}px`}:{},...T}},l,e.createElement("div",{className:"kui-ShellScrim","aria-hidden":!0,onClick:N})))))))))});Qe.displayName="Shell.Root";var Ze=e.forwardRef(({className:a,height:l=Xe,flush:s=!0,style:p,...m},T)=>{let S=e.useContext(Je);return lt(()=>{if(S)return S(l===Xe?void 0:l),()=>S(void 0)},[S,l]),e.createElement("header",{...m,ref:T,className:W("kui-ShellHeader",a),"data-flush":s||void 0,style:{...p,"--shell-header-height":`${l}px`}})});Ze.displayName="Shell.Header";var it={controlled:"open",default:"defaultOpen"},et=e.forwardRef((a,l)=>{let{className:s,presentation:p,expandedSize:m=64,collapsible:T,children:S,style:g,open:v,defaultOpen:b,onOpenChange:L,flush:u=!0,id:C,...d}=a,{table:_,attributes:U}=he(p,"fixed"),E=me({name:"rail",label:"Rail",propNames:it,id:C,controlled:G(v),defaultValue:G(b),presentationTable:_,builtIn:We,onChange:(O,q)=>L?.(O!=="closed",{reason:q}),size:m});ne("rail",u);let A=ge(l,E.setElement);return e.createElement("div",{...d,role:d.role??"navigation",id:E.id,ref:A,className:W("kui-ShellPane","kui-ShellRail",s),...Pe(E,U),"data-flush":u||void 0,tabIndex:E.overlaying?-1:d.tabIndex,style:{...g,"--rail-size":`${m}px`}},e.createElement(ct,null,S))});et.displayName="Shell.Rail";function ct({children:a}){let l=e.useContext(ue);return e.createElement("div",{className:W("kui-ShellRailContent",`kui-r-size-${l}`)},e.createElement(pe,{presentation:"thin"},a))}var ut={controlled:"open",default:"defaultOpen"},be=e.forwardRef((a,l)=>{let{className:s,presentation:p,defaultOpen:m,open:T,onOpenChange:S,size:g,defaultSize:v,expandedSize:b=288,minSize:L=100,maxSize:u=800,resizable:C=!1,collapsible:d=!0,onResize:_,onResizeStart:U,onResizeEnd:E,children:A,style:O,onSizeChange:q,sizeUpdate:N,sizeUpdateMs:$=50,flush:y=!0,id:D,...M}=a,K=ie("Shell.Panel"),oe=ce(K,"rail"),k=he(p,"fixed"),w=p===void 0,X=w?oe?.presentationTable??se:k.table,J=w?{"data-presentation-follows":""}:k.attributes,P=me({name:"panel",label:"Panel",propNames:ut,id:D,controlled:G(T),defaultValue:G(m),presentationTable:X,builtIn:_e,onChange:(j,re)=>S?.(j!=="closed",{reason:re}),size:b});ne("panel",y);let H=e.useRef(null),I=ge(l,P.setElement,H),Q=Be({name:"panel",elementId:P.id,elementRef:H,cssVarName:"--panel-size",orientation:"vertical",edge:"end",growth:Ue,expandedSize:b,minSize:L,maxSize:u,resizable:C,collapsible:d,size:g,defaultSize:v,onSizeChange:q,sizeUpdate:N,sizeUpdateMs:$,onResize:_,onResizeStart:U,onResizeEnd:E,overlaying:P.overlaying,overlayingNow:()=>(w?K.entries.get("rail")?.presentationTable??se:k.table)[ye()]==="overlay",requestToggle:()=>P.toggle("toggle")}),Z=Ie(g,v,L,u),{handles:ee,content:F}=Ve(A,fe),Ce=C&&P.shown!==!1&&!P.overlaying?e.createElement(Ne.Provider,{value:Q},ee.length>0?ee:e.createElement(De,null)):null;return e.createElement("div",{...M,role:M.role??"navigation",id:P.id,ref:I,className:W("kui-ShellPane","kui-ShellPanel",s),...Pe(P,J),"data-flush":y||void 0,tabIndex:P.overlaying?-1:M.tabIndex,style:{...O,"--panel-expanded-size":`${b}px`,...Z?{"--panel-size":Z}:{}}},e.createElement("div",{className:"kui-ShellPanelContent"},e.createElement(pe,null,e.createElement(ae,null,F))),Ce)});be.displayName="Shell.Panel";be.Handle=fe;var tt=e.forwardRef(({className:a,flush:l=!0,children:s,...p},m)=>(ne("content",l),e.createElement("main",{...p,ref:m,className:W("kui-ShellContent",a),"data-flush":l||void 0},e.createElement(de.Provider,{value:!0},e.createElement(ae,null,s)))));tt.displayName="Shell.Content";var nt=e.forwardRef(({target:a,action:l="toggle",asChild:s=!1,onClick:p,children:m,...T},S)=>{let g=ie("Shell.Trigger"),v=ce(g,a),b=v?.value===void 0?void 0:v.value!=="closed",L=C=>{if(p?.(C),C.defaultPrevented)return;let d=g.entries.get(a);d&&(l==="toggle"?d.toggle("toggle"):l==="expand"?d.setValue("open","toggle"):d.setValue("closed","toggle"))},u=s?rt.Root:"button";return e.createElement(u,{...!s&&{type:"button"},"aria-controls":v?.id,"aria-expanded":b,...T,ref:S,onClick:L,"data-shell-trigger":a,"data-shell-action":l},m)});nt.displayName="Shell.Trigger";export{Qe as a,Ze as b,et as c,be as d,tt as e,nt as f,dt as g};
|
|
3
|
+
//# sourceMappingURL=chunk-XBDAE77C.js.map
|