@womp/kookie-ui 0.26.1 → 0.26.3
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 +50 -2
- package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-button.js +1 -1
- package/dist/cjs/components/_internal/base-button.js.map +3 -3
- package/dist/cjs/components/_internal/base-button.props.js +0 -1
- package/dist/cjs/components/_internal/base-button.props.js.map +1 -1
- package/dist/cjs/components/_internal/base-checkbox.props.js +0 -1
- package/dist/cjs/components/_internal/base-checkbox.props.js.map +1 -1
- package/dist/cjs/components/_internal/base-menu.props.js +0 -1
- package/dist/cjs/components/_internal/base-menu.props.js.map +1 -1
- package/dist/cjs/components/_internal/base-radio.props.js +0 -1
- package/dist/cjs/components/_internal/base-radio.props.js.map +1 -1
- package/dist/cjs/components/_internal/base-tab-list.props.js +0 -1
- package/dist/cjs/components/_internal/base-tab-list.props.js.map +1 -1
- package/dist/cjs/components/_internal/pane-band-context.d.ts +15 -0
- package/dist/cjs/components/_internal/pane-band-context.d.ts.map +1 -0
- package/dist/cjs/components/_internal/pane-band-context.js +3 -0
- package/dist/cjs/components/_internal/pane-band-context.js.map +7 -0
- package/dist/cjs/components/_internal/pane-chrome.d.ts +1 -1
- package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js.map +4 -4
- package/dist/cjs/components/_internal/portal-theme.d.ts +9 -0
- package/dist/cjs/components/_internal/portal-theme.d.ts.map +1 -0
- package/dist/cjs/components/_internal/portal-theme.js +3 -0
- package/dist/cjs/components/_internal/portal-theme.js.map +7 -0
- 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-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
- package/dist/cjs/components/accordion.props.js +0 -1
- package/dist/cjs/components/accordion.props.js.map +1 -1
- package/dist/cjs/components/alert-dialog.js +1 -1
- package/dist/cjs/components/alert-dialog.js.map +4 -4
- package/dist/cjs/components/alert-dialog.props.js +0 -1
- package/dist/cjs/components/alert-dialog.props.js.map +1 -1
- package/dist/cjs/components/avatar.props.js +0 -1
- package/dist/cjs/components/avatar.props.js.map +1 -1
- package/dist/cjs/components/blockquote.props.js +0 -1
- package/dist/cjs/components/blockquote.props.js.map +1 -1
- package/dist/cjs/components/box.props.js +0 -1
- package/dist/cjs/components/box.props.js.map +1 -1
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +4 -4
- package/dist/cjs/components/button.props.js +0 -1
- package/dist/cjs/components/button.props.js.map +1 -1
- package/dist/cjs/components/card.props.js +0 -1
- package/dist/cjs/components/card.props.js.map +1 -1
- package/dist/cjs/components/chatbar.js +1 -1
- package/dist/cjs/components/chatbar.js.map +4 -4
- package/dist/cjs/components/checkbox-group.props.js +0 -1
- package/dist/cjs/components/checkbox-group.props.js.map +1 -1
- package/dist/cjs/components/checkbox.props.js +0 -1
- package/dist/cjs/components/checkbox.props.js.map +1 -1
- package/dist/cjs/components/chip.js +1 -1
- package/dist/cjs/components/chip.js.map +4 -4
- package/dist/cjs/components/chip.props.js +0 -1
- package/dist/cjs/components/chip.props.js.map +1 -1
- package/dist/cjs/components/code.props.js +0 -1
- package/dist/cjs/components/code.props.js.map +1 -1
- package/dist/cjs/components/combobox.d.ts.map +1 -1
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +4 -4
- package/dist/cjs/components/combobox.props.js +0 -1
- package/dist/cjs/components/combobox.props.js.map +1 -1
- 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 +4 -4
- package/dist/cjs/components/context-menu.props.js +0 -1
- package/dist/cjs/components/context-menu.props.js.map +1 -1
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +4 -4
- package/dist/cjs/components/dialog.props.js +0 -1
- package/dist/cjs/components/dialog.props.js.map +1 -1
- package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +4 -4
- package/dist/cjs/components/dropdown-menu.props.js +0 -1
- package/dist/cjs/components/dropdown-menu.props.js.map +1 -1
- package/dist/cjs/components/flex.props.js +0 -1
- package/dist/cjs/components/flex.props.js.map +1 -1
- package/dist/cjs/components/grid.props.js +0 -1
- package/dist/cjs/components/grid.props.js.map +1 -1
- package/dist/cjs/components/heading.props.js +0 -1
- package/dist/cjs/components/heading.props.js.map +1 -1
- package/dist/cjs/components/image.props.js +0 -1
- package/dist/cjs/components/image.props.js.map +1 -1
- package/dist/cjs/components/index.js +2 -2
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/kbd.props.js +0 -1
- package/dist/cjs/components/kbd.props.js.map +1 -1
- package/dist/cjs/components/link.props.js +0 -1
- package/dist/cjs/components/link.props.js.map +1 -1
- package/dist/cjs/components/message-scroller.js +1 -1
- package/dist/cjs/components/message-scroller.js.map +4 -4
- package/dist/cjs/components/navbar.props.js +0 -1
- package/dist/cjs/components/navbar.props.js.map +1 -1
- package/dist/cjs/components/notice.js +1 -1
- package/dist/cjs/components/notice.js.map +4 -4
- package/dist/cjs/components/popover.d.ts.map +1 -1
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +4 -4
- package/dist/cjs/components/popover.props.js +0 -1
- package/dist/cjs/components/popover.props.js.map +1 -1
- package/dist/cjs/components/progress.props.js +0 -1
- package/dist/cjs/components/progress.props.js.map +1 -1
- package/dist/cjs/components/radio-group.props.js +0 -1
- package/dist/cjs/components/radio-group.props.js.map +1 -1
- package/dist/cjs/components/radio.props.js +0 -1
- package/dist/cjs/components/radio.props.js.map +1 -1
- package/dist/cjs/components/scroll-area.d.ts.map +1 -1
- package/dist/cjs/components/scroll-area.js +1 -1
- package/dist/cjs/components/scroll-area.js.map +3 -3
- package/dist/cjs/components/scroll-area.props.js +0 -1
- package/dist/cjs/components/scroll-area.props.js.map +1 -1
- package/dist/cjs/components/segmented-control.props.js +0 -1
- package/dist/cjs/components/segmented-control.props.js.map +1 -1
- package/dist/cjs/components/select.d.ts.map +1 -1
- package/dist/cjs/components/select.js +1 -1
- package/dist/cjs/components/select.js.map +4 -4
- package/dist/cjs/components/select.props.js +0 -1
- package/dist/cjs/components/select.props.js.map +1 -1
- package/dist/cjs/components/separator.props.js +0 -1
- package/dist/cjs/components/separator.props.js.map +1 -1
- package/dist/cjs/components/sheet.js +1 -1
- package/dist/cjs/components/sheet.js.map +4 -4
- package/dist/cjs/components/shell.d.ts.map +1 -1
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +4 -4
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +4 -4
- package/dist/cjs/components/slider.d.ts.map +1 -1
- package/dist/cjs/components/slider.js +1 -1
- package/dist/cjs/components/slider.js.map +3 -3
- package/dist/cjs/components/slider.props.js +0 -1
- package/dist/cjs/components/slider.props.js.map +1 -1
- package/dist/cjs/components/spinner.d.ts.map +1 -1
- package/dist/cjs/components/spinner.js +1 -1
- package/dist/cjs/components/spinner.js.map +2 -2
- package/dist/cjs/components/spinner.props.js +0 -1
- package/dist/cjs/components/spinner.props.js.map +1 -1
- package/dist/cjs/components/switch.props.js +0 -1
- package/dist/cjs/components/switch.props.js.map +1 -1
- package/dist/cjs/components/table.js +1 -1
- package/dist/cjs/components/table.js.map +3 -3
- package/dist/cjs/components/table.props.js +0 -1
- package/dist/cjs/components/table.props.js.map +1 -1
- package/dist/cjs/components/tabs.props.js +0 -1
- package/dist/cjs/components/tabs.props.js.map +1 -1
- package/dist/cjs/components/text-area.d.ts.map +1 -1
- package/dist/cjs/components/text-area.js +1 -1
- package/dist/cjs/components/text-area.js.map +3 -3
- package/dist/cjs/components/text-area.props.js +0 -1
- package/dist/cjs/components/text-area.props.js.map +1 -1
- package/dist/cjs/components/text-field.d.ts.map +1 -1
- package/dist/cjs/components/text-field.js +2 -2
- package/dist/cjs/components/text-field.js.map +3 -3
- package/dist/cjs/components/text-field.props.js +0 -1
- package/dist/cjs/components/text-field.props.js.map +1 -1
- package/dist/cjs/components/text.props.js +0 -1
- package/dist/cjs/components/text.props.js.map +1 -1
- package/dist/cjs/components/theme.props.js +0 -1
- package/dist/cjs/components/theme.props.js.map +1 -1
- package/dist/cjs/components/toggle.js +1 -1
- package/dist/cjs/components/toggle.js.map +4 -4
- package/dist/cjs/components/toolbar.js +1 -1
- package/dist/cjs/components/toolbar.js.map +4 -4
- package/dist/cjs/components/toolbar.props.d.ts +3 -2
- package/dist/cjs/components/toolbar.props.d.ts.map +1 -1
- package/dist/cjs/components/toolbar.props.js +0 -1
- package/dist/cjs/components/toolbar.props.js.map +2 -2
- package/dist/cjs/components/tooltip.js +1 -1
- package/dist/cjs/components/tooltip.js.map +4 -4
- package/dist/cjs/components/tooltip.props.js +0 -1
- package/dist/cjs/components/tooltip.props.js.map +1 -1
- package/dist/cjs/hooks/use-scroll-edges.d.ts +9 -0
- package/dist/cjs/hooks/use-scroll-edges.d.ts.map +1 -1
- package/dist/cjs/hooks/use-scroll-edges.js +1 -1
- package/dist/cjs/hooks/use-scroll-edges.js.map +3 -3
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +4 -4
- package/dist/esm/chunk-27XQ5PN5.js +3 -0
- package/dist/esm/chunk-27XQ5PN5.js.map +7 -0
- package/dist/esm/chunk-2ACVWLFA.js +3 -0
- package/dist/esm/chunk-2NWHEGKZ.js +3 -0
- package/dist/esm/chunk-2NWHEGKZ.js.map +7 -0
- package/dist/esm/{chunk-W4MQ6TEK.js → chunk-2R7WQPXX.js} +2 -2
- package/dist/esm/chunk-2R7WQPXX.js.map +7 -0
- package/dist/esm/{chunk-I3SRUPUP.js → chunk-2ZLMWYJ6.js} +2 -3
- package/dist/esm/{chunk-I3SRUPUP.js.map → chunk-2ZLMWYJ6.js.map} +1 -1
- package/dist/esm/chunk-324VC67W.js +3 -0
- package/dist/esm/chunk-324VC67W.js.map +7 -0
- package/dist/esm/chunk-3UIODOPE.js +3 -0
- package/dist/esm/chunk-3UIODOPE.js.map +7 -0
- package/dist/esm/chunk-3W34KH33.js +2 -0
- package/dist/esm/{chunk-4S5L25RO.js.map → chunk-3W34KH33.js.map} +1 -1
- package/dist/esm/chunk-4CIQRUYW.js +6 -0
- package/dist/esm/chunk-4CIQRUYW.js.map +7 -0
- package/dist/esm/chunk-4E5XBM5Q.js +2 -0
- package/dist/esm/{chunk-IE5ACUZS.js.map → chunk-4E5XBM5Q.js.map} +1 -1
- package/dist/esm/{chunk-QH64BDXO.js → chunk-4G3FJUER.js} +2 -2
- package/dist/esm/{chunk-R7THBMND.js → chunk-4KIZRO52.js} +1 -1
- package/dist/esm/chunk-4MNRLB57.js +3 -0
- package/dist/esm/chunk-4MNRLB57.js.map +7 -0
- package/dist/esm/chunk-5KJIPH2N.js +3 -0
- package/dist/esm/chunk-5KJIPH2N.js.map +7 -0
- package/dist/esm/chunk-5XA2N2WR.js +2 -0
- package/dist/esm/{chunk-R7THBMND.js.map → chunk-5XA2N2WR.js.map} +1 -1
- package/dist/esm/{chunk-7B3XDZXZ.js → chunk-6C6EK2B5.js} +2 -2
- package/dist/esm/chunk-6DWDNKLS.js +1 -0
- package/dist/esm/chunk-6JGF6PQH.js +3 -0
- package/dist/esm/{chunk-JS23YQ4M.js.map → chunk-6JGF6PQH.js.map} +4 -4
- package/dist/esm/{chunk-CYTPMHSJ.js → chunk-7QBNXNEN.js} +2 -2
- package/dist/esm/{chunk-YOSCUA6Z.js → chunk-ACMANOVD.js} +2 -2
- package/dist/esm/{chunk-I6SMGWS5.js → chunk-AJWCSQIE.js} +2 -3
- package/dist/esm/chunk-AJWCSQIE.js.map +7 -0
- package/dist/esm/chunk-AKXBXLCP.js +2 -0
- package/dist/esm/chunk-AKXBXLCP.js.map +7 -0
- package/dist/esm/chunk-ANQLWGFN.js +3 -0
- package/dist/esm/chunk-ANQLWGFN.js.map +7 -0
- package/dist/esm/chunk-BF4WRYUX.js +2 -0
- package/dist/esm/{chunk-M3NI3D6R.js.map → chunk-BF4WRYUX.js.map} +1 -1
- package/dist/esm/{chunk-5WTSKXAE.js → chunk-BIITGC3Z.js} +2 -3
- package/dist/esm/{chunk-5WTSKXAE.js.map → chunk-BIITGC3Z.js.map} +1 -1
- package/dist/esm/{chunk-NBVCQQSY.js → chunk-BP64M73W.js} +2 -3
- package/dist/esm/{chunk-NBVCQQSY.js.map → chunk-BP64M73W.js.map} +1 -1
- package/dist/esm/chunk-BQC2P3SN.js +3 -0
- package/dist/esm/chunk-BQC2P3SN.js.map +7 -0
- package/dist/esm/chunk-BUXK5VGR.js +3 -0
- package/dist/esm/chunk-BUXK5VGR.js.map +7 -0
- package/dist/esm/chunk-C67MM24U.js +3 -0
- package/dist/esm/chunk-C67MM24U.js.map +7 -0
- package/dist/esm/{chunk-5TJH35TF.js → chunk-CGFLZ3DC.js} +2 -2
- package/dist/esm/chunk-CT543Q2V.js +2 -0
- package/dist/esm/{chunk-YZZMQ457.js.map → chunk-CT543Q2V.js.map} +1 -1
- package/dist/esm/chunk-D2C2A2ZK.js +3 -0
- package/dist/esm/{chunk-ZPWKWESI.js.map → chunk-D2C2A2ZK.js.map} +4 -4
- package/dist/esm/chunk-DFGY2NZB.js +2 -0
- package/dist/esm/{chunk-SGJKXIWG.js.map → chunk-DFGY2NZB.js.map} +1 -1
- package/dist/esm/{chunk-4J7QDLKI.js → chunk-DFLWZOQO.js} +2 -3
- package/dist/esm/{chunk-4J7QDLKI.js.map → chunk-DFLWZOQO.js.map} +1 -1
- package/dist/esm/chunk-DSM5SUH3.js +3 -0
- package/dist/esm/{chunk-FCKJD2PW.js.map → chunk-DSM5SUH3.js.map} +4 -4
- package/dist/esm/chunk-E2LSWNWZ.js +3 -0
- package/dist/esm/{chunk-CBWERXF4.js.map → chunk-E2LSWNWZ.js.map} +4 -4
- package/dist/esm/{chunk-XL5OHW6Z.js → chunk-EB4AG3OL.js} +2 -2
- package/dist/esm/chunk-EFXHBH3A.js +2 -0
- package/dist/esm/{chunk-XMHNOIPB.js.map → chunk-EFXHBH3A.js.map} +1 -1
- package/dist/esm/{chunk-6FLLFCBU.js → chunk-ELAW7ZUG.js} +2 -2
- package/dist/esm/chunk-ENQV6SEA.js +3 -0
- package/dist/esm/{chunk-YD2D73LF.js.map → chunk-ENQV6SEA.js.map} +4 -4
- package/dist/esm/chunk-EPGIYTFK.js +3 -0
- package/dist/esm/chunk-EPGIYTFK.js.map +7 -0
- package/dist/esm/{chunk-WT2SYGTU.js → chunk-ETQNRMHU.js} +2 -3
- package/dist/esm/{chunk-WT2SYGTU.js.map → chunk-ETQNRMHU.js.map} +1 -1
- package/dist/esm/{chunk-PT45Q47V.js → chunk-FATCGZZE.js} +1 -1
- package/dist/esm/{chunk-IZIDRDQW.js → chunk-FH6RT6XH.js} +2 -3
- package/dist/esm/{chunk-IZIDRDQW.js.map → chunk-FH6RT6XH.js.map} +1 -1
- package/dist/esm/chunk-FK434VPA.js +3 -0
- package/dist/esm/{chunk-PCLO3ZZY.js.map → chunk-FK434VPA.js.map} +4 -4
- package/dist/esm/chunk-FNAE6HUI.js +2 -0
- package/dist/esm/chunk-FNAE6HUI.js.map +7 -0
- package/dist/esm/chunk-FYTLUDL3.js +3 -0
- package/dist/esm/{chunk-37GC4A2O.js.map → chunk-FYTLUDL3.js.map} +4 -4
- package/dist/esm/chunk-GMWCTK5G.js +3 -0
- package/dist/esm/chunk-GMWCTK5G.js.map +7 -0
- package/dist/esm/chunk-H3IAGAEL.js +2 -0
- package/dist/esm/{chunk-WCGQ4IDE.js.map → chunk-H3IAGAEL.js.map} +1 -1
- package/dist/esm/{chunk-PT4KBXXP.js → chunk-HCBR74BW.js} +2 -3
- package/dist/esm/{chunk-PT4KBXXP.js.map → chunk-HCBR74BW.js.map} +1 -1
- package/dist/esm/{chunk-TGUWRU7N.js → chunk-HIEGLLY7.js} +1 -2
- package/dist/esm/{chunk-TGUWRU7N.js.map → chunk-HIEGLLY7.js.map} +1 -1
- package/dist/esm/chunk-HLIOHDEX.js +3 -0
- package/dist/esm/chunk-HLIOHDEX.js.map +7 -0
- package/dist/esm/chunk-HSWMHW37.js +2 -0
- package/dist/esm/{chunk-SV3CYQY5.js.map → chunk-HSWMHW37.js.map} +1 -1
- package/dist/esm/chunk-IDEDEPBM.js +3 -0
- package/dist/esm/chunk-IDEDEPBM.js.map +7 -0
- package/dist/esm/{chunk-CV7QQTI3.js → chunk-ISCZ57VL.js} +2 -2
- package/dist/esm/chunk-JD4KR6VZ.js +3 -0
- package/dist/esm/chunk-JP36JSNP.js +3 -0
- package/dist/esm/chunk-JP36JSNP.js.map +7 -0
- package/dist/esm/{chunk-IZXML75Y.js → chunk-JQVW4WNN.js} +2 -2
- package/dist/esm/{chunk-Z563IAE3.js → chunk-KLYI5E6F.js} +2 -2
- package/dist/esm/chunk-KVOWI6SN.js +2 -0
- package/dist/esm/{chunk-HV7USGHD.js.map → chunk-KVOWI6SN.js.map} +1 -1
- package/dist/esm/{chunk-WZKSLTBH.js → chunk-KVVRFWGQ.js} +2 -2
- package/dist/esm/{chunk-VVBSYWUA.js → chunk-LTUW36HM.js} +2 -2
- package/dist/esm/{chunk-QQY4WFJL.js → chunk-LUNWI377.js} +2 -3
- package/dist/esm/{chunk-QQY4WFJL.js.map → chunk-LUNWI377.js.map} +1 -1
- package/dist/esm/chunk-MCHK36NI.js +3 -0
- package/dist/esm/chunk-MCHK36NI.js.map +7 -0
- package/dist/esm/chunk-MGWGD6KI.js +3 -0
- package/dist/esm/chunk-MGWGD6KI.js.map +7 -0
- package/dist/esm/chunk-MPCCYR7L.js +3 -0
- package/dist/esm/chunk-MPCCYR7L.js.map +7 -0
- package/dist/esm/{chunk-PZ6Z7WTR.js → chunk-NNE3KNH4.js} +2 -3
- package/dist/esm/{chunk-PZ6Z7WTR.js.map → chunk-NNE3KNH4.js.map} +1 -1
- package/dist/esm/{chunk-CKJXTEVO.js → chunk-NR5FQCMU.js} +2 -3
- package/dist/esm/{chunk-CKJXTEVO.js.map → chunk-NR5FQCMU.js.map} +1 -1
- package/dist/esm/chunk-NWXODCTD.js +3 -0
- package/dist/esm/{chunk-BXZSJKWA.js.map → chunk-NWXODCTD.js.map} +4 -4
- package/dist/esm/chunk-OA7C34MJ.js +1 -0
- package/dist/esm/{chunk-65KD6WS6.js → chunk-OEPVYHSS.js} +2 -3
- package/dist/esm/{chunk-65KD6WS6.js.map → chunk-OEPVYHSS.js.map} +1 -1
- package/dist/esm/chunk-OLTRWCQK.js +3 -0
- package/dist/esm/chunk-OLTRWCQK.js.map +7 -0
- package/dist/esm/chunk-OLWUS7PC.js +3 -0
- package/dist/esm/chunk-OLWUS7PC.js.map +7 -0
- package/dist/esm/{chunk-647DRBXQ.js → chunk-OSSNMF5U.js} +2 -3
- package/dist/esm/{chunk-647DRBXQ.js.map → chunk-OSSNMF5U.js.map} +1 -1
- package/dist/esm/chunk-OUOP6Q3Z.js +3 -0
- package/dist/esm/chunk-OUOP6Q3Z.js.map +7 -0
- package/dist/esm/{chunk-TDT2CNES.js → chunk-P6UX6FFY.js} +2 -2
- package/dist/esm/{chunk-JUY7CBSL.js → chunk-PBFSBHBS.js} +2 -2
- package/dist/esm/chunk-PEMFIU3B.js +2 -0
- package/dist/esm/{chunk-BOLSK63X.js.map → chunk-PEMFIU3B.js.map} +1 -1
- package/dist/esm/{chunk-3B25RLWX.js → chunk-Q2TLWILH.js} +2 -2
- package/dist/esm/chunk-Q5SANVIW.js +3 -0
- package/dist/esm/chunk-Q5SANVIW.js.map +7 -0
- package/dist/esm/chunk-QPRUTOLI.js +3 -0
- package/dist/esm/chunk-QPRUTOLI.js.map +7 -0
- package/dist/esm/chunk-QRV32INS.js +3 -0
- package/dist/esm/chunk-QRV32INS.js.map +7 -0
- package/dist/esm/chunk-R7YHDIFM.js +3 -0
- package/dist/esm/chunk-R7YHDIFM.js.map +7 -0
- package/dist/esm/{chunk-EY6TCYGG.js → chunk-RAVZ7F5L.js} +2 -3
- package/dist/esm/{chunk-EY6TCYGG.js.map → chunk-RAVZ7F5L.js.map} +1 -1
- package/dist/esm/chunk-RP5ORPPH.js +3 -0
- package/dist/esm/{chunk-BVFHJP5E.js.map → chunk-RP5ORPPH.js.map} +4 -4
- package/dist/esm/chunk-SKOYHBIE.js +2 -0
- package/dist/esm/{chunk-5RFDCAKC.js.map → chunk-SKOYHBIE.js.map} +1 -1
- package/dist/esm/chunk-STPMPY3X.js +1 -0
- package/dist/esm/chunk-T2DZDW5Y.js +3 -0
- package/dist/esm/chunk-T2DZDW5Y.js.map +7 -0
- package/dist/esm/chunk-TZTUPQYK.js +2 -0
- package/dist/esm/{chunk-XVDT6DQZ.js.map → chunk-TZTUPQYK.js.map} +1 -1
- package/dist/esm/chunk-UICSVJ3B.js +1 -0
- package/dist/esm/chunk-UJ7JERJ5.js +3 -0
- package/dist/esm/chunk-UJ7JERJ5.js.map +7 -0
- package/dist/esm/{chunk-6RJQ5LLP.js → chunk-UMR4AF35.js} +2 -2
- package/dist/esm/chunk-UMYPLUG3.js +2 -0
- package/dist/esm/chunk-UMYPLUG3.js.map +7 -0
- package/dist/esm/chunk-UONSKZQT.js +2 -0
- package/dist/esm/{chunk-M37GE2TE.js.map → chunk-UONSKZQT.js.map} +1 -1
- package/dist/esm/{chunk-CAAEEHGQ.js → chunk-UUXZ4W6H.js} +2 -3
- package/dist/esm/{chunk-CAAEEHGQ.js.map → chunk-UUXZ4W6H.js.map} +1 -1
- package/dist/esm/chunk-VCV7RACK.js +2 -0
- package/dist/esm/chunk-VCV7RACK.js.map +7 -0
- package/dist/esm/chunk-VPP5IDW7.js +3 -0
- package/dist/esm/chunk-VPP5IDW7.js.map +7 -0
- package/dist/esm/{chunk-L4NF3Q2T.js → chunk-VW46DG7H.js} +2 -3
- package/dist/esm/{chunk-L4NF3Q2T.js.map → chunk-VW46DG7H.js.map} +1 -1
- package/dist/esm/chunk-W3ES2XSB.js +3 -0
- package/dist/esm/chunk-W3ES2XSB.js.map +7 -0
- package/dist/esm/chunk-W4Z6ORYO.js +3 -0
- package/dist/esm/{chunk-MQEWEAH5.js.map → chunk-W4Z6ORYO.js.map} +4 -4
- package/dist/esm/chunk-WD66RYF6.js +3 -0
- package/dist/esm/chunk-WD66RYF6.js.map +7 -0
- package/dist/esm/chunk-WOR3JCLX.js +1 -0
- package/dist/esm/chunk-WOR3JCLX.js.map +7 -0
- package/dist/esm/{chunk-HHSFAOIO.js → chunk-WYKNBNM5.js} +2 -2
- package/dist/esm/chunk-WYKNBNM5.js.map +7 -0
- package/dist/esm/chunk-X7JHZ3HA.js +3 -0
- package/dist/esm/{chunk-OQWD63AI.js.map → chunk-X7JHZ3HA.js.map} +4 -4
- package/dist/esm/chunk-XD3C3GVF.js +3 -0
- package/dist/esm/chunk-XD3C3GVF.js.map +7 -0
- package/dist/esm/{chunk-FI32HA4X.js → chunk-XDVTHL3S.js} +2 -3
- package/dist/esm/{chunk-FI32HA4X.js.map → chunk-XDVTHL3S.js.map} +1 -1
- package/dist/esm/chunk-XGES2VBG.js +3 -0
- package/dist/esm/chunk-XGES2VBG.js.map +7 -0
- package/dist/esm/{chunk-64EFWPHI.js → chunk-YCLPURTD.js} +1 -1
- package/dist/esm/chunk-YHQTFDGN.js +2 -0
- package/dist/esm/{chunk-PHWT772P.js.map → chunk-YHQTFDGN.js.map} +1 -1
- package/dist/esm/{chunk-AQ7VUGQQ.js → chunk-YMUERC2J.js} +2 -2
- package/dist/esm/chunk-YOZXIUZY.js +3 -0
- package/dist/esm/{chunk-N3QLHFHB.js.map → chunk-YOZXIUZY.js.map} +4 -4
- package/dist/esm/{chunk-R4PGFURL.js → chunk-Z5W4ACO2.js} +2 -2
- package/dist/esm/chunk-ZG2XQUOH.js +3 -0
- package/dist/esm/chunk-ZIAA2C4H.js +3 -0
- package/dist/esm/{chunk-5EBJOOXE.js.map → chunk-ZIAA2C4H.js.map} +4 -4
- package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-button.props.js +1 -2
- package/dist/esm/components/_internal/base-checkbox.props.js +1 -2
- package/dist/esm/components/_internal/base-menu.props.js +1 -2
- package/dist/esm/components/_internal/base-menu.utils.js +1 -1
- package/dist/esm/components/_internal/base-radio.props.js +1 -2
- package/dist/esm/components/_internal/base-tab-list.props.js +1 -2
- package/dist/esm/components/_internal/menu-context.js +1 -1
- package/dist/esm/components/_internal/pane-band-context.d.ts +15 -0
- package/dist/esm/components/_internal/pane-band-context.d.ts.map +1 -0
- package/dist/esm/components/_internal/pane-band-context.js +3 -0
- package/dist/esm/components/_internal/pane-band-context.js.map +7 -0
- package/dist/esm/components/_internal/pane-chrome.d.ts +1 -1
- package/dist/esm/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/esm/components/_internal/pane-chrome.js +1 -1
- package/dist/esm/components/_internal/portal-theme.d.ts +9 -0
- package/dist/esm/components/_internal/portal-theme.d.ts.map +1 -0
- package/dist/esm/components/_internal/portal-theme.js +3 -0
- package/dist/esm/components/_internal/portal-theme.js.map +7 -0
- package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-bottom.js +1 -1
- package/dist/esm/components/_internal/shell-inspector.js +1 -1
- package/dist/esm/components/_internal/shell-pane.js +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/accordion.js +1 -1
- package/dist/esm/components/accordion.props.js +1 -2
- package/dist/esm/components/accordion.props.js.map +4 -4
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/alert-dialog.props.js +1 -2
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/avatar.props.js +1 -2
- package/dist/esm/components/blockquote.js +1 -1
- package/dist/esm/components/blockquote.props.js +1 -2
- package/dist/esm/components/box.js +1 -1
- package/dist/esm/components/box.props.js +1 -2
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.props.js +1 -2
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/card.props.js +1 -2
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox-group.props.js +1 -2
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.props.js +1 -2
- package/dist/esm/components/chip.js +1 -1
- package/dist/esm/components/chip.props.js +1 -2
- package/dist/esm/components/code.js +1 -1
- package/dist/esm/components/code.props.js +1 -2
- package/dist/esm/components/combobox.d.ts.map +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/combobox.props.js +1 -2
- package/dist/esm/components/combobox.props.js.map +4 -4
- package/dist/esm/components/context-menu.d.ts.map +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/context-menu.props.js +1 -2
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.props.js +1 -2
- package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/dropdown-menu.props.js +1 -2
- package/dist/esm/components/flex.js +1 -1
- package/dist/esm/components/flex.props.js +1 -2
- package/dist/esm/components/grid.js +1 -1
- package/dist/esm/components/grid.props.js +1 -2
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.props.js +1 -2
- package/dist/esm/components/image.js +1 -1
- package/dist/esm/components/image.props.js +1 -2
- package/dist/esm/components/image.props.js.map +4 -4
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/kbd.js +1 -1
- package/dist/esm/components/kbd.props.js +1 -2
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/link.props.js +1 -2
- package/dist/esm/components/message-scroller.js +1 -1
- package/dist/esm/components/navbar.js +1 -1
- package/dist/esm/components/navbar.props.js +1 -2
- package/dist/esm/components/navbar.props.js.map +4 -4
- package/dist/esm/components/notice.js +1 -1
- package/dist/esm/components/popover.d.ts.map +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/popover.props.js +1 -2
- package/dist/esm/components/progress.js +1 -1
- package/dist/esm/components/progress.props.js +1 -2
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/radio-group.props.js +1 -2
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/radio.props.js +1 -2
- package/dist/esm/components/scroll-area.d.ts.map +1 -1
- package/dist/esm/components/scroll-area.js +1 -1
- package/dist/esm/components/scroll-area.props.js +1 -2
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/segmented-control.props.js +1 -2
- package/dist/esm/components/select.d.ts.map +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/select.props.js +1 -2
- package/dist/esm/components/separator.js +1 -1
- package/dist/esm/components/separator.props.js +1 -2
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.context.js +1 -1
- package/dist/esm/components/shell.d.ts.map +1 -1
- package/dist/esm/components/shell.hooks.js +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/slider.d.ts.map +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/slider.props.js +1 -2
- package/dist/esm/components/spinner.d.ts.map +1 -1
- package/dist/esm/components/spinner.js +1 -1
- package/dist/esm/components/spinner.props.js +1 -2
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/switch.props.js +1 -2
- package/dist/esm/components/table.js +1 -1
- package/dist/esm/components/table.props.js +1 -2
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/tabs.props.js +1 -2
- package/dist/esm/components/text-area.d.ts.map +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-area.props.js +1 -2
- package/dist/esm/components/text-field.d.ts.map +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/text-field.props.js +1 -2
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/text.props.js +1 -2
- package/dist/esm/components/theme.js +1 -1
- package/dist/esm/components/theme.props.js +1 -2
- package/dist/esm/components/toggle.js +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/toolbar.props.d.ts +3 -2
- package/dist/esm/components/toolbar.props.d.ts.map +1 -1
- package/dist/esm/components/toolbar.props.js +1 -2
- package/dist/esm/components/toolbar.props.js.map +4 -4
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/tooltip.props.js +1 -2
- package/dist/esm/components/virtual-menu.js +1 -1
- package/dist/esm/helpers/extract-props.js +1 -1
- package/dist/esm/helpers/get-margin-styles.js +1 -1
- package/dist/esm/helpers/get-responsive-styles.js +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/hooks/index.js +1 -1
- package/dist/esm/hooks/use-scroll-edges.d.ts +9 -0
- package/dist/esm/hooks/use-scroll-edges.d.ts.map +1 -1
- package/dist/esm/hooks/use-scroll-edges.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/font-family.prop.js +1 -1
- package/dist/esm/props/font-family.prop.js.map +4 -4
- package/dist/esm/props/index.js +1 -1
- package/dist/esm/props/index.js.map +3 -3
- package/dist/esm/props/layout.props.js +1 -1
- package/package.json +1 -1
- package/src/components/_internal/base-button.tsx +8 -2
- package/src/components/_internal/pane-band-context.ts +17 -0
- package/src/components/_internal/pane-chrome.tsx +1 -8
- package/src/components/_internal/portal-theme.tsx +18 -0
- package/src/components/_internal/shell-bottom.tsx +4 -1
- package/src/components/alert-dialog.tsx +3 -3
- package/src/components/combobox.tsx +4 -3
- package/src/components/context-menu.tsx +6 -5
- package/src/components/dialog.tsx +3 -3
- package/src/components/dropdown-menu.tsx +6 -5
- package/src/components/popover.tsx +10 -64
- package/src/components/scroll-area.tsx +3 -2
- package/src/components/select.css +1 -1
- package/src/components/select.tsx +4 -3
- package/src/components/sheet.tsx +3 -3
- package/src/components/shell.css +11 -3
- package/src/components/shell.tsx +8 -1
- package/src/components/slider.tsx +19 -1
- package/src/components/spinner.css +16 -1
- package/src/components/spinner.tsx +14 -13
- package/src/components/text-area.css +19 -2
- package/src/components/text-area.tsx +34 -24
- package/src/components/text-field.css +14 -2
- package/src/components/text-field.tsx +44 -26
- package/src/components/toolbar.props.tsx +3 -2
- package/src/components/tooltip.tsx +3 -3
- package/src/hooks/use-scroll-edges.ts +16 -2
- package/src/styles/tokens/color.css +6 -5
- package/src/styles/tokens/shadow.css +2 -2
- package/styles.css +51 -4
- package/tokens/base.css +1 -2
- package/tokens.css +1 -2
- package/dist/esm/chunk-2IU5XPR2.js +0 -3
- package/dist/esm/chunk-2IU5XPR2.js.map +0 -7
- package/dist/esm/chunk-37GC4A2O.js +0 -3
- package/dist/esm/chunk-3H23GRNQ.js +0 -3
- package/dist/esm/chunk-3H23GRNQ.js.map +0 -7
- package/dist/esm/chunk-3L2MDOYC.js +0 -3
- package/dist/esm/chunk-3L2MDOYC.js.map +0 -7
- package/dist/esm/chunk-4S5L25RO.js +0 -3
- package/dist/esm/chunk-5CFSNNYS.js +0 -3
- package/dist/esm/chunk-5CFSNNYS.js.map +0 -7
- package/dist/esm/chunk-5EBJOOXE.js +0 -3
- package/dist/esm/chunk-5EP3UTM7.js +0 -3
- package/dist/esm/chunk-5EP3UTM7.js.map +0 -7
- package/dist/esm/chunk-5L4DZ2D3.js +0 -3
- package/dist/esm/chunk-5L4DZ2D3.js.map +0 -7
- package/dist/esm/chunk-5RFDCAKC.js +0 -3
- package/dist/esm/chunk-5XR5PTDR.js +0 -3
- package/dist/esm/chunk-5XR5PTDR.js.map +0 -7
- package/dist/esm/chunk-63MUJFVF.js +0 -3
- package/dist/esm/chunk-63MUJFVF.js.map +0 -7
- package/dist/esm/chunk-6AMWYEM7.js +0 -3
- package/dist/esm/chunk-6AMWYEM7.js.map +0 -7
- package/dist/esm/chunk-6BB2A6VU.js +0 -3
- package/dist/esm/chunk-6UZT3ZLO.js +0 -3
- package/dist/esm/chunk-6UZT3ZLO.js.map +0 -7
- package/dist/esm/chunk-7ROKZHH2.js +0 -3
- package/dist/esm/chunk-7ROKZHH2.js.map +0 -7
- package/dist/esm/chunk-7X7VWR3F.js +0 -3
- package/dist/esm/chunk-7X7VWR3F.js.map +0 -7
- package/dist/esm/chunk-7XHE6TOA.js +0 -6
- package/dist/esm/chunk-7XHE6TOA.js.map +0 -7
- package/dist/esm/chunk-A2OMWZI7.js +0 -2
- package/dist/esm/chunk-BOLSK63X.js +0 -3
- package/dist/esm/chunk-BVFHJP5E.js +0 -3
- package/dist/esm/chunk-BXZSJKWA.js +0 -3
- package/dist/esm/chunk-CBWERXF4.js +0 -3
- package/dist/esm/chunk-CQG4U5BR.js +0 -3
- package/dist/esm/chunk-CQG4U5BR.js.map +0 -7
- package/dist/esm/chunk-D4P7332M.js +0 -3
- package/dist/esm/chunk-D4P7332M.js.map +0 -7
- package/dist/esm/chunk-DVXDFCCV.js +0 -3
- package/dist/esm/chunk-DVXDFCCV.js.map +0 -7
- package/dist/esm/chunk-EAIQIW23.js +0 -3
- package/dist/esm/chunk-EAIQIW23.js.map +0 -7
- package/dist/esm/chunk-FCKJD2PW.js +0 -3
- package/dist/esm/chunk-FPGBCCML.js +0 -3
- package/dist/esm/chunk-FPGBCCML.js.map +0 -7
- package/dist/esm/chunk-GNPTPIL7.js +0 -3
- package/dist/esm/chunk-GNPTPIL7.js.map +0 -7
- package/dist/esm/chunk-HHSFAOIO.js.map +0 -7
- package/dist/esm/chunk-HV7USGHD.js +0 -3
- package/dist/esm/chunk-IE5ACUZS.js +0 -3
- package/dist/esm/chunk-ILWS2JUE.js +0 -3
- package/dist/esm/chunk-ILWS2JUE.js.map +0 -7
- package/dist/esm/chunk-IO43RGNR.js +0 -3
- package/dist/esm/chunk-IO43RGNR.js.map +0 -7
- package/dist/esm/chunk-J3QIUJ6F.js +0 -2
- package/dist/esm/chunk-JS23YQ4M.js +0 -3
- package/dist/esm/chunk-JZ5Z53MN.js +0 -2
- package/dist/esm/chunk-KRFXTPEW.js +0 -3
- package/dist/esm/chunk-KRFXTPEW.js.map +0 -7
- package/dist/esm/chunk-KSYHZCLD.js +0 -3
- package/dist/esm/chunk-KSYHZCLD.js.map +0 -7
- package/dist/esm/chunk-M37GE2TE.js +0 -3
- package/dist/esm/chunk-M3NI3D6R.js +0 -3
- package/dist/esm/chunk-MQEWEAH5.js +0 -3
- package/dist/esm/chunk-MXIVYALY.js +0 -3
- package/dist/esm/chunk-MXIVYALY.js.map +0 -7
- package/dist/esm/chunk-N3QLHFHB.js +0 -3
- package/dist/esm/chunk-NZCAGHCL.js +0 -3
- package/dist/esm/chunk-OQWD63AI.js +0 -3
- package/dist/esm/chunk-PCLO3ZZY.js +0 -3
- package/dist/esm/chunk-PHWT772P.js +0 -3
- package/dist/esm/chunk-PZCQDZVJ.js +0 -3
- package/dist/esm/chunk-PZCQDZVJ.js.map +0 -7
- package/dist/esm/chunk-RVPLXLRA.js +0 -3
- package/dist/esm/chunk-RVPLXLRA.js.map +0 -7
- package/dist/esm/chunk-SGJKXIWG.js +0 -3
- package/dist/esm/chunk-SHLERRO3.js +0 -3
- package/dist/esm/chunk-SHLERRO3.js.map +0 -7
- package/dist/esm/chunk-SV3CYQY5.js +0 -3
- package/dist/esm/chunk-U5GQ3IFS.js +0 -3
- package/dist/esm/chunk-U5GQ3IFS.js.map +0 -7
- package/dist/esm/chunk-VPRAXHLL.js +0 -3
- package/dist/esm/chunk-VPRAXHLL.js.map +0 -7
- package/dist/esm/chunk-VRQEWMC6.js +0 -3
- package/dist/esm/chunk-VRQEWMC6.js.map +0 -7
- package/dist/esm/chunk-W4MQ6TEK.js.map +0 -7
- package/dist/esm/chunk-WCGQ4IDE.js +0 -3
- package/dist/esm/chunk-WH7PQSSG.js +0 -2
- package/dist/esm/chunk-WJ4H2O2G.js +0 -3
- package/dist/esm/chunk-WJ4H2O2G.js.map +0 -7
- package/dist/esm/chunk-WMODMXEU.js +0 -3
- package/dist/esm/chunk-WMODMXEU.js.map +0 -7
- package/dist/esm/chunk-WMZLMZHB.js +0 -3
- package/dist/esm/chunk-WMZLMZHB.js.map +0 -7
- package/dist/esm/chunk-XH2CRCXR.js +0 -3
- package/dist/esm/chunk-XH2CRCXR.js.map +0 -7
- package/dist/esm/chunk-XMHNOIPB.js +0 -3
- package/dist/esm/chunk-XVDT6DQZ.js +0 -3
- package/dist/esm/chunk-Y2BTPKK6.js +0 -3
- package/dist/esm/chunk-Y2BTPKK6.js.map +0 -7
- package/dist/esm/chunk-YD2D73LF.js +0 -3
- package/dist/esm/chunk-YDBFIJHB.js +0 -3
- package/dist/esm/chunk-YDBFIJHB.js.map +0 -7
- package/dist/esm/chunk-YWG476GC.js +0 -3
- package/dist/esm/chunk-YZZMQ457.js +0 -3
- package/dist/esm/chunk-Z27REN6T.js +0 -3
- package/dist/esm/chunk-Z27REN6T.js.map +0 -7
- package/dist/esm/chunk-ZPWKWESI.js +0 -3
- package/dist/esm/chunk-ZYKJTNAT.js +0 -3
- package/dist/esm/chunk-ZYKJTNAT.js.map +0 -7
- /package/dist/esm/{chunk-I6SMGWS5.js.map → chunk-2ACVWLFA.js.map} +0 -0
- /package/dist/esm/{chunk-QH64BDXO.js.map → chunk-4G3FJUER.js.map} +0 -0
- /package/dist/esm/{chunk-6BB2A6VU.js.map → chunk-4KIZRO52.js.map} +0 -0
- /package/dist/esm/{chunk-7B3XDZXZ.js.map → chunk-6C6EK2B5.js.map} +0 -0
- /package/dist/esm/{chunk-A2OMWZI7.js.map → chunk-6DWDNKLS.js.map} +0 -0
- /package/dist/esm/{chunk-CYTPMHSJ.js.map → chunk-7QBNXNEN.js.map} +0 -0
- /package/dist/esm/{chunk-YOSCUA6Z.js.map → chunk-ACMANOVD.js.map} +0 -0
- /package/dist/esm/{chunk-5TJH35TF.js.map → chunk-CGFLZ3DC.js.map} +0 -0
- /package/dist/esm/{chunk-XL5OHW6Z.js.map → chunk-EB4AG3OL.js.map} +0 -0
- /package/dist/esm/{chunk-6FLLFCBU.js.map → chunk-ELAW7ZUG.js.map} +0 -0
- /package/dist/esm/{chunk-PT45Q47V.js.map → chunk-FATCGZZE.js.map} +0 -0
- /package/dist/esm/{chunk-CV7QQTI3.js.map → chunk-ISCZ57VL.js.map} +0 -0
- /package/dist/esm/{chunk-NZCAGHCL.js.map → chunk-JD4KR6VZ.js.map} +0 -0
- /package/dist/esm/{chunk-IZXML75Y.js.map → chunk-JQVW4WNN.js.map} +0 -0
- /package/dist/esm/{chunk-Z563IAE3.js.map → chunk-KLYI5E6F.js.map} +0 -0
- /package/dist/esm/{chunk-WZKSLTBH.js.map → chunk-KVVRFWGQ.js.map} +0 -0
- /package/dist/esm/{chunk-VVBSYWUA.js.map → chunk-LTUW36HM.js.map} +0 -0
- /package/dist/esm/{chunk-J3QIUJ6F.js.map → chunk-OA7C34MJ.js.map} +0 -0
- /package/dist/esm/{chunk-TDT2CNES.js.map → chunk-P6UX6FFY.js.map} +0 -0
- /package/dist/esm/{chunk-JUY7CBSL.js.map → chunk-PBFSBHBS.js.map} +0 -0
- /package/dist/esm/{chunk-3B25RLWX.js.map → chunk-Q2TLWILH.js.map} +0 -0
- /package/dist/esm/{chunk-JZ5Z53MN.js.map → chunk-STPMPY3X.js.map} +0 -0
- /package/dist/esm/{chunk-WH7PQSSG.js.map → chunk-UICSVJ3B.js.map} +0 -0
- /package/dist/esm/{chunk-6RJQ5LLP.js.map → chunk-UMR4AF35.js.map} +0 -0
- /package/dist/esm/{chunk-64EFWPHI.js.map → chunk-YCLPURTD.js.map} +0 -0
- /package/dist/esm/{chunk-AQ7VUGQQ.js.map → chunk-YMUERC2J.js.map} +0 -0
- /package/dist/esm/{chunk-R4PGFURL.js.map → chunk-Z5W4ACO2.js.map} +0 -0
- /package/dist/esm/{chunk-YWG476GC.js.map → chunk-ZG2XQUOH.js.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/combobox.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\n/**\n * Combobox: Radix Popover for positioning, dismissal and focus; cmdk for search,\n * filtering and keyboard navigation.\n *\n * Render path. State is split so an interaction re-renders only what reads it:\n * - `ComboboxContext` (Trigger, Value, Content): config and the selected value.\n * Open state is not in it, so opening and closing re-render no consumer.\n * - `ComboboxSearchContext` (Input only): the search text.\n * - `ComboboxItemContext` (Items): stable values only. Items read \"am I selected\"\n * from a store through `useSyncExternalStore`, so a selection re-renders the old\n * and the new selected item, not all N.\n *\n * Highlight. cmdk's `data-selected` is the single highlight source, driven by both\n * the pointer and the keyboard. There is no separate CSS `:hover` highlight, so two\n * items are never lit at once and Enter always picks the lit item.\n */\n\nimport { warnDeprecated } from '../helpers/warn-deprecated.js';\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\nimport { useCallbackRef, useComposedRefs, useControllableState, useLayoutEffect } from 'radix-ui/internal';\nimport { Command as CommandPrimitive, useCommandState } from 'cmdk';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSize } from '../hooks/theme-size.js';\nimport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs } from './combobox.props.js';\nimport { ChevronDownIcon, ThickCheckIcon } from './icons.js';\nimport { Spinner } from './spinner.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport * as Popover from './popover.js';\nimport { Slottable } from './slot.js';\nimport { VisuallyHidden } from './visually-hidden.js';\n\nimport type { textFieldRootPropDefs } from './text-field.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TextFieldVariant = (typeof textFieldRootPropDefs.variant.values)[number];\ntype ComboboxValue = string | null;\ntype CommandFilter = (value: string, search: string, keywords?: string[]) => number;\n\n// Hoisted so extractProps' compiled prop-def cache (keyed by object identity) hits.\nconst triggerSizingPropDefs = { size: comboboxRootPropDefs.size };\nconst contentSizePropDefs = { size: comboboxContentPropDefs.size };\n\nconst warned = new Set<string>();\nfunction warnOnce(message: string) {\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(message);\n}\n\n// ============================================================================\n// Selection store\n// ============================================================================\n\ninterface SelectionStore {\n get: () => ComboboxValue;\n set: (value: ComboboxValue) => void;\n subscribe: (listener: () => void) => () => void;\n}\n\nfunction createSelectionStore(initial: ComboboxValue): SelectionStore {\n let current = initial;\n const listeners = new Set<() => void>();\n return {\n get: () => current,\n set: (next) => {\n if (Object.is(next, current)) return;\n current = next;\n listeners.forEach((listener) => listener());\n },\n subscribe: (listener) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n };\n}\n\n// ============================================================================\n// Contexts\n// ============================================================================\n\ninterface ComboboxContextValue {\n value: ComboboxValue;\n displayValue?: string;\n setOpen: (open: boolean) => void;\n size?: ComboboxRootOwnProps['size'];\n placeholder?: string;\n searchPlaceholder?: string;\n disabled?: boolean;\n color?: string;\n loop: boolean;\n shouldFilter: boolean;\n filter?: CommandFilter;\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n /** Reads the trigger's accessible name from the DOM (aria-label, aria-labelledby or <label>). */\n getTriggerLabel: () => string | undefined;\n}\n\nconst ComboboxContext = React.createContext<ComboboxContextValue | null>(null);\n\nconst useComboboxContext = (componentName: string) => {\n const ctx = React.useContext(ComboboxContext);\n if (!ctx) {\n throw new Error(`Combobox.${componentName} must be used within Combobox.Root`);\n }\n return ctx;\n};\n\ninterface ComboboxSearchContextValue {\n value: string;\n setValue: (value: string) => void;\n}\n\nconst ComboboxSearchContext = React.createContext<ComboboxSearchContextValue | null>(null);\n\ninterface ComboboxItemContextValue {\n store: SelectionStore;\n onSelect: (value: string) => void;\n disabled?: boolean;\n}\n\nconst ComboboxItemContext = React.createContext<ComboboxItemContextValue | null>(null);\n\n/** Values resolved by Content and read by Input and List. */\ninterface ComboboxContentContextValue {\n sizeClassName?: string;\n color?: string;\n label?: string;\n}\n\nconst ComboboxContentContext = React.createContext<ComboboxContentContextValue | null>(null);\n\nconst useComboboxContentContext = () => React.useContext(ComboboxContentContext);\n\n// ============================================================================\n// Root\n// ============================================================================\n\ntype ComboboxRootOwnProps = GetPropDefTypes<typeof comboboxRootPropDefs> & {\n value?: ComboboxValue;\n defaultValue?: ComboboxValue;\n onValueChange?: (value: ComboboxValue) => void;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n searchValue?: string;\n defaultSearchValue?: string;\n onSearchValueChange?: (value: string) => void;\n filter?: CommandFilter;\n shouldFilter?: boolean;\n loop?: boolean;\n disabled?: boolean;\n /** Clear the search text when an option is selected. Defaults to true. */\n resetSearchOnSelect?: boolean;\n /** Clear the search text when the popup is dismissed without a selection. Defaults to true. */\n resetSearchOnClose?: boolean;\n color?: (typeof comboboxTriggerPropDefs.color.values)[number];\n /**\n * Text shown in the trigger for the selected value. Without it the raw value is shown.\n * Can be a string or a function that receives the current value. Pass a stable\n * function (module scope or `useCallback`): an inline function runs on every render.\n * @example displayValue={(v) => items.find(i => i.value === v)?.label}\n */\n displayValue?: string | ((value: ComboboxValue) => string | undefined);\n};\n\ntype PopoverRootProps = React.ComponentPropsWithoutRef<typeof Popover.Root>;\ninterface ComboboxRootProps extends PopoverRootProps, ComboboxRootOwnProps {}\n\nfunction readElementLabel(el: HTMLElement): string | undefined {\n const ariaLabel = el.getAttribute('aria-label')?.trim();\n if (ariaLabel) return ariaLabel;\n\n const labelledBy = el.getAttribute('aria-labelledby');\n if (labelledBy) {\n const text = labelledBy\n .split(/\\s+/)\n .map((id) => el.ownerDocument.getElementById(id)?.textContent?.trim())\n .filter(Boolean)\n .join(' ');\n if (text) return text;\n }\n\n const labels = (el as HTMLButtonElement).labels;\n if (labels && labels.length > 0) {\n const text = Array.from(labels)\n .map((label) => label.textContent?.trim())\n .filter(Boolean)\n .join(' ');\n if (text) return text;\n }\n\n return undefined;\n}\n\nconst ComboboxRoot: React.FC<ComboboxRootProps> = (props) => {\n const {\n children,\n size: sizeProp,\n value: valueProp,\n defaultValue = null,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n placeholder = 'Select an option',\n searchPlaceholder = 'Search...',\n searchValue: searchValueProp,\n defaultSearchValue = '',\n onSearchValueChange,\n filter,\n shouldFilter = true,\n loop = true,\n disabled,\n resetSearchOnSelect = true,\n resetSearchOnClose = true,\n color,\n displayValue: displayValueProp,\n ...rootProps\n } = props;\n const size = useThemeSize(sizeProp, comboboxRootPropDefs.size);\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n const [value, setValue] = useControllableState<ComboboxValue>({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const [searchValue, setSearchValue] = useControllableState<string>({\n prop: searchValueProp,\n defaultProp: defaultSearchValue,\n onChange: onSearchValueChange,\n });\n\n const resolvedDisplayValue = typeof displayValueProp === 'function' ? displayValueProp(value) : displayValueProp;\n\n // Items subscribe to this store instead of the context, so a selection\n // re-renders only the items whose selected state flips.\n const [store] = React.useState(() => createSelectionStore(value));\n useLayoutEffect(() => {\n store.set(value);\n }, [store, value]);\n\n // The radix setters change identity whenever their controlled prop changes.\n // Reading them through callback refs keeps these handlers stable, so the\n // contexts below do not change on every keystroke or selection.\n const handleOpenChange = useCallbackRef((nextOpen: boolean) => {\n setOpen(nextOpen);\n if (!nextOpen && resetSearchOnClose) setSearchValue('');\n });\n\n const onSelect = useCallbackRef((nextValue: string) => {\n setValue(nextValue);\n setOpen(false);\n if (resetSearchOnSelect) setSearchValue('');\n });\n\n const triggerRef = React.useRef<HTMLButtonElement | null>(null);\n const getTriggerLabel = React.useCallback(() => (triggerRef.current ? readElementLabel(triggerRef.current) : undefined), []);\n\n const contextValue = React.useMemo<ComboboxContextValue>(\n () => ({\n value,\n displayValue: resolvedDisplayValue,\n setOpen: handleOpenChange,\n size,\n placeholder,\n searchPlaceholder,\n disabled,\n color,\n loop,\n shouldFilter,\n filter,\n triggerRef,\n getTriggerLabel,\n }),\n [value, resolvedDisplayValue, handleOpenChange, size, placeholder, searchPlaceholder, disabled, color, loop, shouldFilter, filter, getTriggerLabel],\n );\n\n const searchContextValue = React.useMemo<ComboboxSearchContextValue>(() => ({ value: searchValue, setValue: setSearchValue }), [searchValue, setSearchValue]);\n\n const itemContextValue = React.useMemo<ComboboxItemContextValue>(() => ({ store, onSelect, disabled }), [store, onSelect, disabled]);\n\n return (\n <ComboboxContext.Provider value={contextValue}>\n <ComboboxSearchContext.Provider value={searchContextValue}>\n <ComboboxItemContext.Provider value={itemContextValue}>\n <Popover.Root open={open} onOpenChange={handleOpenChange} {...rootProps}>\n {children}\n </Popover.Root>\n </ComboboxItemContext.Provider>\n </ComboboxSearchContext.Provider>\n </ComboboxContext.Provider>\n );\n};\nComboboxRoot.displayName = 'Combobox.Root';\n\n// ============================================================================\n// Trigger\n// ============================================================================\n\ntype ComboboxTriggerElement = HTMLButtonElement;\ntype ComboboxTriggerOwnProps = GetPropDefTypes<typeof comboboxTriggerPropDefs>;\ntype NativeTriggerProps = Omit<React.ComponentPropsWithoutRef<'button'>, 'color'>;\ninterface ComboboxTriggerProps extends NativeTriggerProps, ComboboxTriggerOwnProps {}\n\nconst ComboboxTrigger = React.forwardRef<ComboboxTriggerElement, ComboboxTriggerProps>((props, forwardedRef) => {\n const ctx = useComboboxContext('Trigger');\n\n const {\n children,\n className,\n placeholder,\n disabled,\n readOnly,\n error,\n loading,\n color,\n radius,\n onClick,\n onKeyDown,\n type: buttonType,\n ...triggerProps\n } = extractProps({ size: ctx.size, ...props }, triggerSizingPropDefs, comboboxTriggerPropDefs);\n\n const isDisabled = disabled ?? ctx.disabled;\n const resolvedColor = color ?? ctx.color;\n // Read-only and loading triggers stay focusable but do not open.\n const isBlocked = Boolean(readOnly || loading);\n const isPlaceholder = ctx.value == null && ctx.displayValue == null;\n\n const composedRef = useComposedRefs(forwardedRef, ctx.triggerRef);\n\n const { getTriggerLabel } = ctx;\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (!getTriggerLabel()) {\n warnOnce(\n 'Combobox.Trigger has no accessible name. The combobox role does not take its name from its content. Add `aria-label`, `aria-labelledby`, or a `<label htmlFor>` that points at the trigger.',\n );\n }\n }, [getTriggerLabel]);\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n // Radix skips its open toggle when the event is default-prevented.\n if (isBlocked) event.preventDefault();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || isBlocked || isDisabled) return;\n // Both arrows open the list, as on Select (APG select-only combobox).\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n ctx.setOpen(true);\n }\n };\n\n const loadingIcon = (\n <span className=\"kui-SelectIcon kui-SelectLoadingIcon\" aria-hidden=\"true\">\n <Spinner />\n </span>\n );\n\n const defaultContent = (\n <>\n <span className=\"kui-SelectTriggerInner\">\n <span className=\"kui-ComboboxValue\">{ctx.displayValue ?? ctx.value ?? placeholder ?? ctx.placeholder}</span>\n </span>\n {loading ? loadingIcon : <ChevronDownIcon className=\"kui-SelectIcon\" />}\n </>\n );\n\n // Radix Popover.Trigger supplies aria-expanded, aria-controls (the popup id) and\n // aria-haspopup=\"dialog\", which matches the Popover dialog this opens.\n return (\n <Popover.Trigger disabled={isDisabled}>\n <button\n data-accent-color={resolvedColor}\n data-radius={radius}\n data-error={error}\n data-loading={loading}\n data-disabled={isDisabled || undefined}\n data-read-only={readOnly || undefined}\n data-placeholder={isPlaceholder ? '' : undefined}\n {...triggerProps}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props -- Popover.Trigger (Slot) adds aria-expanded and aria-controls\n role=\"combobox\"\n // The props win when set; otherwise a caller's own aria-* (a form library's aria-invalid) stays, as on Select.\n aria-disabled={isDisabled || triggerProps['aria-disabled']}\n aria-readonly={readOnly || triggerProps['aria-readonly']}\n aria-invalid={error || triggerProps['aria-invalid']}\n aria-busy={loading || triggerProps['aria-busy']}\n type={buttonType ?? 'button'}\n disabled={isDisabled}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n ref={composedRef}\n className={classNames('kui-reset', 'kui-SelectTrigger', 'kui-ComboboxTrigger', className)}\n >\n {/* Custom children replace the value and chevron; the spinner still shows while loading. */}\n {children ? (\n <>\n {requireReactElement(children)}\n {loading ? loadingIcon : null}\n </>\n ) : (\n defaultContent\n )}\n </button>\n </Popover.Trigger>\n );\n});\nComboboxTrigger.displayName = 'Combobox.Trigger';\n\n// ============================================================================\n// Value (standalone, for custom trigger layouts)\n// ============================================================================\n\ntype ComboboxValueElement = HTMLSpanElement;\ninterface ComboboxValueProps extends React.ComponentPropsWithoutRef<'span'> {\n placeholder?: string;\n}\n\nconst ComboboxValue = React.forwardRef<ComboboxValueElement, ComboboxValueProps>(({ placeholder, children, className, ...valueProps }, forwardedRef) => {\n const ctx = useComboboxContext('Value');\n const display = ctx.displayValue ?? ctx.value ?? undefined;\n return (\n <span {...valueProps} ref={forwardedRef} className={classNames('kui-ComboboxValue', className)}>\n {display ?? children ?? placeholder ?? ctx.placeholder}\n </span>\n );\n});\nComboboxValue.displayName = 'Combobox.Value';\n\n// ============================================================================\n// Content\n// ============================================================================\n\ntype ComboboxContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ntype ComboboxContentOwnProps = GetPropDefTypes<typeof comboboxContentPropDefs> & {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n};\ninterface ComboboxContentProps extends Omit<ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>, 'size'>, ComboboxContentOwnProps {}\n\n/** Announces the filtered result count to screen readers after typing settles. */\nfunction ComboboxAnnouncer() {\n const count = useCommandState((state) => state.filtered.count);\n const search = useCommandState((state) => state.search);\n const [message, setMessage] = React.useState('');\n\n React.useEffect(() => {\n const next = !search ? '' : count === 0 ? 'No results' : `${count} result${count === 1 ? '' : 's'}`;\n const timeout = window.setTimeout(() => setMessage(next), search ? 400 : 0);\n return () => window.clearTimeout(timeout);\n }, [count, search]);\n\n return (\n <VisuallyHidden role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {message}\n </VisuallyHidden>\n );\n}\n\nconst ComboboxContent = React.forwardRef<ComboboxContentElement, ComboboxContentProps>((props, forwardedRef) => {\n const ctx = useComboboxContext('Content');\n const themeContext = useThemeContext();\n\n // The list takes the field's size.\n const size = props.size ?? ctx.size ?? comboboxContentPropDefs.size.default;\n\n const {\n className,\n children,\n color,\n forceMount,\n container,\n onOpenAutoFocus,\n 'aria-label': _ariaLabel,\n 'aria-labelledby': ariaLabelledByProp,\n ...contentProps\n } = extractProps({ ...props, size }, comboboxContentPropDefs);\n\n const resolvedColor = color || ctx.color || themeContext.accentColor;\n\n\n // The trigger's name labels the popup, the search field and the listbox.\n // Read once per mount (the content remounts on every open); fall back to a\n // layout effect when the trigger was not attached yet (defaultOpen, forceMount).\n const { getTriggerLabel } = ctx;\n const [triggerLabel, setTriggerLabel] = React.useState(getTriggerLabel);\n useLayoutEffect(() => {\n if (triggerLabel !== undefined) return;\n const label = getTriggerLabel();\n if (label !== undefined) setTriggerLabel(label);\n }, [getTriggerLabel, triggerLabel]);\n\n const label = props['aria-label'] ?? triggerLabel;\n\n const contentContextValue = React.useMemo<ComboboxContentContextValue>(\n () => ({\n // Responsive-aware size class for the search field (never String() a responsive object).\n sizeClassName: extractProps({ size }, contentSizePropDefs).className || undefined,\n color: resolvedColor,\n label,\n }),\n [size, resolvedColor, label],\n );\n\n const commandRef = React.useRef<HTMLDivElement>(null);\n\n // Without a search field, focus would land on the popup itself, outside cmdk's\n // keydown handler. Focus the listbox instead so arrow keys and Enter work.\n const handleOpenAutoFocus = (event: Event) => {\n onOpenAutoFocus?.(event);\n if (event.defaultPrevented) return;\n const command = commandRef.current;\n if (!command || command.querySelector('[cmdk-input]')) return;\n event.preventDefault();\n const list = command.querySelector<HTMLElement>('[cmdk-list]');\n (list ?? command).focus({ preventScroll: true });\n };\n\n // Start the highlight on the selected option (cmdk trims item values).\n const initialHighlight = ctx.value?.trim() || undefined;\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount ? true : undefined}>\n <Theme asChild>\n <PopoverPrimitive.Content\n data-accent-color={resolvedColor}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n aria-label={ariaLabelledByProp ? undefined : label}\n aria-labelledby={ariaLabelledByProp}\n {...contentProps}\n forceMount={forceMount ? true : undefined}\n onOpenAutoFocus={handleOpenAutoFocus}\n ref={forwardedRef}\n className={classNames('kui-PopperContent', 'kui-BaseMenuContent',\n 'kui-variant-soft', 'kui-ComboboxContent', className)}\n >\n <ComboboxContentContext.Provider value={contentContextValue}>\n <CommandPrimitive\n ref={commandRef}\n loop={ctx.loop}\n shouldFilter={ctx.shouldFilter}\n filter={ctx.filter}\n label={label}\n defaultValue={initialHighlight}\n className=\"kui-ComboboxCommand\"\n >\n {children}\n <ComboboxAnnouncer />\n </CommandPrimitive>\n </ComboboxContentContext.Provider>\n </PopoverPrimitive.Content>\n </Theme>\n </PopoverPrimitive.Portal>\n );\n});\nComboboxContent.displayName = 'Combobox.Content';\n\n// ============================================================================\n// Input\n// ============================================================================\n\ntype ComboboxInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ninterface ComboboxInputProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, 'value' | 'onValueChange'> {\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n variant?: TextFieldVariant;\n value?: string;\n onValueChange?: (value: string) => void;\n}\n\nconst ComboboxInput = React.forwardRef<ComboboxInputElement, ComboboxInputProps>(\n ({ className, startAdornment, endAdornment, placeholder, variant: inputVariant, value, onValueChange, ...inputProps }, forwardedRef) => {\n const ctx = useComboboxContext('Input');\n const search = React.useContext(ComboboxSearchContext);\n const contentContext = useComboboxContentContext();\n\n const textFieldVariant = inputVariant ?? 'soft';\n\n // The search text lives in Root; only this component subscribes to it.\n const searchValue = value ?? search?.value ?? '';\n const handleSearchChange = onValueChange ?? search?.setValue;\n\n const inputField = (\n <div\n className={classNames('kui-TextFieldRoot', 'kui-ComboboxInputRoot', contentContext?.sizeClassName, `kui-variant-${textFieldVariant}`)}\n data-accent-color={contentContext?.color}\n >\n {startAdornment ? <div className=\"kui-TextFieldSlot\">{startAdornment}</div> : null}\n <CommandPrimitive.Input\n {...inputProps}\n ref={forwardedRef}\n value={searchValue}\n onValueChange={handleSearchChange}\n placeholder={placeholder ?? ctx.searchPlaceholder}\n className={classNames('kui-reset', 'kui-TextFieldInput', className)}\n />\n {endAdornment ? (\n <div className=\"kui-TextFieldSlot\" data-side=\"right\">\n {endAdornment}\n </div>\n ) : null}\n </div>\n );\n\n return contentContext ? <div className=\"kui-ComboboxSearch\">{inputField}</div> : inputField;\n },\n);\nComboboxInput.displayName = 'Combobox.Input';\n\n// ============================================================================\n// List\n// ============================================================================\n\ntype ComboboxListElement = React.ElementRef<typeof CommandPrimitive.List>;\ninterface ComboboxListProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> {}\n\n// cmdk's List owns its id (referenced by the input's aria-controls), role and\n// aria-label (set from `label`), so none of them are overridden here.\nconst ComboboxList = React.forwardRef<ComboboxListElement, ComboboxListProps>(({ className, children, label, ...listProps }, forwardedRef) => {\n const contentContext = useComboboxContentContext();\n return (\n <div className=\"kui-ComboboxScrollArea\">\n <div className={classNames('kui-BaseMenuViewport', 'kui-ComboboxViewport')}>\n <CommandPrimitive.List {...listProps} label={label ?? contentContext?.label} ref={forwardedRef} className={classNames('kui-ComboboxList', className)}>\n {children}\n </CommandPrimitive.List>\n </div>\n </div>\n );\n});\nComboboxList.displayName = 'Combobox.List';\n\n// ============================================================================\n// Empty\n// ============================================================================\n\ntype ComboboxEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ninterface ComboboxEmptyProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> {}\n\nconst ComboboxEmpty = React.forwardRef<ComboboxEmptyElement, ComboboxEmptyProps>(({ className, ...emptyProps }, forwardedRef) => (\n <CommandPrimitive.Empty {...emptyProps} ref={forwardedRef} className={classNames('kui-ComboboxEmpty', className)} />\n));\nComboboxEmpty.displayName = 'Combobox.Empty';\n\n// ============================================================================\n// Group\n// ============================================================================\n\ntype ComboboxGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ninterface ComboboxGroupProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> {}\n\nconst ComboboxGroup = React.forwardRef<ComboboxGroupElement, ComboboxGroupProps>(({ className, ...groupProps }, forwardedRef) => (\n <CommandPrimitive.Group {...groupProps} ref={forwardedRef} className={classNames('kui-BaseMenuGroup', 'kui-ComboboxGroup', className)} />\n));\nComboboxGroup.displayName = 'Combobox.Group';\n\n// ============================================================================\n// Label\n// ============================================================================\n\ntype ComboboxLabelElement = React.ElementRef<'div'>;\ninterface ComboboxLabelProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst ComboboxLabel = React.forwardRef<ComboboxLabelElement, ComboboxLabelProps>(({ className, id: idProp, ...labelProps }, forwardedRef) => {\n const generatedId = React.useId();\n const id = idProp ?? generatedId;\n const localRef = React.useRef<HTMLDivElement>(null);\n const composedRef = useComposedRefs(forwardedRef, localRef);\n\n // cmdk renders the group's role=\"group\" element itself and gives no way to\n // label it from a child, so name it after this label when inside a Group.\n useLayoutEffect(() => {\n const group = localRef.current?.closest('[cmdk-group-items]');\n if (!group || group.hasAttribute('aria-labelledby')) return;\n group.setAttribute('aria-labelledby', id);\n return () => {\n if (group.getAttribute('aria-labelledby') === id) group.removeAttribute('aria-labelledby');\n };\n }, [id]);\n\n return <div {...labelProps} id={id} ref={composedRef} className={classNames('kui-BaseMenuLabel', 'kui-ComboboxLabel', className)} />;\n});\nComboboxLabel.displayName = 'Combobox.Label';\n\n// ============================================================================\n// Separator\n// ============================================================================\n\ntype ComboboxSeparatorElement = React.ElementRef<typeof CommandPrimitive.Separator>;\ninterface ComboboxSeparatorProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> {}\n\nconst ComboboxSeparator = React.forwardRef<ComboboxSeparatorElement, ComboboxSeparatorProps>(({ className, ...separatorProps }, forwardedRef) => (\n <CommandPrimitive.Separator {...separatorProps} ref={forwardedRef} className={classNames('kui-BaseMenuSeparator', 'kui-ComboboxSeparator', className)} />\n));\nComboboxSeparator.displayName = 'Combobox.Separator';\n\n// ============================================================================\n// Item\n// ============================================================================\n\n/** Plain text of a React node tree, used as the item's search text. */\nfunction getNodeText(node: React.ReactNode): string {\n if (node == null || typeof node === 'boolean') return '';\n if (typeof node === 'string' || typeof node === 'number') return String(node);\n if (Array.isArray(node)) return node.map(getNodeText).join('');\n if (React.isValidElement<{ children?: React.ReactNode }>(node)) return getNodeText(node.props.children);\n return '';\n}\n\ntype ComboboxItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ninterface ComboboxItemProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, 'keywords' | 'onSelect'> {\n /**\n * Text matched by search. Defaults to the text of `children`. Set it when the\n * children are components whose text is not in the JSX (it cannot be read).\n */\n label?: string;\n /** Additional keywords for search filtering. */\n keywords?: string[];\n /** Called when the item is selected. */\n onSelect?: (value: string) => void;\n}\n\nconst ComboboxItem = React.forwardRef<ComboboxItemElement, ComboboxItemProps>(\n ({ className, children, label, value, disabled, onSelect, keywords, ...itemProps }, forwardedRef) => {\n const itemContext = React.useContext(ComboboxItemContext);\n if (!itemContext) {\n throw new Error('Combobox.Item must be used within Combobox.Root');\n }\n const { store, onSelect: onSelectFromRoot, disabled: rootDisabled } = itemContext;\n\n // Without `value`, cmdk uses the trimmed text of string children.\n const itemValue = value ?? (typeof children === 'string' ? children.trim() : undefined);\n const getIsSelected = () => itemValue !== undefined && store.get() === itemValue;\n const isSelected = React.useSyncExternalStore(store.subscribe, getIsSelected, getIsSelected);\n\n const onSelectProp = useCallbackRef(onSelect);\n // cmdk passes its resolved value (the `value` prop, or the text when `value` is omitted).\n const handleSelect = React.useCallback(\n (resolvedValue: string) => {\n const nextValue = value ?? resolvedValue;\n onSelectFromRoot(nextValue);\n onSelectProp(nextValue);\n },\n [value, onSelectFromRoot, onSelectProp],\n );\n\n // cmdk matches only `value` and `keywords`, so add the visible text as a keyword.\n const text = (label ?? getNodeText(children)).replace(/\\s+/g, ' ').trim();\n const searchKeywords = text ? (keywords ? [text, ...keywords] : [text]) : keywords;\n // cmdk stores keywords only when `value` changes. Remount the cmdk item when\n // they change so a new label or keyword list is picked up.\n const keywordsKey = searchKeywords ? searchKeywords.join('\\u0000') : '';\n\n const isDisabled = disabled ?? rootDisabled ?? false;\n\n return (\n <CommandPrimitive.Item\n key={keywordsKey}\n {...itemProps}\n value={value}\n keywords={searchKeywords}\n // cmdk owns aria-selected (the highlighted option); the chosen option is aria-checked.\n aria-checked={isSelected}\n disabled={isDisabled || undefined}\n ref={forwardedRef}\n onSelect={handleSelect}\n className={classNames('kui-reset', 'kui-BaseMenuItem', 'kui-ComboboxItem', className)}\n >\n {isSelected ? (\n <span className={classNames('kui-BaseMenuItemIndicator', 'kui-ComboboxItemIndicator')}>\n <ThickCheckIcon className={classNames('kui-BaseMenuItemIndicatorIcon', 'kui-ComboboxItemIndicatorIcon')} />\n </span>\n ) : null}\n <Slottable>{children}</Slottable>\n </CommandPrimitive.Item>\n );\n },\n);\nComboboxItem.displayName = 'Combobox.Item';\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n ComboboxRoot as Root,\n ComboboxTrigger as Trigger,\n ComboboxValue as Value,\n ComboboxContent as Content,\n ComboboxInput as Input,\n ComboboxList as List,\n ComboboxEmpty as Empty,\n ComboboxGroup as Group,\n ComboboxLabel as Label,\n ComboboxSeparator as Separator,\n ComboboxItem as Item,\n};\n\nexport type {\n ComboboxRootProps as RootProps,\n ComboboxTriggerProps as TriggerProps,\n ComboboxValueProps as ValueProps,\n ComboboxContentProps as ContentProps,\n ComboboxInputProps as InputProps,\n ComboboxListProps as ListProps,\n ComboboxEmptyProps as EmptyProps,\n ComboboxGroupProps as GroupProps,\n ComboboxLabelProps as LabelProps,\n ComboboxSeparatorProps as SeparatorProps,\n ComboboxItemProps as ItemProps,\n};\n"],
|
|
5
|
-
"mappings": ";ieAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,GAAA,UAAAC,GAAA,UAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,cAAAC,GAAA,YAAAC,GAAA,UAAAC,KAoBA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,WAAWC,OAAwB,WAC5C,OAAS,kBAAAC,EAAgB,mBAAAC,GAAiB,wBAAAC,EAAsB,mBAAAC,MAAuB,oBACvF,OAAS,WAAWC,EAAkB,mBAAAC,OAAuB,OAsB7D,IAAMC,GAAwB,CAAE,KAAMC,EAAqB,IAAK,EAC1DC,GAAsB,CAAE,KAAMC,EAAwB,IAAK,EAE3DC,GAAS,IAAI,IACnB,SAASC,GAASC,EAAiB,CAC7BF,GAAO,IAAIE,CAAO,IACtBF,GAAO,IAAIE,CAAO,EAClB,QAAQ,KAAKA,CAAO,EACtB,CAYA,SAASC,GAAqBC,EAAwC,CACpE,IAAIC,EAAUD,EACRE,EAAY,IAAI,IACtB,MAAO,CACL,IAAK,IAAMD,EACX,IAAME,GAAS,CACT,OAAO,GAAGA,EAAMF,CAAO,IAC3BA,EAAUE,EACVD,EAAU,QAASE,GAAaA,EAAS,CAAC,EAC5C,EACA,UAAY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EAAiBA,EAAe,KAAK,IAAQ,EAAI,GAE/DnF,EAAa1C,GAAYsH,GAAgB,GAE/C,OACE,gBAAC/B,EAAiB,KAAjB,CACC,IAAKuC,EACJ,GAAGX,EACJ,MAAOxG,EACP,SAAUkH,EAEV,eAAcJ,EACd,SAAU/E,GAAc,OACxB,IAAKZ,EACL,SAAU6F,EACV,UAAWnE,EAAW,YAAa,mBAAoB,mBAAoBzB,CAAS,GAEnF0F,EACC,gBAAC,QAAK,UAAWjE,EAAW,4BAA6B,2BAA2B,GAClF,gBAACuE,EAAA,CAAe,UAAWvE,EAAW,gCAAiC,+BAA+B,EAAG,CAC3G,EACE,KACJ,gBAACwE,EAAA,KAAWhJ,CAAS,CACvB,CAEJ,CACF,EACAiI,GAAa,YAAc",
|
|
6
|
-
"names": ["combobox_exports", "__export", "ComboboxContent", "ComboboxEmpty", "ComboboxGroup", "ComboboxInput", "ComboboxItem", "ComboboxLabel", "ComboboxList", "ComboboxRoot", "ComboboxSeparator", "ComboboxTrigger", "ComboboxValue", "React", "classNames", "PopoverPrimitive", "useCallbackRef", "useComposedRefs", "useControllableState", "useLayoutEffect", "CommandPrimitive", "useCommandState", "triggerSizingPropDefs", "comboboxRootPropDefs", "contentSizePropDefs", "comboboxContentPropDefs", "warned", "warnOnce", "message", "createSelectionStore", "initial", "current", "listeners", "next", "listener", "ComboboxContext", "useComboboxContext", "componentName", "ctx", "ComboboxSearchContext", "ComboboxItemContext", "ComboboxContentContext", "useComboboxContentContext", "readElementLabel", "el", "ariaLabel", "labelledBy", "text", "id", "labels", "label", "ComboboxRoot", "props", "children", "sizeProp", "valueProp", "defaultValue", "onValueChange", "openProp", "defaultOpen", "onOpenChange", "placeholder", "searchPlaceholder", "searchValueProp", "defaultSearchValue", "onSearchValueChange", "filter", "shouldFilter", "loop", "disabled", "resetSearchOnSelect", "resetSearchOnClose", "color", "displayValueProp", "rootProps", "size", "useThemeSize", "open", "setOpen", "useControllableState", "value", "setValue", "searchValue", "setSearchValue", "resolvedDisplayValue", "store", "useLayoutEffect", "handleOpenChange", "useCallbackRef", "nextOpen", "onSelect", "nextValue", "triggerRef", "getTriggerLabel", "contextValue", "searchContextValue", "itemContextValue", "PopoverRoot", "ComboboxTrigger", "forwardedRef", "className", "readOnly", "error", "loading", "radius", "onClick", "onKeyDown", "buttonType", "triggerProps", "extractProps", "comboboxTriggerPropDefs", "isDisabled", "resolvedColor", "isBlocked", "isPlaceholder", "composedRef", "useComposedRefs", "handleClick", "event", "handleKeyDown", "loadingIcon", "Spinner", "defaultContent", "ChevronDownIcon", "PopoverTrigger", "classNames", "requireReactElement", "ComboboxValue", "valueProps", "display", "ComboboxAnnouncer", "count", "useCommandState", "state", "search", "setMessage", "timeout", "VisuallyHidden", "ComboboxContent", "themeContext", "useThemeContext", "forceMount", "container", "onOpenAutoFocus", "_ariaLabel", "ariaLabelledByProp", "contentProps", "triggerLabel", "setTriggerLabel", "contentContextValue", "commandRef", "handleOpenAutoFocus", "command", "initialHighlight", "PopoverPrimitive", "Theme", "CommandPrimitive", "ComboboxInput", "startAdornment", "endAdornment", "inputVariant", "inputProps", "contentContext", "textFieldVariant", "handleSearchChange", "inputField", "ComboboxList", "listProps", "ComboboxEmpty", "emptyProps", "ComboboxGroup", "groupProps", "ComboboxLabel", "idProp", "labelProps", "generatedId", "localRef", "group", "ComboboxSeparator", "separatorProps", "getNodeText", "node", "ComboboxItem", "keywords", "itemProps", "itemContext", "onSelectFromRoot", "rootDisabled", "itemValue", "getIsSelected", "isSelected", "onSelectProp", "handleSelect", "resolvedValue", "searchKeywords", "keywordsKey", "ThickCheckIcon", "Slottable"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{c as P}from"./chunk-5ON3XLRD.js";import{c as b}from"./chunk-OKQAVYW4.js";import{a as T}from"./chunk-WT2SYGTU.js";import{a as R}from"./chunk-VQPANPMI.js";var y={};R(y,{Content:()=>l,List:()=>c,Root:()=>f,Trigger:()=>g});import*as e from"react";import a from"classnames";import{Tabs as i}from"radix-ui";var f=e.forwardRef((t,o)=>{let{className:r,...s}=t;return e.createElement(i.Root,{...s,ref:o,className:a("kui-TabsRoot",r)})});f.displayName="Tabs.Root";var c=e.forwardRef((t,o)=>{let r=P(t,T.size),{className:s,color:p,...n}=b(r,T);return e.createElement(i.List,{"data-accent-color":p,...n,asChild:!1,ref:o,className:a("kui-BaseTabList","kui-TabsList",s)})});c.displayName="Tabs.List";var g=e.forwardRef((t,o)=>{let{className:r,children:s,...p}=t,n=e.Children.toArray(s).every(m=>typeof m=="string"||typeof m=="number");return e.createElement(i.Trigger,{...p,asChild:!1,ref:o,className:a("kui-reset","kui-BaseTabListTrigger","kui-TabsTrigger",r)},e.createElement("span",{className:"kui-BaseTabListTriggerInner kui-TabsTriggerInner"},s),n?e.createElement("span",{className:"kui-BaseTabListTriggerInnerHidden kui-TabsTriggerInnerHidden","aria-hidden":!0},s):null)});g.displayName="Tabs.Trigger";var l=e.forwardRef((t,o)=>{let{className:r,...s}=t;return e.createElement(i.Content,{...s,ref:o,className:a("kui-TabsContent",r)})});l.displayName="Tabs.Content";export{f as a,c as b,g as c,l as d,y as e};
|
|
3
|
-
//# sourceMappingURL=chunk-5EBJOOXE.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as e}from"./chunk-5WTSKXAE.js";import{a as r,b as s}from"./chunk-7N2Q5WOM.js";import{b as t}from"./chunk-5KMEUZWN.js";import{c as p}from"./chunk-OKQAVYW4.js";import*as o from"react";import f from"classnames";var B=o.forwardRef((m,a)=>{let{className:n,asChild:i,as:P="div",...x}=p(m,e,r,s);return o.createElement(i?t:P,{...x,ref:a,className:f("kui-Box",n)})});B.displayName="Box";export{B as a};
|
|
3
|
-
//# sourceMappingURL=chunk-5EP3UTM7.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/box.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Slot } from './slot.js';\nimport { boxPropDefs } from './box.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { BoxOwnProps } from './box.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype BoxElement = React.ElementRef<'div'>;\ninterface CommonBoxProps extends MarginProps, LayoutProps, BoxOwnProps {}\ntype BoxDivProps = { as?: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype BoxSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype BoxProps = CommonBoxProps & (BoxSpanProps | BoxDivProps);\n\nconst Box = React.forwardRef<BoxElement, BoxProps>((props, forwardedRef) => {\n const {\n className,\n asChild,\n as: Tag = 'div',\n ...boxProps\n } = extractProps(props, boxPropDefs, layoutPropDefs, marginPropDefs);\n const Comp = asChild ? Slot : Tag;\n return <Comp {...boxProps} ref={forwardedRef} className={classNames('kui-Box', className)} />;\n});\nBox.displayName = 'Box';\n\nexport { Box };\nexport type { BoxProps };\n"],
|
|
5
|
-
"mappings": ";uKAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAmBvB,IAAMC,EAAY,aAAiC,CAACC,EAAOC,IAAiB,CAC1E,GAAM,CACJ,UAAAC,EACA,QAAAC,EACA,GAAIC,EAAM,MACV,GAAGC,CACL,EAAIC,EAAaN,EAAOO,EAAaC,EAAgBC,CAAc,EAEnE,OAAO,gBADMN,EAAUO,EAAON,EACtB,CAAM,GAAGC,EAAU,IAAKJ,EAAc,UAAWU,EAAW,UAAWT,CAAS,EAAG,CAC7F,CAAC,EACDH,EAAI,YAAc",
|
|
6
|
-
"names": ["React", "classNames", "Box", "props", "forwardedRef", "className", "asChild", "Tag", "boxProps", "extractProps", "boxPropDefs", "layoutPropDefs", "marginPropDefs", "Slot", "classNames"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as te}from"./chunk-TGRHRMQI.js";import{b as re,c as G}from"./chunk-N3QLHFHB.js";import{c as B,e as oe,g as y,h as O,i as ne}from"./chunk-CV7QQTI3.js";import{a as L}from"./chunk-RVPLXLRA.js";import{b as A,c as F,d as S,e as j,f as H}from"./chunk-GKDGNPBD.js";import{c as U}from"./chunk-5ON3XLRD.js";import{b as g,c as k,d as Y,e as q,f as X}from"./chunk-I6SMGWS5.js";import{b as h,c as $,d as T,e as x}from"./chunk-XL5OHW6Z.js";import{c as I}from"./chunk-OKQAVYW4.js";import{a as M,b as v,c as J,d as Q,e as E,f as Z,g as ee,h as N}from"./chunk-5JYSYTHA.js";import{a as he}from"./chunk-VQPANPMI.js";var Oe={};he(Oe,{CheckboxItem:()=>Me,Content:()=>de,Group:()=>me,Item:()=>ce,Label:()=>le,RadioGroup:()=>we,RadioItem:()=>De,Root:()=>ue,Separator:()=>Re,Sub:()=>fe,SubContent:()=>be,SubTrigger:()=>Pe,Trigger:()=>se,TriggerIcon:()=>ge});import*as e from"react";import l from"classnames";import{DropdownMenu as s,Slot as _}from"radix-ui";import{useCallbackRef as ie}from"radix-ui/internal";var ae=e.createContext(!1),ue=o=>{let{open:n,defaultOpen:t=!1,onOpenChange:u}=o,[i,r]=e.useState(t),a=n??i,c=ie(u),p=e.useCallback(w=>{r(w),c(w)},[c]),m=e.useCallback(()=>p(!1),[p]);return e.createElement(ae.Provider,{value:a},e.createElement(oe,{value:m},e.createElement(s.Root,{...o,open:a,onOpenChange:p})))};ue.displayName="DropdownMenu.Root";var se=e.forwardRef(({children:o,...n},t)=>e.createElement(s.Trigger,{...n,ref:t,asChild:!0},te(o)));se.displayName="DropdownMenu.Trigger";var z=e.createContext({}),Te={ltr:"ArrowLeft",rtl:"ArrowRight"},xe={ltr:"ArrowRight",rtl:"ArrowLeft"};function Ee(o){return o instanceof HTMLElement&&(o.isContentEditable||o.tagName==="INPUT"||o.tagName==="TEXTAREA")}function pe(o){return o?.closest("[dir]")?.getAttribute("dir")==="rtl"?"rtl":"ltr"}var de=e.forwardRef((o,n)=>{let t=U(o,g.size),u=re(),{size:i=g.size.default}=t,{className:r,children:a,color:c,container:p,forceMount:m,submenuBehavior:w,virtualized:d=!1,onEscapeKeyDown:P,onKeyDown:b,...f}=I(t,g),R=c||u.accentColor,K=h(w,"cascade"),V=K==="drill-down",ye=e.useContext(ae),C=J(),Ie=D=>{P?.(D),!(D.defaultPrevented||!V||C.getDepth()===0)&&(D.preventDefault(),C.pop("keyboard"))},Se=D=>{b?.(D),!(D.defaultPrevented||!V||C.getDepth()===0)&&(Ee(D.target)||D.key===Te[pe(D.currentTarget)]&&(D.preventDefault(),C.pop("keyboard")))},ke=e.useMemo(()=>({size:i,color:R}),[i,R]),W=e.createElement(B,{size:i},e.createElement(z.Provider,{value:ke},e.createElement(Q,{store:C,behavior:K,open:ye},a)));return e.createElement(s.Portal,{container:p,forceMount:m},e.createElement(G,{asChild:!0},e.createElement(s.Content,{"data-accent-color":R,align:"start",sideOffset:4,collisionPadding:10,...f,onEscapeKeyDown:Ie,onKeyDown:Se,asChild:!1,ref:n,className:l("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-DropdownMenuContent",r)},d?e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport","kui-virtualized")},W):e.createElement(L,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport")},W)))))});de.displayName="DropdownMenu.Content";var le=e.forwardRef(({className:o,id:n,...t},u)=>{let i=e.useContext(M),r=ne(n,i);return i?e.createElement(s.Label,{...t,id:r,asChild:!1,ref:u,className:l("kui-BaseMenuLabel","kui-DropdownMenuLabel",o)}):null});le.displayName="DropdownMenu.Label";var ce=e.forwardRef((o,n)=>{let{className:t,children:u,color:i=Y.color.default,shortcut:r,...a}=o;return e.useContext(M)?e.createElement(s.Item,{"data-accent-color":i,"aria-keyshortcuts":r?T(r):void 0,...a,ref:n,className:l("kui-reset","kui-BaseMenuItem","kui-DropdownMenuItem",t)},e.createElement(_.Slottable,null,u),r&&e.createElement(x,{shortcut:r,className:"kui-DropdownMenuShortcut"})):null});ce.displayName="DropdownMenu.Item";var me=e.forwardRef(({className:o,"aria-labelledby":n,...t},u)=>{let[i,r]=O(n),a=e.useContext(M);return e.createElement(y,{value:r},e.createElement(s.Group,{...a?{"aria-labelledby":i}:{role:"none"},...t,asChild:!1,ref:u,className:l("kui-BaseMenuGroup","kui-DropdownMenuGroup",o)}))});me.displayName="DropdownMenu.Group";var we=e.forwardRef(({className:o,"aria-labelledby":n,...t},u)=>{let[i,r]=O(n),a=e.useContext(M);return e.createElement(y,{value:r},e.createElement(s.RadioGroup,{...a?{"aria-labelledby":i}:{role:"none"},...t,asChild:!1,ref:u,className:l("kui-BaseMenuRadioGroup","kui-DropdownMenuRadioGroup",o)}))});we.displayName="DropdownMenu.RadioGroup";var De=e.forwardRef((o,n)=>{let{children:t,className:u,color:i=X.color.default,...r}=o;return e.useContext(M)?e.createElement(s.RadioItem,{...r,asChild:!1,ref:n,"data-accent-color":i,className:l("kui-BaseMenuItem","kui-BaseMenuRadioItem","kui-DropdownMenuItem","kui-DropdownMenuRadioItem",u)},e.createElement(_.Slottable,null,t),e.createElement(s.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-DropdownMenuItemIndicator"},e.createElement(H,{className:"kui-BaseMenuItemIndicatorIcon kui-DropdownMenuItemIndicatorIcon"}))):null});De.displayName="DropdownMenu.RadioItem";var Me=e.forwardRef((o,n)=>{let{children:t,className:u,shortcut:i,color:r=q.color.default,...a}=o;return e.useContext(M)?e.createElement(s.CheckboxItem,{"aria-keyshortcuts":i?T(i):void 0,...a,asChild:!1,ref:n,"data-accent-color":r,className:l("kui-BaseMenuItem","kui-BaseMenuCheckboxItem","kui-DropdownMenuItem","kui-DropdownMenuCheckboxItem",u)},e.createElement(_.Slottable,null,t),e.createElement(s.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-DropdownMenuItemIndicator"},e.createElement(A,{className:"kui-BaseMenuItemIndicatorIcon kui-DropdownMenuItemIndicatorIcon"})),i&&e.createElement(x,{shortcut:i,className:"kui-DropdownMenuShortcut"})):null});Me.displayName="DropdownMenu.CheckboxItem";var fe=({label:o="Back",open:n,defaultOpen:t,onOpenChange:u,children:i})=>{let r=v(),a=e.useId(),c=e.useMemo(()=>({id:a,label:o}),[a,o]),p=E(r,a)!=="closed",m=ie(u),w=n!==void 0;e.useLayoutEffect(()=>{if(!(!r||!w))return r.setController(a,m),()=>r.setController(a,null)},[r,w,a,m]),e.useLayoutEffect(()=>{!r||n===void 0||(n&&!r.isOpen(a)?r.open(a,r.takePendingModality(a)):!n&&r.isOpen(a)&&r.close(a,r.takePendingModality(a)))},[r,n,a]);let d=e.useRef(n===void 0&&!!t);e.useLayoutEffect(()=>{r&&d.current?r.open(a):d.current=!1},[]);let P=e.useRef(p);return e.useEffect(()=>{if(!(!r||P.current===p)){if(P.current=p,p&&d.current){d.current=!1;return}n!==void 0&&n===p||m(p)}},[r,p,m,n]),e.createElement(ee.Provider,{value:c},e.createElement(s.Sub,{open:n,defaultOpen:t,onOpenChange:r?void 0:u},i))};fe.displayName="DropdownMenu.Sub";var Pe=e.forwardRef((o,n)=>{let{className:t,children:u,onKeyDown:i,...r}=o,a=v(),c=N(),p=e.useContext(M);if(a&&c){if(!p)return null;let m=d=>{d.preventDefault(),a.push(c.id)},w=d=>{i?.(d),!(d.defaultPrevented||r.disabled)&&d.key===xe[pe(d.currentTarget)]&&(d.preventDefault(),a.push(c.id,"keyboard"))};return e.createElement(s.Item,{...r,"data-drill-down-trigger":c.id,"data-drill-down-name":r.textValue,onSelect:m,onKeyDown:w,ref:n,className:l("kui-reset","kui-BaseMenuItem","kui-BaseMenuSubTrigger","kui-DropdownMenuItem","kui-DropdownMenuSubTrigger","kui-DropdownMenuDrillDownSubTrigger",t)},u,e.createElement("div",{className:"kui-BaseMenuShortcut kui-DropdownMenuShortcut"},e.createElement(S,{className:"kui-BaseMenuSubTriggerIcon kui-DropdownMenuSubTriggerIcon"})))}return e.createElement(s.SubTrigger,{...r,onKeyDown:i,asChild:!1,ref:n,className:l("kui-BaseMenuItem","kui-BaseMenuSubTrigger","kui-DropdownMenuItem","kui-DropdownMenuSubTrigger",t)},u,e.createElement("div",{className:"kui-BaseMenuShortcut kui-DropdownMenuShortcut"},e.createElement(S,{className:"kui-BaseMenuSubTriggerIcon kui-DropdownMenuSubTriggerIcon"})))});Pe.displayName="DropdownMenu.SubTrigger";var Re=e.forwardRef(({className:o,...n},t)=>e.useContext(M)?e.createElement(s.Separator,{...n,asChild:!1,ref:t,className:l("kui-BaseMenuSeparator","kui-DropdownMenuSeparator",o)}):null);Re.displayName="DropdownMenu.Separator";function Ne({label:o,name:n}){let t=v(),u=e.useCallback(a=>{a.preventDefault(),t?.pop()},[t]),i=typeof o=="string"?o:n,r=i&&i!=="Back"?`Back from ${i}`:void 0;return e.createElement(s.Item,{"aria-label":r,textValue:i||"Back",onSelect:u,className:l("kui-reset","kui-BaseMenuItem","kui-DropdownMenuItem","kui-DropdownMenuDrillDownBackItem")},e.createElement(j,{className:"kui-BaseMenuSubTriggerIcon kui-DropdownMenuDrillDownBackIcon"}),e.createElement("span",{className:"kui-DropdownMenuDrillDownBackLabel"},o))}function Be(o){let{loop:n,onEscapeKeyDown:t,onPointerDownOutside:u,onFocusOutside:i,onInteractOutside:r,sideOffset:a,alignOffset:c,avoidCollisions:p,collisionBoundary:m,collisionPadding:w,arrowPadding:d,sticky:P,hideWhenDetached:b,updatePositionStrategy:f,...R}=o;return R}var be=e.forwardRef((o,n)=>{let t=v(),u=N();return t&&u?e.createElement(ve,{...o,ref:n,store:t,sub:u}):e.createElement(Ce,{...o,ref:n})});be.displayName="DropdownMenu.SubContent";var Ce=e.forwardRef((o,n)=>{let t=e.useContext(z),u=o.size??t.size,i=o.color??t.color,{className:r,children:a,container:c,forceMount:p,color:m,virtualized:w=!1,...d}=I({...o,size:u},k),P=h(u,k.size.default),b=e.useMemo(()=>({size:u,color:i}),[u,i]),f=e.createElement(B,{size:u},e.createElement(z.Provider,{value:b},a));return e.createElement(s.Portal,{container:c,forceMount:p},e.createElement(G,{asChild:!0},e.createElement(s.SubContent,{"data-accent-color":i,alignOffset:$(P),sideOffset:1,collisionPadding:10,...d,asChild:!1,ref:n,className:l("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-BaseMenuSubContent","kui-DropdownMenuContent","kui-DropdownMenuSubContent",r)},w?e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport","kui-virtualized")},f):e.createElement(L,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport")},f)))))});Ce.displayName="DropdownMenu.CascadeSubContent";var ve=e.forwardRef(({store:o,sub:n,...t},u)=>{let i=E(o,n.id),r=Z(o,n.id);if(i==="closed")return null;let{className:a,children:c,container:p,forceMount:m,virtualized:w,size:d,color:P,...b}=Be(t),f=i==="top",R=r?.name||(typeof n.label=="string"?n.label:"");return e.createElement("div",{role:"group","aria-label":R||void 0,...b,ref:u,"data-drill-down-panel":n.id,"data-drill-down-active":f?!0:void 0,className:l("kui-DropdownMenuDrillDownPanel",a)},f&&e.createElement(e.Fragment,null,e.createElement(Ne,{label:n.label,name:R}),e.createElement(s.Separator,{className:"kui-BaseMenuSeparator kui-DropdownMenuSeparator"})),e.createElement(y,{value:null},e.createElement(M.Provider,{value:f},c)))});ve.displayName="DropdownMenu.DrillDownPanel";var ge=e.forwardRef(({className:o,...n},t)=>e.createElement(F,{...n,ref:t,className:l("kui-DropdownMenuTriggerIcon",o)}));ge.displayName="DropdownMenu.TriggerIcon";export{ue as a,se as b,de as c,le as d,ce as e,me as f,we as g,De as h,Me as i,fe as j,Pe as k,Re as l,be as m,ge as n,Oe as o};
|
|
3
|
-
//# sourceMappingURL=chunk-5L4DZ2D3.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/dropdown-menu.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { DropdownMenu as DropdownMenuPrimitive, Slot } from 'radix-ui';\nimport { useCallbackRef } from 'radix-ui/internal';\n\nimport { ScrollArea } from './scroll-area.js';\nimport {\n dropdownMenuContentPropDefs,\n dropdownMenuSubContentPropDefs,\n dropdownMenuItemPropDefs,\n dropdownMenuCheckboxItemPropDefs,\n dropdownMenuRadioItemPropDefs,\n} from './dropdown-menu.props.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDotIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport {\n DrillDownLevelContext,\n DrillDownRoot,\n SubContext,\n useCreateDrillDownStore,\n useDrillDownStore,\n usePanelPosition,\n useStackEntry,\n useSubContext,\n} from './_internal/dropdown-menu-drill-down.js';\nimport {\n MenuCloseProvider,\n MenuGroupLabelProvider,\n MenuProvider,\n useMenuGroupLabelId,\n useMenuGroupLabelledBy,\n} from './_internal/menu-context.js';\nimport {\n MenuShortcut,\n getMenuAlignOffset,\n toAriaKeyShortcuts,\n useResolvedResponsiveValue,\n} from './_internal/base-menu.utils.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\n\nimport type { SubmenuBehavior } from './_internal/dropdown-menu-drill-down.js';\nimport type { IconProps } from './icons.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes, Responsive } from '../props/prop-def.js';\n\n/**\n * Open state of the menu, mirrored from Root so Content can reset drill-down\n * navigation when a force-mounted menu opens again.\n */\nconst DropdownMenuOpenContext = React.createContext(false);\n\ninterface DropdownMenuRootProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {}\nconst DropdownMenuRoot: React.FC<DropdownMenuRootProps> = (props) => {\n const { open: openProp, defaultOpen = false, onOpenChange } = props;\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen);\n const open = openProp ?? uncontrolledOpen;\n\n const handleOpenChangeProp = useCallbackRef(onOpenChange);\n const handleOpenChange = React.useCallback(\n (next: boolean) => {\n setUncontrolledOpen(next);\n handleOpenChangeProp(next);\n },\n [handleOpenChangeProp],\n );\n\n const close = React.useCallback(() => handleOpenChange(false), [handleOpenChange]);\n\n return (\n <DropdownMenuOpenContext.Provider value={open}>\n <MenuCloseProvider value={close}>\n <DropdownMenuPrimitive.Root {...props} open={open} onOpenChange={handleOpenChange} />\n </MenuCloseProvider>\n </DropdownMenuOpenContext.Provider>\n );\n};\nDropdownMenuRoot.displayName = 'DropdownMenu.Root';\n\ntype DropdownMenuTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.Trigger>;\ninterface DropdownMenuTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Trigger, RemovedProps> {}\nconst DropdownMenuTrigger = React.forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DropdownMenuPrimitive.Trigger>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenu.Trigger';\n\n/** Visual props shared by Content and SubContent. */\ntype DropdownMenuSurfaceProps = GetPropDefTypes<typeof dropdownMenuSubContentPropDefs>;\n\ntype DropdownMenuContentContextValue = {\n size?: DropdownMenuSurfaceProps['size'];\n color?: DropdownMenuSurfaceProps['color'];\n};\nconst DropdownMenuContentContext = React.createContext<DropdownMenuContentContextValue>({});\n\n/** Keys that navigate back one drill-down level, by writing direction. */\nconst BACK_KEYS = { ltr: 'ArrowLeft', rtl: 'ArrowRight' } as const;\nconst FORWARD_KEYS = { ltr: 'ArrowRight', rtl: 'ArrowLeft' } as const;\n\nfunction isTextEntryTarget(target: EventTarget | null) {\n return (\n target instanceof HTMLElement &&\n (target.isContentEditable || target.tagName === 'INPUT' || target.tagName === 'TEXTAREA')\n );\n}\n\nfunction getDirection(element: HTMLElement | null): 'ltr' | 'rtl' {\n return element?.closest('[dir]')?.getAttribute('dir') === 'rtl' ? 'rtl' : 'ltr';\n}\n\ntype DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;\ninterface DropdownMenuContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Content, RemovedProps>,\n DropdownMenuSurfaceProps {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior?: Responsive<SubmenuBehavior>;\n /**\n * When true, skips the ScrollArea wrapper to allow VirtualMenu to handle its own scrolling.\n * Use this when rendering virtualized lists inside the dropdown.\n */\n virtualized?: boolean;\n}\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, dropdownMenuContentPropDefs.size);\n const themeContext = useThemeContext();\n const {\n size = dropdownMenuContentPropDefs.size.default,\n } = props;\n const {\n className,\n children,\n color,\n container,\n forceMount,\n submenuBehavior,\n virtualized = false,\n onEscapeKeyDown,\n onKeyDown,\n ...contentProps\n } = extractProps(props, dropdownMenuContentPropDefs);\n\n const resolvedColor = color || themeContext.accentColor;\n const behavior = useResolvedResponsiveValue<SubmenuBehavior>(submenuBehavior, 'cascade');\n const isDrillDown = behavior === 'drill-down';\n const open = React.useContext(DropdownMenuOpenContext);\n const drillDownStore = useCreateDrillDownStore();\n\n // Escape goes back one drill-down level before it closes the menu.\n const handleEscapeKeyDown = (event: KeyboardEvent) => {\n onEscapeKeyDown?.(event);\n if (event.defaultPrevented || !isDrillDown || drillDownStore.getDepth() === 0) return;\n event.preventDefault();\n drillDownStore.pop('keyboard');\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || !isDrillDown || drillDownStore.getDepth() === 0) return;\n if (isTextEntryTarget(event.target)) return;\n if (event.key === BACK_KEYS[getDirection(event.currentTarget)]) {\n event.preventDefault();\n drillDownStore.pop('keyboard');\n }\n };\n\n const contextValue = React.useMemo(\n () => ({ size, color: resolvedColor }),\n [size, resolvedColor],\n );\n\n const contentBody = (\n <MenuProvider size={size}>\n <DropdownMenuContentContext.Provider value={contextValue}>\n <DrillDownRoot store={drillDownStore} behavior={behavior} open={open}>\n {children}\n </DrillDownRoot>\n </DropdownMenuContentContext.Provider>\n </MenuProvider>\n );\n\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.Content\n data-accent-color={resolvedColor}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n {...contentProps}\n onEscapeKeyDown={handleEscapeKeyDown}\n onKeyDown={handleKeyDown}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-PopperContent',\n 'kui-BaseMenuContent',\n 'kui-variant-soft',\n 'kui-DropdownMenuContent',\n className,\n )}\n >\n {virtualized ? (\n <div className={classNames('kui-BaseMenuViewport', 'kui-DropdownMenuViewport', 'kui-virtualized')}>\n {contentBody}\n </div>\n ) : (\n <ScrollArea type=\"auto\" scrollbars=\"vertical\">\n <div className={classNames('kui-BaseMenuViewport', 'kui-DropdownMenuViewport')}>\n {contentBody}\n </div>\n </ScrollArea>\n )}\n </DropdownMenuPrimitive.Content>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\nDropdownMenuContent.displayName = 'DropdownMenu.Content';\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;\ninterface DropdownMenuLabelProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Label, RemovedProps> {}\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, id: idProp, ...props }, forwardedRef) => {\n const isLevelVisible = React.useContext(DrillDownLevelContext);\n const id = useMenuGroupLabelId(idProp, isLevelVisible);\n if (!isLevelVisible) return null;\n return (\n <DropdownMenuPrimitive.Label\n {...props}\n id={id}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuLabel', 'kui-DropdownMenuLabel', className)}\n />\n );\n },\n);\nDropdownMenuLabel.displayName = 'DropdownMenu.Label';\n\ntype DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;\ntype DropdownMenuItemOwnProps = GetPropDefTypes<typeof dropdownMenuItemPropDefs>;\ninterface DropdownMenuItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Item, RemovedProps>,\n DropdownMenuItemOwnProps {}\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props, forwardedRef) => {\n const {\n className,\n children,\n color = dropdownMenuItemPropDefs.color.default,\n shortcut,\n ...itemProps\n } = props;\n // In drill-down mode, items of levels that are not on screen do not mount.\n if (!React.useContext(DrillDownLevelContext)) return null;\n return (\n <DropdownMenuPrimitive.Item\n data-accent-color={color}\n aria-keyshortcuts={shortcut ? toAriaKeyShortcuts(shortcut) : undefined}\n {...itemProps}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-BaseMenuItem', 'kui-DropdownMenuItem', className)}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n {shortcut && <MenuShortcut shortcut={shortcut} className=\"kui-DropdownMenuShortcut\" />}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nDropdownMenuItem.displayName = 'DropdownMenu.Item';\n\ntype DropdownMenuGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.Group>;\ninterface DropdownMenuGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Group, RemovedProps> {}\nconst DropdownMenuGroup = React.forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n ({ className, 'aria-labelledby': ariaLabelledBy, ...props }, forwardedRef) => {\n const [labelledBy, setLabelId] = useMenuGroupLabelledBy(ariaLabelledBy);\n // A drill-down level that is not on screen keeps its groups only to hold the open path.\n const isLevelVisible = React.useContext(DrillDownLevelContext);\n return (\n <MenuGroupLabelProvider value={setLabelId}>\n <DropdownMenuPrimitive.Group\n {...(isLevelVisible ? { 'aria-labelledby': labelledBy } : { role: 'none' })}\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuGroup', 'kui-DropdownMenuGroup', className)}\n />\n </MenuGroupLabelProvider>\n );\n },\n);\nDropdownMenuGroup.displayName = 'DropdownMenu.Group';\n\ntype DropdownMenuRadioGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioGroup, RemovedProps> {}\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>(({ className, 'aria-labelledby': ariaLabelledBy, ...props }, forwardedRef) => {\n const [labelledBy, setLabelId] = useMenuGroupLabelledBy(ariaLabelledBy);\n const isLevelVisible = React.useContext(DrillDownLevelContext);\n return (\n <MenuGroupLabelProvider value={setLabelId}>\n <DropdownMenuPrimitive.RadioGroup\n {...(isLevelVisible ? { 'aria-labelledby': labelledBy } : { role: 'none' })}\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuRadioGroup', 'kui-DropdownMenuRadioGroup', className)}\n />\n </MenuGroupLabelProvider>\n );\n});\nDropdownMenuRadioGroup.displayName = 'DropdownMenu.RadioGroup';\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemOwnProps = GetPropDefTypes<typeof dropdownMenuRadioItemPropDefs>;\ninterface DropdownMenuRadioItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioItem, RemovedProps>,\n DropdownMenuRadioItemOwnProps {}\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n color = dropdownMenuRadioItemPropDefs.color.default,\n ...itemProps\n } = props;\n if (!React.useContext(DrillDownLevelContext)) return null;\n return (\n <DropdownMenuPrimitive.RadioItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'kui-BaseMenuItem',\n 'kui-BaseMenuRadioItem',\n 'kui-DropdownMenuItem',\n 'kui-DropdownMenuRadioItem',\n className,\n )}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n <DropdownMenuPrimitive.ItemIndicator className=\"kui-BaseMenuItemIndicator kui-DropdownMenuItemIndicator\">\n <ThickDotIcon className=\"kui-BaseMenuItemIndicatorIcon kui-DropdownMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </DropdownMenuPrimitive.RadioItem>\n );\n});\nDropdownMenuRadioItem.displayName = 'DropdownMenu.RadioItem';\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemOwnProps = GetPropDefTypes<typeof dropdownMenuCheckboxItemPropDefs>;\ninterface DropdownMenuCheckboxItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.CheckboxItem, RemovedProps>,\n DropdownMenuCheckboxItemOwnProps {}\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n shortcut,\n color = dropdownMenuCheckboxItemPropDefs.color.default,\n ...itemProps\n } = props;\n if (!React.useContext(DrillDownLevelContext)) return null;\n return (\n <DropdownMenuPrimitive.CheckboxItem\n aria-keyshortcuts={shortcut ? toAriaKeyShortcuts(shortcut) : undefined}\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'kui-BaseMenuItem',\n 'kui-BaseMenuCheckboxItem',\n 'kui-DropdownMenuItem',\n 'kui-DropdownMenuCheckboxItem',\n className,\n )}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n <DropdownMenuPrimitive.ItemIndicator className=\"kui-BaseMenuItemIndicator kui-DropdownMenuItemIndicator\">\n <ThickCheckIcon className=\"kui-BaseMenuItemIndicatorIcon kui-DropdownMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n {shortcut && <MenuShortcut shortcut={shortcut} className=\"kui-DropdownMenuShortcut\" />}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n});\nDropdownMenuCheckboxItem.displayName = 'DropdownMenu.CheckboxItem';\n\ninterface DropdownMenuSubProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub> {\n /**\n * Label displayed in the back button when using drill-down mode.\n * If not provided, defaults to \"Back\".\n */\n label?: React.ReactNode;\n}\nconst DropdownMenuSub: React.FC<DropdownMenuSubProps> = ({\n label = 'Back',\n open,\n defaultOpen,\n onOpenChange,\n children,\n}) => {\n const drillDownStore = useDrillDownStore();\n const id = React.useId();\n const subContextValue = React.useMemo(() => ({ id, label }), [id, label]);\n const isOpenInDrillDown = usePanelPosition(drillDownStore, id) !== 'closed';\n\n const handleOpenChange = useCallbackRef(onOpenChange);\n const isControlled = open !== undefined;\n\n // Drill-down, controlled: navigating asks `onOpenChange` and leaves the stack to `open`.\n React.useLayoutEffect(() => {\n if (!drillDownStore || !isControlled) return;\n drillDownStore.setController(id, handleOpenChange);\n return () => drillDownStore.setController(id, null);\n }, [drillDownStore, isControlled, id, handleOpenChange]);\n\n React.useLayoutEffect(() => {\n if (!drillDownStore || open === undefined) return;\n if (open && !drillDownStore.isOpen(id)) drillDownStore.open(id, drillDownStore.takePendingModality(id));\n else if (!open && drillDownStore.isOpen(id)) drillDownStore.close(id, drillDownStore.takePendingModality(id));\n }, [drillDownStore, open, id]);\n\n // A `defaultOpen` push on mount is the starting state, not a change to report.\n const defaultOpenRef = React.useRef(open === undefined && Boolean(defaultOpen));\n React.useLayoutEffect(() => {\n if (drillDownStore && defaultOpenRef.current) drillDownStore.open(id);\n else defaultOpenRef.current = false;\n // Only on mount, like an uncontrolled default.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Uncontrolled, the stack drives `onOpenChange`. Controlled, it reports only a close\n // the `open` prop did not ask for, such as a parent level closing.\n const wasOpenRef = React.useRef(isOpenInDrillDown);\n React.useEffect(() => {\n if (!drillDownStore || wasOpenRef.current === isOpenInDrillDown) return;\n wasOpenRef.current = isOpenInDrillDown;\n if (isOpenInDrillDown && defaultOpenRef.current) {\n defaultOpenRef.current = false;\n return;\n }\n if (open !== undefined && open === isOpenInDrillDown) return;\n handleOpenChange(isOpenInDrillDown);\n }, [drillDownStore, isOpenInDrillDown, handleOpenChange, open]);\n\n // Radix Sub stays mounted in both behaviors so switching behavior does not\n // remount the subtree. It only renders context; in drill-down its trigger\n // and content are never rendered, so it reports no open changes of its own.\n return (\n <SubContext.Provider value={subContextValue}>\n <DropdownMenuPrimitive.Sub\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={drillDownStore ? undefined : onOpenChange}\n >\n {children}\n </DropdownMenuPrimitive.Sub>\n </SubContext.Provider>\n );\n};\nDropdownMenuSub.displayName = 'DropdownMenu.Sub';\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubTrigger, RemovedProps> {}\nconst DropdownMenuSubTrigger = React.forwardRef<\n DropdownMenuSubTriggerElement,\n DropdownMenuSubTriggerProps\n>((props, forwardedRef) => {\n const { className, children, onKeyDown, ...subTriggerProps } = props;\n const drillDownStore = useDrillDownStore();\n const subContext = useSubContext();\n const isLevelVisible = React.useContext(DrillDownLevelContext);\n\n if (drillDownStore && subContext) {\n if (!isLevelVisible) return null;\n\n const handleSelect = (event: Event) => {\n // Navigating does not close the menu.\n event.preventDefault();\n drillDownStore.push(subContext.id);\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || subTriggerProps.disabled) return;\n if (event.key === FORWARD_KEYS[getDirection(event.currentTarget)]) {\n event.preventDefault();\n drillDownStore.push(subContext.id, 'keyboard');\n }\n };\n\n return (\n // The row navigates within the same menu, so it announces no popup.\n <DropdownMenuPrimitive.Item\n {...subTriggerProps}\n data-drill-down-trigger={subContext.id}\n data-drill-down-name={subTriggerProps.textValue}\n onSelect={handleSelect}\n onKeyDown={handleKeyDown}\n ref={forwardedRef}\n className={classNames(\n 'kui-reset',\n 'kui-BaseMenuItem',\n 'kui-BaseMenuSubTrigger',\n 'kui-DropdownMenuItem',\n 'kui-DropdownMenuSubTrigger',\n 'kui-DropdownMenuDrillDownSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"kui-BaseMenuShortcut kui-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"kui-BaseMenuSubTriggerIcon kui-DropdownMenuSubTriggerIcon\" />\n </div>\n </DropdownMenuPrimitive.Item>\n );\n }\n\n return (\n <DropdownMenuPrimitive.SubTrigger\n {...subTriggerProps}\n onKeyDown={onKeyDown}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-BaseMenuItem',\n 'kui-BaseMenuSubTrigger',\n 'kui-DropdownMenuItem',\n 'kui-DropdownMenuSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"kui-BaseMenuShortcut kui-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"kui-BaseMenuSubTriggerIcon kui-DropdownMenuSubTriggerIcon\" />\n </div>\n </DropdownMenuPrimitive.SubTrigger>\n );\n});\nDropdownMenuSubTrigger.displayName = 'DropdownMenu.SubTrigger';\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;\ninterface DropdownMenuSeparatorProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Separator, RemovedProps> {}\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, forwardedRef) => {\n if (!React.useContext(DrillDownLevelContext)) return null;\n return (\n <DropdownMenuPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuSeparator', 'kui-DropdownMenuSeparator', className)}\n />\n );\n});\nDropdownMenuSeparator.displayName = 'DropdownMenu.Separator';\n\n/** The row at the top of a drill-down panel that returns to the parent level. */\nfunction DrillDownBackItem({ label, name }: { label: React.ReactNode; name: string }) {\n const drillDownStore = useDrillDownStore();\n\n const handleSelect = React.useCallback(\n (event: Event) => {\n // Navigating does not close the menu.\n event.preventDefault();\n drillDownStore?.pop();\n },\n [drillDownStore],\n );\n\n // The visible label is often the submenu title, so the accessible name says\n // what the row does while still containing the visible text.\n const labelText = typeof label === 'string' ? label : name;\n const ariaLabel = labelText && labelText !== 'Back' ? `Back from ${labelText}` : undefined;\n\n return (\n <DropdownMenuPrimitive.Item\n aria-label={ariaLabel}\n textValue={labelText || 'Back'}\n onSelect={handleSelect}\n className={classNames(\n 'kui-reset',\n 'kui-BaseMenuItem',\n 'kui-DropdownMenuItem',\n 'kui-DropdownMenuDrillDownBackItem',\n )}\n >\n <ThickChevronLeftIcon className=\"kui-BaseMenuSubTriggerIcon kui-DropdownMenuDrillDownBackIcon\" />\n <span className=\"kui-DropdownMenuDrillDownBackLabel\">{label}</span>\n </DropdownMenuPrimitive.Item>\n );\n}\n\n/** Radix positioning and layer props that have no meaning for an inline drill-down panel. */\ntype PopperOnlyProps =\n | 'loop'\n | 'onEscapeKeyDown'\n | 'onPointerDownOutside'\n | 'onFocusOutside'\n | 'onInteractOutside'\n | 'sideOffset'\n | 'alignOffset'\n | 'avoidCollisions'\n | 'collisionBoundary'\n | 'collisionPadding'\n | 'arrowPadding'\n | 'sticky'\n | 'hideWhenDetached'\n | 'updatePositionStrategy';\n\nfunction omitPopperProps<T extends Record<string, unknown>>(props: T): Omit<T, PopperOnlyProps> {\n const {\n loop: _loop,\n onEscapeKeyDown: _onEscapeKeyDown,\n onPointerDownOutside: _onPointerDownOutside,\n onFocusOutside: _onFocusOutside,\n onInteractOutside: _onInteractOutside,\n sideOffset: _sideOffset,\n alignOffset: _alignOffset,\n avoidCollisions: _avoidCollisions,\n collisionBoundary: _collisionBoundary,\n collisionPadding: _collisionPadding,\n arrowPadding: _arrowPadding,\n sticky: _sticky,\n hideWhenDetached: _hideWhenDetached,\n updatePositionStrategy: _updatePositionStrategy,\n ...rest\n } = props;\n return rest;\n}\n\ntype DropdownMenuSubContentElement = React.ElementRef<typeof DropdownMenuPrimitive.SubContent>;\ninterface DropdownMenuSubContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubContent, RemovedProps>,\n DropdownMenuSurfaceProps {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n /**\n * When true, skips the ScrollArea wrapper so a VirtualMenu can handle its own\n * scrolling. Applies to cascade submenus; a drill-down panel scrolls with the\n * root content.\n */\n virtualized?: boolean;\n}\nconst DropdownMenuSubContent = React.forwardRef<\n DropdownMenuSubContentElement,\n DropdownMenuSubContentProps\n>((props, forwardedRef) => {\n const drillDownStore = useDrillDownStore();\n const subContext = useSubContext();\n\n if (drillDownStore && subContext) {\n return (\n <DrillDownPanel {...props} ref={forwardedRef} store={drillDownStore} sub={subContext} />\n );\n }\n return <CascadeSubContent {...props} ref={forwardedRef} />;\n});\nDropdownMenuSubContent.displayName = 'DropdownMenu.SubContent';\n\nconst CascadeSubContent = React.forwardRef<DropdownMenuSubContentElement, DropdownMenuSubContentProps>(\n (props, forwardedRef) => {\n const parent = React.useContext(DropdownMenuContentContext);\n\n // A submenu inherits the parent surface, and its own props win.\n const size = props.size ?? parent.size;\n const color = props.color ?? parent.color;\n\n const {\n className,\n children,\n container,\n forceMount,\n color: _color,\n virtualized = false,\n ...subContentProps\n } = extractProps({ ...props, size }, dropdownMenuSubContentPropDefs);\n\n const scalarSize = useResolvedResponsiveValue(size, dropdownMenuSubContentPropDefs.size.default);\n\n const contextValue = React.useMemo(\n () => ({ size, color }),\n [size, color],\n );\n\n const body = (\n <MenuProvider size={size}>\n <DropdownMenuContentContext.Provider value={contextValue}>{children}</DropdownMenuContentContext.Provider>\n </MenuProvider>\n );\n\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.SubContent\n data-accent-color={color}\n alignOffset={getMenuAlignOffset(scalarSize)}\n // Side offset accounts for the outer solid box-shadow\n sideOffset={1}\n collisionPadding={10}\n {...subContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-PopperContent',\n 'kui-BaseMenuContent',\n 'kui-variant-soft',\n 'kui-BaseMenuSubContent',\n 'kui-DropdownMenuContent',\n 'kui-DropdownMenuSubContent',\n className,\n )}\n >\n {virtualized ? (\n <div className={classNames('kui-BaseMenuViewport', 'kui-DropdownMenuViewport', 'kui-virtualized')}>\n {body}\n </div>\n ) : (\n <ScrollArea type=\"auto\" scrollbars=\"vertical\">\n <div className={classNames('kui-BaseMenuViewport', 'kui-DropdownMenuViewport')}>{body}</div>\n </ScrollArea>\n )}\n </DropdownMenuPrimitive.SubContent>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\nCascadeSubContent.displayName = 'DropdownMenu.CascadeSubContent';\n\ninterface DrillDownPanelProps extends DropdownMenuSubContentProps {\n store: NonNullable<ReturnType<typeof useDrillDownStore>>;\n sub: NonNullable<ReturnType<typeof useSubContext>>;\n}\n\n/**\n * A submenu rendered inline in drill-down mode. It mounts its children only\n * while it is on the navigation stack, and shows its own items only while it\n * is the top level; deeper panels inside it stay mounted.\n */\nconst DrillDownPanel = React.forwardRef<DropdownMenuSubContentElement, DrillDownPanelProps>(\n ({ store, sub, ...props }, forwardedRef) => {\n const position = usePanelPosition(store, sub.id);\n const entry = useStackEntry(store, sub.id);\n\n if (position === 'closed') return null;\n\n const {\n className,\n children,\n container: _container,\n forceMount: _forceMount,\n virtualized: _virtualized,\n size: _size,\n color: _color,\n ...panelProps\n } = omitPopperProps(props);\n\n const isTop = position === 'top';\n const name = entry?.name || (typeof sub.label === 'string' ? sub.label : '');\n\n return (\n <div\n role=\"group\"\n aria-label={name || undefined}\n {...panelProps}\n ref={forwardedRef}\n data-drill-down-panel={sub.id}\n data-drill-down-active={isTop ? true : undefined}\n className={classNames('kui-DropdownMenuDrillDownPanel', className)}\n >\n {isTop && (\n <>\n <DrillDownBackItem label={sub.label} name={name} />\n <DropdownMenuPrimitive.Separator className=\"kui-BaseMenuSeparator kui-DropdownMenuSeparator\" />\n </>\n )}\n <MenuGroupLabelProvider value={null}>\n <DrillDownLevelContext.Provider value={isTop}>{children}</DrillDownLevelContext.Provider>\n </MenuGroupLabelProvider>\n </div>\n );\n },\n);\nDrillDownPanel.displayName = 'DropdownMenu.DrillDownPanel';\n\ntype DropdownMenuTriggerIconElement = React.ElementRef<'svg'>;\ninterface DropdownMenuTriggerIconProps extends IconProps {}\nconst DropdownMenuTriggerIcon = React.forwardRef<\n DropdownMenuTriggerIconElement,\n DropdownMenuTriggerIconProps\n>(({ className, ...props }, forwardedRef) => (\n <ChevronDownIcon\n {...props}\n ref={forwardedRef}\n className={classNames('kui-DropdownMenuTriggerIcon', className)}\n />\n));\nDropdownMenuTriggerIcon.displayName = 'DropdownMenu.TriggerIcon';\n\nexport {\n DropdownMenuRoot as Root,\n DropdownMenuTrigger as Trigger,\n DropdownMenuTriggerIcon as TriggerIcon,\n DropdownMenuContent as Content,\n DropdownMenuLabel as Label,\n DropdownMenuItem as Item,\n DropdownMenuGroup as Group,\n DropdownMenuRadioGroup as RadioGroup,\n DropdownMenuRadioItem as RadioItem,\n DropdownMenuCheckboxItem as CheckboxItem,\n DropdownMenuSub as Sub,\n DropdownMenuSubTrigger as SubTrigger,\n DropdownMenuSubContent as SubContent,\n DropdownMenuSeparator as Separator,\n};\n\nexport type {\n DropdownMenuRootProps as RootProps,\n DropdownMenuTriggerProps as TriggerProps,\n DropdownMenuTriggerIconProps as TriggerIconProps,\n DropdownMenuContentProps as ContentProps,\n DropdownMenuLabelProps as LabelProps,\n DropdownMenuItemProps as ItemProps,\n DropdownMenuGroupProps as GroupProps,\n DropdownMenuRadioGroupProps as RadioGroupProps,\n DropdownMenuRadioItemProps as RadioItemProps,\n DropdownMenuCheckboxItemProps as CheckboxItemProps,\n DropdownMenuSubProps as SubProps,\n DropdownMenuSubTriggerProps as SubTriggerProps,\n DropdownMenuSubContentProps as SubContentProps,\n DropdownMenuSeparatorProps as SeparatorProps,\n SubmenuBehavior,\n};\n"],
|
|
5
|
-
"mappings": ";+lBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,kBAAAE,GAAA,YAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,UAAAC,GAAA,eAAAC,GAAA,cAAAC,GAAA,SAAAC,GAAA,cAAAC,GAAA,QAAAC,GAAA,eAAAC,GAAA,eAAAC,GAAA,YAAAC,GAAA,gBAAAC,KAEA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,gBAAgBC,EAAuB,QAAAC,MAAY,WAC5D,OAAS,kBAAAC,OAAsB,oBAgD/B,IAAMC,GAAgC,gBAAc,EAAK,EAInDC,GAAqDC,GAAU,CACnE,GAAM,CAAE,KAAMC,EAAU,YAAAC,EAAc,GAAO,aAAAC,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GAAGe,CACL,EAAInC,GAAgB1G,CAAK,EAEnB8I,EAAQR,IAAa,MACrBhC,EAAOiC,GAAO,OAAS,OAAOF,EAAI,OAAU,SAAWA,EAAI,MAAQ,IAEzE,OACE,gBAAC,OACC,KAAK,QACL,aAAY/B,GAAQ,OACnB,GAAGuC,EACJ,IAAK7H,EACL,wBAAuBqH,EAAI,GAC3B,yBAAwBS,EAAQ,GAAO,OACvC,UAAWtF,EAAW,iCAAkCxB,CAAS,GAEhE8G,GACC,gCACE,gBAACzC,GAAA,CAAkB,MAAOgC,EAAI,MAAO,KAAM/B,EAAM,EACjD,gBAACzF,EAAsB,UAAtB,CAAgC,UAAU,kDAAkD,CAC/F,EAEF,gBAAC+D,EAAA,CAAuB,MAAO,MAC7B,gBAACf,EAAsB,SAAtB,CAA+B,MAAOiF,GAAQ/H,CAAS,CAC1D,CACF,CAEJ,CACF,EACA4G,GAAe,YAAc,8BAI7B,IAAMoB,GAAgC,aAGpC,CAAC,CAAE,UAAA/G,EAAW,GAAGhC,CAAM,EAAGgB,IAC1B,gBAACgI,EAAA,CACE,GAAGhJ,EACJ,IAAKgB,EACL,UAAWwC,EAAW,8BAA+BxB,CAAS,EAChE,CACD,EACD+G,GAAwB,YAAc",
|
|
6
|
-
"names": ["dropdown_menu_exports", "__export", "DropdownMenuCheckboxItem", "DropdownMenuContent", "DropdownMenuGroup", "DropdownMenuItem", "DropdownMenuLabel", "DropdownMenuRadioGroup", "DropdownMenuRadioItem", "DropdownMenuRoot", "DropdownMenuSeparator", "DropdownMenuSub", "DropdownMenuSubContent", "DropdownMenuSubTrigger", "DropdownMenuTrigger", "DropdownMenuTriggerIcon", "React", "classNames", "DropdownMenuPrimitive", "Slot", "useCallbackRef", "DropdownMenuOpenContext", "DropdownMenuRoot", "props", "openProp", "defaultOpen", "onOpenChange", "uncontrolledOpen", "setUncontrolledOpen", "open", "handleOpenChangeProp", "useCallbackRef", "handleOpenChange", "next", "close", "MenuCloseProvider", "DropdownMenuPrimitive", "DropdownMenuTrigger", "children", "forwardedRef", "requireReactElement", "DropdownMenuContentContext", "BACK_KEYS", "FORWARD_KEYS", "isTextEntryTarget", "target", "getDirection", "element", "DropdownMenuContent", "ownProps", "useThemeSizeProps", "baseMenuContentPropDefs", "themeContext", "useThemeContext", "size", "className", "color", "container", "forceMount", "submenuBehavior", "virtualized", "onEscapeKeyDown", "onKeyDown", "contentProps", "extractProps", "resolvedColor", "behavior", "useResolvedResponsiveValue", "isDrillDown", "drillDownStore", "useCreateDrillDownStore", "handleEscapeKeyDown", "event", "handleKeyDown", "contextValue", "contentBody", "MenuProvider", "DrillDownRoot", "Theme", "classNames", "ScrollArea", "DropdownMenuLabel", "idProp", "isLevelVisible", "DrillDownLevelContext", "id", "useMenuGroupLabelId", "DropdownMenuItem", "baseMenuItemPropDefs", "shortcut", "itemProps", "toAriaKeyShortcuts", "Slot", "MenuShortcut", "DropdownMenuGroup", "ariaLabelledBy", "labelledBy", "setLabelId", "useMenuGroupLabelledBy", "MenuGroupLabelProvider", "DropdownMenuRadioGroup", "DropdownMenuRadioItem", "baseMenuRadioItemPropDefs", "ThickDotIcon", "DropdownMenuCheckboxItem", "baseMenuCheckboxItemPropDefs", "ThickCheckIcon", "DropdownMenuSub", "label", "useDrillDownStore", "subContextValue", "isOpenInDrillDown", "usePanelPosition", "isControlled", "defaultOpenRef", "wasOpenRef", "SubContext", "DropdownMenuSubTrigger", "subTriggerProps", "subContext", "useSubContext", "handleSelect", "ThickChevronRightIcon", "DropdownMenuSeparator", "DrillDownBackItem", "name", "labelText", "ariaLabel", "ThickChevronLeftIcon", "omitPopperProps", "_loop", "_onEscapeKeyDown", "_onPointerDownOutside", "_onFocusOutside", "_onInteractOutside", "_sideOffset", "_alignOffset", "_avoidCollisions", "_collisionBoundary", "_collisionPadding", "_arrowPadding", "_sticky", "_hideWhenDetached", "_updatePositionStrategy", "rest", "DropdownMenuSubContent", "DrillDownPanel", "CascadeSubContent", "parent", "_color", "subContentProps", "baseMenuSubContentPropDefs", "scalarSize", "body", "getMenuAlignOffset", "store", "sub", "position", "entry", "useStackEntry", "_container", "_forceMount", "_virtualized", "_size", "panelProps", "isTop", "DropdownMenuTriggerIcon", "ChevronDownIcon"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{b as o}from"./chunk-XU74PNM2.js";import{c as r}from"./chunk-HBWBPBSA.js";var t=["surface","soft","outline"],a={variant:{type:"enum",className:"kui-variant",values:t,default:"surface"},...r,...o,duration:{type:"string"}};export{a};
|
|
3
|
-
//# sourceMappingURL=chunk-5RFDCAKC.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as F}from"./chunk-TGRHRMQI.js";import{b as j,c as g}from"./chunk-N3QLHFHB.js";import{c as h,e as V,g as k,h as S,i as A}from"./chunk-CV7QQTI3.js";import{a as y}from"./chunk-RVPLXLRA.js";import{b as B,d as w,f as z}from"./chunk-GKDGNPBD.js";import{c as L}from"./chunk-5ON3XLRD.js";import{c as C,d as O,e as W,f as D}from"./chunk-I6SMGWS5.js";import{b as R,c as b,d as I,e as v}from"./chunk-XL5OHW6Z.js";import{c as f}from"./chunk-OKQAVYW4.js";import{a as ne}from"./chunk-VQPANPMI.js";var ae={};ne(ae,{CheckboxItem:()=>Y,Content:()=>K,Group:()=>J,Item:()=>H,Label:()=>U,RadioGroup:()=>Q,RadioItem:()=>X,Root:()=>_,Separator:()=>te,Sub:()=>Z,SubContent:()=>ee,SubTrigger:()=>$,Trigger:()=>q});import*as e from"react";import s from"classnames";import{ContextMenu as i,Slot as N}from"radix-ui";import{useCallbackRef as re}from"radix-ui/internal";var _=t=>{let{open:r,onOpenChange:n}=t,[a,o]=e.useState(!1),u=r??a,p=re(n),c=e.useCallback(l=>{o(l),p(l)},[p]),m=e.useCallback(()=>c(!1),[c]);return e.createElement(V,{value:m},e.createElement(i.Root,{...t,open:u,onOpenChange:c}))};_.displayName="ContextMenu.Root";var q=e.forwardRef(({children:t,...r},n)=>e.createElement(i.Trigger,{...r,ref:n,asChild:!0},F(t)));q.displayName="ContextMenu.Trigger";var T=e.createContext({}),K=e.forwardRef((t,r)=>{let n=L(t,C.size),a=j(),{size:o=C.size.default}=n,{className:u,children:p,color:c,container:m,forceMount:l,submenuBehavior:G,virtualized:d=!1,...P}=f(n,C),x=c||a.accentColor,M=R(o,C.size.default),oe=e.useMemo(()=>({size:o,color:x}),[o,x]),E=e.createElement(h,{size:o},e.createElement(T.Provider,{value:oe},p));return e.createElement(i.Portal,{container:m,forceMount:l},e.createElement(g,{asChild:!0},e.createElement(i.Content,{"data-accent-color":x,alignOffset:b(M),collisionPadding:10,...P,asChild:!1,ref:r,className:s("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-ContextMenuContent",u)},d?e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport","kui-virtualized")},E):e.createElement(y,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport")},E)))))});K.displayName="ContextMenu.Content";var U=e.forwardRef(({className:t,id:r,...n},a)=>{let o=A(r);return e.createElement(i.Label,{...n,id:o,asChild:!1,ref:a,className:s("kui-BaseMenuLabel","kui-ContextMenuLabel",t)})});U.displayName="ContextMenu.Label";var H=e.forwardRef((t,r)=>{let{className:n,children:a,color:o=O.color.default,shortcut:u,...p}=t;return e.createElement(i.Item,{"data-accent-color":o,"aria-keyshortcuts":u?I(u):void 0,...p,ref:r,className:s("kui-reset","kui-BaseMenuItem","kui-ContextMenuItem",n)},e.createElement(N.Slottable,null,a),u&&e.createElement(v,{shortcut:u,className:"kui-ContextMenuShortcut"}))});H.displayName="ContextMenu.Item";var J=e.forwardRef(({className:t,"aria-labelledby":r,...n},a)=>{let[o,u]=S(r);return e.createElement(k,{value:u},e.createElement(i.Group,{"aria-labelledby":o,...n,asChild:!1,ref:a,className:s("kui-BaseMenuGroup","kui-ContextMenuGroup",t)}))});J.displayName="ContextMenu.Group";var Q=e.forwardRef(({className:t,"aria-labelledby":r,...n},a)=>{let[o,u]=S(r);return e.createElement(k,{value:u},e.createElement(i.RadioGroup,{"aria-labelledby":o,...n,asChild:!1,ref:a,className:s("kui-BaseMenuRadioGroup","kui-ContextMenuRadioGroup",t)}))});Q.displayName="ContextMenu.RadioGroup";var X=e.forwardRef((t,r)=>{let{children:n,className:a,color:o=D.color.default,...u}=t;return e.createElement(i.RadioItem,{...u,asChild:!1,ref:r,"data-accent-color":o,className:s("kui-BaseMenuItem","kui-BaseMenuRadioItem","kui-ContextMenuItem","kui-ContextMenuRadioItem",a)},e.createElement(N.Slottable,null,n),e.createElement(i.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-ContextMenuItemIndicator"},e.createElement(z,{className:"kui-BaseMenuItemIndicatorIcon kui-ContextMenuItemIndicatorIcon"})))});X.displayName="ContextMenu.RadioItem";var Y=e.forwardRef((t,r)=>{let{children:n,className:a,shortcut:o,color:u=W.color.default,...p}=t;return e.createElement(i.CheckboxItem,{"aria-keyshortcuts":o?I(o):void 0,...p,asChild:!1,ref:r,"data-accent-color":u,className:s("kui-BaseMenuItem","kui-BaseMenuCheckboxItem","kui-ContextMenuItem","kui-ContextMenuCheckboxItem",a)},e.createElement(N.Slottable,null,n),e.createElement(i.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-ContextMenuItemIndicator"},e.createElement(B,{className:"kui-BaseMenuItemIndicatorIcon kui-ContextMenuItemIndicatorIcon"})),o&&e.createElement(v,{shortcut:o,className:"kui-ContextMenuShortcut"}))});Y.displayName="ContextMenu.CheckboxItem";var Z=t=>e.createElement(i.Sub,{...t});Z.displayName="ContextMenu.Sub";var $=e.forwardRef((t,r)=>{let{className:n,children:a,...o}=t;return e.createElement(i.SubTrigger,{...o,asChild:!1,ref:r,className:s("kui-BaseMenuItem","kui-BaseMenuSubTrigger","kui-ContextMenuItem","kui-ContextMenuSubTrigger",n)},a,e.createElement("div",{className:"kui-BaseMenuShortcut kui-ContextMenuShortcut"},e.createElement(w,{className:"kui-BaseMenuSubTriggerIcon kui-ContextMenuSubTriggerIcon"})))});$.displayName="ContextMenu.SubTrigger";var ee=e.forwardRef((t,r)=>{let n=e.useContext(T),a=t.size??n.size,o=t.color??n.color,{className:u,children:p,container:c,forceMount:m,color:l,virtualized:G=!1,...d}=f({...t,size:a},C),P=R(a,C.size.default),x=e.useMemo(()=>({size:a,color:o}),[a,o]),M=e.createElement(h,{size:a},e.createElement(T.Provider,{value:x},p));return e.createElement(i.Portal,{container:c,forceMount:m},e.createElement(g,{asChild:!0},e.createElement(i.SubContent,{"data-accent-color":o,alignOffset:b(P),sideOffset:1,collisionPadding:10,...d,asChild:!1,ref:r,className:s("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-BaseMenuSubContent","kui-ContextMenuContent","kui-ContextMenuSubContent",u)},G?e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport","kui-virtualized")},M):e.createElement(y,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport")},M)))))});ee.displayName="ContextMenu.SubContent";var te=e.forwardRef(({className:t,...r},n)=>e.createElement(i.Separator,{...r,asChild:!1,ref:n,className:s("kui-BaseMenuSeparator","kui-ContextMenuSeparator",t)}));te.displayName="ContextMenu.Separator";export{_ as a,q as b,K as c,U as d,H as e,J as f,Q as g,X as h,Y as i,Z as j,$ as k,ee as l,te as m,ae as n};
|
|
3
|
-
//# sourceMappingURL=chunk-5XR5PTDR.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/context-menu.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * Context Menu component that provides right-click menu functionality.\n * Requires client-side rendering due to event handling and portal usage.\n */\n'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { ContextMenu as ContextMenuPrimitive, Slot } from 'radix-ui';\nimport { useCallbackRef } from 'radix-ui/internal';\n\nimport { ScrollArea } from './scroll-area.js';\nimport {\n contextMenuContentPropDefs,\n contextMenuSubContentPropDefs,\n contextMenuItemPropDefs,\n contextMenuCheckboxItemPropDefs,\n contextMenuRadioItemPropDefs,\n} from './context-menu.props.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { ThickCheckIcon, ThickChevronRightIcon, ThickDotIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport {\n MenuCloseProvider,\n MenuGroupLabelProvider,\n MenuProvider,\n useMenuGroupLabelId,\n useMenuGroupLabelledBy,\n} from './_internal/menu-context.js';\nimport {\n MenuShortcut,\n getMenuAlignOffset,\n toAriaKeyShortcuts,\n useResolvedResponsiveValue,\n} from './_internal/base-menu.utils.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes, Responsive } from '../props/prop-def.js';\n\ninterface ContextMenuRootProps\n extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Root> {}\nconst ContextMenuRoot: React.FC<ContextMenuRootProps> = (props) => {\n const { open: openProp, onOpenChange } = props;\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);\n const open = openProp ?? uncontrolledOpen;\n\n const handleOpenChangeProp = useCallbackRef(onOpenChange);\n const handleOpenChange = React.useCallback(\n (next: boolean) => {\n setUncontrolledOpen(next);\n handleOpenChangeProp(next);\n },\n [handleOpenChangeProp],\n );\n const close = React.useCallback(() => handleOpenChange(false), [handleOpenChange]);\n\n return (\n <MenuCloseProvider value={close}>\n <ContextMenuPrimitive.Root {...props} open={open} onOpenChange={handleOpenChange} />\n </MenuCloseProvider>\n );\n};\nContextMenuRoot.displayName = 'ContextMenu.Root';\n\ntype ContextMenuTriggerElement = React.ElementRef<typeof ContextMenuPrimitive.Trigger>;\ninterface ContextMenuTriggerProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Trigger, RemovedProps> {}\nconst ContextMenuTrigger = React.forwardRef<ContextMenuTriggerElement, ContextMenuTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </ContextMenuPrimitive.Trigger>\n ),\n);\nContextMenuTrigger.displayName = 'ContextMenu.Trigger';\n\n/** Visual props shared by Content and SubContent. */\ntype ContextMenuSurfaceProps = GetPropDefTypes<typeof contextMenuContentPropDefs>;\n\ntype ContextMenuContentContextValue = {\n size?: ContextMenuSurfaceProps['size'];\n color?: ContextMenuSurfaceProps['color'];\n};\nconst ContextMenuContentContext = React.createContext<ContextMenuContentContextValue>({});\ntype ContextMenuContentElement = React.ElementRef<typeof ContextMenuPrimitive.Content>;\ninterface ContextMenuContentProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Content, RemovedProps>,\n ContextMenuSurfaceProps {\n container?: React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Portal>['container'];\n /**\n * When true, skips the ScrollArea wrapper to allow VirtualMenu to handle its own scrolling.\n * Use this when rendering virtualized lists inside the context menu.\n */\n virtualized?: boolean;\n /**\n * @deprecated Has no effect. ContextMenu submenus always cascade.\n */\n submenuBehavior?: Responsive<'cascade' | 'drill-down'>;\n}\nconst ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMenuContentProps>(\n (ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, contextMenuContentPropDefs.size);\n const themeContext = useThemeContext();\n const {\n size = contextMenuContentPropDefs.size.default,\n } = props;\n const {\n className,\n children,\n color,\n container,\n forceMount,\n submenuBehavior: _submenuBehavior,\n virtualized = false,\n ...contentProps\n } = extractProps(props, contextMenuContentPropDefs);\n\n const resolvedColor = color || themeContext.accentColor;\n const scalarSize = useResolvedResponsiveValue(size, contextMenuContentPropDefs.size.default);\n\n const contextValue = React.useMemo(\n () => ({ size, color: resolvedColor }),\n [size, resolvedColor],\n );\n\n const body = (\n <MenuProvider size={size}>\n <ContextMenuContentContext.Provider value={contextValue}>{children}</ContextMenuContentContext.Provider>\n </MenuProvider>\n );\n\n return (\n <ContextMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <ContextMenuPrimitive.Content\n data-accent-color={resolvedColor}\n alignOffset={getMenuAlignOffset(scalarSize)}\n collisionPadding={10}\n {...contentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-PopperContent',\n 'kui-BaseMenuContent',\n 'kui-variant-soft',\n 'kui-ContextMenuContent',\n className,\n )}\n >\n {virtualized ? (\n <div className={classNames('kui-BaseMenuViewport', 'kui-ContextMenuViewport', 'kui-virtualized')}>\n {body}\n </div>\n ) : (\n <ScrollArea type=\"auto\" scrollbars=\"vertical\">\n <div className={classNames('kui-BaseMenuViewport', 'kui-ContextMenuViewport')}>{body}</div>\n </ScrollArea>\n )}\n </ContextMenuPrimitive.Content>\n </Theme>\n </ContextMenuPrimitive.Portal>\n );\n },\n);\nContextMenuContent.displayName = 'ContextMenu.Content';\n\ntype ContextMenuLabelElement = React.ElementRef<typeof ContextMenuPrimitive.Label>;\ninterface ContextMenuLabelProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Label, RemovedProps> {}\nconst ContextMenuLabel = React.forwardRef<ContextMenuLabelElement, ContextMenuLabelProps>(\n ({ className, id: idProp, ...props }, forwardedRef) => {\n const id = useMenuGroupLabelId(idProp);\n return (\n <ContextMenuPrimitive.Label\n {...props}\n id={id}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuLabel', 'kui-ContextMenuLabel', className)}\n />\n );\n },\n);\nContextMenuLabel.displayName = 'ContextMenu.Label';\n\ntype ContextMenuItemElement = React.ElementRef<typeof ContextMenuPrimitive.Item>;\ntype ContextMenuItemOwnProps = GetPropDefTypes<typeof contextMenuItemPropDefs>;\ninterface ContextMenuItemProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Item, RemovedProps>,\n ContextMenuItemOwnProps {}\nconst ContextMenuItem = React.forwardRef<ContextMenuItemElement, ContextMenuItemProps>(\n (props, forwardedRef) => {\n const {\n className,\n children,\n color = contextMenuItemPropDefs.color.default,\n shortcut,\n ...itemProps\n } = props;\n return (\n <ContextMenuPrimitive.Item\n data-accent-color={color}\n aria-keyshortcuts={shortcut ? toAriaKeyShortcuts(shortcut) : undefined}\n {...itemProps}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-BaseMenuItem', 'kui-ContextMenuItem', className)}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n {shortcut && <MenuShortcut shortcut={shortcut} className=\"kui-ContextMenuShortcut\" />}\n </ContextMenuPrimitive.Item>\n );\n },\n);\nContextMenuItem.displayName = 'ContextMenu.Item';\n\ntype ContextMenuGroupElement = React.ElementRef<typeof ContextMenuPrimitive.Group>;\ninterface ContextMenuGroupProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Group, RemovedProps> {}\nconst ContextMenuGroup = React.forwardRef<ContextMenuGroupElement, ContextMenuGroupProps>(\n ({ className, 'aria-labelledby': ariaLabelledBy, ...props }, forwardedRef) => {\n const [labelledBy, setLabelId] = useMenuGroupLabelledBy(ariaLabelledBy);\n return (\n <MenuGroupLabelProvider value={setLabelId}>\n <ContextMenuPrimitive.Group\n aria-labelledby={labelledBy}\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuGroup', 'kui-ContextMenuGroup', className)}\n />\n </MenuGroupLabelProvider>\n );\n },\n);\nContextMenuGroup.displayName = 'ContextMenu.Group';\n\ntype ContextMenuRadioGroupElement = React.ElementRef<typeof ContextMenuPrimitive.RadioGroup>;\ninterface ContextMenuRadioGroupProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.RadioGroup, RemovedProps> {}\nconst ContextMenuRadioGroup = React.forwardRef<\n ContextMenuRadioGroupElement,\n ContextMenuRadioGroupProps\n>(({ className, 'aria-labelledby': ariaLabelledBy, ...props }, forwardedRef) => {\n const [labelledBy, setLabelId] = useMenuGroupLabelledBy(ariaLabelledBy);\n return (\n <MenuGroupLabelProvider value={setLabelId}>\n <ContextMenuPrimitive.RadioGroup\n aria-labelledby={labelledBy}\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuRadioGroup', 'kui-ContextMenuRadioGroup', className)}\n />\n </MenuGroupLabelProvider>\n );\n});\nContextMenuRadioGroup.displayName = 'ContextMenu.RadioGroup';\n\ntype ContextMenuRadioItemElement = React.ElementRef<typeof ContextMenuPrimitive.RadioItem>;\ntype ContextMenuRadioItemOwnProps = GetPropDefTypes<typeof contextMenuRadioItemPropDefs>;\ninterface ContextMenuRadioItemProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.RadioItem, RemovedProps>,\n ContextMenuRadioItemOwnProps {}\nconst ContextMenuRadioItem = React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n color = contextMenuRadioItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <ContextMenuPrimitive.RadioItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'kui-BaseMenuItem',\n 'kui-BaseMenuRadioItem',\n 'kui-ContextMenuItem',\n 'kui-ContextMenuRadioItem',\n className,\n )}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n <ContextMenuPrimitive.ItemIndicator className=\"kui-BaseMenuItemIndicator kui-ContextMenuItemIndicator\">\n <ThickDotIcon className=\"kui-BaseMenuItemIndicatorIcon kui-ContextMenuItemIndicatorIcon\" />\n </ContextMenuPrimitive.ItemIndicator>\n </ContextMenuPrimitive.RadioItem>\n );\n});\nContextMenuRadioItem.displayName = 'ContextMenu.RadioItem';\n\ntype ContextMenuCheckboxItemElement = React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>;\ntype ContextMenuCheckboxItemOwnProps = GetPropDefTypes<typeof contextMenuCheckboxItemPropDefs>;\ninterface ContextMenuCheckboxItemProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.CheckboxItem, RemovedProps>,\n ContextMenuCheckboxItemOwnProps {}\nconst ContextMenuCheckboxItem = React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n shortcut,\n color = contextMenuCheckboxItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <ContextMenuPrimitive.CheckboxItem\n aria-keyshortcuts={shortcut ? toAriaKeyShortcuts(shortcut) : undefined}\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'kui-BaseMenuItem',\n 'kui-BaseMenuCheckboxItem',\n 'kui-ContextMenuItem',\n 'kui-ContextMenuCheckboxItem',\n className,\n )}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n <ContextMenuPrimitive.ItemIndicator className=\"kui-BaseMenuItemIndicator kui-ContextMenuItemIndicator\">\n <ThickCheckIcon className=\"kui-BaseMenuItemIndicatorIcon kui-ContextMenuItemIndicatorIcon\" />\n </ContextMenuPrimitive.ItemIndicator>\n {shortcut && <MenuShortcut shortcut={shortcut} className=\"kui-ContextMenuShortcut\" />}\n </ContextMenuPrimitive.CheckboxItem>\n );\n});\nContextMenuCheckboxItem.displayName = 'ContextMenu.CheckboxItem';\n\ninterface ContextMenuSubProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Sub, RemovedProps> {}\nconst ContextMenuSub: React.FC<ContextMenuSubProps> = (props) => (\n <ContextMenuPrimitive.Sub {...props} />\n);\nContextMenuSub.displayName = 'ContextMenu.Sub';\n\ntype ContextMenuSubTriggerElement = React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>;\ninterface ContextMenuSubTriggerProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.SubTrigger, RemovedProps> {}\nconst ContextMenuSubTrigger = React.forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>((props, forwardedRef) => {\n const { className, children, ...subTriggerProps } = props;\n return (\n <ContextMenuPrimitive.SubTrigger\n {...subTriggerProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-BaseMenuItem',\n 'kui-BaseMenuSubTrigger',\n 'kui-ContextMenuItem',\n 'kui-ContextMenuSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"kui-BaseMenuShortcut kui-ContextMenuShortcut\">\n <ThickChevronRightIcon className=\"kui-BaseMenuSubTriggerIcon kui-ContextMenuSubTriggerIcon\" />\n </div>\n </ContextMenuPrimitive.SubTrigger>\n );\n});\nContextMenuSubTrigger.displayName = 'ContextMenu.SubTrigger';\n\ntype ContextMenuSubContentElement = React.ElementRef<typeof ContextMenuPrimitive.SubContent>;\ninterface ContextMenuSubContentProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.SubContent, RemovedProps>,\n ContextMenuSurfaceProps {\n container?: React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Portal>['container'];\n /**\n * When true, skips the ScrollArea wrapper to allow VirtualMenu to handle its own scrolling.\n */\n virtualized?: boolean;\n}\nconst ContextMenuSubContent = React.forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>((props, forwardedRef) => {\n const parent = React.useContext(ContextMenuContentContext);\n\n // A submenu inherits the parent surface, and its own props win.\n const size = props.size ?? parent.size;\n const color = props.color ?? parent.color;\n\n const {\n className,\n children,\n container,\n forceMount,\n color: _color,\n virtualized = false,\n ...subContentProps\n } = extractProps({ ...props, size }, contextMenuSubContentPropDefs);\n\n const scalarSize = useResolvedResponsiveValue(size, contextMenuSubContentPropDefs.size.default);\n\n const contextValue = React.useMemo(\n () => ({ size, color }),\n [size, color],\n );\n\n const body = (\n <MenuProvider size={size}>\n <ContextMenuContentContext.Provider value={contextValue}>{children}</ContextMenuContentContext.Provider>\n </MenuProvider>\n );\n\n return (\n <ContextMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <ContextMenuPrimitive.SubContent\n data-accent-color={color}\n alignOffset={getMenuAlignOffset(scalarSize)}\n // Side offset accounts for the outer solid box-shadow\n sideOffset={1}\n collisionPadding={10}\n {...subContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-PopperContent',\n 'kui-BaseMenuContent',\n 'kui-variant-soft',\n 'kui-BaseMenuSubContent',\n 'kui-ContextMenuContent',\n 'kui-ContextMenuSubContent',\n className,\n )}\n >\n {virtualized ? (\n <div className={classNames('kui-BaseMenuViewport', 'kui-ContextMenuViewport', 'kui-virtualized')}>\n {body}\n </div>\n ) : (\n <ScrollArea type=\"auto\" scrollbars=\"vertical\">\n <div className={classNames('kui-BaseMenuViewport', 'kui-ContextMenuViewport')}>{body}</div>\n </ScrollArea>\n )}\n </ContextMenuPrimitive.SubContent>\n </Theme>\n </ContextMenuPrimitive.Portal>\n );\n});\nContextMenuSubContent.displayName = 'ContextMenu.SubContent';\n\ntype ContextMenuSeparatorElement = React.ElementRef<typeof ContextMenuPrimitive.Separator>;\ninterface ContextMenuSeparatorProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Separator, RemovedProps> {}\nconst ContextMenuSeparator = React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>(({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuSeparator', 'kui-ContextMenuSeparator', className)}\n />\n));\nContextMenuSeparator.displayName = 'ContextMenu.Separator';\n\nexport {\n ContextMenuRoot as Root,\n ContextMenuTrigger as Trigger,\n ContextMenuContent as Content,\n ContextMenuLabel as Label,\n ContextMenuItem as Item,\n ContextMenuGroup as Group,\n ContextMenuRadioGroup as RadioGroup,\n ContextMenuRadioItem as RadioItem,\n ContextMenuCheckboxItem as CheckboxItem,\n ContextMenuSub as Sub,\n ContextMenuSubTrigger as SubTrigger,\n ContextMenuSubContent as SubContent,\n ContextMenuSeparator as Separator,\n};\n\nexport type {\n ContextMenuRootProps as RootProps,\n ContextMenuTriggerProps as TriggerProps,\n ContextMenuContentProps as ContentProps,\n ContextMenuLabelProps as LabelProps,\n ContextMenuItemProps as ItemProps,\n ContextMenuGroupProps as GroupProps,\n ContextMenuRadioGroupProps as RadioGroupProps,\n ContextMenuRadioItemProps as RadioItemProps,\n ContextMenuCheckboxItemProps as CheckboxItemProps,\n ContextMenuSubProps as SubProps,\n ContextMenuSubTriggerProps as SubTriggerProps,\n ContextMenuSubContentProps as SubContentProps,\n ContextMenuSeparatorProps as SeparatorProps,\n};\n"],
|
|
5
|
-
"mappings": ";4eAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,kBAAAE,EAAA,YAAAC,EAAA,UAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,eAAAC,EAAA,cAAAC,EAAA,SAAAC,EAAA,cAAAC,GAAA,QAAAC,EAAA,eAAAC,GAAA,eAAAC,EAAA,YAAAC,IAMA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,eAAeC,EAAsB,QAAAC,MAAY,WAC1D,OAAS,kBAAAC,OAAsB,oBAkC/B,IAAMC,EAAmDC,GAAU,CACjE,GAAM,CAAE,KAAMC,EAAU,aAAAC,CAAa,EAAIF,EACnC,CAACG,EAAkBC,CAAmB,EAAU,WAAS,EAAK,EAC9DC,EAAOJ,GAAYE,EAEnBG,EAAuBC,GAAeL,CAAY,EAClDM,EAAyB,cAC5BC,GAAkB,CACjBL,EAAoBK,CAAI,EACxBH,EAAqBG,CAAI,CAC3B,EACA,CAACH,CAAoB,CACvB,EACMI,EAAc,cAAY,IAAMF,EAAiB,EAAK,EAAG,CAACA,CAAgB,CAAC,EAEjF,OACE,gBAACG,EAAA,CAAkB,MAAOD,GACxB,gBAACE,EAAqB,KAArB,CAA2B,GAAGZ,EAAO,KAAMK,EAAM,aAAcG,EAAkB,CACpF,CAEJ,EACAT,EAAgB,YAAc,mB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ACrE,EAGF,OACE,gBAACF,EAAqB,OAArB,CAA4B,UAAWe,EAAW,WAAYC,GAC7D,gBAACW,EAAA,CAAM,QAAO,IACZ,gBAAC3B,EAAqB,WAArB,CACC,oBAAmBc,EACnB,YAAac,EAAmBN,CAAU,EAE1C,WAAY,EACZ,iBAAkB,GACjB,GAAGwC,EACJ,QAAS,GACT,IAAK3D,EACL,UAAW0B,EACT,oBACA,sBACF,mBACE,yBACA,yBACA,4BACAhB,CACF,GAECK,EACC,gBAAC,OAAI,UAAWW,EAAW,uBAAwB,0BAA2B,iBAAiB,GAC5FJ,CACH,EAEA,gBAACK,EAAA,CAAW,KAAK,OAAO,WAAW,YACjC,gBAAC,OAAI,UAAWD,EAAW,uBAAwB,yBAAyB,GAAIJ,CAAK,CACvF,CAEJ,CACF,CACF,CAEJ,CAAC,EACDkC,GAAsB,YAAc,yBAKpC,IAAMI,GAA6B,aAGjC,CAAC,CAAE,UAAAlD,EAAW,GAAGzB,CAAM,EAAGe,IAC1B,gBAACH,EAAqB,UAArB,CACE,GAAGZ,EACJ,QAAS,GACT,IAAKe,EACL,UAAW0B,EAAW,wBAAyB,2BAA4BhB,CAAS,EACtF,CACD,EACDkD,GAAqB,YAAc",
|
|
6
|
-
"names": ["context_menu_exports", "__export", "ContextMenuCheckboxItem", "ContextMenuContent", "ContextMenuGroup", "ContextMenuItem", "ContextMenuLabel", "ContextMenuRadioGroup", "ContextMenuRadioItem", "ContextMenuRoot", "ContextMenuSeparator", "ContextMenuSub", "ContextMenuSubContent", "ContextMenuSubTrigger", "ContextMenuTrigger", "React", "classNames", "ContextMenuPrimitive", "Slot", "useCallbackRef", "ContextMenuRoot", "props", "openProp", "onOpenChange", "uncontrolledOpen", "setUncontrolledOpen", "open", "handleOpenChangeProp", "useCallbackRef", "handleOpenChange", "next", "close", "MenuCloseProvider", "ContextMenuPrimitive", "ContextMenuTrigger", "children", "forwardedRef", "requireReactElement", "ContextMenuContentContext", "ContextMenuContent", "ownProps", "useThemeSizeProps", "baseMenuSubContentPropDefs", "themeContext", "useThemeContext", "size", "className", "color", "container", "forceMount", "_submenuBehavior", "virtualized", "contentProps", "extractProps", "resolvedColor", "scalarSize", "useResolvedResponsiveValue", "contextValue", "body", "MenuProvider", "Theme", "getMenuAlignOffset", "classNames", "ScrollArea", "ContextMenuLabel", "idProp", "id", "useMenuGroupLabelId", "ContextMenuItem", "baseMenuItemPropDefs", "shortcut", "itemProps", "toAriaKeyShortcuts", "Slot", "MenuShortcut", "ContextMenuGroup", "ariaLabelledBy", "labelledBy", "setLabelId", "useMenuGroupLabelledBy", "MenuGroupLabelProvider", "ContextMenuRadioGroup", "ContextMenuRadioItem", "baseMenuRadioItemPropDefs", "ThickDotIcon", "ContextMenuCheckboxItem", "baseMenuCheckboxItemPropDefs", "ThickCheckIcon", "ContextMenuSub", "ContextMenuSubTrigger", "subTriggerProps", "ThickChevronRightIcon", "ContextMenuSubContent", "parent", "_color", "subContentProps", "ContextMenuSeparator"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as e}from"./chunk-647DRBXQ.js";import{c as p}from"./chunk-5ON3XLRD.js";import{c as o}from"./chunk-OKQAVYW4.js";import*as r from"react";import n from"classnames";import{Slot as c}from"radix-ui";var P=r.forwardRef((t,s)=>{let a=p(t,e.size),{asChild:m,className:d,...i}=o(a,e),f=m?c.Root:"div";return r.createElement(f,{ref:s,...i,className:n("kui-reset","kui-BaseCard","kui-Card","kui-SurfaceNest",d)})});P.displayName="Card";export{P as a};
|
|
3
|
-
//# sourceMappingURL=chunk-63MUJFVF.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/card.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { cardPropDefs } from './card.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype CardElement = React.ElementRef<'div'>;\ntype CardOwnProps = GetPropDefTypes<typeof cardPropDefs>;\ninterface CardProps extends ComponentPropsWithout<'div', RemovedProps>, CardOwnProps {}\nconst Card = React.forwardRef<CardElement, CardProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, cardPropDefs.size);\n const { asChild, className, ...cardProps } = extractProps(props, cardPropDefs);\n const Comp = asChild ? Slot.Root : 'div';\n return (\n <Comp\n ref={forwardedRef}\n {...cardProps}\n className={classNames('kui-reset', 'kui-BaseCard', 'kui-Card', 'kui-SurfaceNest', className)}\n />\n );\n});\nCard.displayName = 'Card';\n\nexport { Card };\nexport type { CardProps };\n"],
|
|
5
|
-
"mappings": ";wHAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WAYrB,IAAMC,EAAa,aAAmC,CAACC,EAAUC,IAAiB,CAChF,IAAMC,EAAQC,EAAkBH,EAAUI,EAAa,IAAI,EACrD,CAAE,QAAAC,EAAS,UAAAC,EAAW,GAAGC,CAAU,EAAIC,EAAaN,EAAOE,CAAY,EACvEK,EAAOJ,EAAUK,EAAK,KAAO,MACnC,OACE,gBAACD,EAAA,CACC,IAAKR,EACJ,GAAGM,EACJ,UAAWI,EAAW,YAAa,eAAgB,WAAY,kBAAmBL,CAAS,EAC7F,CAEJ,CAAC,EACDP,EAAK,YAAc",
|
|
6
|
-
"names": ["React", "classNames", "Slot", "Card", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "cardPropDefs", "asChild", "className", "cardProps", "extractProps", "Comp", "Slot", "classNames"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as p}from"./chunk-EY6TCYGG.js";import{c as e}from"./chunk-OKQAVYW4.js";import*as o from"react";import n from"classnames";import{Slot as a}from"radix-ui";var b=o.forwardRef((r,t)=>{let{asChild:s,className:m,...d}=e(r,p),f=s?a.Root:"kbd";return o.createElement(f,{...d,ref:t,className:n("kui-reset","kui-Kbd",m)})});b.displayName="Kbd";export{b as a};
|
|
3
|
-
//# sourceMappingURL=chunk-6AMWYEM7.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/kbd.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { kbdPropDefs } from './kbd.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype KbdElement = React.ElementRef<'kbd'>;\ntype KbdOwnProps = GetPropDefTypes<typeof kbdPropDefs>;\ninterface KbdProps extends ComponentPropsWithout<'kbd', RemovedProps>, KbdOwnProps {}\nconst Kbd = React.forwardRef<KbdElement, KbdProps>((props, forwardedRef) => {\n const { asChild, className, ...kbdProps } = extractProps(props, kbdPropDefs);\n const Comp = asChild ? Slot.Root : 'kbd';\n return (\n <Comp\n {...kbdProps}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-Kbd', className)}\n />\n );\n});\nKbd.displayName = 'Kbd';\n\nexport { Kbd };\nexport type { KbdProps };\n"],
|
|
5
|
-
"mappings": ";gFAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WAWrB,IAAMC,EAAY,aAAiC,CAACC,EAAOC,IAAiB,CAC1E,GAAM,CAAE,QAAAC,EAAS,UAAAC,EAAW,GAAGC,CAAS,EAAIC,EAAaL,EAAOM,CAAW,EACrEC,EAAOL,EAAUM,EAAK,KAAO,MACnC,OACE,gBAACD,EAAA,CACE,GAAGH,EACJ,IAAKH,EACL,UAAWQ,EAAW,YAAa,UAAWN,CAAS,EACzD,CAEJ,CAAC,EACDJ,EAAI,YAAc",
|
|
6
|
-
"names": ["React", "classNames", "Slot", "Kbd", "props", "forwardedRef", "asChild", "className", "kbdProps", "extractProps", "kbdPropDefs", "Comp", "Slot", "classNames"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as n}from"./chunk-PHWT772P.js";import{c as m}from"./chunk-OKQAVYW4.js";import*as e from"react";import{Slot as i}from"radix-ui";var c=e.memo(e.forwardRef((P,t)=>{let{children:o,className:p,asChild:x,as:T="span",color:s,...r}=m(P,n),a=p?`kui-Text ${p}`:"kui-Text";return x?e.createElement(i.Root,{"data-accent-color":s,...r,ref:t,className:a},o):e.createElement(T,{"data-accent-color":s,...r,ref:t,className:a},o)}));c.displayName="Text";export{c as a};
|
|
3
|
-
//# sourceMappingURL=chunk-6UZT3ZLO.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/text.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, textPropDefs);\n\n const combinedClassName = className ? `kui-Text ${className}` : 'kui-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n"],
|
|
5
|
-
"mappings": ";gFAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,WAmBrB,IAAMC,EAAa,OACX,aAAmC,CAACC,EAAOC,IAAiB,CAChE,GAAM,CACJ,SAAAC,EACA,UAAAC,EACA,QAAAC,EACA,GAAIC,EAAM,OACV,MAAAC,EACA,GAAGC,CACL,EAAIC,EAAaR,EAAOS,CAAY,EAE9BC,EAAoBP,EAAY,YAAYA,CAAS,GAAK,WAEhE,OAAIC,EAEA,gBAACO,EAAK,KAAL,CACC,oBAAmBL,EAClB,GAAGC,EACJ,IAAKN,EACL,UAAWS,GAEVR,CACH,EAKF,gBAACG,EAAA,CACC,oBAAmBC,EAClB,GAAIC,EACL,IAAKN,EACL,UAAWS,GAEVR,CACH,CAEJ,CAAC,CACH,EACAH,EAAK,YAAc",
|
|
6
|
-
"names": ["React", "Slot", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "textPropDefs", "combinedClassName", "Slot"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as t}from"./chunk-LPLW7OWA.js";import{a as e}from"./chunk-L54FWKJE.js";import{b as r}from"./chunk-XU74PNM2.js";import{c as o}from"./chunk-HBWBPBSA.js";var s=["1","2","3","4"],l={size:{type:"enum",className:"kui-r-size",values:s,default:"2",responsive:!0}},i=["raised","surface","soft","outline","ghost"],m={variant:{type:"enum",className:"kui-variant",values:i,default:"raised"},error:{type:"boolean"},loading:{type:"boolean"},disabled:{type:"boolean"},readOnly:{type:"boolean"},...o,...r,width:e.width,placeholder:{type:"string"}},a=["1","2","3","4"],c={size:{type:"enum",className:"kui-r-size",values:a,default:"2",responsive:!0},...o,width:e.width,minWidth:e.minWidth,maxWidth:{...e.maxWidth,default:"480px"},...t};export{l as a,m as b,c};
|
|
3
|
-
//# sourceMappingURL=chunk-7ROKZHH2.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/combobox.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Shared responsive sizing inherited by Combobox.Root.\n */\nconst comboboxRootPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nconst triggerVariants = ['raised', 'surface', 'soft', 'outline', 'ghost'] as const;\n\n/**\n * Token-aware props specific to Combobox.Trigger.\n */\nconst comboboxTriggerPropDefs = {\n variant: { type: 'enum', className: 'kui-variant', values: triggerVariants, default: 'raised' },\n error: { type: 'boolean' },\n loading: { type: 'boolean' },\n disabled: { type: 'boolean' },\n readOnly: { type: 'boolean' },\n ...colorPropDef,\n ...radiusPropDef,\n width: widthPropDefs.width,\n placeholder: { type: 'string' },\n} satisfies {\n variant: PropDef<(typeof triggerVariants)[number]>;\n error: PropDef<boolean>;\n loading: PropDef<boolean>;\n disabled: PropDef<boolean>;\n readOnly: PropDef<boolean>;\n width: PropDef<string>;\n placeholder: PropDef<string>;\n};\n\n// The list takes sizes 1 to 4, like every menu.\nconst contentSizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Styling props for the dropdown surface rendered by Combobox.Content.\n */\nconst comboboxContentPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: contentSizes, default: '2', responsive: true },\n ...colorPropDef,\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\nexport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs };\n"],
|
|
5
|
-
"mappings": ";gKAOA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAK3BC,EAAuB,CAC3B,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQD,EAAO,QAAS,IAAK,WAAY,EAAK,CAC/F,EAIME,EAAkB,CAAC,SAAU,UAAW,OAAQ,UAAW,OAAO,EAKlEC,EAA0B,CAC9B,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQD,EAAiB,QAAS,QAAS,EAC9F,MAAO,CAAE,KAAM,SAAU,EACzB,QAAS,CAAE,KAAM,SAAU,EAC3B,SAAU,CAAE,KAAM,SAAU,EAC5B,SAAU,CAAE,KAAM,SAAU,EAC5B,GAAGE,EACH,GAAGC,EACH,MAAOC,EAAc,MACrB,YAAa,CAAE,KAAM,QAAS,CAChC,EAWMC,EAAe,CAAC,IAAK,IAAK,IAAK,GAAG,EAKlCC,EAA0B,CAC9B,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQD,EAAc,QAAS,IAAK,WAAY,EAAK,EACpG,GAAGH,EACH,MAAOE,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,EAAc,SAAU,QAAS,OAAQ,EACxD,GAAGG,CACL",
|
|
6
|
-
"names": ["sizes", "comboboxRootPropDefs", "triggerVariants", "comboboxTriggerPropDefs", "colorPropDef", "radiusPropDef", "widthPropDefs", "contentSizes", "comboboxContentPropDefs", "heightPropDefs"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as p}from"./chunk-QQY4WFJL.js";import{c}from"./chunk-5ON3XLRD.js";import{c as l}from"./chunk-OKQAVYW4.js";import*as e from"react";import R from"classnames";var g=e.forwardRef((m,u)=>{let f=c(m,p.size),{className:x,color:y,radius:b,style:P,...r}=l(f,p),s=e.useId(),{"aria-describedby":o,"aria-labelledby":d,"aria-invalid":a}=r,i=!!r.error||a===!0||a==="true",n=e.useMemo(()=>{let t=[];return r.errorMessage&&t.push(s),o&&t.push(o),t.length>0?t.join(" "):void 0},[r.errorMessage,o,s]),A=e.useMemo(()=>({"aria-invalid":i?!0:a,"aria-describedby":n,"aria-labelledby":d}),[i,a,n,d]),{error:M,errorMessage:h,required:T,"aria-describedby":D,"aria-labelledby":N,...v}=r;return e.createElement(e.Fragment,null,e.createElement("div",{"data-accent-color":y,"data-radius":b,className:R("kui-TextAreaRoot",x,{"kui-error":i}),style:P},e.createElement("textarea",{className:"kui-reset kui-TextAreaInput",ref:u,...v,required:T||void 0,...A})),r.errorMessage&&e.createElement("div",{id:s,className:"kui-TextAreaErrorMessage",role:"alert"},r.errorMessage))});g.displayName="TextArea";export{g as a};
|
|
3
|
-
//# sourceMappingURL=chunk-7X7VWR3F.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/text-area.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { textAreaPropDefs } from './text-area.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TextAreaElement = React.ElementRef<'textarea'>;\ntype TextAreaOwnProps = GetPropDefTypes<typeof textAreaPropDefs> & {\n defaultValue?: string;\n value?: string;\n};\ninterface TextAreaProps\n extends ComponentPropsWithout<'textarea', RemovedProps | 'size' | 'value'>,\n TextAreaOwnProps {}\n\nconst TextArea = React.forwardRef<TextAreaElement, TextAreaProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, textAreaPropDefs.size);\n const { className, color, radius, style, ...textAreaProps } =\n extractProps(props, textAreaPropDefs);\n\n // Generate unique IDs for accessibility\n const errorId = React.useId();\n\n const { 'aria-describedby': ariaDescribedby, 'aria-labelledby': ariaLabelledby, 'aria-invalid': ariaInvalid } = textAreaProps;\n\n // Invalid when `error` is set or the caller passes aria-invalid; the CSS keys on aria-invalid only.\n const isInvalid = Boolean(textAreaProps.error) || ariaInvalid === true || ariaInvalid === 'true';\n\n // Build aria-describedby string\n const describedBy = React.useMemo(() => {\n const parts = [];\n if (textAreaProps.errorMessage) parts.push(errorId);\n if (ariaDescribedby) parts.push(ariaDescribedby);\n return parts.length > 0 ? parts.join(' ') : undefined;\n }, [textAreaProps.errorMessage, ariaDescribedby, errorId]);\n\n // Build aria attributes\n const ariaProps = React.useMemo(\n () => ({\n 'aria-invalid': isInvalid ? true : ariaInvalid,\n 'aria-describedby': describedBy,\n 'aria-labelledby': ariaLabelledby,\n }),\n [isInvalid, ariaInvalid, describedBy, ariaLabelledby],\n );\n\n // Filter out our custom props to avoid DOM warnings\n const {\n error,\n errorMessage,\n required,\n 'aria-describedby': _ariaDescribedby,\n 'aria-labelledby': _ariaLabelledby,\n ...nativeTextAreaProps\n } = textAreaProps;\n\n // The message is a sibling of the painted root, so it sits below the box rather than inside it.\n return (\n <>\n <div\n data-accent-color={color}\n data-radius={radius}\n className={classNames('kui-TextAreaRoot', className, {\n // Not used by the library's CSS (invalid styling keys on aria-invalid); kept as a hook for app styles.\n 'kui-error': isInvalid,\n })}\n style={style}\n >\n <textarea\n className=\"kui-reset kui-TextAreaInput\"\n ref={forwardedRef}\n {...nativeTextAreaProps}\n required={required || undefined}\n {...ariaProps}\n />\n </div>\n {textAreaProps.errorMessage && (\n <div id={errorId} className=\"kui-TextAreaErrorMessage\" role=\"alert\">\n {textAreaProps.errorMessage}\n </div>\n )}\n </>\n );\n});\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n"],
|
|
5
|
-
"mappings": ";mHAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAkBvB,IAAMC,EAAiB,aAA2C,CAACC,EAAUC,IAAiB,CAC5F,IAAMC,EAAQC,EAAkBH,EAAUI,EAAiB,IAAI,EACzD,CAAE,UAAAC,EAAW,MAAAC,EAAO,OAAAC,EAAQ,MAAAC,EAAO,GAAGC,CAAc,EACxDC,EAAaR,EAAOE,CAAgB,EAGhCO,EAAgB,QAAM,EAEtB,CAAE,mBAAoBC,EAAiB,kBAAmBC,EAAgB,eAAgBC,CAAY,EAAIL,EAG1GM,EAAY,EAAQN,EAAc,OAAUK,IAAgB,IAAQA,IAAgB,OAGpFE,EAAoB,UAAQ,IAAM,CACtC,IAAMC,EAAQ,CAAC,EACf,OAAIR,EAAc,cAAcQ,EAAM,KAAKN,CAAO,EAC9CC,GAAiBK,EAAM,KAAKL,CAAe,EACxCK,EAAM,OAAS,EAAIA,EAAM,KAAK,GAAG,EAAI,MAC9C,EAAG,CAACR,EAAc,aAAcG,EAAiBD,CAAO,CAAC,EAGnDO,EAAkB,UACtB,KAAO,CACL,eAAgBH,EAAY,GAAOD,EACnC,mBAAoBE,EACpB,kBAAmBH,CACrB,GACA,CAACE,EAAWD,EAAaE,EAAaH,CAAc,CACtD,EAGM,CACJ,MAAAM,EACA,aAAAC,EACA,SAAAC,EACA,mBAAoBC,EACpB,kBAAmBC,EACnB,GAAGC,CACL,EAAIf,EAGJ,OACE,gCACE,gBAAC,OACC,oBAAmBH,EACnB,cAAaC,EACb,UAAWkB,EAAW,mBAAoBpB,EAAW,CAEnD,YAAaU,CACf,CAAC,EACD,MAAOP,GAEP,gBAAC,YACC,UAAU,8BACV,IAAKP,EACJ,GAAGuB,EACJ,SAAUH,GAAY,OACrB,GAAGH,EACN,CACF,EACCT,EAAc,cACb,gBAAC,OAAI,GAAIE,EAAS,UAAU,2BAA2B,KAAK,SACzDF,EAAc,YACjB,CAEJ,CAEJ,CAAC,EAEDV,EAAS,YAAc",
|
|
6
|
-
"names": ["React", "classNames", "TextArea", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "textAreaPropDefs", "className", "color", "radius", "style", "textAreaProps", "extractProps", "errorId", "ariaDescribedby", "ariaLabelledby", "ariaInvalid", "isInvalid", "describedBy", "parts", "ariaProps", "error", "errorMessage", "required", "_ariaDescribedby", "_ariaLabelledby", "nativeTextAreaProps", "classNames"]
|
|
7
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as te,b as se}from"./chunk-NBVCQQSY.js";import{c as ne}from"./chunk-5ON3XLRD.js";import{c as ee}from"./chunk-OKQAVYW4.js";import{a as ye}from"./chunk-VQPANPMI.js";var Se={};ye(Se,{Root:()=>de,Slot:()=>pe});import*as e from"react";import*as ie from"react-dom";import ce from"classnames";import{composeEventHandlers as W,composeRefs as ae}from"radix-ui/internal";var le=e.createContext(null),ue="button, a, input, select, textarea, label, [tabindex], [contenteditable]",de=e.forwardRef((h,T)=>{let o=ne(h,te.size),m=e.useRef(null),{children:C,className:E,color:w,radius:L,style:k,...c}=ee(o,te),P=e.useId(),[I,D]=e.useState([]),N=e.useCallback(r=>(D(s=>s.includes(r)?s:[...s,r]),()=>D(s=>s.filter(a=>a!==r))),[]),j=e.useMemo(()=>({registerSlot:N}),[N]),{"aria-describedby":y,"aria-labelledby":M,"aria-invalid":b}=c,S=!!c.error||b===!0||b==="true",g=e.useMemo(()=>{let r=[];return c.errorMessage&&r.push(P),y&&r.push(y),r.push(...I),r.length>0?r.join(" "):void 0},[c.errorMessage,y,P,I]),z=e.useMemo(()=>({"aria-invalid":S?!0:b,"aria-describedby":g,"aria-labelledby":M}),[S,b,g,M]),{error:V,errorMessage:K,required:v,"aria-describedby":i,"aria-labelledby":H,...O}=c,_=e.useCallback(r=>{let s=r.target;if(s.closest(ue))return;let a=m.current;if(!a)return;let l=s.closest(`
|
|
3
|
-
.kui-TextFieldSlot[data-side='right'],
|
|
4
|
-
.kui-TextFieldSlot:not([data-side='right']) ~ .kui-TextFieldSlot:not([data-side='left'])
|
|
5
|
-
`)?a.value.length:0;r.preventDefault(),a.focus();try{a.setSelectionRange(l,l)}catch{}},[]);return e.createElement(e.Fragment,null,e.createElement("div",{"data-accent-color":w,"data-radius":L,style:k,className:ce("kui-TextFieldRoot",E,{"kui-error":S}),onMouseDown:_},e.createElement("input",{...O,required:v||void 0,...z,ref:ae(m,T),className:"kui-reset kui-TextFieldInput"}),e.createElement(le.Provider,{value:j},C)),c.errorMessage&&e.createElement("div",{id:P,className:"kui-TextFieldErrorMessage",role:"alert"},c.errorMessage))});de.displayName="TextField.Root";var x=(()=>{if(typeof navigator>"u")return!1;let h=navigator.userAgent,T=/^((?!chrome|android).)*safari/i.test(h),o=/firefox/i.test(h);return T||o})(),pe=e.forwardRef((h,T)=>{let{scrub:o,scrubValue:m,scrubStep:C=1,scrubSensitivity:E=1,scrubMin:w,scrubMax:L,scrubShiftMultiplier:k=10,scrubAltMultiplier:c=.1,onScrub:P,...I}=h,{className:D,color:N,side:j,onPointerDown:y,onPointerMove:M,onPointerUp:b,onLostPointerCapture:S,...g}=ee(I,se),z=e.useId(),V=g.id??z,K=e.useContext(le)?.registerSlot;e.useEffect(()=>K?.(V),[K,V]);let v=e.useRef(null),[i,H]=e.useState(!1),[O,_]=e.useState({x:0,y:0}),r=e.useRef(null),s=e.useRef(0),a=e.useRef(!1),R=e.useRef(0),l=e.useRef(0),p=e.useRef(0),F=e.useRef(null),q=e.useRef(0),X=e.useRef({scrubValue:m,scrubStep:C,scrubSensitivity:E,scrubMin:w,scrubMax:L,scrubShiftMultiplier:k,scrubAltMultiplier:c,onScrub:P});X.current={scrubValue:m,scrubStep:C,scrubSensitivity:E,scrubMin:w,scrubMax:L,scrubShiftMultiplier:k,scrubAltMultiplier:c,onScrub:P};let fe=e.useCallback(t=>{if(!o||t.target.closest(ue))return;t.preventDefault(),R.current=0,l.current=m??0,p.current=t.clientX,s.current=t.clientY,_({x:t.clientX,y:t.clientY});let u=v.current;u&&(x?(F.current=t.pointerId,q.current=t.clientX,u.setPointerCapture(t.pointerId),H(!0)):(a.current=!0,u.requestPointerLock()))},[o,m]);e.useEffect(()=>{if(x||!o)return;let t=()=>{if(!a.current)return;let n=document.pointerLockElement===v.current;H(n),n||(a.current=!1,X.current.onScrub?.(0,!1),R.current=0,l.current=0)};return document.addEventListener("pointerlockchange",t),()=>{document.removeEventListener("pointerlockchange",t)}},[o]);let A=e.useCallback((t,n,u,he)=>{let d=X.current,B=window.innerWidth,U=window.innerHeight;p.current+=t,p.current>B?p.current=p.current%B:p.current<0&&(p.current=B+p.current%B);let f=s.current+n;f>U?f=f%U:f<0&&(f=U+f%U),s.current=f;let G=r.current;G&&(G.style.left=`${p.current}px`,G.style.top=`${f}px`),R.current+=t;let $=R.current/d.scrubSensitivity;if(Math.abs($)>=1){let Z=1;u?Z=d.scrubShiftMultiplier:he&&(Z=d.scrubAltMultiplier);let re=Math.trunc($),J=re*d.scrubStep*Z,Q=J;if(d.scrubMin!==void 0||d.scrubMax!==void 0){let Pe=l.current+J,oe=Math.max(d.scrubMin??-1/0,Math.min(d.scrubMax??1/0,Pe));Q=oe-l.current,l.current=oe}else l.current+=J;Q!==0&&d.onScrub?.(Q,!0),R.current=($-re)*d.scrubSensitivity}},[]),Y=e.useCallback(()=>{X.current.onScrub?.(0,!1),R.current=0,l.current=0,F.current=null,H(!1)},[]),me=e.useCallback(t=>{if(!i||!x)return;let n=t.clientX-q.current;q.current=t.clientX,A(n,t.movementY,t.shiftKey,t.altKey)},[i,A]),be=e.useCallback(t=>{if(!x||F.current!==t.pointerId)return;let n=v.current;n&&F.current!==null&&n.releasePointerCapture(F.current),Y()},[Y]),Re=e.useCallback(()=>{x&&i&&Y()},[i,Y]);e.useEffect(()=>{if(!i||x)return;let t=u=>{A(u.movementX,u.movementY,u.shiftKey,u.altKey)},n=()=>{document.exitPointerLock()};return document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n),document.body.style.userSelect=""}},[i,A]),e.useEffect(()=>{if(!i||!x)return;let t=document.createElement("style");return t.textContent="* { cursor: none !important; user-select: none !important; }",document.head.appendChild(t),()=>{document.head.removeChild(t)}},[i]);let xe=i?ie.createPortal(e.createElement("img",{ref:r,className:"kui-TextFieldSlotScrubCursor",src:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='black' stroke='white' stroke-width='1' d='M0 12 L5 7 L5 10 L19 10 L19 7 L24 12 L19 17 L19 14 L5 14 L5 17 Z'/%3E%3C/svg%3E",alt:"",style:{position:"fixed",left:O.x,top:O.y,transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:99999,width:24,height:24},"aria-hidden":"true"}),document.body):null;return e.createElement("div",{"data-accent-color":N,"data-side":j,"data-scrub":o||void 0,"data-scrubbing":i||void 0,...g,id:V,ref:ae(v,T),className:ce("kui-TextFieldSlot",D),onPointerDown:o?W(y,fe):y,onPointerMove:o?W(M,me):M,onPointerUp:o?W(b,be):b,onLostPointerCapture:o?W(S,Re):S},g.children,xe)});pe.displayName="TextField.Slot";export{de as a,pe as b,Se as c};
|
|
6
|
-
//# sourceMappingURL=chunk-7XHE6TOA.js.map
|