@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
|
@@ -70,22 +70,14 @@ export type ShellStore = {
|
|
|
70
70
|
* it, would be a new identity on every read.
|
|
71
71
|
*/
|
|
72
72
|
version: number;
|
|
73
|
-
/** The pane a hovered Trigger is previewing, if any. Layout only. */
|
|
74
|
-
peek: PaneName | null;
|
|
75
73
|
};
|
|
76
74
|
export declare function createShellStore(): ShellStore;
|
|
77
75
|
export declare function notifyShellStore(store: ShellStore): void;
|
|
78
76
|
export declare function subscribeShellStore(store: ShellStore, listener: () => void): () => void;
|
|
79
|
-
export declare function setShellPeek(store: ShellStore, peek: PaneName | null): void;
|
|
80
77
|
export declare const ShellStoreContext: React.Context<ShellStore | null>;
|
|
81
78
|
export declare function useShellStore(part: string): ShellStore;
|
|
82
79
|
/** One pane's registry entry. Re-renders only when that entry is replaced. */
|
|
83
80
|
export declare function usePaneEntry(store: ShellStore, name: PaneName): PaneEntry | undefined;
|
|
84
|
-
/**
|
|
85
|
-
* Whether this pane is the one being previewed. A boolean per pane rather than
|
|
86
|
-
* the peek target itself, so hovering one Trigger re-renders one pane, not all.
|
|
87
|
-
*/
|
|
88
|
-
export declare function usePeeking(store: ShellStore, name: PaneName): boolean;
|
|
89
81
|
export type FramePaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';
|
|
90
82
|
export declare const ShellFrameContext: React.Context<{
|
|
91
83
|
registerOffFrame: (id: FramePaneId) => void;
|
|
@@ -93,7 +85,5 @@ export declare const ShellFrameContext: React.Context<{
|
|
|
93
85
|
} | null>;
|
|
94
86
|
/** Tells the Root a pane is off the frame (`flush={false}`); the Rail's card moves a floating Panel over. */
|
|
95
87
|
export declare function useFrameRegistration(id: FramePaneId, flush: boolean): void;
|
|
96
|
-
/** A deprecation warning, once per message per page load. Development only. */
|
|
97
|
-
export declare function warnOnce(message: string): void;
|
|
98
88
|
export {};
|
|
99
89
|
//# sourceMappingURL=shell-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-store.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/shell-store.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAIjF,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AAE7C,yCAAyC;AACzC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE1C,KAAK,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;AAMzE;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAa/F;AAED,mDAAmD;AACnD,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAM1F;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEnD;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAsD,CAAC;AAIxG,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpD,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,WAAW,GAAG,IAAI,CAAC;IACvB,iHAAiH;IACjH,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,iDAAiD;IACjD,YAAY,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC5C,wGAAwG;IACxG,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC5C,uGAAuG;IACvG,WAAW,EAAE,OAAO,CAAC;IACrB,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/D,MAAM,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAClC,SAAS,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAC3B;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"shell-store.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/shell-store.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAIjF,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AAE7C,yCAAyC;AACzC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE1C,KAAK,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;AAMzE;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAa/F;AAED,mDAAmD;AACnD,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAM1F;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEnD;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAsD,CAAC;AAIxG,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpD,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,WAAW,GAAG,IAAI,CAAC;IACvB,iHAAiH;IACjH,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,iDAAiD;IACjD,YAAY,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC5C,wGAAwG;IACxG,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC5C,uGAAuG;IACvG,WAAW,EAAE,OAAO,CAAC;IACrB,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/D,MAAM,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAClC,SAAS,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAC3B;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,gBAAgB,IAAI,UAAU,CAE7C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,QAGjD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,IAAI,cAK1E;AAED,eAAO,MAAM,iBAAiB,kCAA+C,CAAC;AAE9E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAItD;AAED,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAIrF;AAID,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE5F,eAAO,MAAM,iBAAiB;sBACV,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI;wBACvB,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI;SAChC,CAAC;AAEhB,6GAA6G;AAC7G,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,QASnE"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";"use client";var
|
|
2
|
+
"use strict";"use client";var P=Object.create;var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var T=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},p=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of y(t))!g.call(e,r)&&r!==n&&a(e,r,{get:()=>t[r],enumerable:!(o=b(t,r))||o.enumerable});return e};var h=(e,t,n)=>(n=e!=null?P(R(e)):{},p(t||!e||!e.__esModule?a(n,"default",{value:e,enumerable:!0}):n,e)),v=e=>p(a({},"__esModule",{value:!0}),e);var M={};T(M,{FIXED_TABLE:()=>O,ShellFrameContext:()=>S,ShellStoreContext:()=>m,constantOf:()=>x,createShellStore:()=>w,notifyShellStore:()=>k,subscribeShellStore:()=>f,tableAttributes:()=>C,tableOf:()=>c,useFrameRegistration:()=>I,usePaneEntry:()=>V,useShellStore:()=>B,useStableKey:()=>E});module.exports=v(M);var i=h(require("react")),u=require("radix-ui/internal");var s=["initial","xs","sm","md","lg","xl"];function d(e){return typeof e=="object"&&e!==null}function c(e,t){let n={},o=null;for(let r of s){if(e!==void 0&&!d(e)){n[r]=e;continue}let l=d(e)?e[r]:void 0;l!==void 0&&(o={value:l}),n[r]=o?o.value:t(r)}return n}function x(e){let t=e.initial;return s.every(n=>e[n]===t)?t:void 0}function C(e,t){let n=x(t);if(n!==void 0)return{[`data-${e}`]:n};let o={};for(let r of s)o[`data-${e}-${r}`]=t[r];return o}function E(e){return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}var O=c("fixed",()=>"fixed");function w(){return{entries:new Map,listeners:new Set,version:0}}function k(e){e.version+=1;for(let t of e.listeners)t()}function f(e,t){return e.listeners.add(t),()=>{e.listeners.delete(t)}}var m=i.createContext(null);function B(e){let t=i.useContext(m);if(!t)throw new Error(`${e} must be used within <Shell.Root>`);return t}function V(e,t){let n=i.useCallback(r=>f(e,r),[e]),o=i.useCallback(()=>e.entries.get(t),[e,t]);return i.useSyncExternalStore(n,o,()=>{})}var S=i.createContext(null);function I(e,t){let n=i.useContext(S);if(!n)throw new Error("Shell panes must be used within <Shell.Root>");let{registerOffFrame:o,unregisterOffFrame:r}=n;(0,u.useLayoutEffect)(()=>{if(!t)return o(e),()=>r(e)},[e,t,o,r])}
|
|
3
3
|
//# sourceMappingURL=shell-store.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/_internal/shell-store.tsx", "../../../../src/components/shell.types.ts"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\n/**\n * The Shell's state model (0.8.0), ported from kookie-ui-v2's Shell.\n *\n * - State lives on the pane. Each pane holds `auto | open | closed`.\n * `auto` means untouched: the stylesheet decides what\n * it shows at each breakpoint, so first paint is right with no script, the\n * server and the client render the same markup, and no open-state callback\n * can fire on mount or on a resize.\n * - The one thing that crosses the Shell is a registry keyed by pane name.\n * Each pane registers what it is and how to drive it; a Trigger looks its\n * pane up, and the Root reads the set of live overlays. Nothing scans\n * children and nothing checks `displayName`.\n * - The responsive props are resolved into a table with one value per\n * breakpoint, from the props alone, with no window. The table is written to\n * the DOM as data attributes for the stylesheet, and read again in JS by the\n * mirror that sets `aria-expanded`. One table, two readers, so they agree by\n * construction.\n */\nimport * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport { SHELL_BREAKPOINTS } from '../shell.types.js';\nimport type { Breakpoint, PaneName, PresentationValue } from '../shell.types.js';\n\n/* \u2500\u2500 Breakpoint tables \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type Table<T> = Record<Breakpoint, T>;\n\n/** What a pane shows: open or closed. */\nexport type PaneValue = 'open' | 'closed';\n\ntype ResponsiveInput<T> = T | Partial<Record<Breakpoint, T>> | undefined;\n\nfunction isMap<T>(value: ResponsiveInput<T>): value is Partial<Record<Breakpoint, T>> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * A responsive value at every breakpoint. A breakpoint takes the largest key\n * at or below it, the same fallback `useResponsiveValue` used; a breakpoint\n * below every key takes `fallback`.\n */\nexport function tableOf<T>(value: ResponsiveInput<T>, fallback: (bp: Breakpoint) => T): Table<T> {\n const table = {} as Table<T>;\n let carried: { value: T } | null = null;\n for (const bp of SHELL_BREAKPOINTS) {\n if (value !== undefined && !isMap(value)) {\n table[bp] = value;\n continue;\n }\n const entry = isMap(value) ? value[bp] : undefined;\n if (entry !== undefined) carried = { value: entry };\n table[bp] = carried ? carried.value : fallback(bp);\n }\n return table;\n}\n\n/** The table's one value, when it has only one. */\nexport function constantOf<T>(table: Table<T>): T | undefined {\n const first = table.initial;\n return SHELL_BREAKPOINTS.every((bp) => table[bp] === first) ? first : undefined;\n}\n\n/**\n * The table as data attributes: `data-<name>` when it holds one value, one\n * `data-<name>-<bp>` per breakpoint when it holds several. The stylesheet has\n * a rule for each spelling.\n */\nexport function tableAttributes(name: string, table: Table<string>): Record<string, string> {\n const constant = constantOf(table);\n if (constant !== undefined) return { [`data-${name}`]: constant };\n const attributes: Record<string, string> = {};\n for (const bp of SHELL_BREAKPOINTS) attributes[`data-${name}-${bp}`] = table[bp];\n return attributes;\n}\n\n/**\n * A responsive prop object is usually an inline literal, a new identity every\n * render. Keying memoisation on its contents keeps the tables, and so the\n * registry entries, stable across renders that change nothing.\n */\nexport function useStableKey(value: unknown): string {\n return typeof value === 'object' && value !== null ? JSON.stringify(value) : String(value);\n}\n\nexport const FIXED_TABLE: Table<PresentationValue> = tableOf<PresentationValue>('fixed', () => 'fixed');\n\n/* \u2500\u2500 The registry \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type OpenChangeReason = 'toggle' | 'dismiss';\n\nexport type PaneEntry = {\n name: PaneName;\n id: string;\n el: HTMLElement | null;\n /** What the pane shows now; `undefined` while an untouched pane cannot know (before the breakpoint is known). */\n value: PaneValue | undefined;\n /** How the pane is presented now, when known. */\n presentation: PresentationValue | undefined;\n /** The pane's own presentation at every breakpoint. A Panel with none of its own follows the Rail's. */\n presentationTable: Table<PresentationValue>;\n /** Open and presented as an overlay: what the scrim and Escape close, and what containment exempts. */\n overlayLive: boolean;\n /** The pane's designed open width, for panes that sit beside it when floating. */\n size: number;\n setValue: (value: PaneValue, reason: OpenChangeReason) => void;\n toggle: (reason: OpenChangeReason) => void;\n};\n\nexport type ShellStore = {\n entries: Map<PaneName, PaneEntry>;\n listeners: Set<() => void>;\n /**\n * What a subscriber reads. useSyncExternalStore needs a value that is stable\n * between notifications, and a number is; the Map, or anything derived from\n * it, would be a new identity on every read.\n */\n version: number;\n /** The pane a hovered Trigger is previewing, if any. Layout only. */\n peek: PaneName | null;\n};\n\nexport function createShellStore(): ShellStore {\n return { entries: new Map(), listeners: new Set(), version: 0, peek: null };\n}\n\nexport function notifyShellStore(store: ShellStore) {\n store.version += 1;\n for (const listener of store.listeners) listener();\n}\n\nexport function subscribeShellStore(store: ShellStore, listener: () => void) {\n store.listeners.add(listener);\n return () => {\n store.listeners.delete(listener);\n };\n}\n\nexport function setShellPeek(store: ShellStore, peek: PaneName | null) {\n if (store.peek === peek) return;\n store.peek = peek;\n notifyShellStore(store);\n}\n\nexport const ShellStoreContext = React.createContext<ShellStore | null>(null);\n\nexport function useShellStore(part: string): ShellStore {\n const store = React.useContext(ShellStoreContext);\n if (!store) throw new Error(`${part} must be used within <Shell.Root>`);\n return store;\n}\n\n/** One pane's registry entry. Re-renders only when that entry is replaced. */\nexport function usePaneEntry(store: ShellStore, name: PaneName): PaneEntry | undefined {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n const getSnapshot = React.useCallback(() => store.entries.get(name), [store, name]);\n return React.useSyncExternalStore(subscribe, getSnapshot, () => undefined);\n}\n\n/**\n * Whether this pane is the one being previewed. A boolean per pane rather than\n * the peek target itself, so hovering one Trigger re-renders one pane, not all.\n */\nexport function usePeeking(store: ShellStore, name: PaneName): boolean {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n return React.useSyncExternalStore(\n subscribe,\n () => store.peek === name,\n () => false,\n );\n}\n\n/* \u2500\u2500 Off the frame \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type FramePaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';\n\nexport const ShellFrameContext = React.createContext<{\n registerOffFrame: (id: FramePaneId) => void;\n unregisterOffFrame: (id: FramePaneId) => void;\n} | null>(null);\n\n/** Tells the Root a pane is off the frame (`flush={false}`); the Rail's card moves a floating Panel over. */\nexport function useFrameRegistration(id: FramePaneId, flush: boolean) {\n const ctx = React.useContext(ShellFrameContext);\n if (!ctx) throw new Error('Shell panes must be used within <Shell.Root>');\n const { registerOffFrame, unregisterOffFrame } = ctx;\n useLayoutEffect(() => {\n if (flush) return;\n registerOffFrame(id);\n return () => unregisterOffFrame(id);\n }, [id, flush, registerOffFrame, unregisterOffFrame]);\n}\n\n/* \u2500\u2500 Development warnings \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nconst warned = new Set<string>();\n\n/** A deprecation warning, once per message per page load. Development only. */\nexport function warnOnce(message: string) {\n if (process.env.NODE_ENV === 'production') return;\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(`[kookie-ui] ${message}`);\n}\n", "import type * as React from 'react';\n\nexport type PresentationValue = 'fixed' | 'overlay' | 'stacked';\n\nexport type ResponsivePresentation = PresentationValue | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PresentationValue>>;\n\nexport type PaneMode = 'expanded' | 'collapsed';\nexport type SidebarMode = 'collapsed' | 'expanded';\n\nexport type ResponsiveMode = PaneMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PaneMode>>;\n\nexport type ResponsiveSidebarMode = SidebarMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', SidebarMode>>;\n\nexport type Responsive<T> = T | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', T>>;\n\nexport type PaneSizePersistence = {\n load?: () => number | Promise<number | undefined> | undefined;\n save?: (size: number) => void | Promise<void>;\n};\n\n/**\n * Why a pane's open state changed. Since 0.8.0 only a user action is reported:\n * `toggle` for a Trigger, a handle double-click or a drag past\n * `collapseThreshold`, and `dismiss` for Escape or a press on the scrim.\n * `init`, `responsive`, `panel` and `left` are kept in the types for\n * compatibility and are never sent.\n */\nexport type PaneOpenChangeReason = 'toggle' | 'dismiss' | 'init' | 'responsive';\n\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onExpand?: () => void;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n /** @deprecated Removed in 1.0. Snap in your own `onSizeChange` and pass `size`. */\n snapPoints?: number[];\n /** @deprecated Removed in 1.0, with `snapPoints`. */\n snapTolerance?: number;\n /** @deprecated Removed in 1.0. Close the pane from your own `onResizeEnd`. */\n collapseThreshold?: number;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n paneId?: string;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n persistence?: PaneSizePersistence;\n}\n\nexport const _BREAKPOINTS = {\n xs: '(min-width: 520px)',\n sm: '(min-width: 768px)',\n md: '(min-width: 1024px)',\n lg: '(min-width: 1280px)',\n xl: '(min-width: 1640px)',\n} as const;\n\nexport type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;\n\n/** Every breakpoint, smallest first. The stylesheet's @media blocks follow this order. */\nexport const SHELL_BREAKPOINTS: readonly Breakpoint[] = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'];\n\nexport type PaneTarget = 'left' | 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\n/** The panes a Trigger can drive. `left` is the deprecated name for `rail`. */\nexport type PaneName = Exclude<PaneTarget, 'left'>;\n\n/**\n * CSS custom property key type for type-safe style objects.\n * Allows any string prefixed with '--'.\n */\nexport type CSSCustomProperty = `--${string}`;\n\n/**\n * Style object that supports CSS custom properties.\n */\nexport type CSSPropertiesWithVars = React.CSSProperties & {\n [key: CSSCustomProperty]: string | number | undefined;\n};\n"],
|
|
5
|
-
"mappings": ";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,sBAAAC,EAAA,sBAAAC,EAAA,eAAAC,EAAA,qBAAAC,EAAA,qBAAAC,EAAA,
|
|
6
|
-
"names": ["shell_store_exports", "__export", "FIXED_TABLE", "ShellFrameContext", "ShellStoreContext", "constantOf", "createShellStore", "notifyShellStore", "
|
|
4
|
+
"sourcesContent": ["'use client';\n\n/**\n * The Shell's state model (0.8.0), ported from kookie-ui-v2's Shell.\n *\n * - State lives on the pane. Each pane holds `auto | open | closed`.\n * `auto` means untouched: the stylesheet decides what\n * it shows at each breakpoint, so first paint is right with no script, the\n * server and the client render the same markup, and no open-state callback\n * can fire on mount or on a resize.\n * - The one thing that crosses the Shell is a registry keyed by pane name.\n * Each pane registers what it is and how to drive it; a Trigger looks its\n * pane up, and the Root reads the set of live overlays. Nothing scans\n * children and nothing checks `displayName`.\n * - The responsive props are resolved into a table with one value per\n * breakpoint, from the props alone, with no window. The table is written to\n * the DOM as data attributes for the stylesheet, and read again in JS by the\n * mirror that sets `aria-expanded`. One table, two readers, so they agree by\n * construction.\n */\nimport * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport { SHELL_BREAKPOINTS } from '../shell.types.js';\nimport type { Breakpoint, PaneName, PresentationValue } from '../shell.types.js';\n\n/* \u2500\u2500 Breakpoint tables \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type Table<T> = Record<Breakpoint, T>;\n\n/** What a pane shows: open or closed. */\nexport type PaneValue = 'open' | 'closed';\n\ntype ResponsiveInput<T> = T | Partial<Record<Breakpoint, T>> | undefined;\n\nfunction isMap<T>(value: ResponsiveInput<T>): value is Partial<Record<Breakpoint, T>> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * A responsive value at every breakpoint. A breakpoint takes the largest key\n * at or below it, the same fallback `useResponsiveValue` used; a breakpoint\n * below every key takes `fallback`.\n */\nexport function tableOf<T>(value: ResponsiveInput<T>, fallback: (bp: Breakpoint) => T): Table<T> {\n const table = {} as Table<T>;\n let carried: { value: T } | null = null;\n for (const bp of SHELL_BREAKPOINTS) {\n if (value !== undefined && !isMap(value)) {\n table[bp] = value;\n continue;\n }\n const entry = isMap(value) ? value[bp] : undefined;\n if (entry !== undefined) carried = { value: entry };\n table[bp] = carried ? carried.value : fallback(bp);\n }\n return table;\n}\n\n/** The table's one value, when it has only one. */\nexport function constantOf<T>(table: Table<T>): T | undefined {\n const first = table.initial;\n return SHELL_BREAKPOINTS.every((bp) => table[bp] === first) ? first : undefined;\n}\n\n/**\n * The table as data attributes: `data-<name>` when it holds one value, one\n * `data-<name>-<bp>` per breakpoint when it holds several. The stylesheet has\n * a rule for each spelling.\n */\nexport function tableAttributes(name: string, table: Table<string>): Record<string, string> {\n const constant = constantOf(table);\n if (constant !== undefined) return { [`data-${name}`]: constant };\n const attributes: Record<string, string> = {};\n for (const bp of SHELL_BREAKPOINTS) attributes[`data-${name}-${bp}`] = table[bp];\n return attributes;\n}\n\n/**\n * A responsive prop object is usually an inline literal, a new identity every\n * render. Keying memoisation on its contents keeps the tables, and so the\n * registry entries, stable across renders that change nothing.\n */\nexport function useStableKey(value: unknown): string {\n return typeof value === 'object' && value !== null ? JSON.stringify(value) : String(value);\n}\n\nexport const FIXED_TABLE: Table<PresentationValue> = tableOf<PresentationValue>('fixed', () => 'fixed');\n\n/* \u2500\u2500 The registry \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type OpenChangeReason = 'toggle' | 'dismiss';\n\nexport type PaneEntry = {\n name: PaneName;\n id: string;\n el: HTMLElement | null;\n /** What the pane shows now; `undefined` while an untouched pane cannot know (before the breakpoint is known). */\n value: PaneValue | undefined;\n /** How the pane is presented now, when known. */\n presentation: PresentationValue | undefined;\n /** The pane's own presentation at every breakpoint. A Panel with none of its own follows the Rail's. */\n presentationTable: Table<PresentationValue>;\n /** Open and presented as an overlay: what the scrim and Escape close, and what containment exempts. */\n overlayLive: boolean;\n /** The pane's designed open width, for panes that sit beside it when floating. */\n size: number;\n setValue: (value: PaneValue, reason: OpenChangeReason) => void;\n toggle: (reason: OpenChangeReason) => void;\n};\n\nexport type ShellStore = {\n entries: Map<PaneName, PaneEntry>;\n listeners: Set<() => void>;\n /**\n * What a subscriber reads. useSyncExternalStore needs a value that is stable\n * between notifications, and a number is; the Map, or anything derived from\n * it, would be a new identity on every read.\n */\n version: number;\n};\n\nexport function createShellStore(): ShellStore {\n return { entries: new Map(), listeners: new Set(), version: 0 };\n}\n\nexport function notifyShellStore(store: ShellStore) {\n store.version += 1;\n for (const listener of store.listeners) listener();\n}\n\nexport function subscribeShellStore(store: ShellStore, listener: () => void) {\n store.listeners.add(listener);\n return () => {\n store.listeners.delete(listener);\n };\n}\n\nexport const ShellStoreContext = React.createContext<ShellStore | null>(null);\n\nexport function useShellStore(part: string): ShellStore {\n const store = React.useContext(ShellStoreContext);\n if (!store) throw new Error(`${part} must be used within <Shell.Root>`);\n return store;\n}\n\n/** One pane's registry entry. Re-renders only when that entry is replaced. */\nexport function usePaneEntry(store: ShellStore, name: PaneName): PaneEntry | undefined {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n const getSnapshot = React.useCallback(() => store.entries.get(name), [store, name]);\n return React.useSyncExternalStore(subscribe, getSnapshot, () => undefined);\n}\n\n/* \u2500\u2500 Off the frame \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type FramePaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';\n\nexport const ShellFrameContext = React.createContext<{\n registerOffFrame: (id: FramePaneId) => void;\n unregisterOffFrame: (id: FramePaneId) => void;\n} | null>(null);\n\n/** Tells the Root a pane is off the frame (`flush={false}`); the Rail's card moves a floating Panel over. */\nexport function useFrameRegistration(id: FramePaneId, flush: boolean) {\n const ctx = React.useContext(ShellFrameContext);\n if (!ctx) throw new Error('Shell panes must be used within <Shell.Root>');\n const { registerOffFrame, unregisterOffFrame } = ctx;\n useLayoutEffect(() => {\n if (flush) return;\n registerOffFrame(id);\n return () => unregisterOffFrame(id);\n }, [id, flush, registerOffFrame, unregisterOffFrame]);\n}\n", "import type * as React from 'react';\n\nexport type PresentationValue = 'fixed' | 'overlay' | 'stacked';\n\nexport type ResponsivePresentation = PresentationValue | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PresentationValue>>;\n\nexport type PaneMode = 'expanded' | 'collapsed';\nexport type SidebarMode = 'collapsed' | 'expanded';\n\nexport type ResponsiveMode = PaneMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PaneMode>>;\n\nexport type ResponsiveSidebarMode = SidebarMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', SidebarMode>>;\n\nexport type Responsive<T> = T | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', T>>;\n\n/**\n * Why a pane's open state changed. Only a user action is reported: `toggle` for a Trigger or a\n * handle double-click, and `dismiss` for Escape or a press on the scrim.\n */\nexport type PaneOpenChangeReason = 'toggle' | 'dismiss';\n\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n}\n\nexport const _BREAKPOINTS = {\n xs: '(min-width: 520px)',\n sm: '(min-width: 768px)',\n md: '(min-width: 1024px)',\n lg: '(min-width: 1280px)',\n xl: '(min-width: 1640px)',\n} as const;\n\nexport type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;\n\n/** Every breakpoint, smallest first. The stylesheet's @media blocks follow this order. */\nexport const SHELL_BREAKPOINTS: readonly Breakpoint[] = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'];\n\n/** The panes a Trigger can drive. */\nexport type PaneTarget = 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\nexport type PaneName = PaneTarget;\n\n/**\n * CSS custom property key type for type-safe style objects.\n * Allows any string prefixed with '--'.\n */\nexport type CSSCustomProperty = `--${string}`;\n\n/**\n * Style object that supports CSS custom properties.\n */\nexport type CSSPropertiesWithVars = React.CSSProperties & {\n [key: CSSCustomProperty]: string | number | undefined;\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["shell_store_exports", "__export", "FIXED_TABLE", "ShellFrameContext", "ShellStoreContext", "constantOf", "createShellStore", "notifyShellStore", "subscribeShellStore", "tableAttributes", "tableOf", "useFrameRegistration", "usePaneEntry", "useShellStore", "useStableKey", "__toCommonJS", "React", "import_internal", "SHELL_BREAKPOINTS", "isMap", "value", "tableOf", "fallback", "table", "carried", "bp", "SHELL_BREAKPOINTS", "entry", "constantOf", "first", "tableAttributes", "name", "constant", "attributes", "useStableKey", "FIXED_TABLE", "createShellStore", "notifyShellStore", "store", "listener", "subscribeShellStore", "ShellStoreContext", "useShellStore", "part", "usePaneEntry", "subscribe", "getSnapshot", "ShellFrameContext", "useFrameRegistration", "id", "flush", "ctx", "registerOffFrame", "unregisterOffFrame"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A titled panel closes from its top row (RULES.md, 2026-11-11). Every Dialog and Sheet with a
|
|
3
|
+
* title has an X at the end of a Toolbar in its top row; Cancel, Escape and a press outside don't
|
|
4
|
+
* replace it. Dev only, once per mount.
|
|
5
|
+
*
|
|
6
|
+
* It reads the DOM after paint, not the props: the title and the close can each come from the
|
|
7
|
+
* caller or from a Navigator, which draws both. Radix points `aria-labelledby` at the title's id
|
|
8
|
+
* whether or not a title mounted, so "titled" means that id names an element in the panel.
|
|
9
|
+
*/
|
|
10
|
+
declare function useCloseWarning(what: 'Dialog' | 'Sheet'): (node: HTMLElement | null) => void;
|
|
11
|
+
export { useCloseWarning };
|
|
12
|
+
//# sourceMappingURL=use-close-warning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-close-warning.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/use-close-warning.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,iBAAS,eAAe,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAwBrF;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";var a=Object.create;var r=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var o in t)r(e,o,{get:t[o],enumerable:!0})},u=(e,t,o,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of b(t))!T.call(e,n)&&n!==o&&r(e,n,{get:()=>t[n],enumerable:!(l=c(t,n))||l.enumerable});return e};var d=(e,t,o)=>(o=e!=null?a(m(e)):{},u(t||!e||!e.__esModule?r(o,"default",{value:e,enumerable:!0}):o,e)),C=e=>u(r({},"__esModule",{value:!0}),e);var A={};f(A,{useCloseWarning:()=>g});module.exports=C(A);var i=d(require("react"));function g(e){let t=i.useRef(!1);return i.useCallback(o=>{},[e])}
|
|
3
|
+
//# sourceMappingURL=use-close-warning.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/components/_internal/use-close-warning.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\n\n/**\n * A titled panel closes from its top row (RULES.md, 2026-11-11). Every Dialog and Sheet with a\n * title has an X at the end of a Toolbar in its top row; Cancel, Escape and a press outside don't\n * replace it. Dev only, once per mount.\n *\n * It reads the DOM after paint, not the props: the title and the close can each come from the\n * caller or from a Navigator, which draws both. Radix points `aria-labelledby` at the title's id\n * whether or not a title mounted, so \"titled\" means that id names an element in the panel.\n */\nfunction useCloseWarning(what: 'Dialog' | 'Sheet'): (node: HTMLElement | null) => void {\n const seen = React.useRef(false);\n return React.useCallback(\n (node: HTMLElement | null) => {\n if (process.env.NODE_ENV === 'production' || !node || seen.current) return;\n requestAnimationFrame(() => {\n if (seen.current || !node.isConnected) return;\n const titleId = node.getAttribute('aria-labelledby');\n const title = titleId ? node.ownerDocument.getElementById(titleId) : null;\n if (!title || !node.contains(title)) return;\n const close = Array.from(node.querySelectorAll('.kui-Toolbar button')).some((button) =>\n /^(close|dismiss|done)\\b/i.test((button.getAttribute('aria-label') || button.textContent || '').trim()),\n );\n if (close) return;\n seen.current = true;\n console.warn(\n `[kookie-ui] A titled <${what}> has no Close in its top row. Put a <Toolbar> first in ` +\n `<${what}.Content>, holding <Toolbar.Title><${what}.Title>\u2026</${what}.Title></Toolbar.Title> and ` +\n `<${what}.Close><Toolbar.Button iconOnly aria-label=\"Close\">\u2026</Toolbar.Button></${what}.Close>.`,\n );\n });\n },\n [what],\n );\n}\n\nexport { useCloseWarning };\n"],
|
|
5
|
+
"mappings": ";0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBAWvB,SAASF,EAAgBG,EAA8D,CACrF,IAAMC,EAAa,SAAO,EAAK,EAC/B,OAAa,cACVC,GAA6B,CAkB9B,EACA,CAACF,CAAI,CACP,CACF",
|
|
6
|
+
"names": ["use_close_warning_exports", "__export", "useCloseWarning", "__toCommonJS", "React", "what", "seen", "node"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";"use client";var Re=Object.create;var k=Object.defineProperty;var De=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Ie=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty;var Te=(o,e)=>{for(var t in e)k(o,t,{get:e[t],enumerable:!0})},B=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of we(e))!Se.call(o,n)&&n!==t&&k(o,n,{get:()=>e[n],enumerable:!(i=De(e,n))||i.enumerable});return o};var h=(o,e,t)=>(t=o!=null?Re(Ie(o)):{},B(e||!o||!o.__esModule?k(t,"default",{value:o,enumerable:!0}):t,o)),Ge=o=>B(k({},"__esModule",{value:!0}),o);var ho={};Te(ho,{Item:()=>Ce,Root:()=>ye});module.exports=Ge(ho);var f=h(require("react")),T=h(require("classnames")),me=require("radix-ui/internal");var m=h(require("react")),P=require("radix-ui"),x=require("radix-ui/internal"),{useDirection:Ne}=P.Direction,E="CheckboxGroup",[Ee,V]=x.Context.createContextScope(E,[P.Checkbox.createCheckboxScope]),A=P.Checkbox.createCheckboxScope(),[Ve,ze]=Ee(E),U=m.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,name:i,defaultValue:n,value:r,required:s=!1,disabled:c=!1,orientation:l,dir:p,loop:u,onValueChange:d,...g}=o,xe=Ne(p),[ge=[],b]=(0,x.useControllableState)({prop:r,defaultProp:n??[],onChange:d}),be=m.useCallback(G=>b((N=[])=>[...N,G]),[b]),ke=m.useCallback(G=>b((N=[])=>N.filter(ve=>ve!==G)),[b]);return m.createElement(Ve,{scope:t,name:i,required:s,disabled:c,value:ge,onItemCheck:be,onItemUncheck:ke},m.createElement(x.Primitive.div,{role:"group","data-disabled":c?"":void 0,dir:xe,...g,ref:e}))});U.displayName=E;var $="CheckboxGroupItem",H=m.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,disabled:i,...n}=o,r=ze($,t),s=r.disabled||i,c=A(t),l=r.value?.includes(n.value),p=r.required&&(r.value?.length??0)===0;return m.createElement(P.Checkbox.Root,{name:r.name,disabled:s,required:p,checked:l,...c,...n,ref:e,onCheckedChange:u=>{u?r.onItemCheck(o.value):r.onItemUncheck(o.value)}})});H.displayName=$;var je="CheckboxGroupIndicator",q=m.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,...i}=o,n=A(t);return m.createElement(P.Checkbox.Indicator,{...n,...i,ref:e})});q.displayName=je;var K=U,F=H,Z=q;var v={asChild:{type:"boolean"}};var _e=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"];var R={color:{type:"enum",values:_e,default:void 0}};var Oe=["1","2","3","4"],X={size:{type:"enum",className:"kui-r-size",values:Oe,default:"2",responsive:!0},...R};var D={...v,...X};var a=h(require("react")),We=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));We.displayName="ThickDividerHorizontalIcon";var z=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));z.displayName="ThickCheckIcon";var Me=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));Me.displayName="ChevronDownIcon";var Be=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z"})));Be.displayName="ThickChevronRightIcon";var Ae=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z"})));Ae.displayName="ThickChevronLeftIcon";var Ue=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("circle",{cx:"4.5",cy:"4.5",r:"2"})));Ue.displayName="ThickDotIcon";var $e=a.default.forwardRef((o,e)=>a.default.createElement("svg",{...o,ref:e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"M18 6 6 18"}),a.default.createElement("path",{d:"m6 6 12 12"})));$e.displayName="CloseIcon";var He=a.default.forwardRef((o,e)=>a.default.createElement("svg",{...o,ref:e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"})));He.displayName="PaperclipIcon";var qe=a.default.forwardRef((o,e)=>a.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),a.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})));qe.displayName="FileIcon";var Ke=a.default.forwardRef((o,e)=>a.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),a.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),a.default.createElement("path",{d:"M10 9H8"}),a.default.createElement("path",{d:"M16 13H8"}),a.default.createElement("path",{d:"M16 17H8"})));Ke.displayName="FileTextIcon";var Fe=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{d:"M5 12.75L9.5 17.25L19 7.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})));Fe.displayName="TickIcon";var C=h(require("react")),ce=require("radix-ui");var ee=h(require("classnames"));var Ze=[],Xe=new Set;function Ye(o){let e=Object.assign({},...o),t=[],i=[],n=new Set;for(let r in e){let s=e[r],c=s.values??Ze,l={key:r,type:s.type,default:s.default,hasDefault:s.default!==void 0,responsive:"responsive"in s,className:s.className,customProperties:s.customProperties,parseValue:s.parseValue,values:c,valueSet:c.length>0?new Set(c):Xe,enumValueSet:s.type==="enum"?new Set([s.default,...c]):void 0};s.className?(t.push(l),n.add(r)):(l.hasDefault||s.type==="enum")&&i.push(l)}return{styling:t,passthrough:i,stylingKeys:n}}var Je={children:new WeakMap};function Y(o){let e=Je;for(let t=0;t<o.length;t++){let i=o[t],n=e.children.get(i);n===void 0&&(n={children:new WeakMap},e.children.set(i,n)),e=n}return e.compiled??(e.compiled=Ye(o))}var Qe=["initial","xs","sm","md","lg","xl"],j=new Set(Qe);function L(o,e){return Object.prototype.hasOwnProperty.call(o,e)}var eo=new Set(["initial","xs","sm","md","lg","xl"]);function y(o){if(typeof o!="object"||o===null)return!1;for(let e in o)if(eo.has(e))return!0;return!1}function w(o,e,t){return e!==void 0?e.has(t):o.includes(t)}function Q({className:o,customProperties:e,...t}){let i=_({allowArbitraryValues:!0,className:o,...t}),n=oo({customProperties:e,...t});return[i,n]}function _({allowArbitraryValues:o,value:e,className:t,propValues:i,propValueSet:n,parseValue:r=s=>s}){if(e){if(typeof e=="string")return w(i,n,e)?J(t,e,r):o?t:void 0;if(y(e)){let s=e,c=[];for(let l in s){if(!L(s,l)||!j.has(l))continue;let p=s[l];if(p!==void 0){if(w(i,n,p)){let u=J(t,p,r),d=l==="initial"?u:`${l}:${u}`;c.push(d)}else if(o){let u=l==="initial"?t:`${l}:${t}`;c.push(u)}}}return c.length>0?c.join(" "):""}if(o)return t}}function J(o,e,t){let i=o?"-":"",n=t(e),r=n?.startsWith("-"),s=r?"-":"",c=r?n?.substring(1):n;return`${s}${o}${i}${c}`}function oo({customProperties:o,value:e,propValues:t,propValueSet:i,parseValue:n=r=>r}){if(!e||typeof e=="string"&&w(t,i,e))return;let r;if(typeof e=="string"){let s=n(e);r={};for(let c of o)r[c]=s;return r}if(y(e)){let s=e;for(let c in s){if(!L(s,c)||!j.has(c))continue;let l=s[c];if(l===void 0||w(t,i,l))continue;let p=n(l);r??(r={});for(let u of o){let d=c==="initial"?u:`${u}-${c}`;r[d]=p}}}return r??{}}function O(...o){let e;for(let t of o)t&&(e===void 0&&(e={}),Object.assign(e,t));return e}function to(o,e){let t=o.initial,i=!1;return e.hasDefault&&t===void 0&&(t=e.default,i=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(t)&&(t=e.default,i=!0),i?{...o,initial:t}:o}function I(o,...e){let{styling:t,passthrough:i,stylingKeys:n}=Y(e),r={};for(let l in o)n.has(l)||(r[l]=o[l]);for(let l=0;l<i.length;l++){let p=i[l],u=r[p.key];if(u===void 0){p.hasDefault&&(r[p.key]=p.default);continue}p.enumValueSet!==void 0&&!p.enumValueSet.has(u)&&!y(u)&&(r[p.key]=p.default)}let s,c=[];for(let l=0;l<t.length;l++){let p=t[l],u=o[p.key];if(u===void 0&&p.hasDefault&&(u=p.default),p.enumValueSet!==void 0&&!p.enumValueSet.has(u)&&!y(u)&&(u=p.default),!!u){if(y(u)){if(!p.responsive)continue;u=to(u,p)}if(p.type==="enum"){let d=_({allowArbitraryValues:!1,value:u,className:p.className,propValues:p.values,propValueSet:p.valueSet,parseValue:p.parseValue});d&&c.push(d);continue}if(p.type==="string"||p.type==="enum | string"){let[d,g]=Q({className:p.className,customProperties:p.customProperties,propValues:p.type==="string"?[]:p.values,propValueSet:p.type==="string"?void 0:p.valueSet,parseValue:p.parseValue,value:u});g&&(s=O(s,g)),d&&c.push(d);continue}if(p.type==="boolean"){c.push(p.className);continue}}}return r.className=(0,ee.default)(c.length>0?c.join(" "):void 0,o.className),r.style=O(s,o.style),r}var ro=["loud","medium","quiet"],oe={emphasis:{type:"enum",className:"kui-emphasis",values:ro,default:void 0}};var no=["normal","start","end","both"],te={trim:{type:"enum",className:"kui-r-lt",values:no,responsive:!0}};var so=["left","center","right"],re={align:{type:"enum",className:"kui-r-ta",values:so,responsive:!0}};var io=["wrap","nowrap","pretty","balance"],ne={wrap:{type:"enum",className:"kui-r-tw",values:io,responsive:!0}};var se={truncate:{type:"boolean",className:"kui-truncate"}};var po=["sans","mono","serif"],ie={font:{type:"enum",className:"kui-r-ff",values:po}};var ao=["regular","medium","semibold"],pe={weight:{type:"enum",className:"kui-r-weight",values:ao,responsive:!0}};var co=["span","div","label","p"],lo=["1","2","3","4","5","6","7","8","9"],ae={as:{type:"enum",values:co,default:"span"},...v,size:{type:"enum",className:"kui-r-size",values:lo,responsive:!0},...ie,...pe,...re,...te,...se,...ne,...R,...oe};var W=C.memo(C.forwardRef((o,e)=>{let{children:t,className:i,asChild:n,as:r="span",color:s,...c}=I(o,ae),l=i?`kui-Text ${i}`:"kui-Text";return n?C.createElement(ce.Slot.Root,{"data-accent-color":s,...c,ref:e,className:l},t):C.createElement(r,{"data-accent-color":s,...c,ref:e,className:l},t)}));W.displayName="Text";var S=h(require("react"));function le(o,e){if(e.includes(o))return o;let t=Number(o),i=e[0],n=1/0;for(let r=0;r<e.length;r++){let s=Math.abs(Number(e[r])-t);s<n&&(n=s,i=e[r])}return i}var ue=S.createContext("2");ue.displayName="ThemeSizeContext";function fe(o,e){let t=S.useContext(ue);return o!==void 0?o:le(t,e.values)}var de="CheckboxGroup",[fo]=me.Context.createContextScope(de,[V]),he=V(),[mo,Pe]=fo(de),ye=f.forwardRef(({color:o=D.color.default,size:e,...t},i)=>{let n=fe(e,D.size),{__scopeCheckboxGroup:r,className:s,...c}=t,l=he(r);return f.createElement(mo,{scope:r,color:o,size:n},f.createElement(K,{...l,...c,ref:i,className:(0,T.default)("kui-CheckboxGroupRoot",s)}))});ye.displayName="CheckboxGroup.Root";var Ce=f.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,children:i,className:n,style:r,...s}=o,{size:c}=Pe("CheckboxGroupItem",t);return i?f.createElement(W,{as:"label",size:c,className:(0,T.default)("kui-CheckboxGroupItem",n),style:r},f.createElement(M,{__scopeCheckboxGroup:t,...s,ref:e}),i&&f.createElement("span",{className:"kui-CheckboxGroupItemInner"},i)):f.createElement(M,{__scopeCheckboxGroup:t,...s,ref:e,className:n,style:r})});Ce.displayName="CheckboxGroup.Item";var M=f.forwardRef(({__scopeCheckboxGroup:o,...e},t)=>{let i=Pe("CheckboxGroupItemCheckbox",o),n=he(o),{color:r,className:s}=I({...e,...i},D);return f.createElement(F,{...n,"data-accent-color":r,...e,ref:t,className:(0,T.default)("kui-reset","kui-BaseCheckboxRoot","kui-CheckboxGroupItemCheckbox",s)},f.createElement(Z,{...n,asChild:!0,className:"kui-BaseCheckboxIndicator"},f.createElement(z,null)))});M.displayName="CheckboxGroup.ItemCheckbox";
|
|
2
|
+
"use strict";"use client";var be=Object.create;var b=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var De=Object.getPrototypeOf,we=Object.prototype.hasOwnProperty;var Ie=(o,e)=>{for(var t in e)b(o,t,{get:e[t],enumerable:!0})},B=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Re(e))!we.call(o,n)&&n!==t&&b(o,n,{get:()=>e[n],enumerable:!(i=ve(e,n))||i.enumerable});return o};var h=(o,e,t)=>(t=o!=null?be(De(o)):{},B(e||!o||!o.__esModule?b(t,"default",{value:o,enumerable:!0}):t,o)),Se=o=>B(b({},"__esModule",{value:!0}),o);var fo={};Ie(fo,{Item:()=>Ce,Root:()=>ye});module.exports=Se(fo);var f=h(require("react")),T=h(require("classnames")),me=require("radix-ui/internal");var m=h(require("react")),P=require("radix-ui"),x=require("radix-ui/internal"),{useDirection:Te}=P.Direction,E="CheckboxGroup",[Ge,V]=x.Context.createContextScope(E,[P.Checkbox.createCheckboxScope]),A=P.Checkbox.createCheckboxScope(),[Ne,Ee]=Ge(E),U=m.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,name:i,defaultValue:n,value:r,required:s=!1,disabled:c=!1,dir:l,onValueChange:p,...u}=o,d=Te(l),[g=[],k]=(0,x.useControllableState)({prop:r,defaultProp:n??[],onChange:p}),xe=m.useCallback(G=>k((N=[])=>[...N,G]),[k]),ge=m.useCallback(G=>k((N=[])=>N.filter(ke=>ke!==G)),[k]);return m.createElement(Ne,{scope:t,name:i,required:s,disabled:c,value:g,onItemCheck:xe,onItemUncheck:ge},m.createElement(x.Primitive.div,{role:"group","data-disabled":c?"":void 0,dir:d,...u,ref:e}))});U.displayName=E;var $="CheckboxGroupItem",H=m.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,disabled:i,...n}=o,r=Ee($,t),s=r.disabled||i,c=A(t),l=r.value?.includes(n.value),p=r.required&&(r.value?.length??0)===0;return m.createElement(P.Checkbox.Root,{name:r.name,disabled:s,required:p,checked:l,...c,...n,ref:e,onCheckedChange:u=>{u?r.onItemCheck(o.value):r.onItemUncheck(o.value)}})});H.displayName=$;var Ve="CheckboxGroupIndicator",q=m.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,...i}=o,n=A(t);return m.createElement(P.Checkbox.Indicator,{...n,...i,ref:e})});q.displayName=Ve;var K=U,F=H,Z=q;var v={asChild:{type:"boolean"}};var je=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"];var R={color:{type:"enum",values:je,default:void 0}};var Le=["1","2","3","4"],X={size:{type:"enum",className:"kui-r-size",values:Le,default:"2",responsive:!0},...R};var D={...v,...X};var a=h(require("react")),Oe=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));Oe.displayName="ThickDividerHorizontalIcon";var z=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));z.displayName="ThickCheckIcon";var _e=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));_e.displayName="ChevronDownIcon";var We=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z"})));We.displayName="ThickChevronRightIcon";var Me=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z"})));Me.displayName="ThickChevronLeftIcon";var Be=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("circle",{cx:"4.5",cy:"4.5",r:"2"})));Be.displayName="ThickDotIcon";var Ae=a.default.forwardRef((o,e)=>a.default.createElement("svg",{...o,ref:e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"M18 6 6 18"}),a.default.createElement("path",{d:"m6 6 12 12"})));Ae.displayName="CloseIcon";var Ue=a.default.forwardRef((o,e)=>a.default.createElement("svg",{...o,ref:e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"})));Ue.displayName="PaperclipIcon";var $e=a.default.forwardRef((o,e)=>a.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),a.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})));$e.displayName="FileIcon";var He=a.default.forwardRef((o,e)=>a.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),a.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),a.default.createElement("path",{d:"M10 9H8"}),a.default.createElement("path",{d:"M16 13H8"}),a.default.createElement("path",{d:"M16 17H8"})));He.displayName="FileTextIcon";var qe=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{d:"M5 12.75L9.5 17.25L19 7.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})));qe.displayName="TickIcon";var C=h(require("react")),ce=require("radix-ui");var ee=h(require("classnames"));var Ke=[],Fe=new Set;function Ze(o){let e=Object.assign({},...o),t=[],i=[],n=new Set;for(let r in e){let s=e[r],c=s.values??Ke,l={key:r,type:s.type,default:s.default,hasDefault:s.default!==void 0,responsive:"responsive"in s,className:s.className,customProperties:s.customProperties,parseValue:s.parseValue,values:c,valueSet:c.length>0?new Set(c):Fe,enumValueSet:s.type==="enum"?new Set([s.default,...c]):void 0};s.className?(t.push(l),n.add(r)):(l.hasDefault||s.type==="enum")&&i.push(l)}return{styling:t,passthrough:i,stylingKeys:n}}var Xe={children:new WeakMap};function Y(o){let e=Xe;for(let t=0;t<o.length;t++){let i=o[t],n=e.children.get(i);n===void 0&&(n={children:new WeakMap},e.children.set(i,n)),e=n}return e.compiled??(e.compiled=Ze(o))}var Ye=["initial","xs","sm","md","lg","xl"],j=new Set(Ye);function L(o,e){return Object.prototype.hasOwnProperty.call(o,e)}var Je=new Set(["initial","xs","sm","md","lg","xl"]);function y(o){if(typeof o!="object"||o===null)return!1;for(let e in o)if(Je.has(e))return!0;return!1}function w(o,e,t){return e!==void 0?e.has(t):o.includes(t)}function Q({className:o,customProperties:e,...t}){let i=O({allowArbitraryValues:!0,className:o,...t}),n=Qe({customProperties:e,...t});return[i,n]}function O({allowArbitraryValues:o,value:e,className:t,propValues:i,propValueSet:n,parseValue:r=s=>s}){if(e){if(typeof e=="string")return w(i,n,e)?J(t,e,r):o?t:void 0;if(y(e)){let s=e,c=[];for(let l in s){if(!L(s,l)||!j.has(l))continue;let p=s[l];if(p!==void 0){if(w(i,n,p)){let u=J(t,p,r),d=l==="initial"?u:`${l}:${u}`;c.push(d)}else if(o){let u=l==="initial"?t:`${l}:${t}`;c.push(u)}}}return c.length>0?c.join(" "):""}if(o)return t}}function J(o,e,t){let i=o?"-":"",n=t(e),r=n?.startsWith("-"),s=r?"-":"",c=r?n?.substring(1):n;return`${s}${o}${i}${c}`}function Qe({customProperties:o,value:e,propValues:t,propValueSet:i,parseValue:n=r=>r}){if(!e||typeof e=="string"&&w(t,i,e))return;let r;if(typeof e=="string"){let s=n(e);r={};for(let c of o)r[c]=s;return r}if(y(e)){let s=e;for(let c in s){if(!L(s,c)||!j.has(c))continue;let l=s[c];if(l===void 0||w(t,i,l))continue;let p=n(l);r??(r={});for(let u of o){let d=c==="initial"?u:`${u}-${c}`;r[d]=p}}}return r??{}}function _(...o){let e;for(let t of o)t&&(e===void 0&&(e={}),Object.assign(e,t));return e}function eo(o,e){let t=o.initial,i=!1;return e.hasDefault&&t===void 0&&(t=e.default,i=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(t)&&(t=e.default,i=!0),i?{...o,initial:t}:o}function I(o,...e){let{styling:t,passthrough:i,stylingKeys:n}=Y(e),r={};for(let l in o)n.has(l)||(r[l]=o[l]);for(let l=0;l<i.length;l++){let p=i[l],u=r[p.key];if(u===void 0){p.hasDefault&&(r[p.key]=p.default);continue}p.enumValueSet!==void 0&&!p.enumValueSet.has(u)&&!y(u)&&(r[p.key]=p.default)}let s,c=[];for(let l=0;l<t.length;l++){let p=t[l],u=o[p.key];if(u===void 0&&p.hasDefault&&(u=p.default),p.enumValueSet!==void 0&&!p.enumValueSet.has(u)&&!y(u)&&(u=p.default),!!u){if(y(u)){if(!p.responsive)continue;u=eo(u,p)}if(p.type==="enum"){let d=O({allowArbitraryValues:!1,value:u,className:p.className,propValues:p.values,propValueSet:p.valueSet,parseValue:p.parseValue});d&&c.push(d);continue}if(p.type==="string"||p.type==="enum | string"){let[d,g]=Q({className:p.className,customProperties:p.customProperties,propValues:p.type==="string"?[]:p.values,propValueSet:p.type==="string"?void 0:p.valueSet,parseValue:p.parseValue,value:u});g&&(s=_(s,g)),d&&c.push(d);continue}if(p.type==="boolean"){c.push(p.className);continue}}}return r.className=(0,ee.default)(c.length>0?c.join(" "):void 0,o.className),r.style=_(s,o.style),r}var oo=["loud","medium","quiet"],oe={emphasis:{type:"enum",className:"kui-emphasis",values:oo,default:void 0}};var to=["normal","start","end","both"],te={trim:{type:"enum",className:"kui-r-lt",values:to,responsive:!0}};var ro=["left","center","right"],re={align:{type:"enum",className:"kui-r-ta",values:ro,responsive:!0}};var no=["wrap","nowrap","pretty","balance"],ne={wrap:{type:"enum",className:"kui-r-tw",values:no,responsive:!0}};var se={truncate:{type:"boolean",className:"kui-truncate"}};var so=["sans","mono","serif"],ie={font:{type:"enum",className:"kui-r-ff",values:so}};var io=["regular","medium","semibold"],pe={weight:{type:"enum",className:"kui-r-weight",values:io,responsive:!0}};var po=["span","div","label","p"],ao=["1","2","3","4","5","6","7","8","9"],ae={as:{type:"enum",values:po,default:"span"},...v,size:{type:"enum",className:"kui-r-size",values:ao,responsive:!0},...ie,...pe,...re,...te,...se,...ne,...R,...oe};var W=C.memo(C.forwardRef((o,e)=>{let{children:t,className:i,asChild:n,as:r="span",color:s,...c}=I(o,ae),l=i?`kui-Text ${i}`:"kui-Text";return n?C.createElement(ce.Slot.Root,{"data-accent-color":s,...c,ref:e,className:l},t):C.createElement(r,{"data-accent-color":s,...c,ref:e,className:l},t)}));W.displayName="Text";var S=h(require("react"));function le(o,e){if(e.includes(o))return o;let t=Number(o),i=e[0],n=1/0;for(let r=0;r<e.length;r++){let s=Math.abs(Number(e[r])-t);s<n&&(n=s,i=e[r])}return i}var ue=S.createContext("2");ue.displayName="ThemeSizeContext";function fe(o,e){let t=S.useContext(ue);return o!==void 0?o:le(t,e.values)}var de="CheckboxGroup",[lo]=me.Context.createContextScope(de,[V]),he=V(),[uo,Pe]=lo(de),ye=f.forwardRef(({color:o=D.color.default,size:e,...t},i)=>{let n=fe(e,D.size),{__scopeCheckboxGroup:r,className:s,...c}=t,l=he(r);return f.createElement(uo,{scope:r,color:o,size:n},f.createElement(K,{...l,...c,ref:i,className:(0,T.default)("kui-CheckboxGroupRoot",s)}))});ye.displayName="CheckboxGroup.Root";var Ce=f.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,children:i,className:n,style:r,...s}=o,{size:c}=Pe("CheckboxGroupItem",t);return i?f.createElement(W,{as:"label",size:c,className:(0,T.default)("kui-CheckboxGroupItem",n),style:r},f.createElement(M,{__scopeCheckboxGroup:t,...s,ref:e}),i&&f.createElement("span",{className:"kui-CheckboxGroupItemInner"},i)):f.createElement(M,{__scopeCheckboxGroup:t,...s,ref:e,className:n,style:r})});Ce.displayName="CheckboxGroup.Item";var M=f.forwardRef(({__scopeCheckboxGroup:o,...e},t)=>{let i=Pe("CheckboxGroupItemCheckbox",o),n=he(o),{color:r,className:s}=I({...e,...i},D);return f.createElement(F,{...n,"data-accent-color":r,...e,ref:t,className:(0,T.default)("kui-reset","kui-BaseCheckboxRoot","kui-CheckboxGroupItemCheckbox",s)},f.createElement(Z,{...n,asChild:!0,className:"kui-BaseCheckboxIndicator"},f.createElement(z,null)))});M.displayName="CheckboxGroup.ItemCheckbox";
|
|
3
3
|
//# sourceMappingURL=checkbox-group.js.map
|