@womp/kookie-ui 0.26.1 → 0.26.2
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 +26 -1
- 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 +14 -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/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.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.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.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.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.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.d.ts.map +1 -1
- package/dist/cjs/components/theme.js +1 -1
- package/dist/cjs/components/theme.js.map +4 -4
- 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-2ACVWLFA.js +3 -0
- package/dist/esm/{chunk-6RJQ5LLP.js → chunk-2TWPPDII.js} +2 -2
- 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-3C4Q6PMS.js +3 -0
- package/dist/esm/{chunk-5XR5PTDR.js.map → chunk-3C4Q6PMS.js.map} +1 -1
- package/dist/esm/chunk-3QN4C5LW.js +3 -0
- package/dist/esm/{chunk-5EBJOOXE.js.map → chunk-3QN4C5LW.js.map} +4 -4
- 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-3ZWHKNHI.js +3 -0
- package/dist/esm/chunk-3ZWHKNHI.js.map +7 -0
- package/dist/esm/chunk-457Z4R5W.js +3 -0
- package/dist/esm/{chunk-5L4DZ2D3.js.map → chunk-457Z4R5W.js.map} +1 -1
- 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-W4MQ6TEK.js → chunk-5FWEGTP6.js} +2 -2
- package/dist/esm/chunk-5KJIPH2N.js +3 -0
- package/dist/esm/chunk-5KJIPH2N.js.map +7 -0
- package/dist/esm/chunk-5MEWNLNH.js +3 -0
- package/dist/esm/{chunk-3L2MDOYC.js.map → chunk-5MEWNLNH.js.map} +4 -4
- package/dist/esm/chunk-5PQCTVZB.js +3 -0
- package/dist/esm/{chunk-YD2D73LF.js.map → chunk-5PQCTVZB.js.map} +4 -4
- 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-6DWDNKLS.js +1 -0
- package/dist/esm/chunk-6M6HGIGN.js +3 -0
- package/dist/esm/{chunk-PCLO3ZZY.js.map → chunk-6M6HGIGN.js.map} +4 -4
- package/dist/esm/chunk-7QP6JFPO.js +3 -0
- package/dist/esm/chunk-7QP6JFPO.js.map +7 -0
- package/dist/esm/chunk-ADL3LEOQ.js +3 -0
- package/dist/esm/chunk-ADL3LEOQ.js.map +7 -0
- package/dist/esm/chunk-AJANJ22M.js +3 -0
- package/dist/esm/{chunk-CBWERXF4.js.map → chunk-AJANJ22M.js.map} +4 -4
- 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-BEHAT3GI.js +3 -0
- package/dist/esm/{chunk-5CFSNNYS.js.map → chunk-BEHAT3GI.js.map} +4 -4
- 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-XL5OHW6Z.js → chunk-BVQDDN5Q.js} +2 -2
- package/dist/esm/{chunk-YOSCUA6Z.js → chunk-C2WKAIZM.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-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-DG2KIH54.js +6 -0
- package/dist/esm/chunk-DG2KIH54.js.map +7 -0
- package/dist/esm/chunk-DIY2XQKR.js +3 -0
- package/dist/esm/{chunk-OQWD63AI.js.map → chunk-DIY2XQKR.js.map} +4 -4
- package/dist/esm/chunk-DQCE7DHY.js +3 -0
- package/dist/esm/{chunk-ILWS2JUE.js.map → chunk-DQCE7DHY.js.map} +4 -4
- package/dist/esm/{chunk-7B3XDZXZ.js → chunk-E6BDD3PN.js} +2 -2
- package/dist/esm/chunk-EERKYRYI.js +3 -0
- package/dist/esm/{chunk-BXZSJKWA.js.map → chunk-EERKYRYI.js.map} +4 -4
- 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-WT2SYGTU.js → chunk-ETQNRMHU.js} +2 -3
- package/dist/esm/{chunk-WT2SYGTU.js.map → chunk-ETQNRMHU.js.map} +1 -1
- package/dist/esm/chunk-F2722F7B.js +3 -0
- package/dist/esm/{chunk-VPRAXHLL.js.map → chunk-F2722F7B.js.map} +4 -4
- package/dist/esm/chunk-F364PDDM.js +3 -0
- package/dist/esm/chunk-F364PDDM.js.map +7 -0
- 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-FNAE6HUI.js +2 -0
- package/dist/esm/chunk-FNAE6HUI.js.map +7 -0
- package/dist/esm/chunk-GE7FRBZ4.js +3 -0
- package/dist/esm/chunk-GE7FRBZ4.js.map +7 -0
- package/dist/esm/chunk-GOXGRJO6.js +3 -0
- package/dist/esm/chunk-GOXGRJO6.js.map +7 -0
- package/dist/esm/chunk-H2TSRYQ5.js +3 -0
- package/dist/esm/chunk-H2TSRYQ5.js.map +7 -0
- package/dist/esm/chunk-H33NTGVF.js +3 -0
- package/dist/esm/chunk-H33NTGVF.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-HSWMHW37.js +2 -0
- package/dist/esm/{chunk-SV3CYQY5.js.map → chunk-HSWMHW37.js.map} +1 -1
- package/dist/esm/{chunk-NZCAGHCL.js → chunk-HVMRB3AH.js} +2 -2
- package/dist/esm/{chunk-IZXML75Y.js → chunk-JQVW4WNN.js} +2 -2
- package/dist/esm/chunk-K55IQP5H.js +3 -0
- package/dist/esm/{chunk-Y2BTPKK6.js.map → chunk-K55IQP5H.js.map} +4 -4
- package/dist/esm/chunk-KQIZMPSW.js +3 -0
- package/dist/esm/chunk-KQIZMPSW.js.map +7 -0
- 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-LFAUMDU5.js +3 -0
- package/dist/esm/{chunk-ZPWKWESI.js.map → chunk-LFAUMDU5.js.map} +4 -4
- package/dist/esm/chunk-LGZCNQBS.js +3 -0
- package/dist/esm/chunk-LGZCNQBS.js.map +7 -0
- 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-M7IQIKB4.js +3 -0
- package/dist/esm/chunk-M7IQIKB4.js.map +7 -0
- package/dist/esm/chunk-MS2ONKJJ.js +3 -0
- package/dist/esm/{chunk-FCKJD2PW.js.map → chunk-MS2ONKJJ.js.map} +4 -4
- package/dist/esm/{chunk-Z563IAE3.js → chunk-N3B6EGXL.js} +2 -2
- 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-NS573D6O.js +3 -0
- package/dist/esm/chunk-NS573D6O.js.map +7 -0
- package/dist/esm/{chunk-CYTPMHSJ.js → chunk-NYBE3U3V.js} +2 -2
- 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-ONJYRJ66.js +3 -0
- package/dist/esm/chunk-ONJYRJ66.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-OTCVSJT7.js +3 -0
- package/dist/esm/chunk-OTCVSJT7.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-POP5NB33.js +3 -0
- package/dist/esm/chunk-POP5NB33.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-RD4T2MCC.js +3 -0
- package/dist/esm/chunk-RD4T2MCC.js.map +7 -0
- 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-TF6WAIUQ.js +3 -0
- package/dist/esm/{chunk-MQEWEAH5.js.map → chunk-TF6WAIUQ.js.map} +4 -4
- package/dist/esm/chunk-TFFMELAL.js +3 -0
- package/dist/esm/{chunk-37GC4A2O.js.map → chunk-TFFMELAL.js.map} +4 -4
- package/dist/esm/{chunk-HHSFAOIO.js → chunk-TFFU435D.js} +2 -2
- package/dist/esm/chunk-TFGUTYZK.js +3 -0
- package/dist/esm/chunk-TFGUTYZK.js.map +7 -0
- package/dist/esm/chunk-TTW3EAQT.js +3 -0
- package/dist/esm/chunk-TTW3EAQT.js.map +7 -0
- package/dist/esm/{chunk-R4PGFURL.js → chunk-TXVZOS3E.js} +2 -2
- 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-UBUGG2OB.js +3 -0
- package/dist/esm/{chunk-BVFHJP5E.js.map → chunk-UBUGG2OB.js.map} +4 -4
- package/dist/esm/chunk-UG73IGRF.js +3 -0
- package/dist/esm/chunk-UG73IGRF.js.map +7 -0
- 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-5TJH35TF.js → chunk-ULCHGKI3.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-3B25RLWX.js → chunk-UR5BUNNT.js} +2 -2
- 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-VCZ2GYOF.js +3 -0
- package/dist/esm/chunk-VCZ2GYOF.js.map +7 -0
- package/dist/esm/chunk-VIVM525H.js +3 -0
- package/dist/esm/chunk-VIVM525H.js.map +7 -0
- package/dist/esm/{chunk-AQ7VUGQQ.js → chunk-VPUFKJQA.js} +2 -2
- package/dist/esm/chunk-VVLUY4WR.js +3 -0
- package/dist/esm/chunk-VVLUY4WR.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-W4CPV4PO.js +3 -0
- package/dist/esm/{chunk-JS23YQ4M.js.map → chunk-W4CPV4PO.js.map} +4 -4
- package/dist/esm/chunk-WOR3JCLX.js +1 -0
- package/dist/esm/chunk-WOR3JCLX.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-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-ZG2XQUOH.js +3 -0
- package/dist/esm/{chunk-CV7QQTI3.js → chunk-ZKQCSGL3.js} +2 -2
- 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 +14 -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/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.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.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.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.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.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.d.ts.map +1 -1
- 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 +16 -0
- package/src/components/_internal/pane-chrome.tsx +1 -8
- package/src/components/_internal/shell-bottom.tsx +4 -1
- package/src/components/popover.tsx +7 -61
- package/src/components/scroll-area.tsx +3 -2
- package/src/components/select.css +1 -1
- package/src/components/shell.css +11 -3
- package/src/components/shell.tsx +8 -1
- package/src/components/slider.tsx +19 -1
- package/src/components/text-area.css +14 -2
- package/src/components/text-area.tsx +34 -26
- package/src/components/text-field.css +9 -2
- package/src/components/text-field.tsx +44 -28
- package/src/components/theme.tsx +30 -24
- package/src/components/toolbar.props.tsx +3 -2
- 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 +27 -3
- 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-4S5L25RO.js +0 -3
- package/dist/esm/chunk-5CFSNNYS.js +0 -3
- 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-5RFDCAKC.js +0 -3
- package/dist/esm/chunk-5XR5PTDR.js +0 -3
- 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-HV7USGHD.js +0 -3
- package/dist/esm/chunk-IE5ACUZS.js +0 -3
- package/dist/esm/chunk-ILWS2JUE.js +0 -3
- 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-N3QLHFHB.js.map +0 -7
- 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-VRQEWMC6.js +0 -3
- package/dist/esm/chunk-VRQEWMC6.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-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-6RJQ5LLP.js.map → chunk-2TWPPDII.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-W4MQ6TEK.js.map → chunk-5FWEGTP6.js.map} +0 -0
- /package/dist/esm/{chunk-A2OMWZI7.js.map → chunk-6DWDNKLS.js.map} +0 -0
- /package/dist/esm/{chunk-XL5OHW6Z.js.map → chunk-BVQDDN5Q.js.map} +0 -0
- /package/dist/esm/{chunk-YOSCUA6Z.js.map → chunk-C2WKAIZM.js.map} +0 -0
- /package/dist/esm/{chunk-7B3XDZXZ.js.map → chunk-E6BDD3PN.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-NZCAGHCL.js.map → chunk-HVMRB3AH.js.map} +0 -0
- /package/dist/esm/{chunk-IZXML75Y.js.map → chunk-JQVW4WNN.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-Z563IAE3.js.map → chunk-N3B6EGXL.js.map} +0 -0
- /package/dist/esm/{chunk-CYTPMHSJ.js.map → chunk-NYBE3U3V.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-JZ5Z53MN.js.map → chunk-STPMPY3X.js.map} +0 -0
- /package/dist/esm/{chunk-HHSFAOIO.js.map → chunk-TFFU435D.js.map} +0 -0
- /package/dist/esm/{chunk-R4PGFURL.js.map → chunk-TXVZOS3E.js.map} +0 -0
- /package/dist/esm/{chunk-WH7PQSSG.js.map → chunk-UICSVJ3B.js.map} +0 -0
- /package/dist/esm/{chunk-5TJH35TF.js.map → chunk-ULCHGKI3.js.map} +0 -0
- /package/dist/esm/{chunk-3B25RLWX.js.map → chunk-UR5BUNNT.js.map} +0 -0
- /package/dist/esm/{chunk-AQ7VUGQQ.js.map → chunk-VPUFKJQA.js.map} +0 -0
- /package/dist/esm/{chunk-64EFWPHI.js.map → chunk-YCLPURTD.js.map} +0 -0
- /package/dist/esm/{chunk-YWG476GC.js.map → chunk-ZG2XQUOH.js.map} +0 -0
- /package/dist/esm/{chunk-CV7QQTI3.js.map → chunk-ZKQCSGL3.js.map} +0 -0
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/avatar.props.tsx"],
|
|
4
4
|
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { grayAccentColorPropDef, accentColors } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst variants = ['raised', 'solid', 'soft', 'surface', 'outline'] as const;\nconst objectFitValues = ['cover', 'contain', 'fill', 'scale-down', 'none'] as const;\n\nconst avatarPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'raised' },\n ...grayAccentColorPropDef,\n ...radiusPropDef,\n fallback: { type: 'ReactNode', required: true },\n /**\n * Status indicator color. Renders a small colored dot at the bottom-right corner.\n * Cannot be used together with `badge`.\n */\n status: { type: 'enum', values: accentColors, default: undefined },\n /**\n * The words the status dot stands for, such as \"Online\". A screen reader reads them with the\n * avatar. Without it the dot is hidden from screen readers.\n */\n statusLabel: { type: 'string', default: undefined },\n /**\n * Custom badge content. Renders at the bottom-right corner.\n * Cannot be used together with `status`.\n */\n badge: { type: 'ReactNode', default: undefined },\n /**\n * Controls how the avatar image should be resized to fit its container.\n * Defaults to 'cover' which crops the image to fill the avatar.\n * Use 'contain' to show the full image without cropping.\n */\n fit: { type: 'enum', className: 'kui-r-fit', values: objectFitValues, default: 'cover', responsive: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n fallback: PropDef<React.ReactNode>;\n status: PropDef<(typeof accentColors)[number] | undefined>;\n statusLabel: PropDef<string | undefined>;\n badge: PropDef<React.ReactNode>;\n fit: PropDef<(typeof objectFitValues)[number]>;\n};\n\nexport { avatarPropDefs };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "+HAMA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EACpDC,EAAW,CAAC,SAAU,QAAS,OAAQ,UAAW,SAAS,EAC3DC,EAAkB,CAAC,QAAS,UAAW,OAAQ,aAAc,MAAM,EAEnEC,EAAiB,CACrB,GAAGC,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQJ,EAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQC,EAAU,QAAS,QAAS,EACvF,GAAGI,EACH,GAAGC,EACH,SAAU,CAAE,KAAM,YAAa,SAAU,EAAK,EAK9C,OAAQ,CAAE,KAAM,OAAQ,OAAQC,EAAc,QAAS,MAAU,EAKjE,YAAa,CAAE,KAAM,SAAU,QAAS,MAAU,EAKlD,MAAO,CAAE,KAAM,YAAa,QAAS,MAAU,EAM/C,IAAK,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQL,EAAiB,QAAS,QAAS,WAAY,EAAK,CAC3G",
|
|
6
6
|
"names": ["sizes", "variants", "objectFitValues", "avatarPropDefs", "asChildPropDef", "grayAccentColorPropDef", "radiusPropDef", "accentColors"]
|
|
7
7
|
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=chunk-CKJXTEVO.js.map
|
|
1
|
+
import{c as o}from"./chunk-CUNKWFKA.js";var e=["horizontal","vertical"],t={orientation:{type:"enum",className:"kui-r-orientation",values:e,default:"horizontal",responsive:!0},color:{...o.color,default:"gray"},decorative:{type:"boolean",default:!1},light:{type:"boolean",className:"kui-light",default:!1}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NR5FQCMU.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/separator.props.tsx"],
|
|
4
4
|
"sourcesContent": ["import { colorPropDef } from '../props/color.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst orientationValues = ['horizontal', 'vertical'] as const;\n\nconst separatorPropDefs = {\n orientation: {\n type: 'enum',\n className: 'kui-r-orientation',\n values: orientationValues,\n default: 'horizontal',\n responsive: true,\n },\n color: { ...colorPropDef.color, default: 'gray' },\n decorative: { type: 'boolean', default: false },\n light: { type: 'boolean', className: 'kui-light', default: false },\n} satisfies {\n orientation: PropDef<(typeof orientationValues)[number]>;\n color: typeof colorPropDef.color;\n decorative: PropDef<boolean>;\n light: PropDef<boolean>;\n};\n\nexport { separatorPropDefs };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "wCAIA,IAAMA,EAAoB,CAAC,aAAc,UAAU,EAE7CC,EAAoB,CACxB,YAAa,CACX,KAAM,OACN,UAAW,oBACX,OAAQD,EACR,QAAS,aACT,WAAY,EACd,EACA,MAAO,CAAE,GAAGE,EAAa,MAAO,QAAS,MAAO,EAChD,WAAY,CAAE,KAAM,UAAW,QAAS,EAAM,EAC9C,MAAO,CAAE,KAAM,UAAW,UAAW,YAAa,QAAS,EAAM,CACnE",
|
|
6
6
|
"names": ["orientationValues", "separatorPropDefs", "colorPropDef"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as d,b as f,c as g}from"./chunk-BQC2P3SN.js";import{a as P,b as H,c as h,d as c}from"./chunk-UJ7JERJ5.js";import{c as i}from"./chunk-HBWBPBSA.js";import{a as n}from"./chunk-CLJ6SEGP.js";import{c as m}from"./chunk-OKQAVYW4.js";import*as e from"react";import{Slot as v}from"radix-ui";var R=["h1","h2","h3","h4","h5","h6"],C=["1","2","3","4","5","6","7","8","9"],l={as:{type:"enum",values:R,default:"h2"},...n,size:{type:"enum",className:"kui-r-size",values:C,default:"6",responsive:!0},...g,...c,...f,...d,...h,...H,...i,...P};var W=e.memo(e.forwardRef((u,o)=>{let{children:r,className:p,asChild:y,as:D="h2",color:t,...s}=m(u,l),a=p?`kui-Heading ${p}`:"kui-Heading";return y?e.createElement(v.Root,{"data-accent-color":t,...s,ref:o,className:a},r):e.createElement(D,{"data-accent-color":t,...s,ref:o,className:a},r)}));W.displayName="Heading";export{W as a};
|
|
3
|
+
//# sourceMappingURL=chunk-NS573D6O.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/heading.tsx", "../../src/components/heading.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { headingPropDefs } from './heading.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 HeadingElement = React.ElementRef<'h2'>;\ntype HeadingOwnProps = GetPropDefTypes<typeof headingPropDefs>;\ninterface CommonHeadingProps extends HeadingOwnProps {}\ntype HeadingH1Props = { as: 'h1' } & ComponentPropsWithout<'h1', RemovedProps>;\ntype HeadingH2Props = { as?: 'h2' } & ComponentPropsWithout<'h2', RemovedProps>;\ntype HeadingH3Props = { as: 'h3' } & ComponentPropsWithout<'h3', RemovedProps>;\ntype HeadingH4Props = { as: 'h4' } & ComponentPropsWithout<'h4', RemovedProps>;\ntype HeadingH5Props = { as: 'h5' } & ComponentPropsWithout<'h5', RemovedProps>;\ntype HeadingH6Props = { as: 'h6' } & ComponentPropsWithout<'h6', RemovedProps>;\ntype HeadingProps = CommonHeadingProps &\n (HeadingH1Props | HeadingH2Props | HeadingH3Props | HeadingH4Props | HeadingH5Props | HeadingH6Props);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\n\nconst Heading = React.memo(\n React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'h2',\n color,\n ...headingProps\n } = extractProps(props, headingPropDefs);\n\n const combinedClassName = className ? `kui-Heading ${className}` : 'kui-Heading';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...headingProps}\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 {...(headingProps as React.HTMLAttributes<HTMLHeadingElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nHeading.displayName = 'Heading';\n\nexport { Heading };\nexport type { HeadingProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { emphasisPropDef } from '../props/emphasis.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\n\nconst headingPropDefs = {\n as: { type: 'enum', values: as, default: 'h2' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n default: '6',\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...emphasisPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { headingPropDefs };\n"],
|
|
5
|
+
"mappings": ";2OAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,WCWrB,IAAMC,EAAK,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,IAAI,EACxCC,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAEpDC,EAAkB,CACtB,GAAI,CAAE,KAAM,OAAQ,OAAQF,EAAI,QAAS,IAAK,EAC9C,GAAGG,EACH,KAAM,CACJ,KAAM,OACN,UAAW,aACX,OAAQF,EACR,QAAS,IACT,WAAY,EACd,EACA,GAAGG,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,CACL,EDVA,IAAMC,EAAgB,OACd,aAAyC,CAACC,EAAOC,IAAiB,CACtE,GAAM,CACJ,SAAAC,EACA,UAAAC,EACA,QAAAC,EACA,GAAIC,EAAM,KACV,MAAAC,EACA,GAAGC,CACL,EAAIC,EAAaR,EAAOS,CAAe,EAEjCC,EAAoBP,EAAY,eAAeA,CAAS,GAAK,cAEnE,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,EAAQ,YAAc",
|
|
6
|
+
"names": ["React", "Slot", "as", "sizes", "headingPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "emphasisPropDef", "Heading", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "headingProps", "extractProps", "headingPropDefs", "combinedClassName", "Slot"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{b as P,d as $,f as A}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{b as P,d as $,f as A}from"./chunk-ZKQCSGL3.js";import*as t from"react";import L from"classnames";import{useVirtualizer as oe}from"@tanstack/react-virtual";import{useLayoutEffect as B}from"radix-ui/internal";function q(r,a){if(r.style?.height!==a.style?.height||r.style?.transform!==a.style?.transform)return!1;let c=Object.keys(r);return c.length!==Object.keys(a).length?!1:c.every(s=>s==="style"||Object.is(r[s],a[s]))}var ce=t.memo(function({label:a,isHighlighted:c,id:s,style:f,tabIndex:h,"data-highlighted":o,"data-index":R,"aria-setsize":I,"aria-posinset":y,onMouseEnter:E,onMouseLeave:H,onClick:d,onKeyDown:T}){return t.createElement("div",{id:s,role:"menuitem",className:L("kui-reset","kui-BaseMenuItem","kui-VirtualMenuItem"),style:f,tabIndex:h,"data-highlighted":o,"data-index":R,"aria-setsize":I,"aria-posinset":y,onMouseEnter:E,onMouseLeave:H,onClick:d,onKeyDown:T},a)},q);function le(r,a,c){let[s,f]=t.useState(void 0);return B(()=>{let h=r.current;if(!a||!h)return;let o=document.createElement("div");o.className="kui-reset kui-BaseMenuItem kui-VirtualMenuItem",o.setAttribute("aria-hidden","true"),o.style.visibility="hidden",o.textContent="\xA0",h.appendChild(o);let R=o.getBoundingClientRect().height;o.remove(),f(R>0?R:void 0)},[r,a,c]),a?s:void 0}function de({items:r,itemLabel:a,renderItem:c,size:s,estimatedItemSize:f,overscan:h=5,onSelect:o,className:R,style:I,onKeyDown:y,onFocus:E,...H},d){let T=t.useId(),x=t.useRef(null),[S,m]=t.useState(-1),{isInsideMenu:l,size:C,itemHeight:U}=$(),D=A(),Y=t.useCallback(e=>{x.current=e,typeof d=="function"?d(e):d&&(d.current=e)},[d]),G=le(x,l&&s==null&&f==null,C),p=f??(s?P(s):G??U??P(C??"2"));if(!a&&!c)throw new Error("VirtualMenu requires either itemLabel or renderItem prop");let J=t.useMemo(()=>a?typeof a=="function"?a:e=>e[a]:null,[a]),v=t.useMemo(()=>r.length===0||S<0?-1:Math.min(S,r.length-1),[S,r.length]),Q=t.useMemo(()=>typeof p=="function"?p:()=>p,[p]),M=oe({count:r.length,getScrollElement:()=>x.current,estimateSize:Q,overscan:h}),X=M.getVirtualItems();B(()=>{M.measure()},[M,p]),t.useEffect(()=>{let e=x.current;if(!l||!e)return;let n=e.closest("[data-radix-menu-content]");if(!n)return;let i=u=>{u.target===n&&e.focus({preventScroll:!0})};return n.addEventListener("focusin",i),document.activeElement===n&&e.focus({preventScroll:!0}),()=>n.removeEventListener("focusin",i)},[l]);let z=t.useRef(y),w=t.useRef(E);z.current=y,w.current=E;let k=t.useRef(r),N=t.useRef(o),K=t.useRef(D);k.current=r,N.current=o,K.current=D;let g=t.useCallback(e=>{let n=k.current;e<0||e>=n.length||(N.current?.(n[e],e),K.current?.())},[]),b=t.useRef(M.scrollToIndex);b.current=M.scrollToIndex;let V=t.useRef(v);V.current=v;let Z=t.useCallback(e=>{let n=e.currentTarget.dataset.index;n!=null&&m(Number(n))},[]),ee=t.useCallback(e=>{let n=e.currentTarget.dataset.index;n!=null&&g(Number(n))},[g]),te=t.useCallback(e=>{let n=Number(e.currentTarget.dataset.index);m(i=>i===n?-1:i)},[]),ne=t.useCallback(e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault(),e.stopPropagation();let n=e.currentTarget.dataset.index;n!=null&&g(Number(n))}},[g]),re=t.useCallback(e=>{if(z.current?.(e),e.defaultPrevented)return;let n=k.current,i=V.current;switch(e.key){case"ArrowDown":{e.preventDefault();let u=i<n.length-1?i+1:0;m(u),b.current(u,{align:"auto"});break}case"ArrowUp":{e.preventDefault();let u=i>0?i-1:n.length-1;m(u),b.current(u,{align:"auto"});break}case"Home":{e.preventDefault(),m(0),b.current(0,{align:"start"});break}case"End":{e.preventDefault();let u=n.length-1;m(u),b.current(u,{align:"end"});break}case"Enter":case" ":{e.preventDefault(),g(i);break}case"Tab":{l&&e.preventDefault();break}case"Escape":{l||e.currentTarget.blur();break}default:l&&e.key.length===1&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.stopPropagation()}},[g,l]),ae=t.useCallback(e=>{w.current?.(e),e.target===e.currentTarget&&V.current<0&&k.current.length>0&&m(0)},[]),O=t.useCallback(e=>`${T}-item-${e}`,[T]),ie=t.useMemo(()=>({overflow:"auto",position:"relative",...I}),[I]),j=M.getTotalSize(),se=t.useMemo(()=>({height:`${j}px`,width:"100%",position:"relative"}),[j]);return t.createElement("div",{...H,ref:Y,role:l?"group":"menu","aria-activedescendant":v>=0?O(v):void 0,tabIndex:0,onKeyDown:re,onFocus:ae,className:L("kui-VirtualMenuRoot",!l&&`kui-r-size-${s??"2"}`,R),style:ie},t.createElement("div",{className:"kui-VirtualMenuViewport",style:se},X.map(e=>{let n=r[e.index],i=e.index,u=v===i,ue={height:e.size,transform:`translateY(${e.start}px)`},F={id:O(i),isHighlighted:u,style:ue,tabIndex:-1,"data-highlighted":u?!0:void 0,"data-index":i,"aria-setsize":r.length,"aria-posinset":i+1,onMouseEnter:Z,onMouseLeave:te,onClick:ee,onKeyDown:ne};return c?t.createElement(c,{key:e.key,item:n,index:i,...F}):t.createElement(ce,{key:e.key,label:J(n),...F})})))}var W=t.forwardRef(de);W.displayName="VirtualMenu";var _=t.forwardRef(({className:r,children:a,...c},s)=>t.createElement("div",{ref:s,role:"menuitem",className:L("kui-reset","kui-BaseMenuItem","kui-VirtualMenuItem",r),...c},a));_.displayName="VirtualMenu.Item";var me=t.memo(_,q),ge=Object.assign(W,{Item:me});export{ge as a};
|
|
3
|
+
//# sourceMappingURL=chunk-NYBE3U3V.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-OA7C34MJ.js.map
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=chunk-65KD6WS6.js.map
|
|
1
|
+
import{b as s}from"./chunk-KRJTW535.js";import{d as o}from"./chunk-CUNKWFKA.js";import{a as e}from"./chunk-NZJGC6ZW.js";var a=["1","2","3","4"],t=["raised","solid","soft","surface","outline","ghost"],f={...e,size:{type:"enum",className:"kui-r-size",values:a,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:t,default:"solid"},...o,...s,loading:{type:"boolean",className:"kui-loading",default:!1},fullWidth:{type:"boolean",className:"kui-full-width",default:!1}};export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OEPVYHSS.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/_internal/base-button.props.ts"],
|
|
4
4
|
"sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\n/**\n * Available button sizes for responsive design\n * Size 1: 28px - Compact for toolbars and dense interfaces\n * Size 2: 32px - Standard for most interface contexts\n * Size 3: 40px - Large for important actions and mobile touch targets\n * Size 4: 48px - Extra large for hero sections and maximum impact\n */\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Available button variants for different visual contexts\n * - raised: lifted off its ground, with an edge and a shadow\n * - solid: Primary actions that should be noticed first (the default)\n * - soft: Content-heavy interfaces, natural integration\n * - surface: Elevated appearance with subtle depth\n * - outline: Secondary actions that support primary actions\n * - ghost: Utility functions that don't compete for attention\n */\nconst variants = ['raised', 'solid', 'soft', 'surface', 'outline', 'ghost'] as const;\n\n/**\n * Base button prop definitions that define the component's API\n * \n * These props are used by all button variants (Button and Toggle)\n * to ensure consistent behavior and styling across the design system.\n * \n * Key features:\n * - Responsive sizing with mobile-first approach\n * - Six visual variants for different interface contexts\n * - Comprehensive color system with semantic meanings\n * - Loading states with automatic accessibility\n * - Polymorphic rendering support via asChild\n * \n * @example\n * ```tsx\n * // Basic button with default props\n * <BaseButton>Click me</BaseButton>\n * \n * // Button with custom size and variant\n * <BaseButton size=\"3\" variant=\"solid\">Primary Action</BaseButton>\n * \n * // Button with loading state\n * <BaseButton loading>Processing...</BaseButton>\n * ```\n */\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n */\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n /**\n * Visual variant that determines the button's appearance and context\n */\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...radiusPropDef,\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n */\n loading: { type: 'boolean', className: 'kui-loading', default: false },\n /**\n * Full width mode that expands the button to fill its container\n * Useful for mobile layouts and form submissions\n */\n fullWidth: { type: 'boolean', className: 'kui-full-width', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "wHAaA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAW3BC,EAAW,CAAC,SAAU,QAAS,OAAQ,UAAW,UAAW,OAAO,EA2BpEC,EAAqB,CACzB,GAAGC,EAKH,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQH,EAAO,QAAS,IAAK,WAAY,EAAK,EAI7F,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQC,EAAU,QAAS,OAAQ,EACtF,GAAGG,EACH,GAAGC,EAKH,QAAS,CAAE,KAAM,UAAW,UAAW,cAAe,QAAS,EAAM,EAKrE,UAAW,CAAE,KAAM,UAAW,UAAW,iBAAkB,QAAS,EAAM,CAC5E",
|
|
6
6
|
"names": ["sizes", "variants", "baseButtonPropDefs", "asChildPropDef", "accentColorPropDef", "radiusPropDef"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{c as E}from"./chunk-HBWBPBSA.js";import{c as I}from"./chunk-5ON3XLRD.js";import{b as L}from"./chunk-XU74PNM2.js";import{c as j}from"./chunk-OKQAVYW4.js";import*as r from"react";import re from"classnames";import{Direction as ae,Slider as v}from"radix-ui";var te=["1","2","3","4"],g={size:{type:"enum",className:"kui-r-size",values:te,default:"2",responsive:!0},showTickLabels:{type:"boolean"},snapToTicks:{type:"boolean"},...E,...L};var ne=r.forwardRef((K,O)=>{let W=I(K,g.size),{className:B,color:G,radius:A,tabIndex:C,...H}=j(W,g),{ticks:c,unit:u,showTickLabels:U,snapToTicks:y,value:$,defaultValue:q,onValueChange:x,onValueCommit:p,"aria-label":F,"aria-labelledby":J,...i}=H,k=i.min??0,d=i.max??100,[Q,X]=r.useState(()=>q??[k]),P=$!==void 0,s=P?$:Q,D=r.useId(),Y=i.step,l=r.useMemo(()=>c?[...c].sort((e,t)=>e.value-t.value):[],[c]),m=r.useCallback(e=>{let t=l[0].value;for(let a of l)Math.abs(a.value-e)<Math.abs(t-e)&&(t=a.value);return t},[l]),R=r.useCallback((e,t)=>{let a=m(e);return e>t&&a<=t?l.find(n=>n.value>t)?.value??t:e<t&&a>=t?[...l].reverse().find(n=>n.value<t)?.value??t:a},[m,l]),f=r.useRef(!1),N=r.useCallback(e=>{let t=a=>u?`${a} ${u}`:a.toString();return e.length===1?`${t(e[0])} out of ${t(d)}`:e.length===2?`${t(e[0])} to ${t(e[1])} out of ${t(d)}`:`${e.map(t).join(", ")} out of ${t(d)}`},[u,d]),Z=ae.useDirection(i.dir),T=i.orientation??"horizontal",V=T==="vertical"?!i.inverted:Z==="rtl"!=!!i.inverted,S=r.useMemo(()=>c?c.map((e,t)=>{let a=(e.value-k)/(d-k)*100;return{...e,percentage:V?100-a:a,index:t}}):null,[c,k,d,V]),b=r.useRef(null),h=r.useRef(null),_=r.useCallback(e=>{b.current&&(b.current.textContent=N(e),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{b.current&&(b.current.textContent="")},1e3))},[N]),w=r.useCallback(e=>{let a=y&&l.length>0?e.map((n,o)=>f.current&&s[o]!==void 0?R(n,s[o]):m(n)):e;P||X(a),x?.(a)},[y,l,R,m,s,x,P]),ee=r.useCallback(e=>{if(!p)return;if(!y||l.length===0){p(e);return}let t=f.current,a=e.map((n,o)=>t&&s[o]!==void 0?R(n,s[o]):m(n));t&&a.every((n,o)=>n===s[o])||p(a)},[p,y,l,R,m,s]);return r.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),r.createElement("div",{className:"kui-SliderContainer","data-orientation":T,"data-has-ticks":S?"":void 0},r.createElement("div",{ref:b,"aria-live":"polite","aria-atomic":"true",className:"kui-sr-only"}),r.createElement(v.Root,{"data-accent-color":G,"data-radius":A,ref:O,...i,value:s,step:Y,onKeyDown:e=>{f.current=!0,i.onKeyDown?.(e)},onPointerDown:e=>{f.current=!1,i.onPointerDown?.(e)},onValueChange:w,onValueCommit:ee,asChild:!1,className:re("kui-SliderRoot",B)},r.createElement(v.Track,{className:"kui-SliderTrack"},r.createElement(v.Range,{className:"kui-SliderRange","data-inverted":i.inverted?"":void 0})),s.map((e,t)=>r.createElement(v.Thumb,{key:t,className:"kui-SliderThumb",...C!==void 0?{tabIndex:C}:void 0,"aria-label":F,"aria-labelledby":J,"aria-valuetext":u?`${e} ${u}`:void 0}))),S&&r.createElement("div",{className:"kui-SliderTicks","data-orientation":T,role:"group","aria-label":"Slider tick marks"},S.map(e=>r.createElement("button",{key:e.index,className:"kui-SliderTick",style:T==="vertical"?{top:`${e.percentage}%`}:{left:`${e.percentage}%`},disabled:i.disabled,onClick:()=>{let t=0;s.forEach((n,o)=>{let M=Math.abs(n-e.value),z=Math.abs(s[t]-e.value);(M<z||M===z&&e.value>n)&&(t=o)});let a=s.map((n,o)=>o===t?e.value:n).sort((n,o)=>n-o);f.current=!1,w(a),p?.(a),_(a)},"aria-label":`Set to ${e.label||(u?`${e.value} ${u}`:e.value)}`,"aria-describedby":e.label?void 0:`${D}-tick-${e.index}`,type:"button"},r.createElement("div",{className:"kui-SliderTickMark"}),e.label&&U!==!1&&r.createElement("div",{className:"kui-SliderTickLabel"},e.label),!e.label&&r.createElement("span",{id:`${D}-tick-${e.index}`,className:"kui-sr-only"},u?`${e.value} ${u}`:e.value)))))});ne.displayName="Slider";export{ne as a};
|
|
3
|
+
//# sourceMappingURL=chunk-ONJYRJ66.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/slider.tsx", "../../src/components/slider.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slider as SliderPrimitive } from 'radix-ui';\n\nimport { sliderPropDefs } from './slider.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\n\nimport type { ComponentPropsWithout } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype SliderElement = React.ElementRef<typeof SliderPrimitive.Root>;\ntype SliderOwnProps = GetPropDefTypes<typeof sliderPropDefs>;\ninterface SliderProps extends ComponentPropsWithout<typeof SliderPrimitive.Root, 'asChild' | 'color' | 'children' | 'defaultChecked'>, SliderOwnProps {\n ticks?: Array<{ value: number; label?: string }>;\n unit?: string;\n}\nconst Slider = React.forwardRef<SliderElement, SliderProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, sliderPropDefs.size);\n const { className, color, radius, tabIndex, ...sliderProps } = extractProps(props, sliderPropDefs);\n const {\n ticks,\n unit,\n showTickLabels,\n snapToTicks,\n value: valueProp,\n defaultValue,\n onValueChange,\n onValueCommit,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...rootProps\n } = sliderProps;\n const min = rootProps.min ?? 0;\n const max = rootProps.max ?? 100;\n\n // The slider keeps its own copy of the value when uncontrolled, so the handles, their\n // labels and a tick press all read the current value rather than the first one.\n const [uncontrolledValue, setUncontrolledValue] = React.useState<number[]>(() => defaultValue ?? [min]);\n const isControlled = valueProp !== undefined;\n const currentValue = isControlled ? valueProp : uncontrolledValue;\n const tickIdPrefix = React.useId();\n\n // For snapping to ticks, we need to handle this differently\n // Radix slider doesn't support arbitrary step values, so we'll handle snapping in the onValueChange\n const step = rootProps.step;\n\n // Optimized snap-to-ticks with memoized sorted ticks\n const sortedTicks = React.useMemo(() => (ticks ? [...ticks].sort((a, b) => a.value - b.value) : []), [ticks]);\n\n // The nearest tick to a value.\n const snapToNearestTick = React.useCallback(\n (value: number): number => {\n let nearest = sortedTicks[0].value;\n for (const tick of sortedTicks) {\n if (Math.abs(tick.value - value) < Math.abs(nearest - value)) nearest = tick.value;\n }\n return nearest;\n },\n [sortedTicks],\n );\n\n // A key press moves the handle one step, which the nearest tick would undo. So a key press\n // that does not reach another tick goes on to the next tick the way it moved.\n const snapKeyStep = React.useCallback(\n (value: number, previous: number): number => {\n const nearest = snapToNearestTick(value);\n if (value > previous && nearest <= previous) {\n return sortedTicks.find((tick) => tick.value > previous)?.value ?? previous;\n }\n if (value < previous && nearest >= previous) {\n return [...sortedTicks].reverse().find((tick) => tick.value < previous)?.value ?? previous;\n }\n return nearest;\n },\n [snapToNearestTick, sortedTicks],\n );\n\n // Whether the change under way came from the keyboard, so snapping knows how to read it.\n const keyboardChangeRef = React.useRef(false);\n\n // Format value text for accessibility\n const formatValueText = React.useCallback(\n (values: number[]): string => {\n const formatValue = (val: number) => (unit ? `${val} ${unit}` : val.toString());\n\n if (values.length === 1) {\n return `${formatValue(values[0])} out of ${formatValue(max)}`;\n } else if (values.length === 2) {\n return `${formatValue(values[0])} to ${formatValue(values[1])} out of ${formatValue(max)}`;\n } else {\n return `${values.map(formatValue).join(', ')} out of ${formatValue(max)}`;\n }\n },\n [unit, max],\n );\n\n // Ticks sit where the handle sits for their value. Radix flips the handle for a right to\n // left slider and for `inverted`, and runs a vertical slider from the bottom.\n const direction = Direction.useDirection(rootProps.dir);\n const orientation = rootProps.orientation ?? 'horizontal';\n const flipped = orientation === 'vertical' ? !rootProps.inverted : (direction === 'rtl') !== Boolean(rootProps.inverted);\n\n const tickElements = React.useMemo(() => {\n if (!ticks) return null;\n\n return ticks.map((tick, index) => {\n const percentage = ((tick.value - min) / (max - min)) * 100;\n return { ...tick, percentage: flipped ? 100 - percentage : percentage, index };\n });\n }, [ticks, min, max, flipped]);\n\n // Live region ref for accessibility announcements (no state = no re-renders)\n const announceRef = React.useRef<HTMLDivElement>(null);\n const announceTimeoutRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // Says the new value after a tick press. Focus stays on the tick, so nothing else reports\n // it. The handle reports its own value on key presses and drags.\n const announce = React.useCallback(\n (values: number[]) => {\n if (!announceRef.current) return;\n announceRef.current.textContent = formatValueText(values);\n if (announceTimeoutRef.current) clearTimeout(announceTimeoutRef.current);\n announceTimeoutRef.current = setTimeout(() => {\n if (announceRef.current) announceRef.current.textContent = '';\n }, 1000);\n },\n [formatValueText],\n );\n\n // Handle value changes with snapping\n const handleValueChange = React.useCallback(\n (newValue: number[]) => {\n const snapping = snapToTicks && sortedTicks.length > 0;\n const finalValue = !snapping ? newValue : newValue.map((v, i) => (keyboardChangeRef.current && currentValue[i] !== undefined ? snapKeyStep(v, currentValue[i]) : snapToNearestTick(v)));\n\n if (!isControlled) setUncontrolledValue(finalValue);\n onValueChange?.(finalValue);\n },\n [snapToTicks, sortedTicks, snapKeyStep, snapToNearestTick, currentValue, onValueChange, isControlled],\n );\n\n // Radix commits its own step value on a key press, before the snapped value comes back. So\n // the commit snaps the same way the change did, and a key press that snaps back to where the\n // handle was commits nothing.\n const handleValueCommit = React.useCallback(\n (newValue: number[]) => {\n if (!onValueCommit) return;\n if (!snapToTicks || sortedTicks.length === 0) {\n onValueCommit(newValue);\n return;\n }\n const keyboard = keyboardChangeRef.current;\n const finalValue = newValue.map((v, i) => (keyboard && currentValue[i] !== undefined ? snapKeyStep(v, currentValue[i]) : snapToNearestTick(v)));\n if (keyboard && finalValue.every((v, i) => v === currentValue[i])) return;\n onValueCommit(finalValue);\n },\n [onValueCommit, snapToTicks, sortedTicks, snapKeyStep, snapToNearestTick, currentValue],\n );\n\n // Cleanup timeout on unmount\n React.useEffect(() => {\n return () => {\n if (announceTimeoutRef.current) {\n clearTimeout(announceTimeoutRef.current);\n }\n };\n }, []);\n\n return (\n <div className=\"kui-SliderContainer\" data-orientation={orientation} data-has-ticks={tickElements ? '' : undefined}>\n {/* Live region for screen reader announcements */}\n <div ref={announceRef} aria-live=\"polite\" aria-atomic=\"true\" className=\"kui-sr-only\" />\n\n <SliderPrimitive.Root\n data-accent-color={color}\n data-radius={radius}\n ref={forwardedRef}\n {...rootProps}\n value={currentValue}\n step={step}\n onKeyDown={(event) => {\n keyboardChangeRef.current = true;\n rootProps.onKeyDown?.(event);\n }}\n onPointerDown={(event) => {\n keyboardChangeRef.current = false;\n rootProps.onPointerDown?.(event);\n }}\n onValueChange={handleValueChange}\n onValueCommit={handleValueCommit}\n asChild={false}\n className={classNames('kui-SliderRoot', className)}\n >\n <SliderPrimitive.Track className=\"kui-SliderTrack\">\n <SliderPrimitive.Range className=\"kui-SliderRange\" data-inverted={rootProps.inverted ? '' : undefined} />\n </SliderPrimitive.Track>\n {currentValue.map((value, index) => (\n <SliderPrimitive.Thumb\n key={index}\n className=\"kui-SliderThumb\"\n {...(tabIndex !== undefined ? { tabIndex } : undefined)}\n // The caller's name goes to every handle. Without one, Radix names the two\n // handles of a range \"Minimum\" and \"Maximum\".\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-valuetext={unit ? `${value} ${unit}` : undefined}\n />\n ))}\n </SliderPrimitive.Root>\n {tickElements && (\n <div className=\"kui-SliderTicks\" data-orientation={orientation} role=\"group\" aria-label=\"Slider tick marks\">\n {tickElements.map((tick) => {\n return (\n <button\n key={tick.index}\n className=\"kui-SliderTick\"\n // Only the offset varies per tick; the centring transform lives in `.kui-SliderTick`.\n style={orientation === 'vertical' ? { top: `${tick.percentage}%` } : { left: `${tick.percentage}%` }}\n disabled={rootProps.disabled}\n onClick={() => {\n // Move only the handle nearest the tick. When handles share a value, a\n // tick above it moves the last of them and a tick below moves the first.\n let nearest = 0;\n currentValue.forEach((v, i) => {\n const distance = Math.abs(v - tick.value);\n const best = Math.abs(currentValue[nearest] - tick.value);\n if (distance < best || (distance === best && tick.value > v)) nearest = i;\n });\n const newValue = currentValue.map((v, i) => (i === nearest ? tick.value : v)).sort((x, y) => x - y);\n\n keyboardChangeRef.current = false;\n handleValueChange(newValue);\n onValueCommit?.(newValue);\n announce(newValue);\n }}\n aria-label={`Set to ${tick.label || (unit ? `${tick.value} ${unit}` : tick.value)}`}\n aria-describedby={tick.label ? undefined : `${tickIdPrefix}-tick-${tick.index}`}\n type=\"button\"\n >\n <div className=\"kui-SliderTickMark\" />\n {tick.label && showTickLabels !== false && <div className=\"kui-SliderTickLabel\">{tick.label}</div>}\n {!tick.label && (\n <span id={`${tickIdPrefix}-tick-${tick.index}`} className=\"kui-sr-only\">\n {unit ? `${tick.value} ${unit}` : tick.value}\n </span>\n )}\n </button>\n );\n })}\n </div>\n )}\n </div>\n );\n});\nSlider.displayName = 'Slider';\n\nexport { Slider };\nexport type { SliderProps };\n", "import { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\n\nconst sliderPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n showTickLabels: { type: 'boolean' },\n snapToTicks: { type: 'boolean' },\n ...colorPropDef,\n ...radiusPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n showTickLabels: PropDef<boolean>;\n snapToTicks: PropDef<boolean>;\n};\n\nexport { sliderPropDefs };\n"],
|
|
5
|
+
"mappings": ";gKAAA,UAAYA,MAAW,QACvB,OAAOC,OAAgB,aACvB,OAAS,aAAAC,GAAW,UAAUC,MAAuB,WCGrD,IAAMC,GAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAE3BC,EAAiB,CACrB,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQD,GAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,eAAgB,CAAE,KAAM,SAAU,EAClC,YAAa,CAAE,KAAM,SAAU,EAC/B,GAAGE,EACH,GAAGC,CACL,EDIA,IAAMC,GAAe,aAAuC,CAACC,EAAUC,IAAiB,CACtF,IAAMC,EAAQC,EAAkBH,EAAUI,EAAe,IAAI,EACvD,CAAE,UAAAC,EAAW,MAAAC,EAAO,OAAAC,EAAQ,SAAAC,EAAU,GAAGC,CAAY,EAAIC,EAAaR,EAAOE,CAAc,EAC3F,CACJ,MAAAO,EACA,KAAAC,EACA,eAAAC,EACA,YAAAC,EACA,MAAOC,EACP,aAAAC,EACA,cAAAC,EACA,cAAAC,EACA,aAAcC,EACd,kBAAmBC,EACnB,GAAGC,CACL,EAAIZ,EACEa,EAAMD,EAAU,KAAO,EACvBE,EAAMF,EAAU,KAAO,IAIvB,CAACG,EAAmBC,CAAoB,EAAU,WAAmB,IAAMT,GAAgB,CAACM,CAAG,CAAC,EAChGI,EAAeX,IAAc,OAC7BY,EAAeD,EAAeX,EAAYS,EAC1CI,EAAqB,QAAM,EAI3BC,EAAOR,EAAU,KAGjBS,EAAoB,UAAQ,IAAOnB,EAAQ,CAAC,GAAGA,CAAK,EAAE,KAAK,CAACoB,EAAGC,IAAMD,EAAE,MAAQC,EAAE,KAAK,EAAI,CAAC,EAAI,CAACrB,CAAK,CAAC,EAGtGsB,EAA0B,cAC7BC,GAA0B,CACzB,I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AgB,WAAa,CAAE,IAAK,GAAGV,EAAK,UAAU,GAAI,EAAI,CAAE,KAAM,GAAGA,EAAK,UAAU,GAAI,EACnG,SAAUf,EAAU,SACpB,QAAS,IAAM,CAGb,IAAIc,EAAU,EACdR,EAAa,QAAQ,CAAC8B,EAAGC,IAAM,CAC7B,IAAMM,EAAW,KAAK,IAAIP,EAAIrB,EAAK,KAAK,EAClC6B,EAAO,KAAK,IAAItC,EAAaQ,CAAO,EAAIC,EAAK,KAAK,GACpD4B,EAAWC,GAASD,IAAaC,GAAQ7B,EAAK,MAAQqB,KAAItB,EAAUuB,EAC1E,CAAC,EACD,IAAMH,EAAW5B,EAAa,IAAI,CAAC8B,EAAGC,IAAOA,IAAMvB,EAAUC,EAAK,MAAQqB,CAAE,EAAE,KAAK,CAACS,EAAGC,IAAMD,EAAIC,CAAC,EAElG5B,EAAkB,QAAU,GAC5Be,EAAkBC,CAAQ,EAC1BrC,IAAgBqC,CAAQ,EACxBF,EAASE,CAAQ,CACnB,EACA,aAAY,UAAUnB,EAAK,QAAUxB,EAAO,GAAGwB,EAAK,KAAK,IAAIxB,CAAI,GAAKwB,EAAK,MAAM,GACjF,mBAAkBA,EAAK,MAAQ,OAAY,GAAGR,CAAY,SAASQ,EAAK,KAAK,GAC7E,KAAK,UAEL,gBAAC,OAAI,UAAU,qBAAqB,EACnCA,EAAK,OAASvB,IAAmB,IAAS,gBAAC,OAAI,UAAU,uBAAuBuB,EAAK,KAAM,EAC3F,CAACA,EAAK,OACL,gBAAC,QAAK,GAAI,GAAGR,CAAY,SAASQ,EAAK,KAAK,GAAI,UAAU,eACvDxB,EAAO,GAAGwB,EAAK,KAAK,IAAIxB,CAAI,GAAKwB,EAAK,KACzC,CAEJ,CAEH,CACH,CAEJ,CAEJ,CAAC,EACDrC,GAAO,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "Direction", "SliderPrimitive", "sizes", "sliderPropDefs", "colorPropDef", "radiusPropDef", "Slider", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "sliderPropDefs", "className", "color", "radius", "tabIndex", "sliderProps", "extractProps", "ticks", "unit", "showTickLabels", "snapToTicks", "valueProp", "defaultValue", "onValueChange", "onValueCommit", "ariaLabel", "ariaLabelledBy", "rootProps", "min", "max", "uncontrolledValue", "setUncontrolledValue", "isControlled", "currentValue", "tickIdPrefix", "step", "sortedTicks", "a", "b", "snapToNearestTick", "value", "nearest", "tick", "snapKeyStep", "previous", "keyboardChangeRef", "formatValueText", "values", "formatValue", "val", "direction", "Direction", "orientation", "flipped", "tickElements", "index", "percentage", "announceRef", "announceTimeoutRef", "announce", "handleValueChange", "newValue", "finalValue", "v", "i", "handleValueCommit", "keyboard", "SliderPrimitive", "event", "classNames", "distance", "best", "x", "y"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=chunk-647DRBXQ.js.map
|
|
1
|
+
import{a as s}from"./chunk-NZJGC6ZW.js";var e=["1","2","3","4"],a=["raised","surface","outline","ghost","soft"],t={...s,size:{type:"enum",className:"kui-r-size",values:e,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:a,default:"raised"}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OSSNMF5U.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/card.props.tsx"],
|
|
4
4
|
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['raised', 'surface', 'outline', 'ghost', 'soft'] as const;\n\nconst cardPropDefs = {\n ...asChildPropDef,\n /** Padding --surface-p-N and corner --radius-surface-N. Unset, it follows the Theme size. */\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'raised' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { cardPropDefs };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "wCAIA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,SAAU,UAAW,UAAW,QAAS,MAAM,EAE3DC,EAAe,CACnB,GAAGC,EAEH,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQH,EAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQC,EAAU,QAAS,QAAS,CACzF",
|
|
6
6
|
"names": ["sizes", "variants", "cardPropDefs", "asChildPropDef"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as P,b as l,c as T}from"./chunk-BQC2P3SN.js";import{a as f,b as x,c,d as y}from"./chunk-UJ7JERJ5.js";import{c as n}from"./chunk-HBWBPBSA.js";import{a}from"./chunk-CLJ6SEGP.js";import{c as i}from"./chunk-OKQAVYW4.js";import*as e from"react";import{Slot as C}from"radix-ui";var R=["span","div","label","p"],h=["1","2","3","4","5","6","7","8","9"],u={as:{type:"enum",values:R,default:"span"},...a,size:{type:"enum",className:"kui-r-size",values:h,responsive:!0},...T,...y,...l,...P,...c,...x,...n,...f};var b=e.memo(e.forwardRef((d,o)=>{let{children:t,className:p,asChild:D,as:v="span",color:r,...s}=i(d,u),m=p?`kui-Text ${p}`:"kui-Text";return D?e.createElement(C.Root,{"data-accent-color":r,...s,ref:o,className:m},t):e.createElement(v,{"data-accent-color":r,...s,ref:o,className:m},t)}));b.displayName="Text";export{b as a};
|
|
3
|
+
//# sourceMappingURL=chunk-OTCVSJT7.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/text.tsx", "../../src/components/text.props.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", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { emphasisPropDef } from '../props/emphasis.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...emphasisPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n"],
|
|
5
|
+
"mappings": ";iOAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,WCWrB,IAAMC,EAAK,CAAC,OAAQ,MAAO,QAAS,GAAG,EACjCC,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAEpDC,EAAe,CACnB,GAAI,CAAE,KAAM,OAAQ,OAAQF,EAAI,QAAS,MAAO,EAChD,GAAGG,EACH,KAAM,CACJ,KAAM,OACN,UAAW,aACX,OAAQF,EACR,WAAY,EACd,EACA,GAAGG,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,CACL,EDZA,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", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "emphasisPropDef", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "textPropDefs", "combinedClassName", "Slot"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-YLDV2HKZ.js";import{a}from"./chunk-E23RKOQJ.js";import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-YLDV2HKZ.js";import{a}from"./chunk-E23RKOQJ.js";import{a as p}from"./chunk-PBFSBHBS.js";var c=r.m.values,y=new Set(c),P=["m","mx","my","mt","mr","mb","ml"],l=P.map(e=>({key:e,className:r[e].className,customProperties:[...r[e].customProperties]}));function R(e){let s,t;for(let o=0;o<l.length;o++){let{key:u,className:g,customProperties:f}=l[o],n=e[u];if(n===void 0)continue;let[i,m]=p({className:g,customProperties:f,propValues:c,propValueSet:y,value:n});i&&(s??(s=[])).push(i),m&&(t=a(t,m))}return[s!==void 0?s.join(" "):"",t]}export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-P6UX6FFY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as c}from"./chunk-WRWNN2NW.js";import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as c}from"./chunk-WRWNN2NW.js";import{a as m}from"./chunk-RZCX6IBE.js";import{a as l}from"./chunk-QM3RCK5P.js";function g(i,n,e){return n!==void 0?n.has(e):i.includes(e)}function h({className:i,customProperties:n,...e}){let f=y({allowArbitraryValues:!0,className:i,...e}),r=v({customProperties:n,...e});return[f,r]}function y({allowArbitraryValues:i,value:n,className:e,propValues:f,propValueSet:r,parseValue:s=o=>o}){if(n){if(typeof n=="string")return g(f,r,n)?R(e,n,s):i?e:void 0;if(m(n)){let o=n,t=[];for(let p in o){if(!l(o,p)||!c.has(p))continue;let d=o[p];if(d!==void 0){if(g(f,r,d)){let u=R(e,d,s),a=p==="initial"?u:`${p}:${u}`;t.push(a)}else if(i){let u=p==="initial"?e:`${p}:${e}`;t.push(u)}}}return t.length>0?t.join(" "):""}if(i)return e}}function R(i,n,e){let f=i?"-":"",r=e(n),s=r?.startsWith("-"),o=s?"-":"",t=s?r?.substring(1):r;return`${o}${i}${f}${t}`}function v({customProperties:i,value:n,propValues:e,propValueSet:f,parseValue:r=s=>s}){if(!n||typeof n=="string"&&g(e,f,n))return;let s;if(typeof n=="string"){let o=r(n);s={};for(let t of i)s[t]=o;return s}if(m(n)){let o=n;for(let t in o){if(!l(o,t)||!c.has(t))continue;let p=o[t];if(p===void 0||g(e,f,p))continue;let d=r(p);s??(s={});for(let u of i){let a=t==="initial"?u:`${u}-${t}`;s[a]=d}}}return s??{}}export{h as a,y as b,v as c};
|
|
2
|
+
//# sourceMappingURL=chunk-PBFSBHBS.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as r}from"./chunk-VS2ZWRGO.js";import{a as s}from"./chunk-SBRPXQWH.js";import{a as t}from"./chunk-SJXV4BWZ.js";import{a as p}from"./chunk-N6KH2EOU.js";import{e}from"./chunk-CUNKWFKA.js";import{a as o}from"./chunk-NZJGC6ZW.js";var i=["1","2","3","4","5","6","7","8","9"],a=["solid","soft","outline","ghost"],P={...o,size:{type:"enum",className:"kui-r-size",values:i,responsive:!0},variant:{type:"enum",className:"kui-variant",values:a,default:"soft"},...p,...e,...r,...t,...s};export{P as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PEMFIU3B.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/code.props.tsx"],
|
|
4
4
|
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { grayAccentColorPropDef } from '../props/color.prop.js';\nimport { emphasisPropDef } from '../props/emphasis.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst variants = ['solid', 'soft', 'outline', 'ghost'] as const;\n\nconst codePropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'soft' },\n ...weightPropDef,\n ...grayAccentColorPropDef,\n ...emphasisPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { codePropDefs };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "2OASA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EACpDC,EAAW,CAAC,QAAS,OAAQ,UAAW,OAAO,EAE/CC,EAAe,CACnB,GAAGC,EACH,KAAM,CACJ,KAAM,OACN,UAAW,aACX,OAAQH,EACR,WAAY,EACd,EACA,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQC,EAAU,QAAS,MAAO,EACrF,GAAGG,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,CACL",
|
|
6
6
|
"names": ["sizes", "variants", "codePropDefs", "asChildPropDef", "weightPropDef", "grayAccentColorPropDef", "emphasisPropDef", "truncatePropDef", "textWrapPropDef"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as Ve,b as _e}from"./chunk-4G3FJUER.js";import{a as Ue}from"./chunk-ZG2XQUOH.js";import{a as De}from"./chunk-VPUFKJQA.js";import{a as Fe}from"./chunk-C2WKAIZM.js";import{b as ve}from"./chunk-5ON3XLRD.js";import{c as se,d as ie,e as ce,h as ze,i as Me,j as Te}from"./chunk-3ZWHKNHI.js";import{a as be}from"./chunk-KQIZMPSW.js";import{a as Be}from"./chunk-TTW3EAQT.js";import{a as ue,b as pe,c as fe}from"./chunk-LTUW36HM.js";import{a as ke,b as He,c as we}from"./chunk-QKCNGEX4.js";import{a as j,b as Ie,c as Ne,d as Oe,g as Ae}from"./chunk-XUCR7L4G.js";import{a as Se}from"./chunk-G66WDIIV.js";import{e as le,f as ge,h as Ce,i as te,j as ye,k as ae,l as re,n as Ee,o as ne}from"./chunk-GHWEXMF6.js";import{a as xe,b as de}from"./chunk-3QWGSRYC.js";import{a as Le}from"./chunk-WEBNIUEX.js";import{a as Qe}from"./chunk-VQPANPMI.js";var lt={};Qe(lt,{Bottom:()=>Be,Content:()=>Xe,Header:()=>je,Inspector:()=>De,Left:()=>qe,PaneFooter:()=>Me,PaneHeader:()=>ze,Panel:()=>Re,Rail:()=>Ge,Root:()=>$e,Scroll:()=>Te,Sidebar:()=>Fe,Trigger:()=>Je,useResponsivePresentation:()=>Ue,useShell:()=>_e,useSidebarMode:()=>Ve});import*as e from"react";import V from"classnames";import{Slot as Ye}from"radix-ui";import{useComposedRefs as he}from"radix-ui/internal";var me=0;function We(a){me=Math.max(0,me+a);let r=document.documentElement;me>0?r.setAttribute("data-kui-shell-lock",""):r.removeAttribute("data-kui-shell-lock")}var Pe="data-kui-shell-inert",Ze=30;function q(a,r){return r===null||r===a||r===a.body||r===a.documentElement}function Ke(a,r,i){for(let u of a.querySelectorAll("[data-shell-trigger][aria-controls]"))if(!(u.getAttribute("aria-controls")!==r||u.closest("[inert]"))&&!(i&&!i.some(P=>P.contains(u))))return u;return null}var et={values:["1","2","3"]},$e=e.forwardRef(({className:a,children:r,height:i="full",size:u,style:P,onKeyDown:A,onFocus:H,...C},y)=>{let b=ve(u,et),[s]=e.useState(ge),R=e.useCallback(t=>Ce(s,t),[s]);e.useSyncExternalStore(R,()=>s.version,()=>0);let f=e.useRef(null),E=he(y,f),[z,S]=e.useState(()=>new Set),M=e.useCallback(t=>{S(n=>n.has(t)?n:new Set(n).add(t))},[]),T=e.useCallback(t=>{S(n=>{if(!n.has(t))return n;let o=new Set(n);return o.delete(t),o})},[]),m=e.useMemo(()=>({registerInset:M,unregisterInset:T}),[M,T]),c=e.useCallback(()=>{for(let t of s.entries.values())t.overlayLive&&t.setValue("closed","dismiss")},[s]),w=e.useCallback(()=>[...s.entries.values()].filter(t=>t.overlayLive&&t.el).map(t=>({name:t.name,id:t.id,el:t.el})),[s]),v=[...s.entries.values()].filter(t=>t.overlayLive&&t.el).length,_=i!=="full"&&i!=="auto",I=e.useCallback(()=>{let t=f.current;if(!t)return;let n=w().map(o=>o.el);for(let o of t.children){if(!(o instanceof HTMLElement)||o.classList.contains("kui-ShellScrim"))continue;let d=n.some(x=>o===x||o.contains(x));n.length===0||d?o.hasAttribute(Pe)&&(o.removeAttribute(Pe),o.inert=!1):o.inert||(o.setAttribute(Pe,""),o.inert=!0)}},[w]),U=e.useRef(null),G=e.useRef([]),X=e.useRef(null),B=e.useRef(!1),L=e.useRef(0),N=e.useCallback(()=>{L.current&&cancelAnimationFrame(L.current),L.current=0},[]),J=e.useCallback((t,n)=>{N();let o=0,d=()=>{if(L.current=0,!!t.isConnected){if(n(t.ownerDocument.activeElement)){t.focus({preventScroll:!0});return}o+=1,o<Ze&&(L.current=requestAnimationFrame(d))}};L.current=requestAnimationFrame(d)},[N]);e.useEffect(()=>()=>{N(),B.current&&(B.current=!1,We(-1))},[N]),e.useEffect(()=>{let t=f.current;if(!t)return;let n=t.ownerDocument,o=w(),d=o.map(l=>l.el),x=!_&&o.length>0;x!==B.current&&(B.current=x,We(x?1:-1));let F=G.current;G.current=o;let k=F.filter(l=>{if(d.includes(l.el))return!1;let p=s.entries.get(l.name);return!l.el.isConnected||!p||p.el!==l.el||p.value==="closed"}),K=l=>l!==null&&k.some(p=>p.el.contains(l));if(F.length===0&&o.length>0){let l=n.activeElement,p=l instanceof HTMLElement&&!q(n,l)&&!d.some(h=>h.contains(l))?l:null;if(p&&!t.contains(p)){let h=X.current;h&&h.isConnected&&!d.some(ee=>ee.contains(h))&&(p=h)}U.current=p}if(I(),o.length===0){let l=U.current;if(U.current=null,k.length===0)return;let h=(g=>g!==null&&g.isConnected&&!g.closest("[inert]")&&!K(g))(l)?l:null;for(let g of k)h??(h=Ke(n,g.id));if(!h)return;let ee=g=>q(n,g)||K(g);ee(n.activeElement)?h.focus({preventScroll:!0}):J(h,ee);return}if(k.length>0){let l=n.activeElement;if(q(n,l)||K(l)){let p=null;for(let h of k)p??(p=Ke(n,h.id,d));(p??d[d.length-1]).focus({preventScroll:!0})}}let $=d.filter(l=>!F.some(p=>p.el===l)),Z=n.activeElement;$.length>0&&!d.some(l=>l.contains(Z))&&($[0].focus({preventScroll:!0}),J($[0],l=>q(n,l)||l instanceof Element&&l.closest("[inert]")!==null))}),e.useEffect(()=>{let t=f.current;if(!t||v===0||typeof MutationObserver>"u")return;let n=new MutationObserver(I);return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["inert"]}),()=>n.disconnect()},[v,I]);let W=t=>{A?.(t),!(t.key!=="Escape"||t.defaultPrevented||v===0)&&(c(),t.stopPropagation())};e.useEffect(()=>{let t=f.current;if(!t||v===0)return;let n=t.ownerDocument,o=d=>{d.key!=="Escape"||d.defaultPrevented||!q(n,d.target)||c()};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[v,c]);let Q=t=>{H?.(t),t.target instanceof HTMLElement&&f.current?.contains(t.target)&&(X.current=t.target)},O=s.entries.get("rail"),D=O!==void 0&&O.value!==void 0&&O.value!=="closed"?z.has("rail")?`calc(${O.size}px + 2 * var(--shell-inset-gap))`:`${O.size}px`:void 0,oe=i==="full"?{}:i==="auto"?{height:"auto"}:typeof i=="number"?{height:`${i}px`}:{height:i};return e.createElement(ye.Provider,{value:s},e.createElement(se.Provider,{value:b},e.createElement(ie.Provider,{value:!1},e.createElement(Ee.Provider,{value:m},e.createElement(be.Provider,{value:void 0},e.createElement("div",{...C,ref:E,className:V("kui-ShellRoot",a),"data-height":i==="auto"?"auto":void 0,"data-has-inset":z.size>0||void 0,"data-overlay-live":v>0||void 0,onKeyDown:W,onFocus:Q,style:{...oe,...D?{"--shell-rail-offset":D}:{},...P}},r,e.createElement("div",{className:"kui-ShellScrim","aria-hidden":!0,onClick:c})))))))});$e.displayName="Shell.Root";var je=e.forwardRef(({className:a,height:r=64,style:i,...u},P)=>e.createElement("header",{...u,ref:P,className:V("kui-ShellHeader",a),style:{...i,"--shell-header-height":`${r}px`}}));je.displayName="Shell.Header";var qe=e.forwardRef(({children:a},r)=>(e.useEffect(()=>{},[]),e.createElement(e.Fragment,null,a)));qe.displayName="Shell.Left";var tt={controlled:"open",default:"defaultOpen"},Ge=e.forwardRef((a,r)=>{let{className:i,presentation:u,expandedSize:P=64,collapsible:A,onExpand:H,onCollapse:C,children:y,style:b,open:s,defaultOpen:R,onOpenChange:f,inset:E,id:z,...S}=a,{table:M,attributes:T}=fe(u,"fixed"),m=ue({name:"rail",label:"Rail",propNames:tt,id:z,controlled:j(s),defaultValue:j(R),presentationTable:M,builtIn:Ie,onChange:(w,v)=>f?.(w!=="closed",{reason:v}),onExpand:H,onCollapse:C,size:P});ne("rail",E);let c=he(r,m.setElement);return e.createElement("div",{...S,role:S.role??"navigation",id:m.id,ref:c,className:V("kui-ShellPane","kui-ShellRail",i),...pe(m,T),"data-inset":E||void 0,tabIndex:m.overlaying?-1:S.tabIndex,style:{...b,"--rail-size":`${P}px`}},e.createElement(nt,null,y))});Ge.displayName="Shell.Rail";function nt({children:a}){let r=e.useContext(se);return e.createElement("div",{className:V("kui-ShellRailContent",`kui-r-size-${r}`)},e.createElement(ce,{presentation:"thin"},a))}var ot={controlled:"open",default:"defaultOpen"},Re=e.forwardRef((a,r)=>{let{className:i,presentation:u,defaultOpen:P,open:A,onOpenChange:H,size:C,defaultSize:y,expandedSize:b=288,minSize:s=100,maxSize:R=800,resizable:f=!1,collapsible:E=!0,onExpand:z,onCollapse:S,onResize:M,onResizeStart:T,onResizeEnd:m,snapPoints:c,snapTolerance:w,collapseThreshold:v,paneId:_,persistence:I,children:U,style:G,onSizeChange:X,sizeUpdate:B,sizeUpdateMs:L=50,inset:N,id:J,...W}=a,Q=ae("Shell.Panel"),O=re(Q,"rail"),Y=fe(u,"fixed"),D=u===void 0,oe=D?O?.presentationTable??le:Y.table,t=D?{"data-presentation-follows":""}:Y.attributes,n=ue({name:"panel",label:"Panel",propNames:ot,id:J,controlled:j(A),defaultValue:j(P),presentationTable:oe,builtIn:Ne,onChange:(Z,l)=>H?.(Z!=="closed",{reason:l}),onExpand:z,onCollapse:S,size:b});ne("panel",N),e.useEffect(()=>{(c!==void 0||v!==void 0||_!==void 0||I!==void 0)&&void 0},[c,v,_,I]);let o=e.useRef(null),d=he(r,n.setElement,o),x=He({name:"panel",elementId:n.id,elementRef:o,cssVarName:"--panel-size",orientation:"vertical",edge:"end",growth:Oe,expandedSize:b,minSize:s,maxSize:R,resizable:f,collapsible:E,size:C,defaultSize:y,onSizeChange:X,sizeUpdate:B,sizeUpdateMs:L,onResize:M,onResizeStart:T,onResizeEnd:m,snapPoints:c,snapTolerance:w,collapseThreshold:v,paneId:_,persistence:I,overlaying:n.overlaying,overlayingNow:()=>(D?Q.entries.get("rail")?.presentationTable??le:Y.table)[Se()]==="overlay",requestCollapse:()=>n.setValue("closed","toggle"),requestToggle:()=>n.toggle("toggle")}),F=ke(C,y,s,R),{handles:k,content:K}=we(U,de),$=f&&n.shown!==!1&&!n.overlaying?e.createElement(Le.Provider,{value:x},k.length>0?k:e.createElement(xe,null)):null;return e.createElement("div",{...Ae(W),role:W.role??"navigation",id:n.id,ref:d,className:V("kui-ShellPane","kui-ShellPanel",i),...pe(n,t),"data-inset":N||void 0,tabIndex:n.overlaying?-1:W.tabIndex,style:{...G,"--panel-expanded-size":`${b}px`,...F?{"--panel-size":F}:{}}},e.createElement("div",{className:"kui-ShellPanelContent"},e.createElement(ce,null,K)),$)});Re.displayName="Shell.Panel";Re.Handle=de;var Xe=e.forwardRef(({className:a,inset:r,children:i,...u},P)=>(ne("content",r),e.createElement("main",{...u,ref:P,className:V("kui-ShellContent",a),"data-inset":r||void 0},e.createElement(ie.Provider,{value:!0},i))));Xe.displayName="Shell.Content";var Je=e.forwardRef(({target:a,action:r="toggle",peekOnHover:i,asChild:u=!1,onClick:P,onMouseEnter:A,onMouseLeave:H,children:C,...y},b)=>{let s=ae("Shell.Trigger");e.useEffect(()=>{a==="left"&&void 0,i&&void 0},[a,i]);let R=a==="left"?"rail":a,f=re(s,R),E=f?.value===void 0?void 0:f.value!=="closed",z=m=>{if(P?.(m),m.defaultPrevented)return;let c=s.entries.get(R);c&&(s.peek===R&&te(s,null),r==="toggle"?c.toggle("toggle"):r==="expand"?c.setValue("open","toggle"):c.setValue("closed","toggle"))},S=m=>{if(A?.(m),!i)return;let c=s.entries.get(R);c&&c.value==="closed"&&c.presentation!=="overlay"&&te(s,R)},M=m=>{H?.(m),i&&s.peek===R&&te(s,null)},T=u?Ye.Root:"button";return e.createElement(T,{...!u&&{type:"button"},"aria-controls":f?.id,"aria-expanded":E,...y,ref:b,onClick:z,onMouseEnter:S,onMouseLeave:M,"data-shell-trigger":a,"data-shell-action":r},C)});Je.displayName="Shell.Trigger";export{$e as a,je as b,qe as c,Ge as d,Re as e,Xe as f,Je as g,lt as h};
|
|
3
|
+
//# sourceMappingURL=chunk-POP5NB33.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/shell.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * Shell: the app frame.\n *\n * Since 0.8.0 the Shell is built on kookie-ui-v2's model, behind v1's API:\n *\n * - The Root is a CSS grid and renders its children as given, in JSX order.\n * Each pane claims its own grid area, so the Root never scans or reorders\n * children, any child renders, and a pane mounted after the Root works.\n * - State lives on each pane: `auto` (untouched), `open` or `closed`. An\n * untouched pane follows the window, resolved by the\n * stylesheet, so first paint needs no script and no open-state callback\n * fires on mount or on a resize.\n * - A pane is one element at every width. `overlay` is a posture of that\n * element, not a Sheet swapped in: crossing a breakpoint keeps its scroll\n * position, its focus and its children's state.\n * - The Root owns what an overlay needs: one scrim, `inert` on everything\n * else, focus moved in and returned, Escape, and a scroll lock.\n * - Nothing links panes to each other. A Rail closing no longer closes the\n * Panel; an app that wants that writes it in `onOpenChange`.\n */\n'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { PaneResizeContext } from './_internal/shell-resize.js';\nimport { PaneHandle, PanelHandle } from './_internal/shell-handles.js';\nimport { Sidebar } from './_internal/shell-sidebar.js';\nimport type { SidebarPublicProps } from './_internal/shell-sidebar.js';\nimport { Bottom } from './_internal/shell-bottom.js';\nimport type { BottomPublicProps } from './_internal/shell-bottom.js';\nimport { Inspector } from './_internal/shell-inspector.js';\nimport type { InspectorPublicProps } from './_internal/shell-inspector.js';\nimport { usePane, paneAttributes, usePresentationTable } from './_internal/shell-pane.js';\nimport { splitHandles, useInitialPaneSize, useResizablePane } from './_internal/shell-resizable.js';\nimport {\n FIXED_TABLE,\n ShellInsetContext,\n ShellStoreContext,\n createShellStore,\n setShellPeek,\n subscribeShellStore,\n useInsetRegistration,\n usePaneEntry,\n useShellStore,\n warnOnce,\n type InsetPaneId,\n} from './_internal/shell-store.js';\nimport { navigationRest, detailRest, toPaneValue, startAnchoredGrowth, withoutRemovedPaneProps } from './_internal/shell-rest.js';\nimport { useShell, useSidebarMode } from './shell.context.js';\nimport { useResponsivePresentation } from './shell.hooks.js';\nimport { readBreakpoint } from '../hooks/use-breakpoint.js';\nimport { useThemeSize } from '../hooks/theme-size.js';\nimport { PaneChromeScope, PaneFooter, PaneHeader, Scroll, ShellContentContext, ShellSizeContext } from './_internal/pane-chrome.js';\nimport type { PaneSize, PaneHeaderProps, PaneFooterProps, ScrollProps } from './_internal/pane-chrome.js';\nimport { PaneBandSizeContext } from './_internal/pane-band-context.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps, PaneMode, PaneName, PaneTarget, ResponsivePresentation, SidebarMode } from './shell.types.js';\n\n/* \u2500\u2500 Root \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport interface ShellRootProps extends React.ComponentPropsWithoutRef<'div'> {\n children: React.ReactNode;\n height?: 'full' | 'auto' | string | number;\n /** The index the panes' chrome takes: `Shell.PaneHeader`, `Shell.Scroll`, `Shell.PaneFooter` and the Sidebar rows in them. Defaults to the nearest Theme's size (3 when the Theme is 4), else `2`. */\n size?: PaneSize;\n}\n\n/**\n * Every Shell with a live overlay holds the page still, counted across Shells,\n * through an attribute the stylesheet reads. Saving and restoring the\n * document's inline `overflow` would fight any other scroll lock on the page.\n */\nlet pageLockHolders = 0;\nfunction updatePageLock(delta: 1 | -1) {\n pageLockHolders = Math.max(0, pageLockHolders + delta);\n const doc = document.documentElement;\n if (pageLockHolders > 0) doc.setAttribute('data-kui-shell-lock', '');\n else doc.removeAttribute('data-kui-shell-lock');\n}\n\n/** Marks a child the Root made inert, so closing removes only what the Root added. */\nconst INERT_MARK = 'data-kui-shell-inert';\n\n/** How many frames a focus rescue watches after an overlay opens or closes. */\nconst RESCUE_FRAMES = 30;\n\n/** Focus that is nowhere useful: the document, or nothing at all. */\nfunction isNowhere(doc: Document, el: Element | EventTarget | null): boolean {\n return el === null || el === doc || el === doc.body || el === doc.documentElement;\n}\n\n/** A Trigger that drives the pane with this id and can take focus, optionally only inside `within`. */\nfunction triggerFor(doc: Document, id: string, within?: HTMLElement[]): HTMLElement | null {\n for (const el of doc.querySelectorAll<HTMLElement>('[data-shell-trigger][aria-controls]')) {\n if (el.getAttribute('aria-controls') !== id || el.closest('[inert]')) continue;\n if (within && !within.some((pane) => pane.contains(el))) continue;\n return el;\n }\n return null;\n}\n\ntype LivePane = { name: PaneName; id: string; el: HTMLElement };\n\n/** Shell.Root's own range; a Theme size above it maps to 3. */\nconst shellSizePropDef = { values: ['1', '2', '3'] as const };\n\nconst Root = React.forwardRef<HTMLDivElement, ShellRootProps>(({ className, children, height = 'full', size: sizeProp, style, onKeyDown, onFocus, ...props }, ref) => {\n // No size of its own: the nearest Theme's, mapped into 1-3.\n const size = useThemeSize(sizeProp, shellSizePropDef);\n const [store] = React.useState(createShellStore);\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n // Subscribed for the re-render, not for a value: a pane opening or closing\n // must bring the Root back so containment and the scrim follow it.\n React.useSyncExternalStore(\n subscribe,\n () => store.version,\n () => 0,\n );\n\n const rootRef = React.useRef<HTMLDivElement | null>(null);\n const composedRef = useComposedRefs(ref, rootRef);\n\n // Inset: the Root paints the backdrop while any pane is inset.\n const [insetPanes, setInsetPanes] = React.useState<ReadonlySet<InsetPaneId>>(() => new Set());\n const registerInset = React.useCallback((id: InsetPaneId) => {\n setInsetPanes((prev) => (prev.has(id) ? prev : new Set(prev).add(id)));\n }, []);\n const unregisterInset = React.useCallback((id: InsetPaneId) => {\n setInsetPanes((prev) => {\n if (!prev.has(id)) return prev;\n const next = new Set(prev);\n next.delete(id);\n return next;\n });\n }, []);\n const insetContext = React.useMemo(() => ({ registerInset, unregisterInset }), [registerInset, unregisterInset]);\n\n const closeOverlays = React.useCallback(() => {\n for (const entry of store.entries.values()) {\n if (entry.overlayLive) entry.setValue('closed', 'dismiss');\n }\n }, [store]);\n\n const livePanes = React.useCallback(\n (): LivePane[] => [...store.entries.values()].filter((entry) => entry.overlayLive && entry.el).map((entry) => ({ name: entry.name, id: entry.id, el: entry.el as HTMLElement })),\n [store],\n );\n const liveCount = [...store.entries.values()].filter((entry) => entry.overlayLive && entry.el).length;\n\n // A Shell given a height of its own sits inside a page, and its overlays\n // cover only its box: it holds no page lock. `full` is the page, and\n // `auto` grows with its content, so its overlays are placed on the window.\n const contained = height !== 'full' && height !== 'auto';\n\n /*\n * Containment is the Root's, not the pane's. Only the Root can see every live\n * overlay and every child at once. A per-pane effect, given two overlays,\n * inerts the other live overlay and restores values the other effect wrote,\n * which can leave the whole frame inert for good.\n *\n * Exempt are the scrim and each root child that CONTAINS a live overlay, so\n * a pane wrapped in a plain element is not inerted with its wrapper. A child\n * the Root inerts is marked, and closing clears only marked children, so\n * `inert` the app sets on a child is the app's before, during and after.\n */\n const contain = React.useCallback(() => {\n const rootEl = rootRef.current;\n if (!rootEl) return;\n const liveEls = livePanes().map((pane) => pane.el);\n for (const child of rootEl.children) {\n if (!(child instanceof HTMLElement) || child.classList.contains('kui-ShellScrim')) continue;\n const holdsLive = liveEls.some((el) => child === el || child.contains(el));\n if (liveEls.length === 0 || holdsLive) {\n if (child.hasAttribute(INERT_MARK)) {\n child.removeAttribute(INERT_MARK);\n child.inert = false;\n }\n } else if (!child.inert) {\n child.setAttribute(INERT_MARK, '');\n child.inert = true;\n }\n }\n }, [livePanes]);\n\n const returnFocusTo = React.useRef<HTMLElement | null>(null);\n const lastLive = React.useRef<LivePane[]>([]);\n const lastFocusInRoot = React.useRef<HTMLElement | null>(null);\n const holdsLock = React.useRef(false);\n\n /*\n * Focus can be taken away after the commit that moved it: a menu that\n * opened or closed a pane restores focus to its own trigger when it\n * finishes closing, which may be inert or hidden by then. For a few frames\n * after an overlay opens or closes, focus that ends up nowhere useful is\n * put back where it belongs.\n */\n const rescueFrame = React.useRef(0);\n const cancelRescue = React.useCallback(() => {\n if (rescueFrame.current) cancelAnimationFrame(rescueFrame.current);\n rescueFrame.current = 0;\n }, []);\n const rescueFocus = React.useCallback(\n (target: HTMLElement, lost: (active: Element | null) => boolean) => {\n cancelRescue();\n let frames = 0;\n const tick = () => {\n rescueFrame.current = 0;\n if (!target.isConnected) return;\n if (lost(target.ownerDocument.activeElement)) {\n target.focus({ preventScroll: true });\n return;\n }\n frames += 1;\n if (frames < RESCUE_FRAMES) rescueFrame.current = requestAnimationFrame(tick);\n };\n rescueFrame.current = requestAnimationFrame(tick);\n },\n [cancelRescue],\n );\n\n React.useEffect(\n () => () => {\n cancelRescue();\n if (holdsLock.current) {\n holdsLock.current = false;\n updatePageLock(-1);\n }\n },\n [cancelRescue],\n );\n\n // No dependency array, on purpose: a pane opening or closing is a render\n // of this component, and so is a child appearing through the Root.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl) return;\n const doc = rootEl.ownerDocument;\n const live = livePanes();\n const liveEls = live.map((pane) => pane.el);\n\n const wantsLock = !contained && live.length > 0;\n if (wantsLock !== holdsLock.current) {\n holdsLock.current = wantsLock;\n updatePageLock(wantsLock ? 1 : -1);\n }\n\n const previous = lastLive.current;\n lastLive.current = live;\n // A pane that left the live set because it closed, as opposed to one\n // that is still open but stopped being an overlay at a breakpoint.\n const closed = previous.filter((pane) => {\n if (liveEls.includes(pane.el)) return false;\n const entry = store.entries.get(pane.name);\n return !pane.el.isConnected || !entry || entry.el !== pane.el || entry.value === 'closed';\n });\n const inClosed = (active: Element | null) => active !== null && closed.some((pane) => pane.el.contains(active));\n\n // The return target is taken on the opening edge, before inerting: inerting\n // the subtree that holds the trigger blurs it. Focus already inside the\n // overlay (a pane that became one at a breakpoint) is no place to return\n // to, and an opener in a portal (a menu item) goes away with its menu, so\n // the last place focus held inside the frame stands in for it.\n if (previous.length === 0 && live.length > 0) {\n const active = doc.activeElement;\n let target = active instanceof HTMLElement && !isNowhere(doc, active) && !liveEls.some((el) => el.contains(active)) ? active : null;\n if (target && !rootEl.contains(target)) {\n const inRoot = lastFocusInRoot.current;\n if (inRoot && inRoot.isConnected && !liveEls.some((el) => el.contains(inRoot))) target = inRoot;\n }\n returnFocusTo.current = target;\n }\n\n contain();\n\n if (live.length === 0) {\n const before = returnFocusTo.current;\n returnFocusTo.current = null;\n // Every overlay that left only stopped being one: focus stays where it is.\n if (closed.length === 0) return;\n const usable = (el: HTMLElement | null) => el !== null && el.isConnected && !el.closest('[inert]') && !inClosed(el);\n let target = usable(before) ? before : null;\n for (const pane of closed) target ??= triggerFor(doc, pane.id);\n if (!target) return;\n const lost = (active: Element | null) => isNowhere(doc, active) || inClosed(active);\n if (lost(doc.activeElement)) target.focus({ preventScroll: true });\n else rescueFocus(target, lost);\n return;\n }\n\n // Some overlays closed while others stay: focus left in a closed one goes\n // to the Trigger that opened it, if a live pane holds it, or to the pane\n // on top.\n if (closed.length > 0) {\n const active = doc.activeElement;\n if (isNowhere(doc, active) || inClosed(active)) {\n let target: HTMLElement | null = null;\n for (const pane of closed) target ??= triggerFor(doc, pane.id, liveEls);\n (target ?? liveEls[liveEls.length - 1]).focus({ preventScroll: true });\n }\n }\n\n // Focus moves in on the opening edge and nowhere else, and only when it\n // is not already somewhere the user put it inside the live set.\n const opened = liveEls.filter((el) => !previous.some((pane) => pane.el === el));\n const active = doc.activeElement;\n if (opened.length > 0 && !liveEls.some((el) => el.contains(active))) {\n opened[0].focus({ preventScroll: true });\n rescueFocus(opened[0], (now) => isNowhere(doc, now) || (now instanceof Element && now.closest('[inert]') !== null));\n }\n });\n\n // A child that appears through its own state while an overlay is live does\n // not render the Root, so the Root watches its children while one is.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl || liveCount === 0 || typeof MutationObserver === 'undefined') return;\n const observer = new MutationObserver(contain);\n observer.observe(rootEl, { childList: true, subtree: true, attributes: true, attributeFilter: ['inert'] });\n return () => observer.disconnect();\n }, [liveCount, contain]);\n\n /*\n * Escape closes the overlays. It is handled as a React event on the Root, so\n * a component inside a pane that answers Escape in its own onKeyDown runs\n * first, and its preventDefault() or stopPropagation() keeps the pane open.\n * When the Root closes something it stops the event there, so a React\n * Escape handler above the Shell does not act on it too. A layer that\n * listens on the document in the capture phase (Radix dialogs, menus and\n * popovers) answers first and calls preventDefault() when it closes, so an\n * enclosing Kookie Dialog closes before a Shell inside it is asked.\n */\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (event.key !== 'Escape' || event.defaultPrevented || liveCount === 0) return;\n closeOverlays();\n event.stopPropagation();\n };\n\n // With focus on the document itself (a pane closed under it, or a menu that\n // closed and took focus with it), the Root never sees the key. While an\n // overlay is live the document answers that one case.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl || liveCount === 0) return;\n const doc = rootEl.ownerDocument;\n const onDocumentKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || event.defaultPrevented || !isNowhere(doc, event.target)) return;\n closeOverlays();\n };\n doc.addEventListener('keydown', onDocumentKeyDown);\n return () => doc.removeEventListener('keydown', onDocumentKeyDown);\n }, [liveCount, closeOverlays]);\n\n const handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\n onFocus?.(event);\n if (event.target instanceof HTMLElement && rootRef.current?.contains(event.target)) lastFocusInRoot.current = event.target;\n };\n\n // A floating Panel sits beside the Rail when the Rail is showing, and\n // beside its card when the Rail is inset.\n const rail = store.entries.get('rail');\n const railShown = rail !== undefined && rail.value !== undefined && rail.value !== 'closed';\n const railOffset = railShown ? (insetPanes.has('rail') ? `calc(${rail.size}px + 2 * var(--shell-inset-gap))` : `${rail.size}px`) : undefined;\n\n // `full` writes no inline height: the stylesheet states it as 100vh with a\n // 100dvh override where supported, and an inline value would beat both.\n const heightStyle: React.CSSProperties = height === 'full' ? {} : height === 'auto' ? { height: 'auto' } : typeof height === 'number' ? { height: `${height}px` } : { height };\n\n return (\n <ShellStoreContext.Provider value={store}>\n <ShellSizeContext.Provider value={size}>\n <ShellContentContext.Provider value={false}>\n <ShellInsetContext.Provider value={insetContext}>\n {/* A Shell inside a portalled surface's Theme starts with no band, like any other. */}\n <PaneBandSizeContext.Provider value={undefined}>\n {/* The Root is not a widget: it hears Escape bubbling up from the panes,\n after their own handlers, to close the overlays. */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n {...props}\n ref={composedRef}\n className={classNames('kui-ShellRoot', className)}\n data-height={height === 'auto' ? 'auto' : undefined}\n data-has-inset={insetPanes.size > 0 || undefined}\n data-overlay-live={liveCount > 0 || undefined}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n style={{ ...heightStyle, ...(railOffset ? ({ '--shell-rail-offset': railOffset } as CSSPropertiesWithVars) : {}), ...style }}\n >\n {children}\n {/* Root-owned and always mounted. The stylesheet shows it while an\n overlay is live; containment takes the rest of the frame out of\n the accessibility tree, so the scrim itself is hidden from it. */}\n <div className=\"kui-ShellScrim\" aria-hidden onClick={closeOverlays} />\n </div>\n </PaneBandSizeContext.Provider>\n </ShellInsetContext.Provider>\n </ShellContentContext.Provider>\n </ShellSizeContext.Provider>\n </ShellStoreContext.Provider>\n );\n});\nRoot.displayName = 'Shell.Root';\n\n/* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface ShellHeaderProps extends React.ComponentPropsWithoutRef<'header'> {\n height?: number;\n}\n\nconst Header = React.forwardRef<HTMLElement, ShellHeaderProps>(({ className, height = 64, style, ...props }, ref) => (\n <header\n {...props}\n ref={ref}\n className={classNames('kui-ShellHeader', className)}\n style={\n {\n ...style,\n '--shell-header-height': `${height}px`,\n } as CSSPropertiesWithVars\n }\n />\n));\nHeader.displayName = 'Shell.Header';\n\n/* \u2500\u2500 Left (deprecated) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface LeftProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean, meta: { reason: 'init' | 'toggle' | 'panel' | 'responsive' | 'dismiss' }) => void;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n inset?: boolean;\n}\n\n/**\n * @deprecated The Root no longer wraps the Rail and Panel in a Left\n * container: each is its own pane. `Shell.Left` renders its children and\n * ignores its own props. Removed in 1.0.\n */\nconst Left = React.forwardRef<HTMLDivElement, LeftProps>(({ children }, _ref) => {\n React.useEffect(() => {\n warnOnce('Shell.Left is deprecated and is removed in 1.0. Render Shell.Rail and Shell.Panel directly in Shell.Root.');\n }, []);\n return <>{children}</>;\n});\nLeft.displayName = 'Shell.Left';\n\n/* \u2500\u2500 Rail \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype RailOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' | 'panel' | 'dismiss' };\n\ntype RailControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: RailOpenChangeMeta) => void; defaultOpen?: never };\ntype RailUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: RailOpenChangeMeta) => void; open?: never };\n\ntype RailProps = React.ComponentPropsWithoutRef<'div'> & {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n collapsible?: boolean;\n /** @deprecated Use `onOpenChange`. */\n onExpand?: () => void;\n /** @deprecated Use `onOpenChange`. */\n onCollapse?: () => void;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n} & (RailControlledProps | RailUncontrolledProps);\n\nconst RAIL_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\nconst Rail = React.forwardRef<HTMLDivElement, RailProps>((props, ref) => {\n const { className, presentation, expandedSize = 64, collapsible: _collapsible, onExpand, onCollapse, children, style, open, defaultOpen, onOpenChange, inset, id, ...domProps } = props;\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'rail',\n label: 'Rail',\n propNames: RAIL_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable: table,\n builtIn: navigationRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('rail', inset);\n const composedRef = useComposedRefs(ref, pane.setElement);\n\n return (\n <div\n {...domProps}\n role={domProps.role ?? 'navigation'}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellRail', className)}\n {...paneAttributes(pane, attributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={{ ...style, '--rail-size': `${expandedSize}px` } as CSSPropertiesWithVars}\n >\n <RailContent>{children}</RailContent>\n </div>\n );\n});\nRail.displayName = 'Shell.Rail';\n\n/** The Rail's content carries the index, so the thin row styles can size themselves by it. */\nfunction RailContent({ children }: { children: React.ReactNode }) {\n const size = React.useContext(ShellSizeContext);\n return (\n <div className={classNames('kui-ShellRailContent', `kui-r-size-${size}`)}>\n <PaneChromeScope presentation=\"thin\">{children}</PaneChromeScope>\n </div>\n );\n}\n\n/* \u2500\u2500 Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype HandleComponent = React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<'div'> & React.RefAttributes<HTMLDivElement>>;\n\ntype PanelOpenChangeMeta = { reason: 'toggle' | 'left' | 'init' | 'responsive' | 'dismiss' };\ntype PanelControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: PanelOpenChangeMeta) => void; defaultOpen?: never };\ntype PanelUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: PanelOpenChangeMeta) => void; open?: never };\n\ntype PanelSizeControlledProps = { size: number | string; defaultSize?: never };\ntype PanelSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\n\ntype PanelSizeChangeMeta = { reason: 'init' | 'resize' | 'controlled' };\ntype PanelPublicProps = PaneBaseProps &\n (PanelControlledProps | PanelUncontrolledProps) &\n (PanelSizeControlledProps | PanelSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: PanelSizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n };\ntype PanelComponent = React.ForwardRefExoticComponent<PanelPublicProps & React.RefAttributes<HTMLDivElement>> & {\n Handle: HandleComponent;\n};\n\nconst PANEL_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\n/**\n * A Panel with a `presentation` of its own uses it. One without follows the\n * Rail rendered before it, which is how 0.7 placed a Panel; the stylesheet\n * reads the Rail's attributes for the first paint and the registry carries\n * the Rail's table for the JS mirror.\n */\nconst Panel = React.forwardRef<HTMLDivElement, PanelPublicProps>((props, ref) => {\n const {\n className,\n presentation,\n defaultOpen,\n open,\n onOpenChange,\n size,\n defaultSize,\n expandedSize = 288,\n minSize = 100,\n maxSize = 800,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n inset,\n id,\n ...domProps\n } = props;\n const store = useShellStore('Shell.Panel');\n const rail = usePaneEntry(store, 'rail');\n const own = usePresentationTable(presentation, 'fixed');\n const followsRail = presentation === undefined;\n const presentationTable = followsRail ? (rail?.presentationTable ?? FIXED_TABLE) : own.table;\n const presentationAttributes = followsRail ? { 'data-presentation-follows': '' } : own.attributes;\n\n const pane = usePane({\n name: 'panel',\n label: 'Panel',\n propNames: PANEL_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable,\n builtIn: detailRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('panel', inset);\n\n React.useEffect(() => {\n if (snapPoints !== undefined || collapseThreshold !== undefined || paneId !== undefined || persistence !== undefined) {\n warnOnce('Shell.Panel: `snapPoints`, `collapseThreshold`, `paneId` and `persistence` are deprecated and are removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');\n }\n }, [snapPoints, collapseThreshold, paneId, persistence]);\n\n const elementRef = React.useRef<HTMLElement | null>(null);\n const composedRef = useComposedRefs(ref, pane.setElement, elementRef);\n\n const resize = useResizablePane({\n name: 'panel',\n elementId: pane.id,\n elementRef,\n cssVarName: '--panel-size',\n orientation: 'vertical',\n edge: 'end',\n growth: startAnchoredGrowth,\n expandedSize,\n minSize,\n maxSize,\n resizable,\n collapsible,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n overlaying: pane.overlaying,\n // Asked when the effect runs: the Rail registers its table after this\n // Panel first renders, so the render's answer can be out of date.\n overlayingNow: () => {\n const table = followsRail ? (store.entries.get('rail')?.presentationTable ?? FIXED_TABLE) : own.table;\n return table[readBreakpoint()] === 'overlay';\n },\n requestCollapse: () => pane.setValue('closed', 'toggle'),\n requestToggle: () => pane.toggle('toggle'),\n });\n\n // The starting size is in the server HTML, so the pane does not jump on hydration.\n const initialSize = useInitialPaneSize(size, defaultSize, minSize, maxSize);\n const { handles, content } = splitHandles(children, PanelHandle);\n const handle = resizable && pane.shown !== false && !pane.overlaying ? <PaneResizeContext.Provider value={resize}>{handles.length > 0 ? handles : <PaneHandle />}</PaneResizeContext.Provider> : null;\n\n return (\n <div\n {...withoutRemovedPaneProps(domProps)}\n role={domProps.role ?? 'navigation'}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellPanel', className)}\n {...paneAttributes(pane, presentationAttributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--panel-expanded-size': `${expandedSize}px`,\n ...(initialSize ? { '--panel-size': initialSize } : {}),\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"kui-ShellPanelContent\">\n <PaneChromeScope>{content}</PaneChromeScope>\n </div>\n {handle}\n </div>\n );\n}) as PanelComponent;\nPanel.displayName = 'Shell.Panel';\nPanel.Handle = PanelHandle;\n\n/* \u2500\u2500 Content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface ShellContentProps extends React.ComponentPropsWithoutRef<'main'> {\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n}\n\n/**\n * The work area. It scrolls as it is; with a `Shell.Scroll` child it becomes a column and the\n * Scroll scrolls instead, so a `Shell.PaneHeader float` beside it stays pinned over the page.\n */\nconst Content = React.forwardRef<HTMLElement, ShellContentProps>(({ className, inset, children, ...props }, ref) => {\n useInsetRegistration('content', inset);\n return (\n <main {...props} ref={ref} className={classNames('kui-ShellContent', className)} data-inset={inset || undefined}>\n <ShellContentContext.Provider value={true}>{children}</ShellContentContext.Provider>\n </main>\n );\n});\nContent.displayName = 'Shell.Content';\n\n/* \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype TriggerAction = 'toggle' | 'expand' | 'collapse';\n\ninterface TriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n target: PaneTarget;\n action?: TriggerAction;\n /**\n * Renders the single child in place of the trigger's own button, with the trigger's click,\n * `aria-controls`, `aria-expanded` and data attributes merged onto it. Use it to make a\n * `Button` the trigger: `<Shell.Trigger asChild><Button iconOnly aria-label=\"Toggle sidebar\">\u2026</Button></Shell.Trigger>`.\n */\n asChild?: boolean;\n /**\n * Whether to show a preview of the target pane on hover while it is closed\n * and not an overlay. Defaults to false.\n *\n * @deprecated Removed in 1.0. A preview reachable only by mouse hover has no\n * keyboard or touch equivalent; open the pane instead.\n */\n peekOnHover?: boolean;\n}\n\n/**\n * A button that drives a pane by name, through the registry. It sets\n * `aria-controls` and `aria-expanded` (left off while an untouched pane\n * cannot know its state yet), renders `type=\"button\"`, and runs the\n * consumer's `onClick` first: calling `preventDefault()` there cancels it. With `asChild` the\n * child is the button, and its own `type` stands.\n */\nconst Trigger = React.forwardRef<HTMLButtonElement, TriggerProps>(({ target, action = 'toggle', peekOnHover, asChild = false, onClick, onMouseEnter, onMouseLeave, children, ...props }, ref) => {\n const store = useShellStore('Shell.Trigger');\n React.useEffect(() => {\n if (target === 'left') warnOnce('Shell.Trigger target=\"left\" is deprecated and is removed in 1.0. Use target=\"rail\".');\n if (peekOnHover) warnOnce('Shell.Trigger: `peekOnHover` is deprecated and is removed in 1.0.');\n }, [target, peekOnHover]);\n const name: PaneName = target === 'left' ? 'rail' : target;\n // Subscribes to its own pane only.\n const entry = usePaneEntry(store, name);\n const shown = entry?.value === undefined ? undefined : entry.value !== 'closed';\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (event.defaultPrevented) return;\n const current = store.entries.get(name);\n if (!current) return;\n if (store.peek === name) setShellPeek(store, null);\n if (action === 'toggle') current.toggle('toggle');\n else if (action === 'expand') current.setValue('open', 'toggle');\n else current.setValue('closed', 'toggle');\n };\n\n const handleMouseEnter = (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseEnter?.(event);\n if (!peekOnHover) return;\n const current = store.entries.get(name);\n if (current && current.value === 'closed' && current.presentation !== 'overlay') setShellPeek(store, name);\n };\n\n const handleMouseLeave = (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseLeave?.(event);\n if (peekOnHover && store.peek === name) setShellPeek(store, null);\n };\n\n const Comp = asChild ? Slot.Root : 'button';\n return (\n <Comp\n // A button's default type is `submit`. Stated before the spread, so a consumer's own wins.\n // An asChild child states its own (Button already says `button`; a link has none), so the\n // key is left off rather than passed as undefined.\n {...(!asChild && { type: 'button' as const })}\n aria-controls={entry?.id}\n aria-expanded={shown}\n {...props}\n ref={ref}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n data-shell-trigger={target}\n data-shell-action={action}\n >\n {children}\n </Comp>\n );\n});\nTrigger.displayName = 'Shell.Trigger';\n\n// Exports\nexport {\n Root,\n Header,\n Left,\n Rail,\n Panel,\n Sidebar,\n Content,\n Inspector,\n Bottom,\n Trigger,\n PaneHeader,\n PaneFooter,\n Scroll,\n useShell,\n useSidebarMode,\n useResponsivePresentation,\n type PaneMode,\n type SidebarMode,\n type ResponsivePresentation,\n type PaneTarget,\n type TriggerAction,\n type ShellRootProps as RootProps,\n type ShellHeaderProps as HeaderProps,\n type RailProps,\n type PanelPublicProps as PanelProps,\n type SidebarPublicProps as SidebarProps,\n type ShellContentProps as ContentProps,\n type InspectorPublicProps as InspectorProps,\n type BottomPublicProps as BottomProps,\n type TriggerProps,\n type PaneHeaderProps,\n type PaneFooterProps,\n type Scr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O,QAAQ,EACvCT,IAAW,SAAUS,EAAQ,SAAS,OAAQ,QAAQ,EAC1DA,EAAQ,SAAS,SAAU,QAAQ,EAC1C,EAEME,EAAoB7F,GAA+C,CAEvE,GADAsF,IAAetF,CAAK,EAChB,CAACmF,EAAa,OAClB,IAAMQ,EAAU3I,EAAM,QAAQ,IAAIwI,CAAI,EAClCG,GAAWA,EAAQ,QAAU,UAAYA,EAAQ,eAAiB,WAAWC,GAAa5I,EAAOwI,CAAI,CAC3G,EAEMM,EAAoB9F,GAA+C,CACvEuF,IAAevF,CAAK,EAChBmF,GAAenI,EAAM,OAASwI,GAAMI,GAAa5I,EAAO,IAAI,CAClE,EAEM+I,EAAOX,EAAUY,GAAK,KAAO,SACnC,OACE,gBAACD,EAAA,CAIE,GAAI,CAACX,GAAW,CAAE,KAAM,QAAkB,EAC3C,gBAAepH,GAAO,GACtB,gBAAeyH,EACd,GAAG7I,EACJ,IAAKC,EACL,QAAS6I,EACT,aAAcG,EACd,aAAcC,EACd,qBAAoB9G,EACpB,oBAAmBkG,GAElB5I,CACH,CAEJ,CAAC,EACD2I,GAAQ,YAAc",
|
|
6
|
+
"names": ["shell_exports", "__export", "Bottom", "Content", "Header", "Inspector", "Left", "PaneFooter", "PaneHeader", "Panel", "Rail", "Root", "Scroll", "Sidebar", "Trigger", "useResponsivePresentation", "useShell", "useSidebarMode", "React", "classNames", "Slot", "useComposedRefs", "pageLockHolders", "updatePageLock", "delta", "doc", "INERT_MARK", "RESCUE_FRAMES", "isNowhere", "el", "triggerFor", "id", "within", "pane", "shellSizePropDef", "Root", "className", "children", "height", "sizeProp", "style", "onKeyDown", "onFocus", "props", "ref", "size", "useThemeSize", "store", "createShellStore", "subscribe", "listener", "subscribeShellStore", "rootRef", "composedRef", "useComposedRefs", "insetPanes", "setInsetPanes", "registerInset", "prev", "unregisterInset", "next", "insetContext", "closeOverlays", "entry", "livePanes", "liveCount", "contained", "contain", "rootEl", "liveEls", "child", "holdsLive", "returnFocusTo", "lastLive", "lastFocusInRoot", "holdsLock", "rescueFrame", "cancelRescue", "rescueFocus", "target", "lost", "frames", "tick", "live", "wantsLock", "previous", "closed", "inClosed", "active", "inRoot", "before", "opened", "now", "observer", "handleKeyDown", "event", "onDocumentKeyDown", "handleFocus", "rail", "railOffset", "heightStyle", "ShellStoreContext", "ShellSizeContext", "ShellContentContext", "ShellInsetContext", "PaneBandSizeContext", "classNames", "Header", "Left", "_ref", "RAIL_PROP_NAMES", "Rail", "presentation", "expandedSize", "_collapsible", "onExpand", "onCollapse", "open", "defaultOpen", "onOpenChange", "inset", "domProps", "table", "attributes", "usePresentationTable", "usePane", "toPaneValue", "navigationRest", "value", "reason", "useInsetRegistration", "paneAttributes", "RailContent", "PaneChromeScope", "PANEL_PROP_NAMES", "Panel", "defaultSize", "minSize", "maxSize", "resizable", "collapsible", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "useShellStore", "usePaneEntry", "own", "followsRail", "presentationTable", "FIXED_TABLE", "presentationAttributes", "detailRest", "elementRef", "resize", "useResizablePane", "startAnchoredGrowth", "readBreakpoint", "initialSize", "useInitialPaneSize", "handles", "content", "splitHandles", "PanelHandle", "handle", "PaneResizeContext", "PaneHandle", "withoutRemovedPaneProps", "Content", "Trigger", "action", "peekOnHover", "asChild", "onClick", "onMouseEnter", "onMouseLeave", "name", "shown", "handleClick", "current", "setShellPeek", "handleMouseEnter", "handleMouseLeave", "Comp", "Slot"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=chunk-EY6TCYGG.js.map
|
|
1
|
+
import{a as s}from"./chunk-NZJGC6ZW.js";var e=["1","2","3","4","5","6","7","8","9"],r=["raised","soft"],t={...s,size:{type:"enum",className:"kui-r-size",values:e,responsive:!0},variant:{type:"enum",className:"kui-variant",values:r,default:"raised"}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RAVZ7F5L.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/kbd.props.tsx"],
|
|
4
4
|
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst variants = ['raised', 'soft'] as const;\n\nconst kbdPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'kui-variant',\n values: variants,\n default: 'raised',\n },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { kbdPropDefs };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "wCAIA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EACpDC,EAAW,CAAC,SAAU,MAAM,EAE5BC,EAAc,CAClB,GAAGC,EACH,KAAM,CACJ,KAAM,OACN,UAAW,aACX,OAAQH,EACR,WAAY,EACd,EACA,QAAS,CACP,KAAM,OACN,UAAW,cACX,OAAQC,EACR,QAAS,QACX,CACF",
|
|
6
6
|
"names": ["sizes", "variants", "kbdPropDefs", "asChildPropDef"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as v}from"./chunk-TGRHRMQI.js";import{c as C}from"./chunk-GE7FRBZ4.js";import{c as T}from"./chunk-5ON3XLRD.js";import{a as d}from"./chunk-LPLW7OWA.js";import{a as P}from"./chunk-L54FWKJE.js";import{a as f}from"./chunk-CLJ6SEGP.js";import{c as m}from"./chunk-OKQAVYW4.js";import{a as k}from"./chunk-VQPANPMI.js";var I={};k(I,{Anchor:()=>x,Close:()=>g,Content:()=>y,Root:()=>u,Toolbar:()=>z,Trigger:()=>h});import*as o from"react";import i from"classnames";import{Popover as n}from"radix-ui";var M=["1","2","3","4"],c={...f,size:{type:"enum",className:"kui-r-size",values:M,default:"2",responsive:!0},width:P.width,minWidth:P.minWidth,maxWidth:{...P.maxWidth,default:"480px"},...d};var R=o.createContext(null),b=e=>{let r=o.useContext(R);return r},u=e=>o.createElement(n.Root,{...e});u.displayName="Popover.Root";var h=o.forwardRef(({children:e,...r},t)=>o.createElement(n.Trigger,{...r,ref:t,asChild:!0},v(e)));h.displayName="Popover.Trigger";var y=o.forwardRef((e,r)=>{let t=T(e,c.size),{className:s,forceMount:a,container:l,...p}=m(t,c),[L,A]=o.useState(void 0),S=o.useMemo(()=>({setLabelId:A}),[]);return o.createElement(n.Portal,{container:l,forceMount:a},o.createElement(C,{asChild:!0},o.createElement(n.Content,{align:"start",sideOffset:8,collisionPadding:10,...p,ref:r,"aria-labelledby":L??p["aria-labelledby"],className:i("kui-PopperContent","kui-PopoverContent",s)},o.createElement(R.Provider,{value:S},t.children))))});y.displayName="Popover.Content";var g=o.forwardRef(({children:e,...r},t)=>o.createElement(n.Close,{...r,ref:t,asChild:!0},v(e)));g.displayName="Popover.Close";var x=o.forwardRef((e,r)=>o.createElement(n.Anchor,{...e,ref:r}));x.displayName="Popover.Anchor";var E=o.forwardRef(({className:e,children:r,...t},s)=>(b("Popover.Toolbar"),o.createElement("div",{...t,ref:s,className:i("kui-PopoverToolbar",e)},r)));E.displayName="Popover.Toolbar";var w=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarLeft",e)}));w.displayName="Popover.Toolbar.Left";var D=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarCenter",e)}));D.displayName="Popover.Toolbar.Center";var N=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarRight",e)}));N.displayName="Popover.Toolbar.Right";var W=o.forwardRef(({className:e,id:r,...t},s)=>{let a=b("Popover.Toolbar.Title"),l=o.useId(),p=r??`kui-popover-toolbar-title-${l}`;return o.useEffect(()=>(a?.setLabelId(p),()=>a?.setLabelId(void 0)),[a,p]),o.createElement("span",{...t,id:p,ref:s,className:i("kui-PopoverToolbarTitle",e)})});W.displayName="Popover.Toolbar.Title";var z=Object.assign(E,{Left:w,Center:D,Right:N,Title:W});export{u as a,h as b,y as c,g as d,x as e,z as f,I as g};
|
|
3
|
+
//# sourceMappingURL=chunk-RD4T2MCC.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/popover.tsx", "../../src/components/popover.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { Theme } from './theme.js';\n\nimport type { PopoverContentOwnProps } from './popover.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n// ---------------------------------------------\n// Popover Content Context\n// ---------------------------------------------\ntype PopoverContentContextValue = {\n /** Wire up aria-labelledby for toolbar title */\n setLabelId: (id: string | undefined) => void;\n};\n\nconst PopoverContentContext = React.createContext<PopoverContentContextValue | null>(null);\nconst usePopoverContentContext = (caller: string) => {\n const ctx = React.useContext(PopoverContentContext);\n if (!ctx) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`${caller} must be used within Popover.Content`);\n }\n }\n return ctx;\n};\n\ninterface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}\nconst PopoverRoot: React.FC<PopoverRootProps> = (props: PopoverRootProps) => (\n <PopoverPrimitive.Root {...props} />\n);\nPopoverRoot.displayName = 'Popover.Root';\n\ntype PopoverTriggerElement = React.ElementRef<typeof PopoverPrimitive.Trigger>;\ninterface PopoverTriggerProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Trigger, RemovedProps> {}\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Trigger>\n ),\n);\nPopoverTrigger.displayName = 'Popover.Trigger';\n\ntype PopoverContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ninterface PopoverContentProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>,\n PopoverContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n}\nconst PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentProps>(\n (ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, popoverContentPropDefs.size);\n const {\n className,\n forceMount,\n container,\n ...contentProps\n } = extractProps(props, popoverContentPropDefs);\n\n const [labelId, setLabelId] = React.useState<string | undefined>(undefined);\n const contextValue = React.useMemo(() => ({ setLabelId }), []);\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <PopoverPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={forwardedRef}\n // A Toolbar.Title names the panel; without one, the caller's own value stands.\n aria-labelledby={labelId ?? contentProps['aria-labelledby']}\n className={classNames('kui-PopperContent', 'kui-PopoverContent', className)}\n >\n <PopoverContentContext.Provider value={contextValue}>\n {props.children}\n </PopoverContentContext.Provider>\n </PopoverPrimitive.Content>\n </Theme>\n </PopoverPrimitive.Portal>\n );\n },\n);\nPopoverContent.displayName = 'Popover.Content';\n\ntype PopoverCloseElement = React.ElementRef<typeof PopoverPrimitive.Close>;\ninterface PopoverCloseProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Close, RemovedProps> {}\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Close>\n ),\n);\nPopoverClose.displayName = 'Popover.Close';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopoverPrimitive.Anchor>;\ninterface PopoverAnchorProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {}\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n (props, forwardedRef) => <PopoverPrimitive.Anchor {...props} ref={forwardedRef} />,\n);\n\nPopoverAnchor.displayName = 'Popover.Anchor';\n\n// ---------------------------------------------\n// Toolbar (Popover-only)\n// ---------------------------------------------\n\ntype PopoverToolbarElement = HTMLDivElement;\ntype PopoverToolbarProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarBase = React.forwardRef<PopoverToolbarElement, PopoverToolbarProps>(\n ({ className, children, ...props }, forwardedRef) => {\n // The toolbar is sticky in the content's own CSS, so it needs no measuring; this only warns\n // when it is used outside Popover.Content.\n usePopoverContentContext('Popover.Toolbar');\n\n return (\n <div {...props} ref={forwardedRef} className={classNames('kui-PopoverToolbar', className)}>\n {children}\n </div>\n );\n },\n);\nPopoverToolbarBase.displayName = 'Popover.Toolbar';\n\ntype PopoverToolbarSectionProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarLeft = React.forwardRef<HTMLDivElement, PopoverToolbarSectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('kui-PopoverToolbarSection', 'kui-PopoverToolbarLeft', className)}\n />\n ),\n);\nPopoverToolbarLeft.displayName = 'Popover.Toolbar.Left';\n\nconst PopoverToolbarCenter = React.forwardRef<HTMLDivElement, PopoverToolbarSectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('kui-PopoverToolbarSection', 'kui-PopoverToolbarCenter', className)}\n />\n ),\n);\nPopoverToolbarCenter.displayName = 'Popover.Toolbar.Center';\n\nconst PopoverToolbarRight = React.forwardRef<HTMLDivElement, PopoverToolbarSectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('kui-PopoverToolbarSection', 'kui-PopoverToolbarRight', className)}\n />\n ),\n);\nPopoverToolbarRight.displayName = 'Popover.Toolbar.Right';\n\ntype PopoverToolbarTitleProps = React.ComponentPropsWithoutRef<'span'>;\nconst PopoverToolbarTitle = React.forwardRef<HTMLSpanElement, PopoverToolbarTitleProps>(\n ({ className, id: idProp, ...props }, ref) => {\n const ctx = usePopoverContentContext('Popover.Toolbar.Title');\n const reactId = React.useId();\n const id = idProp ?? `kui-popover-toolbar-title-${reactId}`;\n React.useEffect(() => {\n ctx?.setLabelId(id);\n return () => ctx?.setLabelId(undefined);\n }, [ctx, id]);\n return (\n <span\n {...props}\n id={id}\n ref={ref}\n className={classNames('kui-PopoverToolbarTitle', className)}\n />\n );\n },\n);\nPopoverToolbarTitle.displayName = 'Popover.Toolbar.Title';\n\ntype PopoverToolbarComponent = React.ForwardRefExoticComponent<\n React.PropsWithoutRef<PopoverToolbarProps> & React.RefAttributes<HTMLDivElement>\n> & {\n Left: typeof PopoverToolbarLeft;\n Center: typeof PopoverToolbarCenter;\n Right: typeof PopoverToolbarRight;\n Title: typeof PopoverToolbarTitle;\n};\n\nconst PopoverToolbar = Object.assign(PopoverToolbarBase, {\n Left: PopoverToolbarLeft,\n Center: PopoverToolbarCenter,\n Right: PopoverToolbarRight,\n Title: PopoverToolbarTitle,\n}) as PopoverToolbarComponent;\n\nexport {\n PopoverRoot as Root,\n PopoverContent as Content,\n PopoverTrigger as Trigger,\n PopoverClose as Close,\n PopoverAnchor as Anchor,\n PopoverToolbar as Toolbar,\n};\nexport type {\n PopoverRootProps as RootProps,\n PopoverContentProps as ContentProps,\n PopoverTriggerProps as TriggerProps,\n PopoverCloseProps as CloseProps,\n PopoverAnchorProps as AnchorProps,\n PopoverToolbarProps as ToolbarProps,\n PopoverToolbarSectionProps as ToolbarSectionProps,\n PopoverToolbarTitleProps as ToolbarTitleProps,\n};\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3', '4'] as const;\n\nconst popoverContentPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n size: PropDef<(typeof contentSizes)[number]>;\n};\n\ntype PopoverContentOwnProps = GetPropDefTypes<\n typeof popoverContentPropDefs &\n typeof asChildPropDef &\n typeof widthPropDefs &\n typeof heightPropDefs\n>;\n\nexport { popoverContentPropDefs };\nexport type { PopoverContentOwnProps };\n"],
|
|
5
|
+
"mappings": ";gUAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,UAAAC,EAAA,YAAAC,EAAA,SAAAC,EAAA,YAAAC,EAAA,YAAAC,IAAA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,WAAWC,MAAwB,WCI5C,IAAMC,EAAe,CAAC,IAAK,IAAK,IAAK,GAAG,EAElCC,EAAyB,CAC7B,GAAGC,EACH,KAAM,CACJ,KAAM,OACN,UAAW,aACX,OAAQF,EACR,QAAS,IACT,WAAY,EACd,EACA,MAAOG,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,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YAAU,KACd/B,GAAK,WAAWgC,CAAE,EACX,IAAMhC,GAAK,WAAW,MAAS,GACrC,CAACA,EAAKgC,CAAE,CAAC,EAEV,gBAAC,QACE,GAAG9B,EACJ,GAAI8B,EACJ,IAAKN,EACL,UAAWL,EAAW,0BAA2BT,CAAS,EAC5D,CAEJ,CACF,EACAiB,EAAoB,YAAc,wBAWlC,IAAMI,EAAiB,OAAO,OAAOT,EAAoB,CACvD,KAAMC,EACN,OAAQE,EACR,MAAOC,EACP,MAAOC,CACT,CAAC",
|
|
6
|
+
"names": ["popover_exports", "__export", "PopoverAnchor", "PopoverClose", "PopoverContent", "PopoverRoot", "PopoverToolbar", "PopoverTrigger", "React", "classNames", "PopoverPrimitive", "contentSizes", "popoverContentPropDefs", "asChildPropDef", "widthPropDefs", "heightPropDefs", "PopoverContentContext", "usePopoverContentContext", "caller", "ctx", "PopoverRoot", "props", "PopoverPrimitive", "PopoverTrigger", "children", "forwardedRef", "requireReactElement", "PopoverContent", "ownProps", "useThemeSizeProps", "popoverContentPropDefs", "className", "forceMount", "container", "contentProps", "extractProps", "labelId", "setLabelId", "contextValue", "Theme", "classNames", "PopoverClose", "PopoverAnchor", "PopoverToolbarBase", "PopoverToolbarLeft", "ref", "PopoverToolbarCenter", "PopoverToolbarRight", "PopoverToolbarTitle", "idProp", "reactId", "id", "PopoverToolbar"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as o}from"./chunk-KRJTW535.js";import{c as r}from"./chunk-CUNKWFKA.js";var t=["surface","soft","outline"],a={variant:{type:"enum",className:"kui-variant",values:t,default:"surface"},...r,...o,duration:{type:"string"}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-SKOYHBIE.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/progress.props.tsx"],
|
|
4
4
|
"sourcesContent": ["import { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst variants = ['surface', 'soft', 'outline'] as const;\n\nconst progressPropDefs = {\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'surface' },\n ...colorPropDef,\n ...radiusPropDef,\n duration: { type: 'string' },\n} satisfies {\n variant: PropDef<(typeof variants)[number]>;\n duration: PropDef<string>;\n};\n\nexport { progressPropDefs };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "gFAKA,IAAMA,EAAW,CAAC,UAAW,OAAQ,SAAS,EAExCC,EAAmB,CACvB,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQD,EAAU,QAAS,SAAU,EACxF,GAAGE,EACH,GAAGC,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B",
|
|
6
6
|
"names": ["variants", "progressPropDefs", "colorPropDef", "radiusPropDef"]
|
|
7
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-STPMPY3X.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{c as v}from"./chunk-5ON3XLRD.js";import{b as R}from"./chunk-XU74PNM2.js";import{c as y}from"./chunk-OKQAVYW4.js";import{a as K}from"./chunk-VQPANPMI.js";var q={};K(q,{Item:()=>x,Root:()=>b});import*as e from"react";import S from"classnames";import{ToggleGroup as I}from"radix-ui";import{useComposedRefs as F,useControllableState as H,useLayoutEffect as j}from"radix-ui/internal";var M=["1","2","3","4"],O=["horizontal","vertical"],u={disabled:{type:"boolean",default:!1},size:{type:"enum",className:"kui-r-size",values:M,default:"2",responsive:!0},orientation:{type:"enum",className:"kui-r-orientation",values:O,default:"horizontal",responsive:!0},...R};var h=e.createContext(null),W=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"]),b=e.forwardRef((n,s)=>{let a=v(n,u.size),{className:l,children:t,radius:i,value:m,defaultValue:p,onValueChange:w,style:D,disabled:c,onKeyDown:N,onPointerDown:k,...T}=y(a,u),[f,d]=H({prop:m,onChange:w,defaultProp:p??""}),r=e.useRef(!1),A=e.useMemo(()=>({selectFromKeyboard(o){r.current&&(r.current=!1,d(o))}}),[d]),g=e.useRef(null),V=F(s,g),C=e.Children.toArray(t).filter(e.isValidElement),z=C.length,G=Math.max(0,C.findIndex(o=>o.props.value===f));return j(()=>{let o=g.current;if(!o)return;let P=Array.from(o.querySelectorAll(":scope > .kui-SegmentedControlItem")),L=P.findIndex(E=>E.getAttribute("data-state")==="on");o.style.setProperty("--segmented-control-count",String(P.length||1)),o.style.setProperty("--segmented-control-index",String(Math.max(0,L)))}),e.createElement(h.Provider,{value:A},e.createElement(I.Root,{"data-disabled":c||void 0,"data-radius":i,ref:V,style:{"--segmented-control-count":z||1,"--segmented-control-index":G,...D},className:S("kui-SegmentedControlRoot",l),onValueChange:o=>{o&&d(o)},onKeyDown:o=>{N?.(o),r.current=W.has(o.key)},onPointerDown:o=>{k?.(o),r.current=!1},...T,type:"single",value:f,asChild:!1,disabled:!!c},t,e.createElement("div",{className:"kui-SegmentedControlIndicator"})))});b.displayName="SegmentedControl.Root";var x=e.forwardRef(({children:n,className:s,iconOnly:a,onFocus:l,...t},i)=>{let m=e.useContext(h);return e.createElement(I.Item,{ref:i,className:S("kui-reset","kui-SegmentedControlItem",s),"data-icon-only":a||void 0,onFocus:p=>{l?.(p),m?.selectFromKeyboard(t.value)},...t,asChild:!1},e.createElement("span",{className:"kui-SegmentedControlItemSeparator"}),e.createElement("span",{className:"kui-SegmentedControlItemLabel"},e.createElement("span",{className:"kui-SegmentedControlItemLabelActive"},n),e.createElement("span",{className:"kui-SegmentedControlItemLabelInactive","aria-hidden":!0},n)))});x.displayName="SegmentedControl.Item";export{b as a,x as b,q as c};
|
|
3
|
+
//# sourceMappingURL=chunk-TF6WAIUQ.js.map
|