@womp/kookie-ui 0.26.0 → 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 +36 -3
- 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.css +3 -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.css +13 -0
- 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 +37 -5
- 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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/avatar.tsx", "../../src/components/avatar.props.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Avatar as AvatarPrimitive } from 'radix-ui';\n\nimport { avatarPropDefs } from './avatar.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { getSubtree } from '../helpers/get-subtree.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ninterface AvatarProps extends AvatarImplProps {}\nconst Avatar = React.forwardRef<AvatarElement, AvatarProps>((ownProps, forwardedRef) => {\n // An unset size follows the Theme, like a control. Sizes above 4 are only explicit.\n const props = useThemeSizeProps(ownProps, avatarPropDefs.size);\n const {\n asChild,\n children,\n className,\n style,\n color,\n radius,\n status,\n statusLabel,\n badge,\n // Only these reach the <img>, which Radix renders once the picture has loaded.\n fallback,\n onLoadingStatusChange,\n src,\n alt,\n srcSet,\n sizes,\n crossOrigin,\n referrerPolicy,\n loading,\n decoding,\n onLoad,\n onError,\n // Everything else (id, aria-*, data-*, handlers) goes on the root, so it is always rendered.\n ...rootProps\n } = extractProps(props, avatarPropDefs);\n const imageProps = { fallback, onLoadingStatusChange, src, alt, srcSet, sizes, crossOrigin, referrerPolicy, loading, decoding, onLoad, onError };\n\n if (process.env.NODE_ENV !== 'production') {\n if (status !== undefined && badge !== undefined) {\n console.warn('Avatar: Cannot use both `status` and `badge` props together. ' + 'The `badge` prop will be used and `status` will be ignored.');\n }\n }\n\n // Cheap boolean checks \u2014 no memoization needed\n const isDisabled = asChild && children != null && React.isValidElement(children) && ((children.props as any).disabled === true || (children.props as any)['data-disabled'] === true);\n\n const hasIndicator = badge !== undefined || status !== undefined;\n\n const indicator =\n badge !== undefined ? (\n <span className=\"kui-AvatarBadge\">{badge}</span>\n ) : status !== undefined ? (\n <span\n className=\"kui-AvatarStatus\"\n data-accent-color={status}\n role={statusLabel ? 'img' : undefined}\n aria-label={statusLabel || undefined}\n aria-hidden={statusLabel ? undefined : true}\n />\n ) : null;\n\n return (\n <AvatarPrimitive.Root\n {...(rootProps as React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>)}\n ref={forwardedRef}\n data-accent-color={color}\n data-radius={radius}\n data-disabled={isDisabled || undefined}\n data-has-indicator={hasIndicator || undefined}\n className={classNames('kui-reset', 'kui-AvatarRoot', className)}\n style={style}\n asChild={asChild}\n >\n {/* With asChild, Slot takes exactly one child, so the indicator goes inside it. */}\n {getSubtree(\n { asChild, children },\n <>\n <AvatarImpl {...imageProps} />\n {indicator}\n </>,\n )}\n </AvatarPrimitive.Root>\n );\n});\nAvatar.displayName = 'Avatar';\n\ntype AvatarElement = React.ElementRef<typeof AvatarPrimitive.Root>;\ntype AvatarOwnProps = GetPropDefTypes<typeof avatarPropDefs>;\n\ninterface AvatarImplProps extends ComponentPropsWithout<typeof AvatarPrimitive.Image, RemovedProps>, AvatarOwnProps {\n // TODO: See if we can automate making prop defs with `required: true` non nullable\n fallback: NonNullable<AvatarOwnProps['fallback']>;\n}\n\ntype AvatarImageProps = Pick<\n AvatarImplProps,\n 'fallback' | 'onLoadingStatusChange' | 'src' | 'alt' | 'srcSet' | 'sizes' | 'crossOrigin' | 'referrerPolicy' | 'loading' | 'decoding' | 'onLoad' | 'onError'\n>;\n\nconst AvatarImpl = React.memo(({ fallback, onLoadingStatusChange, ...imageProps }: AvatarImageProps) => {\n const [status, setStatus] = React.useState<'idle' | 'loading' | 'loaded' | 'error'>('idle');\n\n const handleLoadingStatusChange = React.useCallback(\n (newStatus: 'idle' | 'loading' | 'loaded' | 'error') => {\n onLoadingStatusChange?.(newStatus);\n setStatus(newStatus);\n },\n [onLoadingStatusChange],\n );\n\n return (\n <>\n {status === 'idle' || status === 'loading' ? <span className=\"kui-AvatarFallback\" /> : null}\n\n {status === 'error' ? (\n <AvatarPrimitive.Fallback\n className={classNames('kui-AvatarFallback', {\n 'kui-one-letter': typeof fallback === 'string' && fallback.length === 1,\n 'kui-two-letters': typeof fallback === 'string' && fallback.length === 2,\n })}\n // Named from alt, like the picture it stands in for. Unnamed, it is decorative.\n {...(imageProps.alt ? { role: 'img', 'aria-label': imageProps.alt } : { 'aria-hidden': true })}\n >\n {fallback}\n </AvatarPrimitive.Fallback>\n ) : null}\n\n <AvatarPrimitive.Image className=\"kui-AvatarImage\" {...imageProps} onLoadingStatusChange={handleLoadingStatusChange} />\n </>\n );\n});\n\nAvatarImpl.displayName = 'AvatarImpl';\n\nexport { Avatar };\nexport type { AvatarProps };\n", "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": ";uPAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,MAAuB,WCE1C,IAAMC,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,EDvBA,IAAMM,EAAe,aAAuC,CAACC,EAAUC,IAAiB,CAEtF,IAAMC,EAAQC,EAAkBH,EAAUI,EAAe,IAAI,EACvD,CACJ,QAAAC,EACA,SAAAC,EACA,UAAAC,EACA,MAAAC,EACA,MAAAC,EACA,OAAAC,EACA,OAAAC,EACA,YAAAC,EACA,MAAAC,EAEA,SAAAC,EACA,sBAAAC,EACA,IAAAC,EACA,IAAAC,EACA,OAAAC,EACA,MAAAC,EACA,YAAAC,EACA,eAAAC,EACA,QAAAC,EACA,SAAAC,EACA,OAAAC,EACA,QAAAC,EAEA,GAAGC,CACL,EAAIC,EAAazB,EAAOE,CAAc,EAChCwB,EAAa,CAAE,SAAAd,EAAU,sBAAAC,EAAuB,IAAAC,EAAK,IAAAC,EAAK,OAAAC,EAAQ,MAAAC,EAAO,YAAAC,EAAa,eAAAC,EAAgB,QAAAC,EAAS,SAAAC,EAAU,OAAAC,EAAQ,QAAAC,CAAQ,EASzII,EAAaxB,GAAWC,GAAY,MAAc,iBAAeA,CAAQ,IAAOA,EAAS,MAAc,WAAa,IAASA,EAAS,MAAc,eAAe,IAAM,IAEzKwB,EAAejB,IAAU,QAAaF,IAAW,OAEjDoB,EACJlB,IAAU,OACR,gBAAC,QAAK,UAAU,mBAAmBA,CAAM,EACvCF,IAAW,OACb,gBAAC,QACC,UAAU,mBACV,oBAAmBA,EACnB,KAAMC,EAAc,MAAQ,OAC5B,aAAYA,GAAe,OAC3B,cAAaA,EAAc,OAAY,GACzC,EACE,KAEN,OACE,gBAACoB,EAAgB,KAAhB,CACE,GAAIN,EACL,IAAKzB,EACL,oBAAmBQ,EACnB,cAAaC,EACb,gBAAemB,GAAc,OAC7B,qBAAoBC,GAAgB,OACpC,UAAWG,EAAW,YAAa,iBAAkB1B,CAAS,EAC9D,MAAOC,EACP,QAASH,GAGR6B,EACC,CAAE,QAAA7B,EAAS,SAAAC,CAAS,EACpB,gCACE,gBAAC6B,EAAA,CAAY,GAAGP,EAAY,EAC3BG,CACH,CACF,CACF,CAEJ,CAAC,EACDhC,EAAO,YAAc,SAerB,IAAMoC,EAAmB,OAAK,CAAC,CAAE,SAAArB,EAAU,sBAAAC,EAAuB,GAAGa,CAAW,IAAwB,CACtG,GAAM,CAACjB,EAAQyB,CAAS,EAAU,WAAkD,MAAM,EAEpFC,EAAkC,cACrCC,GAAuD,CACtDvB,IAAwBuB,CAAS,EACjCF,EAAUE,CAAS,CACrB,EACA,CAACvB,CAAqB,CACxB,EAEA,OACE,gCACGJ,IAAW,QAAUA,IAAW,UAAY,gBAAC,QAAK,UAAU,qBAAqB,EAAK,KAEtFA,IAAW,QACV,gBAACqB,EAAgB,SAAhB,CACC,UAAWC,EAAW,qBAAsB,CAC1C,iBAAkB,OAAOnB,GAAa,UAAYA,EAAS,SAAW,EACtE,kBAAmB,OAAOA,GAAa,UAAYA,EAAS,SAAW,CACzE,CAAC,EAEA,GAAIc,EAAW,IAAM,CAAE,KAAM,MAAO,aAAcA,EAAW,GAAI,EAAI,CAAE,cAAe,EAAK,GAE3Fd,CACH,EACE,KAEJ,gBAACkB,EAAgB,MAAhB,CAAsB,UAAU,kBAAmB,GAAGJ,EAAY,sBAAuBS,EAA2B,CACvH,CAEJ,CAAC,EAEDF,EAAW,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "AvatarPrimitive", "sizes", "variants", "objectFitValues", "avatarPropDefs", "asChildPropDef", "grayAccentColorPropDef", "radiusPropDef", "accentColors", "Avatar", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "avatarPropDefs", "asChild", "children", "className", "style", "color", "radius", "status", "statusLabel", "badge", "fallback", "onLoadingStatusChange", "src", "alt", "srcSet", "sizes", "crossOrigin", "referrerPolicy", "loading", "decoding", "onLoad", "onError", "rootProps", "extractProps", "imageProps", "isDisabled", "hasIndicator", "indicator", "AvatarPrimitive", "classNames", "getSubtree", "AvatarImpl", "setStatus", "handleLoadingStatusChange", "newStatus"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{c as i}from"./chunk-HBWBPBSA.js";import{c as s}from"./chunk-OKQAVYW4.js";import{b as f}from"./chunk-G66WDIIV.js";import{b as l}from"./chunk-MAA6LEE2.js";import*as e from"react";import S from"classnames";var v=["horizontal","vertical"],c={orientation:{type:"enum",className:"kui-r-orientation",values:v,default:"horizontal",responsive:!0},color:{...i.color,default:"gray"},decorative:{type:"boolean",default:!1},light:{type:"boolean",className:"kui-light",default:!1}};var D=e.forwardRef((o,m)=>{let{className:P,color:u,decorative:a,...d}=s(o,c),p=typeof o.orientation=="object"&&o.orientation!==null,{breakpoint:y}=f(p),r="horizontal";if(p){let n=o.orientation;for(let t of l)if(n[t]!==void 0&&(r=n[t]),t===y)break}else o.orientation==="vertical"&&(r="vertical");return e.createElement("span",{"data-accent-color":u,role:a?void 0:"separator","aria-orientation":a?void 0:r,...d,ref:m,className:S("kui-Separator",P)})});D.displayName="Separator";export{D as a};
|
|
3
|
+
//# sourceMappingURL=chunk-H2TSRYQ5.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/separator.tsx", "../../src/components/separator.props.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { separatorPropDefs } from './separator.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useBreakpoint } from '../hooks/use-breakpoint.js';\nimport { SHELL_BREAKPOINTS } from './shell.types.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype SeparatorElement = React.ElementRef<'span'>;\ntype SeparatorOwnProps = GetPropDefTypes<typeof separatorPropDefs>;\ninterface SeparatorProps extends ComponentPropsWithout<'span', RemovedProps>, SeparatorOwnProps {}\ntype Orientation = 'horizontal' | 'vertical';\n\nconst Separator = React.forwardRef<SeparatorElement, SeparatorProps>((props, forwardedRef) => {\n const { className, color, decorative, ...separatorProps } = extractProps(props, separatorPropDefs);\n const responsive = typeof props.orientation === 'object' && props.orientation !== null;\n const { breakpoint } = useBreakpoint(responsive);\n\n // A responsive orientation announces the one drawn at the current breakpoint.\n let orientation: Orientation = 'horizontal';\n if (responsive) {\n const values = props.orientation as Partial<Record<string, Orientation>>;\n for (const bp of SHELL_BREAKPOINTS) {\n if (values[bp] !== undefined) orientation = values[bp]!;\n if (bp === breakpoint) break;\n }\n } else if (props.orientation === 'vertical') {\n orientation = 'vertical';\n }\n\n return (\n <span\n data-accent-color={color}\n role={decorative ? undefined : 'separator'}\n aria-orientation={decorative ? undefined : orientation}\n {...separatorProps}\n ref={forwardedRef}\n className={classNames('kui-Separator', className)}\n />\n );\n});\nSeparator.displayName = 'Separator';\n\nexport { Separator };\nexport type { SeparatorProps };\n", "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": ";gKAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aCCvB,IAAMC,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,EDCA,IAAMC,EAAkB,aAA6C,CAACC,EAAOC,IAAiB,CAC5F,GAAM,CAAE,UAAAC,EAAW,MAAAC,EAAO,WAAAC,EAAY,GAAGC,CAAe,EAAIC,EAAaN,EAAOO,CAAiB,EAC3FC,EAAa,OAAOR,EAAM,aAAgB,UAAYA,EAAM,cAAgB,KAC5E,CAAE,WAAAS,CAAW,EAAIC,EAAcF,CAAU,EAG3CG,EAA2B,aAC/B,GAAIH,EAAY,CACd,IAAMI,EAASZ,EAAM,YACrB,QAAWa,KAAMC,EAEf,GADIF,EAAOC,CAAE,IAAM,SAAWF,EAAcC,EAAOC,CAAE,GACjDA,IAAOJ,EAAY,KAE3B,MAAWT,EAAM,cAAgB,aAC/BW,EAAc,YAGhB,OACE,gBAAC,QACC,oBAAmBR,EACnB,KAAMC,EAAa,OAAY,YAC/B,mBAAkBA,EAAa,OAAYO,EAC1C,GAAGN,EACJ,IAAKJ,EACL,UAAWc,EAAW,gBAAiBb,CAAS,EAClD,CAEJ,CAAC,EACDH,EAAU,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "orientationValues", "separatorPropDefs", "colorPropDef", "Separator", "props", "forwardedRef", "className", "color", "decorative", "separatorProps", "extractProps", "separatorPropDefs", "responsive", "breakpoint", "useBreakpoint", "orientation", "values", "bp", "SHELL_BREAKPOINTS", "classNames"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as r,b as e}from"./chunk-7N2Q5WOM.js";import{b as t}from"./chunk-5KMEUZWN.js";import{a as p}from"./chunk-CLJ6SEGP.js";import{c as s}from"./chunk-OKQAVYW4.js";import*as o from"react";import d from"classnames";var l=["div","span"],x=["none","inline","inline-block","block","contents"],a={as:{type:"enum",values:l,default:"div"},...p,display:{type:"enum",className:"kui-r-display",values:x,responsive:!0}};var c=o.forwardRef((m,n)=>{let{className:i,asChild:f,as:P="div",...y}=s(m,a,r,e);return o.createElement(f?t:P,{...y,ref:n,className:d("kui-Box",i)})});c.displayName="Box";export{c as a};
|
|
3
|
+
//# sourceMappingURL=chunk-H33NTGVF.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/box.tsx", "../../src/components/box.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Slot } from './slot.js';\nimport { boxPropDefs } from './box.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { BoxOwnProps } from './box.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype BoxElement = React.ElementRef<'div'>;\ninterface CommonBoxProps extends MarginProps, LayoutProps, BoxOwnProps {}\ntype BoxDivProps = { as?: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype BoxSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype BoxProps = CommonBoxProps & (BoxSpanProps | BoxDivProps);\n\nconst Box = React.forwardRef<BoxElement, BoxProps>((props, forwardedRef) => {\n const {\n className,\n asChild,\n as: Tag = 'div',\n ...boxProps\n } = extractProps(props, boxPropDefs, layoutPropDefs, marginPropDefs);\n const Comp = asChild ? Slot : Tag;\n return <Comp {...boxProps} ref={forwardedRef} className={classNames('kui-Box', className)} />;\n});\nBox.displayName = 'Box';\n\nexport { Box };\nexport type { BoxProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst as = ['div', 'span'] as const;\nconst displayValues = ['none', 'inline', 'inline-block', 'block', 'contents'] as const;\n\nconst boxPropDefs = {\n /**\n * Controls whether to render **div** or **span**\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n as: { type: 'enum', values: as, default: 'div' },\n ...asChildPropDef,\n /**\n * Sets the CSS **display** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * display=\"inline-block\"\n * display={{ sm: 'none', lg: 'block' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/display\n */\n display: {\n type: 'enum',\n className: 'kui-r-display',\n values: displayValues,\n responsive: true,\n },\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n display: PropDef<(typeof displayValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype BoxOwnProps = GetPropDefTypes<typeof boxPropDefs & typeof asChildPropDef>;\n\nexport { boxPropDefs };\nexport type { BoxOwnProps };\n"],
|
|
5
|
+
"mappings": ";uKAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aCGvB,IAAMC,EAAK,CAAC,MAAO,MAAM,EACnBC,EAAgB,CAAC,OAAQ,SAAU,eAAgB,QAAS,UAAU,EAEtEC,EAAc,CAQlB,GAAI,CAAE,KAAM,OAAQ,OAAQF,EAAI,QAAS,KAAM,EAC/C,GAAGG,EAYH,QAAS,CACP,KAAM,OACN,UAAW,gBACX,OAAQF,EACR,WAAY,EACd,CACF,EDdA,IAAMG,EAAY,aAAiC,CAACC,EAAOC,IAAiB,CAC1E,GAAM,CACJ,UAAAC,EACA,QAAAC,EACA,GAAIC,EAAM,MACV,GAAGC,CACL,EAAIC,EAAaN,EAAOO,EAAaC,EAAgBC,CAAc,EAEnE,OAAO,gBADMN,EAAUO,EAAON,EACtB,CAAM,GAAGC,EAAU,IAAKJ,EAAc,UAAWU,EAAW,UAAWT,CAAS,EAAG,CAC7F,CAAC,EACDH,EAAI,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "as", "displayValues", "boxPropDefs", "asChildPropDef", "Box", "props", "forwardedRef", "className", "asChild", "Tag", "boxProps", "extractProps", "boxPropDefs", "layoutPropDefs", "marginPropDefs", "Slot", "classNames"]
|
|
7
|
+
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/tooltip.props.tsx"],
|
|
4
4
|
"sourcesContent": ["import { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst tooltipPropDefs = {\n content: { type: 'ReactNode', required: true },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '360px' },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n content: PropDef<React.ReactNode>;\n};\n\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs & typeof widthPropDefs>;\n\nexport { tooltipPropDefs };\nexport type { TooltipOwnProps };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "wCAIA,IAAMA,EAAkB,CACtB,QAAS,CAAE,KAAM,YAAa,SAAU,EAAK,EAC7C,MAAOC,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,EAAc,SAAU,QAAS,OAAQ,CAC1D",
|
|
6
6
|
"names": ["tooltipPropDefs", "widthPropDefs"]
|
|
7
7
|
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=chunk-PT4KBXXP.js.map
|
|
1
|
+
import{b as o}from"./chunk-KRJTW535.js";import{c as e}from"./chunk-CUNKWFKA.js";var r=["1","2","3","4"],p={size:{type:"enum",className:"kui-r-size",values:r,default:"2",responsive:!0}},s=["raised","surface","soft","outline","ghost"],i={variant:{type:"enum",className:"kui-variant",values:s,default:"raised"},error:{type:"boolean"},loading:{type:"boolean"},disabled:{type:"boolean"},readOnly:{type:"boolean"},...e,...o,placeholder:{type:"ReactNode"}},n={...e};export{p as a,i as b,n as c};
|
|
2
|
+
//# sourceMappingURL=chunk-HCBR74BW.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/select.props.tsx"],
|
|
4
4
|
"sourcesContent": ["import type React from 'react';\n\nimport { 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 selectRootPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nconst triggerVariants = ['raised', 'surface', 'soft', 'outline', 'ghost'] as const;\n\nconst selectTriggerPropDefs = {\n variant: { type: 'enum', className: 'kui-variant', values: triggerVariants, default: 'raised' },\n error: { type: 'boolean' },\n loading: { type: 'boolean' },\n disabled: { type: 'boolean' },\n readOnly: { type: 'boolean' },\n ...colorPropDef,\n ...radiusPropDef,\n placeholder: { type: 'ReactNode' },\n} satisfies {\n variant: PropDef<(typeof triggerVariants)[number]>;\n error: PropDef<boolean>;\n loading: PropDef<boolean>;\n disabled: PropDef<boolean>;\n readOnly: PropDef<boolean>;\n placeholder: PropDef<React.ReactNode>;\n};\n\n\nconst selectContentPropDefs = {\n ...colorPropDef,\n} satisfies {\n};\n\nexport { selectRootPropDefs, selectTriggerPropDefs, selectContentPropDefs };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "gFAOA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAE3BC,EAAqB,CACzB,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQD,EAAO,QAAS,IAAK,WAAY,EAAK,CAC/F,EAIME,EAAkB,CAAC,SAAU,UAAW,OAAQ,UAAW,OAAO,EAElEC,EAAwB,CAC5B,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQD,EAAiB,QAAS,QAAS,EAC9F,MAAO,CAAE,KAAM,SAAU,EACzB,QAAS,CAAE,KAAM,SAAU,EAC3B,SAAU,CAAE,KAAM,SAAU,EAC5B,SAAU,CAAE,KAAM,SAAU,EAC5B,GAAGE,EACH,GAAGC,EACH,YAAa,CAAE,KAAM,WAAY,CACnC,EAUMC,EAAwB,CAC5B,GAAGF,CACL",
|
|
6
6
|
"names": ["sizes", "selectRootPropDefs", "triggerVariants", "selectTriggerPropDefs", "colorPropDef", "radiusPropDef", "selectContentPropDefs"]
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/spinner.props.tsx"],
|
|
4
4
|
"sourcesContent": ["import type { PropDef } from '../props/prop-def.js';\n\nconst spinnerPropDefs = {\n loading: { type: 'boolean', default: true },\n} satisfies {\n loading: PropDef<boolean>;\n};\n\nexport { spinnerPropDefs };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAEA,IAAMA,EAAkB,CACtB,QAAS,CAAE,KAAM,UAAW,QAAS,EAAK,CAC5C",
|
|
6
6
|
"names": ["spinnerPropDefs"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as m}from"./chunk-WTCZAUFY.js";import{a as i}from"./chunk-VCV7RACK.js";import{a as f}from"./chunk-KEWNXANF.js";import{b as r}from"./chunk-VS2ZWRGO.js";import{a as p}from"./chunk-SBRPXQWH.js";import{a as s}from"./chunk-SJXV4BWZ.js";import{a as t}from"./chunk-N6KH2EOU.js";import{c as e}from"./chunk-CUNKWFKA.js";import{a as o}from"./chunk-NZJGC6ZW.js";var a=["h1","h2","h3","h4","h5","h6"],n=["1","2","3","4","5","6","7","8","9"],g={as:{type:"enum",values:a,default:"h2"},...o,size:{type:"enum",className:"kui-r-size",values:n,default:"6",responsive:!0},...i,...t,...m,...f,...s,...p,...e,...r};export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HSWMHW37.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/heading.props.tsx"],
|
|
4
4
|
"sourcesContent": ["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": "
|
|
5
|
+
"mappings": "wWAYA,IAAMA,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",
|
|
6
6
|
"names": ["as", "sizes", "headingPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "emphasisPropDef"]
|
|
7
7
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as o}from"./chunk-4KIZRO52.js";import{a as p,b as s}from"./chunk-GKDGNPBD.js";import{c as i}from"./chunk-5ON3XLRD.js";import{c}from"./chunk-OKQAVYW4.js";import*as e from"react";import b from"classnames";import{Checkbox as h}from"radix-ui";import{useControllableState as P}from"radix-ui/internal";var u=e.forwardRef((a,k)=>{let m=i(a,o.size),{className:n,color:C,checked:f,defaultChecked:t,onCheckedChange:d,...l}=c(m,o),[r,x]=P({prop:f,defaultProp:t??!1,onChange:d});return e.createElement(h.Root,{"data-accent-color":C,...l,defaultChecked:t,checked:r,onCheckedChange:x,asChild:!1,ref:k,className:b("kui-reset","kui-BaseCheckboxRoot","kui-CheckboxRoot",n)},e.createElement(h.Indicator,{asChild:!0,className:"kui-BaseCheckboxIndicator kui-CheckboxIndicator"},r==="indeterminate"?e.createElement(p,null):e.createElement(s,null)))});u.displayName="Checkbox";export{u as a};
|
|
3
|
+
//# sourceMappingURL=chunk-HVMRB3AH.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-P7VSZYG3.js";import{a as o}from"./chunk-NUVUXNHF.js";import{a as r}from"./chunk-EKTVL6SS.js";var s=["visible","hidden","clip","scroll","auto"],i=["static","relative","absolute","fixed","sticky"],e=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9"],p=["0","1"],u=["0","1"],n=["start","center","end","baseline","stretch"],a=["start","center","end","baseline","stretch"],g={...t,...r,...o,position:{type:"enum",className:"kui-r-position",values:i,responsive:!0},inset:{type:"enum | string",className:"kui-r-inset",customProperties:["--inset"],values:e,responsive:!0},top:{type:"enum | string",className:"kui-r-top",customProperties:["--top"],values:e,responsive:!0},right:{type:"enum | string",className:"kui-r-right",customProperties:["--right"],values:e,responsive:!0},bottom:{type:"enum | string",className:"kui-r-bottom",customProperties:["--bottom"],values:e,responsive:!0},left:{type:"enum | string",className:"kui-r-left",customProperties:["--left"],values:e,responsive:!0},overflow:{type:"enum",className:"kui-r-overflow",values:s,responsive:!0},overflowX:{type:"enum",className:"kui-r-ox",values:s,responsive:!0},overflowY:{type:"enum",className:"kui-r-oy",values:s,responsive:!0},flexBasis:{type:"string",className:"kui-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"kui-r-fs",customProperties:["--flex-shrink"],values:p,responsive:!0},flexGrow:{type:"enum | string",className:"kui-r-fg",customProperties:["--flex-grow"],values:u,responsive:!0},gridArea:{type:"string",className:"kui-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"kui-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"kui-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"kui-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"kui-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"kui-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"kui-r-gre",customProperties:["--grid-row-end"],responsive:!0},alignSelf:{type:"enum",className:"kui-r-as",values:n,responsive:!0},justifySelf:{type:"enum",className:"kui-r-js",values:a,responsive:!0}};export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JQVW4WNN.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as l}from"./chunk-OTCVSJT7.js";import{c as P}from"./chunk-GE7FRBZ4.js";import{a as e}from"./chunk-L54FWKJE.js";import{c as s}from"./chunk-OKQAVYW4.js";import*as o from"react";import W from"classnames";import{Tooltip as t}from"radix-ui";var a={content:{type:"ReactNode",required:!0},width:e.width,minWidth:e.minWidth,maxWidth:{...e.maxWidth,default:"360px"}};var m=200,f=o.createContext(!1);function N({delayDuration:i=m,children:r,...p}){return o.createElement(f.Provider,{value:!0},o.createElement(t.Provider,{delayDuration:i,...p},r))}N.displayName="TooltipProvider";var g=o.forwardRef((i,r)=>{let{children:p,className:d,open:T,defaultOpen:c,onOpenChange:v,delayDuration:y,disableHoverableContent:h,content:u,container:R,forceMount:C,...D}=s(i,a),x={open:T,defaultOpen:c,onOpenChange:v,delayDuration:y,disableHoverableContent:h},w=o.useContext(f),n=o.createElement(t.Root,{...x},o.createElement(t.Trigger,{asChild:!0},p),o.createElement(t.Portal,{container:R,forceMount:C},o.createElement(P,{asChild:!0},o.createElement(t.Content,{sideOffset:4,collisionPadding:10,...D,asChild:!1,ref:r,className:W("kui-TooltipContent",d)},o.createElement(l,{as:"p",className:"kui-TooltipText",size:"1"},u),o.createElement(t.Arrow,{className:"kui-TooltipArrow"})))));return w?n:o.createElement(t.Provider,{delayDuration:m},n)});g.displayName="Tooltip";export{N as a,g as b};
|
|
3
|
+
//# sourceMappingURL=chunk-K55IQP5H.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/tooltip.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { tooltipPropDefs } from './tooltip.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\n/** The rest before a tooltip opens, in milliseconds. */\nconst TOOLTIP_DELAY = 200;\n\n/** True inside a `TooltipProvider`, so a Tooltip knows it need not bring its own. */\nconst TooltipProviderContext = React.createContext(false);\n\ninterface TooltipProviderProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider> {}\n\n/**\n * Groups the tooltips inside it: the first one waits `delayDuration` (200ms), and the next ones\n * open at once while the pointer moves between them. Put it once near the root of the app.\n * A Tooltip outside one still works, with the same delay, but each one waits on its own.\n */\nfunction TooltipProvider({ delayDuration = TOOLTIP_DELAY, children, ...props }: TooltipProviderProps) {\n return (\n <TooltipProviderContext.Provider value={true}>\n <TooltipPrimitive.Provider delayDuration={delayDuration} {...props}>\n {children}\n </TooltipPrimitive.Provider>\n </TooltipProviderContext.Provider>\n );\n}\nTooltipProvider.displayName = 'TooltipProvider';\n\ntype TooltipElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs>;\ninterface TooltipProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>,\n ComponentPropsWithout<typeof TooltipPrimitive.Content, RemovedProps | 'content'>,\n TooltipOwnProps {\n content: React.ReactNode;\n container?: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Portal>['container'];\n}\nconst Tooltip = React.forwardRef<TooltipElement, TooltipProps>((props, forwardedRef) => {\n const {\n children,\n className,\n open,\n defaultOpen,\n onOpenChange,\n delayDuration,\n disableHoverableContent,\n content,\n container,\n forceMount,\n ...tooltipContentProps\n } = extractProps(props, tooltipPropDefs);\n const rootProps = { open, defaultOpen, onOpenChange, delayDuration, disableHoverableContent };\n const hasProvider = React.useContext(TooltipProviderContext);\n const tooltip = (\n <TooltipPrimitive.Root {...rootProps}>\n <TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <TooltipPrimitive.Content\n sideOffset={4}\n collisionPadding={10}\n {...tooltipContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-TooltipContent', className)}\n >\n <Text as=\"p\" className=\"kui-TooltipText\" size=\"1\">\n {content}\n </Text>\n <TooltipPrimitive.Arrow className=\"kui-TooltipArrow\" />\n </TooltipPrimitive.Content>\n </Theme>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n // Radix needs a provider above every tooltip. Outside a TooltipProvider, bring one.\n return hasProvider ? tooltip : <TooltipPrimitive.Provider delayDuration={TOOLTIP_DELAY}>{tooltip}</TooltipPrimitive.Provider>;\n});\nTooltip.displayName = 'Tooltip';\n\nexport { Tooltip, TooltipProvider };\nexport type { TooltipProps, TooltipProviderProps };\n"],
|
|
5
|
-
"mappings": ";
|
|
6
|
-
"names": ["React", "classNames", "TooltipPrimitive", "TOOLTIP_DELAY", "TooltipProviderContext", "TooltipProvider", "delayDuration", "children", "props", "TooltipPrimitive", "Tooltip", "forwardedRef", "className", "open", "defaultOpen", "onOpenChange", "disableHoverableContent", "content", "container", "forceMount", "tooltipContentProps", "extractProps", "tooltipPropDefs", "rootProps", "hasProvider", "tooltip", "Theme", "classNames", "Text"]
|
|
3
|
+
"sources": ["../../src/components/tooltip.tsx", "../../src/components/tooltip.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { tooltipPropDefs } from './tooltip.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\n/** The rest before a tooltip opens, in milliseconds. */\nconst TOOLTIP_DELAY = 200;\n\n/** True inside a `TooltipProvider`, so a Tooltip knows it need not bring its own. */\nconst TooltipProviderContext = React.createContext(false);\n\ninterface TooltipProviderProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider> {}\n\n/**\n * Groups the tooltips inside it: the first one waits `delayDuration` (200ms), and the next ones\n * open at once while the pointer moves between them. Put it once near the root of the app.\n * A Tooltip outside one still works, with the same delay, but each one waits on its own.\n */\nfunction TooltipProvider({ delayDuration = TOOLTIP_DELAY, children, ...props }: TooltipProviderProps) {\n return (\n <TooltipProviderContext.Provider value={true}>\n <TooltipPrimitive.Provider delayDuration={delayDuration} {...props}>\n {children}\n </TooltipPrimitive.Provider>\n </TooltipProviderContext.Provider>\n );\n}\nTooltipProvider.displayName = 'TooltipProvider';\n\ntype TooltipElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs>;\ninterface TooltipProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>,\n ComponentPropsWithout<typeof TooltipPrimitive.Content, RemovedProps | 'content'>,\n TooltipOwnProps {\n content: React.ReactNode;\n container?: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Portal>['container'];\n}\nconst Tooltip = React.forwardRef<TooltipElement, TooltipProps>((props, forwardedRef) => {\n const {\n children,\n className,\n open,\n defaultOpen,\n onOpenChange,\n delayDuration,\n disableHoverableContent,\n content,\n container,\n forceMount,\n ...tooltipContentProps\n } = extractProps(props, tooltipPropDefs);\n const rootProps = { open, defaultOpen, onOpenChange, delayDuration, disableHoverableContent };\n const hasProvider = React.useContext(TooltipProviderContext);\n const tooltip = (\n <TooltipPrimitive.Root {...rootProps}>\n <TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <TooltipPrimitive.Content\n sideOffset={4}\n collisionPadding={10}\n {...tooltipContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-TooltipContent', className)}\n >\n <Text as=\"p\" className=\"kui-TooltipText\" size=\"1\">\n {content}\n </Text>\n <TooltipPrimitive.Arrow className=\"kui-TooltipArrow\" />\n </TooltipPrimitive.Content>\n </Theme>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n // Radix needs a provider above every tooltip. Outside a TooltipProvider, bring one.\n return hasProvider ? tooltip : <TooltipPrimitive.Provider delayDuration={TOOLTIP_DELAY}>{tooltip}</TooltipPrimitive.Provider>;\n});\nTooltip.displayName = 'Tooltip';\n\nexport { Tooltip, TooltipProvider };\nexport type { TooltipProps, TooltipProviderProps };\n", "import { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst tooltipPropDefs = {\n content: { type: 'ReactNode', required: true },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '360px' },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n content: PropDef<React.ReactNode>;\n};\n\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs & typeof widthPropDefs>;\n\nexport { tooltipPropDefs };\nexport type { TooltipOwnProps };\n"],
|
|
5
|
+
"mappings": ";gKAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,WAAWC,MAAwB,WCE5C,IAAMC,EAAkB,CACtB,QAAS,CAAE,KAAM,YAAa,SAAU,EAAK,EAC7C,MAAOC,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,EAAc,SAAU,QAAS,OAAQ,CAC1D,EDIA,IAAMC,EAAgB,IAGhBC,EAA+B,gBAAc,EAAK,EASxD,SAASC,EAAgB,CAAE,cAAAC,EAAgBH,EAAe,SAAAI,EAAU,GAAGC,CAAM,EAAyB,CACpG,OACE,gBAACJ,EAAuB,SAAvB,CAAgC,MAAO,IACtC,gBAACK,EAAiB,SAAjB,CAA0B,cAAeH,EAAgB,GAAGE,GAC1DD,CACH,CACF,CAEJ,CACAF,EAAgB,YAAc,kBAW9B,IAAMK,EAAgB,aAAyC,CAACF,EAAOG,IAAiB,CACtF,GAAM,CACJ,SAAAJ,EACA,UAAAK,EACA,KAAAC,EACA,YAAAC,EACA,aAAAC,EACA,cAAAT,EACA,wBAAAU,EACA,QAAAC,EACA,UAAAC,EACA,WAAAC,EACA,GAAGC,CACL,EAAIC,EAAab,EAAOc,CAAe,EACjCC,EAAY,CAAE,KAAAV,EAAM,YAAAC,EAAa,aAAAC,EAAc,cAAAT,EAAe,wBAAAU,CAAwB,EACtFQ,EAAoB,aAAWpB,CAAsB,EACrDqB,EACJ,gBAAChB,EAAiB,KAAjB,CAAuB,GAAGc,GACzB,gBAACd,EAAiB,QAAjB,CAAyB,QAAO,IAAEF,CAAS,EAC5C,gBAACE,EAAiB,OAAjB,CAAwB,UAAWS,EAAW,WAAYC,GACzD,gBAACO,EAAA,CAAM,QAAO,IACZ,gBAACjB,EAAiB,QAAjB,CACC,WAAY,EACZ,iBAAkB,GACjB,GAAGW,EACJ,QAAS,GACT,IAAKT,EACL,UAAWgB,EAAW,qBAAsBf,CAAS,GAErD,gBAACgB,EAAA,CAAK,GAAG,IAAI,UAAU,kBAAkB,KAAK,KAC3CX,CACH,EACA,gBAACR,EAAiB,MAAjB,CAAuB,UAAU,mBAAmB,CACvD,CACF,CACF,CACF,EAGF,OAAOe,EAAcC,EAAU,gBAAChB,EAAiB,SAAjB,CAA0B,cAAeN,GAAgBsB,CAAQ,CACnG,CAAC,EACDf,EAAQ,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "TooltipPrimitive", "tooltipPropDefs", "widthPropDefs", "TOOLTIP_DELAY", "TooltipProviderContext", "TooltipProvider", "delayDuration", "children", "props", "TooltipPrimitive", "Tooltip", "forwardedRef", "className", "open", "defaultOpen", "onOpenChange", "disableHoverableContent", "content", "container", "forceMount", "tooltipContentProps", "extractProps", "tooltipPropDefs", "rootProps", "hasProvider", "tooltip", "Theme", "classNames", "Text"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/_internal/pane-band-context.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\n\ntype BandSize = '1' | '2' | '3' | '4';\n\n/**\n * Set by `Shell.PaneHeader` and `Shell.PaneFooter` to their band size, and by `Shell.Scroll` to\n * null (a scrolling list has no band). A `Theme asChild`, the root of every portalled surface\n * (Popover, Dialog, Sheet, menus), sets null too, so a Toolbar in one does not take the Shell's\n * step. `Shell.Root` clears it again. Unset (`undefined`) everywhere else.\n *\n * Its own module so Theme can reset it without bringing the Shell.\n */\nconst PaneBandSizeContext = React.createContext<BandSize | null | undefined>(undefined);\n\nexport { PaneBandSizeContext };\nexport type { BandSize };\n"],
|
|
5
|
+
"mappings": ";AAAA,UAAYA,MAAW,QAYvB,IAAMC,EAA4B,gBAA2C,MAAS",
|
|
6
|
+
"names": ["React", "PaneBandSizeContext"]
|
|
7
|
+
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/radio-group.props.tsx"],
|
|
4
4
|
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\n\nconst radioGroupRootPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n ...colorPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { radioGroupRootPropDefs };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "gFAKA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAE3BC,EAAyB,CAC7B,GAAGC,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQF,EAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,GAAGG,CACL",
|
|
6
6
|
"names": ["sizes", "radioGroupRootPropDefs", "asChildPropDef", "colorPropDef"]
|
|
7
7
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as t}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as t}from"./chunk-YCLPURTD.js";import{a as r,b as e}from"./chunk-7N2Q5WOM.js";import{b as s}from"./chunk-5KMEUZWN.js";import{c as p}from"./chunk-OKQAVYW4.js";import*as o from"react";import x from"classnames";var f=o.forwardRef((m,a)=>{let{className:l,asChild:n,as:i="div",...P}=p(m,t,r,e);return o.createElement(n?s:i,{...P,ref:a,className:x("kui-Flex",l)})});f.displayName="Flex";export{f as a};
|
|
3
|
+
//# sourceMappingURL=chunk-KVVRFWGQ.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{c as t}from"./chunk-HBWBPBSA.js";import{b as p}from"./chunk-XU74PNM2.js";import{b as a,c as i}from"./chunk-OKQAVYW4.js";import*as r from"react";import R from"classnames";import{Progress as n}from"radix-ui";var v=["surface","soft","outline"],m={variant:{type:"enum",className:"kui-variant",values:v,default:"surface"},...t,...p,duration:{type:"string"}};var D=r.forwardRef((f,P)=>{let{className:u,style:c,color:d,radius:g,duration:l,...e}=i(f,m),{value:o,max:y}=e,s=o!=null&&o>=0&&o<=(y??100);return r.createElement(n.Root,{"data-accent-color":d,"data-radius":g,ref:P,className:R("kui-ProgressRoot",u),style:a({"--progress-duration":s?void 0:l,"--progress-value":s?o:void 0,"--progress-max":e.max??void 0},c),...e,asChild:!1},r.createElement(n.Indicator,{className:"kui-ProgressIndicator"}))});D.displayName="Progress";export{D as a};
|
|
3
|
+
//# sourceMappingURL=chunk-LFAUMDU5.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/progress.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Progress as ProgressPrimitive } from 'radix-ui';\n\nimport { progressPropDefs } from './progress.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { mergeStyles } from '../helpers/merge-styles.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ProgressElement = React.ElementRef<typeof ProgressPrimitive.Root>;\ntype ProgressOwnProps = GetPropDefTypes<typeof progressPropDefs>;\ninterface ProgressProps\n extends ComponentPropsWithout<typeof ProgressPrimitive.Root, RemovedProps | 'children'>,\n ProgressOwnProps {\n duration?: `${number}s` | `${number}ms`;\n}\nconst Progress = React.forwardRef<ProgressElement, ProgressProps>((props, forwardedRef) => {\n const { className, style, color, radius, duration, ...progressProps } = extractProps(\n props,\n progressPropDefs\n );\n\n // Radix treats `null`, `undefined` and a value outside 0 to max as indeterminate, so all of\n // them keep a custom duration.\n const { value, max } = progressProps;\n const isDeterminate = value != null && value >= 0 && value <= (max ?? 100);\n\n return (\n <ProgressPrimitive.Root\n data-accent-color={color}\n data-radius={radius}\n ref={forwardedRef}\n className={classNames('kui-ProgressRoot', className)}\n style={mergeStyles(\n {\n '--progress-duration': isDeterminate ? undefined : duration,\n '--progress-value': isDeterminate ? value : undefined,\n '--progress-max': progressProps.max ?? undefined,\n },\n style\n )}\n {...progressProps}\n asChild={false}\n >\n <ProgressPrimitive.Indicator className=\"kui-ProgressIndicator\" />\n </ProgressPrimitive.Root>\n );\n});\nProgress.displayName = 'Progress';\n\nexport { Progress };\nexport type { ProgressProps };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["React", "classNames", "ProgressPrimitive", "Progress", "props", "forwardedRef", "className", "style", "color", "radius", "duration", "progressProps", "extractProps", "progressPropDefs", "value", "max", "isDeterminate", "ProgressPrimitive", "classNames", "mergeStyles"]
|
|
3
|
+
"sources": ["../../src/components/progress.tsx", "../../src/components/progress.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Progress as ProgressPrimitive } from 'radix-ui';\n\nimport { progressPropDefs } from './progress.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { mergeStyles } from '../helpers/merge-styles.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ProgressElement = React.ElementRef<typeof ProgressPrimitive.Root>;\ntype ProgressOwnProps = GetPropDefTypes<typeof progressPropDefs>;\ninterface ProgressProps\n extends ComponentPropsWithout<typeof ProgressPrimitive.Root, RemovedProps | 'children'>,\n ProgressOwnProps {\n duration?: `${number}s` | `${number}ms`;\n}\nconst Progress = React.forwardRef<ProgressElement, ProgressProps>((props, forwardedRef) => {\n const { className, style, color, radius, duration, ...progressProps } = extractProps(\n props,\n progressPropDefs\n );\n\n // Radix treats `null`, `undefined` and a value outside 0 to max as indeterminate, so all of\n // them keep a custom duration.\n const { value, max } = progressProps;\n const isDeterminate = value != null && value >= 0 && value <= (max ?? 100);\n\n return (\n <ProgressPrimitive.Root\n data-accent-color={color}\n data-radius={radius}\n ref={forwardedRef}\n className={classNames('kui-ProgressRoot', className)}\n style={mergeStyles(\n {\n '--progress-duration': isDeterminate ? undefined : duration,\n '--progress-value': isDeterminate ? value : undefined,\n '--progress-max': progressProps.max ?? undefined,\n },\n style\n )}\n {...progressProps}\n asChild={false}\n >\n <ProgressPrimitive.Indicator className=\"kui-ProgressIndicator\" />\n </ProgressPrimitive.Root>\n );\n});\nProgress.displayName = 'Progress';\n\nexport { Progress };\nexport type { ProgressProps };\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 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": ";+HAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,YAAYC,MAAyB,WCG9C,IAAMC,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,EDMA,IAAMC,EAAiB,aAA2C,CAACC,EAAOC,IAAiB,CACzF,GAAM,CAAE,UAAAC,EAAW,MAAAC,EAAO,MAAAC,EAAO,OAAAC,EAAQ,SAAAC,EAAU,GAAGC,CAAc,EAAIC,EACtER,EACAS,CACF,EAIM,CAAE,MAAAC,EAAO,IAAAC,CAAI,EAAIJ,EACjBK,EAAgBF,GAAS,MAAQA,GAAS,GAAKA,IAAUC,GAAO,KAEtE,OACE,gBAACE,EAAkB,KAAlB,CACC,oBAAmBT,EACnB,cAAaC,EACb,IAAKJ,EACL,UAAWa,EAAW,mBAAoBZ,CAAS,EACnD,MAAOa,EACL,CACE,sBAAuBH,EAAgB,OAAYN,EACnD,mBAAoBM,EAAgBF,EAAQ,OAC5C,iBAAkBH,EAAc,KAAO,MACzC,EACAJ,CACF,EACC,GAAGI,EACJ,QAAS,IAET,gBAACM,EAAkB,UAAlB,CAA4B,UAAU,wBAAwB,CACjE,CAEJ,CAAC,EACDd,EAAS,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "ProgressPrimitive", "variants", "progressPropDefs", "colorPropDef", "radiusPropDef", "Progress", "props", "forwardedRef", "className", "style", "color", "radius", "duration", "progressProps", "extractProps", "progressPropDefs", "value", "max", "isDeterminate", "ProgressPrimitive", "classNames", "mergeStyles"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as o}from"./chunk-CLJ6SEGP.js";import{c as s}from"./chunk-OKQAVYW4.js";import*as e from"react";import P from"classnames";import{Slot as b}from"radix-ui";var f=["1","2","3","4","5","6","7","8","9"],d=["raised","soft"],r={...o,size:{type:"enum",className:"kui-r-size",values:f,responsive:!0},variant:{type:"enum",className:"kui-variant",values:d,default:"raised"}};var c=e.forwardRef((t,p)=>{let{asChild:a,className:m,...i}=s(t,r),n=a?b.Root:"kbd";return e.createElement(n,{...i,ref:p,className:P("kui-reset","kui-Kbd",m)})});c.displayName="Kbd";export{c as a};
|
|
3
|
+
//# sourceMappingURL=chunk-LGZCNQBS.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/kbd.tsx", "../../src/components/kbd.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { kbdPropDefs } from './kbd.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype KbdElement = React.ElementRef<'kbd'>;\ntype KbdOwnProps = GetPropDefTypes<typeof kbdPropDefs>;\ninterface KbdProps extends ComponentPropsWithout<'kbd', RemovedProps>, KbdOwnProps {}\nconst Kbd = React.forwardRef<KbdElement, KbdProps>((props, forwardedRef) => {\n const { asChild, className, ...kbdProps } = extractProps(props, kbdPropDefs);\n const Comp = asChild ? Slot.Root : 'kbd';\n return (\n <Comp\n {...kbdProps}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-Kbd', className)}\n />\n );\n});\nKbd.displayName = 'Kbd';\n\nexport { Kbd };\nexport type { KbdProps };\n", "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": ";gFAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WCErB,IAAMC,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,EDRA,IAAMG,EAAY,aAAiC,CAACC,EAAOC,IAAiB,CAC1E,GAAM,CAAE,QAAAC,EAAS,UAAAC,EAAW,GAAGC,CAAS,EAAIC,EAAaL,EAAOM,CAAW,EACrEC,EAAOL,EAAUM,EAAK,KAAO,MACnC,OACE,gBAACD,EAAA,CACE,GAAGH,EACJ,IAAKH,EACL,UAAWQ,EAAW,YAAa,UAAWN,CAAS,EACzD,CAEJ,CAAC,EACDJ,EAAI,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "Slot", "sizes", "variants", "kbdPropDefs", "asChildPropDef", "Kbd", "props", "forwardedRef", "asChild", "className", "kbdProps", "extractProps", "kbdPropDefs", "Comp", "Slot", "classNames"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as C,b,c as $,d as B,g as M,k as q,m as F}from"./chunk-GHWEXMF6.js";import
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as O,b as _}from"./chunk-G66WDIIV.js";import{a as C,b,c as $,d as B,g as M,k as q,m as F}from"./chunk-GHWEXMF6.js";import*as t from"react";import{useLayoutEffect as v}from"radix-ui/internal";var I=e=>typeof e=="object"&&e!==null;function ne(e){for(let a of["initial","xs","sm","md","lg","xl"]){let l=e[a];if(l!==void 0)return l}return"closed"}function re(e){let{name:a,label:l,propNames:o,presentationTable:r,builtIn:m}=e,d=q(`Shell.${l}`),G=t.useId(),k=e.id??`shell-${a}${G}`,c=e.controlled!==void 0,x=I(e.controlled);x&&(`${l}${o.controlled}${o.default}`,void 0);let p=x?e.controlled:void 0,z=p??(I(e.defaultValue)?e.defaultValue:void 0),J=B(z),[Q,W]=t.useState(()=>typeof e.defaultValue=="string"?e.defaultValue:"auto"),P=t.useMemo(()=>p?C(p,()=>ne(p)):C(z,n=>m(r[n])),[J,x,r,m]),u=Q;c&&(u=p?"auto":e.controlled);let X=b(r)===void 0||u==="auto"&&b(P)===void 0,{breakpoint:H,ready:L}=_(X),j=n=>{let f=b(n);return f!==void 0?f:L?n[H]:void 0},i=u==="auto"?j(P):u,y=j(r),E=y==="overlay",s=i===void 0?void 0:i!=="closed",N=s===!0&&E,D=e.defaultValue,V=t.useRef({state:u,value:i,autoTable:P,defaultValue:D,controlled:c,onChange:e.onChange,toggleNext:e.toggleNext});v(()=>{V.current={state:u,value:i,autoTable:P,defaultValue:D,controlled:c,onChange:e.onChange,toggleNext:e.toggleNext}});let h=t.useCallback(()=>{let n=V.current;return n.value!==void 0?n.value:n.state==="auto"?n.autoTable[O()]:void 0},[]),T=t.useCallback(()=>{let n=V.current;return typeof n.defaultValue=="string"?n.defaultValue:I(n.defaultValue)?n.autoTable[O()]:void 0},[]),g=t.useCallback((n,f)=>{let R=V.current;h()!==n&&(R.onChange?.(n,f),R.controlled||W(n))},[h]),w=t.useCallback(n=>{let f=V.current,R=h()??"closed",ee=f.toggleNext?f.toggleNext(R,T()):R==="closed"?"open":"closed";g(ee,n)},[g,h,T]),A=t.useRef(null),Y=t.useCallback(n=>{A.current=n},[]);v(()=>{let n={name:a,id:k,el:A.current,value:i,presentation:y,presentationTable:r,overlayLive:N,size:e.size,setValue:g,toggle:w};return d.entries.set(a,n),M(d),()=>{d.entries.get(a)===n&&(d.entries.delete(a),M(d))}},[d,a,k,i,y,r,N,e.size,g,w]);let S=t.useRef({onExpand:e.onExpand,onCollapse:e.onCollapse});v(()=>{S.current={onExpand:e.onExpand,onCollapse:e.onCollapse}});let K=t.useRef({state:u,shown:s});t.useEffect(()=>{let n=K.current;n.state!==u&&n.shown!==void 0&&s!==void 0&&n.shown!==s&&(s?S.current.onExpand?.():S.current.onCollapse?.()),K.current={state:u,shown:s}},[u,s]),v(()=>{},[]);let U=t.useRef(c);t.useEffect(()=>{},[c,l,o.controlled]);let Z=F(d,a)&&s===!1&&!E;return{store:d,id:k,state:u,value:i,shown:s,presentation:y,overlaying:E,overlayLive:N,peeking:Z,ready:L,breakpoint:H,autoTable:P,setValue:g,toggle:w,defaultHereNow:T,setElement:Y}}function ue(e,a){let{state:l,value:o,presentation:r,shown:m}=e;return{...a,"data-state":l,...l==="auto"?$("auto",e.autoTable):{},"data-presentation":r,"data-mode":o===void 0?void 0:o==="closed"?"collapsed":"expanded","data-open":r==="stacked"&&m?"":void 0,"data-peek":e.peeking?"":void 0}}function se(e,a){let l=B(e),o=t.useMemo(()=>C(e,()=>a),[l,a]),r=t.useMemo(()=>b(o)===void 0?$("presentation",o):{},[o]);return{table:o,attributes:r}}export{re as a,ue as b,se as c};
|
|
3
|
+
//# sourceMappingURL=chunk-LTUW36HM.js.map
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=chunk-QQY4WFJL.js.map
|
|
1
|
+
import{b as r}from"./chunk-KRJTW535.js";import{c as e}from"./chunk-CUNKWFKA.js";var s=["1","2","3","4"],a=["raised","surface","soft","outline","ghost"],o=["none","vertical","horizontal","both"],n={size:{type:"enum",className:"kui-r-size",values:s,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:a,default:"raised"},resize:{type:"enum",className:"kui-r-resize",values:o,responsive:!0},error:{type:"boolean",default:!1},errorMessage:{type:"string",default:void 0},required:{type:"boolean",default:!1},"aria-describedby":{type:"string",default:void 0},"aria-labelledby":{type:"string",default:void 0},...e,...r};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LUNWI377.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/text-area.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 sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['raised', 'surface', 'soft', 'outline', 'ghost'] as const;\nconst resizeValues = ['none', 'vertical', 'horizontal', 'both'] as const;\n\n// prettier-ignore\nconst textAreaPropDefs = {\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 resize: { type: 'enum', className: 'kui-r-resize', values: resizeValues, responsive: true },\n // Error and validation props\n error: { type: 'boolean', default: false },\n errorMessage: { type: 'string', default: undefined },\n required: { type: 'boolean', default: false },\n // Accessibility props\n 'aria-describedby': { type: 'string', default: undefined },\n 'aria-labelledby': { type: 'string', default: undefined },\n ...colorPropDef,\n ...radiusPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n resize: PropDef<(typeof resizeValues)[number]>;\n error: PropDef<boolean>;\n errorMessage: PropDef<string | undefined>;\n required: PropDef<boolean>;\n 'aria-describedby': PropDef<string | undefined>;\n 'aria-labelledby': PropDef<string | undefined>;\n};\n\nexport { textAreaPropDefs };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "gFAKA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,SAAU,UAAW,OAAQ,UAAW,OAAO,EAC3DC,EAAe,CAAC,OAAQ,WAAY,aAAc,MAAM,EAGxDC,EAAmB,CACvB,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQH,EAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQC,EAAU,QAAS,QAAS,EACvF,OAAQ,CAAE,KAAM,OAAQ,UAAW,eAAgB,OAAQC,EAAe,WAAY,EAAK,EAE3F,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,EACzC,aAAc,CAAE,KAAM,SAAU,QAAS,MAAU,EACnD,SAAU,CAAE,KAAM,UAAW,QAAS,EAAM,EAE5C,mBAAoB,CAAE,KAAM,SAAU,QAAS,MAAU,EACzD,kBAAmB,CAAE,KAAM,SAAU,QAAS,MAAU,EACxD,GAAGE,EACH,GAAGC,CACL",
|
|
6
6
|
"names": ["sizes", "variants", "resizeValues", "textAreaPropDefs", "colorPropDef", "radiusPropDef"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{c as y}from"./chunk-HBWBPBSA.js";import{c as x}from"./chunk-5ON3XLRD.js";import{b}from"./chunk-XU74PNM2.js";import{b as P,c as v}from"./chunk-OKQAVYW4.js";import*as e from"react";import g from"classnames";var w=["1","2","3","4"],I=["raised","surface","soft","outline","ghost"],j=["none","vertical","horizontal","both"],p={size:{type:"enum",className:"kui-r-size",values:w,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:I,default:"raised"},resize:{type:"enum",className:"kui-r-resize",values:j,responsive:!0},error:{type:"boolean",default:!1},errorMessage:{type:"string",default:void 0},required:{type:"boolean",default:!1},"aria-describedby":{type:"string",default:void 0},"aria-labelledby":{type:"string",default:void 0},...y,...b};var q=e.forwardRef((A,D)=>{let{className:d,style:l,...T}=x(A,p.size),{className:z,color:N,radius:h,style:u,...r}=v(T,p),t=!!r.errorMessage,o=e.useId(),{"aria-describedby":i,"aria-labelledby":f,"aria-invalid":a}=r,n=!!r.error||a===!0||a==="true",c=e.useMemo(()=>{let s=[];return r.errorMessage&&s.push(o),i&&s.push(i),s.length>0?s.join(" "):void 0},[r.errorMessage,i,o]),R=e.useMemo(()=>({"aria-invalid":n?!0:a,"aria-describedby":c,"aria-labelledby":f}),[n,a,c,f]),{error:E,errorMessage:B,required:M,"aria-describedby":C,"aria-labelledby":S,...k}=r,m=e.createElement("div",{"data-accent-color":N,"data-radius":h,className:g("kui-TextAreaRoot",z,!t&&d,{"kui-error":n}),style:t?u:P(u,l)},e.createElement("textarea",{className:"kui-reset kui-TextAreaInput",ref:D,...k,required:M||void 0,...R}));return t?e.createElement("div",{className:g("kui-TextAreaWrapper",d),style:l},m,e.createElement("div",{id:o,className:"kui-TextAreaErrorMessage",role:"alert"},r.errorMessage)):m});q.displayName="TextArea";export{q as a};
|
|
3
|
+
//# sourceMappingURL=chunk-M7IQIKB4.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/text-area.tsx", "../../src/components/text-area.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { textAreaPropDefs } from './text-area.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { mergeStyles } from '../helpers/merge-styles.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TextAreaElement = React.ElementRef<'textarea'>;\ntype TextAreaOwnProps = GetPropDefTypes<typeof textAreaPropDefs> & {\n defaultValue?: string;\n value?: string;\n};\ninterface TextAreaProps\n extends ComponentPropsWithout<'textarea', RemovedProps | 'size' | 'value'>,\n TextAreaOwnProps {}\n\nconst TextArea = React.forwardRef<TextAreaElement, TextAreaProps>((ownProps, forwardedRef) => {\n // The caller's className and style are kept apart from the size and variant classes: with an\n // error message they go on the wrapper, which is then the one box the parent lays out.\n const { className: ownClassName, style: ownStyle, ...themedProps } = useThemeSizeProps(ownProps, textAreaPropDefs.size);\n const { className, color, radius, style, ...textAreaProps } =\n extractProps(themedProps, textAreaPropDefs);\n const wrapped = Boolean(textAreaProps.errorMessage);\n\n // Generate unique IDs for accessibility\n const errorId = React.useId();\n\n const { 'aria-describedby': ariaDescribedby, 'aria-labelledby': ariaLabelledby, 'aria-invalid': ariaInvalid } = textAreaProps;\n\n // Invalid when `error` is set or the caller passes aria-invalid; the CSS keys on aria-invalid only.\n const isInvalid = Boolean(textAreaProps.error) || ariaInvalid === true || ariaInvalid === 'true';\n\n // Build aria-describedby string\n const describedBy = React.useMemo(() => {\n const parts = [];\n if (textAreaProps.errorMessage) parts.push(errorId);\n if (ariaDescribedby) parts.push(ariaDescribedby);\n return parts.length > 0 ? parts.join(' ') : undefined;\n }, [textAreaProps.errorMessage, ariaDescribedby, errorId]);\n\n // Build aria attributes\n const ariaProps = React.useMemo(\n () => ({\n 'aria-invalid': isInvalid ? true : ariaInvalid,\n 'aria-describedby': describedBy,\n 'aria-labelledby': ariaLabelledby,\n }),\n [isInvalid, ariaInvalid, describedBy, ariaLabelledby],\n );\n\n // Filter out our custom props to avoid DOM warnings\n const {\n error,\n errorMessage,\n required,\n 'aria-describedby': _ariaDescribedby,\n 'aria-labelledby': _ariaLabelledby,\n ...nativeTextAreaProps\n } = textAreaProps;\n\n const field = (\n <div\n data-accent-color={color}\n data-radius={radius}\n className={classNames('kui-TextAreaRoot', className, !wrapped && ownClassName, {\n // Not used by the library's CSS (invalid styling keys on aria-invalid); kept as a hook for app styles.\n 'kui-error': isInvalid,\n })}\n style={wrapped ? style : mergeStyles(style, ownStyle)}\n >\n <textarea\n className=\"kui-reset kui-TextAreaInput\"\n ref={forwardedRef}\n {...nativeTextAreaProps}\n required={required || undefined}\n {...ariaProps}\n />\n </div>\n );\n if (!wrapped) return field;\n\n // With a message, one wrapper holds the box and the message below it, so the parent still\n // lays out a single box and the caller's className and style size the pair.\n return (\n <div className={classNames('kui-TextAreaWrapper', ownClassName)} style={ownStyle}>\n {field}\n <div id={errorId} className=\"kui-TextAreaErrorMessage\" role=\"alert\">\n {textAreaProps.errorMessage}\n </div>\n </div>\n );\n});\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\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;\nconst variants = ['raised', 'surface', 'soft', 'outline', 'ghost'] as const;\nconst resizeValues = ['none', 'vertical', 'horizontal', 'both'] as const;\n\n// prettier-ignore\nconst textAreaPropDefs = {\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 resize: { type: 'enum', className: 'kui-r-resize', values: resizeValues, responsive: true },\n // Error and validation props\n error: { type: 'boolean', default: false },\n errorMessage: { type: 'string', default: undefined },\n required: { type: 'boolean', default: false },\n // Accessibility props\n 'aria-describedby': { type: 'string', default: undefined },\n 'aria-labelledby': { type: 'string', default: undefined },\n ...colorPropDef,\n ...radiusPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n resize: PropDef<(typeof resizeValues)[number]>;\n error: PropDef<boolean>;\n errorMessage: PropDef<string | undefined>;\n required: PropDef<boolean>;\n 'aria-describedby': PropDef<string | undefined>;\n 'aria-labelledby': PropDef<string | undefined>;\n};\n\nexport { textAreaPropDefs };\n"],
|
|
5
|
+
"mappings": ";kKAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aCIvB,IAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,SAAU,UAAW,OAAQ,UAAW,OAAO,EAC3DC,EAAe,CAAC,OAAQ,WAAY,aAAc,MAAM,EAGxDC,EAAmB,CACvB,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQH,EAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQC,EAAU,QAAS,QAAS,EACvF,OAAQ,CAAE,KAAM,OAAQ,UAAW,eAAgB,OAAQC,EAAe,WAAY,EAAK,EAE3F,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,EACzC,aAAc,CAAE,KAAM,SAAU,QAAS,MAAU,EACnD,SAAU,CAAE,KAAM,UAAW,QAAS,EAAM,EAE5C,mBAAoB,CAAE,KAAM,SAAU,QAAS,MAAU,EACzD,kBAAmB,CAAE,KAAM,SAAU,QAAS,MAAU,EACxD,GAAGE,EACH,GAAGC,CACL,EDHA,IAAMC,EAAiB,aAA2C,CAACC,EAAUC,IAAiB,CAG5F,GAAM,CAAE,UAAWC,EAAc,MAAOC,EAAU,GAAGC,CAAY,EAAIC,EAAkBL,EAAUM,EAAiB,IAAI,EAChH,CAAE,UAAAC,EAAW,MAAAC,EAAO,OAAAC,EAAQ,MAAAC,EAAO,GAAGC,CAAc,EACxDC,EAAaR,EAAaE,CAAgB,EACtCO,EAAU,EAAQF,EAAc,aAGhCG,EAAgB,QAAM,EAEtB,CAAE,mBAAoBC,EAAiB,kBAAmBC,EAAgB,eAAgBC,CAAY,EAAIN,EAG1GO,EAAY,EAAQP,EAAc,OAAUM,IAAgB,IAAQA,IAAgB,OAGpFE,EAAoB,UAAQ,IAAM,CACtC,IAAMC,EAAQ,CAAC,EACf,OAAIT,EAAc,cAAcS,EAAM,KAAKN,CAAO,EAC9CC,GAAiBK,EAAM,KAAKL,CAAe,EACxCK,EAAM,OAAS,EAAIA,EAAM,KAAK,GAAG,EAAI,MAC9C,EAAG,CAACT,EAAc,aAAcI,EAAiBD,CAAO,CAAC,EAGnDO,EAAkB,UACtB,KAAO,CACL,eAAgBH,EAAY,GAAOD,EACnC,mBAAoBE,EACpB,kBAAmBH,CACrB,GACA,CAACE,EAAWD,EAAaE,EAAaH,CAAc,CACtD,EAGM,CACJ,MAAAM,EACA,aAAAC,EACA,SAAAC,EACA,mBAAoBC,EACpB,kBAAmBC,EACnB,GAAGC,CACL,EAAIhB,EAEEiB,EACJ,gBAAC,OACC,oBAAmBpB,EACnB,cAAaC,EACb,UAAWoB,EAAW,mBAAoBtB,EAAW,CAACM,GAAWX,EAAc,CAE7E,YAAagB,CACf,CAAC,EACD,MAAOL,EAAUH,EAAQoB,EAAYpB,EAAOP,CAAQ,GAEpD,gBAAC,YACC,UAAU,8BACV,IAAKF,EACJ,GAAG0B,EACJ,SAAUH,GAAY,OACrB,GAAGH,EACN,CACF,EAEF,OAAKR,EAKH,gBAAC,OAAI,UAAWgB,EAAW,sBAAuB3B,CAAY,EAAG,MAAOC,GACrEyB,EACD,gBAAC,OAAI,GAAId,EAAS,UAAU,2BAA2B,KAAK,SACzDH,EAAc,YACjB,CACF,EAVmBiB,CAYvB,CAAC,EAED7B,EAAS,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "sizes", "variants", "resizeValues", "textAreaPropDefs", "colorPropDef", "radiusPropDef", "TextArea", "ownProps", "forwardedRef", "ownClassName", "ownStyle", "themedProps", "useThemeSizeProps", "textAreaPropDefs", "className", "color", "radius", "style", "textAreaProps", "extractProps", "wrapped", "errorId", "ariaDescribedby", "ariaLabelledby", "ariaInvalid", "isInvalid", "describedBy", "parts", "ariaProps", "error", "errorMessage", "required", "_ariaDescribedby", "_ariaLabelledby", "nativeTextAreaProps", "field", "classNames", "mergeStyles"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{c as o}from"./chunk-HBWBPBSA.js";import{c as s}from"./chunk-5ON3XLRD.js";import{c as r}from"./chunk-OKQAVYW4.js";import*as e from"react";import w from"classnames";import{Switch as i}from"radix-ui";var n=["1","2","3","4"],t={size:{type:"enum",className:"kui-r-size",values:n,default:"2",responsive:!0},...o};var l=e.forwardRef((p,c)=>{let m=s(p,t.size),{className:f,color:a,...h}=r(m,t);return e.createElement(i.Root,{"data-accent-color":a,...h,asChild:!1,ref:c,className:w("kui-reset","kui-SwitchRoot",f)},e.createElement(i.Thumb,{className:"kui-SwitchThumb"}))});l.displayName="Switch";export{l as a};
|
|
3
|
+
//# sourceMappingURL=chunk-MS2ONKJJ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/switch.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Switch as SwitchPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { switchPropDefs } from './switch.props.js';\n\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout } from '../helpers/component-props.js';\n\ntype SwitchElement = React.ElementRef<typeof SwitchPrimitive.Root>;\ntype SwitchOwnProps = GetPropDefTypes<typeof switchPropDefs>;\ninterface SwitchProps\n extends ComponentPropsWithout<\n typeof SwitchPrimitive.Root,\n 'asChild' | 'color' | 'defaultValue' | 'children'\n >,\n SwitchOwnProps {}\nconst Switch = React.forwardRef<SwitchElement, SwitchProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, switchPropDefs.size);\n const { className, color, ...switchProps } = extractProps(\n props,\n switchPropDefs,\n );\n return (\n <SwitchPrimitive.Root\n data-accent-color={color}\n {...switchProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-SwitchRoot', className)}\n >\n <SwitchPrimitive.Thumb className=\"kui-SwitchThumb\" />\n </SwitchPrimitive.Root>\n );\n});\nSwitch.displayName = 'Switch';\n\nexport { Switch };\nexport type { SwitchProps };\n"],
|
|
5
|
-
"mappings": ";wHAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,MAAuB,
|
|
6
|
-
"names": ["React", "classNames", "SwitchPrimitive", "Switch", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "switchPropDefs", "className", "color", "switchProps", "extractProps", "SwitchPrimitive", "classNames"]
|
|
3
|
+
"sources": ["../../src/components/switch.tsx", "../../src/components/switch.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Switch as SwitchPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { switchPropDefs } from './switch.props.js';\n\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout } from '../helpers/component-props.js';\n\ntype SwitchElement = React.ElementRef<typeof SwitchPrimitive.Root>;\ntype SwitchOwnProps = GetPropDefTypes<typeof switchPropDefs>;\ninterface SwitchProps\n extends ComponentPropsWithout<\n typeof SwitchPrimitive.Root,\n 'asChild' | 'color' | 'defaultValue' | 'children'\n >,\n SwitchOwnProps {}\nconst Switch = React.forwardRef<SwitchElement, SwitchProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, switchPropDefs.size);\n const { className, color, ...switchProps } = extractProps(\n props,\n switchPropDefs,\n );\n return (\n <SwitchPrimitive.Root\n data-accent-color={color}\n {...switchProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-SwitchRoot', className)}\n >\n <SwitchPrimitive.Thumb className=\"kui-SwitchThumb\" />\n </SwitchPrimitive.Root>\n );\n});\nSwitch.displayName = 'Switch';\n\nexport { Switch };\nexport type { SwitchProps };\n", "import { colorPropDef } from '../props/color.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\n\nconst switchPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n ...colorPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { switchPropDefs };\n"],
|
|
5
|
+
"mappings": ";wHAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,MAAuB,WCE1C,IAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAE3BC,EAAiB,CACrB,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQD,EAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,GAAGE,CACL,EDUA,IAAMC,EAAe,aAAuC,CAACC,EAAUC,IAAiB,CACtF,IAAMC,EAAQC,EAAkBH,EAAUI,EAAe,IAAI,EACvD,CAAE,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAY,EAAIC,EAC3CN,EACAE,CACF,EACA,OACE,gBAACK,EAAgB,KAAhB,CACC,oBAAmBH,EAClB,GAAGC,EACJ,QAAS,GACT,IAAKN,EACL,UAAWS,EAAW,YAAa,iBAAkBL,CAAS,GAE9D,gBAACI,EAAgB,MAAhB,CAAsB,UAAU,kBAAkB,CACrD,CAEJ,CAAC,EACDV,EAAO,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "SwitchPrimitive", "sizes", "switchPropDefs", "colorPropDef", "Switch", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "switchPropDefs", "className", "color", "switchProps", "extractProps", "SwitchPrimitive", "classNames"]
|
|
7
7
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as nt}from"./chunk-7B3XDZXZ.js";import{a as Be}from"./chunk-WUCBFB25.js";import{a as we}from"./chunk-5TJH35TF.js";import{a as Ae}from"./chunk-6UZT3ZLO.js";import{a as at}from"./chunk-RVPLXLRA.js";import{a as De}from"./chunk-ILWS2JUE.js";import{a as ze}from"./chunk-WZKSLTBH.js";import{g as Qe,h as Ze,j as et}from"./chunk-GKDGNPBD.js";import{b as U}from"./chunk-5KMEUZWN.js";import{b as tt}from"./chunk-5ON3XLRD.js";import{a as Ht}from"./chunk-VQPANPMI.js";var Wt={};Ht(Wt,{AttachTrigger:()=>Rt,Attachment:()=>$e,AttachmentsRow:()=>pt,InlineEnd:()=>mt,InlineStart:()=>dt,Item:()=>bt,Root:()=>lt,Row:()=>Ct,RowEnd:()=>vt,RowStart:()=>gt,Send:()=>yt,Textarea:()=>ut});import*as e from"react";import E from"classnames";import{useComposedRefs as st,useLayoutEffect as je}from"radix-ui/internal";import{useDropzone as Ft}from"react-dropzone";function ot(t,r){let{placeholder:a}=t;if(!a){r();return}t.placeholder="";try{r()}finally{t.placeholder=a}}var It={values:["1","2","3"]},it=e.createContext(null),We=e.createContext(""),I=()=>{let t=e.useContext(it);if(!t)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return t},me=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(r=>r.trim()).filter(Boolean):[],zt=(t,r)=>{if(r.length===0)return!0;let a=t.type.toLowerCase(),i=t.name.toLowerCase();for(let c of r){let l=c.toLowerCase();if(l.includes("/")){let[u,d]=l.split("/"),[g,y]=a.split("/");if(u==="*"||u===g&&(d==="*"||d===y))return!0}else if(l.startsWith(".")&&i.endsWith(l))return!0}return!1},Dt=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,ct=(t,r)=>(r||"").toLowerCase().startsWith("image/")||Dt.test(t),Ve=t=>t.trim().length>0,rt=(t,r)=>`${t} ${r}${t===1?"":"s"}`,Bt=0,jt=()=>`chatbar-attachment-${Date.now()}-${++Bt}`,lt=e.forwardRef((t,r)=>{let{className:a,style:i,children:c,value:l,defaultValue:u="",onValueChange:d,open:g,defaultOpen:y=!1,onOpenChange:R,expandOn:p="both",minLines:v=3,maxLines:x=6,sendMode:w="whenDirty",disabled:b,readOnly:S,onSubmit:D,size:O,variant:z,color:H,radius:F,width:Q,maxWidth:f,attachments:_,defaultAttachments:B,onAttachmentsChange:se,accept:A,multiple:L=!0,maxAttachments:Z,maxFileSize:G,paste:j=!0,pasteAccept:q,clearOnSubmit:V=!0,onAttachmentReject:N,dropzone:M=!0,apiRef:ke,onBlurCapture:pe,notices:he,context:fe,...Se}=t,W=tt(O,It),Ee=l!=null,[n,C]=e.useState(u),k=Ee?l:n,ee=g!=null,[X,te]=e.useState(y),ie=ee?g:X,Y="attachments"in t,[ce,be]=e.useState(()=>B??[]),le=e.useMemo(()=>Y?_??[]:ce,[Y,_,ce]),[Ke,xt]=e.useState({text:"",id:0}),ue=e.useCallback(o=>xt(s=>({text:o,id:s.id+1})),[]),Ue=e.useRef(null),Pt=st(r,Ue),Te=e.useRef(null),Le=e.useRef(null),de=e.useRef(!1),Re=e.useRef(!1),Ce=e.useRef(void 0),Ne=e.useRef(null),_e=me(A).join(","),Me=me(q).join(","),Oe=e.useMemo(()=>me(_e),[_e]),At=e.useMemo(()=>Me?me(Me):Oe,[Me,Oe]),Ge={value:k,attachments:le,accepts:Oe,pasteAccepts:At,multiple:L,maxAttachments:Z,maxFileSize:G,disabled:b,readOnly:S,expandOn:p,isValueControlled:Ee,isOpenControlled:ee,isAttachmentsControlled:Y,onValueChange:d,onOpenChange:R,onAttachmentsChange:se,onAttachmentReject:N,onSubmit:D},P=e.useRef(Ge);P.current=Ge;let He=e.useRef(null),$=e.useCallback(()=>He.current??P.current.attachments,[]),ae=e.useCallback(o=>{P.current.isOpenControlled||te(o),P.current.onOpenChange?.(o)},[]),ge=e.useCallback(o=>{P.current.isValueControlled||C(o),P.current.onValueChange?.(o)},[]),ne=e.useCallback(o=>{He.current=o,queueMicrotask(()=>{He.current=null}),P.current.isAttachmentsControlled||be(o),P.current.onAttachmentsChange?.(o)},[]),ve=e.useRef(new Set),oe=e.useCallback((o,s,m=P.current.multiple)=>{let h=P.current;if(h.disabled||h.readOnly||o.length===0)return 0;let K=$(),J=[],re=[],Mt=typeof h.maxAttachments=="number"?Math.max(h.maxAttachments-K.length,0):1/0,Ot=m?1/0:1;for(let T of o){if(J.length>=Mt||J.length>=Ot){re.push({file:T,reason:"count"});continue}if(typeof h.maxFileSize=="number"&&T.size>h.maxFileSize){re.push({file:T,reason:"size"});continue}if(!zt(T,s)){re.push({file:T,reason:"type"});continue}let Ie=ct(T.name,T.type)?URL.createObjectURL(T):void 0;Ie&&ve.current.add(Ie),J.push({id:jt(),name:T.name,size:T.size,type:T.type,file:T,url:Ie,status:"idle"})}let Pe=[];return J.length>0&&(ne(K.concat(J)),h.expandOn!=="none"&&ae(!0),Pe.push(`${rt(J.length,"file")} attached.`)),re.length>0&&(h.onAttachmentReject?.(re),Pe.push(`${rt(re.length,"file")} could not be attached.`)),Pe.length>0&&ue(Pe.join(" ")),J.length},[$,ne,ae,ue]),ye=e.useCallback(o=>oe(o,P.current.accepts),[oe]),qe=e.useCallback(o=>oe(o,P.current.pasteAccepts),[oe]),Xe=e.useCallback(o=>{let s=$(),m=s.find(h=>h.id===o);m&&(ne(s.filter(h=>h.id!==o)),ue(`Removed ${m.name}.`))},[$,ne,ue]),Ye=e.useCallback(o=>{let s=P.current;if(s.disabled||s.readOnly)return!1;let m=$();if(!Ve(s.value)&&m.length===0)return!1;let h={value:s.value,attachments:m};if(o&&s.onSubmit)for(let K of m)K.url&&ve.current.delete(K.url);return s.onSubmit?.(h),o&&(ge(""),ne([])),!0},[$,ge,ne]);e.useEffect(()=>{let o=ve.current;if(o.size===0)return;let s=new Set(le.map(m=>m.url));for(let m of Array.from(o))s.has(m)||(URL.revokeObjectURL(m),o.delete(m))},[le]),e.useEffect(()=>{let o=ve.current;return()=>{if(!P.current.isAttachmentsControlled){for(let s of Array.from(o))URL.revokeObjectURL(s);o.clear()}}},[]);let xe=e.useCallback(o=>{let s=P.current,m=Le.current;if(clearTimeout(Ce.current),Re.current=!1,!m||s.disabled||s.readOnly)return;let h=o?.accept!=null?me(o.accept):s.accepts,K=o?.multiple??s.multiple;Ne.current={patterns:h,multiple:K},m.accept=h.join(","),m.multiple=K,de.current=!0,m.click(),setTimeout(()=>{document.hasFocus()&&(de.current=!1)},1e3)},[]),Je=e.useCallback(()=>{Re.current=!0,clearTimeout(Ce.current),Ce.current=setTimeout(()=>{Re.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(Ce.current),[]),e.useEffect(()=>{let o=Le.current,s=()=>{de.current=!1};return window.addEventListener("focus",s),o?.addEventListener("cancel",s),()=>{window.removeEventListener("focus",s),o?.removeEventListener("cancel",s)}},[]);let wt=e.useCallback(o=>{let s=o.currentTarget,m=Array.from(s.files??[]),h=Ne.current;oe(m,h?.patterns??P.current.accepts,h?.multiple),de.current=!1,Ne.current=null,s.value=""},[oe]),kt=e.useCallback(o=>{pe?.(o);let s=P.current,m=Ue.current;if(!m||s.expandOn==="none")return;let h=o.relatedTarget;h&&m.contains(h)||de.current||Re.current||!Ve(s.value)&&$().length===0&&ae(!1)},[pe,ae,$]),St=e.useCallback(o=>{ye(o)},[ye]),{getRootProps:Et,isDragActive:Tt}=Ft({onDrop:St,onDragEnter:()=>ue(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!M||b||S}),Fe=M&&Tt;e.useImperativeHandle(ke,()=>({focusTextarea:()=>Te.current?.focus({preventScroll:!0}),openFilePicker:()=>xe()}),[xe]);let Lt=e.useCallback(o=>{if(b||o.pointerType==="mouse"&&o.button!==0)return;let s=o.target;s instanceof Element&&s.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(o.preventDefault(),Te.current?.focus({preventScroll:!0}))},[b]),Nt=e.useMemo(()=>({open:ie,setOpen:ae,setValue:ge,size:W,expandOn:p,minLines:v,maxLines:x,sendMode:w,disabled:b,readOnly:S,paste:j,clearOnSubmit:V,multiple:L,textareaRef:Te,attachments:le,removeAttachment:Xe,submit:Ye,appendFiles:ye,appendFilesFromPaste:qe,openFilePicker:xe,beginFilePickerPress:Je}),[ie,ae,ge,W,p,v,x,w,b,S,j,V,L,le,Xe,Ye,ye,qe,xe,Je]);return e.createElement(it.Provider,{value:Nt},e.createElement(We.Provider,{value:k},e.createElement(e.Fragment,null,e.createElement("div",{...Se,ref:Pt,className:E("kui-ChatbarRoot",`kui-r-size-${W}`,a),style:{position:"relative",width:Q,maxWidth:f,...i},"data-state":ie?"open":"closed","data-disabled":b?"":void 0,"data-readonly":S?"":void 0,"data-drop-active":Fe?"":void 0,"data-accent-color":H,"data-radius":F,onBlurCapture:kt},e.createElement("input",{ref:Le,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:wt}),he?e.createElement("div",{className:"kui-ChatbarNotices"},e.createElement(nt.Provider,{value:W},he)):null,e.createElement("div",{...M?Et():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Lt},e.createElement("div",{className:E("kui-ChatbarBox",`kui-variant-${z??"raised"}`),style:{position:"relative"},"data-accent-color":H,"data-radius":F},e.createElement("div",{className:"kui-ChatbarGrid"},c),Fe&&e.createElement("div",{className:"kui-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"kui-ChatbarDropContent"},e.createElement(Ae,{emphasis:"medium",size:W,weight:"medium"},"Drop files here to attach"))))),fe?e.createElement(Ae,{as:"div",size:W==="3"?"2":"1",emphasis:"medium",className:"kui-ChatbarContext"},fe):null,e.createElement(Be,{role:"status","aria-live":"polite"},Fe?"Drop files here to attach.":e.createElement("span",{key:Ke.id},Ke.text))))))});lt.displayName="Chatbar.Root";var ut=e.forwardRef((t,r)=>{let{className:a,style:i,asChild:c,onFocus:l,onChange:u,onPaste:d,onKeyDown:g,onCompositionStart:y,onCompositionEnd:R,submitOnEnter:p=!1,...v}=t,x=I(),w=e.useContext(We),{open:b,minLines:S,maxLines:D,expandOn:O,disabled:z,readOnly:H,setOpen:F,setValue:Q,textareaRef:f,paste:_,appendFilesFromPaste:B,size:se,submit:A,clearOnSubmit:L}=x,Z=st(r,f),G=e.useRef(0),j=e.useRef(0),q=e.useRef(!1),V=e.useRef({open:b,minLines:S,maxLines:D});je(()=>{V.current={open:b,minLines:S,maxLines:D}},[b,S,D]);let N=e.useCallback(()=>{let n=f.current;if(!n)return;let C=window.getComputedStyle(n);G.current=parseFloat(C.lineHeight)||20,j.current=(parseFloat(C.paddingTop)||0)+(parseFloat(C.paddingBottom)||0)},[f]),M=e.useCallback((n,C)=>{let{minLines:k,maxLines:ee}=V.current,X=G.current,te=j.current,ie=Math.ceil((C?k:1)*X)+te,Y=Math.ceil((C?ee:1)*X)+te,ce=Math.max(n.scrollHeight,ie);n.style.height=`${Math.min(ce,Y)}px`;let be=ce>Y;n.style.overflowY=be?"auto":"hidden",n.style.maxHeight=be?`${Y}px`:"none"},[]);je(()=>{N()},[N,se]),je(()=>{let n=f.current;n&&(G.current===0&&N(),ot(n,()=>{n.style.height="auto";let C=b;if(!b&&(O==="overflow"||O==="both")){let k=Math.ceil(G.current)+j.current;n.scrollHeight>k+1&&(C=!0,F(!0))}M(n,C)}))},[w,b,O,S,D,se,F,f,N,M]),e.useEffect(()=>{let n=f.current;if(!n||typeof ResizeObserver>"u")return;let C=-1,k=new ResizeObserver(ee=>{let X=ee[0]?.contentRect.width??0;if(X===C)return;let te=C===-1;C=X,!te&&(N(),ot(n,()=>{n.style.height="auto",M(n,V.current.open)}))});return k.observe(n),()=>k.disconnect()},[f,N,M]),e.useEffect(()=>{},[]);let ke=e.useCallback(n=>{l?.(n),!(z||H)&&(O==="focus"||O==="both")&&!b&&F(!0)},[z,H,O,b,F,l]),pe=e.useCallback(n=>{Q(n.currentTarget.value),u?.(n)},[Q,u]),he=e.useCallback(n=>{if(d?.(n),n.defaultPrevented||!_||z||H)return;let C=Array.from(n.clipboardData?.items??[]).filter(k=>k.kind==="file").map(k=>k.getAsFile()).filter(k=>!!k);C.length!==0&&B(C)>0&&n.preventDefault()},[_,z,H,d,B]),fe=e.useCallback(n=>{q.current=!0,y?.(n)},[y]),Se=e.useCallback(n=>{q.current=!1,R?.(n)},[R]),W=e.useCallback(n=>{g?.(n),!(n.defaultPrevented||!p)&&(n.key!=="Enter"||n.shiftKey||n.altKey||n.ctrlKey||n.metaKey||q.current||n.nativeEvent.isComposing||n.nativeEvent.keyCode===229||(n.preventDefault(),A(L)))},[p,g,A,L]);return e.createElement("div",{className:"kui-ChatbarField kui-ChatbarTextarea"},e.createElement(c?U:"textarea",{...v,ref:Z,className:E("kui-ChatbarInput",a),value:w,onChange:pe,onFocus:ke,onPaste:he,onKeyDown:W,onCompositionStart:fe,onCompositionEnd:Se,disabled:z,readOnly:H,rows:b?S:1,spellCheck:v.spellCheck??!0,autoCorrect:v.autoCorrect??"on",style:i}))});ut.displayName="Chatbar.Textarea";var dt=e.forwardRef((t,r)=>{let{children:a,asChild:i,className:c,...l}=t;return I().open?null:e.createElement(i?U:"div",{...l,ref:r,className:E("kui-ChatbarInlineStart",c)},a)});dt.displayName="Chatbar.InlineStart";var mt=e.forwardRef((t,r)=>{let{children:a,asChild:i,className:c,...l}=t;return I().open?null:e.createElement(i?U:"div",{...l,ref:r,className:E("kui-ChatbarInlineEnd",c)},a)});mt.displayName="Chatbar.InlineEnd";var pt=e.forwardRef((t,r)=>{let{asChild:a,forceMount:i,renderAttachment:c,className:l,children:u,...d}=t,g=I(),y=e.Children.toArray(u).length>0;return g.attachments.length===0&&!y&&!i?null:e.createElement("div",null,e.createElement(a?U:"div",{...d,ref:r,className:E("kui-ChatbarAttachmentsRow",l),role:"list","aria-label":d["aria-label"]??"Attachments"},e.createElement(at,{className:"kui-ChatbarScrollArea",scrollbars:"horizontal"},e.createElement(ze,{align:"center",gap:"3",minWidth:"fit-content"},g.attachments.map(p=>e.createElement($e,{key:p.id,attachment:p,asChild:!!c},c?.(p))),u))))});pt.displayName="Chatbar.AttachmentsRow";function ht(t,r){let a=t.closest('[role="listitem"]'),i=a?.parentElement?Array.from(a.parentElement.children):[],c=a?i.indexOf(a):-1,u=(i[c+1]??i[c-1])?.querySelector(".kui-ChatbarItemRemove");u?u.focus():r.current?.focus({preventScroll:!0})}var ft=({lead:t,leadKind:r,label:a,detail:i,removeLabel:c,onRemove:l})=>{let u=I();return e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-ChatbarItemLead","data-kind":r,"aria-hidden":!0},t),e.createElement(Ae,{className:"kui-ChatbarItemLabel",size:u.size,truncate:!0},a,i?e.createElement(Be,null,", ",i):null),l&&e.createElement(we,{iconOnly:!0,className:"kui-ChatbarItemRemove","aria-label":c,size:"1",variant:"ghost",color:"gray",onClick:l},e.createElement(Qe,null)))},Vt={uploading:"uploading",error:"failed to upload"},$e=e.forwardRef((t,r)=>{let{attachment:a,asChild:i,className:c,children:l,...u}=t,d=I(),g=i?U:"div",y=!!a.url&&ct(a.name,a.type),R=`${Math.ceil(a.size/1024)} KB`,p=a.status?Vt[a.status]:void 0,v=d.disabled||d.readOnly,x=b=>{ht(b.currentTarget,d.textareaRef),d.removeAttachment(a.id)},w=a.status==="uploading"?e.createElement(De,null):y?e.createElement("img",{className:"kui-ChatbarAttachmentImage",src:a.url,alt:""}):e.createElement(et,null);return e.createElement(g,{...u,ref:r,className:E(l?"kui-ChatbarAttachment":"kui-ChatbarAttachment kui-ChatbarItem",c),role:"listitem","data-kind":y?"image":"file","data-status":a.status,title:a.name},l??e.createElement(ft,{lead:w,leadKind:y&&a.status!=="uploading"?"image":"icon",label:a.name,detail:p?`${R}, ${p}`:R,removeLabel:`Remove ${a.name}`,onRemove:v?void 0:x}))});$e.displayName="Chatbar.Attachment";var bt=e.forwardRef((t,r)=>{let{children:a,icon:i,image:c,color:l,onRemove:u,removeLabel:d,className:g,...y}=t,R=I(),p=R.disabled||R.readOnly,v=u?x=>{ht(x.currentTarget,R.textareaRef),u()}:void 0;return e.createElement("div",{...y,ref:r,className:E("kui-ChatbarItem",g),role:"listitem","data-accent-color":c?void 0:l??"gray",title:a},e.createElement(ft,{lead:c?e.createElement("img",{className:"kui-ChatbarAttachmentImage",src:c,alt:""}):i,leadKind:c?"image":"icon",label:a,removeLabel:d??`Remove ${a}`,onRemove:p?void 0:v}))});bt.displayName="Chatbar.Item";var Rt=e.forwardRef((t,r)=>{let{asChild:a,accept:i,multiple:c,disabled:l,onPointerDown:u,onClick:d,children:g,color:y,...R}=t,p=I(),v=l||p.disabled||p.readOnly,x={...R,ref:r,className:E("kui-ChatbarAttachTrigger",R.className),type:R.type??"button","aria-label":R["aria-label"]??"Add attachments",disabled:v,onPointerDown:w=>{u?.(w),!v&&!w.defaultPrevented&&p.beginFilePickerPress()},onClick:w=>{d?.(w),!(v||w.defaultPrevented)&&p.openFilePicker({accept:i,multiple:c})}};return a?e.createElement(U,{...x},g):e.createElement(we,{iconOnly:!0,emphasis:"quiet",color:"gray",size:p.size,...x},g??e.createElement(Ze,{"aria-hidden":!0}))});Rt.displayName="Chatbar.AttachTrigger";var Ct=e.forwardRef((t,r)=>{let{asChild:a,children:i,className:c,...l}=t;return I().open?e.createElement("div",null,e.createElement(a?U:"div",{...l,ref:r,className:E("kui-ChatbarRow",c)},e.createElement(ze,{align:"center",justify:"between",width:"100%"},i))):null});Ct.displayName="Chatbar.Row";var gt=e.forwardRef((t,r)=>{let{className:a,...i}=t;return e.createElement("div",{...i,ref:r,className:E("kui-ChatbarRowStart",a)})});gt.displayName="Chatbar.RowStart";var vt=e.forwardRef((t,r)=>{let{className:a,...i}=t;return e.createElement("div",{...i,ref:r,className:E("kui-ChatbarRowEnd",a)})});vt.displayName="Chatbar.RowEnd";var yt=e.forwardRef((t,r)=>{let{asChild:a,clearOnSend:i,disabled:c,children:l,style:u,className:d,size:g,variant:y,emphasis:R,tabIndex:p,onClick:v,status:x="ready",onStop:w,onRetry:b,stopLabel:S="Stop",retryLabel:D="Retry",stopIcon:O,retryIcon:z,"aria-label":H,"aria-labelledby":F,...Q}=t,f=I(),_=e.useContext(We),B=Ve(_)||f.attachments.length>0,A=B?"send":x==="submitted"||x==="streaming"?"stop":x==="error"?"retry":"send";if(f.sendMode==="never"&&A==="send")return null;let L=A!=="send"||f.sendMode==="always"||B,Z=A==="send"?c||f.disabled||f.readOnly||!B:c||f.disabled,j=A==="stop"?{"aria-label":S}:A==="retry"?{"aria-label":D}:F?{"aria-labelledby":F}:{"aria-label":H??"Send"},q=N=>{if(v?.(N),N.defaultPrevented||Z)return;if(A==="stop"){w?.();return}if(A==="retry"){b?.();return}let M=i??f.clearOnSubmit;f.submit(M)&&M&&f.textareaRef.current?.focus({preventScroll:!0})},V=A==="stop"?O??(x==="submitted"?e.createElement(De,null):e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0},e.createElement("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2"}))):A==="retry"?z??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.createElement("path",{d:"M3 3v5h5"})):l??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"}));return e.createElement(we,{iconOnly:!0,...Q,ref:r,size:g??f.size,...R?{emphasis:R}:{variant:y??(f.open||A!=="send"?"solid":"ghost")},disabled:Z,className:E("kui-ChatbarSend",d),style:{opacity:L?1:0,pointerEvents:L?void 0:"none",...u},"aria-hidden":L?void 0:!0,tabIndex:L?p:-1,asChild:a,onClick:q,"data-status":x,"data-mode":A,...j},V)});yt.displayName="Chatbar.Send";export{lt as a,ut as b,dt as c,mt as d,pt as e,$e as f,bt as g,Rt as h,Ct as i,gt as j,vt as k,yt as l,Wt as m};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as nt}from"./chunk-E6BDD3PN.js";import{a as Be}from"./chunk-WUCBFB25.js";import{a as we}from"./chunk-ULCHGKI3.js";import{a as Ae}from"./chunk-OTCVSJT7.js";import{a as De}from"./chunk-DQCE7DHY.js";import{a as ze}from"./chunk-KVVRFWGQ.js";import{g as Qe,h as Ze,j as et}from"./chunk-GKDGNPBD.js";import{b as U}from"./chunk-5KMEUZWN.js";import{b as tt}from"./chunk-5ON3XLRD.js";import{a as at}from"./chunk-VIVM525H.js";import{a as Ht}from"./chunk-VQPANPMI.js";var Wt={};Ht(Wt,{AttachTrigger:()=>Rt,Attachment:()=>$e,AttachmentsRow:()=>pt,InlineEnd:()=>mt,InlineStart:()=>dt,Item:()=>bt,Root:()=>lt,Row:()=>Ct,RowEnd:()=>vt,RowStart:()=>gt,Send:()=>yt,Textarea:()=>ut});import*as e from"react";import E from"classnames";import{useComposedRefs as st,useLayoutEffect as je}from"radix-ui/internal";import{useDropzone as Ft}from"react-dropzone";function ot(t,r){let{placeholder:a}=t;if(!a){r();return}t.placeholder="";try{r()}finally{t.placeholder=a}}var It={values:["1","2","3"]},it=e.createContext(null),We=e.createContext(""),I=()=>{let t=e.useContext(it);if(!t)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return t},me=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(r=>r.trim()).filter(Boolean):[],zt=(t,r)=>{if(r.length===0)return!0;let a=t.type.toLowerCase(),i=t.name.toLowerCase();for(let c of r){let l=c.toLowerCase();if(l.includes("/")){let[u,d]=l.split("/"),[g,y]=a.split("/");if(u==="*"||u===g&&(d==="*"||d===y))return!0}else if(l.startsWith(".")&&i.endsWith(l))return!0}return!1},Dt=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,ct=(t,r)=>(r||"").toLowerCase().startsWith("image/")||Dt.test(t),Ve=t=>t.trim().length>0,rt=(t,r)=>`${t} ${r}${t===1?"":"s"}`,Bt=0,jt=()=>`chatbar-attachment-${Date.now()}-${++Bt}`,lt=e.forwardRef((t,r)=>{let{className:a,style:i,children:c,value:l,defaultValue:u="",onValueChange:d,open:g,defaultOpen:y=!1,onOpenChange:R,expandOn:p="both",minLines:v=3,maxLines:x=6,sendMode:w="whenDirty",disabled:b,readOnly:S,onSubmit:D,size:O,variant:z,color:H,radius:F,width:Q,maxWidth:f,attachments:_,defaultAttachments:B,onAttachmentsChange:se,accept:A,multiple:L=!0,maxAttachments:Z,maxFileSize:G,paste:j=!0,pasteAccept:q,clearOnSubmit:V=!0,onAttachmentReject:N,dropzone:M=!0,apiRef:ke,onBlurCapture:pe,notices:he,context:fe,...Se}=t,W=tt(O,It),Ee=l!=null,[n,C]=e.useState(u),k=Ee?l:n,ee=g!=null,[X,te]=e.useState(y),ie=ee?g:X,Y="attachments"in t,[ce,be]=e.useState(()=>B??[]),le=e.useMemo(()=>Y?_??[]:ce,[Y,_,ce]),[Ke,xt]=e.useState({text:"",id:0}),ue=e.useCallback(o=>xt(s=>({text:o,id:s.id+1})),[]),Ue=e.useRef(null),Pt=st(r,Ue),Te=e.useRef(null),Le=e.useRef(null),de=e.useRef(!1),Re=e.useRef(!1),Ce=e.useRef(void 0),Ne=e.useRef(null),_e=me(A).join(","),Me=me(q).join(","),Oe=e.useMemo(()=>me(_e),[_e]),At=e.useMemo(()=>Me?me(Me):Oe,[Me,Oe]),Ge={value:k,attachments:le,accepts:Oe,pasteAccepts:At,multiple:L,maxAttachments:Z,maxFileSize:G,disabled:b,readOnly:S,expandOn:p,isValueControlled:Ee,isOpenControlled:ee,isAttachmentsControlled:Y,onValueChange:d,onOpenChange:R,onAttachmentsChange:se,onAttachmentReject:N,onSubmit:D},P=e.useRef(Ge);P.current=Ge;let He=e.useRef(null),$=e.useCallback(()=>He.current??P.current.attachments,[]),ae=e.useCallback(o=>{P.current.isOpenControlled||te(o),P.current.onOpenChange?.(o)},[]),ge=e.useCallback(o=>{P.current.isValueControlled||C(o),P.current.onValueChange?.(o)},[]),ne=e.useCallback(o=>{He.current=o,queueMicrotask(()=>{He.current=null}),P.current.isAttachmentsControlled||be(o),P.current.onAttachmentsChange?.(o)},[]),ve=e.useRef(new Set),oe=e.useCallback((o,s,m=P.current.multiple)=>{let h=P.current;if(h.disabled||h.readOnly||o.length===0)return 0;let K=$(),J=[],re=[],Mt=typeof h.maxAttachments=="number"?Math.max(h.maxAttachments-K.length,0):1/0,Ot=m?1/0:1;for(let T of o){if(J.length>=Mt||J.length>=Ot){re.push({file:T,reason:"count"});continue}if(typeof h.maxFileSize=="number"&&T.size>h.maxFileSize){re.push({file:T,reason:"size"});continue}if(!zt(T,s)){re.push({file:T,reason:"type"});continue}let Ie=ct(T.name,T.type)?URL.createObjectURL(T):void 0;Ie&&ve.current.add(Ie),J.push({id:jt(),name:T.name,size:T.size,type:T.type,file:T,url:Ie,status:"idle"})}let Pe=[];return J.length>0&&(ne(K.concat(J)),h.expandOn!=="none"&&ae(!0),Pe.push(`${rt(J.length,"file")} attached.`)),re.length>0&&(h.onAttachmentReject?.(re),Pe.push(`${rt(re.length,"file")} could not be attached.`)),Pe.length>0&&ue(Pe.join(" ")),J.length},[$,ne,ae,ue]),ye=e.useCallback(o=>oe(o,P.current.accepts),[oe]),qe=e.useCallback(o=>oe(o,P.current.pasteAccepts),[oe]),Xe=e.useCallback(o=>{let s=$(),m=s.find(h=>h.id===o);m&&(ne(s.filter(h=>h.id!==o)),ue(`Removed ${m.name}.`))},[$,ne,ue]),Ye=e.useCallback(o=>{let s=P.current;if(s.disabled||s.readOnly)return!1;let m=$();if(!Ve(s.value)&&m.length===0)return!1;let h={value:s.value,attachments:m};if(o&&s.onSubmit)for(let K of m)K.url&&ve.current.delete(K.url);return s.onSubmit?.(h),o&&(ge(""),ne([])),!0},[$,ge,ne]);e.useEffect(()=>{let o=ve.current;if(o.size===0)return;let s=new Set(le.map(m=>m.url));for(let m of Array.from(o))s.has(m)||(URL.revokeObjectURL(m),o.delete(m))},[le]),e.useEffect(()=>{let o=ve.current;return()=>{if(!P.current.isAttachmentsControlled){for(let s of Array.from(o))URL.revokeObjectURL(s);o.clear()}}},[]);let xe=e.useCallback(o=>{let s=P.current,m=Le.current;if(clearTimeout(Ce.current),Re.current=!1,!m||s.disabled||s.readOnly)return;let h=o?.accept!=null?me(o.accept):s.accepts,K=o?.multiple??s.multiple;Ne.current={patterns:h,multiple:K},m.accept=h.join(","),m.multiple=K,de.current=!0,m.click(),setTimeout(()=>{document.hasFocus()&&(de.current=!1)},1e3)},[]),Je=e.useCallback(()=>{Re.current=!0,clearTimeout(Ce.current),Ce.current=setTimeout(()=>{Re.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(Ce.current),[]),e.useEffect(()=>{let o=Le.current,s=()=>{de.current=!1};return window.addEventListener("focus",s),o?.addEventListener("cancel",s),()=>{window.removeEventListener("focus",s),o?.removeEventListener("cancel",s)}},[]);let wt=e.useCallback(o=>{let s=o.currentTarget,m=Array.from(s.files??[]),h=Ne.current;oe(m,h?.patterns??P.current.accepts,h?.multiple),de.current=!1,Ne.current=null,s.value=""},[oe]),kt=e.useCallback(o=>{pe?.(o);let s=P.current,m=Ue.current;if(!m||s.expandOn==="none")return;let h=o.relatedTarget;h&&m.contains(h)||de.current||Re.current||!Ve(s.value)&&$().length===0&&ae(!1)},[pe,ae,$]),St=e.useCallback(o=>{ye(o)},[ye]),{getRootProps:Et,isDragActive:Tt}=Ft({onDrop:St,onDragEnter:()=>ue(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!M||b||S}),Fe=M&&Tt;e.useImperativeHandle(ke,()=>({focusTextarea:()=>Te.current?.focus({preventScroll:!0}),openFilePicker:()=>xe()}),[xe]);let Lt=e.useCallback(o=>{if(b||o.pointerType==="mouse"&&o.button!==0)return;let s=o.target;s instanceof Element&&s.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(o.preventDefault(),Te.current?.focus({preventScroll:!0}))},[b]),Nt=e.useMemo(()=>({open:ie,setOpen:ae,setValue:ge,size:W,expandOn:p,minLines:v,maxLines:x,sendMode:w,disabled:b,readOnly:S,paste:j,clearOnSubmit:V,multiple:L,textareaRef:Te,attachments:le,removeAttachment:Xe,submit:Ye,appendFiles:ye,appendFilesFromPaste:qe,openFilePicker:xe,beginFilePickerPress:Je}),[ie,ae,ge,W,p,v,x,w,b,S,j,V,L,le,Xe,Ye,ye,qe,xe,Je]);return e.createElement(it.Provider,{value:Nt},e.createElement(We.Provider,{value:k},e.createElement(e.Fragment,null,e.createElement("div",{...Se,ref:Pt,className:E("kui-ChatbarRoot",`kui-r-size-${W}`,a),style:{position:"relative",width:Q,maxWidth:f,...i},"data-state":ie?"open":"closed","data-disabled":b?"":void 0,"data-readonly":S?"":void 0,"data-drop-active":Fe?"":void 0,"data-accent-color":H,"data-radius":F,onBlurCapture:kt},e.createElement("input",{ref:Le,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:wt}),he?e.createElement("div",{className:"kui-ChatbarNotices"},e.createElement(nt.Provider,{value:W},he)):null,e.createElement("div",{...M?Et():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Lt},e.createElement("div",{className:E("kui-ChatbarBox",`kui-variant-${z??"raised"}`),style:{position:"relative"},"data-accent-color":H,"data-radius":F},e.createElement("div",{className:"kui-ChatbarGrid"},c),Fe&&e.createElement("div",{className:"kui-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"kui-ChatbarDropContent"},e.createElement(Ae,{emphasis:"medium",size:W,weight:"medium"},"Drop files here to attach"))))),fe?e.createElement(Ae,{as:"div",size:W==="3"?"2":"1",emphasis:"medium",className:"kui-ChatbarContext"},fe):null,e.createElement(Be,{role:"status","aria-live":"polite"},Fe?"Drop files here to attach.":e.createElement("span",{key:Ke.id},Ke.text))))))});lt.displayName="Chatbar.Root";var ut=e.forwardRef((t,r)=>{let{className:a,style:i,asChild:c,onFocus:l,onChange:u,onPaste:d,onKeyDown:g,onCompositionStart:y,onCompositionEnd:R,submitOnEnter:p=!1,...v}=t,x=I(),w=e.useContext(We),{open:b,minLines:S,maxLines:D,expandOn:O,disabled:z,readOnly:H,setOpen:F,setValue:Q,textareaRef:f,paste:_,appendFilesFromPaste:B,size:se,submit:A,clearOnSubmit:L}=x,Z=st(r,f),G=e.useRef(0),j=e.useRef(0),q=e.useRef(!1),V=e.useRef({open:b,minLines:S,maxLines:D});je(()=>{V.current={open:b,minLines:S,maxLines:D}},[b,S,D]);let N=e.useCallback(()=>{let n=f.current;if(!n)return;let C=window.getComputedStyle(n);G.current=parseFloat(C.lineHeight)||20,j.current=(parseFloat(C.paddingTop)||0)+(parseFloat(C.paddingBottom)||0)},[f]),M=e.useCallback((n,C)=>{let{minLines:k,maxLines:ee}=V.current,X=G.current,te=j.current,ie=Math.ceil((C?k:1)*X)+te,Y=Math.ceil((C?ee:1)*X)+te,ce=Math.max(n.scrollHeight,ie);n.style.height=`${Math.min(ce,Y)}px`;let be=ce>Y;n.style.overflowY=be?"auto":"hidden",n.style.maxHeight=be?`${Y}px`:"none"},[]);je(()=>{N()},[N,se]),je(()=>{let n=f.current;n&&(G.current===0&&N(),ot(n,()=>{n.style.height="auto";let C=b;if(!b&&(O==="overflow"||O==="both")){let k=Math.ceil(G.current)+j.current;n.scrollHeight>k+1&&(C=!0,F(!0))}M(n,C)}))},[w,b,O,S,D,se,F,f,N,M]),e.useEffect(()=>{let n=f.current;if(!n||typeof ResizeObserver>"u")return;let C=-1,k=new ResizeObserver(ee=>{let X=ee[0]?.contentRect.width??0;if(X===C)return;let te=C===-1;C=X,!te&&(N(),ot(n,()=>{n.style.height="auto",M(n,V.current.open)}))});return k.observe(n),()=>k.disconnect()},[f,N,M]),e.useEffect(()=>{},[]);let ke=e.useCallback(n=>{l?.(n),!(z||H)&&(O==="focus"||O==="both")&&!b&&F(!0)},[z,H,O,b,F,l]),pe=e.useCallback(n=>{Q(n.currentTarget.value),u?.(n)},[Q,u]),he=e.useCallback(n=>{if(d?.(n),n.defaultPrevented||!_||z||H)return;let C=Array.from(n.clipboardData?.items??[]).filter(k=>k.kind==="file").map(k=>k.getAsFile()).filter(k=>!!k);C.length!==0&&B(C)>0&&n.preventDefault()},[_,z,H,d,B]),fe=e.useCallback(n=>{q.current=!0,y?.(n)},[y]),Se=e.useCallback(n=>{q.current=!1,R?.(n)},[R]),W=e.useCallback(n=>{g?.(n),!(n.defaultPrevented||!p)&&(n.key!=="Enter"||n.shiftKey||n.altKey||n.ctrlKey||n.metaKey||q.current||n.nativeEvent.isComposing||n.nativeEvent.keyCode===229||(n.preventDefault(),A(L)))},[p,g,A,L]);return e.createElement("div",{className:"kui-ChatbarField kui-ChatbarTextarea"},e.createElement(c?U:"textarea",{...v,ref:Z,className:E("kui-ChatbarInput",a),value:w,onChange:pe,onFocus:ke,onPaste:he,onKeyDown:W,onCompositionStart:fe,onCompositionEnd:Se,disabled:z,readOnly:H,rows:b?S:1,spellCheck:v.spellCheck??!0,autoCorrect:v.autoCorrect??"on",style:i}))});ut.displayName="Chatbar.Textarea";var dt=e.forwardRef((t,r)=>{let{children:a,asChild:i,className:c,...l}=t;return I().open?null:e.createElement(i?U:"div",{...l,ref:r,className:E("kui-ChatbarInlineStart",c)},a)});dt.displayName="Chatbar.InlineStart";var mt=e.forwardRef((t,r)=>{let{children:a,asChild:i,className:c,...l}=t;return I().open?null:e.createElement(i?U:"div",{...l,ref:r,className:E("kui-ChatbarInlineEnd",c)},a)});mt.displayName="Chatbar.InlineEnd";var pt=e.forwardRef((t,r)=>{let{asChild:a,forceMount:i,renderAttachment:c,className:l,children:u,...d}=t,g=I(),y=e.Children.toArray(u).length>0;return g.attachments.length===0&&!y&&!i?null:e.createElement("div",null,e.createElement(a?U:"div",{...d,ref:r,className:E("kui-ChatbarAttachmentsRow",l),role:"list","aria-label":d["aria-label"]??"Attachments"},e.createElement(at,{className:"kui-ChatbarScrollArea",scrollbars:"horizontal"},e.createElement(ze,{align:"center",gap:"3",minWidth:"fit-content"},g.attachments.map(p=>e.createElement($e,{key:p.id,attachment:p,asChild:!!c},c?.(p))),u))))});pt.displayName="Chatbar.AttachmentsRow";function ht(t,r){let a=t.closest('[role="listitem"]'),i=a?.parentElement?Array.from(a.parentElement.children):[],c=a?i.indexOf(a):-1,u=(i[c+1]??i[c-1])?.querySelector(".kui-ChatbarItemRemove");u?u.focus():r.current?.focus({preventScroll:!0})}var ft=({lead:t,leadKind:r,label:a,detail:i,removeLabel:c,onRemove:l})=>{let u=I();return e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-ChatbarItemLead","data-kind":r,"aria-hidden":!0},t),e.createElement(Ae,{className:"kui-ChatbarItemLabel",size:u.size,truncate:!0},a,i?e.createElement(Be,null,", ",i):null),l&&e.createElement(we,{iconOnly:!0,className:"kui-ChatbarItemRemove","aria-label":c,size:"1",variant:"ghost",color:"gray",onClick:l},e.createElement(Qe,null)))},Vt={uploading:"uploading",error:"failed to upload"},$e=e.forwardRef((t,r)=>{let{attachment:a,asChild:i,className:c,children:l,...u}=t,d=I(),g=i?U:"div",y=!!a.url&&ct(a.name,a.type),R=`${Math.ceil(a.size/1024)} KB`,p=a.status?Vt[a.status]:void 0,v=d.disabled||d.readOnly,x=b=>{ht(b.currentTarget,d.textareaRef),d.removeAttachment(a.id)},w=a.status==="uploading"?e.createElement(De,null):y?e.createElement("img",{className:"kui-ChatbarAttachmentImage",src:a.url,alt:""}):e.createElement(et,null);return e.createElement(g,{...u,ref:r,className:E(l?"kui-ChatbarAttachment":"kui-ChatbarAttachment kui-ChatbarItem",c),role:"listitem","data-kind":y?"image":"file","data-status":a.status,title:a.name},l??e.createElement(ft,{lead:w,leadKind:y&&a.status!=="uploading"?"image":"icon",label:a.name,detail:p?`${R}, ${p}`:R,removeLabel:`Remove ${a.name}`,onRemove:v?void 0:x}))});$e.displayName="Chatbar.Attachment";var bt=e.forwardRef((t,r)=>{let{children:a,icon:i,image:c,color:l,onRemove:u,removeLabel:d,className:g,...y}=t,R=I(),p=R.disabled||R.readOnly,v=u?x=>{ht(x.currentTarget,R.textareaRef),u()}:void 0;return e.createElement("div",{...y,ref:r,className:E("kui-ChatbarItem",g),role:"listitem","data-accent-color":c?void 0:l??"gray",title:a},e.createElement(ft,{lead:c?e.createElement("img",{className:"kui-ChatbarAttachmentImage",src:c,alt:""}):i,leadKind:c?"image":"icon",label:a,removeLabel:d??`Remove ${a}`,onRemove:p?void 0:v}))});bt.displayName="Chatbar.Item";var Rt=e.forwardRef((t,r)=>{let{asChild:a,accept:i,multiple:c,disabled:l,onPointerDown:u,onClick:d,children:g,color:y,...R}=t,p=I(),v=l||p.disabled||p.readOnly,x={...R,ref:r,className:E("kui-ChatbarAttachTrigger",R.className),type:R.type??"button","aria-label":R["aria-label"]??"Add attachments",disabled:v,onPointerDown:w=>{u?.(w),!v&&!w.defaultPrevented&&p.beginFilePickerPress()},onClick:w=>{d?.(w),!(v||w.defaultPrevented)&&p.openFilePicker({accept:i,multiple:c})}};return a?e.createElement(U,{...x},g):e.createElement(we,{iconOnly:!0,emphasis:"quiet",color:"gray",size:p.size,...x},g??e.createElement(Ze,{"aria-hidden":!0}))});Rt.displayName="Chatbar.AttachTrigger";var Ct=e.forwardRef((t,r)=>{let{asChild:a,children:i,className:c,...l}=t;return I().open?e.createElement("div",null,e.createElement(a?U:"div",{...l,ref:r,className:E("kui-ChatbarRow",c)},e.createElement(ze,{align:"center",justify:"between",width:"100%"},i))):null});Ct.displayName="Chatbar.Row";var gt=e.forwardRef((t,r)=>{let{className:a,...i}=t;return e.createElement("div",{...i,ref:r,className:E("kui-ChatbarRowStart",a)})});gt.displayName="Chatbar.RowStart";var vt=e.forwardRef((t,r)=>{let{className:a,...i}=t;return e.createElement("div",{...i,ref:r,className:E("kui-ChatbarRowEnd",a)})});vt.displayName="Chatbar.RowEnd";var yt=e.forwardRef((t,r)=>{let{asChild:a,clearOnSend:i,disabled:c,children:l,style:u,className:d,size:g,variant:y,emphasis:R,tabIndex:p,onClick:v,status:x="ready",onStop:w,onRetry:b,stopLabel:S="Stop",retryLabel:D="Retry",stopIcon:O,retryIcon:z,"aria-label":H,"aria-labelledby":F,...Q}=t,f=I(),_=e.useContext(We),B=Ve(_)||f.attachments.length>0,A=B?"send":x==="submitted"||x==="streaming"?"stop":x==="error"?"retry":"send";if(f.sendMode==="never"&&A==="send")return null;let L=A!=="send"||f.sendMode==="always"||B,Z=A==="send"?c||f.disabled||f.readOnly||!B:c||f.disabled,j=A==="stop"?{"aria-label":S}:A==="retry"?{"aria-label":D}:F?{"aria-labelledby":F}:{"aria-label":H??"Send"},q=N=>{if(v?.(N),N.defaultPrevented||Z)return;if(A==="stop"){w?.();return}if(A==="retry"){b?.();return}let M=i??f.clearOnSubmit;f.submit(M)&&M&&f.textareaRef.current?.focus({preventScroll:!0})},V=A==="stop"?O??(x==="submitted"?e.createElement(De,null):e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0},e.createElement("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2"}))):A==="retry"?z??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.createElement("path",{d:"M3 3v5h5"})):l??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"}));return e.createElement(we,{iconOnly:!0,...Q,ref:r,size:g??f.size,...R?{emphasis:R}:{variant:y??(f.open||A!=="send"?"solid":"ghost")},disabled:Z,className:E("kui-ChatbarSend",d),style:{opacity:L?1:0,pointerEvents:L?void 0:"none",...u},"aria-hidden":L?void 0:!0,tabIndex:L?p:-1,asChild:a,onClick:q,"data-status":x,"data-mode":A,...j},V)});yt.displayName="Chatbar.Send";export{lt as a,ut as b,dt as c,mt as d,pt as e,$e as f,bt as g,Rt as h,Ct as i,gt as j,vt as k,yt as l,Wt as m};
|
|
3
|
+
//# sourceMappingURL=chunk-N3B6EGXL.js.map
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=chunk-PZ6Z7WTR.js.map
|
|
1
|
+
import{b as s}from"./chunk-KRJTW535.js";import{a as t,e as a}from"./chunk-CUNKWFKA.js";import{a as e}from"./chunk-NZJGC6ZW.js";var o=["1","2","3","4","5","6","7","8","9"],r=["raised","solid","soft","surface","outline"],n=["cover","contain","fill","scale-down","none"],p={...e,size:{type:"enum",className:"kui-r-size",values:o,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:r,default:"raised"},...a,...s,fallback:{type:"ReactNode",required:!0},status:{type:"enum",values:t,default:void 0},statusLabel:{type:"string",default:void 0},badge:{type:"ReactNode",default:void 0},fit:{type:"enum",className:"kui-r-fit",values:n,default:"cover",responsive:!0}};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NNE3KNH4.js.map
|